@hippovideo/video-sdk 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/hv_recorder.js +2 -2
- package/app/hv_recorder.js.gz +0 -0
- package/package.json +1 -1
package/app/hv_recorder.js
CHANGED
|
@@ -245,7 +245,7 @@ var n;n=function(){return function(){var e={686:function(e,t,i){"use strict";i.d
|
|
|
245
245
|
* Copyright jQuery Foundation and other contributors
|
|
246
246
|
* Released under the MIT license.
|
|
247
247
|
* http://jquery.org/license
|
|
248
|
-
*/!function(s){"use strict";o=[i(2),i(705),i(706),i(40)],void 0===(a="function"==typeof(r=function(e){return e.effects={effect:{}},function(){var t,i=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function o(e){var t,i,n,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(r&&r.length&&r[0]&&r[r[0]])for(i=r.length;i--;)"string"==typeof r[t=r[i]]&&(o[(n=t,n.replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()})))]=r[t]);else for(t in r)"string"==typeof r[t]&&(o[t]=r[t]);return o}e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(n.style(e.elem,i,e.end),e.setAttr=!0)}})),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(t,n,a,s){var l=e.speed(n,a,s);return this.queue((function(){var n,a=e(this),s=a.attr("class")||"",u=l.children?a.find("*").addBack():a;u=u.map((function(){return{el:e(this),start:o(this)}})),(n=function(){e.each(i,(function(e,i){t[i]&&a[i+"Class"](t[i])}))})(),u=u.map((function(){return this.end=o(this.el[0]),this.diff=function(t,i){var n,o,a={};for(n in i)o=i[n],t[n]!==o&&(r[n]||!e.fx.step[n]&&isNaN(parseFloat(o))||(a[n]=o));return a}(this.start,this.end),this})),a.attr("class",s),u=u.map((function(){var t=this,i=e.Deferred(),n=e.extend({},l,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,n),i.promise()})),e.when.apply(e,u.get()).done((function(){n(),e.each(arguments,(function(){var t=this.el;e.each(this.diff,(function(e){t.css(e,"")}))})),l.complete.call(a[0])}))}))},e.fn.extend({addClass:(t=e.fn.addClass,function(i,n,r,o){return n?e.effects.animateClass.call(this,{add:i},n,r,o):t.apply(this,arguments)}),removeClass:function(t){return function(i,n,r,o){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},n,r,o):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,n,r,o,a){return"boolean"==typeof n||void 0===n?r?e.effects.animateClass.call(this,n?{add:i}:{remove:i},r,o,a):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},n,r,o)}}(e.fn.toggleClass),switchClass:function(t,i,n,r,o){return e.effects.animateClass.call(this,{add:i,remove:t},n,r,o)}})}(),function(){var t;function i(t,i,n,r){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),"function"==typeof i&&(r=i,n=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(r=n,n=i,i={}),"function"==typeof n&&(r=n,n=null),i&&e.extend(t,i),n=n||i.duration,t.duration=e.fx.off?0:"number"==typeof n?n:n in e.fx.speeds?e.fx.speeds[n]:e.fx.speeds._default,t.complete=r||i.complete,t}function n(t){return!(t&&"number"!=typeof t&&!e.fx.speeds[t])||("string"==typeof t&&!e.effects.effect[t]||("function"==typeof t||"object"==typeof t&&!t.effect))}function r(e,t){var i=t.outerWidth(),n=t.outerHeight(),r=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(e)||["",0,i,n,0];return{top:parseFloat(r[1])||0,right:"auto"===r[2]?i:parseFloat(r[2]),bottom:"auto"===r[3]?n:parseFloat(r[3]),left:parseFloat(r[4])||0}}e.expr&&e.expr.pseudos&&e.expr.pseudos.animated&&(e.expr.pseudos.animated=(t=e.expr.pseudos.animated,function(i){return!!e(i).data("ui-effects-animated")||t(i)})),!1!==e.uiBackCompat&&e.extend(e.effects,{save:function(e,t){for(var i=0,n=t.length;i<n;i++)null!==t[i]&&e.data("ui-effects-"+t[i],e[0].style[t[i]])},restore:function(e,t){for(var i,n=0,r=t.length;n<r;n++)null!==t[n]&&(i=e.data("ui-effects-"+t[n]),e.css(t[n],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),float:t.css("float")},n=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:t.width(),height:t.height()},o=document.activeElement;try{o.id}catch(e){o=document.body}return t.wrap(n),(t[0]===o||e.contains(t[0],o))&&e(o).trigger("focus"),n=t.parent(),"static"===t.css("position")?(n.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],(function(e,n){i[n]=t.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")})),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(r),n.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).trigger("focus")),t}}),e.extend(e.effects,{version:"1.13.1",define:function(t,i,n){return n||(n=i,i="effect"),e.effects.effect[t]=n,e.effects.effect[t].mode=i,n},scaledDimensions:function(e,t,i){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(t||100)/100:1,r="vertical"!==i?(t||100)/100:1;return{height:e.height()*r,width:e.width()*n,outerHeight:e.outerHeight()*r,outerWidth:e.outerWidth()*n}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,i){var n=e.queue();t>1&&n.splice.apply(n,[1,0].concat(n.splice(t,i))),e.dequeue()},saveStyle:function(e){e.data("ui-effects-style",e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data("ui-effects-style")||"",e.removeData("ui-effects-style")},mode:function(e,t){var i=e.is(":hidden");return"toggle"===t&&(t=i?"show":"hide"),(i?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(e,t){var i,n;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=e[1]/t.width}return{x:n,y:i}},createPlaceholder:function(t){var i,n=t.css("position"),r=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=e("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data("ui-effects-placeholder",i)),t.css({position:n,left:r.left,top:r.top}),i},removePlaceholder:function(e){var t="ui-effects-placeholder",i=e.data(t);i&&(i.remove(),e.removeData(t))},cleanUp:function(t){e.effects.restoreStyle(t),e.effects.removePlaceholder(t)},setTransition:function(t,i,n,r){return r=r||{},e.each(i,(function(e,i){var o=t.cssUnit(i);o[0]>0&&(r[i]=o[0]*n+o[1])})),r}}),e.fn.extend({effect:function(){var t=i.apply(this,arguments),n=e.effects.effect[t.effect],r=n.mode,o=t.queue,a=o||"fx",s=t.complete,l=t.mode,u=[],c=function(t){var i=e(this),n=e.effects.mode(i,l)||r;i.data("ui-effects-animated",!0),u.push(n),r&&("show"===n||n===r&&"hide"===n)&&i.show(),r&&"none"===n||e.effects.saveStyle(i),"function"==typeof t&&t()};if(e.fx.off||!n)return l?this[l](t.duration,s):this.each((function(){s&&s.call(this)}));function d(i){var o=e(this);function a(){"function"==typeof s&&s.call(o[0]),"function"==typeof i&&i()}t.mode=u.shift(),!1===e.uiBackCompat||r?"none"===t.mode?(o[l](),a()):n.call(o[0],t,(function(){o.removeData("ui-effects-animated"),e.effects.cleanUp(o),"hide"===t.mode&&o.hide(),a()})):(o.is(":hidden")?"hide"===l:"show"===l)?(o[l](),a()):n.call(o[0],t,a)}return!1===o?this.each(c).each(d):this.queue(a,c).queue(a,d)},show:function(e){return function(t){if(n(t))return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="show",this.effect.call(this,r)}}(e.fn.show),hide:function(e){return function(t){if(n(t))return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="hide",this.effect.call(this,r)}}(e.fn.hide),toggle:function(e){return function(t){if(n(t)||"boolean"==typeof t)return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="toggle",this.effect.call(this,r)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),n=[];return e.each(["em","px","%","pt"],(function(e,t){i.indexOf(t)>0&&(n=[parseFloat(i),t])})),n},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):r(this.css("clip"),this)},transfer:function(t,i){var n=e(this),r=e(t.to),o="fixed"===r.css("position"),a=e("body"),s=o?a.scrollTop():0,l=o?a.scrollLeft():0,u=r.offset(),c={top:u.top-s,left:u.left-l,height:r.innerHeight(),width:r.innerWidth()},d=n.offset(),h=e("<div class='ui-effects-transfer'></div>");h.appendTo("body").addClass(t.className).css({top:d.top-s,left:d.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(c,t.duration,t.easing,(function(){h.remove(),"function"==typeof i&&i()}))}}),e.fx.step.clip=function(t){t.clipInit||(t.start=e(t.elem).cssClip(),"string"==typeof t.end&&(t.end=r(t.end,t.elem)),t.clipInit=!0),e(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})}}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],(function(e,i){t[i]=function(t){return Math.pow(t,e+2)}})),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;e<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,(function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?i(2*e)/2:1-i(-2*e+2)/2}}))}(),e.effects})?r.apply(t,o):r)||(e.exports=a)}()}).call(this,i(2))},function(e,t){function i(e,t,i,n,r,o,a){try{var s=e[o](a),l=s.value}catch(e){return void i(e)}s.done?t(l):Promise.resolve(l).then(n,r)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,l,"next",e)}function l(e){i(a,r,o,s,l,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){i(133);var n=i(14),r=n.Service,o=n.apiLoader;o.services.firehose={},n.Firehose=r.defineService("firehose",["2015-08-04"]),Object.defineProperty(o.services.firehose,"2015-08-04",{get:function(){var e=i(512);return e.paginators=i(513).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.Firehose},function(e,t,i){i(133);var n=i(14),r=n.Service,o=n.apiLoader;o.services.kinesis={},n.Kinesis=r.defineService("kinesis",["2013-12-02"]),Object.defineProperty(o.services.kinesis,"2013-12-02",{get:function(){var e=i(527);return e.paginators=i(528).pagination,e.waiters=i(529).waiters,e},enumerable:!0,configurable:!0}),e.exports=n.Kinesis},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){e.exports=function(e,t,i,n){var r=i?i.call(n,e,t):void 0;if(void 0!==r)return!!r;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<o.length;l++){var u=o[l];if(!s(u))return!1;var c=e[u],d=t[u];if(!1===(r=i?i.call(n,c,d,u):void 0)||void 0===r&&c!==d)return!1}return!0}},function(e,t,i){"use strict";t.a=function(e){function t(e,t,n){var r=t.trim().split(f);t=r;var o=r.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<o;++s)t[s]=i(e,t[s],n).trim();break;default:var l=s=0;for(t=[];s<o;++s)for(var u=0;u<a;++u)t[l++]=i(e[u]+" ",r[s],n).trim()}return t}function i(e,t,i){var n=t.charCodeAt(0);switch(33>n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*i&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function n(e,t,i,o){var a=e+";",s=2*t+3*i+4*o;if(944===s){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===P||2===P&&r(l,1)?"-webkit-"+l+l:l}if(0===P||2===P&&!r(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(C,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return h.test(a)?a.replace(d,":-webkit-")+a.replace(d,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(b,"tb");break;case 232:l=a.replace(b,"tb-rl");break;case 220:l=a.replace(b,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(_,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(_,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===T.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?n(e.replace("stretch","fill-available"),t,i,o).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===i+o&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+a}return a}function r(e,t){var i=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?i:10);return i=e.substring(i+1,e.length-1),O(2!==t?n:n.replace(S,"$1"),i,t)}function o(e,t){var i=n(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return i!==t+";"?i.replace(E," or ($1)").substring(4):"("+t+")"}function a(e,t,i,n,r,o,a,s,u,c){for(var d,h=0,p=t;h<D;++h)switch(d=R[h].call(l,e,p,i,n,r,o,a,s,u,c)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function s(e){return void 0!==(e=e.prefix)&&(O=null,e?"function"!=typeof e?P=1:(P=2,O=e):P=0),s}function l(e,i){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<D){var l=a(-1,i,s,s,x,k,0,0,0,0);void 0!==l&&"string"==typeof l&&(i=l)}var d=function e(i,s,l,d,h){for(var p,f,g,b,E,_=0,S=0,T=0,C=0,R=0,O=0,L=g=p=0,M=0,F=0,U=0,B=0,V=l.length,z=V-1,H="",j="",q="",G="";M<V;){if(f=l.charCodeAt(M),M===z&&0!==S+C+T+_&&(0!==S&&(f=47===S?10:47),C=T=_=0,V++,z++),0===S+C+T+_){if(M===z&&(0<F&&(H=H.replace(c,"")),0<H.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:H+=l.charAt(M)}f=59}switch(f){case 123:for(p=(H=H.trim()).charCodeAt(0),g=1,B=++M;M<V;){switch(f=l.charCodeAt(M)){case 123:g++;break;case 125:g--;break;case 47:switch(f=l.charCodeAt(M+1)){case 42:case 47:e:{for(L=M+1;L<z;++L)switch(l.charCodeAt(L)){case 47:if(42===f&&42===l.charCodeAt(L-1)&&M+2!==L){M=L+1;break e}break;case 10:if(47===f){M=L+1;break e}}M=L}}break;case 91:f++;case 40:f++;case 34:case 39:for(;M++<z&&l.charCodeAt(M)!==f;);}if(0===g)break;M++}switch(g=l.substring(B,M),0===p&&(p=(H=H.replace(u,"").trim()).charCodeAt(0)),p){case 64:switch(0<F&&(H=H.replace(c,"")),f=H.charCodeAt(1)){case 100:case 109:case 115:case 45:F=s;break;default:F=I}if(B=(g=e(s,F,g,f,h+1)).length,0<D&&(E=a(3,g,F=t(I,H,U),s,x,k,B,f,h,d),H=F.join(""),void 0!==E&&0===(B=(g=E.trim()).length)&&(f=0,g="")),0<B)switch(f){case 115:H=H.replace(w,o);case 100:case 109:case 45:g=H+"{"+g+"}";break;case 107:g=(H=H.replace(m,"$1 $2"))+"{"+g+"}",g=1===P||2===P&&r("@"+g,3)?"@-webkit-"+g+"@"+g:"@"+g;break;default:g=H+g,112===d&&(j+=g,g="")}else g="";break;default:g=e(s,t(s,H,U),g,d,h+1)}q+=g,g=U=F=L=p=0,H="",f=l.charCodeAt(++M);break;case 125:case 59:if(1<(B=(H=(0<F?H.replace(c,""):H).trim()).length))switch(0===L&&(p=H.charCodeAt(0),45===p||96<p&&123>p)&&(B=(H=H.replace(" ",":")).length),0<D&&void 0!==(E=a(1,H,s,i,x,k,j.length,d,h,d))&&0===(B=(H=E.trim()).length)&&(H="\0\0"),p=H.charCodeAt(0),f=H.charCodeAt(1),p){case 0:break;case 64:if(105===f||99===f){G+=H+l.charAt(M);break}default:58!==H.charCodeAt(B-1)&&(j+=n(H,p,f,H.charCodeAt(2)))}U=F=L=p=0,H="",f=l.charCodeAt(++M)}}switch(f){case 13:case 10:47===S?S=0:0===1+p&&107!==d&&0<H.length&&(F=1,H+="\0"),0<D*N&&a(0,H,s,i,x,k,j.length,d,h,d),k=1,x++;break;case 59:case 125:if(0===S+C+T+_){k++;break}default:switch(k++,b=l.charAt(M),f){case 9:case 32:if(0===C+_+S)switch(R){case 44:case 58:case 9:case 32:b="";break;default:32!==f&&(b=" ")}break;case 0:b="\\0";break;case 12:b="\\f";break;case 11:b="\\v";break;case 38:0===C+S+_&&(F=U=1,b="\f"+b);break;case 108:if(0===C+S+_+A&&0<L)switch(M-L){case 2:112===R&&58===l.charCodeAt(M-3)&&(A=R);case 8:111===O&&(A=O)}break;case 58:0===C+S+_&&(L=M);break;case 44:0===S+T+C+_&&(F=1,b+="\r");break;case 34:case 39:0===S&&(C=C===f?0:0===C?f:C);break;case 91:0===C+S+T&&_++;break;case 93:0===C+S+T&&_--;break;case 41:0===C+S+_&&T--;break;case 40:if(0===C+S+_){if(0===p)switch(2*R+3*O){case 533:break;default:p=1}T++}break;case 64:0===S+T+C+_+L+g&&(g=1);break;case 42:case 47:if(!(0<C+_+T))switch(S){case 0:switch(2*f+3*l.charCodeAt(M+1)){case 235:S=47;break;case 220:B=M,S=42}break;case 42:47===f&&42===R&&B+2!==M&&(33===l.charCodeAt(B+2)&&(j+=l.substring(B,M+1)),b="",S=0)}}0===S&&(H+=b)}O=R,R=f,M++}if(0<(B=j.length)){if(F=s,0<D&&(void 0!==(E=a(2,j,F,i,x,k,B,d,h,d))&&0===(j=E).length))return G+j+q;if(j=F.join(",")+"{"+j+"}",0!=P*A){switch(2!==P||r(j,2)||(A=0),A){case 111:j=j.replace(y,":-moz-$1")+j;break;case 112:j=j.replace(v,"::-webkit-input-$1")+j.replace(v,"::-moz-$1")+j.replace(v,":-ms-input-$1")+j}A=0}}return G+j+q}(I,s,i,0,0);return 0<D&&(void 0!==(l=a(-2,d,s,s,x,k,d.length,0,0,0))&&(d=l)),"",A=0,k=x=1,d}var u=/^\0+/g,c=/[\0\r\f]/g,d=/: */g,h=/zoo|gra/,p=/([,: ])(transform)/g,f=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,m=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,y=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,_=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,k=1,x=1,A=0,P=1,I=[],R=[],D=0,O=null,N=0;return l.use=function e(t){switch(t){case void 0:case null:D=R.length=0;break;default:if("function"==typeof t)R[D++]=t;else if("object"==typeof t)for(var i=0,n=t.length;i<n;++i)e(t[i]);else N=0|!!t}return e},l.set=s,void 0!==e&&s(e),l}},function(e,t,i){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e){e.exports=JSON.parse('{"a":"/api/v1/prompter"}')},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="small-12 columns large-centered video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a href="#allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a href="#myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a href="#sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w('</a></li><a id="refreshPrompterPages" class="refresh"><img src="/svg/refresh.svg"></a>').x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('</ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="large-12 columns prompt-settings" id="promptPropertiesId"><div class="medium-3 columns font-size text-left right-bar" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="columns medium-3 right-bar linespace-container" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="medium-4 columns slider right-bar"><div class="small-5 columns"><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="small-1 columns text-center speed-minus-container ').x(t.get(["inactive_minus_speed"],!1),t,{block:y},{}).w('"><img id="speedDecreaseId" class="minus" src="/svg/minus-ico-white.svg" width="10"></div><div class="small-4 columns text-center speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="5" ></span></div><div class="small-1 columns text-center speed-plus-container left ').x(t.get(["inactive_plus_speed"],!1),t,{block:b},{}).w('"><img id="speedIncreaseId" class="plus" src="/svg/plus-ico-white.svg" width="10"></div></div><div class="medium-2 columns"><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="large-12 columns telepromterColumnContainer" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="small-6 small-offset-3 columns video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}function y(e,t){return e.w(" in-active")}function b(e,t){return e.w(" in-active")}e.register("templates/wiz/video_prompter",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/video_prompter",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="small-12 columns large-centered video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a data-tab="allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a data-tab="myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a data-tab="sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w("</a></li>").x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('<a id="refreshPrompterPages" class="refresh"><img src="/svg/refresh.svg"></a></ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="large-12 columns prompt-settings" id="promptPropertiesId"><div class="medium-3 columns font-size text-center right-bar" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="/svg/minusicon.svg" width="25"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="/svg/plusicon.svg" width="25"></label></div><div class="columns medium-3 right-bar linespace-container text-center" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minusicon.svg" width="25"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plusicon.svg" width="25"></label></div><div class="medium-4 columns slider right-bar"><div class="small-5 columns"><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="small-1 columns text-center speed-minus-container ').x(t.get(["inactive_minus_speed"],!1),t,{block:y},{}).w('"><img id="speedDecreaseId" class="minus" src="/svg/minusicon.svg" width="10"></div><div class="small-4 columns text-center speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="5" ></span></div><div class="small-1 columns text-center speed-plus-container left ').x(t.get(["inactive_plus_speed"],!1),t,{block:b},{}).w('"><img id="speedIncreaseId" class="plus" src="/svg/plusicon.svg" width="10"></div></div><div class="medium-2 columns text-center"><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="large-12 columns ').x(t.get(["newRecorderScreen"],!1),t,{else:w,block:E},{}).w(' custom-scroll" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="small-6 small-offset-3 columns video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}function y(e,t){return e.w(" in-active")}function b(e,t){return e.w(" in-active")}function w(e,t){return e.w("telepromterColumnContainer")}function E(e,t){return e.w("hvteleprompter-column-container")}e.register("templates/wiz/video_prompter_new",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/video_prompter_new",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a href="#allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a href="#myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a href="#sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w('</a></li><a id="refreshPrompterPages" class="refresh"><img src="/svg/refresh.svg"></a>').x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('</ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="prompt-settings" id="promptPropertiesId"><div class="font-size text-left right-bar col-grid-3" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><div><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6></div><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="right-bar linespace-container col-grid-3" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><div><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6></div><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="slider right-bar"><div><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="speed-minus-container"><img id="speedDecreaseId" class="minus" src="/svg/minus-ico-white.svg" width="10"></div><div class="speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="5" ></span></div><div class="speed-plus-container left"><img id="speedIncreaseId" class="plus" src="/svg/plus-ico-white.svg" width="10"></div></div><div class=""><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="telepromterColumnContainer" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}e.register("templates/wiz/sdk_video_prompter",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/sdk_video_prompter",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n=i(615),r=0;e.exports=function(e){var t=++r;return n(e)+t}},function(e,t,i){var n,r;n=[i(625),i(630),i(7)],void 0===(r=function(e,t,i){return function(n){var r=!1;try{r=HippoVideo.data.api.getProperty("isLessonly")}catch(e){}return r=r||"lessonly"==i.getQueryParams().type||"lessonly"==i.getQueryParams().integration_type,n.isDelivery&&!r||n.isNewPlayer?new t(n):new e(n)}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return T}));i(96),i(183),i(24),i(244),i(56),i(71),i(84),i(112),i(62),i(175),i(51),i(85),i(86),i(136),i(60),i(137);var n=i(98),r=i.n(n),o=i(97),a=i.n(o),s=i(1),l=i.n(s),u=i(0),c=i.n(u),d=i(392),h=i.n(d),p=i(397),f=i.n(p),g=i(6),m=i.n(g),v=i(38),y=i(100),b=i.n(y),w=i(398);function E(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function S(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function T(t){var i=this;console.log("SE INIT PROPS ",t.videoPlayerView);var n=t.videoPlayerView,o=t.token,s=t.tokenType,d=t.recorder,p=t.recorderApiModel,g=t.isPersonalisationEnabled,y=t.customColors,_=t.footageUrls,T=t.showSimpleEditor,C=t.projectJson,k=t.integrationType,x=t.onSimpleEditorInitialize,A=Object(u.useState)(d.recordDetails),P=A[0],I=A[1],R=Object(u.useContext)(v.a).recorderInitOptions.edit,D=Object(u.useRef)(!1),O=Object(u.useRef)(),N=Object(u.useRef)(C),L=Object(u.useRef)();Object(u.useEffect)(function(){var e=this;if(l()(this,i),!P||!P.asset_id)return d.getRecordDetails().then(function(t){l()(this,e),I(t)}.bind(this)).catch(function(t){l()(this,e),console.log("ERROR IN GETTING RECORD DETAILS ",t)}.bind(this)),function(){l()(this,e),d.cancelGetRecordDetails()}.bind(this)}.bind(this),[d]);var M=function(){if(l()(this,i),P.asset_id){var e={el:O.current,videoPlayerView:n,integration_type:k,assetId:P&&P.asset_id,token:o,tokenType:s,recorder:d,recorderApiModel:p,isBlurEnabled:!0,embeddedDigest:P&&P.delivery_token,isPersonalizationEnabled:g,customColors:y,authoringId:P&&P.authoring_id,footageUrls:_};console.log("SIMPLE EDIT OPTIONS ",e),L.current?(console.log("1"),L.current.initialize(e)):(console.log("2"),L.current=new h.a(e)),x&&x(L.current)}}.bind(this),F=function(){l()(this,i);try{var e={};if(R&&"object"===a()(R)&&null!==R)for(var t in R)!1!==R[t]&&"false"!==R[t]||(e[t]="false");return e}catch(e){return{}}}.bind(this);return Object(u.useEffect)(function(){l()(this,i),O.current&&(O.current.innerHTML+=f()(e.extend(b.a,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?S(Object(i),!0).forEach((function(t){r()(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):S(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({shouldHideTrimTimer:"true",integrationType:k,isAddImageEnabled:!1,canShowPersonalization:g,mfValues:m.a.personalization.defaultMergeFields},F()))),D.current=!0,console.log("CONTROLS ADDED >>>",O.current))}.bind(this),[O]),Object(u.useEffect)(function(){l()(this,i),n&&O.current&&P&&D.current&&M()}.bind(this),[n,O,P,D]),Object(u.useEffect)(function(){if(l()(this,i),L.current)if(T){L.current.enable();var e,t=E(O.current.getElementsByClassName("simple-edit-container"));try{for(t.s();!(e=t.n()).done;){e.value.classList.remove("hide")}}catch(e){t.e(e)}finally{t.f()}L.current.height="140px"}else{var n,r=E(O.current.getElementsByClassName("simple-edit-container"));try{for(r.s();!(n=r.n()).done;){n.value.classList.add("hide")}}catch(e){r.e(e)}finally{r.f()}L.current.height="0"}}.bind(this),[T]),Object(u.useEffect)(function(){var e=this;return l()(this,i),N.current=C,C&&L.current&&n&&(setTimeout(function(){l()(this,e),L.current.setProjectJson(C)}.bind(this),300),n.show()),function(){l()(this,e)}.bind(this)}.bind(this),[C]),Object(u.useEffect)(function(){var e=this;l()(this,i),L.current&&n&&N.current&&(setTimeout(function(){l()(this,e),console.log("PROJECT JSON 123",C),L.current.setProjectJson(C)}.bind(this),300),n.show())}.bind(this),[L,n]),c.a.createElement(w.a,{showSimpleEditor:!0,ref:O})}}).call(this,i(10))},function(e,t,i){var n,r;n=[i(2),i(10),i(35),i(7),i(11),i(325),i(632),i(633),i(6),i(48),i(186),i(185),i(140),i(634),i(237),i(635),i(709),i(117),i(138),i(139),i(73),i(696),i(697),i(698),i(356),i(701),i(702),i(115),i(704),i(707)],void 0===(r=function(e,t,i,n,r,o,a,s,l,u,c,d,h,p,f,g,m,v){var y;return d=d.default,r=r.default,a=a.default,m=m.default,s=s.default,i.View.extend({initialize:function(t){y=d.getVideoI18N_v2(),this.$el=t.$el||e(t.el),this.videoPlayerView=t.videoPlayerView,this.assetId=t.assetId,this.token=t.token,this.tokenType=t.tokenType,this.recorder=t.recorder,this.recorderApiModel=t.recorderApiModel,this.digest=t.digest,this.integrationType=t.integration_type,this.embeddedDigest=t.embeddedDigest,this.isPersonalizationEnabled=t.isPersonalizationEnabled,this.customColors=t.customColors,this.overrideWarnOnExit=t.overrideWarnOnExit,this.isPPR=t.isPPR,this.enabled=!1,this.askReloadConfirmation=!1,this.onBoardRequired=this.isOnBoardRequired(),this.currentSelectedText=void 0,this.currentSelectedSticker=void 0,this.currentSelectedCallout=void 0,this.currentSelectedBlur=void 0,this.showingColorPicker=!1,this.blurPlayInterval=void 0,this.isBlurEnabled=t.isBlurEnabled,this.authoringId=t.authoringId,this.footageUrls=t.footageUrls||{},this.closeImportCallback=t.closeImportCallback||function(){},this.openImportCallback=t.openImportCallback||function(){},this.defaultTextAreaValue=y.simpleEdit.enterTextHere,this.isMac=window.navigator.userAgent.indexOf("Mac")>=0,this.isTicketVideoPreview=t.isTicketViewPreview,this.isAssignmentVideoPreview=t.isAssignmentVideoPreview,this.isTestimonialVideoPreview=t.isTestimonialVideoPreview,this.isGuestRecording=t.isGuestRecording,this.fromQuickRecord=t.fromQuickRecord,this.canInitializeUI=t.initEditUI,this.initSettingModel(),this.brand_colors=[],this.defaultFontValue="timesnewroman",this.brand_font_color="#000000",this.colorPaletteEnabled=t.colorPaletteEnabled,this.isPPR=t.isPPR,this.fontCache={},this.sessionDetails={addedClips:[],primaryVideo:void 0,secondaryVideo:void 0,trimSliderStart:0,trimSliderEnd:0,totalAddedEffects:0},this.stickerSize=[],this.stickers={1:{name:"Smileys",mainId:1124,startId:945,endId:1935},2:{name:"Animals&Nature",mainId:315,startId:286,endId:434},3:{name:"Food&Drink",mainId:932,startId:854,endId:944},4:{name:"Objects",mainId:1947,startId:1936,endId:2134},5:{name:"Travel&Places",mainId:435,startId:435,endId:547},6:{name:"Activity",mainId:829,startId:547,endId:853},7:{name:"Symbols",mainId:2340,startId:2135,endId:2428},8:{name:"Flags",mainId:25,startId:2,endId:285}},this.callouts=n.getAvailableCallouts(),this.calloutsDisplayorder=n.getCalloutDisplayorder(),this.selectPrimaryVideo=this.selectPrimaryVideo.bind(this),this.selectSecondaryVideo=this.selectSecondaryVideo.bind(this),this.userEventStart=this.userEventStart.bind(this),this.userEventStop=this.userEventStop.bind(this),this.selectTrim=this.selectTrim.bind(this),this.selectCrop=this.selectCrop.bind(this),this.selectAddText=this.selectAddText.bind(this),this.selectAddCallouts=this.selectAddCallouts.bind(this),this.selectAddStickers=this.selectAddStickers.bind(this),this.selectAddImage=this.selectAddImage.bind(this),this.hanldeImageAspectRatioChange=this.hanldeImageAspectRatioChange.bind(this),this.deleteImage=this.deleteImage.bind(this),this.changeImageOpacity=this.changeImageOpacity.bind(this),this.addImage=this.addImage.bind(this),this.addPersonalizedImage=this.addPersonalizedImage.bind(this),this.processSelectedImage=this.processSelectedImage.bind(this),this.createNewImage=this.createNewImage.bind(this),this.addWebsiteImageBtn=this.addWebsiteImageBtn.bind(this),this.applyCrop=this.applyCrop.bind(this),this.resetCrop=this.resetCrop.bind(this),this.addEnteredText=this.addEnteredText.bind(this),this.textPropertyChanged=this.textPropertyChanged.bind(this),this.textEditableChanged=this.textEditableChanged.bind(this),this.deleteText=this.deleteText.bind(this),this.addNewSticker=this.addNewSticker.bind(this),this.deleteSticker=this.deleteSticker.bind(this),this.stickerPropertyChanged=this.stickerPropertyChanged.bind(this),this.calloutPropertyChanged=this.calloutPropertyChanged.bind(this),this.deleteCallout=this.deleteCallout.bind(this),this.playerTimeUpdate=this.playerTimeUpdate.bind(this),this.makeVideoResizeableDraggable=this.makeVideoResizeableDraggable.bind(this),this.selectBlur=this.selectBlur.bind(this),this.selectAddBlur=this.selectAddBlur.bind(this),this.deleteBlur=this.deleteBlur.bind(this),this.addNewBlur=this.addNewBlur.bind(this),this.blurPropertyChanged=this.blurPropertyChanged.bind(this),this.blurAreaChanged=this.blurAreaChanged.bind(this),this.handleVideoPlay=this.handleVideoPlay.bind(this),this.handleVideoPause=this.handleVideoPause.bind(this),this.handleVideoSeeked=this.handleVideoSeeked.bind(this),this.newComponentDragged=this.newComponentDragged.bind(this),this.newComponentDropped=this.newComponentDropped.bind(this),this.getReloadConfirmationState=this.getReloadConfirmationState.bind(this),this.checkAndPopulateMf=this.checkAndPopulateMf.bind(this),this.playerResized=this.playerResized.bind(this),this.textBoxResized=this.textBoxResized.bind(this),this.initializeAtwho=this.initializeAtwho.bind(this),this.fontLoaded=this.fontLoaded.bind(this),this.markerSelected=this.markerSelected.bind(this),this.globalKeypress=this.globalKeypress.bind(this),this.initSettingModel=this.initSettingModel.bind(this),this.getBrandingInfoSuccess=this.getBrandingInfoSuccess.bind(this),this.cropResizable=this.videoPlayerView.$el.find(".se-crop-resizable"),this.primaryVideoContainer=this.videoPlayerView.$el.find(".primary-video-container"),this.primaryVideoOverflowContainer=this.videoPlayerView.$el.find(".primary-video-overflow-container"),this.secondaryVideoContainer=this.videoPlayerView.$el.find(".secondary-video-container"),this.secondaryVideoOverflowContainer=this.videoPlayerView.$el.find(".secondary-video-overflow-container"),this.infoText=this.$el.find(".default-control-detail .info-text"),r.initializeJQueryTouchPunch(),this.$el.find(".se-text-properties").unbind("change").bind("change",this.textPropertyChanged),0!=this.canInitializeUI&&this.initializeUI(),e(document).bind("mousedown",{that:this},this.globalClick),this.$el.find(".trim-btn").unbind("click").bind("click",this.selectTrim),this.$el.find(".crop-btn").unbind("click").bind("click",this.selectCrop),this.$el.find(".add-text-btn").unbind("click").bind("click",this.selectAddText),this.$el.find(".add-callouts-btn").unbind("click").bind("click",this.selectAddCallouts),this.$el.find(".add-stickers-btn").unbind("click").bind("click",this.selectAddStickers),this.$el.find(".add-image-btn").unbind("click").bind("click",this.selectAddImage),this.$el.find(".apply-crop").unbind("click").bind("click",this.applyCrop),this.$el.find(".reset-crop").unbind("click").bind("click",this.resetCrop),this.$el.find(".add-text").unbind("click").bind("click",this.addEnteredText),this.videoPlayerView.$el.find(".se-text-editable").unbind("keypress").bind("keypress",this.textEditableChanged),this.videoPlayerView.$el.find(".se-clip-time").unbind("click").bind("click",{that:this},this.showClipTimePop),this.videoPlayerView.$el.find(".timer-input-btn").unbind("click").bind("click",{that:this},this.clipInputButtonClicked),this.videoPlayerView.$el.find(".timer-start-input, .timer-stop-input").unbind("keyup").bind("keyup",{that:this},this.clipInputtyped),this.$el.find(".se-sticker-btn").unbind("click").bind("click",{that:this},this.stickerBtnClicked),this.$el.find(".delete-sticker").unbind("click").bind("click",this.deleteSticker),this.$el.find(".sticker-control").unbind("change").bind("change",{that:this},this.stickerPropertyChanged),this.$el.find(".se-callout-btn").unbind("click").bind("click",{that:this},this.calloutBtnClicked),this.$el.find(".delete-callout").unbind("click").bind("click",this.deleteCallout),this.$el.find(".callout-control").unbind("change").bind("change",{that:this},this.calloutPropertyChanged),this.$el.find(".lock-aspect-ratio").unbind("click").bind("click",{that:this},this.lockAspectRatio),this.$el.find(".sticker-family-container").unbind("click").bind("click",{that:this},this.showStickerFamily),this.$el.find(".callout-scroll-right, .callout-scroll-left").unbind("click").bind("click",{that:this},this.scrollCallouts),this.$el.find(".addtext-input-text").unbind("keyup").bind("keyup",{that:this},this.addTextChanged),this.$el.find(".trim-input-btn").unbind("click").bind("click",{that:this},this.trimInputButtonClicked),this.$el.find(".trim-before-input, .trim-after-input").unbind("keyup").bind("keyup",{that:this},this.trimInputTyped),this.$el.find(".trim-before-time").unbind("click").bind("click",{that:this},this.showTrimBeforePop),this.$el.find(".trim-after-time").unbind("click").bind("click",{that:this},this.showTrimAfterPop),this.$el.find("#blurBtn").unbind("click").bind("click",this.selectAddBlur),this.$el.find("#resizeDragBtn").unbind("click").bind("click",this.makeVideoResizeableDraggable),this.$el.find(".delete-blur").unbind("click").bind("click",this.deleteBlur),this.$el.find("#applyBlur").unbind("click").bind("click",{that:this},this.addNewBlur),this.$el.find(".blur-control").unbind("click").bind("click",this.blurPropertyChanged),this.$el.find("#imageOpacitySlider").unbind("change").bind("change",this.changeImageOpacity),this.$el.find("#imageOpacityInput").unbind("change keyup").bind("change keyup",this.changeImageOpacity),this.$el.find("#imageArLock").unbind("change").bind("change",this.hanldeImageAspectRatioChange),this.$el.find("#deleteImage").unbind("click").bind("click",this.deleteImage),this.$el.find("#addImageBtn").unbind("click").bind("click",this.addImage),this.$el.find("#addPersonalizedImageBtn").unbind("click").bind("click",this.addPersonalizedImage),this.$el.find("#addWebsiteImageBtn").unbind("click").bind("click",this.addWebsiteImageBtn),this.$el.find("#imageOpacitySlider").val(100),!(this.isGuestRecording||this.isTicketVideoPreview||this.isAssignmentVideoPreview||this.isTestimonialVideoPreview||"true"!=e("#isAddImageInVideoEnabled").val())||this.$el.find("#addImageMenuBtn").remove(),this.isTicketVideoPreview&&this.$el.find(".merge-field-container").remove(),document.fonts&&(document.fonts.onloadingdone=this.fontLoaded),this.videoPlayerView.setUpdateHandler(this.playerTimeUpdate),this.videoPlayerView.setPlayPauseHandler(this.handleVideoPlay,!0),this.videoPlayerView.setPlayPauseHandler(this.handleVideoPause,!1),this.videoPlayerView.setSeekedHandler(this.handleVideoSeeked),this.videoPlayerView.setPlayerResizeHandler(this.playerResized),this.userEmail=e("#userEmail").val(),e(document).bind("keydown",{that:this},this.globalKeypress),this.applyCustomColors(),this.addCustomFontStyles(),HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg&&HippoVideo.AppRegistry.isPersonalizationEnabled&&e("#addTextBtn").hide()},initSettingModel:function(){var e=this;this.settingModel=new c({settingTabName:l.wizSetting.BRANDING});var t={};try{if(HippoVideo&&HippoVideo.data&&HippoVideo.data.api&&HippoVideo.data.api.getProperty&&""!=HippoVideo.data.api.getProperty("userEmail"))t={authentication_token:HippoVideo.data.api.getProperty("authToken"),email:encodeURIComponent(HippoVideo.data.api.getProperty("userEmail"))},this.settingModel.fetch({data:t,success:function(t){e.brand_colors=t.get("info").brand_colors,t.get("info").brand_font&&(e.defaultFontValue=t.get("info").brand_font.toLowerCase().replace(/\s/g,""),e.$el.find(".se-font-selector").val(e.defaultFontValue)),t.get("info").brand_font_color&&(e.brand_font_color=t.get("info").brand_font_color),e.setupSpectrum()}});else if(this.digest||this.recorderApiModel){var i=e.getPageSource();this.recorderApiModel?this.recorderApiModel.getBrandingInfo().then((function(t){e.getBrandingInfoSuccess(t,e)})).catch((function(e){console.error(e)})):this.settingModel.getDigestInfo(this.digest,i,(function(t){e.getBrandingInfoSuccess(t,e)}))}}catch(e){console.error(e)}},getBrandingInfoSuccess:function(e,t){t.brand_colors=e.brand_colors,e.brand_font&&(t.defaultFontValue=e.brand_font.toLowerCase().replace(/\s/g,""),t.$el.find(".se-font-selector").val(t.defaultFontValue)),e.brand_font_color&&(t.brand_font_color=e.brand_font_color),t.setupSpectrum()},getPageSource:function(){return"true"==e("#isTestimonial").val()?"testimonial":e("#isGuestRecording").val()?"guest":"lessonly"==n.getQueryParams().type?"lessonly":"generic_embed"==n.getQueryParams().type?"generic_embed":this.integrationType?this.integrationType:""},resizeHandler:function(){this.mediaContainerResized(this.primaryVideoContainer),this.mediaContainerResized(this.secondaryVideoContainer)},initializeUI:function(){var t=this;this.defaultFontValue="timesnewroman",this.$el.find(".trim-slider").slider({range:!0,min:0,max:1e3,step:1,values:[0,1e3],start:function(){t.unselectAllComponents()},slide:function(e,i){t.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(i.values[0]),t.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(1e3-i.values[1]),t.trimChanged(),t.trimSliding(i)},stop:function(e){t.$el.find(".trim-before-container, .trim-after-container").removeClass("trim-hovered"),t.trimChanged()}}),this.cropResizable.resizable({containment:t.videoPlayerView.$el.find(".se-crop-scale"),handles:"n, e, w, s, ne, nw, se, sw",resize:function(e,i){t.cropResized(!0)},stop:function(){t.cropStopped()}}),this.makeVideoContainerResizable(this.primaryVideoContainer,this.$el.find(".primaryvid-control-detail .lock-aspect-ratio").is(":checked")),this.primaryVideoContainer.draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:this.userEventStart,stop:function(){t.unselectAllComponents(),t.userEventStop()}}),this.makeVideoContainerResizable(this.secondaryVideoContainer,this.$el.find(".secondaryvid-control-detail .lock-aspect-ratio").is(":checked")),this.secondaryVideoContainer.draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .primary-video-container, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:this.userEventStart,stop:function(){t.unselectAllComponents(),t.userEventStop()}}),e(".primary-video-container, .secondary-video-container").hover((function(){e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover")}),(function(){e(this).removeClass("se-components-hover")}));var i=n.getFontMap(),r=[];for(var o in i)r.push(o);r=r.sort();for(var a=0;a<r.length;a++){o=r[a];this.$el.find(".se-font-selector").append(e("<option>",{value:o,text:i[o].family,style:"font-family: "+i[o].family+";"})),this.defaultFontValue=i[o].isDefault?o:this.defaultFontValue}this.$el.find(".se-font-selector").val(this.defaultFontValue),this.$el.find(".sticker-btn-container").empty();for(var s in this.stickers){var l=this.stickers[s];this.$el.find(".sticker-btn-container").append(p({i:s,mainImg:"https://s3.amazonaws.com/hippolms-wiz-static/stickers-preview/s"+l.mainId+".png?v=2"})),this.downloadAndSetStickers(this,s,l.startId,l.endId)}for(var u in this.$el.find(".callout-btn-container").empty(),this.calloutsDisplayorder){s=this.calloutsDisplayorder[u];var c=document.createElement("img");e(c).addClass("se-callout-btn"),c.id="se-callout-btn-"+s,c.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+s+".png?v=2",c.crossOrigin="Anonymous",this.$el.find(".callout-btn-container").append(c),this.findCalloutSize(s)}this.$el.find(".se-callout-btn").draggable({scroll:!1,helper:"clone",revert:"invalid",revertDuration:100,start:this.newComponentDragged,stop:this.newComponentDropped}),this.$el.find(".se-sticker-btn").draggable({scroll:!1,appendTo:"body",stack:".se-sticker-btn",helper:"clone",revert:"invalid",revertDuration:100,start:this.newComponentDragged,stop:this.newComponentDropped}),this.videoPlayerView.$el.find(".se-crop-resizable").droppable({accept:".se-sticker-btn, .se-callout-btn",drop:function(e,i){t.componentDropped(i.draggable[0].id,e.pageX-t.videoPlayerView.$el.find(".se-crop-scale").offset().left-40,e.pageY-t.videoPlayerView.$el.find(".se-crop-scale").offset().top-40)}}),this.videoPlayerView.$el.find(".se-clip-time").resizable({containment:e(".components-time-container"),handles:"e, w",resize:function(e,t){},stop:function(){t.onClipTimeChangeHandler(),t.updateTimeFromClipToPopup(t)}});var d=this.$el.find(".addtext-control-detail .color-picker .sp-replacer"),h=document.createElement("div");e(h).addClass("text-color-picker"),e(h).text("A"),e(d).prepend(h),this.$el.find(".se-font-selector").select2({minimumResultsForSearch:-1,theme:"hippocategory",width:"element",dropdownCssClass:"et-dropdown-css",templateResult:function(t,i){return t.element&&e(i)[0].style.setProperty("font-family",e(t.element).css("font-family"),"important"),t.text}}),this.$el.find(".se-fontsize-selector").select2({minimumResultsForSearch:-1,theme:"hippocategory"}),this.isPersonalizationEnabled&&(this.$el.find("#seMfSelector").select2({tags:!0,multiple:!1,theme:"hippocategory",templateResult:function(t,i){return t.element&&e(i).addClass("selection-in-blue"),t.text}}),this.mfValues=["{Email}","{First Name}","{Last Name}","{Country}","{City}","{Phone Number}","{Company Name}","{Title}","{State}","{Address}"],this.$el.find("#seMfSelector").on("change",{that:this},this.handleMfChange)),this.$el.find(".se-textalign-selector").select2({minimumResultsForSearch:-1,dropdownAutoWidth:!0,theme:"hippocategory",templateSelection:function(e){return'<img width="10" src="/svg/text-'+e.id+'-align.svg"/>'},templateResult:function(e){return e.id||(e.id="center"),'<img width="10" style="margin-right:5px" src="/svg/text-'+e.id+'-align.svg"/>'+e.text},escapeMarkup:function(e){return e}}).next(".select2-container").addClass("textalign-select2"),this.$el.find(".select2-selection__rendered").removeAttr("title"),this.disable(),this.cropResized(!1),this.enableBlurForPlayer()},setupSpectrum:function(){e(".sp-container").remove();var t=this,i={showInput:!0,preferredFormat:"rgb",clickoutFiresChange:!0,chooseText:"set",color:t.brand_font_color,show:function(){t.showingColorPicker=!0,e(".seColorContainer").length>0&&e(".seColorContainer")[0].scrollIntoView({block:"end",behavior:"smooth"})},hide:function(){t.showingColorPicker=!1},move:function(){t._previewColorChange()},change:function(){t._handleColorChange(),t.showingColorPicker=!1},containerClassName:"seColorContainer"};if(this.brand_colors&&this.brand_colors.length>0){var n=s.getPaletteConfig(this.brand_colors,"seColorContainer",this.colorPaletteEnabled);i=Object.assign(i,n)}this.$el.find(".se-color-selector").spectrum(i)},_previewColorChange:function(){if(this.currentSelectedText){var t=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString();e("#se-component-"+this.currentSelectedText+" .text-el-line").css("color",t)}},_handleColorChange:function(){this.setTextColorInClip()},setTextColorInClip:function(){if(this.currentSelectedText){var e=this.getClipOf(this.currentSelectedText);e&&(e.properties.color=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString(),this.updateProjectJson(),this.reconstructUI())}},downloadAndSetStickers:function(t,i,n,r){if(!(n>=r)){var o=document.createElement("img");e(o).addClass("se-sticker-btn"),o.id="se-sticker-btn-"+n,o.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/transparent.png?v=2";var a=(n-2)%50*-20,s=-20*Math.floor((n-2)/50);o.style.background="url('https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/stickers_all.png?v=2') "+a+"px "+s+"px",t.$el.find(".sticker-family-container-"+i+" .sticker-family-all").append(o),t.findStickerSize(n),e(o).unbind("click").bind("click",{that:t},t.stickerBtnClicked),setTimeout((function(){t.downloadAndSetStickers(t,i,n+1,r)}),10)}},enable:function(){this.enabled=!0;try{HippoVideo.data.api.getProperty("isTrimEnabled")&&this.$el.find(".simple-edit-buttons-box").hide()}catch(e){}this.primaryVideoContainer.css("z-index","100"),this.secondaryVideoContainer.css("z-index","101"),this.videoPlayerView.setSimpleEditMode(!0),this.unselectAllControls(),this.videoPlayerView.$el.find(".se-crop-highlighter").css({background:"rgba(72, 72, 72, 0.97)","z-index":"108"}),this.videoPlayerView.$el.css("overflow","visible"),this.videoPlayerView.$el.find(".se-crop-scale").css({top:"0px",left:"0px"}),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),1,1,0,0),e("#previewPageLeft").addClass("simple-edit-top-pad"),e(".body-wiz").addClass("tmp-body-wiz").removeClass("body-wiz"),e(".tmp-body-wiz").css("margin-top","105px"),e(".tmp-body-wiz").animate({marginTop:"0px"},200),this.videoPlayerView.$el.find(".thumbnail-container").hide(),this.videoPlayerView.$el.find(".play-btn-container").fadeOut(100),this.videoPlayerView.$el.find(".player-touch-guard").hide(),this.snapshot={},this.snapshot.projectJson=n.naiveClone(this.projectJson),this.snapshot.trimSliderStart=this.sessionDetails.trimSliderStart,this.snapshot.trimSliderEnd=this.sessionDetails.trimSliderEnd,this.snapshot.addedClips=n.naiveClone(this.sessionDetails.addedClips),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.snapshot.crop={x:this.cropResizable.position().left,y:this.cropResizable.position().top,w:this.cropResizable.width(),h:this.cropResizable.height()},this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.onBoardRequired?(this.onBoardRequired=!1,this.onBoardUser()):(this.$el.find(".default-control-detail").show(),this.infoText.html(" ")),this.reconstructUI(),this.videoPlayerView.resizePlayerForWindow(),this.$el.find("#trimBtn").length>0?this.selectTrim():this.$el.find(".simple-edit-buttons-box .wiz-simple-edit-btn").first().click(),!1===this.overrideWarnOnExit&&(window.onbeforeunload=function(){return"Please save before you close!!"}),this.prefetchAssetsForSimpleEdit()},save:function(){this.disable(),this.disabled(),this.projectJson.simpleEdit=!0,this.projectJson.seSessionDetails=this.sessionDetails,this.renderVideo()},renderVideo:function(){var e=this;this.recorder?this.recorder.renderVideo({assetId:this.assetId,projectJson:this.getIOAdjustedProjectJSON(),renderFrom:"simple_edit"}).then((function(){n.trackInDB("SE-Save",e.userEmail),e.isPPR&&e._getVideoModel().urgent_videos([e.assetId],(function(){o.trigger("remountCtaActions")}))})).catch((function(e){console.error(err)})):this._getVideoModel().mergeAndRender(this.assetId,this.getIOAdjustedProjectJSON(),"simple_edit",this.digest,(function(t){n.trackInDB("SE-Save",e.userEmail),e.isPPR&&e._getVideoModel().urgent_videos([e.assetId],(function(){o.trigger("remountCtaActions")}))}),(function(e){console.log("error ",e)}))},cancel:function(){this.cancelCrop(),this.disable(),this.projectJson=this.snapshot.projectJson,this.sessionDetails.trimSliderStart=this.snapshot.trimSliderStart,this.sessionDetails.trimSliderEnd=this.snapshot.trimSliderEnd,this.sessionDetails.addedClips=this.snapshot.addedClips;var e=this;this.reconstructUI(!0,(function(){e.disabled()}))},disable:function(){this.enabled=!1,this.unselectAllComponents(),this.unselectAllControls(),this.primaryVideoContainer.css("z-index","0"),this.primaryVideoContainer.resizable({disabled:!0}),this.primaryVideoContainer.draggable({disabled:!0}),this.secondaryVideoContainer.css("z-index","0"),this.secondaryVideoContainer.resizable({disabled:!0}),this.secondaryVideoContainer.draggable({disabled:!0}),this.videoPlayerView.setSimpleEditMode(!1),this.videoPlayerView.$el.find(".player-border").fadeOut(),this.videoPlayerView.$el.find(".player-touch-guard").show(),e(".tmp-body-wiz").animate({marginTop:"0px"},200,(function(){e(".tmp-body-wiz").addClass("body-wiz").removeClass("tmp-body-wiz")})),this.askReloadConfirmation=!1,!1===this.overrideWarnOnExit&&(window.onbeforeunload=void 0)},disabled:function(){this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.reconstructUI(),this.cropResized(!1,!1),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-text-component, .se-image-component").draggable({disabled:!0}),this.videoPlayerView.$el.find(".se-text-component").unbind("click"),this.videoPlayerView.$el.find(".se-text-component").css({"user-select":"none",cursor:"default"}),this.videoPlayerView.$el.find(".se-crop-highlighter").css({background:"black","z-index":"200"}),this.videoPlayerView.$el.css("overflow","hidden");var e=this.cropResizable.height(),t=this.cropResizable.width(),i=this.videoPlayerView.$el.width(),n=this.videoPlayerView.$el.height(),r=i/t,o=n/e;if(r*e>n){var a=this.cropResizable.position().top,s=i/2-t*o/2-this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("top",-a+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),o,o,this.cropResizable.position().left,a),this.videoPlayerView.$el.find(".se-crop-scale").css("left",s+"px")}else{a=n/2-e*r/2-this.cropResizable.position().top,s=this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("left",-s+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),r,r,s,this.cropResizable.position().top),this.videoPlayerView.$el.find(".se-crop-scale").css("top",a+"px")}this.cropResizable.removeClass("disp-show").addClass("disp-none")},setProjectJson:function(e){if(this.projectJson=e,window.projectJson=this.projectJson,this.projectJson.simpleEdit=!0,null!=this.projectJson.seSessionDetails)this.sessionDetails=this.projectJson.seSessionDetails;else{this.sessionDetails.totalCreatedClips=this.projectJson.clips.length;for(var t=!1,i=0;i<this.projectJson.clips.length;i++){"webcam"==(s=this.projectJson.clips[i]).footage.type&&!0,"screenrecord"==s.footage.type&&(t=!0)}var n=-1,r=[],o=JSON.parse(JSON.stringify(this.projectJson.clips||[]));for(i=0;i<this.projectJson.clips.length;i++){(s=o[i]).properties.xposRaw=this.getValueForPlayer(s.properties.xpos,!0),s.properties.yposRaw=this.getValueForPlayer(s.properties.ypos,!1),s.properties.widthRaw=this.getValueForPlayer(s.properties.width,!0),s.properties.heightRaw=this.getValueForPlayer(s.properties.height,!1),"screenrecord"!=s.footage.type&&"webcam"!=s.footage.type||(n=-1==n?s.footage.duration:Math.min(n,s.footage.duration),r.push(s.footage)),s.footage.containsVideo&&("screenrecord"==s.footage.type||"webcam"==s.footage.type&&!t?(this.sessionDetails.primaryVideo=s.id,this.sessionDetails.totalAddedEffects=(s.effects||[]).length):"webcam"==s.footage.type&&(this.sessionDetails.secondaryVideo=s.id))}for(var i in r)r[i].duration=n}for(i=0;i<this.projectJson.clips.length;i++){var s=this.projectJson.clips[i];this.isImageComponent(s.id)&&("image"==s.footage.type?s.footage.src=this.footageUrls[Number(s.footage.id)]:s.footage.src=a.getMfImage(s.footage.image_id?s.footage.image_id:s.footage.id,s.footage.is_website?"website":"image"))}this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),null==this.sessionDetails.secondaryVideo&&this.secondaryVideoContainer.hide(),this.reconstructUI(),this.cropResized(!1,!1),this.enabled||this.disabled()},mediaContainerResized:function(e){var t=e.find("video");0==t.length&&(t=e.find("img"));var i=e.width()/t.width(),n=e.height()/t.height();t.css("height",""),this.scaleElement(t,i,n)},scaleElement:function(e,t,i,n,r){e.css({"-ms-transform":"scale("+t+","+i+")","-webkit-transform":"scale("+t+","+i+")",transform:"scale("+t+","+i+")","-ms-transform-origin:":null==n?"top left":n+"px "+r+"px","-webkit-transform-origin":null==n?"top left":n+"px "+r+"px","transform-origin":null==n?"top left":n+"px "+r+"px"})},globalClick:function(t){HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg&&("saveTextEdit"!==t.target.id&&"cancelTextEdit"!==t.target.id||e("#"+t.target.id).is(":visible")&&e("#"+t.target.id).click());var i=t.data.that;i.enabled&&(i.currentSelectedText,0!=i.videoPlayerView.$el.find(".se-text-editable").has(e(t.target)).length||0!=i.videoPlayerView.$el.find(".se-text-component").has(e(t.target)).length||e(t.target).hasClass("se-text-component")||e(t.target).hasClass("se-text-editable")||null==i.currentSelectedText||e(t.target).parent().hasClass("atwho-view-ul")||(i.textEditableChanged(),i.videoPlayerView.$el.find(".se-text-editable").is(":visible")?i.closeTextEditable():0==i.$el.find(".addtext-control-detail").has(e(t.target)).length&&0==i.videoPlayerView.$el.find(".player-controls-container").has(e(t.target)).length&&0==e(".sp-picker-container").has(e(t.target)).length&&0==e(".sp-palette-container").has(e(t.target)).length&&i.unselectText()),0!=i.$el.has(e(t.target)).length||0!=i.videoPlayerView.$el.has(e(t.target)).length||i.showingColorPicker||e(t.target).parent().hasClass("atwho-view-ul")||i.unselectAllComponents(),0==i.$el.find(".sticker-family-container").has(e(t.target)).length&&i.$el.find(".sticker-family-all").hide(),!e(t.target).hasClass("trim-before-pop")&&0==i.$el.find(".trim-before-pop").has(e(t.target)).length&&i.$el.find(".trim-before-pop").is(":visible")&&i.$el.find(".trim-before-pop").fadeOut(100),!e(t.target).hasClass("trim-after-pop")&&0==i.$el.find(".trim-after-pop").has(e(t.target)).length&&i.$el.find(".trim-after-pop").is(":visible")&&i.$el.find(".trim-after-pop").fadeOut(100))},selectPrimaryVideo:function(){this.enabled&&(this.primaryVideoOverflowContainer.css("overflow","visible"),this.primaryVideoContainer.addClass("edit-video-selected").css("z-index","105").resizable("enable"),this.secondaryVideoContainer.removeClass("edit-video-selected").css("z-index","106").resizable("disable"),this.$el.find(".primaryvid-control-detail").show(),this.$el.find(".secondaryvid-control-detail").hide())},selectSecondaryVideo:function(){this.enabled&&(this.secondaryVideoOverflowContainer.css("overflow","visible"),this.secondaryVideoContainer.addClass("edit-video-selected").css("z-index","105").resizable("enable"),this.primaryVideoContainer.removeClass("edit-video-selected").css("z-index","105").resizable("disable"),this.$el.find(".primaryvid-control-detail").hide(),this.$el.find(".secondaryvid-control-detail").show())},makeVideoResizeableDraggable:function(){this.enabled&&(this.isPPR?n.trackInThirdPartyTools("video_preview_Resize_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Resize_save",{email:this.userEmail}),this.unselectAllControls(),this.userEventStart(),this.unselectAllComponents(),this.selectPrimaryVideo(),this.selectControl("resize-draggable-btn"),this.primaryVideoContainer.unbind("mousedown",this.selectPrimaryVideo).bind("mousedown",this.selectPrimaryVideo).draggable("enable"),this.secondaryVideoContainer.unbind("mousedown",this.selectSecondaryVideo).bind("mousedown",this.selectSecondaryVideo).draggable("enable"),this.$el.find(".se-resize-control-detail").show())},unselectClips:function(){this.primaryVideoContainer.unbind("mousedown",this.selectPrimaryVideo).resizable({disabled:!0}).draggable({disabled:!0}),this.secondaryVideoContainer.unbind("mousedown",this.selectSecondaryVideo).resizable({disabled:!0}).draggable({disabled:!0}),this.$el.find(".se-resize-control-detail, .primaryvid-control-detail, .secondaryvid-control-detail").hide(),this.primaryVideoOverflowContainer.css("overflow","hidden"),this.secondaryVideoOverflowContainer.css("overflow","hidden"),this.primaryVideoContainer.css("z-index","100"),this.secondaryVideoContainer.css("z-index","101"),e(".edit-video-selected").removeClass("edit-video-selected")},userEventStart:function(){this.videoPlayerView.$el.find(".player-border").fadeIn()},userEventStop:function(){this.videoPlayerView.$el.find(".player-border").fadeOut(),this.updateProjectJson()},playerResized:function(e){if(null!=this.projectJson&&(this.enabled||(this.videoPlayerView.$el.find(".se-crop-scale").css({top:"0px",left:"0px"}),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),1,1,0,0)),this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.reconstructUI(),this.cropResized(!1,!1),!this.enabled)){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-none").addClass("disp-show");var t=this.cropResizable.height(),i=this.cropResizable.width(),n=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=n/i,a=r/t;if(o*t>r){var s=this.cropResizable.position().top,l=n/2-i*a/2-this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("top",-s+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),a,a,this.cropResizable.position().left,s),this.videoPlayerView.$el.find(".se-crop-scale").css("left",l+"px")}else{s=r/2-t*o/2-this.cropResizable.position().top,l=this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("left",-l+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),o,o,l,this.cropResizable.position().top),this.videoPlayerView.$el.find(".se-crop-scale").css("top",s+"px")}this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-show").addClass("disp-none"),this.videoPlayerView.resizeFitThumnbail()}},updateProjectJson:function(){if(this.enabled){var t=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),i=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);if(n.isNumber(t)&&n.isNumber(i))for(var r=0;r<this.projectJson.clips.length;r++){var o=this.projectJson.clips[r];if(this.updateClipPropertiesForProjectJSON(o,t,i),o.id===this.sessionDetails.primaryVideo)for(var a=o.effects||[],s=0;s<a.length;s++)this.updateClipPropertiesForProjectJSON(a[s],t,i)}var l=this.cropResizable.is(":visible");this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.projectJson.crop={x:this.getValueForProject(this.cropResizable.position().left,!0),y:this.getValueForProject(this.cropResizable.position().top,!1),w:Math.min(this.getValueForProject(this.cropResizable.width(),!0),this.projectJson.canvasWidth),h:Math.min(this.getValueForProject(this.cropResizable.height(),!1),this.projectJson.canvasHeight)},l||this.cropResizable.removeClass("disp-show").addClass("disp-none");for(r=0;r<this.projectJson.clips.length;r++){a=(o=this.projectJson.clips[r]).effects||[];null!=this.sessionDetails.primaryVideo&&o.id==this.sessionDetails.primaryVideo&&(o.properties.widthRaw=this.primaryVideoContainer.width(),o.properties.heightRaw=this.primaryVideoContainer.height(),o.properties.xposRaw=this.primaryVideoContainer.position().left,o.properties.yposRaw=this.primaryVideoContainer.position().top,o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1)),null!=this.sessionDetails.secondaryVideo&&o.id==this.sessionDetails.secondaryVideo&&(o.properties.widthRaw=this.secondaryVideoContainer.width(),o.properties.heightRaw=this.secondaryVideoContainer.height(),o.properties.xposRaw=this.secondaryVideoContainer.position().left,o.properties.yposRaw=this.secondaryVideoContainer.position().top,o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1)),-1!==this.sessionDetails.addedClips.indexOf(o.id)&&o.footage.containsImage&&(e("#se-component-"+o.id).length>0?(o.properties.xposRaw=e("#se-component-"+o.id).position().left,o.properties.yposRaw=e("#se-component-"+o.id).position().top,o.properties.widthRaw=e("#se-component-"+o.id).width(),o.properties.heightRaw=e("#se-component-"+o.id).height(),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1),o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1)):console.warn("not drawn#se-component-"+o.id)),o.footage.containsText&&(null==o.properties.fontSizeProject&&(o.properties.fontSizeProject=this.getValueForProject(o.properties.fontSize,!0)),o.properties.boundingBoxRaw&&(o.properties.boundingBox=this.getBoundingBoxForProject(o.properties.boundingBoxRaw)))}}},updateClipPropertiesForProjectJSON:function(e,t,i){null!=e.startFrom&&null!=e.endAt?(e.position=e.startFrom-t,0==e.position&&(e.position=.001),e.position>this.videoPlayerView.mediaPlayer.duration-i?e.deleted=!0:e.deleted=!1,e.end=e.endAt-e.startFrom,e.endAt>this.videoPlayerView.mediaPlayer.duration-i&&(e.end=this.videoPlayerView.mediaPlayer.duration-i-e.startFrom),e.end=Math.max(.02,e.end),e.start=0):(e.start=t,e.end=(e.footage?e.footage.duration:e.duration)-i,e.end<e.start&&(e.end=e.start))},reconstructUI:function(t,i){if(this.projectJson){var r=this.videoPlayerView.$el.width()/this.projectJson.canvasWidth,o=this.videoPlayerView.$el.height()/this.projectJson.canvasHeight,a=this,s=!1,l=this.videoPlayerView.$el.find(".se-components-container");l.empty();var u=function(){a.resizeHandler(),i&&!s&&(s=!0,i())};void 0===this.sessionDetails.primaryVideo&&void 0===this.sessionDetails.secondaryVideo&&this.updateProjectJson();var c=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),d=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);n.isNumber(c)&&n.isNumber(d)&&this.videoPlayerView.trim(c,d,!0);for(var h=JSON.parse(JSON.stringify(this.projectJson.clips||[])),p=0;p<this.projectJson.clips.length;p++){var f=h[p];if(null!=this.sessionDetails.primaryVideo&&f.id==this.sessionDetails.primaryVideo&&this.primaryVideoContainer.animate({width:f.properties.width*r+"px",height:f.properties.height*o+"px",left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"},t?200:10,u),null!=this.sessionDetails.secondaryVideo&&f.id==this.sessionDetails.secondaryVideo&&this.secondaryVideoContainer.animate({width:f.properties.width*r+"px",height:f.properties.height*o+"px",left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"},t?200:10,u),-1!=this.sessionDetails.addedClips.indexOf(f.id)){a=this;if(f.footage.containsText){(m=document.createElement("div")).id="se-component-"+f.id,e(m).addClass("se-text-component"),f.properties.boundingBox?(f.properties.boundingBoxRaw={x:f.properties.boundingBox.x*r,y:f.properties.boundingBox.y*o,w:f.properties.boundingBox.w*r,h:f.properties.boundingBox.h*o},e(m).css({left:f.properties.boundingBoxRaw.x+"px",top:f.properties.boundingBoxRaw.y+"px",width:f.properties.boundingBoxRaw.w+"px",height:f.properties.boundingBoxRaw.h+"px"})):e(m).css({left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"}),this.setTextDraggableContainerSize(m,f,!1);var g=document.createElement("div");e(g).addClass("se-text-container"),this.checkAndPopulateMf(f.properties.text),this.newlineTextToHtml(g,f),e(m).append(g),e(m).append('<span class="se-text-delete">x</span>'),e(m).find(".se-text-delete").bind("click",this.deleteText),e(m).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:function(e){a.selectText(e.target.id.split("se-component-")[1]),a.userEventStart()},stop:function(){a.textBoxResized(),a.textPropertyChanged(),a.userEventStop()}}),f.footage.calloutId&&e(m).draggable("option","containment","#se-component-"+f.footage.calloutId),e(m).click((function(e){if(!((new Date).getTime()-a.lastTextResizeTime<100)){var t=a.currentSelectedText==e.currentTarget.id.split("se-component-")[1];a.selectText(e.currentTarget.id.split("se-component-")[1]),t&&a.showTextEditable(e.currentTarget.id.split("se-component-")[1])}})),e(m).hover((function(t){a.currentSelectedText!=t.currentTarget.id.split("se-component-")[1]&&(e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover"))}),(function(t){a.currentSelectedText!=t.currentTarget.id.split("se-component-")[1]&&e(this).removeClass("se-components-hover")})),l.append(m),f.id==this.currentSelectedText&&this.selectText(f.id,!0),this.setLineHeight(f)}else if(f.footage.containsImage){var m=document.createElement("div"),v=document.createElement("img");v.crossOrigin="Anonymous",m.id="se-component-"+f.id,e(m).addClass("se-image-component"),f.footage.id<=-1e4?v.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+(-f.footage.id-1e4)+".png?v=2":this.isImageComponent(f.id)?v.src=f.footage.src:v.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers/s"+(-f.footage.id-100)+".png?v=2",e(m).css({left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px",width:f.properties.width*r+"px",height:f.properties.height*o+"px",opacity:f.properties.opacity}),e(m).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,drag:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)&&a.calloutDragged()},start:function(t){var i=t.target.id.split("se-component-")[1];if(null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)){a.selectCallout(i);var r=a.getClipOf(i),o=a.getClipOf(r.footage.textId);o&&o.properties.boundingBoxRaw&&(a.calloutTextBoxSpread={x:n.map(o.properties.boundingBoxRaw.x,r.properties.xposRaw,r.properties.xposRaw+r.properties.widthRaw,0,1),y:n.map(o.properties.boundingBoxRaw.y,r.properties.yposRaw,r.properties.yposRaw+r.properties.heightRaw,0,1),w:o.properties.boundingBoxRaw.w/r.properties.widthRaw})}else a.selectSticker(i);a.userEventStart()},stop:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?(a.calloutDragged(),a.calloutPropertyChanged()):a.stickerPropertyChanged(),a.userEventStop(),a.isCalloutImage(i)?a.unselectCallout():a.unselectSticker()}}),e(m).resizable({handles:"n, e, w, s, ne, nw, se, sw",aspectRatio:f.properties.lockAspectRatio,resize:function(t,i){a.mediaContainerResized(e(t.target));var n=t.target.id.split("se-component-")[1];null==n&&(n=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(n)&&a.calloutResized(n)},start:function(t){var i=t.target.id.split("se-component-")[1];if(null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)){a.selectCallout(i);var r=a.getClipOf(i),o=a.getClipOf(r.footage.textId);o&&o.properties.boundingBoxRaw&&(a.calloutTextBoxSpread={x:n.map(o.properties.boundingBoxRaw.x,r.properties.xposRaw,r.properties.xposRaw+r.properties.widthRaw,0,1),y:n.map(o.properties.boundingBoxRaw.y,r.properties.yposRaw,r.properties.yposRaw+r.properties.heightRaw,0,1),w:o.properties.boundingBoxRaw.w/r.properties.widthRaw})}else a.selectSticker(i);a.userEventStart()},stop:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?(a.calloutResized(i),a.calloutPropertyChanged()):a.stickerPropertyChanged(),a.userEventStop(),a.setAdaptiveBorderForTarget(e(t.target))}}),this.currentSelectedSticker!=f.id&&this.currentSelectedCallout!=f.id&&e(m).resizable({disabled:!0}),e(m).find(".ui-resizable-handle").css("display",""),e(m).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se"),e(m).click((function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?a.selectCallout(i):a.selectSticker(i)})),e(m).hover((function(){e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover")}),(function(){e(this).removeClass("se-components-hover")})),e(m).append(v),l.append(m),this.currentSelectedSticker!=f.id&&this.currentSelectedCallout!=f.id||this.setAdaptiveBorderForTarget(e("#se-component-"+f.id)),a.mediaContainerResized(e(m))}}}this.initializeAtwho(),this.applyEffects(),this.resizeHandler(),this.playerTimeUpdate()}},checkAndPopulateMf:function(t){if(this.isPersonalizationEnabled)for(var i,n=0,r=t.indexOf("${",0);-1!=r&&-1!=n;){-1!=(n=t.indexOf("}",r))&&(i=t.substring(r+2,n),this.mfValues.includes("{"+i+"}")||(this.mfValues.push("{"+i+"}"),this.$el.find("#seMfSelector").append(e("<option>"+i+"</option>"))),r=t.indexOf("${",n))}},applyEffects:function(){var t,i=this.getClipOf(this.sessionDetails.primaryVideo),n=this;if(i){var r=i.effects||[],o=this.videoPlayerView.$el.find(".se-effects-components-container");o.empty();for(var a=0;a<r.length;a++){(t=r[a]).xposRaw=this.getValueFromClipPercent(t.xpos,i,!0),t.yposRaw=this.getValueFromClipPercent(t.ypos,i,!1),t.widthRaw=this.getValueFromClipPercent(t.width,i,!0),t.heightRaw=this.getValueFromClipPercent(t.height,i,!1);var s=document.createElement("div");s.id="se-effects-"+t.id,s.className="se-effects",s.style.left=t.xposRaw+"px",s.style.top=t.yposRaw+"px",s.style.width=t.widthRaw+"px",s.style.height=t.heightRaw+"px",e(s).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,containment:".primary-video-container",start:function(e){n.selectBlur(e.target.id.split("se-effects-")[1]),n.userEventStart()},stop:function(e){n.blurAreaChanged(),n.userEventStop()}}).resizable({handles:"n, e, w, s, ne, nw, se, sw",aspectRatio:t.lockAspectRatio,containment:".primary-video-container",start:function(t){var i=t.target.id.split("se-effects-")[1];i||(i=e(t.target).parent()[0].id.split("se-effects-")[1]),n.selectBlur(i),n.userEventStart()},stop:function(t){n.blurAreaChanged(),n.userEventStop(),n.setAdaptiveBorderForTarget(e(t.target))}}).mousedown((function(e){n.selectBlur(e.target.id.split("se-effects-")[1]),e.stopPropagation()})),this.currentSelectedBlur!=t.id&&e(s).resizable({disabled:!0}),e(s).find(".ui-resizable-handle").css("display",""),e(s).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se"),o.append(s)}}this.drawBlurLayer()},getValueForPlayer:function(e,t){var i=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=this.projectJson.canvasWidth,a=this.projectJson.canvasHeight;return t?n.roundNumber(e*(i/o),3):n.roundNumber(e*(r/a),3)},getValueForProject:function(e,t){var i=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=this.projectJson.canvasWidth,a=this.projectJson.canvasHeight;return t?n.roundNumber(e*(o/i),3):n.roundNumber(e*(a/r),3)},getBoundingBoxForProject:function(e){var t={x:this.getValueForProject(e.x,!0),y:this.getValueForProject(e.y,!1),w:this.getValueForProject(e.w,!0),h:this.getValueForProject(e.h,!1)};return null!=e.topPadding&&(t.topPadding=this.getValueForProject(e.topPadding,!1)),t},getValueForClip:function(e,t,i){var r=t.properties.widthRaw,o=t.properties.heightRaw;return i?n.roundNumber(n.map(e,0,r,0,1),5):n.roundNumber(n.map(e,0,o,0,1),5)},getValueFromClipPercent:function(e,t,i){var r=t.properties.widthRaw,o=t.properties.heightRaw;return i?n.roundNumber(e*r,5):n.roundNumber(e*o,5)},onBoardUser:function(){var t=this;this.unselectAllControls(),this.$el.find(".default-control-detail").show(),this.infoText.html("Resize and Move videos.."),this.secondaryVideoOverflowContainer.css("overflow","visible"),this.secondaryVideoContainer.find(".ui-resizable-handle").hide(),e.when(this.secondaryVideoContainer.find(".ui-resizable-handle").delay(200).fadeIn(300)).done((function(){e.when(t.secondaryVideoContainer.find(".ui-resizable-handle").fadeOut(300)).done((function(){t.secondaryVideoOverflowContainer.css("overflow","hidden"),t.primaryVideoOverflowContainer.css("overflow","visible"),t.primaryVideoContainer.find(".ui-resizable-handle").hide(),e.when(t.primaryVideoContainer.find(".ui-resizable-handle").delay(500).fadeIn(300)).done((function(){e.when(t.primaryVideoContainer.find(".ui-resizable-handle").fadeOut(300)).done((function(){t.secondaryVideoContainer.find(".ui-resizable-handle").css("display",""),t.primaryVideoContainer.find(".ui-resizable-handle").css("display",""),t.unselectClips(),t.onBoardControls()}))}))}))}))},onBoardControls:function(){var e=this;e.highlightControl(".trim-btn","Trim Video to change start and end points..",(function(){e.highlightControl(".crop-btn","Crop video..",(function(){e.highlightControl(".add-text-btn","Add text to video.",(function(){e.highlightControl(".add-callouts-btn","Add callouts to video",(function(){e.highlightControl(".add-stickers-btn","Add your favourite stickers",(function(){e.infoText.html("Lets go!!"),setTimeout((function(){e.infoText.html(" ")}),1500)}))}))}))}))}))},highlightControl:function(e,t,i){var n=this;n.infoText.delay(300).html(t),n.$el.find(e).animate({opacity:.5},200,(function(){n.$el.find(e).delay(700).animate({opacity:1},200,(function(){i&&i()}))}))},unselectAllControls:function(){this.$el.find(".se-control-detail").hide(),this.unselectCrop(),this.unselectClips(),this.videoPlayerView.$el.find(".components-marker-container").empty()},unselectAllComponents:function(){this.unselectText(),this.unselectSticker(),this.unselectCallout(),this.unselectBlur(),this.primaryVideoOverflowContainer.css("overflow","hidden"),this.secondaryVideoOverflowContainer.css("overflow","hidden")},selectTrim:function(e){null!=e&&(this.askReloadConfirmation=!0),this.isPPR?n.trackInThirdPartyTools("video_preview_Trim_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Trim_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".trim-slider").slider("values",[this.sessionDetails.trimSliderStart,1e3-this.sessionDetails.trimSliderEnd]),this.$el.find(".trim-control-detail").fadeIn(100),this.$el.find(".trim-preview-container, .preview-trim-arrow").hide(),this.updateTrimInput(),this.selectControl("trim-btn"),isFinite(this.videoPlayerView.mediaPlayer.duration)||this.$el.find(".trim-before-container, .trim-after-container").hide()},trimInputButtonClicked:function(t){var i=t.data.that,r=t.target,o=n.map(i.sessionDetails.trimSliderStart,0,1e3,0,i.videoPlayerView.mediaPlayer.duration),a=i.videoPlayerView.mediaPlayer.duration-n.map(i.sessionDetails.trimSliderEnd,0,1e3,0,i.videoPlayerView.mediaPlayer.duration);e.contains(i.$el.find(".trim-before-container")[0],r)?e(r).hasClass("trim-input-btn-minus")?o=Math.max(o-1,0):e(r).hasClass("trim-input-btn-plus")&&(o=Math.min(o+1,i.videoPlayerView.mediaPlayer.duration)):e.contains(i.$el.find(".trim-after-container")[0],r)&&(e(r).hasClass("trim-input-btn-minus")?a=Math.max(a-1,0):e(r).hasClass("trim-input-btn-plus")&&(a=Math.min(a+1,i.videoPlayerView.mediaPlayer.duration))),Math.floor(o)>=Math.floor(a)||(i.$el.find(".trim-before-input").val(n.strToTime(o)),i.$el.find(".trim-after-input").val(n.strToTime(a)),i.trimInputChanged())},trimInputTyped:function(t){var i=t.data.that,r=e(t.target),o=n.map(i.sessionDetails.trimSliderStart,0,1e3,0,i.videoPlayerView.mediaPlayer.duration),a=i.videoPlayerView.mediaPlayer.duration-n.map(i.sessionDetails.trimSliderEnd,0,1e3,0,i.videoPlayerView.mediaPlayer.duration);if(38==t.keyCode||40==t.keyCode){if(t.preventDefault(),38==t.keyCode?r.hasClass("trim-before-input")?o=Math.min(o+1,i.videoPlayerView.mediaPlayer.duration):r.hasClass("trim-after-input")&&(a=Math.min(a+1,i.videoPlayerView.mediaPlayer.duration)):40==t.keyCode&&(r.hasClass("trim-before-input")?o=Math.max(o-1,0):r.hasClass("trim-after-input")&&(a=Math.max(a-1,0))),Math.floor(o)>=Math.floor(a))return;i.$el.find(".trim-before-input").val(n.strToTime(o)),i.$el.find(".trim-after-input").val(n.strToTime(a)),i.trimInputChanged()}else{i=t.data.that;clearTimeout(i.trimInputTypedTimeout),i.trimInputTypedTimeout=setTimeout((function(){i.trimInputChanged()}),500)}},trimInputChanged:function(){var e=n.timeToIntWithMillisecond(this.$el.find(".trim-before-input").val()),t=n.timeToIntWithMillisecond(this.$el.find(".trim-after-input").val()),i=n.map(e,0,this.videoPlayerView.mediaPlayer.duration,0,1e3),r=n.map(t,0,this.videoPlayerView.mediaPlayer.duration,0,1e3);parseInt(i)>=parseInt(r)||(this.$el.find(".trim-slider").slider("values",[i,r]),this.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(i),this.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(1e3-r)),this.trimChanged()},updateTrimInput:function(){var e=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),t=this.videoPlayerView.mediaPlayer.duration-n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);if(!isFinite(e)||!isFinite(t))return this.$el.find(".trim-before-time").html("-"),void this.$el.find(".trim-after-time").html("-");e=parseFloat(e).toFixed(3),t=parseFloat(t).toFixed(3),this.$el.find(".trim-before-time").html(n.strToTime(e)),this.$el.find(".trim-after-time").html(n.strToTime(t)),this.$el.find(".trim-before-input").val(n.strToTime(e)),this.$el.find(".trim-after-input").val(n.strToTime(t)),this.$el.find(".ruler-dynamic").is(":visible")||(this.drawDynamicRuler(),this.$el.find(".ruler-static").hide(),this.$el.find(".ruler-dynamic").show())},drawDynamicRuler:function(){for(var e=this.$el.find(".ruler-dynamic")[0].width,t=this.$el.find(".ruler-dynamic")[0].height,i=e/this.videoPlayerView.mediaPlayer.duration,n=i,r=2;n<15;r++)n=i*r;var o,a=this.$el.find(".ruler-dynamic")[0],s=a.getContext("2d");s.clearRect(0,0,a.width,a.height),s.lineWidth=1;for(r=0;r<e;r+=n){o=r,s.beginPath(),s.moveTo(r,0),s.lineTo(r,t/2);for(var l=0;l<4;l++)o+=n/5,s.moveTo(o,0),s.lineTo(o,t/3);s.stroke(),s.closePath()}},showTrimBeforePop:function(e){e.data.that.$el.find(".trim-before-pop").fadeIn(100)},showTrimAfterPop:function(e){e.data.that.$el.find(".trim-after-pop").fadeIn(100)},trimSliding:function(t){if(this.$el.find(".trim-preview-video")[0].src.length<=0&&(this.$el.find(".trim-preview-video")[0].src=this.videoPlayerView.mediaPlayer.currentSrc),t.handle==this.$el.find(".trim-slider .ui-slider-handle")[0]){this.$el.find(".trim-before-container").addClass("trim-hovered");var i=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);this.$el.find(".trim-preview-video")[0].currentTime=i,this.$el.find(".trim-preview-container").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[0]).position().left-e(".trim-preview-container").width()/2+"px"),this.$el.find(".preview-trim-arrow").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[0]).position().left)}else{this.$el.find(".trim-after-container").addClass("trim-hovered");var r=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);this.$el.find(".trim-preview-video")[0].currentTime=this.videoPlayerView.mediaPlayer.duration-r,this.$el.find(".trim-preview-container").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[1]).position().left-+e(".trim-preview-container").width()/2+"px"),this.$el.find(".preview-trim-arrow").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[1]).position().left)}this.$el.find(".trim-preview-container, .preview-trim-arrow").show(),clearTimeout(this.trimFadeoutTimeout);var o=this;this.trimFadeoutTimeout=setTimeout((function(){o.$el.find(".trim-preview-container, .preview-trim-arrow").fadeOut(200)}),2e3)},trimChanged:function(){this.trimLeadGenerated=!0,this.sessionDetails.trimSliderStart=this.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(),this.sessionDetails.trimSliderEnd=this.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(),this.updateTrimInput(),this.updateProjectJson(),this.reconstructUI()},disableTrim:function(){e(".trim-btn").addClass("disabled")},selectCrop:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Crop_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Crop_save",{email:this.userEmail}),this.unselectAllControls(),this.unselectAllComponents(),this.$el.find(".crop-control-detail").fadeIn(100),this.cropResizable.resizable("enable"),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.selectControl("crop-btn")},cropResized:function(t,i){var n=this.cropResizable.is(":visible");if(this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-crop-highlighter").show(),this.videoPlayerView.$el.find(".se-crop-highlighter-right").css("left",this.cropResizable.position().left+this.cropResizable.width()+"px"),this.videoPlayerView.$el.find(".se-crop-highlighter-left").css("right",this.videoPlayerView.$el.width()-this.cropResizable.position().left+"px"),this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").css({top:this.cropResizable.position().top+this.cropResizable.height()+"px",width:this.cropResizable.width()+2+"px",left:this.cropResizable.position().left-1+"px"}),this.videoPlayerView.$el.find(".se-crop-highlighter-top").css({bottom:this.videoPlayerView.$el.height()-this.cropResizable.position().top+"px",width:this.cropResizable.width()+2+"px",left:this.cropResizable.position().left-1+"px"}),null!=this.projectJson&&(null==i&&e(".reposition-webcam").is(":checked")||1==i)){var r=this.webcamSnappedLayoutOnCrop();this.secondaryVideoContainer.css({left:r.x+"px",top:r.y+"px"})}null!=this.projectJson&&t&&this.updateProjectJson(),0==n&&this.cropResizable.removeClass("disp-show").addClass("disp-none")},cropStopped:function(){this.cropResizable.position().left<0&&this.cropResizable.css("left","0"),this.cropResizable.position().top<0&&this.cropResizable.css("top","0"),this.cropResizable.position().left+this.cropResizable.width()>this.videoPlayerView.$el.width()&&this.cropResizable.css("width",this.videoPlayerView.$el.width()-this.cropResizable.position().left+"px"),this.cropResizable.position().top+this.cropResizable.height()>this.videoPlayerView.$el.height()&&this.cropResizable.css("height",this.videoPlayerView.$el.height()-this.cropResizable.position().top+"px"),this.cropResized(!0)},applyCrop:function(){this.unselectCrop(),this.$el.find(".default-control-detail").show()},resetCrop:function(){this.cropResizable.css({left:"0",top:"0",width:"100%",height:"100%"}),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.cropResized(!0),this.unselectCrop(),this.$el.find(".default-control-detail").show()},cancelCrop:function(){this.cropResizable.css({left:this.snapshot.crop.x+"px",top:this.snapshot.crop.y+"px",width:this.snapshot.crop.w+"px",height:this.snapshot.crop.h+"px"}),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.cropResized(!0,!1),this.unselectCrop(),this.$el.find(".default-control-detail").show()},unselectCrop:function(){this.cropResizable.resizable({disabled:!0}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.$el.find(".crop-control-detail").hide()},disableCrop:function(){e(".crop-btn").addClass("disabled")},handleMfChange:function(t){var i=t.data.that,r=i.$el.find("#seMfSelector").find(":selected").val();if("Merge Fields"!==r){if(i.mfValues.includes("{"+r+"}")){if(i.currentSelectedText){var o=i.getClipOf(i.currentSelectedText);o?(o.properties.textUnwrapped!=this.defaultTextAreaValue?o.properties.textUnwrapped+=" ${"+r+"} ":o.properties.textUnwrapped=" ${"+r+"} ",i.showTextEditable(o.id)):i.addEnteredText("${"+r+"} ")}else i.addEnteredText("${"+r+"} ");i.$el.find("#seMfSelector").val("Merge Fields").trigger("change")}else i.mfValues.push("{"+r+"}"),i.$el.find("#seMfSelector").append(e("<option selected>"+r+"</option>")).trigger("change"),e("#select2-seMfSelector-results").find(".select2-results__option--highlighted").remove(),i.initializeAtwho();n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA122,{assetId:this.assetId,email:this.userEmail})}},initializeAtwho:function(){this.isPersonalizationEnabled&&e("#seTextEditable").atwho({at:"$",data:this.mfValues,limit:this.mfValues.length})},selectAddText:function(){this.askReloadConfirmation=!0,n.trackInThirdPartyTools("video_preview_Text_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addtext-control-detail").fadeIn(100),this.showMarkers("text"),this.selectControl("add-text-btn"),this.isTextClipExist()||this.$el.find(".addtext-control-detail").find("#addTextLink").click()},isTextClipExist:function(){if(this.projectJson&&this.projectJson.clips)for(var e=0;e<this.projectJson.clips.length;e++)if("text"==this.projectJson.clips[e].footage.type)return!0;return!1},addEnteredText:function(t){e(".addimage-control-detail").css("margin","0px"),(!t||t instanceof e.Event)&&(t=this.defaultTextAreaValue);var i=this.getMaxDuration(),r=this.sessionDetails.totalCreatedClips;this.projectJson.trackNames.push("Text - "+t.substring(0,10));var o={containsAudio:!1,containsVideo:!1,containsText:!0,duration:i,type:"text"},a=this.$el.find(".se-font-selector").val(),s=this.$el.find(".se-fontsize-selector").val();null==s&&(s=40);var l=this.$el.find(".se-bold-toggle").is(":checked"),u=this.$el.find(".se-italic-toggle").is(":checked"),c=this;this.getFont(a,l,u,(function(n){var l=c.getMetrics(t,s,n),u={w:l.actualWidth+Math.min(100,Math.max(20,l.actualWidth/10)),h:l.fontHeight+Math.min(100,Math.max(20,l.fontHeight/10))};u.x=c.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),u.x+=(c.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-c.videoPlayerView.$el.find(".se-crop-highlighter-left").width()-u.w)/2,u.y=c.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),u.y+=(c.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-c.videoPlayerView.$el.find(".se-crop-highlighter-top").height()-u.h)/2;var d={color:"#000000",font:a,fontSize:s,fontSizeProject:c.getValueForProject(s,!0),fadein:0,fadeout:0,opacity:1,text:t,textUnwrapped:t,textAlign:"center",xposRaw:u.x,yposRaw:u.y,xpos:c.getValueForProject(u.x,!0),ypos:c.getValueForProject(u.y,!1),boundingBoxRaw:u,boundingBox:c.getBoundingBoxForProject(u)},h=Math.max(c.videoPlayerView.getCurrentTime(),.001);c.getLuminanceForClip(d.boundingBoxRaw.x,d.boundingBoxRaw.y,d.boundingBoxRaw.w,d.boundingBoxRaw.h)<128&&(d.color="#FFFFFF");var p={deleted:!1,end:3,footage:o,id:r,position:Math.max(h-c.videoPlayerView.trimStart,.001),properties:d,start:0,track:c.projectJson.totalVideoTracks+1,startFrom:h,endAt:Math.min(c.videoPlayerView.getCurrentTime()+3,i)};c.projectJson.totalVideoTracks++,c.projectJson.clips.push(p),c.sessionDetails.addedClips.push(p.id),c.reconstructUI(),c.currentSelectedText=r,c.videoPlayerView.$el.find(".se-text-editable").val(p.properties.text),c.selectText(r),c.sessionDetails.totalCreatedClips++,c.$el.find(".addtext-control-detail .se-color-choose").spectrum("set",c.brand_font_color||p.properties.color),c.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",p.properties.color),c.textPropertyChanged(!0),e("#se-component-"+r).click()})),n.trackInThirdPartyTools("Add text clicked")},getLuminanceForClip:function(e,t,i,n){if(null==e||null==t||null==i||null==n)return null;var r=this.videoPlayerView.$el.find(".primary-video")[0],o=document.createElement("canvas"),a=this.videoPlayerView.$el.width(),s=this.videoPlayerView.$el.height();o.width=a,o.height=s;var l=o.getContext("2d");l.clearRect(0,0,a,s),l.rect(0,0,a,s),l.globalAlpha=1,l.drawImage(r,0,0,a,s);for(var u=l.getImageData(e,t,i,n),c=u.data.length/4,d=0,h=0,p=0,f=0;f<c;f++)d+=u.data[4*f+0],h+=u.data[4*f+1],p+=u.data[4*f+2];return.2126*(d/=c)+.7152*(h/=c)+.0722*(p/=c)},selectText:function(t,i){if(this.enabled){this.currentSelectedText==t||this.fromQuickRecord||(this.unselectAllControls(),this.unselectAllComponents()),this.$el.find("#textPropertiesTab").show(),this.currentSelectedText=t,this.currentSelectedClip=this.getClipOf(t),this.$el.find(".addtext-control-detail").show();var r=this.getClipOf(t);this.videoPlayerView.$el.find(".se-text-editable").val(r.properties.textUnwrapped?r.properties.textUnwrapped:r.properties.text),this.videoPlayerView.$el.find(".se-text-editable").css({"font-family":null!=n.getFontMap()[r.properties.font]?n.getFontMap()[r.properties.font].css:"","font-size":r.properties.fontSize+"px","font-style":r.properties.italic?"italic":"normal","font-weight":r.properties.bold?"bold":"normal",color:r.properties.color}),this.$el.find(".addtext-input-text").val(r.properties.text),this.$el.find(".se-font-selector").val(this.getFontIfAvailable(r.properties.font)).trigger("change.select2"),this.$el.find(".se-fontsize-selector").val(r.properties.fontSize).trigger("change.select2"),this.$el.find(".se-bold-toggle").prop("checked",r.properties.bold),this.$el.find(".se-italic-toggle").prop("checked",r.properties.italic),this.$el.find(".addtext-control-detail .se-color-choose").spectrum("set",r.properties.color||this.brand_font_color),this.$el.find(".addtext-control-detail .se-shadow-toggle").spectrum("set",r.properties.shadow),this.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",r.properties.color),this.$el.find(".se-textalign-selector").val(r.properties.textAlign?r.properties.textAlign:"left").trigger("change.select2"),e("#se-component-"+this.currentSelectedText).addClass("se-text-component-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+this.currentSelectedText)),e(".se-components-hover").removeClass("se-components-hover"),this.setTextDraggableContainerSize(e("#se-component-"+this.currentSelectedText)[0],r,!0),i||this.showClipTime(r),this.selectControl("add-text-btn"),this.showMarkers("text")}},getFontIfAvailable:function(e){if(null==e)return this.defaultFontValue;for(var t in n.getFontMap())if(t==e)return e;return this.defaultFontValue},setAdaptiveBorderForTarget:function(t){0!=t.length&&(this.getLuminanceForClip(t.position().left,t.position().top,t.width(),t.height())<128?e(t).addClass("white"):e(t).addClass("black"))},unselectText:function(t){if(null!=this.currentSelectedText){this.$el.find("#textPropertiesTab").hide(),t=void 0===t?"callouttext"==this.getClipOf(this.currentSelectedText).footage.type:t,this.closeTextEditable();var i=e("#se-component-"+this.currentSelectedText);this.currentSelectedText=void 0,this.videoPlayerView.$el.find(".se-text-editable").val(""),this.videoPlayerView.$el.find(".se-text-editable").hide(),i&&e(i).removeClass("se-text-component-selected black white").resizable("destroy"),this.$el.find(".se-text-component").show(),t?this.showMarkers("calloutimage"):this.showMarkers("text"),this.videoPlayerView.$el.find(".se-clip-time").hide()}},textEditableChanged:function(t){var i=this.getClipOf(this.currentSelectedText);i.properties.textUnwrapped=this.videoPlayerView.$el.find(".se-text-editable").val().trim(),i.properties.textUnwrapped.trim().length||(i.properties.text=""),this.newlineTextToHtml(e("#se-component-"+this.currentSelectedText+" .se-text-container")[0],i),t&&13==t.keyCode&&!t.shiftKey&&(this.closeTextEditable(),this.unselectText())},addTextChanged:function(e){var t=e.data.that;13==e.keyCode&&t.addEnteredText()},textPropertyChanged:function(t){if(this.currentSelectedText){var i=this.getClipOf(this.currentSelectedText);i&&(i.properties.text=this.getTextFromTextEl(e("#se-component-"+this.currentSelectedText)).trim(),i.properties.font=this.$el.find(".se-font-selector").val(),i.properties.fontSize=this.$el.find(".se-fontsize-selector").val(),(null==i.properties.fontSizeProject||t&&t.target&&e(t.target).hasClass("se-fontsize-selector"))&&(i.properties.fontSizeProject=this.getValueForProject(i.properties.fontSize,!0)),i.properties.bold=this.$el.find(".se-bold-toggle").is(":checked"),i.properties.italic=this.$el.find(".se-italic-toggle").is(":checked"),t&&(i.properties.color=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString()),this.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",i.properties.color),i.properties.textAlign=this.$el.find(".se-textalign-selector").val(),i.properties.xposRaw=e("#se-component-"+this.currentSelectedText).position().left,i.properties.yposRaw=e("#se-component-"+this.currentSelectedText).position().top,i.properties.xpos=this.getValueForProject(i.properties.xposRaw,!0),i.properties.ypos=this.getValueForProject(i.properties.yposRaw,!1),i.footage.calloutId&&(i.properties.offsetX=e("#se-component-"+this.currentSelectedText).position().left-e("#se-component-"+i.footage.calloutId).position().left,i.properties.offsetY=e("#se-component-"+this.currentSelectedText).position().top-e("#se-component-"+i.footage.calloutId).position().top),this.updateProjectJson(),this.reconstructUI())}},showTextEditable:function(e){var t=this.getClipOf(e),i=this.getClipElOf(e);this.videoPlayerView.$el.find(".se-text-editable").css({left:i.position().left+"px",top:i.position().top+"px",width:i.width()+"px",height:i.height()+"px","text-align":t.properties.textAlign}),i.fadeOut();var n=this,r=t.properties.textUnwrapped?t.properties.textUnwrapped:t.properties.text;r=r==this.defaultTextAreaValue?"":r,this.videoPlayerView.$el.find(".se-text-editable").val(r),this.videoPlayerView.$el.find(".se-text-editable").fadeIn(150,(function(){n.videoPlayerView.$el.find(".se-text-editable").focus()}))},closeTextEditable:function(){var t=this.getClipOf(this.currentSelectedText);t&&this.setLineHeight(t),this.videoPlayerView.$el.find(".se-text-editable").hide(),this.videoPlayerView.$el.find(".se-text-component").show(),t&&!t.properties.text.trim().length&&e("#se-component-"+this.currentSelectedText).find(".se-text-delete").click()},deleteText:function(){var e="callouttext"==this.getClipOf(this.currentSelectedText).footage.type;this.removeClip(this.currentSelectedText),this.unselectText(e),this.reconstructUI()},selectAddStickers:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Emoji_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Emoji_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addsticker-selected").hide(),this.$el.find(".addsticker-initial").show(),this.$el.find(".addsticker-control-detail").fadeIn(100),this.showMarkers("sticker"),this.selectControl("add-stickers-btn")},selectAddImage:function(){this.askReloadConfirmation=!0,this.unselectAllControls(),this.$el.find(".addimage-selected").hide(),this.$el.find(".addimage-initial").show(),this.$el.find(".addimage-control-detail").fadeIn(100),this.selectControl("add-image-btn"),this.isPPR?n.trackInThirdPartyTools("video_preview_Image_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA41,{email:this.userEmail})},hanldeImageAspectRatioChange:function(){this.stickerPropertyChanged(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA413,{email:this.userEmail})},deleteImage:function(){this.deleteSticker(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA415,{email:this.userEmail})},changeImageOpacity:function(t){this.$el.find("#imageOpacitySlider").val(""===e(t.currentTarget).val()?0:e(t.currentTarget).val()),this.$el.find("#imageOpacityInput").val(""===e(t.currentTarget).val()?"":parseInt(e(t.currentTarget).val())>100?100:e(t.currentTarget).val()),this.stickerPropertyChanged(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA414,{email:this.userEmail})},addImage:function(){this.openImportCallback(),new m({type:"image",maximumFilesAllowed:1,maximumPerFileSize:5,isMultiple:!1,showAddMoreTemplate:!1,callbackMethodToHandleFiles:this.processSelectedImage,closeImportCallback:this.closeImportCallback}),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA411,{email:this.userEmail})},addPersonalizedImage:function(){var e={component_type:"image-mf"},t=a.getNewImageMfId(this.projectJson,"image");e.id=t.footageId,e.image_id=t.imageId,e.is_website=!1,e.url=a.getMfImage(e.image_id,"image"),e.addToFootageList=!1,this.createNewImage(e),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA412,{email:this.userEmail})},addWebsiteImageBtn:function(){var e={component_type:"image-mf"},t=a.getNewImageMfId(this.projectJson,"website");e.id=t.footageId,e.image_id=t.imageId,e.is_website=!0,e.url=a.getMfImage(e.image_id,"website"),e.addToFootageList=!1,this.createNewImage(e),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA416,{email:this.userEmail})},processSelectedImage:function(e,t){var i=e[0],n=a.getImportedImageInfo(i),o=[n],s=this;this.$el.find("#imageUploadProgessContainer").show(),this.$el.find("#imageUploadProgressText").text(y.simpleEdit.prepareToImport),(new u).importAssetForSlideShow(JSON.stringify(o),this.assetId,void 0,(function(e){var t=e.video[0];"local_file"==n.upload_type?new v({acl:"private",bucket:t.bucket,key:t.key}).uploadFile(i,void 0,(function(e){s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback(),t.component_type="image",t.addToFootageList=!0,s.createNewImage(t)}),(function(e){r.showBannerAlert(y.simpleEdit.errorMessage,3e3,"error"),r.postErrorsToLog({error:"Error while uploading media to S3 for user.",stackTrace:JSON.stringify(e)}),s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback()})):(s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback(),t.component_type="image",t.addToFootageList=!0,s.createNewImage(t))}),(function(e){r.showBannerAlert(y.simpleEdit.errorMessage,3e3,"error"),r.postErrorsToLog({error:"Error while importing slideshow for user.",stackTrace:JSON.stringify(e)}),s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback()}))},createNewImage:function(e){var t=this.sessionDetails.totalCreatedClips,i=this.getMaxDuration();this.projectJson.trackNames.push("Image");var n={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:e.id.toString(),duration:i,type:e.component_type};"image-mf"===e.component_type&&(n.is_website=e.is_website,n.image_id=e.image_id);var r=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width();r+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2;var o=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height();o+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2;var a=new Image;a.crossOrigin="Anonymous",a.src=e.url;var s=this;a.onload=function(){var l,u=a.width,c=a.height;a.width>s.videoPlayerView.$el.width()?(l=s.videoPlayerView.$el.width()/a.width,u=s.videoPlayerView.$el.width()/3,c=l*a.height/3):a.height>s.videoPlayerView.$el.height()?(l=s.videoPlayerView.$el.height()/a.height,c=s.videoPlayerView.$el.height()/3,u=l*a.width/3):(u=a.width/3,c=a.height/3);var d={fadein:0,fadeout:0,heightRaw:c,widthRaw:u,height:s.getValueForProject(c,!1),width:s.getValueForProject(u,!0),xposRaw:r,yposRaw:o,xpos:s.getValueForProject(r,!0),ypos:s.getValueForProject(o,!1),opacity:1,lockAspectRatio:!0,containsAlpha:!0},h=Math.max(s.videoPlayerView.getCurrentTime(),.001),p={deleted:!1,end:3,footage:n,id:t,position:Math.max(h-s.videoPlayerView.trimStart,.001),properties:d,start:0,track:s.projectJson.totalVideoTracks+1,startFrom:h,endAt:Math.min(s.videoPlayerView.getCurrentTime()+3,i)};s.projectJson.totalVideoTracks++,s.projectJson.clips.push(p),e.addToFootageList&&s.projectJson.footageList.push(e.id),n.src=e.url,s.sessionDetails.addedClips.push(p.id),s.reconstructUI(),s.selectSticker(t),s.sessionDetails.totalCreatedClips++}},isImageComponent:function(e){return"image"==this.getClipOf(e).footage.type||"image-mf"==this.getClipOf(e).footage.type},componentDropped:function(e,t,i){-1!==e.indexOf("se-sticker-btn-")?this.addNewSticker(e.split("se-sticker-btn-")[1],t,i):-1!==e.indexOf("se-callout-btn-")&&this.addNewCallout(e.split("se-callout-btn-")[1],t,i)},stickerBtnClicked:function(e){e.data.that.addNewSticker(e.target.id.split("se-sticker-btn-")[1])},addNewSticker:function(e,t,i){var n=this.sessionDetails.totalCreatedClips,r=this.getMaxDuration();this.projectJson.trackNames.push("Sticker");var o={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:-e-100,duration:r,type:"sticker"};null!=t&&null!=i||(t=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),t+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2,i=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),i+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2);var a={fadein:0,fadeout:0,heightRaw:this.stickerSize[e].height/1.5,widthRaw:this.stickerSize[e].width/1.5,height:this.getValueForProject(this.stickerSize[e].height/1.5,!1),width:this.getValueForProject(this.stickerSize[e].width/1.5,!0),xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),opacity:1,lockAspectRatio:!0},s=Math.max(this.videoPlayerView.getCurrentTime(),.001),l={deleted:!1,end:3,footage:o,id:n,position:Math.max(s-this.videoPlayerView.trimStart,.001),properties:a,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:s,endAt:Math.min(this.videoPlayerView.getCurrentTime()+3,r)};this.projectJson.totalVideoTracks++,this.projectJson.clips.push(l),this.sessionDetails.addedClips.push(l.id),this.reconstructUI(),this.selectSticker(n),this.sessionDetails.totalCreatedClips++},selectSticker:function(t){if(this.enabled){this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedSticker=t,this.currentSelectedClip=this.getClipOf(t);var i=this.getClipOf(this.currentSelectedSticker);this.isImageComponent(i.id)?(this.$el.find(".addimage-selected #imageOpacitySlider").val(100*i.properties.opacity),this.$el.find(".addimage-selected #imageOpacityInput").val(parseInt(100*i.properties.opacity)),this.$el.find(".addimage-selected #imageArLock").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addimage-control-detail").show(),this.$el.find(".addimage-initial").hide(),this.$el.find(".addimage-selected").show()):(this.$el.find(".addsticker-selected .opacity-val").val(100*i.properties.opacity),this.$el.find(".addsticker-selected .lock-aspect-ratio").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addsticker-control-detail").show(),this.$el.find(".addsticker-initial").hide(),this.$el.find(".addsticker-selected").show());var n=e("#se-component-"+t);n.resizable("enable"),n.addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+t)),this.isImageComponent(i.id)?(this.showMarkers("image"),this.selectControl("add-image-btn")):(this.showMarkers("sticker"),this.selectControl("add-stickers-btn")),this.showClipTime(i)}},unselectSticker:function(){null!=this.currentSelectedSticker&&(this.isImageComponent(this.currentSelectedSticker)?(this.currentSelectedSticker=void 0,this.$el.find(".addimage-initial").show(),this.$el.find(".addimage-selected").hide(),this.showMarkers("image")):(this.currentSelectedSticker=void 0,this.$el.find(".addsticker-initial").show(),this.$el.find(".addsticker-selected").hide(),this.showMarkers("sticker")),e(".se-image-component").resizable({disabled:!0}),e(".se-image-component").removeClass("edit-video-selected white black"),this.videoPlayerView.$el.find(".se-clip-time").hide())},stickerPropertyChanged:function(){var e=this.getClipOf(this.currentSelectedSticker);this.isImageComponent(this.currentSelectedSticker)?(e.properties.opacity=this.$el.find(".addimage-selected #imageOpacitySlider").val()/100,e.properties.lockAspectRatio=this.$el.find(".addimage-selected #imageArLock").is(":checked")):(e.properties.opacity=this.$el.find(".addsticker-selected .opacity-val").val()/100,e.properties.lockAspectRatio=this.$el.find(".addsticker-selected .lock-aspect-ratio").is(":checked")),this.updateProjectJson(),this.reconstructUI()},deleteSticker:function(){var e=this.currentSelectedSticker;this.unselectSticker(),this.removeClip(e),this.reconstructUI()},findStickerSize:function(e){this.stickerSize[e]={width:128,height:128}},showStickerFamily:function(t){t.data.that.$el.find(".sticker-family-all").hide(),e(t.target).closest(".sticker-family-container").find(".sticker-family-all").show()},selectAddBlur:function(){"true"===e("#isBlurEnabled").val()||this.isBlurEnabled?(this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Blur_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Blur_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find("#blurSelected").hide(),this.$el.find("#blurInitial").show(),this.$el.find(".blur-control-detail").fadeIn(100),this.showMarkers("effects"),this.selectControl("add-blur-btn"),e(".new").hide()):(n._upgradeAlertPopup(y,h),e(".new").hide())},addNewBlur:function(e,t){if(void 0!==this.sessionDetails.primaryVideo||void 0!==this.sessionDetails.secondaryVideo){var i=this.getMaxDuration(),r=this.getClipOf(this.sessionDetails.primaryVideo)||{},o=Math.max(this.videoPlayerView.getCurrentTime(),.001);null==this.sessionDetails.totalAddedEffects&&(this.sessionDetails.totalAddedEffects=0);var a=this.sessionDetails.totalAddedEffects++,s={id:a,type:"blur",opacity:1,strength:10,widthRaw:this.getValueFromClipPercent(.3,r,!0),heightRaw:this.getValueFromClipPercent(.3,r,!1),xposRaw:this.getValueFromClipPercent(.3,r,!0),yposRaw:this.getValueFromClipPercent(.3,r,!1),lockAspectRatio:!1,start:0,end:3,width:.3,height:.3,xpos:.3,ypos:.3,startFrom:o,endAt:Math.min(this.videoPlayerView.getCurrentTime()+3,i),position:Math.max(o-this.videoPlayerView.trimStart,.001)};r.effects?r.effects.push(s):r.effects=[s],this.reconstructUI(),this.selectBlur(a),n.trackInThirdPartyTools("SE - Add New Blur",{email:this.userEmail})}},enableBlurForPlayer:function(){var e=this;this.$el.find("#blurStrength").slider({min:0,max:100,step:1,value:50,slide:e.blurPropertyChanged}),this.$el.find("#blurStrengthText").bind("change",(function(){e.blurPropertyChanged({},{},!0)}))},blurPropertyChanged:function(e,i,r){var o=this.getClipOf(this.sessionDetails.primaryVideo)||{},a=t.where(o.effects,{id:Number(this.currentSelectedBlur)})[0]||{};if(r){var s=this.$el.find("#blurStrengthText").val();this.$el.find("#blurStrength").slider("option","value",s)}else{s=this.$el.find("#blurStrength").slider("option","value");this.$el.find("#blurStrengthText").val(s)}a.strength=n.map(s,0,100,0,20),a.lockAspectRatio=this.$el.find(".blur-selected .lock-aspect-ratio").is(":checked"),this.updateProjectJson(),this.reconstructUI()},blurAreaChanged:function(){var i=this.getClipOf(this.sessionDetails.primaryVideo)||{},n=t.where(i.effects,{id:Number(this.currentSelectedBlur)})[0]||{},r=e("#se-effects-"+n.id);n.xpos=this.getValueForClip(r.position().left,i,!0),n.ypos=this.getValueForClip(r.position().top,i,!1),n.width=this.getValueForClip(r.width(),i,!0),n.height=this.getValueForClip(r.height(),i,!1),this.reconstructUI()},selectBlur:function(i){if(this.enabled){var r=this.getClipOf(this.sessionDetails.primaryVideo)||{},o=t.where(r.effects,{id:Number(i)})[0]||{},a=Math.ceil(n.map(o.strength,0,20,0,100));this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedBlur=i,this.currentSelectedClip=o,this.$el.find("#blurStrengthText").val(a),this.$el.find("#blurStrength").slider("option","value",a),this.$el.find(".blur-selected .lock-aspect-ratio").prop("checked",o.lockAspectRatio),this.$el.find(".blur-control-detail").show(),this.$el.find(".blur-initial").hide(),this.$el.find(".blur-selected").show(),this.showMarkers("effects"),e("#se-effects-"+i+" .ui-resizable-handle").show(),e("#se-effects-"+i).resizable("enable").addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-effects-"+i)),this.selectControl("add-blur-btn"),void 0!==o.id&&this.showClipTime(o,!0)}},unselectBlur:function(){null!=this.currentSelectedBlur&&(this.currentSelectedBlur=void 0,this.$el.find(".blur-initial").show(),this.$el.find(".blur-selected").hide(),e(".se-effects .ui-resizable-handle").hide(),e(".se-effects").resizable({disabled:!0}).removeClass("edit-video-selected white black"),this.showMarkers("effects"),this.videoPlayerView.$el.find(".se-clip-time").hide())},deleteBlur:function(){for(var e=this.getClipOf(this.sessionDetails.primaryVideo)||{},t=e.effects||[],i=0;i<e.effects.length&&e.effects[i].id!=this.currentSelectedBlur;i++);i!=e.effects.length&&(t.splice(i,1),this.unselectBlur(),this.reconstructUI(),n.trackInThirdPartyTools("SE - Delete Blur",{email:this.userEmail}))},drawBlurLayer:function(){if(this.projectJson){var t=this.videoPlayerView.$el.find(".primary-video")[0],i=this.videoPlayerView.$el.find(".se-effects-canvas")[0],r=i.getContext("2d"),o=this.primaryVideoContainer.width(),a=this.primaryVideoContainer.height(),s=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];i.width=o,i.height=a,r.clearRect(0,0,o,a);for(var l=0;l<s.length;l++){var u=s[l];if(u&&!(this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart<u.position-.1||this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart>u.position+(u.end-u.start))){r.save(),r.rect(u.xposRaw,u.yposRaw,u.widthRaw,u.heightRaw),r.clip(),r.filter="blur("+u.strength+"px)";var c=n.map(u.xposRaw,0,o,0,t.videoWidth),d=n.map(u.yposRaw,0,a,0,t.videoHeight),h=n.map(u.widthRaw,0,o,0,t.videoWidth),p=n.map(u.heightRaw,0,a,0,t.videoHeight);r.drawImage(t,c,d,h,p,u.xposRaw,u.yposRaw,u.widthRaw,u.heightRaw),r.restore(),e("#se-effects-"+u.id).css({opacity:"1","z-index":"106"})}else e("#se-effects-"+u.id).css({opacity:"0","z-index":"-1"})}}},getMaxDuration:function(){for(var e=0,t=0;t<this.projectJson.clips.length;t++)e=Math.max(e,this.projectJson.clips[t].end);return e},selectAddCallouts:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Callout_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Callout_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addcallout-selected").hide(),this.$el.find(".addcallout-initial").show(),this.$el.find(".addcallout-control-detail").fadeIn(100),this.showMarkers("calloutimage"),this.selectControl("add-callouts-btn")},calloutBtnClicked:function(e){e.data.that.addNewCallout(e.target.id.split("se-callout-btn-")[1])},addNewCallout:function(e,t,i){var n=this.sessionDetails.totalCreatedClips,r=this.getMaxDuration();this.projectJson.trackNames.push("Callout-Image");var o={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:-e-1e4,baseId:-e-1e4,duration:r,type:"calloutimage"};null!=t&&null!=i||(t=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),t+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2,i=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),i+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2);var a={fadein:0,fadeout:0,heightRaw:this.callouts[e].height/2,widthRaw:this.callouts[e].width/2,height:this.getValueForProject(this.callouts[e].height/2,!1),width:this.getValueForProject(this.callouts[e].width/2,!0),xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),opacity:1,lockAspectRatio:!0},s=3,l=Math.max(this.videoPlayerView.getCurrentTime(),.001),u={deleted:!1,end:s,footage:o,id:n,position:Math.max(l-this.videoPlayerView.trimStart,.001),properties:a,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:l,endAt:Math.min(this.videoPlayerView.getCurrentTime()+s,r)};if(this.projectJson.totalVideoTracks++,this.projectJson.clips.push(u),this.sessionDetails.addedClips.push(u.id),this.sessionDetails.totalCreatedClips++,this.callouts[e].hasText){var c=this.sessionDetails.totalCreatedClips;this.projectJson.trackNames.push("Callout-Text"),o.textId=c;var d={containsAudio:!1,containsVideo:!1,containsText:!0,containsImage:!1,duration:r,calloutId:n,type:"callouttext"};t+=0;var h={x:a.xposRaw,y:i+=50,w:a.widthRaw,h:a.heightRaw/4},p={text:this.defaultTextAreaValue,textUnwrapped:this.defaultTextAreaValue,font:this.defaultFontValue,fontSize:15,fontSizeProject:this.getValueForProject(15,!0),color:"black",bold:!1,italic:!1,opacity:1,xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),offsetX:0,offsetY:50,textAlign:"center",boundingBoxRaw:h,boundingBox:this.getBoundingBoxForProject(h)};this.getLuminanceForClip(p.boundingBoxRaw.x,p.boundingBoxRaw.y,p.boundingBoxRaw.w,p.boundingBoxRaw.h)<128&&(p.color="#FFFFFF");s=3,l=Math.max(this.videoPlayerView.getCurrentTime(),.001);var f={deleted:!1,end:s,footage:d,id:c,position:Math.max(l-this.videoPlayerView.trimStart,.001),properties:p,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:l,endAt:Math.min(this.videoPlayerView.getCurrentTime()+s,r)};this.projectJson.totalVideoTracks++,this.projectJson.clips.push(f),this.sessionDetails.addedClips.push(f.id),this.sessionDetails.totalCreatedClips++}this.reconstructUI(),this.selectCallout(n)},selectCallout:function(t){if(this.enabled){this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedCallout=t,this.currentSelectedClip=this.getClipOf(t),this.$el.find(".addcallout-control-detail").show(),this.$el.find(".addcallout-initial").hide(),this.$el.find(".addcallout-selected").show();var i=this.getClipOf(this.currentSelectedCallout);this.$el.find(".addcallout-selected .opacity-val").val(100*i.properties.opacity),this.$el.find(".addcallout-selected .lock-aspect-ratio").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addcallout-selected .callout-variation").val(i.footage.baseId-i.footage.id);var n=e("#se-component-"+t);n.resizable("enable"),n.addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+t)),this.showMarkers("calloutimage"),this.showClipTime(i),this.selectControl("add-callouts-btn")}},unselectCallout:function(){null!=this.currentSelectedCallout&&(this.currentSelectedCallout=void 0,this.$el.find(".addcallout-initial").show(),this.$el.find(".addcallout-selected").hide(),e(".se-image-component").resizable({disabled:!0}),e(".se-image-component").removeClass("edit-video-selected white black"),this.showMarkers("calloutimage"),this.videoPlayerView.$el.find(".se-clip-time").hide())},calloutDragged:function(){var t=this.getClipOf(this.currentSelectedCallout),i=this.getClipOf(t.footage.textId);if(null!=i){var r=this.getClipElOf(t.footage.textId);i.properties.boundingBoxRaw?r.css({left:n.map(this.calloutTextBoxSpread.x,0,1,t.properties.xposRaw,t.properties.xposRaw+t.properties.widthRaw)+"px",top:n.map(this.calloutTextBoxSpread.y,0,1,t.properties.yposRaw,t.properties.yposRaw+t.properties.heightRaw)+"px"}):e("#se-component-"+t.footage.textId).css({left:e("#se-component-"+t.id).position().left+i.properties.offsetX+"px",top:e("#se-component-"+t.id).position().top+i.properties.offsetY+"px"}),i.properties.xposRaw=r.position().left,i.properties.yposRaw=r.position().top,i.properties.xpos=this.getValueForProject(i.properties.xposRaw,!0),i.properties.ypos=this.getValueForProject(i.properties.yposRaw,!1),i&&i.properties.boundingBoxRaw&&(i.properties.boundingBoxRaw.x=i.properties.xposRaw,i.properties.boundingBoxRaw.y=i.properties.yposRaw,i.properties.boundingBox=this.getBoundingBoxForProject(i.properties.boundingBoxRaw))}this.updateProjectJson()},calloutResized:function(e){var t=this.getClipOf(e),i=this.getClipOf(t.footage.textId);i&&i.properties.boundingBoxRaw&&this.calloutTextBoxSpread&&(this.getClipElOf(i.id).css({left:n.map(this.calloutTextBoxSpread.x,0,1,t.properties.xposRaw,t.properties.xposRaw+t.properties.widthRaw)+"px",top:n.map(this.calloutTextBoxSpread.y,0,1,t.properties.yposRaw,t.properties.yposRaw+t.properties.heightRaw)+"px",width:this.calloutTextBoxSpread.w*t.properties.widthRaw+"px"}),this.textBoxResized(i.id)),this.updateProjectJson()},calloutPropertyChanged:function(){var e=this.getClipOf(this.currentSelectedCallout);e.properties.opacity=this.$el.find(".addcallout-selected .opacity-val").val()/100,e.properties.lockAspectRatio=this.$el.find(".addcallout-selected .lock-aspect-ratio").is(":checked"),e.footage.id=e.footage.baseId-parseInt(this.$el.find(".callout-variation").val()),this.updateProjectJson(),this.reconstructUI()},deleteCallout:function(){var e=this.getClipOf(this.currentSelectedCallout),t=this.getClipOf(e.footage.textId);null!=t&&this.removeClip(t.id),this.removeClip(this.currentSelectedCallout),this.unselectCallout(),this.reconstructUI()},findCalloutSize:function(e){var t=document.createElement("img");t.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+e+".png?v=2",t.crossOrigin="Anonymous";var i=this;this.callouts[e]&&(this.callouts[e].width=300,this.callouts[e].height=300),t.onload=function(){i.callouts[e]&&(i.callouts[e].width=t.width,i.callouts[e].height=t.height)}},isCalloutImage:function(e){return this.getClipOf(e).footage.id<=-1e4},scrollCallouts:function(t){var i=e(t.target).hasClass("callout-scroll-left"),n=t.data.that;n.$el.find(".callout-btn-scroll-container").animate({scrollLeft:n.$el.find(".callout-btn-scroll-container").scrollLeft()+200*(i?-1:1)},200)},newComponentDragged:function(){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-components-droppable").fadeIn(200),this.videoPlayerView.$el.find(".se-components-droppable").css({"z-index":1e3,width:this.videoPlayerView.$el.find(".se-crop-resizable").width()+"px",height:this.videoPlayerView.$el.find(".se-crop-resizable").height()+"px",left:this.videoPlayerView.$el.find(".se-crop-resizable").position().left+"px",top:this.videoPlayerView.$el.find(".se-crop-resizable").position().top+"px"})},newComponentDropped:function(){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-show").addClass("disp-none"),this.videoPlayerView.$el.find(".se-components-droppable").hide(),this.videoPlayerView.$el.find(".se-components-droppable").css("z-index",0)},getClipOf:function(e){for(var t=void 0,i=0;i<this.projectJson.clips.length;i++)if(this.projectJson.clips[i].id==e){t=this.projectJson.clips[i];break}return t},getClipElOf:function(t){return e("#se-component-"+t)},removeClip:function(e){e=parseInt(e);for(var t=0;t<this.projectJson.clips.length;t++)if(this.projectJson.clips[t].id==e){this.projectJson.clips.splice(t,1);break}-1!==this.sessionDetails.addedClips.indexOf(e)&&this.sessionDetails.addedClips.splice(this.sessionDetails.addedClips.indexOf(e),1)},lockAspectRatio:function(t){var i=t.data.that;e(t.target).hasClass("primary-vid-control")?(i.primaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.primaryVideoContainer,e(t.target).is(":checked"))):e(t.target).hasClass("secondary-vid-control")&&(i.secondaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.secondaryVideoContainer,e(t.target).is(":checked")))},opacityChanged:function(t){var i=t.data.that;e(t.target).hasClass("primary-vid-control")?(i.primaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.primaryVideoContainer,e(t.target).is(":checked"))):e(t.target).hasClass("secondary-vid-control")&&(i.secondaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.secondaryVideoContainer,e(t.target).is(":checked")))},showClipTime:function(t,i){var r=t.footage?t.footage.type:"blur";this.videoPlayerView.$el.find(".se-clip-time").show();var o=Math.max(n.map(t.startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),a=Math.min(n.map(t.endAt,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),this.videoPlayerView.$el.find(".components-time-container").width());this.videoPlayerView.$el.find(".se-clip-time").resizable("enable"),this.videoPlayerView.$el.find(".se-clip-time").css({left:o+"px",width:a-o+"px"}),this.videoPlayerView.$el.find(".se-clip-time .se-selected-type").html(r.substring(0,1).toUpperCase()),i||this.updateTimeFromClipToPopup(this),e(".timer-pop-up").show()},playerTimeUpdate:function(){for(var e=0;e<this.sessionDetails.addedClips.length;e++){var t=this.getClipOf(this.sessionDetails.addedClips[e]);null!=t&&(this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart<t.position-.1||this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart>t.position+(t.end-t.start)?this.videoPlayerView.$el.find("#se-component-"+t.id).css({opacity:"0","z-index":"0"}):this.videoPlayerView.$el.find("#se-component-"+t.id).css({opacity:null!=t.properties.opacity?t.properties.opacity:1,"z-index":"107"}))}},handleVideoPlay:function(){var e=this;this.blurPlayInterval=setInterval((function(){e.drawBlurLayer()}),15)},handleVideoPause:function(){clearInterval(this.blurPlayInterval)},handleVideoSeeked:function(){this.drawBlurLayer(),this.setBorderForClipOnVideoSeek()},showMarkers:function(t){var i,r,o=this.videoPlayerView.$el.find(".player-progress").width()+parseInt(e(".player-progress").css("marginRight"))+parseInt(e(".player-progress").css("marginLeft"));if(this.videoPlayerView.$el.find(".components-time-container, .components-marker-container").css("width",o+"px"),this.videoPlayerView.$el.find(".components-marker-container").empty(),"effects"===t){i=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];for(var a=0;a<i.length;a++)r=Math.max(n.map(i[a].startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),this.videoPlayerView.$el.find(".components-marker-container").append('<span class="se-selected-type" id="effect-'+i[a].id+'" style = "left:'+r+'px">'+i[a].type.substring(0,1).toUpperCase()+"</span>")}else for(a=0;a<this.projectJson.clips.length;a++){var s=this.projectJson.clips[a];s.footage.type==t&&(r=Math.max(n.map(s.startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),this.videoPlayerView.$el.find(".components-marker-container").append('<span class="se-selected-type" id="clip-'+s.id+'" style = "left:'+r+'px">'+s.footage.type.substring(0,1).toUpperCase()+"</span>"))}this.videoPlayerView.$el.find(".se-selected-type").bind("click",{that:this},this.markerSelected)},markerSelected:function(e){var i,n=e.target.id,r=0;if(n.includes("clip"))i=n.split("-")[1],r=this.getClipOf(i).startFrom;else{if(!n.includes("effect"))return;i=n.split("-")[1],effects=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[],r=(t.where(effects,{id:Number(i)})[0]||{}).startFrom}this.videoPlayerView.goToTime(Math.min(Math.max(r,this.videoPlayerView.trimStart),this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd)),this.reconstructUI(),this.selectComponentFromId(i,n.includes("effect"))},selectComponentFromId:function(e,t){t?this.selectBlur(e):(type=this.getClipOf(e).footage.type,"sticker"===type?this.selectSticker(e):"text"===type?this.selectText(e):"calloutimage"===type&&this.selectCallout(e))},makeVideoContainerResizable:function(t,i){var n=this;t.resizable({aspectRatio:i,handles:"n, e, w, s, ne, nw, se, sw",resize:function(t,i){n.mediaContainerResized(e(t.target))},start:this.userEventStart,stop:function(){n.userEventStop(),n.reconstructUI()}}),this.videoPlayerView.$el.find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se")},isOnBoardRequired:function(){return!1},getFont:function(e,t,i,n){var r=this;this.fontCache[e+":"+t+":"+i]?n(this.fontCache[e+":"+t+":"+i]):(e||(console.warn("fontname not set"),e=r.defaultFontValue),g.load(this.getFontURL(e,t,i),(function(o,a){if(o){var s;for(var l in console.error("error loading font "+e+":"+t+":"+i),r.fontCache)s=r.fontCache[l];s?n(s):(console.warn("trying to load default font"),g.load(r.getFontURL("montserrat",t,i),(function(e,t){o?console.error("loading default font also failed"):n(t)})))}else r.fontCache[e+":"+t+":"+i]=a,n(a)})))},setLineHeight:function(t){var i=this;null==t.properties.fontSizeProject&&(t.properties.fontSizeProject=this.getValueForProject(t.properties.fontSize));var n=this.getValueForPlayer(t.properties.fontSizeProject,!0);this.getFont(t.properties.font,t.properties.bold,t.properties.italic,(function(r){var o=i.getMetrics(t.properties.text,n,r),a=0;e("#se-component-"+t.id+" div").each((function(){var t=i.getMetrics(e(this).text(),n,r);a=Math.max(a,t.actualBoundingBoxAscent-t.actualBoundingBoxDescent)})),a+=(o.fontBoundingBoxAscent-o.fontBoundingBoxDescent)/10,t.properties.lineHeight=i.getValueForProject(a,!1);var s=0,l=0,u=a*e("#se-component-"+t.id+" .text-el-line").length,c=Math.min(Math.max(10,u/2),40);t.properties.boundingBoxRaw&&(c=(t.properties.boundingBoxRaw.h-u)/2);var d=t.properties.textAlign?t.properties.textAlign:"left";e("#se-component-"+t.id+" .text-el-line").each((function(){var t=i.getMetrics(e(this).text(),n,r);l=Math.max(l,t.actualWidth)})),null==t.properties.boundingBoxRaw&&(c=Math.min(Math.max(10,u/2),40),t.properties.boundingBoxRaw={x:t.properties.xposRaw,y:t.properties.yposRaw-c,w:l+2*c,h:u+2*c},t.properties.textAlign=d,i.setTextDraggableContainerSize(e("#se-component-"+t.id)[0],t,!1)),t.properties.boundingBoxRaw.topPadding=c,t.properties.boundingBox=i.getBoundingBoxForProject(t.properties.boundingBoxRaw),e("#se-component-"+t.id+" .text-el-line").each((function(){var o=i.getMetrics(e(this).text(),n,r),l=0;"center"==d?l=(t.properties.boundingBoxRaw.w-o.actualWidth)/2:"right"==d&&(l=t.properties.boundingBoxRaw.w-o.actualWidth),e(this).css({"line-height":o.fontBoundingBoxAscent-o.fontBoundingBoxDescent+"px",top:s+(o.actualBoundingBoxAscent-o.fontBoundingBoxAscent)+c+"px",left:l+"px"}),s+=a}))}))},setTextDraggableContainerSize:function(t,i,n){var r=this;i.properties.boundingBoxRaw&&(e(t).css({width:i.properties.boundingBoxRaw.w+"px",height:i.properties.boundingBoxRaw.h+"px"}),n&&(e(t).resizable({handles:"se",aspectRatio:!1,containment:".primary-video-container",create:function(){e(this).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se")},stop:function(){r.lastTextResizeTime=(new Date).getTime()},resize:r.textBoxResized}),i.footage.calloutId&&e(t).resizable("option","containment","#se-component-"+i.footage.calloutId)))},selectControl:function(e){this.$el.find(".se-control-selected").removeClass("se-control-selected"),this.$el.find("."+e).addClass("se-control-selected")},computedDuration:function(){this.resizeHandler(),this.$el.find(".trim-before-container, .trim-after-container").show(),this.reconstructUI(),this.updateTrimInput()},_getVideoModel:function(){if(this.embeddedDigest&&this.embeddedDigest.length>0)var e=new u({embedded_digest:this.embeddedDigest});else if(this.digest)e=new u({digest:this.digest});else e=new u;return e},getReloadConfirmationState:function(){return this.askReloadConfirmation},prefetchAssetsForSimpleEdit:function(){try{var e=new Image;e.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/stickers_all.png?v=2",e.crossOrigin="Anonymous"}catch(e){console.log("Image constructor - Browser not supported!")}},showClipTimePop:function(t){var i=e(t.target);(i.hasClass("se-clip-time")||i.hasClass("se-selected-type"))&&(t.data.that.updateTimeFromClipToPopup(t.data.that),e(".timer-pop-up").toggle())},clipInputButtonClicked:function(e){e.stopPropagation();var t=e.data.that,i=t.currentSelectedClip||{},n=e.target.className.indexOf("timer-start-btn")>-1,r=e.target.className.indexOf("plus")>-1;t.calculateTimeAndUpdateClip(n,r,i,t),t.reconstructUI()},clipInputtyped:function(t){t.stopPropagation();var i=t.data.that,r=t.keyCode,o=e(t.target).hasClass("timer-start-input");if(38===r||40===r)i.calculateTimeAndUpdateClip(o,38===r,i.currentSelectedClip||{},i);else{var a=n.timeToInt(e(".timer-start-input").val()),s=n.timeToInt(e(".timer-stop-input").val());clearTimeout(i.clipTimeInputTimeout),i.isValidClipTime(a,s)?i.setClipTimeAndUpdateValues(a,s,i):i.clipTimeInputTimeout=setTimeout((function(){i.updateTimeFromClipToPopup()}),1e3)}i.reconstructUI()},isValidClipTime:function(e,t){var i=this.videoPlayerView,n=i.mediaPlayer.duration-i.trimEnd;return!(e>=t||e<i.trimStart||t>n||isNaN(e)||isNaN(t))},updateTimeFromClipToPopup:function(t){var i=(t=t||this).currentSelectedClip||{};e(".timer-start-input").val(n.strToTime(i.startFrom)),e(".timer-stop-input").val(n.strToTime(i.endAt))},calculateTimeAndUpdateClip:function(t,i,r,o){var a=r.startFrom,s=r.endAt,l=o.videoPlayerView,u=l.mediaPlayer.duration-l.trimEnd;t?a=i?Math.min(a+1,u):Math.max(a-1,l.trimStart):s=i?Math.min(s+1,u):Math.max(s-1,l.trimStart),a>=s||(e(".timer-start-input").val(n.strToTime(a)),e(".timer-stop-input").val(n.strToTime(s)),o.setClipTimeAndUpdateValues(a,s,o))},setClipTimeAndUpdateValues:function(e,t,i){var n=i.currentSelectedClip||{},r=n.footage?n.footage.type:"blur";n.startFrom=e,n.endAt=t,("calloutimage"===r||"sticker"===r||"text"===r||"blur"===r)&&this.showClipTime(n,!0),this.updateCalloutClipTime(n),this.updateProjectJson()},updateCalloutClipTime:function(e){if(null!=e&&null!=e.footage&&null!=e.footage.type){var t;if("callouttext"==e.footage.type)t=this.getClipOf(e.footage.calloutId);else{if("calloutimage"!=e.footage.type||null==e.footage.textId)return;t=this.getClipOf(e.footage.textId)||{}}t.startFrom=e.startFrom,t.endAt=e.endAt}},onClipTimeChangeHandler:function(){var e=n.map(this.videoPlayerView.$el.find(".se-clip-time").position().left,0,this.videoPlayerView.$el.find(".components-time-container").width(),this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd),t=n.map(this.videoPlayerView.$el.find(".se-clip-time").width(),0,this.videoPlayerView.$el.find(".components-time-container").width(),0,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimStart-this.videoPlayerView.trimEnd),i=this.getSelectedClipOrEffect();null!=i&&(i.startFrom=e,i.endAt=i.startFrom+t,this.updateCalloutClipTime(i),this.updateProjectJson(),this.reconstructUI())},getTextFromTextEl:function(t){for(var i=t.find(".text-el-line").toArray(),n="",r=0;r<i.length;r++)n+=e(i[r]).text()+(r+1<i.length?"\n":"");return n},newlineTextToHtml:function(t,i){var r=this,o=i.properties.text.split(/[\r\n]+/);for(var a in i.properties.textUnwrapped&&(o=i.properties.textUnwrapped.split(/[\r\n]+/),i.properties.boundingBoxRaw&&i.properties.textUnwrapped&&this.getFont(i.properties.font,i.properties.bold,i.properties.italic,(function(e){for(var t=0;t<o.length;t++){for(var n=o[t].split(/(\$[\s]*\{.*\}|\S+|\s+)/).filter((function(e){return 0!=e.length})),a=[{first:o[t]}],s=n.length-1;s>0;s--)a.push({first:n.slice(0,s).join(""),second:n.slice(s,n.length).join("")});var l=a[a.length-1].first;if(!l.replace(/\s/g,"").startsWith("${"))for(s=l.length-1;s>0;s--)a.push({first:l.slice(0,s),second:[l.slice(s,l.length),n.slice(1,n.length).join("")].join("")});for(var u=0;u<a.length;u++){if(r.getMetrics(a[u].first,r.getValueForPlayer(i.properties.fontSizeProject,!0),e).actualWidth<=i.properties.boundingBoxRaw.w)break}u=Math.min(a.length-1,u),o[t]=a[u].first,a[u].second&&o.splice(t+1,0,a[u].second)}})),i.properties.text=o.join("\n")),e(t).empty(),o){var s=document.createElement("div");e(s).append(o[a]),e(s).addClass("text-el-line"),e(s).css({"font-family":null!=n.getFontMap()[i.properties.font]?n.getFontMap()[i.properties.font].css:"","font-size":this.getValueForPlayer(i.properties.fontSizeProject,!0)+"px","font-style":i.properties.italic?"italic":"normal","font-weight":i.properties.bold?"bold":"normal",color:i.properties.color,position:"absolute","line-height":"0.7em"}),e(t).append(s)}this.setLineHeight(i)},fontLoaded:function(e){if(null!=this.currentSelectedText){var t=this.getClipOf(this.currentSelectedText),i=this.getClipElOf(this.currentSelectedText);this.newlineTextToHtml(i.find(".se-text-container")[0],t)}},textBoxResized:function(t){(t instanceof e.Event||null==t)&&(t=this.currentSelectedText);var i=this.getClipOf(t),n=this.getClipElOf(t);i.properties.boundingBoxRaw={x:n.position().left,y:n.position().top,w:n.width(),h:n.height()},i.properties.boundingBox=this.getBoundingBoxForProject(i.properties.boundingBoxRaw),this.newlineTextToHtml(n.find(".se-text-container")[0],i)},webcamSnappedLayoutOnCrop:function(){var e="bottom-left";return this.projectJson&&null!=this.projectJson.webcamPosition&&(e=this.projectJson.webcamPosition),"bottom-left"==e?{x:this.cropResizable.position().left,y:this.cropResizable.position().top+this.cropResizable.height()-this.secondaryVideoContainer.height()}:"bottom-right"==e?{x:this.cropResizable.position().left+this.cropResizable.width()-this.secondaryVideoContainer.width(),y:this.cropResizable.position().top+this.cropResizable.height()-this.secondaryVideoContainer.height()}:"top-right"==e?{x:this.cropResizable.position().left+this.cropResizable.width()-this.secondaryVideoContainer.width(),y:this.cropResizable.position().top}:"top-left"==e?{x:this.cropResizable.position().left,y:this.cropResizable.position().top}:void 0},getProjectJSON:function(){return this.projectJson},getIOAdjustedProjectJSON:function(){var e=n.naiveClone(this.projectJson);if(null!=e.ioDetails)try{if(e.ioDetails.intro&&e.ioDetails.intro.theme>0){for(var t=e.ioDetails.intro,i=t.duration,r=i,o=0;o<e.clips.length;o++)e.clips[o].deleted||e.clips[o].properties.isPlaceHolder||(e.clips[o].position=parseInt(e.clips[o].position)+i,r=Math.min(r,e.clips[o].position));var a=e.totalVideoTracks;for(o=0;o<t.clips.length;o++){if(!(c=t.clips[o]).deleted&&!c.properties.isPlaceHolder){var s=o+1;r<i&&(s+=a),s>e.totalVideoTracks&&(e.totalVideoTracks++,e.trackNames.push(c.properties.text)),c.track=s,e.clips.push(c)}}}if(e.ioDetails.outro&&e.ioDetails.outro.theme>0){var l=e.ioDetails.outro,u=0;for(o=0;o<e.clips.length;o++)e.clips[o].deleted||e.clips[o].properties.isPlaceHolder||(u=Math.max(u,parseInt(e.clips[o].position)+e.clips[o].end-e.clips[o].start));for(o=0;o<l.clips.length;o++){var c;if(!(c=l.clips[o]).deleted&&!c.properties.isPlaceHolder)(s=o+1)>=e.totalVideoTracks&&(e.totalVideoTracks++,e.trackNames.push(c.properties.text)),c.position=u,c.track=s,e.clips.push(c)}}}catch(e){console.error(e)}return e},overrideStyle:function(e,t,i){e.each((function(){this.style.setProperty(t,i,"important")}))},applyCustomColors:function(){this.customColors&&(this.customColors.primaryColor&&(this.overrideStyle(this.$el.find(".trim-slider .ui-slider-handle"),"background",this.customColors.primaryColor),this.overrideStyle(this.$el.find(".trim-slider .ui-slider-range"),"border-color",this.customColors.primaryColor)),this.customColors.secondaryColor&&this.overrideStyle(this.$el.find(".trim-slider .ui-slider-range"),"background",this.customColors.secondaryColor),this.customColors.bgColor&&this.overrideStyle(this.$el.find(".trim-slider"),"background",this.customColors.bgColor))},addCustomFontStyles:function(){var e=document.createElement("style");for(var t in n.getFontMap()){var i=n.getFontMap()[t];e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: normal; font-weight: 400; src: url('"+this.getFontURL(t,!1,!1)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: normal; font-weight: bold; src: url('"+this.getFontURL(t,!0,!1)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: italic; font-weight: 400; src: url('"+this.getFontURL(t,!1,!0)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: italic; font-weight: bold; src: url('"+this.getFontURL(t,!0,!0)+"') format('truetype'); }"))}document.head.appendChild(e)},getFontURL:function(e,t,i){var n=e;return t&&i?n+="bi":t?n+="bd":i&&(n+="i"),"https://fontstatic.s3-accelerate.amazonaws.com/"+e+"/"+n+".ttf"},getMetrics:function(e,t,i){for(var n=0,r=0,o=0,a=1/i.unitsPerEm*t,s=i.stringToGlyphs(e.replace(/\s/g,"")),l=0;l<s.length;l++){var u=s[l];u.advanceWidth&&(o+=u.advanceWidth*a),l<s.length-1&&(kerningValue=i.getKerningValue(u,s[l+1]),o+=kerningValue*a),n=Math.max(n,u.yMax),r=Math.min(r,u.yMin)}var c=i.getPath(e,0,0,t);return{actualWidth:c.getBoundingBox().x2-c.getBoundingBox().x1,width:o,actualBoundingBoxAscent:n*a,actualBoundingBoxDescent:r*a,actualHeight:n*a-r*a,fontBoundingBoxAscent:i.ascender*a,fontBoundingBoxDescent:i.descender*a,fontHeight:i.ascender*a-i.descender*a}},globalKeypress:function(t){var i=t.keyCode;0==this.videoPlayerView.$el.find(".timer-pop-up").find(e(t.target)).length&&(!this.isMac&&46===i||this.isMac&&8===i)&&this.deleteClipOrEffectSelected()},deleteClipOrEffectSelected:function(){null!=this.currentSelectedBlur?this.deleteBlur():null!=this.currentSelectedSticker?this.deleteSticker():null!=this.currentSelectedCallout?this.deleteCallout():null!=this.currentSelectedText&&(this.videoPlayerView.$el.find(".se-text-editable").is(":visible")||this.deleteText())},setBorderForClipOnVideoSeek:function(){var e=this.getSelectedClipOrEffect();null!=e&&(null!=this.currentSelectedBlur?(this.videoPlayerView.$el.find("#se-effects-"+e.id).removeClass("black white"),this.setAdaptiveBorderForTarget(this.videoPlayerView.$el.find("#se-effects-"+e.id))):(this.videoPlayerView.$el.find("#se-component-"+e.id).removeClass("black white"),this.setAdaptiveBorderForTarget(this.videoPlayerView.$el.find("#se-component-"+e.id))))},getSelectedClipOrEffect:function(){var e=null!=this.currentSelectedText?this.currentSelectedText:null!=this.currentSelectedSticker?this.currentSelectedSticker:null!=this.currentSelectedCallout?this.currentSelectedCallout:void 0;if(null!=e)return this.getClipOf(e);if(null!=this.currentSelectedBlur){e=this.currentSelectedBlur;var i=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];return t.where(i,{id:Number(e)})[0]||{}}}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.x(t.get(["showAsModal"],!1),t,{else:i,block:s},{})}function i(e,t){return e.w('<center class="hippo-progress-loader"><div class="hippo-progress-text" id="progressText"> Preparing File... </div>').x(t.get(["showHippoIcon"],!1),t,{else:n,block:r},{}).w("</center>")}function n(e,t){return e.w('<div class="hippo-branding-loader"><span></span><span></span><span></span><span></span><span></span></div>')}function r(e,t){return e.x(t.get(["isVirtualBg"],!1),t,{else:o,block:a},{}).w('<div class="hippo-progress-container text-left"><div class="hippo-progress-strip"></div><div class="hippo-progress-fill-strip" id="progressFillStrip"></div></div>')}function o(e,t){return e.w('<img class="hippo-progress-gif" src="/img/hippo-yoga.gif">')}function a(e,t){return e.w('<img class="hippo-progress-gif virtualbg-notify-img" src="/img/virtualbg-notify.png">')}function s(e,t){return e.w('<div class="modal-backdrop" id="progressBackdrop"><div class="large-4 large-offset-4 medium-6 medium-offset-3 hippo-progress"><center class="hippo-progress-loader"><div class="hippo-progress-text" id="progressText"> Preparing File... </div>').x(t.get(["showHippoIcon"],!1),t,{else:l,block:u},{}).w("</center></div></div>")}function l(e,t){return e.w('<div class="hippo-branding-loader"><span></span><span></span><span></span><span></span><span></span></div>')}function u(e,t){return e.x(t.get(["isVirtualBg"],!1),t,{else:c,block:d},{}).w('<div class="hippo-progress-container text-left"><div class="hippo-progress-strip"></div><div class="hippo-progress-fill-strip" id="progressFillStrip"></div></div>')}function c(e,t){return e.w('<img class="hippo-progress-gif" src="/img/hippo-yoga.gif">')}function d(e,t){return e.w('<img class="hippo-progress-gif virtualbg-notify-img" src="/img/virtualbg-notify.png">')}e.register("templates/component/hippo_yoga",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/hippo_yoga",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(2),i(10),i(35),i(68),i(20)],void 0===(r=function(e,t,i,n,r){"use strict";return r=r.default,i.Model.extend({idAttribute:"id",defaults:{id:null},initialize:function(e){},url:function(){var e=this.attributes.id?this.attributes.id:"";return JSON.parse(n).getVideoCategories+(e?"/"+e:"")},parse:function(e){return e},getVideoCategories:function(e,t){r.call({url:JSON.parse(n).getAllVideoCategories,method:"GET",success:e,error:t})},getMultipleVideoCategories:function(e,t,i,o){r.call({url:JSON.parse(n).getMultipleCategoryVideos+e,method:"POST",data:t,success:i,error:o})},setDefaultVideoCategory:function(e,t,i,o){var a={set_default:t};r.call({url:JSON.parse(n).setDefaultVideoCategory+"/"+e,method:"PUT",data:a,success:i,error:o})},getVideoCategoriesWithToken:function(e,t,i){r.call({url:JSON.parse(n).getVideoCategoriesWithToken+"/"+e,method:"GET",success:t,error:i})},getCategoryDetails:function(e,t,i){r.call({url:JSON.parse(n).getVideoCategories+"/details/"+e,method:"GET",success:t,error:i})},getVideoGroups:function(e,t,i){r.call({url:JSON.parse(n).getVideoGroups+"?asset_id="+e,method:"GET",success:t,error:i})},getVideoCategoriesAndSelected:function(e,t,i){r.call({url:JSON.parse(n).selectedVideoCategories+"/"+e,method:"GET",success:t,error:i})},getVideosOfCategory:function(e,t,i,o){r.call({url:JSON.parse(n).getCategoryVideos+"/"+e+"/"+t,method:"GET",success:i,error:o})},getVideosOfCategoryWithToken:function(e,t,i,o,a){r.call({url:JSON.parse(n).getCategoryVideosWithToken+"/"+e+"/"+t+"/"+i,method:"GET",success:o,error:a})},assignCategories:function(e,t,i,o){var a=new FormData;a.append("asset_id",e),a.append("cat_ids",t),r.call({url:JSON.parse(n).assignCategories,method:"POST",data:a,contentType:!1,processData:!1,success:i,error:o})},assignGroups:function(e,t,i){r.call({url:JSON.parse(n).assignGroups,method:"POST",data:e,success:t,error:i})},assignVideos:function(e,t,i,o){var a=new FormData;a.append("asset_ids",e),a.append("cat_ids",t),r.call({url:JSON.parse(n).assignVideos,method:"POST",data:a,contentType:!1,processData:!1,success:i,error:o})},searchCategories:function(e,t,i,o,a){var s=new FormData;t&&s.append("search_token",e),s.append("is_search",t),s.append("order_type",i);var l=JSON.parse(n).createVideo+"/1/search_category";r.call({url:l,method:"POST",data:s,contentType:!1,processData:!1,success:o,error:a})},assignToTeacher:function(e,t,i,o){var a="asset_id="+e+"&token="+t;r.call({url:JSON.parse(n).createVideo+"/assign_to_teacher",method:"POST",data:a,success:i,error:o})},deleteVideoCategory:function(e,t,i){r.call({url:JSON.parse(n).deleteVideoCategory+"/"+e,method:"DELETE",success:t,error:i})},saveDocumentInfo:function(e,t,i){r.call({url:JSON.parse(n).saveDocumentInfo,method:"POST",data:e,success:t,error:i})},getUsersAndGroups:function(e,t){r.call({url:"/api/internal/get_user_and_group_list",method:"GET",success:e,error:t})},updatePinFolder:function(e,t,i){r.call({url:JSON.parse(n).updatePinFolder,method:"POST",data:e,success:t,error:i})}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="container"><div class="row"><div class="large-8 large-offset-2 medium-10 medium-offset-1 small-12 import-media-container"><div class="import-header clearfix"><div class="pull-left"> ').h("eq",t,{else:i,block:n},{key:t.get(["type"],!1),value:"doc"},"h").w(' </div><div class="pull-right"> <img src="/svg/close-gray.svg" alt="close" id="closeImport"/> </div></div><div class="tab-container" id="tabContainer">').x(t.get(["fromVideoPages"],!1),t,{block:r},{}).x(t.get(["canShowImportFromLocal"],!1),t,{block:a},{}).x(t.get(["canShowVideoLibrary"],!1),t,{block:s},{}).x(t.get(["canShowRecentlyUsed"],!1),t,{block:l},{}).nx(t.get(["fromVideoPages"],!1),t,{block:u},{}).x(t.get(["canShowAudioLibrary"],!1),t,{block:d},{}).x(t.get(["canShowGdriveImport"],!1),t,{block:h},{}).x(t.get(["canImportImageFromLibrary"],!1),t,{block:p},{}).x(t.get(["canShowImageWebSearch"],!1),t,{block:f},{}).x(t.get(["canShowTestimonial"],!1),t,{block:g},{}).x(t.get(["canShowShopify"],!1),t,{block:m},{}).x(t.get(["canShowAddViaLink"],!1),t,{block:v},{}).x(t.get(["canShowCreateVideoOption"],!1),t,{block:y},{}).x(t.get(["canShowWebLink"],!1),t,{block:b},{}).w('</div><div class="import-body no-box-shadow">').p("templates/partials/import_from_local",t,t,{}).p("templates/partials/import_recently_used",t,t,{}).p("templates/partials/import_from_web",t,t,{}).p("templates/partials/import_from_library",t,t,{}).p("templates/partials/import_from_drive",t,t,{}).p("templates/partials/import_from_video_library",t,t,{}).p("templates/partials/import_from_shopify",t,t,{}).p("templates/partials/import_from_custom_link",t,t,{}).p("templates/partials/import_from_website_link",t,t,{}).nx(t.get(["handleOneFileUpload"],!1),t,{block:w},{}).w('<div id="importVideoFormContainer" class="hide"></div></div><div class="import-footer text-right clearfix"><div class="powered-by pull-left hide" id="footerPoweredBy"><span class="powered-by-label"> Powered by </span><img src="/svg/flickr-logo.svg" alt="Flickr" /><img src="/img/pexels-logo.png" alt="Pexels" /></div><div class="pull-left foot-note" id="footnote">').x(t.get(["handleOneFileUpload"],!1),t,{block:E},{}).w("<div>").h("eq",t,{else:T,block:C},{key:t.get(["type"],!1),value:"doc"},"h").w('</div></div><div class="pull-right"><button class="button wiz-secondary-btn wiz-new-secondary-btn radius" id="cancelImport"> ').f(t.get(["cancel"],!1),t,"h").w(' </button><button class="button wiz-primary-btn" id="import" disabled>').h("eq",t,{block:k},{key:t.get(["type"],!1),value:"video"},"h").h("eq",t,{block:x},{key:t.get(["type"],!1),value:"doc"},"h").w(" ").h("ne",t,{block:A},{key:t.get(["type"],!1),value:"video"},"h").w('</button><button class="button wiz-secondary-btn wiz-new-secondary-btn radius hide" id="cancelVideoForm"> ').f(t.get(["changeFile"],!1),t,"h").w(' </button><button class="button wiz-primary-btn hide" id="submitVideoForm"> ').f(t.get(["import"],!1),t,"h").w(" </button></div></div></div></div></div>")}function i(e,t){return e.w(" ").f(t.get(["title"],!1),t,"h").w(" ")}function n(e,t){return e.w(" ").f(t.get(["importDocument"],!1),t,"h").w(" ")}function r(e,t){return e.x(t.get(["canShowVideoLibraryMulti"],!1),t,{block:o},{})}function o(e,t){return e.w('<div class="tab" id="importVideoLibraryTabMulti" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibraryMulti"],!1),t,"h").w(" </div>")}function a(e,t){return e.w('<div class="tab active" id="importLocalTab" data-panel-id="importFromLocal"> ').f(t.get(["importFromLocal"],!1),t,"h").w(" </div>")}function s(e,t){return e.w('<div class="tab" id="importVideoLibrarylTab" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibrary"],!1),t,"h").w(" </div>")}function l(e,t){return e.w('<div class="tab" id="recentlyUsedTab" data-panel-id="importRecentlyUsed"> ').f(t.get(["recentlyUsed"],!1),t,"h").w(" </div>")}function u(e,t){return e.x(t.get(["canShowVideoLibraryMulti"],!1),t,{block:c},{})}function c(e,t){return e.w('<div class="tab" id="importVideoLibraryTabMulti" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibraryMulti"],!1),t,"h").w(" </div>")}function d(e,t){return e.w('<div class="tab" id="importLibraryTab" data-panel-id="importFromLibrary"> ').f(t.get(["importFromLibrary"],!1),t,"h").w(" </div>")}function h(e,t){return e.w('<div class="tab" id="importDriveTab" data-panel-id="importFromDrive"> ').f(t.get(["importFromDrive"],!1),t,"h").w(" </div>")}function p(e,t){return e.w('<div class="tab" id="importImgLibTab" data-panel-id="importImageFromLibrary"> ').f(t.get(["importImageFromLib"],!1),t,"h").w(" </div>")}function f(e,t){return e.w('<div class="tab" id="importWebTab" data-panel-id="importFromWeb"> ').f(t.get(["searchFromWeb"],!1),t,"h").w(" </div>")}function g(e,t){return e.w('<div class="tab" id="importTestimonial" data-panel-id="importVideoLibraryl"> ').f(t.get(["importTestimonial"],!1),t,"h").w(" </div>")}function m(e,t){return e.w('<div class="tab" id="importShopifyTab" data-panel-id="importFromShopify"> ').f(t.get(["shopifyTitle"],!1),t,"h").w(" </div>")}function v(e,t){return e.w('<div class="tab" id="importViaLinkTab" data-panel-id="importFromLink"> ').f(t.get(["addViaLinkTitle"],!1),t,"h").w(" </div>")}function y(e,t){return e.w('<div class="additional-options-block"><a id="libraryRefresh" class="button wiz-border-button create-video-btn no-margin hide"><img class="reload-img" src="/svg/retake-orange.svg"></a><a id="createVideoFromImportBtn" class="button wiz-border-button create-video-btn no-margin" target="_blank" href="/video/record">').f(t.get(["createVideo"],!1),t,"h").w("</a></div>")}function b(e,t){return e.w('<div class="tab" id="importViaWebLink" data-panel-id="importFromWebLink"> ').f(t.get(["WebLinkTitle"],!1),t,"h").w(" </div>")}function w(e,t){return e.p("templates/partials/import_selected_drawer",t,t,{}).w('<div class="drawer-handle" id="openDrawHandle"><img src="/svg/arrow-inactive.svg" alt="Left" class="arrow-marker" /></div>')}function E(e,t){return e.w(" <span> ").f(t.get(["note"],!1),t,"h").w(": </span> ").h("eq",t,{else:_,block:S},{key:t.get(["type"],!1),value:"doc"},"h").w(" ")}function _(e,t){return e.w(" ").f(t.get(["importHelp"],!1),t,"h").w(" ")}function S(e,t){return e.w(" ").f(t.get(["importPDFOnly"],!1),t,"h").w("<b>").f(t.get(["videoLandingPages"],!1),t,"h").w("</b> ")}function T(e,t){return e.w(" ").f(t.get(["supports"],!1),t,"h").w(" ").f(t.get(["formatsList"],!1),t,"h").w(" ").f(t.get(["formatsWithMaxSize"],!1),t,"h").w(" ").f(t.get(["maxFileSize"],!1),t,"h").w(" MB")}function C(e,t){return e.f(t.get(["canBeUsedOnly"],!1),t,"h").w("<br>").f(t.get(["canBeUsedOnlyImage"],!1),t,"h")}function k(e,t){return e.f(t.get(["proceed"],!1),t,"h")}function x(e,t){return e.f(t.get(["proceed"],!1),t,"h")}function A(e,t){return e.h("ne",t,{block:P},{key:t.get(["type"],!1),value:"doc"},"h")}function P(e,t){return e.f(t.get(["import"],!1),t,"h")}e.register("templates/component/import_media",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/import_media",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-body-container import-video-form" id="importVideoForm"><div class="import-web-content image-gallery main-gallery custom-scroll"><form name="importVideoDetails" id="importVideoDetails"><div class="row"><div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').x(t.get(["isMultipleImageImport"],!1),t,{else:i,block:n},{}).w(' </label><div class="small-8 pull-left image-gallery"><div class="image pull-left import-video-form-preview">').x(t.get(["thumbnail_url"],!1),t,{else:r,block:d},{}).w('</div><div class="pull-left desc-container"><label class="import-file-name"> ').x(t.get(["isMultipleImageImport"],!1),t,{else:h,block:p},{}).w("</label>").x(t.get(["isMultipleImageImport"],!1),t,{else:f,block:m},{}).w("</div></div></div>").x(t.get(["askVideoDetails"],!1),t,{block:v},{}).w('</div></form><div id="videoImportStatusLoading" class="hide"></div></div></div>')}function i(e,t){return e.w(" ").f(t.get(["selectedFile"],!1),t,"h").w(" ")}function n(e,t){return e.w(" ").f(t.get(["selectedFiles"],!1),t,"h").w(" ")}function r(e,t){return e.x(t.get(["isImagePreview"],!1),t,{else:o,block:c},{})}function o(e,t){return e.x(t.get(["isAudioPreview"],!1),t,{else:a,block:u},{})}function a(e,t){return e.x(t.get(["isVideoPreview"],!1),t,{else:s,block:l},{})}function s(e,t){return e.w('<img src="/img/film-hippo.png" alt="Video Thumbnail" class="gallery-view" />')}function l(e,t){return e.w('<video autoplay muted play><source src="').f(t.get(["preview_url"],!1),t,"h").w('" type="').f(t.get(["type"],!1),t,"h").w('"></video>')}function u(e,t){return e.w('<audio controls><source src="').f(t.get(["preview_url"],!1),t,"h").w('" type="').f(t.get(["type"],!1),t,"h").w('"></audio>')}function c(e,t){return e.w('<img src="').f(t.get(["preview_url"],!1),t,"h").w('" alt="Video Thumbnail" class="gallery-view" />')}function d(e,t){return e.w('<img src="').f(t.get(["thumbnail_url"],!1),t,"h").w('" alt="Video Thumbnail" class="gallery-view" />')}function h(e,t){return e.w(" ").f(t.get(["name"],!1),t,"h").w(" ")}function p(e,t){return e.w(" ").f(t.get(["totalFileNamesText"],!1),t,"h").w(" ")}function f(e,t){return e.x(t.get(["sizeFormatted"],!1),t,{block:g},{})}function g(e,t){return e.w('<label class="import-file-size"> ').f(t.get(["sizeFormatted"],!1),t,"h").w(" </label>")}function m(e,t){return e.w('<label class="import-file-size"> ').f(t.get(["totalFileCount"],!1),t,"h").w(" files </label>")}function v(e,t){return e.nx(t.get(["isMultipleImageImport"],!1),t,{block:y},{}).x(t.get(["isCategoryAvailable"],!1),t,{block:E},{}).w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["addTags"],!1),t,"h").w(' </label><div class="small-8 pull-left"><div id="importVideoTags"></div></div></div>').nx(t.get(["isMultipleImageImport"],!1),t,{block:T},{})}function y(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left required-mark"> ').x(t.get(["isVideo"],!1),t,{else:b,block:w},{}).w(' </label><div class="small-8 pull-left"><input type="text" name="importVideoTitle" id="importVideoTitle" value="').f(t.get(["name"],!1),t,"h").w('"/></div></div>')}function b(e,t){return e.w(" ").f(t.get(["docTitle"],!1),t,"h").w(" ")}function w(e,t){return e.w(" ").f(t.get(["videoTitle"],!1),t,"h").w(" ")}function E(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["addToCategory"],!1),t,"h").w(' </label><div class="small-8 pull-left"><select name="categories" multiple="multiple" id="importVideoCategories">').s(t.get(["categories"],!1),t,{block:_},{}).w("</select></div></div>")}function _(e,t){return e.w('<option value="').f(t.get(["id"],!1),t,"h").w('"').x(t.get(["is_default_category"],!1),t,{block:S},{}).w("> ").f(t.get(["name"],!1),t,"h").w(" </option>")}function S(e,t){return e.w(" selected")}function T(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["description"],!1),t,"h").w(' </label><div class="small-8 pull-left"><textarea rows="5" name="importVideoDesc" id="importVideoDesc" placeholder="Add Description"></textarea></div></div>').x(t.get(["showPreserveTransparency"],!1),t,{block:C},{})}function C(e,t){return e.w('<div class="small-12 clearfix" id="preserveTransparencyContainer"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["preserveTransparency"],!1),t,"h").w(' </label><div class="small-8 pull-left"><input class="wiz-checkbox-blue" type="checkbox" id="preserveTransparency"><label class="" for="preserveTransparency"></label></div></div>')}e.register("templates/partials/import_video_form",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_video_form",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="simple-edit-container hide ').x(t.get(["integrationType"],!1),t,{block:i},{}).w('"><div class="simple-edit-controls"><div class="se-control-detail default-control-detail clearfix hide"><span class="info-text"></span></div>').h("ne",t,{block:n},{key:t.get(["trim"],!1),value:"false"},"h").h("ne",t,{block:o},{key:t.get(["crop"],!1),value:"false"},"h").h("ne",t,{block:a},{key:t.get(["image"],!1),value:"false"},"h").h("ne",t,{block:h},{key:t.get(["text"],!1),value:"false"},"h").h("ne",t,{block:v},{key:t.get(["stickers"],!1),value:"false"},"h").h("ne",t,{block:y},{key:t.get(["callout"],!1),value:"false"},"h").h("ne",t,{block:S},{key:t.get(["blur"],!1),value:"false"},"h").h("ne",t,{block:T},{key:t.get(["resize"],!1),value:"false"},"h").w('<div class="simple-edit-buttons-box ').x(t.get(["integrationType"],!1),t,{block:C},{}).w('">').h("ne",t,{block:k},{key:t.get(["trim"],!1),value:"false"},"h").h("ne",t,{block:A},{key:t.get(["crop"],!1),value:"false"},"h").nx(t.get(["fromQuickRecord"],!1),t,{block:I},{}).h("ne",t,{block:N},{key:t.get(["stickers"],!1),value:"false"},"h").h("ne",t,{block:M},{key:t.get(["callouts"],!1),value:"false"},"h").h("ne",t,{block:U},{key:t.get(["blur"],!1),value:"false"},"h").h("ne",t,{block:V},{key:t.get(["resize"],!1),value:"false"},"h").w('</div></div></div><div class="modal-backdrop image-upload-progress-container" id="imageUploadProgessContainer"><div class="text-center loading-container"><div class="progress-text" id="imageUploadProgressText"> </div></div></div>')}function i(e,t){return e.f(t.get(["integrationType"],!1),t,"h").w("-simple-edit")}function n(e,t){return e.w('<div class="se-control-detail clearfix trim-control-detail hide"><img class="ruler ruler-static" src="/img/ruler-two.png"><canvas class="ruler ruler-dynamic hide" width="1000" height="15"></canvas><input type="text" class="sliderValue" style="display:none" data-index="0" value="0" /><input type="text" class="sliderValue" style="display:none" data-index="1" value="0" /><div class="trim-slider" id="trimSlider"></div>').h("ne",t,{block:r},{key:t.get(["shouldHideTrimTimer"],!1),value:"true"},"h").w('<div class="trim-preview-container"><video class="trim-preview-video"></video></div><div class="preview-trim-arrow"></div></div>')}function r(e,t){return e.w('<div class="trim-before-container"><div class="trim-before-time-element"><div class="arrow right-arrow"></div><span class="trim-before-time"></span></div><div class="trim-before-pop"><span>').f(t.getPath(!1,["simpleEdit","trimStartTime"]),t,"h").w('</span><input type="text" class="trim-before-input"><div class="before-trim-div"><div class="arrow up-arrow trim-input-btn trim-input-btn-plus"></div><div class="arrow down-arrow trim-input-btn trim-input-btn-minus"></div></div><div class="trim-arrow"></div></div></div><div class="trim-after-container"><div class="trim-after-time-element"><div class="arrow left-arrow"></div><span class="trim-after-time"></span></div><div class="trim-after-pop"><span>').f(t.getPath(!1,["simpleEdit","trimEndTime"]),t,"h").w('</span><input type="text" class="trim-after-input"><div class="after-trim-div"><div class="arrow up-arrow trim-input-btn trim-input-btn-plus"></div><div class="arrow down-arrow trim-input-btn trim-input-btn-minus"></div></div><div class="trim-arrow"></div></div></div>')}function o(e,t){return e.w('<div class="se-control-detail clearfix crop-control-detail hide"><div class="pull-left reposition-webcam-container"><input type="checkbox" class="reposition-webcam wiz-checkbox-blue" id="move" checked /><label for="move">').f(t.getPath(!1,["simpleEdit","moveWebcam"]),t,"h").w('</label></div><div class="pull-right text-right"><a class="apply-crop apply-btn" id="cropApplyBtn">').f(t.getPath(!1,["simpleEdit","apply"]),t,"h").w('</a><a class="reset-crop reset-btn" id="cropResetBtn">').f(t.getPath(!1,["simpleEdit","reset"]),t,"h").w("</a></div></div>")}function a(e,t){return e.x(t.get(["isAddImageEnabled"],!1),t,{block:s},{})}function s(e,t){return e.w('<div class="se-control-detail clearfix addimage-control-detail hide">').nx(t.get(["fromQuickRecord"],!1),t,{else:l,block:c},{}).w('<div class="addimage-selected hide"><div class="left"><input type="checkbox" class="wiz-checkbox-blue" id="imageArLock" checked /><label for="imageArLock" class="image-ar-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="left opacity-container"><span class="left">').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span><input class="left slider" type="range" min="0" max="100" id="imageOpacitySlider"><input class="left slider-ip" type="number" min="0" max="100" value="100" id="imageOpacityInput"></div><div class="right delete-btn-container"><div id="deleteImage" class="delete-btn">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</div></div></div></div>")}function l(e,t){return e.w('\x3c!-- new quick record flow personalization --\x3e<div class="addimage-initial cpv-personalization hide"><div class="add-image-action left add-text hide">\t<img src="/svg/plus-ico-blue.svg"/><span id="addTextLink">\t').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w('\t</span>\t</div><div class="add-image-action left" id="addImageBtn"><img src="/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addImage"]),t,"h").w("</span></div>").x(t.get(["canShowPersonalization"],!1),t,{block:u},{}).w("</div>\x3c!-- end of new quick record flow personalization --\x3e")}function u(e,t){return e.w('<div class="add-image-action left" id="addPersonalizedImageBtn"><img src="/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addPersonalizedImage"]),t,"h").w('</span></div><div class="add-image-action left" id="addWebsiteImageBtn"><img src="/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addWebsiteImage"]),t,"h").w("</span></div>")}function c(e,t){return e.w('<div class="addimage-initial hide"><div class="add-image-action left add-text hide">\t<span id="addTextLink">\t').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w('\t</span>\t</div><div class="add-image-action left" id="addImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addImage"]),t,"h").w("</span></div>").x(t.get(["canShowPersonalization"],!1),t,{block:d},{}).w("</div>")}function d(e,t){return e.w('<div class="add-image-action left" id="addPersonalizedImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addPersonalizedImage"]),t,"h").w('</span></div><div class="left add-image-tooltip"><img src="/img/help.png"><div class="add-image-tooltip-content">').f(t.getPath(!1,["simpleEdit","addImageInfo"]),t,"h").w('<a href="https://help.hippovideo.io/support/solutions/articles/19000100178-image-personalization" target="_blank">').f(t.getPath(!1,["simpleEdit","learnMore"]),t,"h").w('</a></div></div><div class="add-image-action left" id="addWebsiteImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addWebsiteImage"]),t,"h").w('</span></div><div class="left add-image-tooltip"><img src="/img/help.png"><div class="add-image-tooltip-content">').f(t.getPath(!1,["simpleEdit","addWebsiteImageInfo"]),t,"h").w('<a href="https://help.hippovideo.io/support/solutions/articles/19000100178-image-personalization" target="_blank">').f(t.getPath(!1,["simpleEdit","learnMore"]),t,"h").w("</a></div></div>")}function h(e,t){return e.w('<div class="se-control-detail clearfix addtext-control-detail hide"><div class="addtext-container"><div id="textPropertiesTab" style="display:none" class="sdk-top-wrap"><div class="sdk-text-wrap"><div class="padding-face se-font mf-custom-selector"><select class="se-text-properties se-font-selector"></select></div><div class="padding-face se-fontsize mf-custom-selector"><select class="se-text-properties se-fontsize-selector"><option value="15">15px</option><option value="17">17px</option><option value="20">20px</option><option value="25">25px</option><option value="35">35px</option><option value="40" selected>40px</option><option value="50">50px</option><option value="60">60px</option><option value="70">70px</option><option value="90">90px</option><option value="110">110px</option></select></div><div class="padding-face"><select class="se-text-properties se-textalign-selector"><option value="left">').f(t.getPath(!1,["simpleEdit","left"]),t,"h").w('</option><option value="center" selected>').f(t.getPath(!1,["simpleEdit","center"]),t,"h").w('</option><option value="right">').f(t.getPath(!1,["simpleEdit","right"]),t,"h").w('</option></select></div></div><div class="sdk-textstyle-wrap"><div class="se-bold-face"><input type="checkbox" id="c1" class="se-text-properties se-bold-toggle chk-btn" /><label for=\'c1\'><b>B</b></label></div><div class="italic-face"><input type="checkbox" id="c2" class="se-text-properties se-italic-toggle chk-btn" /><label for=\'c2\'><i>I</i></label></div><div class=""><div class="padding-face color-picker"><input type = "color" class="se-text-properties se-color-choose se-color-selector"/></div></div></div></div><div class="padding-face"><div class="mf-custom-selector mf-custom-selector-button merge-field-container">').x(t.get(["canShowPersonalization"],!1),t,{block:p},{}).w('</div><div class="padding-face se-add-text-btn text-right"><a class="add-text" id="addTextLink"><img src="').h("eq",t,{else:g,block:m},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('" alt="plus" />').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w("</a></div></div></div></div>")}function p(e,t){return e.w('<div class="mf-selector"><select id="seMfSelector"><option selected>').f(t.getPath(!1,["simpleEdit","mergeFields"]),t,"h").w("</option>").s(t.get(["mfValues"],!1),t,{block:f},{}).w('</select></div><div class="text-right mf-label"><label><div><span class="mf-info-tooltip">').f(t.getPath(!1,["simpleEdit","mfInfoTooltip"]),t,"h").w('</span><img src="/svg/help1.svg" /></div></label></div>')}function f(e,t){return e.w("<option>").f(t.get(["mf"],!1),t,"h").w("</option>")}function g(e,t){return e.w("/img/small-plus.png")}function m(e,t){return e.w("/img/small-plus-4a90e2.png")}function v(e,t){return e.w('<div class="se-control-detail clearfix addsticker-control-detail hide"><div class="addsticker-initial hide"><div class="sticker-btn-container clearfix"></div></div><div class="addsticker-selected hide"><div class=""><input type="checkbox" class="lock-aspect-ratio sticker-control wiz-checkbox-blue" id="sticker-lock" checked /><label for="sticker-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class=""><div class="text-right"><span>').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span></div><div class=""><select class="opacity-val sticker-control"><option value="0">0</option><option value="25">25</option><option value="50">50</option><option value="75">75</option><option value="100">100</option></select></div></div><div class="text-right"><a class="delete-sticker delete-label" id="deleteSticker">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function y(e,t){return e.w('<div class="se-control-detail clearfix addcallout-control-detail hide"><div class="addcallout-initial clearfix hide"><img class="callout-scroll-left pull-left" src="').h("eq",t,{else:b,block:w},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('"><div class="callout-btn-scroll-container pull-left"><div class="callout-btn-container"></div></div><img class="callout-scroll-right pull-right" src="').h("eq",t,{else:E,block:_},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('"><div class="callout-scroll-hide-layer"></div></div><div class="addcallout-selected hide"><div class=""><input type="checkbox" class="lock-aspect-ratio callout-control wiz-checkbox-blue" id="callout-lock" checked /><label for="callout-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class=""><div class=""><span>').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span></div><div class=""><select class="opacity-val callout-control"><option value="0">0</option><option value="25">25</option><option value="50">50</option><option value="75">75</option><option value="100" selected>100</option></select></div></div><div class=""><div class=""><span>').f(t.getPath(!1,["simpleEdit","color"]),t,"h").w('</span></div><div class=""><select class="callout-control callout-variation"><option value="0">').f(t.getPath(!1,["simpleEdit","default"]),t,"h").w('</option><option value="1">').f(t.getPath(!1,["simpleEdit","yellow"]),t,"h").w('</option><option value="2">').f(t.getPath(!1,["simpleEdit","orange"]),t,"h").w('</option><option value="3">').f(t.getPath(!1,["simpleEdit","green"]),t,"h").w('</option><option value="4">').f(t.getPath(!1,["simpleEdit","violet"]),t,"h").w('</option><option value="5">').f(t.getPath(!1,["simpleEdit","blue"]),t,"h").w('</option><option value="6">').f(t.getPath(!1,["simpleEdit","dark"]),t,"h").w('</option><option value="7">').f(t.getPath(!1,["simpleEdit","white"]),t,"h").w('</option></select></div></div><div class="text-right"><a class="delete-callout delete-label" id="deleteCallout">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function b(e,t){return e.w("/img/sli-aro-left.png")}function w(e,t){return e.w("/img/sli-aro-left-4a90e2.png")}function E(e,t){return e.w("/img/sli-aro-right.png")}function _(e,t){return e.w("/img/sli-aro-right-4a90e2.png")}function S(e,t){return e.w('<div class="se-control-detail clearfix blur-control-detail text-left hide"><div class="blur-initial hide" id="blurInitial">').f(t.getPath(!1,["simpleEdit","blurDescription"]),t,"h").w('<div class="outline-btn pull-right" id="applyBlur"> ').f(t.getPath(!1,["simpleEdit","addNewBlur"]),t,"h").w(' </div></div><div class="blur-selected clearfix hide" id="blurSelected"><div class="pull-left"><input type="checkbox" class="lock-aspect-ratio blur-control wiz-checkbox-blue" id="blurLock" /><label for="blurLock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="pull-left content-box"><div class="props-label pull-left"><span> ').f(t.getPath(!1,["simpleEdit","strength"]),t,"h").w(' </span></div><div class="pull-left"><div class="blur-control" id="blurStrength"></div></div><div class="pull-left"><input type="number" step="1" min="0" max="100" value="25" id="blurStrengthText" /></div></div><div class="pull-right text-right content-box"><a class="delete-blur delete-label" id="deleteblur">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function T(e,t){return e.w('<div class="se-resize-control-detail hide"><div class="se-control-detail clearfix primaryvid-control-detail hide"><input type="checkbox" class="lock-aspect-ratio primary-vid-control wiz-checkbox-blue" id="lock-three" checked /><label for="lock-three" class="cursor-pointer" >').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="se-control-detail clearfix secondaryvid-control-detail hide"><input type="checkbox" class="lock-aspect-ratio secondary-vid-control wiz-checkbox-blue" id="lock-four" checked /><label for="lock-four">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w("</label></div></div>")}function C(e,t){return e.f(t.get(["integrationType"],!1),t,"h").w("-se-icon-sprite")}function k(e,t){return e.w('<div class="wiz-simple-edit-btn trim-btn ').x(t.get(["isHideTrim"],!1),t,{block:x},{}).w('" id="trimBtn" tooltip="').f(t.getPath(!1,["simpleEdit","trim"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-trim"></span></div>')}function x(e,t){return e.w(" disp-none ")}function A(e,t){return e.w('<div class="wiz-simple-edit-btn crop-btn ').x(t.get(["isHideCorp"],!1),t,{block:P},{}).w('" id="cropBtn" tooltip="').f(t.getPath(!1,["simpleEdit","crop"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-crop"></span></div>')}function P(e,t){return e.w(" disp-none ")}function I(e,t){return e.h("ne",t,{block:R},{key:t.get(["text"],!1),value:"false"},"h").x(t.get(["isAddImageEnabled"],!1),t,{block:D},{})}function R(e,t){return e.w('<div class="wiz-simple-edit-btn add-text-btn" id="addTextBtn" tooltip="').f(t.getPath(!1,["simpleEdit","text"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-text"></span></div>')}function D(e,t){return e.h("ne",t,{block:O},{key:t.get(["image"],!1),value:"false"},"h")}function O(e,t){return e.w('<div class="wiz-simple-edit-btn add-image-btn" id="addImageMenuBtn" tooltip="').f(t.getPath(!1,["simpleEdit","image"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-image-personalisation"></span></div>')}function N(e,t){return e.w('<div class="wiz-simple-edit-btn add-stickers-btn ').x(t.get(["isHideStickers"],!1),t,{block:L},{}).w('" id="addStickersBtn" tooltip="').f(t.getPath(!1,["simpleEdit","emoji"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-sticker"></span></div>')}function L(e,t){return e.w(" disp-none ")}function M(e,t){return e.w('<div class="wiz-simple-edit-btn add-callouts-btn ').x(t.get(["isHideCallouts"],!1),t,{block:F},{}).w('" id="addCalloutsBtn" tooltip="').f(t.getPath(!1,["simpleEdit","callout"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-callout"></span></div>')}function F(e,t){return e.w(" disp-none ")}function U(e,t){return e.w('<div class="wiz-simple-edit-btn add-blur-btn ').x(t.get(["isHideBlur"],!1),t,{block:B},{}).w('" id="blurBtn" tooltip="').f(t.getPath(!1,["simpleEdit","blur"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-blur"></span></div>')}function B(e,t){return e.w(" disp-none ")}function V(e,t){return e.w('<div class="wiz-simple-edit-btn resize-draggable-btn ').x(t.get(["isResizableNotAllowed"],!1),t,{block:z},{}).w('" id="resizeDragBtn" tooltip="').f(t.getPath(!1,["simpleEdit","resize"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-resize"></span></div>')}function z(e,t){return e.w(" disp-none ")}e.register("templates/simple_edit/sdk_controls",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0,I.__dustBody=!0,R.__dustBody=!0,D.__dustBody=!0,O.__dustBody=!0,N.__dustBody=!0,L.__dustBody=!0,M.__dustBody=!0,F.__dustBody=!0,U.__dustBody=!0,B.__dustBody=!0,V.__dustBody=!0,z.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/simple_edit/sdk_controls",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";i.d(t,"a",(function(){return u}));var n,r=i(1),o=i.n(r),a=i(4),s=i.n(a),l=i(3),u=l.c.div(n||(n=s()(["\n margin-top: ",";\n margin-left: auto;\n margin-right: auto;\n\n /* Because the css of image-upload-progress-container is not defined properly and you will need to import entire wiz-delivery.scss file for this to work */\n .image-upload-progress-container {\n display: none;\n }\n"])),function(e){var t=e.showSimpleEditor;return o()(this,void 0),t?"0":"38px"}.bind(void 0))},function(e,t,i){"use strict";i.d(t,"a",(function(){return x}));var n,r,o=i(1),a=i.n(o),s=i(0),l=i.n(s),u=i(57),c=i.n(u),d=i(3),h=i(4),p=i.n(h),f=d.c.div(n||(n=p()(["\n .progress-widget-header {\n position: relative;\n display: flex;\n align-items: center;\n width: 80%;\n border-bottom: 1px solid #E6E6E6;\n margin: 0 auto;\n &-progress-warpper {\n position: relative;\n }\n &-status-text {\n color: #000000;\n font: normal normal 600 14px/19px Open Sans;\n }\n &-percent-text {\n font: normal normal 600 14px/19px Open Sans;\n color: #000000;\n position: absolute;\n right: 0;\n }\n img {\n position: absolute;\n top: 11px;\n left: 10px;\n }\n }\n .progress-widget-content {\n width: 80%;\n margin: 0 auto;\n padding: 10px 10px;\n font: normal normal normal 12px/17px Open Sans;\n color: #6F6F6F;\n }\n"]))),g=d.c.div(r||(r=p()(["\n svg {\n width: 30px;\n height: 28px;\n .bg {\n fill: none;\n stroke-width: 2px;\n stroke: #E6E6E6;\n }\n .progress {\n fill: none;\n stroke-width: 2px;\n stroke: #F47A58;\n stroke-linecap: round;\n stroke-dasharray: 62.36;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n stroke-dashoffset: ",";\n transition: stroke-dashoffset 1s ease-in;\n }\n }\n"])),function(e){return a()(this,void 0),isNaN(e.progress)?"62":e.progress}.bind(void 0));function m(e){var t=this,i=e.progressPercent,n=void 0===i?0:i,r=Object(s.useMemo)(function(){return a()(this,t),62-n/100*62}.bind(this),[n]);return l.a.createElement(g,{progress:r},l.a.createElement("svg",null,l.a.createElement("circle",{className:"bg",cx:"15",cy:"15",r:"10"}),l.a.createElement("circle",{className:"progress two",cx:"15",cy:"15",r:"10"})))}var v,y=i(13),b={completedPercent:0,type:"upload"};function w(e){var t=this,i=e.recorder,n=e.onUploadComplete,r=e.onUploadError,o=Object(s.useState)(b),u=o[0],c=o[1],d=Object(s.useRef)(),h=Object(y.a)(u);return Object(s.useEffect)(function(){var e=this;a()(this,t),console.log("progressFetchInterval.current ",d.current),d.current||(d.current=setInterval(function(){var t=this;a()(this,e);try{i.getUploadDetails().then(function(e){return a()(this,t),e&&e.completed?(n&&n(),clearInterval(d.current),void(d.current=null)):e&&e.error?(clearInterval(d.current),d.current=null,void r(e.errorType)):void c(e)}.bind(this)).catch(function(e){a()(this,t),console.error("UPLOAD STATUS FETCH ERROR ",e),clearInterval(d.current),d.current=null}.bind(this))}catch(e){console.error("UPLOAD PROGRESS EX ",e),clearInterval(d.current),d.current=null}}.bind(this),1e3),function(){a()(this,e),clearInterval(d.current),d.current=null}.bind(this))}.bind(this)),l.a.createElement(f,null,l.a.createElement("div",{className:"progress-widget-header"},l.a.createElement("div",{className:"progress-widget-header-progress-warpper"},l.a.createElement(m,{progressPercent:u.completedPercent}),l.a.createElement("img",{src:Object(y.d)("/svg/rapi/webcam-icon.svg")})),l.a.createElement("div",{className:"progress-widget-header-status-text"},"Uploading video"),l.a.createElement("div",{className:"progress-widget-header-percent-text"},u.completedPercent,"%")),l.a.createElement("div",{className:"progress-widget-content"},l.a.createElement("div",null,h)))}var E,_=d.c.div(v||(v=p()(["\n margin: 0 auto;\n width: 90%;\n .hv-upload-error-screen-header {\n display: flex;\n align-items: center;\n padding-bottom: 10px;\n padding-top: 20px;\n border-bottom: 1px solid #e6e6e6;\n img {\n margin-right: 5px;\n }\n div {\n font: normal normal 600 14px/19px Open Sans;\n }\n }\n\n .hv-upload-error-screen-content {\n &-text {\n font: normal normal normal 12px/17px Open Sans;\n color: #212121;\n padding-top: 10px;\n }\n &-options-wrapper {\n text-align: center;\n padding: 20px 0px;\n }\n }\n"]))),S=i(16);function T(e){var t=this,i=e.downloadSources,n=e.onRetryUpload,r=function(){a()(this,t);var e=[];if(i)for(var n in i){var r=i[n];e.push({link:r,linkType:"download",downloadName:"Testing the name",linkName:"Download ".concat(n," source")})}return e}.bind(this);return l.a.createElement(_,null,l.a.createElement("div",{className:"hv-upload-error-screen-header"},l.a.createElement("img",{src:Object(y.d)("/svg/rapi/error-circle-red.svg")}),l.a.createElement("div",null,"Upload Failed")),l.a.createElement("div",{className:"hv-upload-error-screen-content"},l.a.createElement("div",null,l.a.createElement("div",{className:"hv-upload-error-screen-content-text"},"Your video upload has failed! Below are the few options you can try."),l.a.createElement("div",{className:"hv-upload-error-screen-content-options-wrapper"},l.a.createElement(S.d,{style:{marginRight:"10px"},icon:Object(y.d)("/svg/rapi/download-icon.svg"),text:"Download Video",options:r(),type:S.b.TRANSPARENT,buttonFeature:S.a.DROPDOWN,dropdownPosition:S.c.TOP}),l.a.createElement(S.d,{text:"Retry Upload",onClickHandler:n})))))}var C=d.c.div(E||(E=p()(["\n max-width: 400px;\n min-width: 300px;\n border: 1px solid #E6E6E6;\n background-color: #ffffff;\n box-shadow: 0px 8px 12px #0000001A;\n border-radius: 8px;\n"])));function k(e){var t=this,i=e.recorder,n=e.onUploadComplete,r=Object(s.useState)(!1),o=r[0],u=r[1],c=Object(s.useRef)(),d=function(e){a()(this,t),console.log("SETTING UPLOAD ERROR >>> ",e),c.current=i.getRecordingObjectUrls(),console.log("SETTING UPLOAD ERROR >>> ",c.current),u(e)}.bind(this),h=function(){a()(this,t),i.retryUpload(),u(!1)}.bind(this);return l.a.createElement(C,null,o?l.a.createElement(T,{downloadSources:c.current,onRetryUpload:h}):l.a.createElement(w,{recorder:i,onUploadComplete:n,onUploadError:d}))}function x(e,t){var i=P();c.a.render(l.a.createElement(d.a,{theme:t},l.a.createElement(k,{recorder:e,onUploadComplete:A})),i)}var A=function(){a()(this,void 0),c.a.unmountComponentAtNode(document.getElementsByClassName("hv-upload-progress-widget")[0])}.bind(void 0),P=function(){if(a()(this,void 0),document.getElementsByClassName("hv-upload-progress-widget").length>0)return document.getElementsByClassName("hv-upload-progress-widget")[0];var e=document.createElement("div");return e.className="hv-upload-progress-widget",e.style="position: fixed;bottom: 20px;right: 20px;",document.body.appendChild(e),e}.bind(void 0)},function(e,t,i){"use strict";i.d(t,"a",(function(){return m}));var n,r=i(1),o=i.n(r),a=i(0),s=i.n(a),l=i(57),u=i.n(l),c=i(192),d=i(193),h=i(4),p=i.n(h),f=i(3).c.div(n||(n=p()(["\n position: fixed;\n width: 320px;\n bottom: 0;\n left: 5px;\n z-index: 100;\n"])));function g(e){var t=e.stream,i=Object(a.useRef)(),n=Object(a.useRef)();return window.videoPreviewRef=i,window.lightingCanvasRef=n,s.a.createElement(f,null,s.a.createElement(c.a,{stream:t,ref:i}),t&&s.a.createElement(d.a,{ref:n}))}function m(e){var t=v();console.log("ROOT ELEMENT ",t),u.a.render(s.a.createElement(g,{stream:e}),t)}var v=function(){if(o()(this,void 0),document.getElementsByClassName("hv-rapi-webcam-preview").length>0)return document.getElementsByClassName("hv-rapi-webcam-preview")[0];var e=document.createElement("div");return e.className="hv-rapi-webcam-preview",document.body.appendChild(e),e}.bind(void 0)},function(e,t,i){"use strict";i.r(t),function(e){i.d(t,"removeWidget",(function(){return M})),i.d(t,"initialize",(function(){return F})),i.d(t,"availableRecordingSupport",(function(){return B})),i.d(t,"RecorderWidget",(function(){return z})),i.d(t,"ImportWidget",(function(){return H}));i(74);var n=i(49),r=i.n(n),o=i(53),a=i.n(o),s=i(41),l=i.n(s),u=i(36),c=i.n(u),d=i(37),h=i.n(d),p=i(359),f=i.n(p),g=i(1),m=i.n(g),v=i(249),y=i.n(v),b=(i(67),i(51),i(105),i(220),i(24),i(60),i(0)),w=i.n(b),E=i(57),_=i.n(E),S=i(26),T=i(5),C=i(187),k=i(206),x=i(400),A=i(399);function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=l()(e);if(t){var r=l()(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return a()(this,i)}}var I,R=["record_initiated","record_started","record_details","record_paused","record_resumed","record_stopped","record_aborted","record_error","video_cancelled","video_submitted","import_progress","import_complete","import_failed","source_uploaded"],D=!1,O={},N={screen:"screenRecord",webcam:"webCam",system_audio:"systemAudio",tab_recording:"tabRecording",separate_layer:"separateLayer",from_popup:"fromPopup",aspect_ratio:"aspectRatio",record_config:"recordConfig"};function L(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="";window&&window.performance&&(t="".concat(Math.round(window.performance.now())));for(var i=e.length,n=0;n<10;n++)t+=e.charAt(Math.floor(Math.random()*i));return t}var M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.getElementById("recorder1");m()(this,void 0);try{_.a.unmountComponentAtNode(e)}catch(e){}}.bind(void 0);function F(e,t){return U.apply(this,arguments)}function U(){return(U=f()(y.a.mark((function e(t,i){var n,r,o,a,s,l,u,c,d,h,p,f,g,m;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return i&&i(null,{error:"INVALID_CONFIGURATION",message:"The configuration passed is invalid"}),e.abrupt("return");case 3:if(n=t.token,r=t.token_type,o=void 0===r?T.e.RECORDER_SDK_TOKEN:r,a=t.environment,s=t.integration_type,l=void 0===s?"generic_recorder":s,n){e.next=7;break}return i&&i(null,{error:"TOKEN_NOT_FOUND",message:"The token was not passed in the method"}),e.abrupt("return");case 7:return u=new C.a({token:n,tokenType:o}),e.next=10,u.authenticateToken();case 10:if(c=e.sent,d=c[0],h=c[1],!d){e.next=25;break}if(p=d.data,f=p.user_id,console.log("SUCCESS ",d),!p.error){e.next=20;break}return i&&i(null,p),e.abrupt("return");case 20:g=L(),O[g]={token:n,userId:f,environment:a,initialized:!0,tokenType:o},K(l),Y(n),i&&i({key:g},null);case 25:if(!h){e.next=30;break}return console.log("ERROR ",h),m={error:"NETWORK_ERROR",message:"There was a network error. Please check network connection and try again"},i&&i(null,m),e.abrupt("return");case 30:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(){var e=Object(S.f)();return e.recording&&delete e.recording.system_audio,console.log("Recording capabilities ",e.recording,e.constraints),e}var V=function(){function t(e,i){var n=i.type,r=i.settings,o=void 0===r?{}:r,a=i.recorder_events;if(c()(this,t),!O.hasOwnProperty(e))throw new Error("INVALID_KEY");var s=o.extensionless,l=o.inline;if(this.eventCallbacks=[],this.recordingInProgress=!1,this.isRecorderOpen=l.open,this.recorderSettings=o,a&&this.eventCallbacks.push(a),O[e].initialized){var u,d,h;if(window.HippoVideo||(window.HippoVideo={}),this.eventListenerClass="hvr-evl-".concat((new Date).getTime()),this.recorderClassName="hv-recorder-".concat((new Date).getTime()),this.extensionless=s,!1!==l){var p=l.element_id,f=l.element;if(p&&(u=document.getElementById(p)),f&&(u=f),!u&&document.getElementsByTagName("hippo-video-recorder")[0]&&(u=document.getElementsByTagName("hippo-video-recorder")[0]),!u)return void $(this.eventCallbacks,"recorder_error",{error:"INLINE_ELEMENT_NOT_PROVIDED",message:'Parent element for adding recorder not found. Please pass the element id or element or set config "popup" as true.'})}else d="hvr-popup-".concat((new Date).getTime()),(h=document.createElement("div")).setAttribute("id",d),h.style.cssText="display:none;z-index: 100;position: absolute;width: 100%;height: 100%;top: 0;left: 0;justify-content: center;align-items: center;background: rgba(0,0,0,0.72);",document.body.appendChild(h),u=h,this.popupElement=u;this._cb=this._cb.bind(this),console.log("ELEMENT ",u,this.popupElementId),M(u),u.innerHTML="",_.a.render(w.a.createElement(k.b,{settings:o,userId:O[e].userId,type:n,token:O[e].token,recorderClassName:this.recorderClassName,eventListenerClass:this.eventListenerClass,eventCallback:this._cb}),u)}else $(this.eventCallbacks,"recorder_error",{error:"RECORDER_NOT_INITIALIZED",message:"Recorder not initialized. Please call initialize method first."})}return h()(t,[{key:"on",value:function(e){e&&this.eventCallbacks.push(e)}},{key:"getPageUrl",value:function(){console.log("PAGE URL IS ",window.location.href)}},{key:"_cb",value:function(t){if(console.log("EVENT CALLBACK ",t,this.eventListenerClass),R.includes(t.type)&&$(this.eventCallbacks,t.type,t.detail),t.type,"record_details"===t.type&&console.log("RECORDING DETAILS ",t.detail),"_record_started"===t.type){var i=t.detail||{};console.log("DDDDD ",i),this.recordingInProgress=!0,i.showWebcamPreview&&J(i.stream),i.showMarkupTools&&(n=this.recordingConfiguration,r=this.eventListenerClass,function(t,i){e('<div class="hv-focus-overlay" id="hvOverlayDiv" style="display: none;"> <div id="hvOverlayCircle"></div> </div>').appendTo("body"),e('<div id="hvHighLightDiv" class="hv-highlight-div" style="pointer-events: none">').appendTo("body"),e('<canvas id="hvCanvas" style="opacity:0.6;position: absolute;top: 0;height: 100%;left: 0;background-color: transparent;width: 100%;"></canvas>').appendTo("body"),function(t,i){e('<style>#hippo-overlay{\r\n\tposition: relative;\r\n\tz-index: 2555555;\r\n}\r\n#hvStop {\r\nmargin-bottom: 3px;\r\n}\r\n#hvPen{\r\nmargin-bottom: 2px;\r\n}\r\n#hvFocusArea{\r\nmargin-bottom: 2px;\r\n}\r\n#hvEraser {\r\nmargin-bottom: 2px;\r\n}\r\n#hvClearScreen{\r\nmargin-bottom: 5px;\r\n}\r\n#hippo-overlay-screenrecord{\r\n\tposition: fixed;\r\n\tleft: 0px;\r\n\tbottom: 0px;\r\n\tdisplay: none;\r\n\tborder: 0px solid gray;\r\n\tborder-radius: 5px !important;\r\n}\r\n#hippo-overlay-time {\r\n\tposition: fixed;\r\n\ttext-align: center;\r\n\ttop: 30%;\r\n\tleft:41.5%;\r\n\twidth: 250px;\r\n\theight:250px;\r\n\tborder-radius: 50%;\r\n\tdisplay: none;\r\n\tbackground-color: rgba(0, 0, 0, 0.5);\r\n\tborder:5px solid #f47a58;\r\n\tfont-family: \'Open Sans\';\r\n background-repeat: no-repeat;\r\n background-position: 50% 50%;\r\n\tbox-sizing: content-box;\r\n}\r\n#hippo-overlay-time span\r\n{\r\n\tfont-size: 3.750em !important;\r\n\tcolor: #f47a58 !important;\r\n\ttop: 85px;\r\n\tleft: 110px;\r\n\tposition: absolute;\r\n\tmargin-left:-11px;\r\n\tline-height: normal;\r\n}\r\n.hippo-embed-countdown {\r\n\tbackground-image: none !important;\r\n\tbackground-color: #fff !important;\r\n\tborder: 11px solid #000 !important;\r\n}\r\n.hippo-embed-countdown #countdown {\r\n\tposition: unset !important;\r\n\tmargin-left: 0 !important;\r\n\tdisplay: inline-block !important;\r\n\tmargin-left: 0 !important;\r\n\tfont-family: sans-serif !important;\r\n\tfont-weight: 600 !important;\r\n\tfont-size: 91px !important;\r\n\tmargin-top: 79px !important;\r\n\tcolor: #000 !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n}\r\n.hippo-video-countdown {\r\n\tbackground-image: none !important;\r\n\tbackground-color: #fff !important;}\r\n.hippo-video-countdown #countdown {\r\n\tposition: unset !important;\r\n\tmargin-left: 0 !important;\r\n\tdisplay: inline-block !important;\r\n\tmargin-left: 0 !important;\r\n\tfont-family: sans-serif !important;\r\n\tfont-weight: 600 !important;\r\n\tfont-size: 91px !important;\r\n\tmargin-top: 79px !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n}\r\n\r\n.hv-focus-overlay {\r\n top: 0;\r\n left: 0;\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n pointer-events: none;\r\n z-index: 10000;\r\n}\r\n\r\n#hvOverlayCircle:after {\r\n content: \'\';\r\n position: absolute;\r\n z-index: 10000000000000000;\r\n left: -75px;\r\n top: -75px;\r\n border-radius: 100%;\r\n width: 150px;\r\n height: 150px;\r\n box-shadow: 0px 0px 0px 3000px rgba(0, 0, 0, 0.39);\r\n pointer-events: none;\r\n}\r\n\r\n.hv-highlight-div{\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n z-index: 10000;\r\n}\r\n\r\n/*Highlight Featues Panel CSS*/\r\n.hv-act-comp-bottom-right {\r\n width: 333px; \r\n position: fixed;\r\n right: 30px;\r\n bottom: 0;\r\n -background-color: #424242;\r\n background-color: rgba(66, 66, 66, 0.8);\r\n max-height: 43px;\r\n -overflow: hidden;\r\n border: 0;\r\n border-radius: 5px 5px 0 0;\r\n cursor: default;\r\n z-index: 10000001;\r\n}\r\n\r\n.hv-act-comp-bottom-left {\r\n position: fixed;\r\n left: 30px;\r\n bottom: 0;\r\n -background-color: #424242;\r\n background-color: rgba(66, 66, 66, 0.8);\r\n max-height: 43px;\r\n -overflow: hidden;\r\n border: 0;\r\n border-radius: 5px 5px 0 0;\r\n cursor: default;\r\n z-index: 10000001;\r\n}\r\n\r\n.hv-highlight-options-div {\r\n -width: 330px;\r\n transition: all 300ms ease-out;\r\n}\r\n.hv-close-highlight-feature-panel {width: 0px;}\r\n/*Highlight Featues Panel CSS Ends*/\r\n\r\n\r\n/*Highlight option Icons and its effects*/\r\n.hv-icon-out-space {\r\n display: inline-block;\r\n padding-top: 13px;\r\n padding-right: 15px;\r\n padding-left: 15px;\r\n padding-bottom: 15px;\r\n cursor: pointer;\r\n}\r\n.hv-icon-out-space img {cursor: pointer;}\r\n.hv-icon-out-space:hover {background-color: #313131;}\r\n\r\n.hv-icon-out-disable {\r\n position: relative;\r\n top: -15px;\r\n opacity: .3;\r\n}\r\n\r\n.hv-icon-out-disable:hover {\r\n background-color: rgba(66, 66, 66, 0.8) !important;\r\n}\r\n\r\n.hv-pause-play {border-radius: 5px 0px 0px 0px;}\r\n\r\n.hv-togarrow-spacer {\r\n position: absolute;\r\n background-color: transparent;\r\n border-left: 1px solid;\r\n display: inline-block;\r\n border-radius: 0 5px 0px 0;\r\n cursor: pointer;\r\n}\r\n.hv-togarrow {padding: 16px 5px 19px 5px;}\r\n.hv-togarrow-left {\r\n padding: 16px 5px 19px 5px;\r\n transform: rotate(-180deg);\r\n}\r\n.hv-togarrow:hover {background-color: #313131;}\r\n\r\n.hv-active-tool {background-color: #313131;}\r\n/*Highlight option Icons and its effects ends*/\r\n\r\n/*Collape*/\r\n.hv-collapsed {\r\n width: 45px;\r\n\r\n background-color: rgba(49, 49, 49, 0.85);\r\n border-radius: 5px;\r\n padding: 10px;\r\n position: absolute;\r\n top: 0;\r\n right: 0px;\r\n max-height: 43px;\r\n cursor: pointer;\r\n transition: all 300ms ease-out;\r\n}\r\n.hv-collapsed-move {right: -30px;}\r\n/*Collape Ends*/\r\n\r\n/*Tooltip Panel*/\r\n.hv-tooltip-panel {\r\n width: 300px;\r\n -background-color: #313131;\r\n background-color: rgba(49, 49, 49, 0.85);\r\n padding: 12px 0px;\r\n border-radius: 5px 5px 0 0;\r\n font-size: 13px;\r\n font-weight: lighter;\r\n color: #ffffff;\r\n text-align: center;\r\n letter-spacing: 0.3px;\r\n margin: 0 auto;\r\n position: absolute;\r\n bottom: 43px;\r\n left: 0;\r\n right: 0;\r\n transition: all 300ms ease-out;\r\n line-height: 17px;\r\n white-space: pre-line;\r\n}\r\n.hv-tooltip-panel-toggle {bottom: -50px;}\r\n/*Tooltip Panel Ends*/\r\n\r\n.disp-none {display: none !important;}\r\n\r\n/*Color Palet*/\r\n.hv-choose-color-panel {\r\n background-color: #313131;\r\n border-radius: 5px 5px 0 0;\r\n max-height: 46px;\r\n overflow: hidden;\r\n position: absolute;\r\n top: -48px;\r\n left: 99px;\r\n line-height: 0;\r\n padding: 13px 5px 13px 10px;\r\n cursor: default;\r\n transition: top 300ms ease;\r\n display: none;\r\n}\r\n.hv-change-color-circle {\r\n width: 20px !important;\r\n height: 20px !important;\r\n border-radius: 100%;\r\n border: 1px solid transparent;\r\n margin-right: 5px;\r\n display: inline-block;\r\n cursor: pointer;\r\n}\r\n\r\n.hv-remove-highlight-div {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n\tpointer-events: none !important;\r\n}\r\n\r\n.hv-add-highlight-div {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n}\r\n\r\n.hv-add-eraser {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n}\r\n\r\n.hv-remove-canvas {\r\n\topacity:0.5;\r\n\tpointer-events: none;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-add-canvas {\r\n\topacity:0.5;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tpointer-events: all;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-add-canvas-eraser {\r\n\topacity:0.5;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-pause-play{\r\n width: 46px;\r\n height: 44px;\r\n padding: 0px;\r\n text-align: center;\r\n position: relative;\r\n top: -17px;\r\n line-height: 59px;\r\n}\r\n\r\n.hv-black-color {background-color: #000000;}\r\n.hv-red-color {background-color: #ff0000;}\r\n.hv-violet-color {background-color: #8170cd;}\r\n.hv-orange-color {background-color: #ff9a44;}\r\n.hv-green-color {background-color: #7ddc68;}\r\n.hv-blue-color {background-color: #1edde1;}\r\n/*Color Palet Ends*/\r\n\r\n.hv-icon-selected #hvCursorAnimationImg {display: none;}\r\n.hv-icon-selected #hvCursorAnimationImgActive {display: block;}\r\n.hv-icon-unslected #hvCursorAnimationImg {display: block;}\r\n.hv-icon-unslected #hvCursorAnimationImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvPenImg {display: none;}\r\n.hv-icon-selected #hvPenImgActive {display: block;}\r\n.hv-icon-unslected #hvPenImg {display: block;}\r\n.hv-icon-unslected #hvPenImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvFocusImg {display: none;}\r\n.hv-icon-selected #hvFocusImgActive {display: block;}\r\n.hv-icon-unslected #hvFocusImg {display: block;}\r\n.hv-icon-unslected #hvFocusImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvEraseImg {display: none;}\r\n.hv-icon-selected #hvEraseImgActive {display: block;}\r\n.hv-icon-unslected #hvEraseImg {display: block;}\r\n.hv-icon-unslected #hvEraseImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvClearImg {display: none;}\r\n.hv-icon-selected #hvClearImgActive {display: block;}\r\n.hv-icon-unslected #hvClearImg {display: block;}\r\n.hv-icon-unslected #hvClearImgActive {display: none;}\r\n\r\n/*.hv-icon-selected #hvPauseImg {display: none;}\r\n.hv-icon-selected #hvPauseImgActive {display: block;}\r\n.hv-icon-unslected #hvPauseImg {display: block;}\r\n.hv-icon-unslected #hvPauseImgActive {display: none;}*/\r\n\r\n.hv-icon-selected #hvStopImg {display: none;}\r\n.hv-icon-selected #hvStopImgActive {display: block;}\r\n.hv-icon-unslected #hvStopImg {display: block;}\r\n.hv-icon-unslected #hvStopImgActive {display: none;}\r\n\r\n/*intro-div*/\r\n.hv-feature-intro-div {\r\n position: fixed;\r\n top: 0;\r\n overflow: hidden;\r\n width: 100%;\r\n height: 100%;\r\n background-color: rgba(0,0,0,0.8);\r\n z-index: 1000;\r\n}\r\n.hv-feature-intro-div .hv-feature-intro-div-inner {\r\n position: relative;\r\n top: 30%;\r\n width: 800px;\r\n margin: 0 auto;\r\n text-align: center;\r\n color: #fff;\r\n font-weight: 300;\r\n font-size: 16px;\r\n letter-spacing: 0.2px;\r\n line-height: 30px;\r\n}\r\n.hv-arrow-pointer {\r\n position: absolute;\r\n top: 100px;\r\n right: 0;\r\n -webkit-animation: fling-arrow 5s infinite;\r\n animation: fling-arrow 5s infinite;\r\n}\r\n@-webkit-keyframes fling-arrow {\r\n 0% {top: 100px;}\r\n 50% {top: 200px;}\r\n 100% {top: 100px;}\r\n}\r\n@keyframes fling-arrow {\r\n 0% {top: 100px;}\r\n 50% {top: 200px;}\r\n 100% {top: 100px;}\r\n}\r\n.hv-primary-btn-2 {\r\n background-image: linear-gradient(to right, rgb(252, 96, 118) 0%, rgb(255, 154, 68) 51%, rgb(255, 154, 68) 100%);\r\n background-size: 200%;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n color: rgb(255, 255, 255);\r\n cursor: pointer;\r\n font-family: "Open Sans";\r\n font-size: 13px;\r\n font-weight: 500;\r\n letter-spacing: 0.2px;\r\n margin: 10px 4px 10px 4px;\r\n padding: 8px 20px 9px 20px;\r\n text-align: center;\r\n text-transform: uppercase;\r\n transition-duration: 0.9s;\r\n transition-property: all;\r\n transition-timing-function: ease;\r\n border: unset;\r\n background-color: unset;\r\n}\r\n.hv-primary-btn {\r\n max-height: 35px;\r\n background-image: linear-gradient(120deg, #fc6076 0%, #ff9a44 100%);\r\n padding-top: 8px;\r\n padding-bottom: 7px;\r\n padding-left: 20px;\r\n padding-right: 20px;\r\n letter-spacing: 0.5px;\r\n transition: 0.5s;\r\n box-shadow: inset 0 0 0 0 #fc6076;\r\n border: 0;\r\n border-radius: 5px;\r\n font-size: 13px;\r\n font-weight: 300;\r\n color: #ffffff;\r\n outline: none;\r\n cursor: pointer;\r\n}\r\n.hv-primary-btn:hover {\r\n background-image: linear-gradient(120deg, #ff9a44 0%, #fc6076 100%);\r\n background-position: right center;\r\n}\r\n.hv-pen-cusor-area{\r\n position: fixed;\r\n\r\n}\r\n.hv-cancel-btn {\r\n\tmargin-right: 10px;\r\n\ttop: 18px;\r\n bottom: 0;\r\n position: relative;\r\n color: #4a90e2 !important;\r\n cursor: pointer;\r\n}\r\n.hv-cancel-btn:hover {\r\n text-decoration: underline;\r\n}\r\n#hippo-overlay-div {\r\n height: 100%;\r\n width: 100%;\r\n background-color: rgba(0,0,0,0.6);\r\n position: fixed;\r\n z-index: 1000001;\r\n top:0;\r\n text-align: center;\r\n}\r\n\r\n#hippo-inner-div {\r\n width: 700px;\r\n left: calc(50% - 350px);\r\n height: 506px;\r\n background-color: #fff;\r\n border-radius: 10px;\r\n position: absolute;\r\n top: 12%;\r\n bottom: 0px;\r\n}\r\n\r\n#hippo-action-div{\r\n position: absolute;\r\n bottom: 10px;\r\n left: 27px;\r\n width: 100%;\r\n}\r\n\r\n.hv-stop-recording-btn{\r\n font-size:14px;\r\n background-size: 200% auto;\r\n background-image: linear-gradient(to right, #fc6076 0%, #ff9a44 31%, #ff9a44 100%);\r\n padding: 8px 30px 8px 30px;\r\n border-radius: 4px;\r\n float: right;\r\n margin-right: 61px;\r\n color: #fff;\r\n cursor: pointer;\r\n}\r\n.hv-webcam-play-btn{\r\n font-size: 14px;\r\n background-color: #8b8b8b;\r\n padding: 8px 30px 8px 30px;\r\n border-radius: 4px;\r\n float: right;\r\n color: #fff;\r\n right: 25px;\r\n margin-left: -30px;\r\n position: relative;\r\n cursor: pointer;\r\n}\r\n\r\n#hv-iframe-overlay-div-drag {\r\n z-index: 100000;\r\n height: 200px;\r\n width: 271px;\r\n}\r\n\r\n.hv-webcam-rectangle-bottom-left{\r\n position: fixed;\r\n bottom:0;\r\n left:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-bottom-right{\r\n position: fixed;\r\n bottom:0;\r\n right:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-top-left{\r\n position: fixed;\r\n top:0;\r\n left:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-top-right{\r\n position: fixed;\r\n top:0;\r\n right:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\ndiv.clickEffect{\r\n position:fixed;\r\n box-sizing:border-box;\r\n border-style:solid;\r\n border-color:#ff160b;\r\n border-radius:50%;\r\n animation:clickEffect 0.6s ease-out;\r\n z-index:99999;\r\n pointer-events: none;\r\n}\r\n@keyframes clickEffect{\r\n 0%{\r\n opacity:1;\r\n width:0.5em;\r\n height:0.5em;\r\n margin:-0.25em;\r\n border-width:8px;\r\n transform: scale(0.6, 0.6);\r\n }\r\n 100%{\r\n opacity:0.4;\r\n width:15em; height:15em;\r\n margin:-7.5em;\r\n border-width:0.48px;\r\n transform: scale(0.4, 0.4);\r\n }\r\n}\r\n\r\ndiv.clickEffect2{\r\n position:fixed;\r\n box-sizing:border-box;\r\n border-style:solid;\r\n border-color:#ff160b;\r\n border-radius:50%;\r\n animation:clickEffect2 0.6s ease-out;\r\n z-index:99999;\r\n pointer-events: none;\r\n}\r\n@keyframes clickEffect2{\r\n 0%{\r\n opacity:1;\r\n width:1em;\r\n height:1em;\r\n margin:-0.5em;\r\n border-width:8px;\r\n transform: scale(0.6, 0.6);\r\n }\r\n 100%{\r\n opacity:0.4;\r\n width:15em; height:15em;\r\n margin:-7.5em;\r\n border-width:0.48px;\r\n transform: scale(0.4, 0.4);\r\n }\r\n}\r\n.hv-blink-right, .hv-blink-left{\r\n width: 2px;\r\n height: 2px;\r\n background-color: white;\r\n animation: blink 1s infinite;\r\n opacity:0.1;\r\n border: 1px solid black;\r\n position: fixed;\r\n bottom:0;\r\n display: none;\r\n}\r\n.hv-blink-right{\r\n right: 0;\r\n}\r\n.hv-blink-left{\r\n left: 0;\r\n}\r\n\r\n@keyframes blink {\r\n 0% {transform: scale(1, 1);}\r\n 50% {transform: scale(1.3, 1.3);}\r\n}\r\n#hv-recordingTimer {\r\n font-size: 35px;\r\n font-weight: lighter;\r\n font-family: \'Open Sans\';\r\n color: #ef5253;\r\n text-align: center;\r\n margin-top: 5px !important;\r\n margin-left: 5px;\r\n float: left;\r\n}\r\n\r\n@keyframes fadeInOut {\r\n 0% {opacity: 0}\r\n 50% {opacity: 1}\r\n 100% {opacity: 0}\r\n}\r\n#recording-blinking {\r\n animation: fadeInOut 1s linear infinite;\r\n color: red;\r\n font-size: 12px;\r\n margin-bottom: 8px;\r\n text-align: center;\r\n padding-top: 5px;\r\n}\r\n#recording-blinking img{\r\n margin-right: 5px;\r\n position: relative;\r\n top: 6px;\r\n vertical-align: unset;\r\n}\r\n\r\n.lessonly-recording-frame {\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif !important;\r\n}\r\n\r\n.lessonly-recording-frame #hv-previewcontrol-stop {\r\n\twidth: 170px;\r\n\tfloat: right;\r\n\tbackground-color: #4a90e2 !important;\r\n\tbackground-image: unset;\r\n\tborder: 0;\r\n\tbox-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), inset 0 1px 0 0 #4a90e2, inset 0 2px 0 0 rgba(255, 255, 255, 0.2), 0 1px 2px 0 rgba(0, 0, 0, 0.09) !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n\tcolor: #fff;\r\n\tfont-size: 16px;\r\n\tfont-weight: normal;\r\n\tline-height: 20px;\r\n\tpadding: 0 16px;\r\n\tborder-radius: 3px;\r\n\theight: 40px;\r\n\tletter-spacing: normal;\r\n\ttext-transform: unset;\r\n\tmargin: 10px 4px;\r\n}\r\n\r\n.lessonly-recording-frame #hv-recordingTimer {\r\n color: #4a90e2 !important;\r\n font-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif !important;\r\n}\r\n\r\n#hv-iframe-wrapper {\r\n\twidth: 90%;\r\n margin-left: 5%;\r\n background-color: rgba(0,0,0,0.04);\r\n}\r\n.hv-align-right {\r\n\tfloat: right;\r\n}\r\n</style>').appendTo("head");var n,r,o,a=window._HVDomain||"",s=(o="Unknown",-1!=window.navigator.userAgent.indexOf("Windows")&&(o="Windows"),-1!=window.navigator.userAgent.indexOf("Mac")&&(o="Mac"),-1!=window.navigator.userAgent.indexOf("X11")&&(o="UNIX"),-1!=window.navigator.userAgent.indexOf("Linux")&&(o="Linux"),o);if(I={isEraser:!1,isPen:!1,cursorWidth:5,canvas:null,ctx:null,flag:!1,prevX:0,currX:0,prevY:0,currY:0,dot_flag:!1,penColor:"#000000",selectedColor:0,highlightCursorWidth:10,highlightCursorHeight:10,stopIcon:a+"/images/hv-highlight-icons/hb-stop.png",cursorIcon:a+"/images/hv-highlight-icons/hb-select.png",cursorIconActive:a+"/images/hv-highlight-icons/hb-select-active.png",penIcon:a+"/images/hv-highlight-icons/hb-pen.png",penIconActive:a+"/images/hv-highlight-icons/hb-pen-active.png",focusIcon:a+"/images/hv-highlight-icons/hb-focus.png",focusIconActive:a+"/images/hv-highlight-icons/hb-focus-active.png",eraseIcon:a+"/images/hv-highlight-icons/hb-erase.png",eraseIconActive:a+"/images/hv-highlight-icons/hb-erase-active.png",clearIcon:a+"/images/hv-highlight-icons/hb-clear.png",clearIconActive:a+"/images/hv-highlight-icons/hb-clear-active.png",video:a+"/images/hv-highlight-icons/hb-video-off.png",togarrow:a+"/images/hv-highlight-icons/hb-toggle-arrow.png",collapsIcon:a+"/images/hv-highlight-icons/collapse-icon.png",penColorIcon:a+"/images/hv-highlight-icons/pen-with-color.svg",penCursorIcon:a+"/images/hv-highlight-icons/pen-cusor.svg",eraseCursorIcon:a+"/images/hv-highlight-icons/erase-cursor.svg",arrowPointer:a+"/images/hv-highlight-icons/arrow-pointer.png",mouseAnimationIcon:a+"/images/hv-highlight-icons/hb-mouse-animation.png",mouseAnimationIconActive:a+"/images/hv-highlight-icons/hb-mouse-animation-active.png",highlightsColors:["#000000","#ff0000","#8170cd","#ff9a44","#7ddc68","#1edde1"],isAlt:!1,clearAction:"hvCursor",highlightOptions:function(e){var t=e.currentTarget.id;I.selectHiglightOptions(t,!0)},checkColorPanelVisible:function(t){e(".hv-choose-color-panel").is(":visible")&&I.tooltipHide()},pausePlay:function(t){e("#hvPause").hasClass("disp-none")?(e("#hvPlay").addClass("disp-none"),e("#hvPause").removeClass("disp-none"),I.highlightsEvents("hvPlay")):(e("#hvPlay").removeClass("disp-none"),e("#hvPause").addClass("disp-none"),I.highlightsEvents("hvPause"))},pausePlayWebcam:function(t){"hvResumeWebcam"===t.currentTarget.id?(e("#hvResumeWebcam").addClass("disp-none"),e("#hvPauseWebcam").removeClass("disp-none")):(e("#hvResumeWebcam").removeClass("disp-none"),e("#hvPauseWebcam").addClass("disp-none"))},handleStopRecording:function(e){console.log("SENDING EVENT ",i,"hv_stop_recording"),Z(i,"hv_stop_recording")},cancelRecording:function(e){},selectHiglightOptions:function(t,i){if("hvClearScreen"!==t&&(I.clearAction=t),e("#"+t).hasClass("hv-active-tool")&&i)return I.resetValues(),I.highlightsEvents("hvCursor"),void I.cursor();if("hvCursor"==t&&!i)return I.resetValues(),void I.cursor();switch(I.resetValues(),e("#"+t).addClass("hv-active-tool"),e("#"+t).removeClass("hv-icon-unslected"),e("#"+t).addClass("hv-icon-selected"),i&&"hvStop"!=t&&I.highlightsEvents(t),"hvPen"!=t&&"hvEraser"!=t&&"hvFocusArea"!=t||e(document).bind("mousemove",I.mouseMove),I.isPen=!1,t){case"hvCursor":I.cursor();break;case"hvCursorAnimation":I.cursorAnimation();break;case"hvPen":I.tooltipHide(),e("#hvHighLightDiv").removeClass("disp-none"),I.pen(),e(".hv-choose-color-panel").show();break;case"hvEraser":I.eraser();break;case"hvClearScreen":I.clearScreen();break;case"hvFocusArea":I.focusArea();break;case"hvStop":I.handleStopRecording()}},resetValues:function(){e(".hv-highlight-option").removeClass("hv-active-tool"),e(".hv-highlight-option").removeClass("hv-icon-selected"),e(".hv-highlight-option").addClass("hv-icon-unslected"),e(".hv-choose-color-panel").hide(),e("#hvHighLightDiv").removeClass("hv-add-highlight-div"),e("#hvHighLightDiv").removeClass("hv-add-eraser"),e("#hvCanvas").removeClass("hv-add-canvas"),e("#hvHighLightDiv").removeClass("hv-remove-highlight-div"),e("#hvCanvas").removeClass("hv-remove-canvas"),e(".hv-pen-cusor-area").remove(),e(document).unbind("mousemove"),document.removeEventListener("mouseup",I.clickEffect)},tooltipHide:function(t){e(".hv-tooltip-panel").hide()},tooltipShow:function(i){if(clearTimeout(r),0!=I.highlightsOpen){e(".hv-tooltip-panel").show();var n=i.currentTarget.id,r=setTimeout((function(){e(".hv-tooltip-panel").hide()}),3e3);switch(n){case"hvCursor":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + M for Cursor");break;case"hvCursorAnimation":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + A for Click Animation");break;case"hvPen":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + H for Highlight \n Hit UP / DOWN arrow to change size \n LEFT / RIGHT arrow to change color");break;case"hvEraser":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + E for Eraser");break;case"hvClearScreen":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + Z for Clear screen");break;case"hvFocusArea":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + F for Focus and ESC for Cursor");break;case"hvPause":case"hvPlay":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + P for Pause and Play");break;case"hvCloseHighlight":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + C for Close");break;case"hvStop":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + S for Stop recording");break;case"disabledState":t.screenRecord?e(".hv-tooltip-panel").text("Upgrade needed"):e(".hv-tooltip-panel").text("")}}},color:function(e){I.highlightsEvents("hvColorChoose"),I.isEraser=!1,I.penColor=e.target.id,I.selectedColor=I.highlightsColors.indexOf(e.target.id),I.setCursor(e.target.id)},draw:function(){I.ctx.beginPath(),1==I.isEraser?I.ctx.globalCompositeOperation="destination-out":I.ctx.globalCompositeOperation="source-over",I.ctx.lineCap="round",I.ctx.moveTo(I.prevX,I.prevY),I.ctx.fillStyle=I.penColor,I.ctx.globalAlpha=1,I.ctx.lineTo(I.currX,I.currY),I.ctx.strokeStyle=I.penColor,I.ctx.lineWidth=I.cursorWidth,I.ctx.stroke()},clearScreen:function(){var e=document.body,t=document.documentElement,i=Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight);I.canvas.height=i;var n=I.canvas.width,r=I.canvas.height;I.ctx.clearRect(0,0,n,r),I.selectHiglightOptions(I.clearAction,!1)},focusArea:function(){e("#hvHighLightDiv").addClass("hv-remove-highlight-div"),e("#hvCanvas").addClass("hv-remove-canvas");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").show()},cursor:function(){e("#hvHighLightDiv").css({"pointer-events":"none"});var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide(),e("#hvCanvas").addClass("hv-remove-canvas"),e("#hvCanvas").css("height",n+"px")},cursorAnimation:function(){document.addEventListener("mouseup",I.clickEffect),e("#hvHighLightDiv").css({"pointer-events":"none"});var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide(),e("#hvCanvas").addClass("hv-remove-canvas"),e("#hvCanvas").css("height",n+"px")},clickEffect:function(e){var t=document.createElement("div");t.className="clickEffect",t.style.top=e.clientY+"px",t.style.left=e.clientX+"px",document.body.appendChild(t),t.addEventListener("animationend",function(){t.parentElement.removeChild(t)}.bind(this));var i=document.createElement("div");i.className="clickEffect2",i.style.top=e.clientY+"px",i.style.left=e.clientX+"px",setTimeout((function(){document.body.appendChild(i),i.addEventListener("animationend",function(){i.parentElement.removeChild(i)}.bind(this))}),200)},pen:function(){I.isEraser=!1,I.isPen=!0,I.setCursor(I.penColor),e("#hvHighLightDiv").addClass("hv-add-highlight-div");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("#hvHighLightDiv").css("height",n+"px"),e("#hvCanvas").removeClass("hv-add-canvas-eraser"),e("#hvCanvas").addClass("hv-add-canvas"),e("#hvCanvas").css("height",n+"px"),e("#hvOverlayDiv").hide();var r='<svg class="hv-pen-cusor-area" xmlns="http://www.w3.org/2000/svg" width="'+I.highlightCursorWidth+'" height="'+I.highlightCursorHeight+'" viewBox="0 0 51 50.969"><metadata><?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about=""/></rdf:RDF></x:xmpmeta><?xpacket end="w"?></metadata><defs><style>.cls-1 {fill: none;stroke: #313131;stroke-linecap: round;stroke-linejoin: round;stroke-width: 1px;stroke-dasharray: 5 4;}</style></defs><circle class="cls-1" cx="25.5" cy="25.469" r="25"/></svg>';e(r).appendTo("body")},eraser:function(){I.isEraser=!0,e("body").css("cursor","url("+I.eraseCursorIcon+"), auto"),e("#hvHighLightDiv").addClass("hv-add-eraser"),e("#hvCanvas").addClass("hv-add-canvas-eraser"),e("#hvCanvas").css("height",n+"px");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide();var r='<svg class="hv-pen-cusor-area" xmlns="http://www.w3.org/2000/svg" width="'+I.highlightCursorWidth+'" height="'+I.highlightCursorHeight+'" viewBox="0 0 51 50.969"><metadata><?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about=""/></rdf:RDF></x:xmpmeta><?xpacket end="w"?></metadata><defs><style>.cls-1 {fill: none;stroke: #313131;stroke-linecap: round;stroke-linejoin: round;stroke-width: 1px;stroke-dasharray: 5 4;}</style></defs><circle class="cls-1" cx="25.5" cy="25.469" r="25"/></svg>';e(r).appendTo("body")},mouseMove:function(t){var i=t.pageX,o=t.pageY,a=i/n,s=o/r;Xpos=Math.floor(100*a),Ypos=Math.floor(100*s);var l=i+"px",u=o+"px";e("#hvOverlayCircle").css({transform:"translate("+l+","+u+") translateZ(0px)"})},closeHighlights:function(t){I.tooltipHide(),I.highlightsOpen=!1,t&&I.highlightsEvents("hvCloseHighlight"),e(".hv-tooltip-panel").hide(),e(".hv-highlight-feature-panel").animate({width:"0"},200,(function(){e(".hv-collapsed").removeClass("disp-none")})),e(".hv-highlight-options-div").addClass("hv-close-highlight-feature-panel")},openHighlights:function(t){I.highlightsOpen=!0,t&&I.highlightsEvents("hvOpenHighlight"),e(".hv-highlight-feature-panel").animate({width:"333px"},200),e(".hv-highlight-options-div").removeClass("hv-close-highlight-feature-panel"),e(".hv-highlight-options-div").show().delay(1e3),e(".hv-collapsed").addClass("disp-none")},findxy:function(t,i){"down"==t&&(I.prevX=I.currX,I.prevY=I.currY,I.currX=i.offsetX-I.canvas.offsetLeft,I.currY=i.offsetY-I.canvas.offsetTop,I.currY+=15,I.currX+=5,I.flag=!0,I.dot_flag=!0,I.dot_flag&&(I.ctx.beginPath(),I.ctx.fillStyle=I.penColor,I.ctx.fillRect(I.currX,I.currY,2,2),I.ctx.closePath(),I.dot_flag=!1)),"up"!=t&&"out"!=t||(I.flag=!1),"move"==t&&(e(".hv-pen-cusor-area").css({left:i.offsetX-I.canvas.offsetLeft-e(".hv-pen-cusor-area").width()/2+2,top:i.offsetY-I.canvas.offsetTop-e(".hv-pen-cusor-area").height()/2+17}),I.flag&&(I.prevX=I.currX,I.prevY=I.currY,I.currX=i.offsetX-I.canvas.offsetLeft+5,I.currY=i.offsetY-I.canvas.offsetTop+17,I.draw()))},windowResize:function(){var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);I.canvas.height=n,e("#hvHighLightDiv").css("height",n+"px")},highlightsEvents:function(e){},setCursor:function(t){if(t){if(0==I.isEraser){e("body").addClass("hv-"+t+"-cursor");var i='<svg xmlns="http://www.w3.org/2000/svg" width="20" viewBox="0 0 24.11 23.93"><defs><style>.cls-1,.cls-2{fill:#fff;stroke:#000;stroke-miterlimit:10;}.cls-2{fill-rule:evenodd;}</style></defs><title>highlight with color</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M22.58,1.35a2.91,2.91,0,0,1,0,4.11L21.21,6.82,17.11,2.72l1.37-1.37a2.91,2.91,0,0,1,4.11,0Z"/><polygon class="cls-1" points="2.05 17.77 0.69 23.25 6.16 21.88 19.85 8.19 15.74 4.09 2.05 17.77"/><path class="cls-2" style="fill:'+t+'" d="M20.11,15.94a3.5,3.5,0,1,1-3.5,3.5,3.5,3.5,0,0,1,3.5-3.5Z"/></g></g></svg>',n='url("data:image/svg+xml,'+(i=encodeURIComponent(i.replace(/"/g,"'")))+'"), auto';e("body").css("cursor",n)}}else e("body").css({cursor:"default"})},onkeyupEvent:function(e){18==e.which&&(I.isAlt=!1)},onkeydownEvent:function(t){18==t.which&&(I.isAlt=!0),I.isPen&&[37,38,39,40].indexOf(t.keyCode)>-1&&t.preventDefault(),83==t.which&&1==I.isAlt&&I.stopRecording(),67==t.which&&1==I.isAlt&&(t.preventDefault(),I.closeHighlights(!0)),79==t.which&&1==I.isAlt&&(t.preventDefault(),I.openHighlights(!0)),90==t.which&&1==I.isAlt&&(I.selectHiglightOptions("hvClearScreen",!0),clearScreen()),69==t.which&&1==I.isAlt&&(t.preventDefault(),I.selectHiglightOptions("hvEraser",!0),I.isEraser=!0),72==t.which&&1==I.isAlt&&(I.selectHiglightOptions("hvPen",!0),I.isEraser=!1,I.pen()),70==t.which&&1==I.isAlt&&(t.preventDefault(),I.selectHiglightOptions("hvFocusArea",!0),I.focusArea()),(77==t.which&&1==I.isAlt||27==t.which)&&(I.selectHiglightOptions("hvCursor",!0),I.cursor()),65==t.which&&1==I.isAlt&&I.selectHiglightOptions("hvCursorAnimation",!0),38==t.which&&I.cursorWidth<=200&&(I.cursorWidth+=1,I.highlightCursorWidth+=1,I.highlightCursorHeight+=1,e(".hv-pen-cusor-area").css({width:I.highlightCursorWidth,height:I.highlightCursorHeight})),38==t.which&&I.isAlt,40==t.which&&I.cursorWidth>=5&&(I.cursorWidth-=1,I.highlightCursorWidth-=1,I.highlightCursorHeight-=1,e(".hv-pen-cusor-area").css({width:I.highlightCursorWidth,height:I.highlightCursorHeight})),37==t.which&&0!==I.selectedColor&&(I.selectedColor=I.selectedColor-1,I.penColor=I.highlightsColors[I.selectedColor],I.setCursor(I.penColor)),39==t.which&&5!==I.selectedColor&&(I.selectedColor=I.selectedColor+1,I.penColor=I.highlightsColors[I.selectedColor],I.setCursor(I.penColor))}},!(e(".hv-highlight-feature-panel").length>0)){var l="Press "+("Mac"===s?"Option":"Alt")+" + O for Open",u="Press "+("Mac"===s?"Option":"Alt")+" + H for Highlight",c='<div class="hv-action-component hv-highlight-feature-panel hv-act-comp-bottom-right"> <div class="hv-highlight-options-div"> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvStop"> <img src="'+I.stopIcon+'" id="hvStopImg"/> <img src="'+I.stopIcon+'" id="hvStopImgActive"/> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvCursorAnimation"> <img src="'+I.mouseAnimationIcon+'" id="hvCursorAnimationImg" class=" hv-custom-mouse-pen-cursor" /> <img src="'+I.mouseAnimationIconActive+'" id="hvCursorAnimationImgActive" class=" hv-custom-mouse-pen-cursor" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvPen"> <img src="'+I.penIcon+'" id="hvPenImg" /> <img src="'+I.penIconActive+'" id="hvPenImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvFocusArea"> <img src="'+I.focusIcon+'" id="hvFocusImg" /> <img src="'+I.focusIconActive+'" id="hvFocusImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvEraser"> <img src="'+I.eraseIcon+'" class=" hv-custom-mouse-erase-cursor" id="hvEraseImg" /> <img src="'+I.eraseIconActive+'" class=" hv-custom-mouse-erase-cursor" id="hvEraseImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvClearScreen"> <img src="'+I.clearIcon+'" id="hvClearImg" /> <img src="'+I.clearIconActive+'" id="hvClearImgActive" /> </span> <span class="hv-togarrow-spacer hv-close-highlights" id="hvCloseHighlight"><img src="'+I.togarrow+'" class=" hv-togarrow" id="hvTogarrow" /></span> <div class="hv-choose-color-panel"> <div id="#000000" class="hv-change-color-circle hv-black-color"></div> <div id="#ff0000" class="hv-change-color-circle hv-red-color"></div> <div id="#8170cd" class="hv-change-color-circle hv-violet-color"></div> <div id="#ff9a44" class="hv-change-color-circle hv-orange-color"></div> <div id="#7ddc68" class="hv-change-color-circle hv-green-color"></div> <div id="#1edde1" class="hv-change-color-circle hv-blue-color"></div> </div> </div> <div class="hv-collapsed disp-none hv-open-highlights hv-collapsed-move" id="hvOpenHighlight" title="'+l+'"><img src="'+I.collapsIcon+'" class="hv-collapsed-icon" /></div> <div class="hv-tooltip-panel">'+u+"</div> </div>";e(c).appendTo("body"),e(".hv-highlight-option").bind("click",I.highlightOptions),e(".hv-change-color-circle").bind("click",I.color),e(".hv-close-highlights").bind("click",I.closeHighlights),e(".hv-open-highlights").bind("click",I.openHighlights),e(".hv-highlight-option").on("mouseenter",I.tooltipShow),e(".hv-icon-out-disable").on("mouseenter",I.tooltipShow),e(".hv-tooltip-panel").on("mouseenter",I.checkColorPanelVisible),e(".hv-close-highlights").on("mouseover",I.tooltipShow),window.addEventListener("keyup",I.onkeyupEvent),window.addEventListener("keydown",I.onkeydownEvent),window.addEventListener("resize",I.windowResize),I.canvas=document.getElementById("hvCanvas"),I.ctx=I.canvas.getContext("2d"),I.canvas.width=window.innerWidth,I.canvas.height=window.innerHeight,n=I.canvas.width,r=I.canvas.height;var d=document.body,h=document.documentElement,p=Math.max(d.scrollHeight,d.offsetHeight,h.clientHeight,h.scrollHeight,h.offsetHeight);I.canvas.height=p,e("#hvHighLightDiv").css("height",p+"px"),I.selectHiglightOptions("hvCursor"),e("#hvHighLightDiv").css({"pointer-events":"none"}),e("#hvOverlayDiv").hide(),I.canvas.addEventListener("mousemove",(function(e){I.findxy("move",e)}),!1),I.canvas.addEventListener("mousedown",(function(e){I.findxy("down",e)}),!1),I.canvas.addEventListener("mouseup",(function(e){I.findxy("up",e)}),!1),I.canvas.addEventListener("mouseout",(function(e){I.findxy("out",e)}),!1)}}(t,i)}(n,r))}var n,r,o,a,s;"_show_webcam_preview"===t.type&&(console.log("D ",t),J((t.detail||{}).stream));if("_remove_webcam_preview"===t.type&&X(),"_show_upload_progress"===t.type){var l=t.detail||{};console.log(">>>> D",t),o={recorder:l.recorder,theme:l.theme},a=o.recorder,s=o.theme,Object(A.a)(a,s)}"record_stopped"===t.type&&(this.popupElement&&(this.popupElement.style.display="flex"),this.recordingInProgress=!1,X(),Q()),"record_cancelled"===t.type&&(this.recordingInProgress=!1,X(),Q()),"video_submitted"!==t.type&&"hide_frame"!==t.type||this.popupElement&&(this.popupElement.style.display="none"),"show_frame"===t.type&&this.popupElement&&(this.popupElement.style.display="flex")}}]),t}(),z={create:function(e,t){return m()(this,void 0),new j(e,t)}.bind(void 0)},H={create:function(e,t){return m()(this,void 0),new q(e,t)}.bind(void 0)},j=function(e){r()(i,e);var t=P(i);function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:config,o=r.settings,a=r.recorder_events;return c()(this,i),console.log("add recorder ",e),n=t.call(this,e,{type:k.a.RECORDER,settings:o,recorder_events:a}),console.log("add recorder "),n}return h()(i,[{key:"startRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.recordingInProgress?$(this.eventCallbacks,"recording_error",{error:"recording_in_progress",message:"A recording is already in progress"}):(e=W(e),G(this.settings,e)?(this.popupElement&&(this.popupElement.style.display="flex"),Z(this.eventListenerClass,"start_recording",{recording_configuration:e,extension_available:D})):$(this.eventCallbacks,"record_error",{error:"INVALID_RECORD_OPTIONS",message:"The recording options given are invalid"}))}}]),i}(V),q=function(e){r()(i,e);var t=P(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:config,r=n.settings,o=n.recorder_events;return c()(this,i),t.call(this,e,{type:k.a.IMPORTER,settings:r,recorder_events:o})}return h()(i,[{key:"import",value:function(e){this.importMedia(null,e)}},{key:"importMedia",value:function(e,t){Z(this.eventListenerClass,"import_video",{file:e,uniqueId:t})}}]),i}(V);function G(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.screenRecord,n=t.audio,r=t.webCam,o=e.record_config||{},a=o.screen,s=o.webcam,l=o.mic;return!(!(i||n||r||a||s)&&l)}function W(e){var t=Object.assign({},e);for(var i in e)N[i]&&(delete t[i],t[N[i]]=e[i]);return t}function $(e,t,i){var n=this,r={type:t,data:i};e.forEach(function(e){m()(this,n),e(r)}.bind(this))}function Y(t){e("#recording-configuration").remove(),e('<input type=hidden id="recording-configuration" value="" />').appendTo("head");e("#actiontoextension").remove(),e('<input type=hidden id="actiontoextension" value="" />').appendTo("head");var i='<input type=hidden id="hippowiz-ew-digest" value="'.concat(t,'" />');e("#hippowiz-ew-digest").remove(),e(i).appendTo("head")}function K(e){var t=this;try{Object(S.j)(e).then(function(){m()(this,t),D=!0}.bind(this)).catch(function(){m()(this,t),console.log("CONNECTION ERROR!! CAN BE MORE SPECIFIC!! CHECK!!!"),D=!1}.bind(this))}catch(e){D=!1}}function J(e){Object(x.a)(e)}function X(){!function(e){var t=document.getElementsByClassName(e);for(;t.length>0;)t[0].parentNode.removeChild(t[0])}("hv-rapi-webcam-preview")}function Q(){!function(){I&&I.resetValues();e("#hvOverlayDiv, #hvHighLightDiv, #hvCanvas, .hv-highlight-feature-panel").remove(),e("body").css({cursor:"default"})}()}function Z(e,t,i){var n;try{n=new CustomEvent(t,{detail:i})}catch(e){(n=document.createEvent("Event")).detail=i,n.initEvent(t,!1,!1)}console.log("SENDING EVENT FROM LIBRARY ",n,document.getElementsByClassName(e)[0]),document.getElementsByClassName(e)[0].dispatchEvent(n)}}.call(this,i(2))},,function(e,t,i){var n=i(8),r=i(31),o=i(27),a=i(29),s=n.TypeError;e.exports=function(e,t){var i,n;if("string"===t&&o(i=e.toString)&&!a(n=r(i,e)))return n;if(o(i=e.valueOf)&&!a(n=r(i,e)))return n;if("string"!==t&&o(i=e.toString)&&!a(n=r(i,e)))return n;throw s("Can't convert object to primitive value")}},function(e,t,i){"use strict";var n=i(8),r=i(12),o=i(76),a=i(29),s=i(32),l=i(104),u=i(118),c=n.Function,d=r([].concat),h=r([].join),p={},f=function(e,t,i){if(!s(p,t)){for(var n=[],r=0;r<t;r++)n[r]="a["+r+"]";p[t]=c("C,a","return new C("+h(n,",")+")")}return p[t](e,i)};e.exports=u?c.bind:function(e){var t=o(this),i=t.prototype,n=l(arguments,1),r=function(){var i=d(n,l(arguments));return this instanceof r?f(t,i.length,i):t.apply(e,i)};return a(i)&&(r.prototype=i),r}},function(e,t){function i(t,n){return e.exports=i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t,n)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=function(e){"use strict";var t=Object.prototype,i=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,i){return e[t]=i}}function l(e,t,i,n){var r=t&&t.prototype instanceof d?t:d,o=Object.create(r.prototype),a=new S(n||[]);return o._invoke=function(e,t,i){var n="suspendedStart";return function(r,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw o;return C()}for(i.method=r,i.arg=o;;){var a=i.delegate;if(a){var s=w(a,i);if(s){if(s===c)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=u(e,t,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}(e,i,a),o}function u(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function d(){}function h(){}function p(){}var f={};s(f,r,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==t&&i.call(m,r)&&(f=m);var v=p.prototype=d.prototype=Object.create(f);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(r,o){function a(){return new t((function(n,a){!function n(r,o,a,s){var l=u(e[r],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}(r,o,n,a)}))}return n=n?n.then(a,a):a()}}function w(e,t){var i=e.iterator[t.method];if(void 0===i){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=u(i,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,c;var r=n.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(b.prototype),s(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,i,n,r,o){void 0===o&&(o=Promise);var a=new b(l(t,i,n,r),o);return e.isGeneratorFunction(i)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(v),s(v,a,"Generator"),s(v,r,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var i in e)t.push(i);return t.reverse(),function i(){for(;t.length;){var n=t.pop();if(n in e)return i.value=n,i.done=!1,i}return i.done=!0,i}},e.values=T,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(i,n){return a.type="throw",a.arg=e,t.next=i,n&&(t.method="next",t.arg=void 0),!!n}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),_(i),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;_(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:T(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(e,t,i){var n=i(12),r=i(43),o=Math.floor,a=n("".charAt),s=n("".replace),l=n("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,i,n,d,h){var p=i+e.length,f=n.length,g=c;return void 0!==d&&(d=r(d),g=u),s(h,g,(function(r,s){var u;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,i);case"'":return l(t,p);case"<":u=d[l(s,1,-1)];break;default:var c=+s;if(0===c)return r;if(c>f){var h=o(c/10);return 0===h?r:h<=f?void 0===n[h-1]?a(s,1):n[h-1]+a(s,1):r}u=n[c-1]}return void 0===u?"":u}))}},function(e,t,i){"use strict";var n=i(214),r=i(92);e.exports=n?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,i){"use strict";var n=i(46).forEach,r=i(161)("forEach");e.exports=r?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},function(e,t,i){var n=i(8),r=i(160),o=i(154),a=i(29),s=i(22)("species"),l=n.Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(o(t)&&(t===l||r(t.prototype))||a(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?l:t}},function(e,t,i){"use strict";
|
|
248
|
+
*/!function(s){"use strict";o=[i(2),i(705),i(706),i(40)],void 0===(a="function"==typeof(r=function(e){return e.effects={effect:{}},function(){var t,i=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function o(e){var t,i,n,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(r&&r.length&&r[0]&&r[r[0]])for(i=r.length;i--;)"string"==typeof r[t=r[i]]&&(o[(n=t,n.replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()})))]=r[t]);else for(t in r)"string"==typeof r[t]&&(o[t]=r[t]);return o}e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],(function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(n.style(e.elem,i,e.end),e.setAttr=!0)}})),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(t,n,a,s){var l=e.speed(n,a,s);return this.queue((function(){var n,a=e(this),s=a.attr("class")||"",u=l.children?a.find("*").addBack():a;u=u.map((function(){return{el:e(this),start:o(this)}})),(n=function(){e.each(i,(function(e,i){t[i]&&a[i+"Class"](t[i])}))})(),u=u.map((function(){return this.end=o(this.el[0]),this.diff=function(t,i){var n,o,a={};for(n in i)o=i[n],t[n]!==o&&(r[n]||!e.fx.step[n]&&isNaN(parseFloat(o))||(a[n]=o));return a}(this.start,this.end),this})),a.attr("class",s),u=u.map((function(){var t=this,i=e.Deferred(),n=e.extend({},l,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,n),i.promise()})),e.when.apply(e,u.get()).done((function(){n(),e.each(arguments,(function(){var t=this.el;e.each(this.diff,(function(e){t.css(e,"")}))})),l.complete.call(a[0])}))}))},e.fn.extend({addClass:(t=e.fn.addClass,function(i,n,r,o){return n?e.effects.animateClass.call(this,{add:i},n,r,o):t.apply(this,arguments)}),removeClass:function(t){return function(i,n,r,o){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},n,r,o):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,n,r,o,a){return"boolean"==typeof n||void 0===n?r?e.effects.animateClass.call(this,n?{add:i}:{remove:i},r,o,a):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},n,r,o)}}(e.fn.toggleClass),switchClass:function(t,i,n,r,o){return e.effects.animateClass.call(this,{add:i,remove:t},n,r,o)}})}(),function(){var t;function i(t,i,n,r){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),"function"==typeof i&&(r=i,n=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(r=n,n=i,i={}),"function"==typeof n&&(r=n,n=null),i&&e.extend(t,i),n=n||i.duration,t.duration=e.fx.off?0:"number"==typeof n?n:n in e.fx.speeds?e.fx.speeds[n]:e.fx.speeds._default,t.complete=r||i.complete,t}function n(t){return!(t&&"number"!=typeof t&&!e.fx.speeds[t])||("string"==typeof t&&!e.effects.effect[t]||("function"==typeof t||"object"==typeof t&&!t.effect))}function r(e,t){var i=t.outerWidth(),n=t.outerHeight(),r=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(e)||["",0,i,n,0];return{top:parseFloat(r[1])||0,right:"auto"===r[2]?i:parseFloat(r[2]),bottom:"auto"===r[3]?n:parseFloat(r[3]),left:parseFloat(r[4])||0}}e.expr&&e.expr.pseudos&&e.expr.pseudos.animated&&(e.expr.pseudos.animated=(t=e.expr.pseudos.animated,function(i){return!!e(i).data("ui-effects-animated")||t(i)})),!1!==e.uiBackCompat&&e.extend(e.effects,{save:function(e,t){for(var i=0,n=t.length;i<n;i++)null!==t[i]&&e.data("ui-effects-"+t[i],e[0].style[t[i]])},restore:function(e,t){for(var i,n=0,r=t.length;n<r;n++)null!==t[n]&&(i=e.data("ui-effects-"+t[n]),e.css(t[n],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),float:t.css("float")},n=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:t.width(),height:t.height()},o=document.activeElement;try{o.id}catch(e){o=document.body}return t.wrap(n),(t[0]===o||e.contains(t[0],o))&&e(o).trigger("focus"),n=t.parent(),"static"===t.css("position")?(n.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],(function(e,n){i[n]=t.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")})),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(r),n.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).trigger("focus")),t}}),e.extend(e.effects,{version:"1.13.1",define:function(t,i,n){return n||(n=i,i="effect"),e.effects.effect[t]=n,e.effects.effect[t].mode=i,n},scaledDimensions:function(e,t,i){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(t||100)/100:1,r="vertical"!==i?(t||100)/100:1;return{height:e.height()*r,width:e.width()*n,outerHeight:e.outerHeight()*r,outerWidth:e.outerWidth()*n}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,i){var n=e.queue();t>1&&n.splice.apply(n,[1,0].concat(n.splice(t,i))),e.dequeue()},saveStyle:function(e){e.data("ui-effects-style",e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data("ui-effects-style")||"",e.removeData("ui-effects-style")},mode:function(e,t){var i=e.is(":hidden");return"toggle"===t&&(t=i?"show":"hide"),(i?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(e,t){var i,n;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=e[1]/t.width}return{x:n,y:i}},createPlaceholder:function(t){var i,n=t.css("position"),r=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=e("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data("ui-effects-placeholder",i)),t.css({position:n,left:r.left,top:r.top}),i},removePlaceholder:function(e){var t="ui-effects-placeholder",i=e.data(t);i&&(i.remove(),e.removeData(t))},cleanUp:function(t){e.effects.restoreStyle(t),e.effects.removePlaceholder(t)},setTransition:function(t,i,n,r){return r=r||{},e.each(i,(function(e,i){var o=t.cssUnit(i);o[0]>0&&(r[i]=o[0]*n+o[1])})),r}}),e.fn.extend({effect:function(){var t=i.apply(this,arguments),n=e.effects.effect[t.effect],r=n.mode,o=t.queue,a=o||"fx",s=t.complete,l=t.mode,u=[],c=function(t){var i=e(this),n=e.effects.mode(i,l)||r;i.data("ui-effects-animated",!0),u.push(n),r&&("show"===n||n===r&&"hide"===n)&&i.show(),r&&"none"===n||e.effects.saveStyle(i),"function"==typeof t&&t()};if(e.fx.off||!n)return l?this[l](t.duration,s):this.each((function(){s&&s.call(this)}));function d(i){var o=e(this);function a(){"function"==typeof s&&s.call(o[0]),"function"==typeof i&&i()}t.mode=u.shift(),!1===e.uiBackCompat||r?"none"===t.mode?(o[l](),a()):n.call(o[0],t,(function(){o.removeData("ui-effects-animated"),e.effects.cleanUp(o),"hide"===t.mode&&o.hide(),a()})):(o.is(":hidden")?"hide"===l:"show"===l)?(o[l](),a()):n.call(o[0],t,a)}return!1===o?this.each(c).each(d):this.queue(a,c).queue(a,d)},show:function(e){return function(t){if(n(t))return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="show",this.effect.call(this,r)}}(e.fn.show),hide:function(e){return function(t){if(n(t))return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="hide",this.effect.call(this,r)}}(e.fn.hide),toggle:function(e){return function(t){if(n(t)||"boolean"==typeof t)return e.apply(this,arguments);var r=i.apply(this,arguments);return r.mode="toggle",this.effect.call(this,r)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),n=[];return e.each(["em","px","%","pt"],(function(e,t){i.indexOf(t)>0&&(n=[parseFloat(i),t])})),n},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):r(this.css("clip"),this)},transfer:function(t,i){var n=e(this),r=e(t.to),o="fixed"===r.css("position"),a=e("body"),s=o?a.scrollTop():0,l=o?a.scrollLeft():0,u=r.offset(),c={top:u.top-s,left:u.left-l,height:r.innerHeight(),width:r.innerWidth()},d=n.offset(),h=e("<div class='ui-effects-transfer'></div>");h.appendTo("body").addClass(t.className).css({top:d.top-s,left:d.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(c,t.duration,t.easing,(function(){h.remove(),"function"==typeof i&&i()}))}}),e.fx.step.clip=function(t){t.clipInit||(t.start=e(t.elem).cssClip(),"string"==typeof t.end&&(t.end=r(t.end,t.elem)),t.clipInit=!0),e(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})}}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],(function(e,i){t[i]=function(t){return Math.pow(t,e+2)}})),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;e<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,(function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?i(2*e)/2:1-i(-2*e+2)/2}}))}(),e.effects})?r.apply(t,o):r)||(e.exports=a)}()}).call(this,i(2))},function(e,t){function i(e,t,i,n,r,o,a){try{var s=e[o](a),l=s.value}catch(e){return void i(e)}s.done?t(l):Promise.resolve(l).then(n,r)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,l,"next",e)}function l(e){i(a,r,o,s,l,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){i(133);var n=i(14),r=n.Service,o=n.apiLoader;o.services.firehose={},n.Firehose=r.defineService("firehose",["2015-08-04"]),Object.defineProperty(o.services.firehose,"2015-08-04",{get:function(){var e=i(512);return e.paginators=i(513).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.Firehose},function(e,t,i){i(133);var n=i(14),r=n.Service,o=n.apiLoader;o.services.kinesis={},n.Kinesis=r.defineService("kinesis",["2013-12-02"]),Object.defineProperty(o.services.kinesis,"2013-12-02",{get:function(){var e=i(527);return e.paginators=i(528).pagination,e.waiters=i(529).waiters,e},enumerable:!0,configurable:!0}),e.exports=n.Kinesis},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){var i={init:function(e){e||(e="undefined"!=typeof window&&window._i18n&&window._i18n.locale?window._i18n.locale:"undefined"!=typeof document&&document.documentElement.lang?document.documentElement.lang:"undefined"!=typeof navigator&&(navigator.languages||navigator.language||navigator.userLanguage)?((e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||"root").toLowerCase():"root");var t=this["__"+e]||this.__root;if(t)for(var i in t)this[i]=t[i];for(var i in this.__root)void 0===this[i]&&(this[i]=this.__root[i])}};i.init(),e.exports=i},function(e,t){e.exports=function(e,t,i,n){var r=i?i.call(n,e,t):void 0;if(void 0!==r)return!!r;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<o.length;l++){var u=o[l];if(!s(u))return!1;var c=e[u],d=t[u];if(!1===(r=i?i.call(n,c,d,u):void 0)||void 0===r&&c!==d)return!1}return!0}},function(e,t,i){"use strict";t.a=function(e){function t(e,t,n){var r=t.trim().split(f);t=r;var o=r.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<o;++s)t[s]=i(e,t[s],n).trim();break;default:var l=s=0;for(t=[];s<o;++s)for(var u=0;u<a;++u)t[l++]=i(e[u]+" ",r[s],n).trim()}return t}function i(e,t,i){var n=t.charCodeAt(0);switch(33>n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*i&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function n(e,t,i,o){var a=e+";",s=2*t+3*i+4*o;if(944===s){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===P||2===P&&r(l,1)?"-webkit-"+l+l:l}if(0===P||2===P&&!r(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(C,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return h.test(a)?a.replace(d,":-webkit-")+a.replace(d,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(b,"tb");break;case 232:l=a.replace(b,"tb-rl");break;case 220:l=a.replace(b,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(_,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(_,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===T.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?n(e.replace("stretch","fill-available"),t,i,o).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===i+o&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+a}return a}function r(e,t){var i=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?i:10);return i=e.substring(i+1,e.length-1),O(2!==t?n:n.replace(S,"$1"),i,t)}function o(e,t){var i=n(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return i!==t+";"?i.replace(E," or ($1)").substring(4):"("+t+")"}function a(e,t,i,n,r,o,a,s,u,c){for(var d,h=0,p=t;h<D;++h)switch(d=R[h].call(l,e,p,i,n,r,o,a,s,u,c)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function s(e){return void 0!==(e=e.prefix)&&(O=null,e?"function"!=typeof e?P=1:(P=2,O=e):P=0),s}function l(e,i){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<D){var l=a(-1,i,s,s,x,k,0,0,0,0);void 0!==l&&"string"==typeof l&&(i=l)}var d=function e(i,s,l,d,h){for(var p,f,g,b,E,_=0,S=0,T=0,C=0,R=0,O=0,L=g=p=0,M=0,F=0,U=0,B=0,V=l.length,z=V-1,H="",j="",q="",G="";M<V;){if(f=l.charCodeAt(M),M===z&&0!==S+C+T+_&&(0!==S&&(f=47===S?10:47),C=T=_=0,V++,z++),0===S+C+T+_){if(M===z&&(0<F&&(H=H.replace(c,"")),0<H.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:H+=l.charAt(M)}f=59}switch(f){case 123:for(p=(H=H.trim()).charCodeAt(0),g=1,B=++M;M<V;){switch(f=l.charCodeAt(M)){case 123:g++;break;case 125:g--;break;case 47:switch(f=l.charCodeAt(M+1)){case 42:case 47:e:{for(L=M+1;L<z;++L)switch(l.charCodeAt(L)){case 47:if(42===f&&42===l.charCodeAt(L-1)&&M+2!==L){M=L+1;break e}break;case 10:if(47===f){M=L+1;break e}}M=L}}break;case 91:f++;case 40:f++;case 34:case 39:for(;M++<z&&l.charCodeAt(M)!==f;);}if(0===g)break;M++}switch(g=l.substring(B,M),0===p&&(p=(H=H.replace(u,"").trim()).charCodeAt(0)),p){case 64:switch(0<F&&(H=H.replace(c,"")),f=H.charCodeAt(1)){case 100:case 109:case 115:case 45:F=s;break;default:F=I}if(B=(g=e(s,F,g,f,h+1)).length,0<D&&(E=a(3,g,F=t(I,H,U),s,x,k,B,f,h,d),H=F.join(""),void 0!==E&&0===(B=(g=E.trim()).length)&&(f=0,g="")),0<B)switch(f){case 115:H=H.replace(w,o);case 100:case 109:case 45:g=H+"{"+g+"}";break;case 107:g=(H=H.replace(m,"$1 $2"))+"{"+g+"}",g=1===P||2===P&&r("@"+g,3)?"@-webkit-"+g+"@"+g:"@"+g;break;default:g=H+g,112===d&&(j+=g,g="")}else g="";break;default:g=e(s,t(s,H,U),g,d,h+1)}q+=g,g=U=F=L=p=0,H="",f=l.charCodeAt(++M);break;case 125:case 59:if(1<(B=(H=(0<F?H.replace(c,""):H).trim()).length))switch(0===L&&(p=H.charCodeAt(0),45===p||96<p&&123>p)&&(B=(H=H.replace(" ",":")).length),0<D&&void 0!==(E=a(1,H,s,i,x,k,j.length,d,h,d))&&0===(B=(H=E.trim()).length)&&(H="\0\0"),p=H.charCodeAt(0),f=H.charCodeAt(1),p){case 0:break;case 64:if(105===f||99===f){G+=H+l.charAt(M);break}default:58!==H.charCodeAt(B-1)&&(j+=n(H,p,f,H.charCodeAt(2)))}U=F=L=p=0,H="",f=l.charCodeAt(++M)}}switch(f){case 13:case 10:47===S?S=0:0===1+p&&107!==d&&0<H.length&&(F=1,H+="\0"),0<D*N&&a(0,H,s,i,x,k,j.length,d,h,d),k=1,x++;break;case 59:case 125:if(0===S+C+T+_){k++;break}default:switch(k++,b=l.charAt(M),f){case 9:case 32:if(0===C+_+S)switch(R){case 44:case 58:case 9:case 32:b="";break;default:32!==f&&(b=" ")}break;case 0:b="\\0";break;case 12:b="\\f";break;case 11:b="\\v";break;case 38:0===C+S+_&&(F=U=1,b="\f"+b);break;case 108:if(0===C+S+_+A&&0<L)switch(M-L){case 2:112===R&&58===l.charCodeAt(M-3)&&(A=R);case 8:111===O&&(A=O)}break;case 58:0===C+S+_&&(L=M);break;case 44:0===S+T+C+_&&(F=1,b+="\r");break;case 34:case 39:0===S&&(C=C===f?0:0===C?f:C);break;case 91:0===C+S+T&&_++;break;case 93:0===C+S+T&&_--;break;case 41:0===C+S+_&&T--;break;case 40:if(0===C+S+_){if(0===p)switch(2*R+3*O){case 533:break;default:p=1}T++}break;case 64:0===S+T+C+_+L+g&&(g=1);break;case 42:case 47:if(!(0<C+_+T))switch(S){case 0:switch(2*f+3*l.charCodeAt(M+1)){case 235:S=47;break;case 220:B=M,S=42}break;case 42:47===f&&42===R&&B+2!==M&&(33===l.charCodeAt(B+2)&&(j+=l.substring(B,M+1)),b="",S=0)}}0===S&&(H+=b)}O=R,R=f,M++}if(0<(B=j.length)){if(F=s,0<D&&(void 0!==(E=a(2,j,F,i,x,k,B,d,h,d))&&0===(j=E).length))return G+j+q;if(j=F.join(",")+"{"+j+"}",0!=P*A){switch(2!==P||r(j,2)||(A=0),A){case 111:j=j.replace(y,":-moz-$1")+j;break;case 112:j=j.replace(v,"::-webkit-input-$1")+j.replace(v,"::-moz-$1")+j.replace(v,":-ms-input-$1")+j}A=0}}return G+j+q}(I,s,i,0,0);return 0<D&&(void 0!==(l=a(-2,d,s,s,x,k,d.length,0,0,0))&&(d=l)),"",A=0,k=x=1,d}var u=/^\0+/g,c=/[\0\r\f]/g,d=/: */g,h=/zoo|gra/,p=/([,: ])(transform)/g,f=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,m=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,y=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,_=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,k=1,x=1,A=0,P=1,I=[],R=[],D=0,O=null,N=0;return l.use=function e(t){switch(t){case void 0:case null:D=R.length=0;break;default:if("function"==typeof t)R[D++]=t;else if("object"==typeof t)for(var i=0,n=t.length;i<n;++i)e(t[i]);else N=0|!!t}return e},l.set=s,void 0!==e&&s(e),l}},function(e,t,i){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e){e.exports=JSON.parse('{"a":"/api/v1/prompter"}')},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="small-12 columns large-centered video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a href="#allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a href="#myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a href="#sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w('</a></li><a id="refreshPrompterPages" class="refresh"><img src="/svg/refresh.svg"></a>').x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('</ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="large-12 columns prompt-settings" id="promptPropertiesId"><div class="medium-3 columns font-size text-left right-bar" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="columns medium-3 right-bar linespace-container" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="medium-4 columns slider right-bar"><div class="small-5 columns"><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="small-1 columns text-center speed-minus-container ').x(t.get(["inactive_minus_speed"],!1),t,{block:y},{}).w('"><img id="speedDecreaseId" class="minus" src="/svg/minus-ico-white.svg" width="10"></div><div class="small-4 columns text-center speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="5" ></span></div><div class="small-1 columns text-center speed-plus-container left ').x(t.get(["inactive_plus_speed"],!1),t,{block:b},{}).w('"><img id="speedIncreaseId" class="plus" src="/svg/plus-ico-white.svg" width="10"></div></div><div class="medium-2 columns"><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="large-12 columns telepromterColumnContainer" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="small-6 small-offset-3 columns video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}function y(e,t){return e.w(" in-active")}function b(e,t){return e.w(" in-active")}e.register("templates/wiz/video_prompter",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/video_prompter",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="small-12 columns large-centered video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a data-tab="allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a data-tab="myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a data-tab="sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w("</a></li>").x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('<a id="refreshPrompterPages" class="refresh"><img src="/svg/refresh.svg"></a></ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="large-12 columns prompt-settings" id="promptPropertiesId"><div class="medium-3 columns font-size text-center right-bar" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="/svg/minusicon.svg" width="25"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="/svg/plusicon.svg" width="25"></label></div><div class="columns medium-3 right-bar linespace-container text-center" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minusicon.svg" width="25"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plusicon.svg" width="25"></label></div><div class="medium-4 columns slider right-bar"><div class="small-5 columns"><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="small-1 columns text-center speed-minus-container ').x(t.get(["inactive_minus_speed"],!1),t,{block:y},{}).w('"><img id="speedDecreaseId" class="minus" src="/svg/minusicon.svg" width="10"></div><div class="small-4 columns text-center speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="5" ></span></div><div class="small-1 columns text-center speed-plus-container left ').x(t.get(["inactive_plus_speed"],!1),t,{block:b},{}).w('"><img id="speedIncreaseId" class="plus" src="/svg/plusicon.svg" width="10"></div></div><div class="medium-2 columns text-center"><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="large-12 columns ').x(t.get(["newRecorderScreen"],!1),t,{else:w,block:E},{}).w(' custom-scroll" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="small-6 small-offset-3 columns video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="large-12 columns text-center vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter_new.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}function y(e,t){return e.w(" in-active")}function b(e,t){return e.w(" in-active")}function w(e,t){return e.w("telepromterColumnContainer")}function E(e,t){return e.w("hvteleprompter-column-container")}e.register("templates/wiz/video_prompter_new",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/video_prompter_new",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="video-prompter-container"><ul class="tabs vpr-tab" data-tab id="scriptTypesId"><li class="tab-title active" id="allVideoScriptsTitle"><a href="#allVideoScripts">').f(t.getPath(!1,["videoPrompter","allScripts"]),t,"h").w('</a></li><li class="tab-title" id="myVideoScriptsTitle"><a href="#myVideoScripts">').f(t.getPath(!1,["videoPrompter","myScripts"]),t,"h").w('</a></li><li class="tab-title" id="sharedScriptsTitle"><a href="#sharedScripts">').f(t.getPath(!1,["videoPrompter","shared"]),t,"h").w('</a></li><a id="refreshPrompterPages" class="refresh"><img src="/svg/refresh.svg"></a>').x(t.get(["can_add_new_scripts"],!1),t,{block:i},{}).w('</ul><div class="tabs-content sf-tab-content" id="scriptListId"><div class="content active" id="allVideoScripts">').h("eq",t,{else:n,block:o},{key:t.getPath(!1,["all_scripts","length"]),value:0},"h").w('</div><div class="content" id="myVideoScripts">').h("eq",t,{else:s,block:u},{key:t.getPath(!1,["my_scripts","length"]),value:0},"h").w('</div><div class="content" id="sharedScripts">').h("eq",t,{else:d,block:p},{key:t.getPath(!1,["shared_scripts","length"]),value:0},"h").w('</div></div><div id="testelement"></div><div class="display-video-prompt hide" id="promptSettingsContainer"><div class="prompt-settings" id="promptPropertiesId"><div class="font-size text-left right-bar col-grid-3" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><div><h6>').f(t.getPath(!1,["videoPrompter","textSizeChange"]),t,"h").w('</h6></div><label id="textSizeDecrease" class="minus').x(t.get(["inactive_minus"],!1),t,{block:f},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="textSizeIncrease" class="plus').x(t.get(["inactive_plus"],!1),t,{block:g},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="right-bar linespace-container col-grid-3" hv-tooltip="').f(t.getPath(!1,["videoPrompter","propertyHidden"]),t,"h").w('"><div><h6>').f(t.getPath(!1,["videoPrompter","lineSpaceChange"]),t,"h").w('</h6></div><label id="lineSpaceDecrease" class="minus').x(t.get(["inactive_minus_linespace"],!1),t,{block:m},{}).w('"><img src="/svg/minus-ico-white.svg" width="10"></label><label id="lineSpaceIncrease" class="plus').x(t.get(["inactive_plus_linespace"],!1),t,{block:v},{}).w('"><img src="/svg/plus-ico-white.svg" width="10"></label></div><div class="slider right-bar"><div><h6>').f(t.getPath(!1,["videoPrompter","speedLabel"]),t,"h").w('</h6></div><div class="speed-minus-container"><img id="speedDecreaseId" class="minus" src="/svg/minus-ico-white.svg" width="10"></div><div class="speed-slider-container"><span id="speedSliderId" data-min="1" data-max="10" data-value="5" ></span></div><div class="speed-plus-container left"><img id="speedIncreaseId" class="plus" src="/svg/plus-ico-white.svg" width="10"></div></div><div class=""><a id="changeScriptId" class="change-script">').f(t.getPath(!1,["videoPrompter","changeScript"]),t,"h").w('</a></div></div><div class="telepromterColumnContainer" id="telepromterColumnContainer"><div id="teleprompterId" contentEditable="true" class="video-teleprompter"></div><div id="teleprompterSiblingDiv"></div></div></div></div>')}function i(e,t){return e.w('<a id="addNewScriptFromPrompt" class="hp-border-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function n(e,t){return e.s(t.get(["all_scripts"],!1),t,{block:r},{})}function r(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function o(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","allScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:a},{}).w("</div>")}function a(e,t){return e.w('<a id="addNewScriptFromAllScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function s(e,t){return e.s(t.get(["my_scripts"],!1),t,{block:l},{})}function l(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function u(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","myScriptEmptyStateText"]),t,"h").w("</h4>").x(t.get(["can_add_new_scripts"],!1),t,{block:c},{}).w("</div>")}function c(e,t){return e.w('<a id="addNewScriptFromMyScripts" class="button wiz-primary-btn">').f(t.getPath(!1,["videoPrompter","addNewScript"]),t,"h").w("</a>")}function d(e,t){return e.s(t.get(["shared_scripts"],!1),t,{block:h},{})}function h(e,t){return e.w('<div class="script-list" id="').f(t.get(["id"],!1),t,"h").w('" data-text="').f(t.get(["script_text"],!1),t,"h").w('">').f(t.get(["title"],!1),t,"h").w("</div>")}function p(e,t){return e.w('<div class="vpr-empty-state"><img class="empty-state-img" src="/svg/teleprompter.svg" width="60"><h4>').f(t.getPath(!1,["videoPrompter","sharedEmptyStateText"]),t,"h").w("</h4></div>")}function f(e,t){return e.w(" in-active")}function g(e,t){return e.w(" in-active")}function m(e,t){return e.w(" in-active")}function v(e,t){return e.w(" in-active")}e.register("templates/wiz/sdk_video_prompter",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/wiz/sdk_video_prompter",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n=i(615),r=0;e.exports=function(e){var t=++r;return n(e)+t}},function(e,t,i){var n,r;n=[i(625),i(630),i(7)],void 0===(r=function(e,t,i){return function(n){var r=!1;try{r=HippoVideo.data.api.getProperty("isLessonly")}catch(e){}return r=r||"lessonly"==i.getQueryParams().type||"lessonly"==i.getQueryParams().integration_type,n.isDelivery&&!r||n.isNewPlayer?new t(n):new e(n)}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return T}));i(96),i(183),i(24),i(244),i(56),i(71),i(84),i(112),i(62),i(175),i(51),i(85),i(86),i(136),i(60),i(137);var n=i(98),r=i.n(n),o=i(97),a=i.n(o),s=i(1),l=i.n(s),u=i(0),c=i.n(u),d=i(392),h=i.n(d),p=i(397),f=i.n(p),g=i(6),m=i.n(g),v=i(38),y=i(100),b=i.n(y),w=i(398);function E(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function S(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function T(t){var i=this;console.log("SE INIT PROPS ",t.videoPlayerView);var n=t.videoPlayerView,o=t.token,s=t.tokenType,d=t.recorder,p=t.recorderApiModel,g=t.isPersonalisationEnabled,y=t.customColors,_=t.footageUrls,T=t.showSimpleEditor,C=t.projectJson,k=t.integrationType,x=t.onSimpleEditorInitialize,A=Object(u.useState)(d.recordDetails),P=A[0],I=A[1],R=Object(u.useContext)(v.a).recorderInitOptions.edit,D=window._HVDomain||"https://www.hippovideo.io",O=Object(u.useRef)(!1),N=Object(u.useRef)(),L=Object(u.useRef)(C),M=Object(u.useRef)();Object(u.useEffect)(function(){var e=this;if(l()(this,i),!P||!P.asset_id)return d.getRecordDetails().then(function(t){l()(this,e),I(t)}.bind(this)).catch(function(t){l()(this,e),console.log("ERROR IN GETTING RECORD DETAILS ",t)}.bind(this)),function(){l()(this,e),d.cancelGetRecordDetails()}.bind(this)}.bind(this),[d]);var F=function(){if(l()(this,i),P.asset_id){var e={el:N.current,videoPlayerView:n,integration_type:k,assetId:P&&P.asset_id,token:o,tokenType:s,recorder:d,recorderApiModel:p,isBlurEnabled:!0,embeddedDigest:P&&P.delivery_token,isPersonalizationEnabled:g,customColors:y,authoringId:P&&P.authoring_id,footageUrls:_};console.log("SIMPLE EDIT OPTIONS ",e),M.current?(console.log("1"),M.current.initialize(e)):(console.log("2"),M.current=new h.a(e)),x&&x(M.current)}}.bind(this),U=function(){l()(this,i);try{var e={};if(R&&"object"===a()(R)&&null!==R)for(var t in R)!1!==R[t]&&"false"!==R[t]||(e[t]="false");return e}catch(e){return{}}}.bind(this);return Object(u.useEffect)(function(){l()(this,i),N.current&&(N.current.innerHTML+=f()(e.extend(b.a,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?S(Object(i),!0).forEach((function(t){r()(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):S(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({shouldHideTrimTimer:"true",integrationType:k,isAddImageEnabled:!1,canShowPersonalization:g,mfValues:m.a.personalization.defaultMergeFields,origin:D},U()))),O.current=!0,console.log("CONTROLS ADDED >>>",N.current))}.bind(this),[N]),Object(u.useEffect)(function(){l()(this,i),n&&N.current&&P&&O.current&&F()}.bind(this),[n,N,P,O]),Object(u.useEffect)(function(){if(l()(this,i),M.current)if(T){M.current.enable();var e,t=E(N.current.getElementsByClassName("simple-edit-container"));try{for(t.s();!(e=t.n()).done;){e.value.classList.remove("hide")}}catch(e){t.e(e)}finally{t.f()}M.current.height="140px"}else{var n,r=E(N.current.getElementsByClassName("simple-edit-container"));try{for(r.s();!(n=r.n()).done;){n.value.classList.add("hide")}}catch(e){r.e(e)}finally{r.f()}M.current.height="0"}}.bind(this),[T]),Object(u.useEffect)(function(){var e=this;return l()(this,i),L.current=C,C&&M.current&&n&&(setTimeout(function(){l()(this,e),M.current.setProjectJson(C)}.bind(this),300),n.show()),function(){l()(this,e)}.bind(this)}.bind(this),[C]),Object(u.useEffect)(function(){var e=this;l()(this,i),M.current&&n&&L.current&&(setTimeout(function(){l()(this,e),console.log("PROJECT JSON 123",C),M.current.setProjectJson(C)}.bind(this),300),n.show())}.bind(this),[M,n]),c.a.createElement(w.a,{showSimpleEditor:!0,ref:N})}}).call(this,i(10))},function(e,t,i){var n,r;n=[i(2),i(10),i(35),i(7),i(11),i(325),i(632),i(633),i(6),i(48),i(186),i(185),i(140),i(634),i(237),i(635),i(709),i(117),i(138),i(139),i(73),i(696),i(697),i(698),i(356),i(701),i(702),i(115),i(704),i(707)],void 0===(r=function(e,t,i,n,r,o,a,s,l,u,c,d,h,p,f,g,m,v){var y;return d=d.default,r=r.default,a=a.default,m=m.default,s=s.default,i.View.extend({initialize:function(t){y=d.getVideoI18N_v2(),this.$el=t.$el||e(t.el),this.videoPlayerView=t.videoPlayerView,this.assetId=t.assetId,this.token=t.token,this.tokenType=t.tokenType,this.recorder=t.recorder,this.recorderApiModel=t.recorderApiModel,this.digest=t.digest,this.integrationType=t.integration_type,this.embeddedDigest=t.embeddedDigest,this.isPersonalizationEnabled=t.isPersonalizationEnabled,this.customColors=t.customColors,this.overrideWarnOnExit=t.overrideWarnOnExit,this.isPPR=t.isPPR,this.enabled=!1,this.askReloadConfirmation=!1,this.onBoardRequired=this.isOnBoardRequired(),this.currentSelectedText=void 0,this.currentSelectedSticker=void 0,this.currentSelectedCallout=void 0,this.currentSelectedBlur=void 0,this.showingColorPicker=!1,this.blurPlayInterval=void 0,this.isBlurEnabled=t.isBlurEnabled,this.authoringId=t.authoringId,this.footageUrls=t.footageUrls||{},this.closeImportCallback=t.closeImportCallback||function(){},this.openImportCallback=t.openImportCallback||function(){},this.defaultTextAreaValue=y.simpleEdit.enterTextHere,this.isMac=window.navigator.userAgent.indexOf("Mac")>=0,this.isTicketVideoPreview=t.isTicketViewPreview,this.isAssignmentVideoPreview=t.isAssignmentVideoPreview,this.isTestimonialVideoPreview=t.isTestimonialVideoPreview,this.isGuestRecording=t.isGuestRecording,this.fromQuickRecord=t.fromQuickRecord,this.canInitializeUI=t.initEditUI,this.initSettingModel(),this.brand_colors=[],this.defaultFontValue="timesnewroman",this.brand_font_color="#000000",this.colorPaletteEnabled=t.colorPaletteEnabled,this.isPPR=t.isPPR,this.fontCache={},this.sessionDetails={addedClips:[],primaryVideo:void 0,secondaryVideo:void 0,trimSliderStart:0,trimSliderEnd:0,totalAddedEffects:0},this.stickerSize=[],this.stickers={1:{name:"Smileys",mainId:1124,startId:945,endId:1935},2:{name:"Animals&Nature",mainId:315,startId:286,endId:434},3:{name:"Food&Drink",mainId:932,startId:854,endId:944},4:{name:"Objects",mainId:1947,startId:1936,endId:2134},5:{name:"Travel&Places",mainId:435,startId:435,endId:547},6:{name:"Activity",mainId:829,startId:547,endId:853},7:{name:"Symbols",mainId:2340,startId:2135,endId:2428},8:{name:"Flags",mainId:25,startId:2,endId:285}},this.callouts=n.getAvailableCallouts(),this.calloutsDisplayorder=n.getCalloutDisplayorder(),this.selectPrimaryVideo=this.selectPrimaryVideo.bind(this),this.selectSecondaryVideo=this.selectSecondaryVideo.bind(this),this.userEventStart=this.userEventStart.bind(this),this.userEventStop=this.userEventStop.bind(this),this.selectTrim=this.selectTrim.bind(this),this.selectCrop=this.selectCrop.bind(this),this.selectAddText=this.selectAddText.bind(this),this.selectAddCallouts=this.selectAddCallouts.bind(this),this.selectAddStickers=this.selectAddStickers.bind(this),this.selectAddImage=this.selectAddImage.bind(this),this.hanldeImageAspectRatioChange=this.hanldeImageAspectRatioChange.bind(this),this.deleteImage=this.deleteImage.bind(this),this.changeImageOpacity=this.changeImageOpacity.bind(this),this.addImage=this.addImage.bind(this),this.addPersonalizedImage=this.addPersonalizedImage.bind(this),this.processSelectedImage=this.processSelectedImage.bind(this),this.createNewImage=this.createNewImage.bind(this),this.addWebsiteImageBtn=this.addWebsiteImageBtn.bind(this),this.applyCrop=this.applyCrop.bind(this),this.resetCrop=this.resetCrop.bind(this),this.addEnteredText=this.addEnteredText.bind(this),this.textPropertyChanged=this.textPropertyChanged.bind(this),this.textEditableChanged=this.textEditableChanged.bind(this),this.deleteText=this.deleteText.bind(this),this.addNewSticker=this.addNewSticker.bind(this),this.deleteSticker=this.deleteSticker.bind(this),this.stickerPropertyChanged=this.stickerPropertyChanged.bind(this),this.calloutPropertyChanged=this.calloutPropertyChanged.bind(this),this.deleteCallout=this.deleteCallout.bind(this),this.playerTimeUpdate=this.playerTimeUpdate.bind(this),this.makeVideoResizeableDraggable=this.makeVideoResizeableDraggable.bind(this),this.selectBlur=this.selectBlur.bind(this),this.selectAddBlur=this.selectAddBlur.bind(this),this.deleteBlur=this.deleteBlur.bind(this),this.addNewBlur=this.addNewBlur.bind(this),this.blurPropertyChanged=this.blurPropertyChanged.bind(this),this.blurAreaChanged=this.blurAreaChanged.bind(this),this.handleVideoPlay=this.handleVideoPlay.bind(this),this.handleVideoPause=this.handleVideoPause.bind(this),this.handleVideoSeeked=this.handleVideoSeeked.bind(this),this.newComponentDragged=this.newComponentDragged.bind(this),this.newComponentDropped=this.newComponentDropped.bind(this),this.getReloadConfirmationState=this.getReloadConfirmationState.bind(this),this.checkAndPopulateMf=this.checkAndPopulateMf.bind(this),this.playerResized=this.playerResized.bind(this),this.textBoxResized=this.textBoxResized.bind(this),this.initializeAtwho=this.initializeAtwho.bind(this),this.fontLoaded=this.fontLoaded.bind(this),this.markerSelected=this.markerSelected.bind(this),this.globalKeypress=this.globalKeypress.bind(this),this.initSettingModel=this.initSettingModel.bind(this),this.getBrandingInfoSuccess=this.getBrandingInfoSuccess.bind(this),this.cropResizable=this.videoPlayerView.$el.find(".se-crop-resizable"),this.primaryVideoContainer=this.videoPlayerView.$el.find(".primary-video-container"),this.primaryVideoOverflowContainer=this.videoPlayerView.$el.find(".primary-video-overflow-container"),this.secondaryVideoContainer=this.videoPlayerView.$el.find(".secondary-video-container"),this.secondaryVideoOverflowContainer=this.videoPlayerView.$el.find(".secondary-video-overflow-container"),this.infoText=this.$el.find(".default-control-detail .info-text"),r.initializeJQueryTouchPunch(),this.$el.find(".se-text-properties").unbind("change").bind("change",this.textPropertyChanged),0!=this.canInitializeUI&&this.initializeUI(),e(document).bind("mousedown",{that:this},this.globalClick),this.$el.find(".trim-btn").unbind("click").bind("click",this.selectTrim),this.$el.find(".crop-btn").unbind("click").bind("click",this.selectCrop),this.$el.find(".add-text-btn").unbind("click").bind("click",this.selectAddText),this.$el.find(".add-callouts-btn").unbind("click").bind("click",this.selectAddCallouts),this.$el.find(".add-stickers-btn").unbind("click").bind("click",this.selectAddStickers),this.$el.find(".add-image-btn").unbind("click").bind("click",this.selectAddImage),this.$el.find(".apply-crop").unbind("click").bind("click",this.applyCrop),this.$el.find(".reset-crop").unbind("click").bind("click",this.resetCrop),this.$el.find(".add-text").unbind("click").bind("click",this.addEnteredText),this.videoPlayerView.$el.find(".se-text-editable").unbind("keypress").bind("keypress",this.textEditableChanged),this.videoPlayerView.$el.find(".se-clip-time").unbind("click").bind("click",{that:this},this.showClipTimePop),this.videoPlayerView.$el.find(".timer-input-btn").unbind("click").bind("click",{that:this},this.clipInputButtonClicked),this.videoPlayerView.$el.find(".timer-start-input, .timer-stop-input").unbind("keyup").bind("keyup",{that:this},this.clipInputtyped),this.$el.find(".se-sticker-btn").unbind("click").bind("click",{that:this},this.stickerBtnClicked),this.$el.find(".delete-sticker").unbind("click").bind("click",this.deleteSticker),this.$el.find(".sticker-control").unbind("change").bind("change",{that:this},this.stickerPropertyChanged),this.$el.find(".se-callout-btn").unbind("click").bind("click",{that:this},this.calloutBtnClicked),this.$el.find(".delete-callout").unbind("click").bind("click",this.deleteCallout),this.$el.find(".callout-control").unbind("change").bind("change",{that:this},this.calloutPropertyChanged),this.$el.find(".lock-aspect-ratio").unbind("click").bind("click",{that:this},this.lockAspectRatio),this.$el.find(".sticker-family-container").unbind("click").bind("click",{that:this},this.showStickerFamily),this.$el.find(".callout-scroll-right, .callout-scroll-left").unbind("click").bind("click",{that:this},this.scrollCallouts),this.$el.find(".addtext-input-text").unbind("keyup").bind("keyup",{that:this},this.addTextChanged),this.$el.find(".trim-input-btn").unbind("click").bind("click",{that:this},this.trimInputButtonClicked),this.$el.find(".trim-before-input, .trim-after-input").unbind("keyup").bind("keyup",{that:this},this.trimInputTyped),this.$el.find(".trim-before-time").unbind("click").bind("click",{that:this},this.showTrimBeforePop),this.$el.find(".trim-after-time").unbind("click").bind("click",{that:this},this.showTrimAfterPop),this.$el.find("#blurBtn").unbind("click").bind("click",this.selectAddBlur),this.$el.find("#resizeDragBtn").unbind("click").bind("click",this.makeVideoResizeableDraggable),this.$el.find(".delete-blur").unbind("click").bind("click",this.deleteBlur),this.$el.find("#applyBlur").unbind("click").bind("click",{that:this},this.addNewBlur),this.$el.find(".blur-control").unbind("click").bind("click",this.blurPropertyChanged),this.$el.find("#imageOpacitySlider").unbind("change").bind("change",this.changeImageOpacity),this.$el.find("#imageOpacityInput").unbind("change keyup").bind("change keyup",this.changeImageOpacity),this.$el.find("#imageArLock").unbind("change").bind("change",this.hanldeImageAspectRatioChange),this.$el.find("#deleteImage").unbind("click").bind("click",this.deleteImage),this.$el.find("#addImageBtn").unbind("click").bind("click",this.addImage),this.$el.find("#addPersonalizedImageBtn").unbind("click").bind("click",this.addPersonalizedImage),this.$el.find("#addWebsiteImageBtn").unbind("click").bind("click",this.addWebsiteImageBtn),this.$el.find("#imageOpacitySlider").val(100),!(this.isGuestRecording||this.isTicketVideoPreview||this.isAssignmentVideoPreview||this.isTestimonialVideoPreview||"true"!=e("#isAddImageInVideoEnabled").val())||this.$el.find("#addImageMenuBtn").remove(),this.isTicketVideoPreview&&this.$el.find(".merge-field-container").remove(),document.fonts&&(document.fonts.onloadingdone=this.fontLoaded),this.videoPlayerView.setUpdateHandler(this.playerTimeUpdate),this.videoPlayerView.setPlayPauseHandler(this.handleVideoPlay,!0),this.videoPlayerView.setPlayPauseHandler(this.handleVideoPause,!1),this.videoPlayerView.setSeekedHandler(this.handleVideoSeeked),this.videoPlayerView.setPlayerResizeHandler(this.playerResized),this.userEmail=e("#userEmail").val(),e(document).bind("keydown",{that:this},this.globalKeypress),this.applyCustomColors(),this.addCustomFontStyles(),HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg&&HippoVideo.AppRegistry.isPersonalizationEnabled&&e("#addTextBtn").hide()},initSettingModel:function(){var e=this;this.settingModel=new c({settingTabName:l.wizSetting.BRANDING});var t={};try{if(HippoVideo&&HippoVideo.data&&HippoVideo.data.api&&HippoVideo.data.api.getProperty&&""!=HippoVideo.data.api.getProperty("userEmail"))t={authentication_token:HippoVideo.data.api.getProperty("authToken"),email:encodeURIComponent(HippoVideo.data.api.getProperty("userEmail"))},this.settingModel.fetch({data:t,success:function(t){e.brand_colors=t.get("info").brand_colors,t.get("info").brand_font&&(e.defaultFontValue=t.get("info").brand_font.toLowerCase().replace(/\s/g,""),e.$el.find(".se-font-selector").val(e.defaultFontValue)),t.get("info").brand_font_color&&(e.brand_font_color=t.get("info").brand_font_color),e.setupSpectrum()}});else if(this.digest||this.recorderApiModel){var i=e.getPageSource();this.recorderApiModel?this.recorderApiModel.getBrandingInfo().then((function(t){e.getBrandingInfoSuccess(t,e)})).catch((function(e){console.error(e)})):this.settingModel.getDigestInfo(this.digest,i,(function(t){e.getBrandingInfoSuccess(t,e)}))}}catch(e){console.error(e)}},getBrandingInfoSuccess:function(e,t){t.brand_colors=e.brand_colors,e.brand_font&&(t.defaultFontValue=e.brand_font.toLowerCase().replace(/\s/g,""),t.$el.find(".se-font-selector").val(t.defaultFontValue)),e.brand_font_color&&(t.brand_font_color=e.brand_font_color),t.setupSpectrum()},getPageSource:function(){return"true"==e("#isTestimonial").val()?"testimonial":e("#isGuestRecording").val()?"guest":"lessonly"==n.getQueryParams().type?"lessonly":"generic_embed"==n.getQueryParams().type?"generic_embed":this.integrationType?this.integrationType:""},resizeHandler:function(){this.mediaContainerResized(this.primaryVideoContainer),this.mediaContainerResized(this.secondaryVideoContainer)},initializeUI:function(){var t=this;this.defaultFontValue="timesnewroman",this.$el.find(".trim-slider").slider({range:!0,min:0,max:1e3,step:1,values:[0,1e3],start:function(){t.unselectAllComponents()},slide:function(e,i){t.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(i.values[0]),t.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(1e3-i.values[1]),t.trimChanged(),t.trimSliding(i)},stop:function(e){t.$el.find(".trim-before-container, .trim-after-container").removeClass("trim-hovered"),t.trimChanged()}}),this.cropResizable.resizable({containment:t.videoPlayerView.$el.find(".se-crop-scale"),handles:"n, e, w, s, ne, nw, se, sw",resize:function(e,i){t.cropResized(!0)},stop:function(){t.cropStopped()}}),this.makeVideoContainerResizable(this.primaryVideoContainer,this.$el.find(".primaryvid-control-detail .lock-aspect-ratio").is(":checked")),this.primaryVideoContainer.draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:this.userEventStart,stop:function(){t.unselectAllComponents(),t.userEventStop()}}),this.makeVideoContainerResizable(this.secondaryVideoContainer,this.$el.find(".secondaryvid-control-detail .lock-aspect-ratio").is(":checked")),this.secondaryVideoContainer.draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .primary-video-container, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:this.userEventStart,stop:function(){t.unselectAllComponents(),t.userEventStop()}}),e(".primary-video-container, .secondary-video-container").hover((function(){e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover")}),(function(){e(this).removeClass("se-components-hover")}));var i=n.getFontMap(),r=[];for(var o in i)r.push(o);r=r.sort();for(var a=0;a<r.length;a++){o=r[a];this.$el.find(".se-font-selector").append(e("<option>",{value:o,text:i[o].family,style:"font-family: "+i[o].family+";"})),this.defaultFontValue=i[o].isDefault?o:this.defaultFontValue}this.$el.find(".se-font-selector").val(this.defaultFontValue),this.$el.find(".sticker-btn-container").empty();for(var s in this.stickers){var l=this.stickers[s];this.$el.find(".sticker-btn-container").append(p({i:s,mainImg:"https://s3.amazonaws.com/hippolms-wiz-static/stickers-preview/s"+l.mainId+".png?v=2"})),this.downloadAndSetStickers(this,s,l.startId,l.endId)}for(var u in this.$el.find(".callout-btn-container").empty(),this.calloutsDisplayorder){s=this.calloutsDisplayorder[u];var c=document.createElement("img");e(c).addClass("se-callout-btn"),c.id="se-callout-btn-"+s,c.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+s+".png?v=2",c.crossOrigin="Anonymous",this.$el.find(".callout-btn-container").append(c),this.findCalloutSize(s)}this.$el.find(".se-callout-btn").draggable({scroll:!1,helper:"clone",revert:"invalid",revertDuration:100,start:this.newComponentDragged,stop:this.newComponentDropped}),this.$el.find(".se-sticker-btn").draggable({scroll:!1,appendTo:"body",stack:".se-sticker-btn",helper:"clone",revert:"invalid",revertDuration:100,start:this.newComponentDragged,stop:this.newComponentDropped}),this.videoPlayerView.$el.find(".se-crop-resizable").droppable({accept:".se-sticker-btn, .se-callout-btn",drop:function(e,i){t.componentDropped(i.draggable[0].id,e.pageX-t.videoPlayerView.$el.find(".se-crop-scale").offset().left-40,e.pageY-t.videoPlayerView.$el.find(".se-crop-scale").offset().top-40)}}),this.videoPlayerView.$el.find(".se-clip-time").resizable({containment:e(".components-time-container"),handles:"e, w",resize:function(e,t){},stop:function(){t.onClipTimeChangeHandler(),t.updateTimeFromClipToPopup(t)}});var d=this.$el.find(".addtext-control-detail .color-picker .sp-replacer"),h=document.createElement("div");e(h).addClass("text-color-picker"),e(h).text("A"),e(d).prepend(h),this.$el.find(".se-font-selector").select2({minimumResultsForSearch:-1,theme:"hippocategory",width:"element",dropdownCssClass:"et-dropdown-css",templateResult:function(t,i){return t.element&&e(i)[0].style.setProperty("font-family",e(t.element).css("font-family"),"important"),t.text}}),this.$el.find(".se-fontsize-selector").select2({minimumResultsForSearch:-1,theme:"hippocategory"}),this.isPersonalizationEnabled&&(this.$el.find("#seMfSelector").select2({tags:!0,multiple:!1,theme:"hippocategory",templateResult:function(t,i){return t.element&&e(i).addClass("selection-in-blue"),t.text}}),this.mfValues=["{Email}","{First Name}","{Last Name}","{Country}","{City}","{Phone Number}","{Company Name}","{Title}","{State}","{Address}"],this.$el.find("#seMfSelector").on("change",{that:this},this.handleMfChange)),this.$el.find(".se-textalign-selector").select2({minimumResultsForSearch:-1,dropdownAutoWidth:!0,theme:"hippocategory",templateSelection:function(e){return'<img width="10" src="/svg/text-'+e.id+'-align.svg"/>'},templateResult:function(e){return e.id||(e.id="center"),'<img width="10" style="margin-right:5px" src="/svg/text-'+e.id+'-align.svg"/>'+e.text},escapeMarkup:function(e){return e}}).next(".select2-container").addClass("textalign-select2"),this.$el.find(".select2-selection__rendered").removeAttr("title"),this.disable(),this.cropResized(!1),this.enableBlurForPlayer()},setupSpectrum:function(){e(".sp-container").remove();var t=this,i={showInput:!0,preferredFormat:"rgb",clickoutFiresChange:!0,chooseText:"set",color:t.brand_font_color,show:function(){t.showingColorPicker=!0,e(".seColorContainer").length>0&&e(".seColorContainer")[0].scrollIntoView({block:"end",behavior:"smooth"})},hide:function(){t.showingColorPicker=!1},move:function(){t._previewColorChange()},change:function(){t._handleColorChange(),t.showingColorPicker=!1},containerClassName:"seColorContainer"};if(this.brand_colors&&this.brand_colors.length>0){var n=s.getPaletteConfig(this.brand_colors,"seColorContainer",this.colorPaletteEnabled);i=Object.assign(i,n)}this.$el.find(".se-color-selector").spectrum(i)},_previewColorChange:function(){if(this.currentSelectedText){var t=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString();e("#se-component-"+this.currentSelectedText+" .text-el-line").css("color",t)}},_handleColorChange:function(){this.setTextColorInClip()},setTextColorInClip:function(){if(this.currentSelectedText){var e=this.getClipOf(this.currentSelectedText);e&&(e.properties.color=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString(),this.updateProjectJson(),this.reconstructUI())}},downloadAndSetStickers:function(t,i,n,r){if(!(n>=r)){var o=document.createElement("img");e(o).addClass("se-sticker-btn"),o.id="se-sticker-btn-"+n,o.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/transparent.png?v=2";var a=(n-2)%50*-20,s=-20*Math.floor((n-2)/50);o.style.background="url('https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/stickers_all.png?v=2') "+a+"px "+s+"px",t.$el.find(".sticker-family-container-"+i+" .sticker-family-all").append(o),t.findStickerSize(n),e(o).unbind("click").bind("click",{that:t},t.stickerBtnClicked),setTimeout((function(){t.downloadAndSetStickers(t,i,n+1,r)}),10)}},enable:function(){this.enabled=!0;try{HippoVideo.data.api.getProperty("isTrimEnabled")&&this.$el.find(".simple-edit-buttons-box").hide()}catch(e){}this.primaryVideoContainer.css("z-index","100"),this.secondaryVideoContainer.css("z-index","101"),this.videoPlayerView.setSimpleEditMode(!0),this.unselectAllControls(),this.videoPlayerView.$el.find(".se-crop-highlighter").css({background:"rgba(72, 72, 72, 0.97)","z-index":"108"}),this.videoPlayerView.$el.css("overflow","visible"),this.videoPlayerView.$el.find(".se-crop-scale").css({top:"0px",left:"0px"}),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),1,1,0,0),e("#previewPageLeft").addClass("simple-edit-top-pad"),e(".body-wiz").addClass("tmp-body-wiz").removeClass("body-wiz"),e(".tmp-body-wiz").css("margin-top","105px"),e(".tmp-body-wiz").animate({marginTop:"0px"},200),this.videoPlayerView.$el.find(".thumbnail-container").hide(),this.videoPlayerView.$el.find(".play-btn-container").fadeOut(100),this.videoPlayerView.$el.find(".player-touch-guard").hide(),this.snapshot={},this.snapshot.projectJson=n.naiveClone(this.projectJson),this.snapshot.trimSliderStart=this.sessionDetails.trimSliderStart,this.snapshot.trimSliderEnd=this.sessionDetails.trimSliderEnd,this.snapshot.addedClips=n.naiveClone(this.sessionDetails.addedClips),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.snapshot.crop={x:this.cropResizable.position().left,y:this.cropResizable.position().top,w:this.cropResizable.width(),h:this.cropResizable.height()},this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.onBoardRequired?(this.onBoardRequired=!1,this.onBoardUser()):(this.$el.find(".default-control-detail").show(),this.infoText.html(" ")),this.reconstructUI(),this.videoPlayerView.resizePlayerForWindow(),this.$el.find("#trimBtn").length>0?this.selectTrim():this.$el.find(".simple-edit-buttons-box .wiz-simple-edit-btn").first().click(),!1===this.overrideWarnOnExit&&(window.onbeforeunload=function(){return"Please save before you close!!"}),this.prefetchAssetsForSimpleEdit()},save:function(){this.disable(),this.disabled(),this.projectJson.simpleEdit=!0,this.projectJson.seSessionDetails=this.sessionDetails,this.renderVideo()},renderVideo:function(){var e=this;this.recorder?this.recorder.renderVideo({assetId:this.assetId,projectJson:this.getIOAdjustedProjectJSON(),renderFrom:"simple_edit"}).then((function(){n.trackInDB("SE-Save",e.userEmail),e.isPPR&&e._getVideoModel().urgent_videos([e.assetId],(function(){o.trigger("remountCtaActions")}))})).catch((function(e){console.error(err)})):this._getVideoModel().mergeAndRender(this.assetId,this.getIOAdjustedProjectJSON(),"simple_edit",this.digest,(function(t){n.trackInDB("SE-Save",e.userEmail),e.isPPR&&e._getVideoModel().urgent_videos([e.assetId],(function(){o.trigger("remountCtaActions")}))}),(function(e){console.log("error ",e)}))},cancel:function(){this.cancelCrop(),this.disable(),this.projectJson=this.snapshot.projectJson,this.sessionDetails.trimSliderStart=this.snapshot.trimSliderStart,this.sessionDetails.trimSliderEnd=this.snapshot.trimSliderEnd,this.sessionDetails.addedClips=this.snapshot.addedClips;var e=this;this.reconstructUI(!0,(function(){e.disabled()}))},disable:function(){this.enabled=!1,this.unselectAllComponents(),this.unselectAllControls(),this.primaryVideoContainer.css("z-index","0"),this.primaryVideoContainer.resizable({disabled:!0}),this.primaryVideoContainer.draggable({disabled:!0}),this.secondaryVideoContainer.css("z-index","0"),this.secondaryVideoContainer.resizable({disabled:!0}),this.secondaryVideoContainer.draggable({disabled:!0}),this.videoPlayerView.setSimpleEditMode(!1),this.videoPlayerView.$el.find(".player-border").fadeOut(),this.videoPlayerView.$el.find(".player-touch-guard").show(),e(".tmp-body-wiz").animate({marginTop:"0px"},200,(function(){e(".tmp-body-wiz").addClass("body-wiz").removeClass("tmp-body-wiz")})),this.askReloadConfirmation=!1,!1===this.overrideWarnOnExit&&(window.onbeforeunload=void 0)},disabled:function(){this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.reconstructUI(),this.cropResized(!1,!1),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-text-component, .se-image-component").draggable({disabled:!0}),this.videoPlayerView.$el.find(".se-text-component").unbind("click"),this.videoPlayerView.$el.find(".se-text-component").css({"user-select":"none",cursor:"default"}),this.videoPlayerView.$el.find(".se-crop-highlighter").css({background:"black","z-index":"200"}),this.videoPlayerView.$el.css("overflow","hidden");var e=this.cropResizable.height(),t=this.cropResizable.width(),i=this.videoPlayerView.$el.width(),n=this.videoPlayerView.$el.height(),r=i/t,o=n/e;if(r*e>n){var a=this.cropResizable.position().top,s=i/2-t*o/2-this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("top",-a+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),o,o,this.cropResizable.position().left,a),this.videoPlayerView.$el.find(".se-crop-scale").css("left",s+"px")}else{a=n/2-e*r/2-this.cropResizable.position().top,s=this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("left",-s+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),r,r,s,this.cropResizable.position().top),this.videoPlayerView.$el.find(".se-crop-scale").css("top",a+"px")}this.cropResizable.removeClass("disp-show").addClass("disp-none")},setProjectJson:function(e){if(this.projectJson=e,window.projectJson=this.projectJson,this.projectJson.simpleEdit=!0,null!=this.projectJson.seSessionDetails)this.sessionDetails=this.projectJson.seSessionDetails;else{this.sessionDetails.totalCreatedClips=this.projectJson.clips.length;for(var t=!1,i=0;i<this.projectJson.clips.length;i++){"webcam"==(s=this.projectJson.clips[i]).footage.type&&!0,"screenrecord"==s.footage.type&&(t=!0)}var n=-1,r=[],o=JSON.parse(JSON.stringify(this.projectJson.clips||[]));for(i=0;i<this.projectJson.clips.length;i++){(s=o[i]).properties.xposRaw=this.getValueForPlayer(s.properties.xpos,!0),s.properties.yposRaw=this.getValueForPlayer(s.properties.ypos,!1),s.properties.widthRaw=this.getValueForPlayer(s.properties.width,!0),s.properties.heightRaw=this.getValueForPlayer(s.properties.height,!1),"screenrecord"!=s.footage.type&&"webcam"!=s.footage.type||(n=-1==n?s.footage.duration:Math.min(n,s.footage.duration),r.push(s.footage)),s.footage.containsVideo&&("screenrecord"==s.footage.type||"webcam"==s.footage.type&&!t?(this.sessionDetails.primaryVideo=s.id,this.sessionDetails.totalAddedEffects=(s.effects||[]).length):"webcam"==s.footage.type&&(this.sessionDetails.secondaryVideo=s.id))}for(var i in r)r[i].duration=n}for(i=0;i<this.projectJson.clips.length;i++){var s=this.projectJson.clips[i];this.isImageComponent(s.id)&&("image"==s.footage.type?s.footage.src=this.footageUrls[Number(s.footage.id)]:s.footage.src=a.getMfImage(s.footage.image_id?s.footage.image_id:s.footage.id,s.footage.is_website?"website":"image"))}this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),null==this.sessionDetails.secondaryVideo&&this.secondaryVideoContainer.hide(),this.reconstructUI(),this.cropResized(!1,!1),this.enabled||this.disabled()},mediaContainerResized:function(e){var t=e.find("video");0==t.length&&(t=e.find("img"));var i=e.width()/t.width(),n=e.height()/t.height();t.css("height",""),this.scaleElement(t,i,n)},scaleElement:function(e,t,i,n,r){e.css({"-ms-transform":"scale("+t+","+i+")","-webkit-transform":"scale("+t+","+i+")",transform:"scale("+t+","+i+")","-ms-transform-origin:":null==n?"top left":n+"px "+r+"px","-webkit-transform-origin":null==n?"top left":n+"px "+r+"px","transform-origin":null==n?"top left":n+"px "+r+"px"})},globalClick:function(t){HippoVideo&&HippoVideo.AppRegistry&&HippoVideo.AppRegistry.isDeepIntg&&("saveTextEdit"!==t.target.id&&"cancelTextEdit"!==t.target.id||e("#"+t.target.id).is(":visible")&&e("#"+t.target.id).click());var i=t.data.that;i.enabled&&(i.currentSelectedText,0!=i.videoPlayerView.$el.find(".se-text-editable").has(e(t.target)).length||0!=i.videoPlayerView.$el.find(".se-text-component").has(e(t.target)).length||e(t.target).hasClass("se-text-component")||e(t.target).hasClass("se-text-editable")||null==i.currentSelectedText||e(t.target).parent().hasClass("atwho-view-ul")||(i.textEditableChanged(),i.videoPlayerView.$el.find(".se-text-editable").is(":visible")?i.closeTextEditable():0==i.$el.find(".addtext-control-detail").has(e(t.target)).length&&0==i.videoPlayerView.$el.find(".player-controls-container").has(e(t.target)).length&&0==e(".sp-picker-container").has(e(t.target)).length&&0==e(".sp-palette-container").has(e(t.target)).length&&i.unselectText()),0!=i.$el.has(e(t.target)).length||0!=i.videoPlayerView.$el.has(e(t.target)).length||i.showingColorPicker||e(t.target).parent().hasClass("atwho-view-ul")||i.unselectAllComponents(),0==i.$el.find(".sticker-family-container").has(e(t.target)).length&&i.$el.find(".sticker-family-all").hide(),!e(t.target).hasClass("trim-before-pop")&&0==i.$el.find(".trim-before-pop").has(e(t.target)).length&&i.$el.find(".trim-before-pop").is(":visible")&&i.$el.find(".trim-before-pop").fadeOut(100),!e(t.target).hasClass("trim-after-pop")&&0==i.$el.find(".trim-after-pop").has(e(t.target)).length&&i.$el.find(".trim-after-pop").is(":visible")&&i.$el.find(".trim-after-pop").fadeOut(100))},selectPrimaryVideo:function(){this.enabled&&(this.primaryVideoOverflowContainer.css("overflow","visible"),this.primaryVideoContainer.addClass("edit-video-selected").css("z-index","105").resizable("enable"),this.secondaryVideoContainer.removeClass("edit-video-selected").css("z-index","106").resizable("disable"),this.$el.find(".primaryvid-control-detail").show(),this.$el.find(".secondaryvid-control-detail").hide())},selectSecondaryVideo:function(){this.enabled&&(this.secondaryVideoOverflowContainer.css("overflow","visible"),this.secondaryVideoContainer.addClass("edit-video-selected").css("z-index","105").resizable("enable"),this.primaryVideoContainer.removeClass("edit-video-selected").css("z-index","105").resizable("disable"),this.$el.find(".primaryvid-control-detail").hide(),this.$el.find(".secondaryvid-control-detail").show())},makeVideoResizeableDraggable:function(){this.enabled&&(this.isPPR?n.trackInThirdPartyTools("video_preview_Resize_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Resize_save",{email:this.userEmail}),this.unselectAllControls(),this.userEventStart(),this.unselectAllComponents(),this.selectPrimaryVideo(),this.selectControl("resize-draggable-btn"),this.primaryVideoContainer.unbind("mousedown",this.selectPrimaryVideo).bind("mousedown",this.selectPrimaryVideo).draggable("enable"),this.secondaryVideoContainer.unbind("mousedown",this.selectSecondaryVideo).bind("mousedown",this.selectSecondaryVideo).draggable("enable"),this.$el.find(".se-resize-control-detail").show())},unselectClips:function(){this.primaryVideoContainer.unbind("mousedown",this.selectPrimaryVideo).resizable({disabled:!0}).draggable({disabled:!0}),this.secondaryVideoContainer.unbind("mousedown",this.selectSecondaryVideo).resizable({disabled:!0}).draggable({disabled:!0}),this.$el.find(".se-resize-control-detail, .primaryvid-control-detail, .secondaryvid-control-detail").hide(),this.primaryVideoOverflowContainer.css("overflow","hidden"),this.secondaryVideoOverflowContainer.css("overflow","hidden"),this.primaryVideoContainer.css("z-index","100"),this.secondaryVideoContainer.css("z-index","101"),e(".edit-video-selected").removeClass("edit-video-selected")},userEventStart:function(){this.videoPlayerView.$el.find(".player-border").fadeIn()},userEventStop:function(){this.videoPlayerView.$el.find(".player-border").fadeOut(),this.updateProjectJson()},playerResized:function(e){if(null!=this.projectJson&&(this.enabled||(this.videoPlayerView.$el.find(".se-crop-scale").css({top:"0px",left:"0px"}),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),1,1,0,0)),this.cropResizable.removeClass("disp-none").addClass("disp-show"),null!=this.projectJson.crop&&this.cropResizable.css({left:this.getValueForPlayer(this.projectJson.crop.x,!0)+"px",top:this.getValueForPlayer(this.projectJson.crop.y,!1)+"px",width:this.getValueForPlayer(this.projectJson.crop.w,!0)+"px",height:this.getValueForPlayer(this.projectJson.crop.h,!1)+"px"}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.reconstructUI(),this.cropResized(!1,!1),!this.enabled)){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-none").addClass("disp-show");var t=this.cropResizable.height(),i=this.cropResizable.width(),n=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=n/i,a=r/t;if(o*t>r){var s=this.cropResizable.position().top,l=n/2-i*a/2-this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("top",-s+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),a,a,this.cropResizable.position().left,s),this.videoPlayerView.$el.find(".se-crop-scale").css("left",l+"px")}else{s=r/2-t*o/2-this.cropResizable.position().top,l=this.cropResizable.position().left;this.videoPlayerView.$el.find(".se-crop-scale").css("left",-l+"px"),this.scaleElement(this.videoPlayerView.$el.find(".se-crop-scale"),o,o,l,this.cropResizable.position().top),this.videoPlayerView.$el.find(".se-crop-scale").css("top",s+"px")}this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-show").addClass("disp-none"),this.videoPlayerView.resizeFitThumnbail()}},updateProjectJson:function(){if(this.enabled){var t=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),i=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);if(n.isNumber(t)&&n.isNumber(i))for(var r=0;r<this.projectJson.clips.length;r++){var o=this.projectJson.clips[r];if(this.updateClipPropertiesForProjectJSON(o,t,i),o.id===this.sessionDetails.primaryVideo)for(var a=o.effects||[],s=0;s<a.length;s++)this.updateClipPropertiesForProjectJSON(a[s],t,i)}var l=this.cropResizable.is(":visible");this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.projectJson.crop={x:this.getValueForProject(this.cropResizable.position().left,!0),y:this.getValueForProject(this.cropResizable.position().top,!1),w:Math.min(this.getValueForProject(this.cropResizable.width(),!0),this.projectJson.canvasWidth),h:Math.min(this.getValueForProject(this.cropResizable.height(),!1),this.projectJson.canvasHeight)},l||this.cropResizable.removeClass("disp-show").addClass("disp-none");for(r=0;r<this.projectJson.clips.length;r++){a=(o=this.projectJson.clips[r]).effects||[];null!=this.sessionDetails.primaryVideo&&o.id==this.sessionDetails.primaryVideo&&(o.properties.widthRaw=this.primaryVideoContainer.width(),o.properties.heightRaw=this.primaryVideoContainer.height(),o.properties.xposRaw=this.primaryVideoContainer.position().left,o.properties.yposRaw=this.primaryVideoContainer.position().top,o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1)),null!=this.sessionDetails.secondaryVideo&&o.id==this.sessionDetails.secondaryVideo&&(o.properties.widthRaw=this.secondaryVideoContainer.width(),o.properties.heightRaw=this.secondaryVideoContainer.height(),o.properties.xposRaw=this.secondaryVideoContainer.position().left,o.properties.yposRaw=this.secondaryVideoContainer.position().top,o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1)),-1!==this.sessionDetails.addedClips.indexOf(o.id)&&o.footage.containsImage&&(e("#se-component-"+o.id).length>0?(o.properties.xposRaw=e("#se-component-"+o.id).position().left,o.properties.yposRaw=e("#se-component-"+o.id).position().top,o.properties.widthRaw=e("#se-component-"+o.id).width(),o.properties.heightRaw=e("#se-component-"+o.id).height(),o.properties.xpos=this.getValueForProject(o.properties.xposRaw,!0),o.properties.ypos=this.getValueForProject(o.properties.yposRaw,!1),o.properties.width=this.getValueForProject(o.properties.widthRaw,!0),o.properties.height=this.getValueForProject(o.properties.heightRaw,!1)):console.warn("not drawn#se-component-"+o.id)),o.footage.containsText&&(null==o.properties.fontSizeProject&&(o.properties.fontSizeProject=this.getValueForProject(o.properties.fontSize,!0)),o.properties.boundingBoxRaw&&(o.properties.boundingBox=this.getBoundingBoxForProject(o.properties.boundingBoxRaw)))}}},updateClipPropertiesForProjectJSON:function(e,t,i){null!=e.startFrom&&null!=e.endAt?(e.position=e.startFrom-t,0==e.position&&(e.position=.001),e.position>this.videoPlayerView.mediaPlayer.duration-i?e.deleted=!0:e.deleted=!1,e.end=e.endAt-e.startFrom,e.endAt>this.videoPlayerView.mediaPlayer.duration-i&&(e.end=this.videoPlayerView.mediaPlayer.duration-i-e.startFrom),e.end=Math.max(.02,e.end),e.start=0):(e.start=t,e.end=(e.footage?e.footage.duration:e.duration)-i,e.end<e.start&&(e.end=e.start))},reconstructUI:function(t,i){if(this.projectJson){var r=this.videoPlayerView.$el.width()/this.projectJson.canvasWidth,o=this.videoPlayerView.$el.height()/this.projectJson.canvasHeight,a=this,s=!1,l=this.videoPlayerView.$el.find(".se-components-container");l.empty();var u=function(){a.resizeHandler(),i&&!s&&(s=!0,i())};void 0===this.sessionDetails.primaryVideo&&void 0===this.sessionDetails.secondaryVideo&&this.updateProjectJson();var c=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),d=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);n.isNumber(c)&&n.isNumber(d)&&this.videoPlayerView.trim(c,d,!0);for(var h=JSON.parse(JSON.stringify(this.projectJson.clips||[])),p=0;p<this.projectJson.clips.length;p++){var f=h[p];if(null!=this.sessionDetails.primaryVideo&&f.id==this.sessionDetails.primaryVideo&&this.primaryVideoContainer.animate({width:f.properties.width*r+"px",height:f.properties.height*o+"px",left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"},t?200:10,u),null!=this.sessionDetails.secondaryVideo&&f.id==this.sessionDetails.secondaryVideo&&this.secondaryVideoContainer.animate({width:f.properties.width*r+"px",height:f.properties.height*o+"px",left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"},t?200:10,u),-1!=this.sessionDetails.addedClips.indexOf(f.id)){a=this;if(f.footage.containsText){(m=document.createElement("div")).id="se-component-"+f.id,e(m).addClass("se-text-component"),f.properties.boundingBox?(f.properties.boundingBoxRaw={x:f.properties.boundingBox.x*r,y:f.properties.boundingBox.y*o,w:f.properties.boundingBox.w*r,h:f.properties.boundingBox.h*o},e(m).css({left:f.properties.boundingBoxRaw.x+"px",top:f.properties.boundingBoxRaw.y+"px",width:f.properties.boundingBoxRaw.w+"px",height:f.properties.boundingBoxRaw.h+"px"})):e(m).css({left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px"}),this.setTextDraggableContainerSize(m,f,!1);var g=document.createElement("div");e(g).addClass("se-text-container"),this.checkAndPopulateMf(f.properties.text),this.newlineTextToHtml(g,f),e(m).append(g),e(m).append('<span class="se-text-delete">x</span>'),e(m).find(".se-text-delete").bind("click",this.deleteText),e(m).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,start:function(e){a.selectText(e.target.id.split("se-component-")[1]),a.userEventStart()},stop:function(){a.textBoxResized(),a.textPropertyChanged(),a.userEventStop()}}),f.footage.calloutId&&e(m).draggable("option","containment","#se-component-"+f.footage.calloutId),e(m).click((function(e){if(!((new Date).getTime()-a.lastTextResizeTime<100)){var t=a.currentSelectedText==e.currentTarget.id.split("se-component-")[1];a.selectText(e.currentTarget.id.split("se-component-")[1]),t&&a.showTextEditable(e.currentTarget.id.split("se-component-")[1])}})),e(m).hover((function(t){a.currentSelectedText!=t.currentTarget.id.split("se-component-")[1]&&(e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover"))}),(function(t){a.currentSelectedText!=t.currentTarget.id.split("se-component-")[1]&&e(this).removeClass("se-components-hover")})),l.append(m),f.id==this.currentSelectedText&&this.selectText(f.id,!0),this.setLineHeight(f)}else if(f.footage.containsImage){var m=document.createElement("div"),v=document.createElement("img");v.crossOrigin="Anonymous",m.id="se-component-"+f.id,e(m).addClass("se-image-component"),f.footage.id<=-1e4?v.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+(-f.footage.id-1e4)+".png?v=2":this.isImageComponent(f.id)?v.src=f.footage.src:v.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers/s"+(-f.footage.id-100)+".png?v=2",e(m).css({left:f.properties.xpos*r+"px",top:f.properties.ypos*o+"px",width:f.properties.width*r+"px",height:f.properties.height*o+"px",opacity:f.properties.opacity}),e(m).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,drag:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)&&a.calloutDragged()},start:function(t){var i=t.target.id.split("se-component-")[1];if(null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)){a.selectCallout(i);var r=a.getClipOf(i),o=a.getClipOf(r.footage.textId);o&&o.properties.boundingBoxRaw&&(a.calloutTextBoxSpread={x:n.map(o.properties.boundingBoxRaw.x,r.properties.xposRaw,r.properties.xposRaw+r.properties.widthRaw,0,1),y:n.map(o.properties.boundingBoxRaw.y,r.properties.yposRaw,r.properties.yposRaw+r.properties.heightRaw,0,1),w:o.properties.boundingBoxRaw.w/r.properties.widthRaw})}else a.selectSticker(i);a.userEventStart()},stop:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?(a.calloutDragged(),a.calloutPropertyChanged()):a.stickerPropertyChanged(),a.userEventStop(),a.isCalloutImage(i)?a.unselectCallout():a.unselectSticker()}}),e(m).resizable({handles:"n, e, w, s, ne, nw, se, sw",aspectRatio:f.properties.lockAspectRatio,resize:function(t,i){a.mediaContainerResized(e(t.target));var n=t.target.id.split("se-component-")[1];null==n&&(n=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(n)&&a.calloutResized(n)},start:function(t){var i=t.target.id.split("se-component-")[1];if(null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)){a.selectCallout(i);var r=a.getClipOf(i),o=a.getClipOf(r.footage.textId);o&&o.properties.boundingBoxRaw&&(a.calloutTextBoxSpread={x:n.map(o.properties.boundingBoxRaw.x,r.properties.xposRaw,r.properties.xposRaw+r.properties.widthRaw,0,1),y:n.map(o.properties.boundingBoxRaw.y,r.properties.yposRaw,r.properties.yposRaw+r.properties.heightRaw,0,1),w:o.properties.boundingBoxRaw.w/r.properties.widthRaw})}else a.selectSticker(i);a.userEventStart()},stop:function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?(a.calloutResized(i),a.calloutPropertyChanged()):a.stickerPropertyChanged(),a.userEventStop(),a.setAdaptiveBorderForTarget(e(t.target))}}),this.currentSelectedSticker!=f.id&&this.currentSelectedCallout!=f.id&&e(m).resizable({disabled:!0}),e(m).find(".ui-resizable-handle").css("display",""),e(m).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se"),e(m).click((function(t){var i=t.target.id.split("se-component-")[1];null==i&&(i=e(t.target).parent()[0].id.split("se-component-")[1]),a.isCalloutImage(i)?a.selectCallout(i):a.selectSticker(i)})),e(m).hover((function(){e(".se-components-hover").removeClass("se-components-hover"),e(this).addClass("se-components-hover")}),(function(){e(this).removeClass("se-components-hover")})),e(m).append(v),l.append(m),this.currentSelectedSticker!=f.id&&this.currentSelectedCallout!=f.id||this.setAdaptiveBorderForTarget(e("#se-component-"+f.id)),a.mediaContainerResized(e(m))}}}this.initializeAtwho(),this.applyEffects(),this.resizeHandler(),this.playerTimeUpdate()}},checkAndPopulateMf:function(t){if(this.isPersonalizationEnabled)for(var i,n=0,r=t.indexOf("${",0);-1!=r&&-1!=n;){-1!=(n=t.indexOf("}",r))&&(i=t.substring(r+2,n),this.mfValues.includes("{"+i+"}")||(this.mfValues.push("{"+i+"}"),this.$el.find("#seMfSelector").append(e("<option>"+i+"</option>"))),r=t.indexOf("${",n))}},applyEffects:function(){var t,i=this.getClipOf(this.sessionDetails.primaryVideo),n=this;if(i){var r=i.effects||[],o=this.videoPlayerView.$el.find(".se-effects-components-container");o.empty();for(var a=0;a<r.length;a++){(t=r[a]).xposRaw=this.getValueFromClipPercent(t.xpos,i,!0),t.yposRaw=this.getValueFromClipPercent(t.ypos,i,!1),t.widthRaw=this.getValueFromClipPercent(t.width,i,!0),t.heightRaw=this.getValueFromClipPercent(t.height,i,!1);var s=document.createElement("div");s.id="se-effects-"+t.id,s.className="se-effects",s.style.left=t.xposRaw+"px",s.style.top=t.yposRaw+"px",s.style.width=t.widthRaw+"px",s.style.height=t.heightRaw+"px",e(s).draggable({scroll:!1,opacity:.9,snap:".hippo-video-player, .se-crop-highlighter",snapMode:"both",snapTolerance:10,containment:".primary-video-container",start:function(e){n.selectBlur(e.target.id.split("se-effects-")[1]),n.userEventStart()},stop:function(e){n.blurAreaChanged(),n.userEventStop()}}).resizable({handles:"n, e, w, s, ne, nw, se, sw",aspectRatio:t.lockAspectRatio,containment:".primary-video-container",start:function(t){var i=t.target.id.split("se-effects-")[1];i||(i=e(t.target).parent()[0].id.split("se-effects-")[1]),n.selectBlur(i),n.userEventStart()},stop:function(t){n.blurAreaChanged(),n.userEventStop(),n.setAdaptiveBorderForTarget(e(t.target))}}).mousedown((function(e){n.selectBlur(e.target.id.split("se-effects-")[1]),e.stopPropagation()})),this.currentSelectedBlur!=t.id&&e(s).resizable({disabled:!0}),e(s).find(".ui-resizable-handle").css("display",""),e(s).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se"),o.append(s)}}this.drawBlurLayer()},getValueForPlayer:function(e,t){var i=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=this.projectJson.canvasWidth,a=this.projectJson.canvasHeight;return t?n.roundNumber(e*(i/o),3):n.roundNumber(e*(r/a),3)},getValueForProject:function(e,t){var i=this.videoPlayerView.$el.width(),r=this.videoPlayerView.$el.height(),o=this.projectJson.canvasWidth,a=this.projectJson.canvasHeight;return t?n.roundNumber(e*(o/i),3):n.roundNumber(e*(a/r),3)},getBoundingBoxForProject:function(e){var t={x:this.getValueForProject(e.x,!0),y:this.getValueForProject(e.y,!1),w:this.getValueForProject(e.w,!0),h:this.getValueForProject(e.h,!1)};return null!=e.topPadding&&(t.topPadding=this.getValueForProject(e.topPadding,!1)),t},getValueForClip:function(e,t,i){var r=t.properties.widthRaw,o=t.properties.heightRaw;return i?n.roundNumber(n.map(e,0,r,0,1),5):n.roundNumber(n.map(e,0,o,0,1),5)},getValueFromClipPercent:function(e,t,i){var r=t.properties.widthRaw,o=t.properties.heightRaw;return i?n.roundNumber(e*r,5):n.roundNumber(e*o,5)},onBoardUser:function(){var t=this;this.unselectAllControls(),this.$el.find(".default-control-detail").show(),this.infoText.html("Resize and Move videos.."),this.secondaryVideoOverflowContainer.css("overflow","visible"),this.secondaryVideoContainer.find(".ui-resizable-handle").hide(),e.when(this.secondaryVideoContainer.find(".ui-resizable-handle").delay(200).fadeIn(300)).done((function(){e.when(t.secondaryVideoContainer.find(".ui-resizable-handle").fadeOut(300)).done((function(){t.secondaryVideoOverflowContainer.css("overflow","hidden"),t.primaryVideoOverflowContainer.css("overflow","visible"),t.primaryVideoContainer.find(".ui-resizable-handle").hide(),e.when(t.primaryVideoContainer.find(".ui-resizable-handle").delay(500).fadeIn(300)).done((function(){e.when(t.primaryVideoContainer.find(".ui-resizable-handle").fadeOut(300)).done((function(){t.secondaryVideoContainer.find(".ui-resizable-handle").css("display",""),t.primaryVideoContainer.find(".ui-resizable-handle").css("display",""),t.unselectClips(),t.onBoardControls()}))}))}))}))},onBoardControls:function(){var e=this;e.highlightControl(".trim-btn","Trim Video to change start and end points..",(function(){e.highlightControl(".crop-btn","Crop video..",(function(){e.highlightControl(".add-text-btn","Add text to video.",(function(){e.highlightControl(".add-callouts-btn","Add callouts to video",(function(){e.highlightControl(".add-stickers-btn","Add your favourite stickers",(function(){e.infoText.html("Lets go!!"),setTimeout((function(){e.infoText.html(" ")}),1500)}))}))}))}))}))},highlightControl:function(e,t,i){var n=this;n.infoText.delay(300).html(t),n.$el.find(e).animate({opacity:.5},200,(function(){n.$el.find(e).delay(700).animate({opacity:1},200,(function(){i&&i()}))}))},unselectAllControls:function(){this.$el.find(".se-control-detail").hide(),this.unselectCrop(),this.unselectClips(),this.videoPlayerView.$el.find(".components-marker-container").empty()},unselectAllComponents:function(){this.unselectText(),this.unselectSticker(),this.unselectCallout(),this.unselectBlur(),this.primaryVideoOverflowContainer.css("overflow","hidden"),this.secondaryVideoOverflowContainer.css("overflow","hidden")},selectTrim:function(e){null!=e&&(this.askReloadConfirmation=!0),this.isPPR?n.trackInThirdPartyTools("video_preview_Trim_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Trim_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".trim-slider").slider("values",[this.sessionDetails.trimSliderStart,1e3-this.sessionDetails.trimSliderEnd]),this.$el.find(".trim-control-detail").fadeIn(100),this.$el.find(".trim-preview-container, .preview-trim-arrow").hide(),this.updateTrimInput(),this.selectControl("trim-btn"),isFinite(this.videoPlayerView.mediaPlayer.duration)||this.$el.find(".trim-before-container, .trim-after-container").hide()},trimInputButtonClicked:function(t){var i=t.data.that,r=t.target,o=n.map(i.sessionDetails.trimSliderStart,0,1e3,0,i.videoPlayerView.mediaPlayer.duration),a=i.videoPlayerView.mediaPlayer.duration-n.map(i.sessionDetails.trimSliderEnd,0,1e3,0,i.videoPlayerView.mediaPlayer.duration);e.contains(i.$el.find(".trim-before-container")[0],r)?e(r).hasClass("trim-input-btn-minus")?o=Math.max(o-1,0):e(r).hasClass("trim-input-btn-plus")&&(o=Math.min(o+1,i.videoPlayerView.mediaPlayer.duration)):e.contains(i.$el.find(".trim-after-container")[0],r)&&(e(r).hasClass("trim-input-btn-minus")?a=Math.max(a-1,0):e(r).hasClass("trim-input-btn-plus")&&(a=Math.min(a+1,i.videoPlayerView.mediaPlayer.duration))),Math.floor(o)>=Math.floor(a)||(i.$el.find(".trim-before-input").val(n.strToTime(o)),i.$el.find(".trim-after-input").val(n.strToTime(a)),i.trimInputChanged())},trimInputTyped:function(t){var i=t.data.that,r=e(t.target),o=n.map(i.sessionDetails.trimSliderStart,0,1e3,0,i.videoPlayerView.mediaPlayer.duration),a=i.videoPlayerView.mediaPlayer.duration-n.map(i.sessionDetails.trimSliderEnd,0,1e3,0,i.videoPlayerView.mediaPlayer.duration);if(38==t.keyCode||40==t.keyCode){if(t.preventDefault(),38==t.keyCode?r.hasClass("trim-before-input")?o=Math.min(o+1,i.videoPlayerView.mediaPlayer.duration):r.hasClass("trim-after-input")&&(a=Math.min(a+1,i.videoPlayerView.mediaPlayer.duration)):40==t.keyCode&&(r.hasClass("trim-before-input")?o=Math.max(o-1,0):r.hasClass("trim-after-input")&&(a=Math.max(a-1,0))),Math.floor(o)>=Math.floor(a))return;i.$el.find(".trim-before-input").val(n.strToTime(o)),i.$el.find(".trim-after-input").val(n.strToTime(a)),i.trimInputChanged()}else{i=t.data.that;clearTimeout(i.trimInputTypedTimeout),i.trimInputTypedTimeout=setTimeout((function(){i.trimInputChanged()}),500)}},trimInputChanged:function(){var e=n.timeToIntWithMillisecond(this.$el.find(".trim-before-input").val()),t=n.timeToIntWithMillisecond(this.$el.find(".trim-after-input").val()),i=n.map(e,0,this.videoPlayerView.mediaPlayer.duration,0,1e3),r=n.map(t,0,this.videoPlayerView.mediaPlayer.duration,0,1e3);parseInt(i)>=parseInt(r)||(this.$el.find(".trim-slider").slider("values",[i,r]),this.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(i),this.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(1e3-r)),this.trimChanged()},updateTrimInput:function(){var e=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration),t=this.videoPlayerView.mediaPlayer.duration-n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);if(!isFinite(e)||!isFinite(t))return this.$el.find(".trim-before-time").html("-"),void this.$el.find(".trim-after-time").html("-");e=parseFloat(e).toFixed(3),t=parseFloat(t).toFixed(3),this.$el.find(".trim-before-time").html(n.strToTime(e)),this.$el.find(".trim-after-time").html(n.strToTime(t)),this.$el.find(".trim-before-input").val(n.strToTime(e)),this.$el.find(".trim-after-input").val(n.strToTime(t)),this.$el.find(".ruler-dynamic").is(":visible")||(this.drawDynamicRuler(),this.$el.find(".ruler-static").hide(),this.$el.find(".ruler-dynamic").show())},drawDynamicRuler:function(){for(var e=this.$el.find(".ruler-dynamic")[0].width,t=this.$el.find(".ruler-dynamic")[0].height,i=e/this.videoPlayerView.mediaPlayer.duration,n=i,r=2;n<15;r++)n=i*r;var o,a=this.$el.find(".ruler-dynamic")[0],s=a.getContext("2d");s.clearRect(0,0,a.width,a.height),s.lineWidth=1;for(r=0;r<e;r+=n){o=r,s.beginPath(),s.moveTo(r,0),s.lineTo(r,t/2);for(var l=0;l<4;l++)o+=n/5,s.moveTo(o,0),s.lineTo(o,t/3);s.stroke(),s.closePath()}},showTrimBeforePop:function(e){e.data.that.$el.find(".trim-before-pop").fadeIn(100)},showTrimAfterPop:function(e){e.data.that.$el.find(".trim-after-pop").fadeIn(100)},trimSliding:function(t){if(this.$el.find(".trim-preview-video")[0].src.length<=0&&(this.$el.find(".trim-preview-video")[0].src=this.videoPlayerView.mediaPlayer.currentSrc),t.handle==this.$el.find(".trim-slider .ui-slider-handle")[0]){this.$el.find(".trim-before-container").addClass("trim-hovered");var i=n.map(this.sessionDetails.trimSliderStart,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);this.$el.find(".trim-preview-video")[0].currentTime=i,this.$el.find(".trim-preview-container").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[0]).position().left-e(".trim-preview-container").width()/2+"px"),this.$el.find(".preview-trim-arrow").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[0]).position().left)}else{this.$el.find(".trim-after-container").addClass("trim-hovered");var r=n.map(this.sessionDetails.trimSliderEnd,0,1e3,0,this.videoPlayerView.mediaPlayer.duration);this.$el.find(".trim-preview-video")[0].currentTime=this.videoPlayerView.mediaPlayer.duration-r,this.$el.find(".trim-preview-container").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[1]).position().left-+e(".trim-preview-container").width()/2+"px"),this.$el.find(".preview-trim-arrow").css("left",e(this.$el.find(".trim-slider .ui-slider-handle")[1]).position().left)}this.$el.find(".trim-preview-container, .preview-trim-arrow").show(),clearTimeout(this.trimFadeoutTimeout);var o=this;this.trimFadeoutTimeout=setTimeout((function(){o.$el.find(".trim-preview-container, .preview-trim-arrow").fadeOut(200)}),2e3)},trimChanged:function(){this.trimLeadGenerated=!0,this.sessionDetails.trimSliderStart=this.$el.find(".trim-control-detail input.sliderValue[data-index=0]").val(),this.sessionDetails.trimSliderEnd=this.$el.find(".trim-control-detail input.sliderValue[data-index=1]").val(),this.updateTrimInput(),this.updateProjectJson(),this.reconstructUI()},disableTrim:function(){e(".trim-btn").addClass("disabled")},selectCrop:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Crop_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Crop_save",{email:this.userEmail}),this.unselectAllControls(),this.unselectAllComponents(),this.$el.find(".crop-control-detail").fadeIn(100),this.cropResizable.resizable("enable"),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.selectControl("crop-btn")},cropResized:function(t,i){var n=this.cropResizable.is(":visible");if(this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-crop-highlighter").show(),this.videoPlayerView.$el.find(".se-crop-highlighter-right").css("left",this.cropResizable.position().left+this.cropResizable.width()+"px"),this.videoPlayerView.$el.find(".se-crop-highlighter-left").css("right",this.videoPlayerView.$el.width()-this.cropResizable.position().left+"px"),this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").css({top:this.cropResizable.position().top+this.cropResizable.height()+"px",width:this.cropResizable.width()+2+"px",left:this.cropResizable.position().left-1+"px"}),this.videoPlayerView.$el.find(".se-crop-highlighter-top").css({bottom:this.videoPlayerView.$el.height()-this.cropResizable.position().top+"px",width:this.cropResizable.width()+2+"px",left:this.cropResizable.position().left-1+"px"}),null!=this.projectJson&&(null==i&&e(".reposition-webcam").is(":checked")||1==i)){var r=this.webcamSnappedLayoutOnCrop();this.secondaryVideoContainer.css({left:r.x+"px",top:r.y+"px"})}null!=this.projectJson&&t&&this.updateProjectJson(),0==n&&this.cropResizable.removeClass("disp-show").addClass("disp-none")},cropStopped:function(){this.cropResizable.position().left<0&&this.cropResizable.css("left","0"),this.cropResizable.position().top<0&&this.cropResizable.css("top","0"),this.cropResizable.position().left+this.cropResizable.width()>this.videoPlayerView.$el.width()&&this.cropResizable.css("width",this.videoPlayerView.$el.width()-this.cropResizable.position().left+"px"),this.cropResizable.position().top+this.cropResizable.height()>this.videoPlayerView.$el.height()&&this.cropResizable.css("height",this.videoPlayerView.$el.height()-this.cropResizable.position().top+"px"),this.cropResized(!0)},applyCrop:function(){this.unselectCrop(),this.$el.find(".default-control-detail").show()},resetCrop:function(){this.cropResizable.css({left:"0",top:"0",width:"100%",height:"100%"}),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.cropResized(!0),this.unselectCrop(),this.$el.find(".default-control-detail").show()},cancelCrop:function(){this.cropResizable.css({left:this.snapshot.crop.x+"px",top:this.snapshot.crop.y+"px",width:this.snapshot.crop.w+"px",height:this.snapshot.crop.h+"px"}),this.cropResizable.removeClass("disp-none").addClass("disp-show"),this.cropResized(!0,!1),this.unselectCrop(),this.$el.find(".default-control-detail").show()},unselectCrop:function(){this.cropResizable.resizable({disabled:!0}),this.cropResizable.removeClass("disp-show").addClass("disp-none"),this.$el.find(".crop-control-detail").hide()},disableCrop:function(){e(".crop-btn").addClass("disabled")},handleMfChange:function(t){var i=t.data.that,r=i.$el.find("#seMfSelector").find(":selected").val();if("Merge Fields"!==r){if(i.mfValues.includes("{"+r+"}")){if(i.currentSelectedText){var o=i.getClipOf(i.currentSelectedText);o?(o.properties.textUnwrapped!=this.defaultTextAreaValue?o.properties.textUnwrapped+=" ${"+r+"} ":o.properties.textUnwrapped=" ${"+r+"} ",i.showTextEditable(o.id)):i.addEnteredText("${"+r+"} ")}else i.addEnteredText("${"+r+"} ");i.$el.find("#seMfSelector").val("Merge Fields").trigger("change")}else i.mfValues.push("{"+r+"}"),i.$el.find("#seMfSelector").append(e("<option selected>"+r+"</option>")).trigger("change"),e("#select2-seMfSelector-results").find(".select2-results__option--highlighted").remove(),i.initializeAtwho();n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA122,{assetId:this.assetId,email:this.userEmail})}},initializeAtwho:function(){this.isPersonalizationEnabled&&e("#seTextEditable").atwho({at:"$",data:this.mfValues,limit:this.mfValues.length})},selectAddText:function(){this.askReloadConfirmation=!0,n.trackInThirdPartyTools("video_preview_Text_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addtext-control-detail").fadeIn(100),this.showMarkers("text"),this.selectControl("add-text-btn"),this.isTextClipExist()||this.$el.find(".addtext-control-detail").find("#addTextLink").click()},isTextClipExist:function(){if(this.projectJson&&this.projectJson.clips)for(var e=0;e<this.projectJson.clips.length;e++)if("text"==this.projectJson.clips[e].footage.type)return!0;return!1},addEnteredText:function(t){e(".addimage-control-detail").css("margin","0px"),(!t||t instanceof e.Event)&&(t=this.defaultTextAreaValue);var i=this.getMaxDuration(),r=this.sessionDetails.totalCreatedClips;this.projectJson.trackNames.push("Text - "+t.substring(0,10));var o={containsAudio:!1,containsVideo:!1,containsText:!0,duration:i,type:"text"},a=this.$el.find(".se-font-selector").val(),s=this.$el.find(".se-fontsize-selector").val();null==s&&(s=40);var l=this.$el.find(".se-bold-toggle").is(":checked"),u=this.$el.find(".se-italic-toggle").is(":checked"),c=this;this.getFont(a,l,u,(function(n){var l=c.getMetrics(t,s,n),u={w:l.actualWidth+Math.min(100,Math.max(20,l.actualWidth/10)),h:l.fontHeight+Math.min(100,Math.max(20,l.fontHeight/10))};u.x=c.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),u.x+=(c.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-c.videoPlayerView.$el.find(".se-crop-highlighter-left").width()-u.w)/2,u.y=c.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),u.y+=(c.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-c.videoPlayerView.$el.find(".se-crop-highlighter-top").height()-u.h)/2;var d={color:"#000000",font:a,fontSize:s,fontSizeProject:c.getValueForProject(s,!0),fadein:0,fadeout:0,opacity:1,text:t,textUnwrapped:t,textAlign:"center",xposRaw:u.x,yposRaw:u.y,xpos:c.getValueForProject(u.x,!0),ypos:c.getValueForProject(u.y,!1),boundingBoxRaw:u,boundingBox:c.getBoundingBoxForProject(u)},h=Math.max(c.videoPlayerView.getCurrentTime(),.001);c.getLuminanceForClip(d.boundingBoxRaw.x,d.boundingBoxRaw.y,d.boundingBoxRaw.w,d.boundingBoxRaw.h)<128&&(d.color="#FFFFFF");var p={deleted:!1,end:3,footage:o,id:r,position:Math.max(h-c.videoPlayerView.trimStart,.001),properties:d,start:0,track:c.projectJson.totalVideoTracks+1,startFrom:h,endAt:Math.min(c.videoPlayerView.getCurrentTime()+3,i)};c.projectJson.totalVideoTracks++,c.projectJson.clips.push(p),c.sessionDetails.addedClips.push(p.id),c.reconstructUI(),c.currentSelectedText=r,c.videoPlayerView.$el.find(".se-text-editable").val(p.properties.text),c.selectText(r),c.sessionDetails.totalCreatedClips++,c.$el.find(".addtext-control-detail .se-color-choose").spectrum("set",c.brand_font_color||p.properties.color),c.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",p.properties.color),c.textPropertyChanged(!0),e("#se-component-"+r).click()})),n.trackInThirdPartyTools("Add text clicked")},getLuminanceForClip:function(e,t,i,n){if(null==e||null==t||null==i||null==n)return null;var r=this.videoPlayerView.$el.find(".primary-video")[0],o=document.createElement("canvas"),a=this.videoPlayerView.$el.width(),s=this.videoPlayerView.$el.height();o.width=a,o.height=s;var l=o.getContext("2d");l.clearRect(0,0,a,s),l.rect(0,0,a,s),l.globalAlpha=1,l.drawImage(r,0,0,a,s);for(var u=l.getImageData(e,t,i,n),c=u.data.length/4,d=0,h=0,p=0,f=0;f<c;f++)d+=u.data[4*f+0],h+=u.data[4*f+1],p+=u.data[4*f+2];return.2126*(d/=c)+.7152*(h/=c)+.0722*(p/=c)},selectText:function(t,i){if(this.enabled){this.currentSelectedText==t||this.fromQuickRecord||(this.unselectAllControls(),this.unselectAllComponents()),this.$el.find("#textPropertiesTab").show(),this.currentSelectedText=t,this.currentSelectedClip=this.getClipOf(t),this.$el.find(".addtext-control-detail").show();var r=this.getClipOf(t);this.videoPlayerView.$el.find(".se-text-editable").val(r.properties.textUnwrapped?r.properties.textUnwrapped:r.properties.text),this.videoPlayerView.$el.find(".se-text-editable").css({"font-family":null!=n.getFontMap()[r.properties.font]?n.getFontMap()[r.properties.font].css:"","font-size":r.properties.fontSize+"px","font-style":r.properties.italic?"italic":"normal","font-weight":r.properties.bold?"bold":"normal",color:r.properties.color}),this.$el.find(".addtext-input-text").val(r.properties.text),this.$el.find(".se-font-selector").val(this.getFontIfAvailable(r.properties.font)).trigger("change.select2"),this.$el.find(".se-fontsize-selector").val(r.properties.fontSize).trigger("change.select2"),this.$el.find(".se-bold-toggle").prop("checked",r.properties.bold),this.$el.find(".se-italic-toggle").prop("checked",r.properties.italic),this.$el.find(".addtext-control-detail .se-color-choose").spectrum("set",r.properties.color||this.brand_font_color),this.$el.find(".addtext-control-detail .se-shadow-toggle").spectrum("set",r.properties.shadow),this.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",r.properties.color),this.$el.find(".se-textalign-selector").val(r.properties.textAlign?r.properties.textAlign:"left").trigger("change.select2"),e("#se-component-"+this.currentSelectedText).addClass("se-text-component-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+this.currentSelectedText)),e(".se-components-hover").removeClass("se-components-hover"),this.setTextDraggableContainerSize(e("#se-component-"+this.currentSelectedText)[0],r,!0),i||this.showClipTime(r),this.selectControl("add-text-btn"),this.showMarkers("text")}},getFontIfAvailable:function(e){if(null==e)return this.defaultFontValue;for(var t in n.getFontMap())if(t==e)return e;return this.defaultFontValue},setAdaptiveBorderForTarget:function(t){0!=t.length&&(this.getLuminanceForClip(t.position().left,t.position().top,t.width(),t.height())<128?e(t).addClass("white"):e(t).addClass("black"))},unselectText:function(t){if(null!=this.currentSelectedText){this.$el.find("#textPropertiesTab").hide(),t=void 0===t?"callouttext"==this.getClipOf(this.currentSelectedText).footage.type:t,this.closeTextEditable();var i=e("#se-component-"+this.currentSelectedText);this.currentSelectedText=void 0,this.videoPlayerView.$el.find(".se-text-editable").val(""),this.videoPlayerView.$el.find(".se-text-editable").hide(),i&&e(i).removeClass("se-text-component-selected black white").resizable("destroy"),this.$el.find(".se-text-component").show(),t?this.showMarkers("calloutimage"):this.showMarkers("text"),this.videoPlayerView.$el.find(".se-clip-time").hide()}},textEditableChanged:function(t){var i=this.getClipOf(this.currentSelectedText);i.properties.textUnwrapped=this.videoPlayerView.$el.find(".se-text-editable").val().trim(),i.properties.textUnwrapped.trim().length||(i.properties.text=""),this.newlineTextToHtml(e("#se-component-"+this.currentSelectedText+" .se-text-container")[0],i),t&&13==t.keyCode&&!t.shiftKey&&(this.closeTextEditable(),this.unselectText())},addTextChanged:function(e){var t=e.data.that;13==e.keyCode&&t.addEnteredText()},textPropertyChanged:function(t){if(this.currentSelectedText){var i=this.getClipOf(this.currentSelectedText);i&&(i.properties.text=this.getTextFromTextEl(e("#se-component-"+this.currentSelectedText)).trim(),i.properties.font=this.$el.find(".se-font-selector").val(),i.properties.fontSize=this.$el.find(".se-fontsize-selector").val(),(null==i.properties.fontSizeProject||t&&t.target&&e(t.target).hasClass("se-fontsize-selector"))&&(i.properties.fontSizeProject=this.getValueForProject(i.properties.fontSize,!0)),i.properties.bold=this.$el.find(".se-bold-toggle").is(":checked"),i.properties.italic=this.$el.find(".se-italic-toggle").is(":checked"),t&&(i.properties.color=this.$el.find(".addtext-control-detail .se-color-choose").spectrum("get").toHexString()),this.$el.find(".addtext-control-detail .color-picker .sp-replacer .text-color-picker").css("color",i.properties.color),i.properties.textAlign=this.$el.find(".se-textalign-selector").val(),i.properties.xposRaw=e("#se-component-"+this.currentSelectedText).position().left,i.properties.yposRaw=e("#se-component-"+this.currentSelectedText).position().top,i.properties.xpos=this.getValueForProject(i.properties.xposRaw,!0),i.properties.ypos=this.getValueForProject(i.properties.yposRaw,!1),i.footage.calloutId&&(i.properties.offsetX=e("#se-component-"+this.currentSelectedText).position().left-e("#se-component-"+i.footage.calloutId).position().left,i.properties.offsetY=e("#se-component-"+this.currentSelectedText).position().top-e("#se-component-"+i.footage.calloutId).position().top),this.updateProjectJson(),this.reconstructUI())}},showTextEditable:function(e){var t=this.getClipOf(e),i=this.getClipElOf(e);this.videoPlayerView.$el.find(".se-text-editable").css({left:i.position().left+"px",top:i.position().top+"px",width:i.width()+"px",height:i.height()+"px","text-align":t.properties.textAlign}),i.fadeOut();var n=this,r=t.properties.textUnwrapped?t.properties.textUnwrapped:t.properties.text;r=r==this.defaultTextAreaValue?"":r,this.videoPlayerView.$el.find(".se-text-editable").val(r),this.videoPlayerView.$el.find(".se-text-editable").fadeIn(150,(function(){n.videoPlayerView.$el.find(".se-text-editable").focus()}))},closeTextEditable:function(){var t=this.getClipOf(this.currentSelectedText);t&&this.setLineHeight(t),this.videoPlayerView.$el.find(".se-text-editable").hide(),this.videoPlayerView.$el.find(".se-text-component").show(),t&&!t.properties.text.trim().length&&e("#se-component-"+this.currentSelectedText).find(".se-text-delete").click()},deleteText:function(){var e="callouttext"==this.getClipOf(this.currentSelectedText).footage.type;this.removeClip(this.currentSelectedText),this.unselectText(e),this.reconstructUI()},selectAddStickers:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Emoji_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Emoji_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addsticker-selected").hide(),this.$el.find(".addsticker-initial").show(),this.$el.find(".addsticker-control-detail").fadeIn(100),this.showMarkers("sticker"),this.selectControl("add-stickers-btn")},selectAddImage:function(){this.askReloadConfirmation=!0,this.unselectAllControls(),this.$el.find(".addimage-selected").hide(),this.$el.find(".addimage-initial").show(),this.$el.find(".addimage-control-detail").fadeIn(100),this.selectControl("add-image-btn"),this.isPPR?n.trackInThirdPartyTools("video_preview_Image_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA41,{email:this.userEmail})},hanldeImageAspectRatioChange:function(){this.stickerPropertyChanged(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA413,{email:this.userEmail})},deleteImage:function(){this.deleteSticker(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA415,{email:this.userEmail})},changeImageOpacity:function(t){this.$el.find("#imageOpacitySlider").val(""===e(t.currentTarget).val()?0:e(t.currentTarget).val()),this.$el.find("#imageOpacityInput").val(""===e(t.currentTarget).val()?"":parseInt(e(t.currentTarget).val())>100?100:e(t.currentTarget).val()),this.stickerPropertyChanged(),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA414,{email:this.userEmail})},addImage:function(){this.openImportCallback(),new m({type:"image",maximumFilesAllowed:1,maximumPerFileSize:5,isMultiple:!1,showAddMoreTemplate:!1,callbackMethodToHandleFiles:this.processSelectedImage,closeImportCallback:this.closeImportCallback}),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA411,{email:this.userEmail})},addPersonalizedImage:function(){var e={component_type:"image-mf"},t=a.getNewImageMfId(this.projectJson,"image");e.id=t.footageId,e.image_id=t.imageId,e.is_website=!1,e.url=a.getMfImage(e.image_id,"image"),e.addToFootageList=!1,this.createNewImage(e),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA412,{email:this.userEmail})},addWebsiteImageBtn:function(){var e={component_type:"image-mf"},t=a.getNewImageMfId(this.projectJson,"website");e.id=t.footageId,e.image_id=t.imageId,e.is_website=!0,e.url=a.getMfImage(e.image_id,"website"),e.addToFootageList=!1,this.createNewImage(e),n.trackInThirdPartyTools(l.PERSONALIZATION_ACTIONS.PA416,{email:this.userEmail})},processSelectedImage:function(e,t){var i=e[0],n=a.getImportedImageInfo(i),o=[n],s=this;this.$el.find("#imageUploadProgessContainer").show(),this.$el.find("#imageUploadProgressText").text(y.simpleEdit.prepareToImport),(new u).importAssetForSlideShow(JSON.stringify(o),this.assetId,void 0,(function(e){var t=e.video[0];"local_file"==n.upload_type?new v({acl:"private",bucket:t.bucket,key:t.key}).uploadFile(i,void 0,(function(e){s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback(),t.component_type="image",t.addToFootageList=!0,s.createNewImage(t)}),(function(e){r.showBannerAlert(y.simpleEdit.errorMessage,3e3,"error"),r.postErrorsToLog({error:"Error while uploading media to S3 for user.",stackTrace:JSON.stringify(e)}),s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback()})):(s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback(),t.component_type="image",t.addToFootageList=!0,s.createNewImage(t))}),(function(e){r.showBannerAlert(y.simpleEdit.errorMessage,3e3,"error"),r.postErrorsToLog({error:"Error while importing slideshow for user.",stackTrace:JSON.stringify(e)}),s.$el.find("#imageUploadProgessContainer").hide(),s.closeImportCallback()}))},createNewImage:function(e){var t=this.sessionDetails.totalCreatedClips,i=this.getMaxDuration();this.projectJson.trackNames.push("Image");var n={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:e.id.toString(),duration:i,type:e.component_type};"image-mf"===e.component_type&&(n.is_website=e.is_website,n.image_id=e.image_id);var r=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width();r+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2;var o=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height();o+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2;var a=new Image;a.crossOrigin="Anonymous",a.src=e.url;var s=this;a.onload=function(){var l,u=a.width,c=a.height;a.width>s.videoPlayerView.$el.width()?(l=s.videoPlayerView.$el.width()/a.width,u=s.videoPlayerView.$el.width()/3,c=l*a.height/3):a.height>s.videoPlayerView.$el.height()?(l=s.videoPlayerView.$el.height()/a.height,c=s.videoPlayerView.$el.height()/3,u=l*a.width/3):(u=a.width/3,c=a.height/3);var d={fadein:0,fadeout:0,heightRaw:c,widthRaw:u,height:s.getValueForProject(c,!1),width:s.getValueForProject(u,!0),xposRaw:r,yposRaw:o,xpos:s.getValueForProject(r,!0),ypos:s.getValueForProject(o,!1),opacity:1,lockAspectRatio:!0,containsAlpha:!0},h=Math.max(s.videoPlayerView.getCurrentTime(),.001),p={deleted:!1,end:3,footage:n,id:t,position:Math.max(h-s.videoPlayerView.trimStart,.001),properties:d,start:0,track:s.projectJson.totalVideoTracks+1,startFrom:h,endAt:Math.min(s.videoPlayerView.getCurrentTime()+3,i)};s.projectJson.totalVideoTracks++,s.projectJson.clips.push(p),e.addToFootageList&&s.projectJson.footageList.push(e.id),n.src=e.url,s.sessionDetails.addedClips.push(p.id),s.reconstructUI(),s.selectSticker(t),s.sessionDetails.totalCreatedClips++}},isImageComponent:function(e){return"image"==this.getClipOf(e).footage.type||"image-mf"==this.getClipOf(e).footage.type},componentDropped:function(e,t,i){-1!==e.indexOf("se-sticker-btn-")?this.addNewSticker(e.split("se-sticker-btn-")[1],t,i):-1!==e.indexOf("se-callout-btn-")&&this.addNewCallout(e.split("se-callout-btn-")[1],t,i)},stickerBtnClicked:function(e){e.data.that.addNewSticker(e.target.id.split("se-sticker-btn-")[1])},addNewSticker:function(e,t,i){var n=this.sessionDetails.totalCreatedClips,r=this.getMaxDuration();this.projectJson.trackNames.push("Sticker");var o={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:-e-100,duration:r,type:"sticker"};null!=t&&null!=i||(t=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),t+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2,i=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),i+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2);var a={fadein:0,fadeout:0,heightRaw:this.stickerSize[e].height/1.5,widthRaw:this.stickerSize[e].width/1.5,height:this.getValueForProject(this.stickerSize[e].height/1.5,!1),width:this.getValueForProject(this.stickerSize[e].width/1.5,!0),xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),opacity:1,lockAspectRatio:!0},s=Math.max(this.videoPlayerView.getCurrentTime(),.001),l={deleted:!1,end:3,footage:o,id:n,position:Math.max(s-this.videoPlayerView.trimStart,.001),properties:a,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:s,endAt:Math.min(this.videoPlayerView.getCurrentTime()+3,r)};this.projectJson.totalVideoTracks++,this.projectJson.clips.push(l),this.sessionDetails.addedClips.push(l.id),this.reconstructUI(),this.selectSticker(n),this.sessionDetails.totalCreatedClips++},selectSticker:function(t){if(this.enabled){this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedSticker=t,this.currentSelectedClip=this.getClipOf(t);var i=this.getClipOf(this.currentSelectedSticker);this.isImageComponent(i.id)?(this.$el.find(".addimage-selected #imageOpacitySlider").val(100*i.properties.opacity),this.$el.find(".addimage-selected #imageOpacityInput").val(parseInt(100*i.properties.opacity)),this.$el.find(".addimage-selected #imageArLock").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addimage-control-detail").show(),this.$el.find(".addimage-initial").hide(),this.$el.find(".addimage-selected").show()):(this.$el.find(".addsticker-selected .opacity-val").val(100*i.properties.opacity),this.$el.find(".addsticker-selected .lock-aspect-ratio").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addsticker-control-detail").show(),this.$el.find(".addsticker-initial").hide(),this.$el.find(".addsticker-selected").show());var n=e("#se-component-"+t);n.resizable("enable"),n.addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+t)),this.isImageComponent(i.id)?(this.showMarkers("image"),this.selectControl("add-image-btn")):(this.showMarkers("sticker"),this.selectControl("add-stickers-btn")),this.showClipTime(i)}},unselectSticker:function(){null!=this.currentSelectedSticker&&(this.isImageComponent(this.currentSelectedSticker)?(this.currentSelectedSticker=void 0,this.$el.find(".addimage-initial").show(),this.$el.find(".addimage-selected").hide(),this.showMarkers("image")):(this.currentSelectedSticker=void 0,this.$el.find(".addsticker-initial").show(),this.$el.find(".addsticker-selected").hide(),this.showMarkers("sticker")),e(".se-image-component").resizable({disabled:!0}),e(".se-image-component").removeClass("edit-video-selected white black"),this.videoPlayerView.$el.find(".se-clip-time").hide())},stickerPropertyChanged:function(){var e=this.getClipOf(this.currentSelectedSticker);this.isImageComponent(this.currentSelectedSticker)?(e.properties.opacity=this.$el.find(".addimage-selected #imageOpacitySlider").val()/100,e.properties.lockAspectRatio=this.$el.find(".addimage-selected #imageArLock").is(":checked")):(e.properties.opacity=this.$el.find(".addsticker-selected .opacity-val").val()/100,e.properties.lockAspectRatio=this.$el.find(".addsticker-selected .lock-aspect-ratio").is(":checked")),this.updateProjectJson(),this.reconstructUI()},deleteSticker:function(){var e=this.currentSelectedSticker;this.unselectSticker(),this.removeClip(e),this.reconstructUI()},findStickerSize:function(e){this.stickerSize[e]={width:128,height:128}},showStickerFamily:function(t){t.data.that.$el.find(".sticker-family-all").hide(),e(t.target).closest(".sticker-family-container").find(".sticker-family-all").show()},selectAddBlur:function(){"true"===e("#isBlurEnabled").val()||this.isBlurEnabled?(this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Blur_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Blur_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find("#blurSelected").hide(),this.$el.find("#blurInitial").show(),this.$el.find(".blur-control-detail").fadeIn(100),this.showMarkers("effects"),this.selectControl("add-blur-btn"),e(".new").hide()):(n._upgradeAlertPopup(y,h),e(".new").hide())},addNewBlur:function(e,t){if(void 0!==this.sessionDetails.primaryVideo||void 0!==this.sessionDetails.secondaryVideo){var i=this.getMaxDuration(),r=this.getClipOf(this.sessionDetails.primaryVideo)||{},o=Math.max(this.videoPlayerView.getCurrentTime(),.001);null==this.sessionDetails.totalAddedEffects&&(this.sessionDetails.totalAddedEffects=0);var a=this.sessionDetails.totalAddedEffects++,s={id:a,type:"blur",opacity:1,strength:10,widthRaw:this.getValueFromClipPercent(.3,r,!0),heightRaw:this.getValueFromClipPercent(.3,r,!1),xposRaw:this.getValueFromClipPercent(.3,r,!0),yposRaw:this.getValueFromClipPercent(.3,r,!1),lockAspectRatio:!1,start:0,end:3,width:.3,height:.3,xpos:.3,ypos:.3,startFrom:o,endAt:Math.min(this.videoPlayerView.getCurrentTime()+3,i),position:Math.max(o-this.videoPlayerView.trimStart,.001)};r.effects?r.effects.push(s):r.effects=[s],this.reconstructUI(),this.selectBlur(a),n.trackInThirdPartyTools("SE - Add New Blur",{email:this.userEmail})}},enableBlurForPlayer:function(){var e=this;this.$el.find("#blurStrength").slider({min:0,max:100,step:1,value:50,slide:e.blurPropertyChanged}),this.$el.find("#blurStrengthText").bind("change",(function(){e.blurPropertyChanged({},{},!0)}))},blurPropertyChanged:function(e,i,r){var o=this.getClipOf(this.sessionDetails.primaryVideo)||{},a=t.where(o.effects,{id:Number(this.currentSelectedBlur)})[0]||{};if(r){var s=this.$el.find("#blurStrengthText").val();this.$el.find("#blurStrength").slider("option","value",s)}else{s=this.$el.find("#blurStrength").slider("option","value");this.$el.find("#blurStrengthText").val(s)}a.strength=n.map(s,0,100,0,20),a.lockAspectRatio=this.$el.find(".blur-selected .lock-aspect-ratio").is(":checked"),this.updateProjectJson(),this.reconstructUI()},blurAreaChanged:function(){var i=this.getClipOf(this.sessionDetails.primaryVideo)||{},n=t.where(i.effects,{id:Number(this.currentSelectedBlur)})[0]||{},r=e("#se-effects-"+n.id);n.xpos=this.getValueForClip(r.position().left,i,!0),n.ypos=this.getValueForClip(r.position().top,i,!1),n.width=this.getValueForClip(r.width(),i,!0),n.height=this.getValueForClip(r.height(),i,!1),this.reconstructUI()},selectBlur:function(i){if(this.enabled){var r=this.getClipOf(this.sessionDetails.primaryVideo)||{},o=t.where(r.effects,{id:Number(i)})[0]||{},a=Math.ceil(n.map(o.strength,0,20,0,100));this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedBlur=i,this.currentSelectedClip=o,this.$el.find("#blurStrengthText").val(a),this.$el.find("#blurStrength").slider("option","value",a),this.$el.find(".blur-selected .lock-aspect-ratio").prop("checked",o.lockAspectRatio),this.$el.find(".blur-control-detail").show(),this.$el.find(".blur-initial").hide(),this.$el.find(".blur-selected").show(),this.showMarkers("effects"),e("#se-effects-"+i+" .ui-resizable-handle").show(),e("#se-effects-"+i).resizable("enable").addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-effects-"+i)),this.selectControl("add-blur-btn"),void 0!==o.id&&this.showClipTime(o,!0)}},unselectBlur:function(){null!=this.currentSelectedBlur&&(this.currentSelectedBlur=void 0,this.$el.find(".blur-initial").show(),this.$el.find(".blur-selected").hide(),e(".se-effects .ui-resizable-handle").hide(),e(".se-effects").resizable({disabled:!0}).removeClass("edit-video-selected white black"),this.showMarkers("effects"),this.videoPlayerView.$el.find(".se-clip-time").hide())},deleteBlur:function(){for(var e=this.getClipOf(this.sessionDetails.primaryVideo)||{},t=e.effects||[],i=0;i<e.effects.length&&e.effects[i].id!=this.currentSelectedBlur;i++);i!=e.effects.length&&(t.splice(i,1),this.unselectBlur(),this.reconstructUI(),n.trackInThirdPartyTools("SE - Delete Blur",{email:this.userEmail}))},drawBlurLayer:function(){if(this.projectJson){var t=this.videoPlayerView.$el.find(".primary-video")[0],i=this.videoPlayerView.$el.find(".se-effects-canvas")[0],r=i.getContext("2d"),o=this.primaryVideoContainer.width(),a=this.primaryVideoContainer.height(),s=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];i.width=o,i.height=a,r.clearRect(0,0,o,a);for(var l=0;l<s.length;l++){var u=s[l];if(u&&!(this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart<u.position-.1||this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart>u.position+(u.end-u.start))){r.save(),r.rect(u.xposRaw,u.yposRaw,u.widthRaw,u.heightRaw),r.clip(),r.filter="blur("+u.strength+"px)";var c=n.map(u.xposRaw,0,o,0,t.videoWidth),d=n.map(u.yposRaw,0,a,0,t.videoHeight),h=n.map(u.widthRaw,0,o,0,t.videoWidth),p=n.map(u.heightRaw,0,a,0,t.videoHeight);r.drawImage(t,c,d,h,p,u.xposRaw,u.yposRaw,u.widthRaw,u.heightRaw),r.restore(),e("#se-effects-"+u.id).css({opacity:"1","z-index":"106"})}else e("#se-effects-"+u.id).css({opacity:"0","z-index":"-1"})}}},getMaxDuration:function(){for(var e=0,t=0;t<this.projectJson.clips.length;t++)e=Math.max(e,this.projectJson.clips[t].end);return e},selectAddCallouts:function(){this.askReloadConfirmation=!0,this.isPPR?n.trackInThirdPartyTools("video_preview_Callout_save_isPPR",{email:this.userEmail}):n.trackInThirdPartyTools("video_preview_Callout_save",{email:this.userEmail}),this.unselectAllControls(),this.$el.find(".addcallout-selected").hide(),this.$el.find(".addcallout-initial").show(),this.$el.find(".addcallout-control-detail").fadeIn(100),this.showMarkers("calloutimage"),this.selectControl("add-callouts-btn")},calloutBtnClicked:function(e){e.data.that.addNewCallout(e.target.id.split("se-callout-btn-")[1])},addNewCallout:function(e,t,i){var n=this.sessionDetails.totalCreatedClips,r=this.getMaxDuration();this.projectJson.trackNames.push("Callout-Image");var o={containsAudio:!1,containsVideo:!1,containsText:!1,containsImage:!0,id:-e-1e4,baseId:-e-1e4,duration:r,type:"calloutimage"};null!=t&&null!=i||(t=this.videoPlayerView.$el.find(".se-crop-highlighter-left").width(),t+=(this.videoPlayerView.$el.find(".se-crop-highlighter-right").position().left-this.videoPlayerView.$el.find(".se-crop-highlighter-left").width())/2,i=this.videoPlayerView.$el.find(".se-crop-highlighter-top").height(),i+=(this.videoPlayerView.$el.find(".se-crop-highlighter-bottom").position().top-this.videoPlayerView.$el.find(".se-crop-highlighter-top").height())/2);var a={fadein:0,fadeout:0,heightRaw:this.callouts[e].height/2,widthRaw:this.callouts[e].width/2,height:this.getValueForProject(this.callouts[e].height/2,!1),width:this.getValueForProject(this.callouts[e].width/2,!0),xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),opacity:1,lockAspectRatio:!0},s=3,l=Math.max(this.videoPlayerView.getCurrentTime(),.001),u={deleted:!1,end:s,footage:o,id:n,position:Math.max(l-this.videoPlayerView.trimStart,.001),properties:a,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:l,endAt:Math.min(this.videoPlayerView.getCurrentTime()+s,r)};if(this.projectJson.totalVideoTracks++,this.projectJson.clips.push(u),this.sessionDetails.addedClips.push(u.id),this.sessionDetails.totalCreatedClips++,this.callouts[e].hasText){var c=this.sessionDetails.totalCreatedClips;this.projectJson.trackNames.push("Callout-Text"),o.textId=c;var d={containsAudio:!1,containsVideo:!1,containsText:!0,containsImage:!1,duration:r,calloutId:n,type:"callouttext"};t+=0;var h={x:a.xposRaw,y:i+=50,w:a.widthRaw,h:a.heightRaw/4},p={text:this.defaultTextAreaValue,textUnwrapped:this.defaultTextAreaValue,font:this.defaultFontValue,fontSize:15,fontSizeProject:this.getValueForProject(15,!0),color:"black",bold:!1,italic:!1,opacity:1,xposRaw:t,yposRaw:i,xpos:this.getValueForProject(t,!0),ypos:this.getValueForProject(i,!1),offsetX:0,offsetY:50,textAlign:"center",boundingBoxRaw:h,boundingBox:this.getBoundingBoxForProject(h)};this.getLuminanceForClip(p.boundingBoxRaw.x,p.boundingBoxRaw.y,p.boundingBoxRaw.w,p.boundingBoxRaw.h)<128&&(p.color="#FFFFFF");s=3,l=Math.max(this.videoPlayerView.getCurrentTime(),.001);var f={deleted:!1,end:s,footage:d,id:c,position:Math.max(l-this.videoPlayerView.trimStart,.001),properties:p,start:0,track:this.projectJson.totalVideoTracks+1,startFrom:l,endAt:Math.min(this.videoPlayerView.getCurrentTime()+s,r)};this.projectJson.totalVideoTracks++,this.projectJson.clips.push(f),this.sessionDetails.addedClips.push(f.id),this.sessionDetails.totalCreatedClips++}this.reconstructUI(),this.selectCallout(n)},selectCallout:function(t){if(this.enabled){this.unselectAllControls(),this.unselectAllComponents(),this.currentSelectedCallout=t,this.currentSelectedClip=this.getClipOf(t),this.$el.find(".addcallout-control-detail").show(),this.$el.find(".addcallout-initial").hide(),this.$el.find(".addcallout-selected").show();var i=this.getClipOf(this.currentSelectedCallout);this.$el.find(".addcallout-selected .opacity-val").val(100*i.properties.opacity),this.$el.find(".addcallout-selected .lock-aspect-ratio").prop("checked",i.properties.lockAspectRatio),this.$el.find(".addcallout-selected .callout-variation").val(i.footage.baseId-i.footage.id);var n=e("#se-component-"+t);n.resizable("enable"),n.addClass("edit-video-selected"),this.setAdaptiveBorderForTarget(e("#se-component-"+t)),this.showMarkers("calloutimage"),this.showClipTime(i),this.selectControl("add-callouts-btn")}},unselectCallout:function(){null!=this.currentSelectedCallout&&(this.currentSelectedCallout=void 0,this.$el.find(".addcallout-initial").show(),this.$el.find(".addcallout-selected").hide(),e(".se-image-component").resizable({disabled:!0}),e(".se-image-component").removeClass("edit-video-selected white black"),this.showMarkers("calloutimage"),this.videoPlayerView.$el.find(".se-clip-time").hide())},calloutDragged:function(){var t=this.getClipOf(this.currentSelectedCallout),i=this.getClipOf(t.footage.textId);if(null!=i){var r=this.getClipElOf(t.footage.textId);i.properties.boundingBoxRaw?r.css({left:n.map(this.calloutTextBoxSpread.x,0,1,t.properties.xposRaw,t.properties.xposRaw+t.properties.widthRaw)+"px",top:n.map(this.calloutTextBoxSpread.y,0,1,t.properties.yposRaw,t.properties.yposRaw+t.properties.heightRaw)+"px"}):e("#se-component-"+t.footage.textId).css({left:e("#se-component-"+t.id).position().left+i.properties.offsetX+"px",top:e("#se-component-"+t.id).position().top+i.properties.offsetY+"px"}),i.properties.xposRaw=r.position().left,i.properties.yposRaw=r.position().top,i.properties.xpos=this.getValueForProject(i.properties.xposRaw,!0),i.properties.ypos=this.getValueForProject(i.properties.yposRaw,!1),i&&i.properties.boundingBoxRaw&&(i.properties.boundingBoxRaw.x=i.properties.xposRaw,i.properties.boundingBoxRaw.y=i.properties.yposRaw,i.properties.boundingBox=this.getBoundingBoxForProject(i.properties.boundingBoxRaw))}this.updateProjectJson()},calloutResized:function(e){var t=this.getClipOf(e),i=this.getClipOf(t.footage.textId);i&&i.properties.boundingBoxRaw&&this.calloutTextBoxSpread&&(this.getClipElOf(i.id).css({left:n.map(this.calloutTextBoxSpread.x,0,1,t.properties.xposRaw,t.properties.xposRaw+t.properties.widthRaw)+"px",top:n.map(this.calloutTextBoxSpread.y,0,1,t.properties.yposRaw,t.properties.yposRaw+t.properties.heightRaw)+"px",width:this.calloutTextBoxSpread.w*t.properties.widthRaw+"px"}),this.textBoxResized(i.id)),this.updateProjectJson()},calloutPropertyChanged:function(){var e=this.getClipOf(this.currentSelectedCallout);e.properties.opacity=this.$el.find(".addcallout-selected .opacity-val").val()/100,e.properties.lockAspectRatio=this.$el.find(".addcallout-selected .lock-aspect-ratio").is(":checked"),e.footage.id=e.footage.baseId-parseInt(this.$el.find(".callout-variation").val()),this.updateProjectJson(),this.reconstructUI()},deleteCallout:function(){var e=this.getClipOf(this.currentSelectedCallout),t=this.getClipOf(e.footage.textId);null!=t&&this.removeClip(t.id),this.removeClip(this.currentSelectedCallout),this.unselectCallout(),this.reconstructUI()},findCalloutSize:function(e){var t=document.createElement("img");t.src="https://s3.amazonaws.com/hippolms-wiz-static/callouts/c"+e+".png?v=2",t.crossOrigin="Anonymous";var i=this;this.callouts[e]&&(this.callouts[e].width=300,this.callouts[e].height=300),t.onload=function(){i.callouts[e]&&(i.callouts[e].width=t.width,i.callouts[e].height=t.height)}},isCalloutImage:function(e){return this.getClipOf(e).footage.id<=-1e4},scrollCallouts:function(t){var i=e(t.target).hasClass("callout-scroll-left"),n=t.data.that;n.$el.find(".callout-btn-scroll-container").animate({scrollLeft:n.$el.find(".callout-btn-scroll-container").scrollLeft()+200*(i?-1:1)},200)},newComponentDragged:function(){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-none").addClass("disp-show"),this.videoPlayerView.$el.find(".se-components-droppable").fadeIn(200),this.videoPlayerView.$el.find(".se-components-droppable").css({"z-index":1e3,width:this.videoPlayerView.$el.find(".se-crop-resizable").width()+"px",height:this.videoPlayerView.$el.find(".se-crop-resizable").height()+"px",left:this.videoPlayerView.$el.find(".se-crop-resizable").position().left+"px",top:this.videoPlayerView.$el.find(".se-crop-resizable").position().top+"px"})},newComponentDropped:function(){this.videoPlayerView.$el.find(".se-crop-resizable").removeClass("disp-show").addClass("disp-none"),this.videoPlayerView.$el.find(".se-components-droppable").hide(),this.videoPlayerView.$el.find(".se-components-droppable").css("z-index",0)},getClipOf:function(e){for(var t=void 0,i=0;i<this.projectJson.clips.length;i++)if(this.projectJson.clips[i].id==e){t=this.projectJson.clips[i];break}return t},getClipElOf:function(t){return e("#se-component-"+t)},removeClip:function(e){e=parseInt(e);for(var t=0;t<this.projectJson.clips.length;t++)if(this.projectJson.clips[t].id==e){this.projectJson.clips.splice(t,1);break}-1!==this.sessionDetails.addedClips.indexOf(e)&&this.sessionDetails.addedClips.splice(this.sessionDetails.addedClips.indexOf(e),1)},lockAspectRatio:function(t){var i=t.data.that;e(t.target).hasClass("primary-vid-control")?(i.primaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.primaryVideoContainer,e(t.target).is(":checked"))):e(t.target).hasClass("secondary-vid-control")&&(i.secondaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.secondaryVideoContainer,e(t.target).is(":checked")))},opacityChanged:function(t){var i=t.data.that;e(t.target).hasClass("primary-vid-control")?(i.primaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.primaryVideoContainer,e(t.target).is(":checked"))):e(t.target).hasClass("secondary-vid-control")&&(i.secondaryVideoContainer.resizable("destroy"),i.makeVideoContainerResizable(i.secondaryVideoContainer,e(t.target).is(":checked")))},showClipTime:function(t,i){var r=t.footage?t.footage.type:"blur";this.videoPlayerView.$el.find(".se-clip-time").show();var o=Math.max(n.map(t.startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),a=Math.min(n.map(t.endAt,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),this.videoPlayerView.$el.find(".components-time-container").width());this.videoPlayerView.$el.find(".se-clip-time").resizable("enable"),this.videoPlayerView.$el.find(".se-clip-time").css({left:o+"px",width:a-o+"px"}),this.videoPlayerView.$el.find(".se-clip-time .se-selected-type").html(r.substring(0,1).toUpperCase()),i||this.updateTimeFromClipToPopup(this),e(".timer-pop-up").show()},playerTimeUpdate:function(){for(var e=0;e<this.sessionDetails.addedClips.length;e++){var t=this.getClipOf(this.sessionDetails.addedClips[e]);null!=t&&(this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart<t.position-.1||this.videoPlayerView.getCurrentTime()-this.videoPlayerView.trimStart>t.position+(t.end-t.start)?this.videoPlayerView.$el.find("#se-component-"+t.id).css({opacity:"0","z-index":"0"}):this.videoPlayerView.$el.find("#se-component-"+t.id).css({opacity:null!=t.properties.opacity?t.properties.opacity:1,"z-index":"107"}))}},handleVideoPlay:function(){var e=this;this.blurPlayInterval=setInterval((function(){e.drawBlurLayer()}),15)},handleVideoPause:function(){clearInterval(this.blurPlayInterval)},handleVideoSeeked:function(){this.drawBlurLayer(),this.setBorderForClipOnVideoSeek()},showMarkers:function(t){var i,r,o=this.videoPlayerView.$el.find(".player-progress").width()+parseInt(e(".player-progress").css("marginRight"))+parseInt(e(".player-progress").css("marginLeft"));if(this.videoPlayerView.$el.find(".components-time-container, .components-marker-container").css("width",o+"px"),this.videoPlayerView.$el.find(".components-marker-container").empty(),"effects"===t){i=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];for(var a=0;a<i.length;a++)r=Math.max(n.map(i[a].startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),this.videoPlayerView.$el.find(".components-marker-container").append('<span class="se-selected-type" id="effect-'+i[a].id+'" style = "left:'+r+'px">'+i[a].type.substring(0,1).toUpperCase()+"</span>")}else for(a=0;a<this.projectJson.clips.length;a++){var s=this.projectJson.clips[a];s.footage.type==t&&(r=Math.max(n.map(s.startFrom,this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd,0,this.videoPlayerView.$el.find(".components-time-container").width()),0),this.videoPlayerView.$el.find(".components-marker-container").append('<span class="se-selected-type" id="clip-'+s.id+'" style = "left:'+r+'px">'+s.footage.type.substring(0,1).toUpperCase()+"</span>"))}this.videoPlayerView.$el.find(".se-selected-type").bind("click",{that:this},this.markerSelected)},markerSelected:function(e){var i,n=e.target.id,r=0;if(n.includes("clip"))i=n.split("-")[1],r=this.getClipOf(i).startFrom;else{if(!n.includes("effect"))return;i=n.split("-")[1],effects=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[],r=(t.where(effects,{id:Number(i)})[0]||{}).startFrom}this.videoPlayerView.goToTime(Math.min(Math.max(r,this.videoPlayerView.trimStart),this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd)),this.reconstructUI(),this.selectComponentFromId(i,n.includes("effect"))},selectComponentFromId:function(e,t){t?this.selectBlur(e):(type=this.getClipOf(e).footage.type,"sticker"===type?this.selectSticker(e):"text"===type?this.selectText(e):"calloutimage"===type&&this.selectCallout(e))},makeVideoContainerResizable:function(t,i){var n=this;t.resizable({aspectRatio:i,handles:"n, e, w, s, ne, nw, se, sw",resize:function(t,i){n.mediaContainerResized(e(t.target))},start:this.userEventStart,stop:function(){n.userEventStop(),n.reconstructUI()}}),this.videoPlayerView.$el.find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se")},isOnBoardRequired:function(){return!1},getFont:function(e,t,i,n){var r=this;this.fontCache[e+":"+t+":"+i]?n(this.fontCache[e+":"+t+":"+i]):(e||(console.warn("fontname not set"),e=r.defaultFontValue),g.load(this.getFontURL(e,t,i),(function(o,a){if(o){var s;for(var l in console.error("error loading font "+e+":"+t+":"+i),r.fontCache)s=r.fontCache[l];s?n(s):(console.warn("trying to load default font"),g.load(r.getFontURL("montserrat",t,i),(function(e,t){o?console.error("loading default font also failed"):n(t)})))}else r.fontCache[e+":"+t+":"+i]=a,n(a)})))},setLineHeight:function(t){var i=this;null==t.properties.fontSizeProject&&(t.properties.fontSizeProject=this.getValueForProject(t.properties.fontSize));var n=this.getValueForPlayer(t.properties.fontSizeProject,!0);this.getFont(t.properties.font,t.properties.bold,t.properties.italic,(function(r){var o=i.getMetrics(t.properties.text,n,r),a=0;e("#se-component-"+t.id+" div").each((function(){var t=i.getMetrics(e(this).text(),n,r);a=Math.max(a,t.actualBoundingBoxAscent-t.actualBoundingBoxDescent)})),a+=(o.fontBoundingBoxAscent-o.fontBoundingBoxDescent)/10,t.properties.lineHeight=i.getValueForProject(a,!1);var s=0,l=0,u=a*e("#se-component-"+t.id+" .text-el-line").length,c=Math.min(Math.max(10,u/2),40);t.properties.boundingBoxRaw&&(c=(t.properties.boundingBoxRaw.h-u)/2);var d=t.properties.textAlign?t.properties.textAlign:"left";e("#se-component-"+t.id+" .text-el-line").each((function(){var t=i.getMetrics(e(this).text(),n,r);l=Math.max(l,t.actualWidth)})),null==t.properties.boundingBoxRaw&&(c=Math.min(Math.max(10,u/2),40),t.properties.boundingBoxRaw={x:t.properties.xposRaw,y:t.properties.yposRaw-c,w:l+2*c,h:u+2*c},t.properties.textAlign=d,i.setTextDraggableContainerSize(e("#se-component-"+t.id)[0],t,!1)),t.properties.boundingBoxRaw.topPadding=c,t.properties.boundingBox=i.getBoundingBoxForProject(t.properties.boundingBoxRaw),e("#se-component-"+t.id+" .text-el-line").each((function(){var o=i.getMetrics(e(this).text(),n,r),l=0;"center"==d?l=(t.properties.boundingBoxRaw.w-o.actualWidth)/2:"right"==d&&(l=t.properties.boundingBoxRaw.w-o.actualWidth),e(this).css({"line-height":o.fontBoundingBoxAscent-o.fontBoundingBoxDescent+"px",top:s+(o.actualBoundingBoxAscent-o.fontBoundingBoxAscent)+c+"px",left:l+"px"}),s+=a}))}))},setTextDraggableContainerSize:function(t,i,n){var r=this;i.properties.boundingBoxRaw&&(e(t).css({width:i.properties.boundingBoxRaw.w+"px",height:i.properties.boundingBoxRaw.h+"px"}),n&&(e(t).resizable({handles:"se",aspectRatio:!1,containment:".primary-video-container",create:function(){e(this).find(".ui-resizable-handle").removeClass("ui-icon ui-icon-gripsmall-diagonal-se")},stop:function(){r.lastTextResizeTime=(new Date).getTime()},resize:r.textBoxResized}),i.footage.calloutId&&e(t).resizable("option","containment","#se-component-"+i.footage.calloutId)))},selectControl:function(e){this.$el.find(".se-control-selected").removeClass("se-control-selected"),this.$el.find("."+e).addClass("se-control-selected")},computedDuration:function(){this.resizeHandler(),this.$el.find(".trim-before-container, .trim-after-container").show(),this.reconstructUI(),this.updateTrimInput()},_getVideoModel:function(){if(this.embeddedDigest&&this.embeddedDigest.length>0)var e=new u({embedded_digest:this.embeddedDigest});else if(this.digest)e=new u({digest:this.digest});else e=new u;return e},getReloadConfirmationState:function(){return this.askReloadConfirmation},prefetchAssetsForSimpleEdit:function(){try{var e=new Image;e.src="https://s3.amazonaws.com/hippolms-wiz-static/stickers-all/stickers_all.png?v=2",e.crossOrigin="Anonymous"}catch(e){console.log("Image constructor - Browser not supported!")}},showClipTimePop:function(t){var i=e(t.target);(i.hasClass("se-clip-time")||i.hasClass("se-selected-type"))&&(t.data.that.updateTimeFromClipToPopup(t.data.that),e(".timer-pop-up").toggle())},clipInputButtonClicked:function(e){e.stopPropagation();var t=e.data.that,i=t.currentSelectedClip||{},n=e.target.className.indexOf("timer-start-btn")>-1,r=e.target.className.indexOf("plus")>-1;t.calculateTimeAndUpdateClip(n,r,i,t),t.reconstructUI()},clipInputtyped:function(t){t.stopPropagation();var i=t.data.that,r=t.keyCode,o=e(t.target).hasClass("timer-start-input");if(38===r||40===r)i.calculateTimeAndUpdateClip(o,38===r,i.currentSelectedClip||{},i);else{var a=n.timeToInt(e(".timer-start-input").val()),s=n.timeToInt(e(".timer-stop-input").val());clearTimeout(i.clipTimeInputTimeout),i.isValidClipTime(a,s)?i.setClipTimeAndUpdateValues(a,s,i):i.clipTimeInputTimeout=setTimeout((function(){i.updateTimeFromClipToPopup()}),1e3)}i.reconstructUI()},isValidClipTime:function(e,t){var i=this.videoPlayerView,n=i.mediaPlayer.duration-i.trimEnd;return!(e>=t||e<i.trimStart||t>n||isNaN(e)||isNaN(t))},updateTimeFromClipToPopup:function(t){var i=(t=t||this).currentSelectedClip||{};e(".timer-start-input").val(n.strToTime(i.startFrom)),e(".timer-stop-input").val(n.strToTime(i.endAt))},calculateTimeAndUpdateClip:function(t,i,r,o){var a=r.startFrom,s=r.endAt,l=o.videoPlayerView,u=l.mediaPlayer.duration-l.trimEnd;t?a=i?Math.min(a+1,u):Math.max(a-1,l.trimStart):s=i?Math.min(s+1,u):Math.max(s-1,l.trimStart),a>=s||(e(".timer-start-input").val(n.strToTime(a)),e(".timer-stop-input").val(n.strToTime(s)),o.setClipTimeAndUpdateValues(a,s,o))},setClipTimeAndUpdateValues:function(e,t,i){var n=i.currentSelectedClip||{},r=n.footage?n.footage.type:"blur";n.startFrom=e,n.endAt=t,("calloutimage"===r||"sticker"===r||"text"===r||"blur"===r)&&this.showClipTime(n,!0),this.updateCalloutClipTime(n),this.updateProjectJson()},updateCalloutClipTime:function(e){if(null!=e&&null!=e.footage&&null!=e.footage.type){var t;if("callouttext"==e.footage.type)t=this.getClipOf(e.footage.calloutId);else{if("calloutimage"!=e.footage.type||null==e.footage.textId)return;t=this.getClipOf(e.footage.textId)||{}}t.startFrom=e.startFrom,t.endAt=e.endAt}},onClipTimeChangeHandler:function(){var e=n.map(this.videoPlayerView.$el.find(".se-clip-time").position().left,0,this.videoPlayerView.$el.find(".components-time-container").width(),this.videoPlayerView.trimStart,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimEnd),t=n.map(this.videoPlayerView.$el.find(".se-clip-time").width(),0,this.videoPlayerView.$el.find(".components-time-container").width(),0,this.videoPlayerView.mediaPlayer.duration-this.videoPlayerView.trimStart-this.videoPlayerView.trimEnd),i=this.getSelectedClipOrEffect();null!=i&&(i.startFrom=e,i.endAt=i.startFrom+t,this.updateCalloutClipTime(i),this.updateProjectJson(),this.reconstructUI())},getTextFromTextEl:function(t){for(var i=t.find(".text-el-line").toArray(),n="",r=0;r<i.length;r++)n+=e(i[r]).text()+(r+1<i.length?"\n":"");return n},newlineTextToHtml:function(t,i){var r=this,o=i.properties.text.split(/[\r\n]+/);for(var a in i.properties.textUnwrapped&&(o=i.properties.textUnwrapped.split(/[\r\n]+/),i.properties.boundingBoxRaw&&i.properties.textUnwrapped&&this.getFont(i.properties.font,i.properties.bold,i.properties.italic,(function(e){for(var t=0;t<o.length;t++){for(var n=o[t].split(/(\$[\s]*\{.*\}|\S+|\s+)/).filter((function(e){return 0!=e.length})),a=[{first:o[t]}],s=n.length-1;s>0;s--)a.push({first:n.slice(0,s).join(""),second:n.slice(s,n.length).join("")});var l=a[a.length-1].first;if(!l.replace(/\s/g,"").startsWith("${"))for(s=l.length-1;s>0;s--)a.push({first:l.slice(0,s),second:[l.slice(s,l.length),n.slice(1,n.length).join("")].join("")});for(var u=0;u<a.length;u++){if(r.getMetrics(a[u].first,r.getValueForPlayer(i.properties.fontSizeProject,!0),e).actualWidth<=i.properties.boundingBoxRaw.w)break}u=Math.min(a.length-1,u),o[t]=a[u].first,a[u].second&&o.splice(t+1,0,a[u].second)}})),i.properties.text=o.join("\n")),e(t).empty(),o){var s=document.createElement("div");e(s).append(o[a]),e(s).addClass("text-el-line"),e(s).css({"font-family":null!=n.getFontMap()[i.properties.font]?n.getFontMap()[i.properties.font].css:"","font-size":this.getValueForPlayer(i.properties.fontSizeProject,!0)+"px","font-style":i.properties.italic?"italic":"normal","font-weight":i.properties.bold?"bold":"normal",color:i.properties.color,position:"absolute","line-height":"0.7em"}),e(t).append(s)}this.setLineHeight(i)},fontLoaded:function(e){if(null!=this.currentSelectedText){var t=this.getClipOf(this.currentSelectedText),i=this.getClipElOf(this.currentSelectedText);this.newlineTextToHtml(i.find(".se-text-container")[0],t)}},textBoxResized:function(t){(t instanceof e.Event||null==t)&&(t=this.currentSelectedText);var i=this.getClipOf(t),n=this.getClipElOf(t);i.properties.boundingBoxRaw={x:n.position().left,y:n.position().top,w:n.width(),h:n.height()},i.properties.boundingBox=this.getBoundingBoxForProject(i.properties.boundingBoxRaw),this.newlineTextToHtml(n.find(".se-text-container")[0],i)},webcamSnappedLayoutOnCrop:function(){var e="bottom-left";return this.projectJson&&null!=this.projectJson.webcamPosition&&(e=this.projectJson.webcamPosition),"bottom-left"==e?{x:this.cropResizable.position().left,y:this.cropResizable.position().top+this.cropResizable.height()-this.secondaryVideoContainer.height()}:"bottom-right"==e?{x:this.cropResizable.position().left+this.cropResizable.width()-this.secondaryVideoContainer.width(),y:this.cropResizable.position().top+this.cropResizable.height()-this.secondaryVideoContainer.height()}:"top-right"==e?{x:this.cropResizable.position().left+this.cropResizable.width()-this.secondaryVideoContainer.width(),y:this.cropResizable.position().top}:"top-left"==e?{x:this.cropResizable.position().left,y:this.cropResizable.position().top}:void 0},getProjectJSON:function(){return this.projectJson},getIOAdjustedProjectJSON:function(){var e=n.naiveClone(this.projectJson);if(null!=e.ioDetails)try{if(e.ioDetails.intro&&e.ioDetails.intro.theme>0){for(var t=e.ioDetails.intro,i=t.duration,r=i,o=0;o<e.clips.length;o++)e.clips[o].deleted||e.clips[o].properties.isPlaceHolder||(e.clips[o].position=parseInt(e.clips[o].position)+i,r=Math.min(r,e.clips[o].position));var a=e.totalVideoTracks;for(o=0;o<t.clips.length;o++){if(!(c=t.clips[o]).deleted&&!c.properties.isPlaceHolder){var s=o+1;r<i&&(s+=a),s>e.totalVideoTracks&&(e.totalVideoTracks++,e.trackNames.push(c.properties.text)),c.track=s,e.clips.push(c)}}}if(e.ioDetails.outro&&e.ioDetails.outro.theme>0){var l=e.ioDetails.outro,u=0;for(o=0;o<e.clips.length;o++)e.clips[o].deleted||e.clips[o].properties.isPlaceHolder||(u=Math.max(u,parseInt(e.clips[o].position)+e.clips[o].end-e.clips[o].start));for(o=0;o<l.clips.length;o++){var c;if(!(c=l.clips[o]).deleted&&!c.properties.isPlaceHolder)(s=o+1)>=e.totalVideoTracks&&(e.totalVideoTracks++,e.trackNames.push(c.properties.text)),c.position=u,c.track=s,e.clips.push(c)}}}catch(e){console.error(e)}return e},overrideStyle:function(e,t,i){e.each((function(){this.style.setProperty(t,i,"important")}))},applyCustomColors:function(){this.customColors&&(this.customColors.primaryColor&&(this.overrideStyle(this.$el.find(".trim-slider .ui-slider-handle"),"background",this.customColors.primaryColor),this.overrideStyle(this.$el.find(".trim-slider .ui-slider-range"),"border-color",this.customColors.primaryColor)),this.customColors.secondaryColor&&this.overrideStyle(this.$el.find(".trim-slider .ui-slider-range"),"background",this.customColors.secondaryColor),this.customColors.bgColor&&this.overrideStyle(this.$el.find(".trim-slider"),"background",this.customColors.bgColor))},addCustomFontStyles:function(){var e=document.createElement("style");for(var t in n.getFontMap()){var i=n.getFontMap()[t];e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: normal; font-weight: 400; src: url('"+this.getFontURL(t,!1,!1)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: normal; font-weight: bold; src: url('"+this.getFontURL(t,!0,!1)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: italic; font-weight: 400; src: url('"+this.getFontURL(t,!1,!0)+"') format('truetype'); }")),e.appendChild(document.createTextNode("@font-face { font-family: '"+i.family+"'; font-style: italic; font-weight: bold; src: url('"+this.getFontURL(t,!0,!0)+"') format('truetype'); }"))}document.head.appendChild(e)},getFontURL:function(e,t,i){var n=e;return t&&i?n+="bi":t?n+="bd":i&&(n+="i"),"https://fontstatic.s3-accelerate.amazonaws.com/"+e+"/"+n+".ttf"},getMetrics:function(e,t,i){for(var n=0,r=0,o=0,a=1/i.unitsPerEm*t,s=i.stringToGlyphs(e.replace(/\s/g,"")),l=0;l<s.length;l++){var u=s[l];u.advanceWidth&&(o+=u.advanceWidth*a),l<s.length-1&&(kerningValue=i.getKerningValue(u,s[l+1]),o+=kerningValue*a),n=Math.max(n,u.yMax),r=Math.min(r,u.yMin)}var c=i.getPath(e,0,0,t);return{actualWidth:c.getBoundingBox().x2-c.getBoundingBox().x1,width:o,actualBoundingBoxAscent:n*a,actualBoundingBoxDescent:r*a,actualHeight:n*a-r*a,fontBoundingBoxAscent:i.ascender*a,fontBoundingBoxDescent:i.descender*a,fontHeight:i.ascender*a-i.descender*a}},globalKeypress:function(t){var i=t.keyCode;0==this.videoPlayerView.$el.find(".timer-pop-up").find(e(t.target)).length&&(!this.isMac&&46===i||this.isMac&&8===i)&&this.deleteClipOrEffectSelected()},deleteClipOrEffectSelected:function(){null!=this.currentSelectedBlur?this.deleteBlur():null!=this.currentSelectedSticker?this.deleteSticker():null!=this.currentSelectedCallout?this.deleteCallout():null!=this.currentSelectedText&&(this.videoPlayerView.$el.find(".se-text-editable").is(":visible")||this.deleteText())},setBorderForClipOnVideoSeek:function(){var e=this.getSelectedClipOrEffect();null!=e&&(null!=this.currentSelectedBlur?(this.videoPlayerView.$el.find("#se-effects-"+e.id).removeClass("black white"),this.setAdaptiveBorderForTarget(this.videoPlayerView.$el.find("#se-effects-"+e.id))):(this.videoPlayerView.$el.find("#se-component-"+e.id).removeClass("black white"),this.setAdaptiveBorderForTarget(this.videoPlayerView.$el.find("#se-component-"+e.id))))},getSelectedClipOrEffect:function(){var e=null!=this.currentSelectedText?this.currentSelectedText:null!=this.currentSelectedSticker?this.currentSelectedSticker:null!=this.currentSelectedCallout?this.currentSelectedCallout:void 0;if(null!=e)return this.getClipOf(e);if(null!=this.currentSelectedBlur){e=this.currentSelectedBlur;var i=(this.getClipOf(this.sessionDetails.primaryVideo)||{}).effects||[];return t.where(i,{id:Number(e)})[0]||{}}}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.x(t.get(["showAsModal"],!1),t,{else:i,block:s},{})}function i(e,t){return e.w('<center class="hippo-progress-loader"><div class="hippo-progress-text" id="progressText"> Preparing File... </div>').x(t.get(["showHippoIcon"],!1),t,{else:n,block:r},{}).w("</center>")}function n(e,t){return e.w('<div class="hippo-branding-loader"><span></span><span></span><span></span><span></span><span></span></div>')}function r(e,t){return e.x(t.get(["isVirtualBg"],!1),t,{else:o,block:a},{}).w('<div class="hippo-progress-container text-left"><div class="hippo-progress-strip"></div><div class="hippo-progress-fill-strip" id="progressFillStrip"></div></div>')}function o(e,t){return e.w('<img class="hippo-progress-gif" src="/img/hippo-yoga.gif">')}function a(e,t){return e.w('<img class="hippo-progress-gif virtualbg-notify-img" src="/img/virtualbg-notify.png">')}function s(e,t){return e.w('<div class="modal-backdrop" id="progressBackdrop"><div class="large-4 large-offset-4 medium-6 medium-offset-3 hippo-progress"><center class="hippo-progress-loader"><div class="hippo-progress-text" id="progressText"> Preparing File... </div>').x(t.get(["showHippoIcon"],!1),t,{else:l,block:u},{}).w("</center></div></div>")}function l(e,t){return e.w('<div class="hippo-branding-loader"><span></span><span></span><span></span><span></span><span></span></div>')}function u(e,t){return e.x(t.get(["isVirtualBg"],!1),t,{else:c,block:d},{}).w('<div class="hippo-progress-container text-left"><div class="hippo-progress-strip"></div><div class="hippo-progress-fill-strip" id="progressFillStrip"></div></div>')}function c(e,t){return e.w('<img class="hippo-progress-gif" src="/img/hippo-yoga.gif">')}function d(e,t){return e.w('<img class="hippo-progress-gif virtualbg-notify-img" src="/img/virtualbg-notify.png">')}e.register("templates/component/hippo_yoga",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/hippo_yoga",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(2),i(10),i(35),i(68),i(20)],void 0===(r=function(e,t,i,n,r){"use strict";return r=r.default,i.Model.extend({idAttribute:"id",defaults:{id:null},initialize:function(e){},url:function(){var e=this.attributes.id?this.attributes.id:"";return JSON.parse(n).getVideoCategories+(e?"/"+e:"")},parse:function(e){return e},getVideoCategories:function(e,t){r.call({url:JSON.parse(n).getAllVideoCategories,method:"GET",success:e,error:t})},getMultipleVideoCategories:function(e,t,i,o){r.call({url:JSON.parse(n).getMultipleCategoryVideos+e,method:"POST",data:t,success:i,error:o})},setDefaultVideoCategory:function(e,t,i,o){var a={set_default:t};r.call({url:JSON.parse(n).setDefaultVideoCategory+"/"+e,method:"PUT",data:a,success:i,error:o})},getVideoCategoriesWithToken:function(e,t,i){r.call({url:JSON.parse(n).getVideoCategoriesWithToken+"/"+e,method:"GET",success:t,error:i})},getCategoryDetails:function(e,t,i){r.call({url:JSON.parse(n).getVideoCategories+"/details/"+e,method:"GET",success:t,error:i})},getVideoGroups:function(e,t,i){r.call({url:JSON.parse(n).getVideoGroups+"?asset_id="+e,method:"GET",success:t,error:i})},getVideoCategoriesAndSelected:function(e,t,i){r.call({url:JSON.parse(n).selectedVideoCategories+"/"+e,method:"GET",success:t,error:i})},getVideosOfCategory:function(e,t,i,o){r.call({url:JSON.parse(n).getCategoryVideos+"/"+e+"/"+t,method:"GET",success:i,error:o})},getVideosOfCategoryWithToken:function(e,t,i,o,a){r.call({url:JSON.parse(n).getCategoryVideosWithToken+"/"+e+"/"+t+"/"+i,method:"GET",success:o,error:a})},assignCategories:function(e,t,i,o){var a=new FormData;a.append("asset_id",e),a.append("cat_ids",t),r.call({url:JSON.parse(n).assignCategories,method:"POST",data:a,contentType:!1,processData:!1,success:i,error:o})},assignGroups:function(e,t,i){r.call({url:JSON.parse(n).assignGroups,method:"POST",data:e,success:t,error:i})},assignVideos:function(e,t,i,o){var a=new FormData;a.append("asset_ids",e),a.append("cat_ids",t),r.call({url:JSON.parse(n).assignVideos,method:"POST",data:a,contentType:!1,processData:!1,success:i,error:o})},searchCategories:function(e,t,i,o,a){var s=new FormData;t&&s.append("search_token",e),s.append("is_search",t),s.append("order_type",i);var l=JSON.parse(n).createVideo+"/1/search_category";r.call({url:l,method:"POST",data:s,contentType:!1,processData:!1,success:o,error:a})},assignToTeacher:function(e,t,i,o){var a="asset_id="+e+"&token="+t;r.call({url:JSON.parse(n).createVideo+"/assign_to_teacher",method:"POST",data:a,success:i,error:o})},deleteVideoCategory:function(e,t,i){r.call({url:JSON.parse(n).deleteVideoCategory+"/"+e,method:"DELETE",success:t,error:i})},saveDocumentInfo:function(e,t,i){r.call({url:JSON.parse(n).saveDocumentInfo,method:"POST",data:e,success:t,error:i})},getUsersAndGroups:function(e,t){r.call({url:"/api/internal/get_user_and_group_list",method:"GET",success:e,error:t})},updatePinFolder:function(e,t,i){r.call({url:JSON.parse(n).updatePinFolder,method:"POST",data:e,success:t,error:i})}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="container"><div class="row"><div class="large-8 large-offset-2 medium-10 medium-offset-1 small-12 import-media-container"><div class="import-header clearfix"><div class="pull-left"> ').h("eq",t,{else:i,block:n},{key:t.get(["type"],!1),value:"doc"},"h").w(' </div><div class="pull-right"> <img src="/svg/close-gray.svg" alt="close" id="closeImport"/> </div></div><div class="tab-container" id="tabContainer">').x(t.get(["fromVideoPages"],!1),t,{block:r},{}).x(t.get(["canShowImportFromLocal"],!1),t,{block:a},{}).x(t.get(["canShowVideoLibrary"],!1),t,{block:s},{}).x(t.get(["canShowRecentlyUsed"],!1),t,{block:l},{}).nx(t.get(["fromVideoPages"],!1),t,{block:u},{}).x(t.get(["canShowAudioLibrary"],!1),t,{block:d},{}).x(t.get(["canShowGdriveImport"],!1),t,{block:h},{}).x(t.get(["canImportImageFromLibrary"],!1),t,{block:p},{}).x(t.get(["canShowImageWebSearch"],!1),t,{block:f},{}).x(t.get(["canShowTestimonial"],!1),t,{block:g},{}).x(t.get(["canShowShopify"],!1),t,{block:m},{}).x(t.get(["canShowAddViaLink"],!1),t,{block:v},{}).x(t.get(["canShowCreateVideoOption"],!1),t,{block:y},{}).x(t.get(["canShowWebLink"],!1),t,{block:b},{}).w('</div><div class="import-body no-box-shadow">').p("templates/partials/import_from_local",t,t,{}).p("templates/partials/import_recently_used",t,t,{}).p("templates/partials/import_from_web",t,t,{}).p("templates/partials/import_from_library",t,t,{}).p("templates/partials/import_from_drive",t,t,{}).p("templates/partials/import_from_video_library",t,t,{}).p("templates/partials/import_from_shopify",t,t,{}).p("templates/partials/import_from_custom_link",t,t,{}).p("templates/partials/import_from_website_link",t,t,{}).nx(t.get(["handleOneFileUpload"],!1),t,{block:w},{}).w('<div id="importVideoFormContainer" class="hide"></div></div><div class="import-footer text-right clearfix"><div class="powered-by pull-left hide" id="footerPoweredBy"><span class="powered-by-label"> Powered by </span><img src="/svg/flickr-logo.svg" alt="Flickr" /><img src="/img/pexels-logo.png" alt="Pexels" /></div><div class="pull-left foot-note" id="footnote">').x(t.get(["handleOneFileUpload"],!1),t,{block:E},{}).w("<div>").h("eq",t,{else:T,block:C},{key:t.get(["type"],!1),value:"doc"},"h").w('</div></div><div class="pull-right"><button class="button wiz-secondary-btn wiz-new-secondary-btn radius" id="cancelImport"> ').f(t.get(["cancel"],!1),t,"h").w(' </button><button class="button wiz-primary-btn" id="import" disabled>').h("eq",t,{block:k},{key:t.get(["type"],!1),value:"video"},"h").h("eq",t,{block:x},{key:t.get(["type"],!1),value:"doc"},"h").w(" ").h("ne",t,{block:A},{key:t.get(["type"],!1),value:"video"},"h").w('</button><button class="button wiz-secondary-btn wiz-new-secondary-btn radius hide" id="cancelVideoForm"> ').f(t.get(["changeFile"],!1),t,"h").w(' </button><button class="button wiz-primary-btn hide" id="submitVideoForm"> ').f(t.get(["import"],!1),t,"h").w(" </button></div></div></div></div></div>")}function i(e,t){return e.w(" ").f(t.get(["title"],!1),t,"h").w(" ")}function n(e,t){return e.w(" ").f(t.get(["importDocument"],!1),t,"h").w(" ")}function r(e,t){return e.x(t.get(["canShowVideoLibraryMulti"],!1),t,{block:o},{})}function o(e,t){return e.w('<div class="tab" id="importVideoLibraryTabMulti" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibraryMulti"],!1),t,"h").w(" </div>")}function a(e,t){return e.w('<div class="tab active" id="importLocalTab" data-panel-id="importFromLocal"> ').f(t.get(["importFromLocal"],!1),t,"h").w(" </div>")}function s(e,t){return e.w('<div class="tab" id="importVideoLibrarylTab" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibrary"],!1),t,"h").w(" </div>")}function l(e,t){return e.w('<div class="tab" id="recentlyUsedTab" data-panel-id="importRecentlyUsed"> ').f(t.get(["recentlyUsed"],!1),t,"h").w(" </div>")}function u(e,t){return e.x(t.get(["canShowVideoLibraryMulti"],!1),t,{block:c},{})}function c(e,t){return e.w('<div class="tab" id="importVideoLibraryTabMulti" data-panel-id="importVideoLibraryl"> ').f(t.get(["importFromVideoLibraryMulti"],!1),t,"h").w(" </div>")}function d(e,t){return e.w('<div class="tab" id="importLibraryTab" data-panel-id="importFromLibrary"> ').f(t.get(["importFromLibrary"],!1),t,"h").w(" </div>")}function h(e,t){return e.w('<div class="tab" id="importDriveTab" data-panel-id="importFromDrive"> ').f(t.get(["importFromDrive"],!1),t,"h").w(" </div>")}function p(e,t){return e.w('<div class="tab" id="importImgLibTab" data-panel-id="importImageFromLibrary"> ').f(t.get(["importImageFromLib"],!1),t,"h").w(" </div>")}function f(e,t){return e.w('<div class="tab" id="importWebTab" data-panel-id="importFromWeb"> ').f(t.get(["searchFromWeb"],!1),t,"h").w(" </div>")}function g(e,t){return e.w('<div class="tab" id="importTestimonial" data-panel-id="importVideoLibraryl"> ').f(t.get(["importTestimonial"],!1),t,"h").w(" </div>")}function m(e,t){return e.w('<div class="tab" id="importShopifyTab" data-panel-id="importFromShopify"> ').f(t.get(["shopifyTitle"],!1),t,"h").w(" </div>")}function v(e,t){return e.w('<div class="tab" id="importViaLinkTab" data-panel-id="importFromLink"> ').f(t.get(["addViaLinkTitle"],!1),t,"h").w(" </div>")}function y(e,t){return e.w('<div class="additional-options-block"><a id="libraryRefresh" class="button wiz-border-button create-video-btn no-margin hide"><img class="reload-img" src="/svg/retake-orange.svg"></a><a id="createVideoFromImportBtn" class="button wiz-border-button create-video-btn no-margin" target="_blank" href="/video/record">').f(t.get(["createVideo"],!1),t,"h").w("</a></div>")}function b(e,t){return e.w('<div class="tab" id="importViaWebLink" data-panel-id="importFromWebLink"> ').f(t.get(["WebLinkTitle"],!1),t,"h").w(" </div>")}function w(e,t){return e.p("templates/partials/import_selected_drawer",t,t,{}).w('<div class="drawer-handle" id="openDrawHandle"><img src="/svg/arrow-inactive.svg" alt="Left" class="arrow-marker" /></div>')}function E(e,t){return e.w(" <span> ").f(t.get(["note"],!1),t,"h").w(": </span> ").h("eq",t,{else:_,block:S},{key:t.get(["type"],!1),value:"doc"},"h").w(" ")}function _(e,t){return e.w(" ").f(t.get(["importHelp"],!1),t,"h").w(" ")}function S(e,t){return e.w(" ").f(t.get(["importPDFOnly"],!1),t,"h").w("<b>").f(t.get(["videoLandingPages"],!1),t,"h").w("</b> ")}function T(e,t){return e.w(" ").f(t.get(["supports"],!1),t,"h").w(" ").f(t.get(["formatsList"],!1),t,"h").w(" ").f(t.get(["formatsWithMaxSize"],!1),t,"h").w(" ").f(t.get(["maxFileSize"],!1),t,"h").w(" MB")}function C(e,t){return e.f(t.get(["canBeUsedOnly"],!1),t,"h").w("<br>").f(t.get(["canBeUsedOnlyImage"],!1),t,"h")}function k(e,t){return e.f(t.get(["proceed"],!1),t,"h")}function x(e,t){return e.f(t.get(["proceed"],!1),t,"h")}function A(e,t){return e.h("ne",t,{block:P},{key:t.get(["type"],!1),value:"doc"},"h")}function P(e,t){return e.f(t.get(["import"],!1),t,"h")}e.register("templates/component/import_media",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/import_media",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-body-container import-video-form" id="importVideoForm"><div class="import-web-content image-gallery main-gallery custom-scroll"><form name="importVideoDetails" id="importVideoDetails"><div class="row"><div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').x(t.get(["isMultipleImageImport"],!1),t,{else:i,block:n},{}).w(' </label><div class="small-8 pull-left image-gallery"><div class="image pull-left import-video-form-preview">').x(t.get(["thumbnail_url"],!1),t,{else:r,block:d},{}).w('</div><div class="pull-left desc-container"><label class="import-file-name"> ').x(t.get(["isMultipleImageImport"],!1),t,{else:h,block:p},{}).w("</label>").x(t.get(["isMultipleImageImport"],!1),t,{else:f,block:m},{}).w("</div></div></div>").x(t.get(["askVideoDetails"],!1),t,{block:v},{}).w('</div></form><div id="videoImportStatusLoading" class="hide"></div></div></div>')}function i(e,t){return e.w(" ").f(t.get(["selectedFile"],!1),t,"h").w(" ")}function n(e,t){return e.w(" ").f(t.get(["selectedFiles"],!1),t,"h").w(" ")}function r(e,t){return e.x(t.get(["isImagePreview"],!1),t,{else:o,block:c},{})}function o(e,t){return e.x(t.get(["isAudioPreview"],!1),t,{else:a,block:u},{})}function a(e,t){return e.x(t.get(["isVideoPreview"],!1),t,{else:s,block:l},{})}function s(e,t){return e.w('<img src="/img/film-hippo.png" alt="Video Thumbnail" class="gallery-view" />')}function l(e,t){return e.w('<video autoplay muted play><source src="').f(t.get(["preview_url"],!1),t,"h").w('" type="').f(t.get(["type"],!1),t,"h").w('"></video>')}function u(e,t){return e.w('<audio controls><source src="').f(t.get(["preview_url"],!1),t,"h").w('" type="').f(t.get(["type"],!1),t,"h").w('"></audio>')}function c(e,t){return e.w('<img src="').f(t.get(["preview_url"],!1),t,"h").w('" alt="Video Thumbnail" class="gallery-view" />')}function d(e,t){return e.w('<img src="').f(t.get(["thumbnail_url"],!1),t,"h").w('" alt="Video Thumbnail" class="gallery-view" />')}function h(e,t){return e.w(" ").f(t.get(["name"],!1),t,"h").w(" ")}function p(e,t){return e.w(" ").f(t.get(["totalFileNamesText"],!1),t,"h").w(" ")}function f(e,t){return e.x(t.get(["sizeFormatted"],!1),t,{block:g},{})}function g(e,t){return e.w('<label class="import-file-size"> ').f(t.get(["sizeFormatted"],!1),t,"h").w(" </label>")}function m(e,t){return e.w('<label class="import-file-size"> ').f(t.get(["totalFileCount"],!1),t,"h").w(" files </label>")}function v(e,t){return e.nx(t.get(["isMultipleImageImport"],!1),t,{block:y},{}).x(t.get(["isCategoryAvailable"],!1),t,{block:E},{}).w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["addTags"],!1),t,"h").w(' </label><div class="small-8 pull-left"><div id="importVideoTags"></div></div></div>').nx(t.get(["isMultipleImageImport"],!1),t,{block:T},{})}function y(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left required-mark"> ').x(t.get(["isVideo"],!1),t,{else:b,block:w},{}).w(' </label><div class="small-8 pull-left"><input type="text" name="importVideoTitle" id="importVideoTitle" value="').f(t.get(["name"],!1),t,"h").w('"/></div></div>')}function b(e,t){return e.w(" ").f(t.get(["docTitle"],!1),t,"h").w(" ")}function w(e,t){return e.w(" ").f(t.get(["videoTitle"],!1),t,"h").w(" ")}function E(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["addToCategory"],!1),t,"h").w(' </label><div class="small-8 pull-left"><select name="categories" multiple="multiple" id="importVideoCategories">').s(t.get(["categories"],!1),t,{block:_},{}).w("</select></div></div>")}function _(e,t){return e.w('<option value="').f(t.get(["id"],!1),t,"h").w('"').x(t.get(["is_default_category"],!1),t,{block:S},{}).w("> ").f(t.get(["name"],!1),t,"h").w(" </option>")}function S(e,t){return e.w(" selected")}function T(e,t){return e.w('<div class="small-12 clearfix"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["description"],!1),t,"h").w(' </label><div class="small-8 pull-left"><textarea rows="5" name="importVideoDesc" id="importVideoDesc" placeholder="Add Description"></textarea></div></div>').x(t.get(["showPreserveTransparency"],!1),t,{block:C},{})}function C(e,t){return e.w('<div class="small-12 clearfix" id="preserveTransparencyContainer"><label class="small-3 inline cat-form-la pull-left"> ').f(t.get(["preserveTransparency"],!1),t,"h").w(' </label><div class="small-8 pull-left"><input class="wiz-checkbox-blue" type="checkbox" id="preserveTransparency"><label class="" for="preserveTransparency"></label></div></div>')}e.register("templates/partials/import_video_form",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_video_form",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="simple-edit-container hide ').x(t.get(["integrationType"],!1),t,{block:i},{}).w('"><div class="simple-edit-controls"><div class="se-control-detail default-control-detail clearfix hide"><span class="info-text"></span></div>').h("ne",t,{block:n},{key:t.get(["trim"],!1),value:"false"},"h").h("ne",t,{block:o},{key:t.get(["crop"],!1),value:"false"},"h").h("ne",t,{block:a},{key:t.get(["image"],!1),value:"false"},"h").h("ne",t,{block:h},{key:t.get(["text"],!1),value:"false"},"h").h("ne",t,{block:v},{key:t.get(["stickers"],!1),value:"false"},"h").h("ne",t,{block:y},{key:t.get(["callout"],!1),value:"false"},"h").h("ne",t,{block:S},{key:t.get(["blur"],!1),value:"false"},"h").h("ne",t,{block:T},{key:t.get(["resize"],!1),value:"false"},"h").w('<div class="simple-edit-buttons-box ').x(t.get(["integrationType"],!1),t,{block:C},{}).w('">').h("ne",t,{block:k},{key:t.get(["trim"],!1),value:"false"},"h").h("ne",t,{block:A},{key:t.get(["crop"],!1),value:"false"},"h").nx(t.get(["fromQuickRecord"],!1),t,{block:I},{}).h("ne",t,{block:N},{key:t.get(["stickers"],!1),value:"false"},"h").h("ne",t,{block:M},{key:t.get(["callouts"],!1),value:"false"},"h").h("ne",t,{block:U},{key:t.get(["blur"],!1),value:"false"},"h").h("ne",t,{block:V},{key:t.get(["resize"],!1),value:"false"},"h").w('</div></div></div><div class="modal-backdrop image-upload-progress-container" id="imageUploadProgessContainer"><div class="text-center loading-container"><div class="progress-text" id="imageUploadProgressText"> </div></div></div>')}function i(e,t){return e.f(t.get(["integrationType"],!1),t,"h").w("-simple-edit")}function n(e,t){return e.w('<div class="se-control-detail clearfix trim-control-detail hide"><img class="ruler ruler-static" src="').f(t.get(["origin"],!1),t,"h").w('/img/ruler-two.png"><canvas class="ruler ruler-dynamic hide" width="1000" height="15"></canvas><input type="text" class="sliderValue" style="display:none" data-index="0" value="0" /><input type="text" class="sliderValue" style="display:none" data-index="1" value="0" /><div class="trim-slider" id="trimSlider"></div>').h("ne",t,{block:r},{key:t.get(["shouldHideTrimTimer"],!1),value:"true"},"h").w('<div class="trim-preview-container"><video class="trim-preview-video"></video></div><div class="preview-trim-arrow"></div></div>')}function r(e,t){return e.w('<div class="trim-before-container"><div class="trim-before-time-element"><div class="arrow right-arrow"></div><span class="trim-before-time"></span></div><div class="trim-before-pop"><span>').f(t.getPath(!1,["simpleEdit","trimStartTime"]),t,"h").w('</span><input type="text" class="trim-before-input"><div class="before-trim-div"><div class="arrow up-arrow trim-input-btn trim-input-btn-plus"></div><div class="arrow down-arrow trim-input-btn trim-input-btn-minus"></div></div><div class="trim-arrow"></div></div></div><div class="trim-after-container"><div class="trim-after-time-element"><div class="arrow left-arrow"></div><span class="trim-after-time"></span></div><div class="trim-after-pop"><span>').f(t.getPath(!1,["simpleEdit","trimEndTime"]),t,"h").w('</span><input type="text" class="trim-after-input"><div class="after-trim-div"><div class="arrow up-arrow trim-input-btn trim-input-btn-plus"></div><div class="arrow down-arrow trim-input-btn trim-input-btn-minus"></div></div><div class="trim-arrow"></div></div></div>')}function o(e,t){return e.w('<div class="se-control-detail clearfix crop-control-detail hide"><div class="pull-left reposition-webcam-container"><input type="checkbox" class="reposition-webcam wiz-checkbox-blue" id="move" checked /><label for="move">').f(t.getPath(!1,["simpleEdit","moveWebcam"]),t,"h").w('</label></div><div class="pull-right text-right"><a class="apply-crop apply-btn" id="cropApplyBtn">').f(t.getPath(!1,["simpleEdit","apply"]),t,"h").w('</a><a class="reset-crop reset-btn" id="cropResetBtn">').f(t.getPath(!1,["simpleEdit","reset"]),t,"h").w("</a></div></div>")}function a(e,t){return e.x(t.get(["isAddImageEnabled"],!1),t,{block:s},{})}function s(e,t){return e.w('<div class="se-control-detail clearfix addimage-control-detail hide">').nx(t.get(["fromQuickRecord"],!1),t,{else:l,block:c},{}).w('<div class="addimage-selected hide"><div class="left"><input type="checkbox" class="wiz-checkbox-blue" id="imageArLock" checked /><label for="imageArLock" class="image-ar-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="left opacity-container"><span class="left">').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span><input class="left slider" type="range" min="0" max="100" id="imageOpacitySlider"><input class="left slider-ip" type="number" min="0" max="100" value="100" id="imageOpacityInput"></div><div class="right delete-btn-container"><div id="deleteImage" class="delete-btn">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</div></div></div></div>")}function l(e,t){return e.w('\x3c!-- new quick record flow personalization --\x3e<div class="addimage-initial cpv-personalization hide"><div class="add-image-action left add-text hide">\t<img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span id="addTextLink">\t').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w('\t</span>\t</div><div class="add-image-action left" id="addImageBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addImage"]),t,"h").w("</span></div>").x(t.get(["canShowPersonalization"],!1),t,{block:u},{}).w("</div>\x3c!-- end of new quick record flow personalization --\x3e")}function u(e,t){return e.w('<div class="add-image-action left" id="addPersonalizedImageBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addPersonalizedImage"]),t,"h").w('</span></div><div class="add-image-action left" id="addWebsiteImageBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/plus-ico-blue.svg"/><span>').f(t.getPath(!1,["simpleEdit","addWebsiteImage"]),t,"h").w("</span></div>")}function c(e,t){return e.w('<div class="addimage-initial hide"><div class="add-image-action left add-text hide">\t<span id="addTextLink">\t').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w('\t</span>\t</div><div class="add-image-action left" id="addImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addImage"]),t,"h").w("</span></div>").x(t.get(["canShowPersonalization"],!1),t,{block:d},{}).w("</div>")}function d(e,t){return e.w('<div class="add-image-action left" id="addPersonalizedImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addPersonalizedImage"]),t,"h").w('</span></div><div class="left add-image-tooltip"><img src="').f(t.get(["origin"],!1),t,"h").w('/img/help.png"><div class="add-image-tooltip-content">').f(t.getPath(!1,["simpleEdit","addImageInfo"]),t,"h").w('<a href="https://help.hippovideo.io/support/solutions/articles/19000100178-image-personalization" target="_blank">').f(t.getPath(!1,["simpleEdit","learnMore"]),t,"h").w('</a></div></div><div class="add-image-action left" id="addWebsiteImageBtn"><span>').f(t.getPath(!1,["simpleEdit","addWebsiteImage"]),t,"h").w('</span></div><div class="left add-image-tooltip"><img src="').f(t.get(["origin"],!1),t,"h").w('/img/help.png"><div class="add-image-tooltip-content">').f(t.getPath(!1,["simpleEdit","addWebsiteImageInfo"]),t,"h").w('<a href="https://help.hippovideo.io/support/solutions/articles/19000100178-image-personalization" target="_blank">').f(t.getPath(!1,["simpleEdit","learnMore"]),t,"h").w("</a></div></div>")}function h(e,t){return e.w('<div class="se-control-detail clearfix addtext-control-detail hide"><div class="addtext-container"><div id="textPropertiesTab" style="display:none" class="sdk-top-wrap"><div class="sdk-text-wrap"><div class="padding-face se-font mf-custom-selector"><select class="se-text-properties se-font-selector"></select></div><div class="padding-face se-fontsize mf-custom-selector"><select class="se-text-properties se-fontsize-selector"><option value="15">15px</option><option value="17">17px</option><option value="20">20px</option><option value="25">25px</option><option value="35">35px</option><option value="40" selected>40px</option><option value="50">50px</option><option value="60">60px</option><option value="70">70px</option><option value="90">90px</option><option value="110">110px</option></select></div><div class="padding-face"><select class="se-text-properties se-textalign-selector"><option value="left">').f(t.getPath(!1,["simpleEdit","left"]),t,"h").w('</option><option value="center" selected>').f(t.getPath(!1,["simpleEdit","center"]),t,"h").w('</option><option value="right">').f(t.getPath(!1,["simpleEdit","right"]),t,"h").w('</option></select></div></div><div class="sdk-textstyle-wrap"><div class="se-bold-face"><input type="checkbox" id="c1" class="se-text-properties se-bold-toggle chk-btn" /><label for=\'c1\'><b>B</b></label></div><div class="italic-face"><input type="checkbox" id="c2" class="se-text-properties se-italic-toggle chk-btn" /><label for=\'c2\'><i>I</i></label></div><div class=""><div class="padding-face color-picker"><input type = "color" class="se-text-properties se-color-choose se-color-selector"/></div></div></div></div><div class="padding-face"><div class="mf-custom-selector mf-custom-selector-button merge-field-container">').x(t.get(["canShowPersonalization"],!1),t,{block:p},{}).w('</div><div class="padding-face se-add-text-btn text-right"><a class="add-text" id="addTextLink"><img src="').h("eq",t,{else:g,block:m},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('" alt="plus" />').f(t.getPath(!1,["simpleEdit","addText"]),t,"h").w("</a></div></div></div></div>")}function p(e,t){return e.w('<div class="mf-selector"><select id="seMfSelector"><option selected>').f(t.getPath(!1,["simpleEdit","mergeFields"]),t,"h").w("</option>").s(t.get(["mfValues"],!1),t,{block:f},{}).w('</select></div><div class="text-right mf-label"><label><div><span class="mf-info-tooltip">').f(t.getPath(!1,["simpleEdit","mfInfoTooltip"]),t,"h").w('</span><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/help1.svg" /></div></label></div>')}function f(e,t){return e.w("<option>").f(t.get(["mf"],!1),t,"h").w("</option>")}function g(e,t){return e.f(t.get(["origin"],!1),t,"h").w("/img/small-plus.png")}function m(e,t){return e.w("/img/small-plus-4a90e2.png")}function v(e,t){return e.w('<div class="se-control-detail clearfix addsticker-control-detail hide"><div class="addsticker-initial hide"><div class="sticker-btn-container clearfix"></div></div><div class="addsticker-selected hide"><div class=""><input type="checkbox" class="lock-aspect-ratio sticker-control wiz-checkbox-blue" id="sticker-lock" checked /><label for="sticker-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class=""><div class="text-right"><span>').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span></div><div class=""><select class="opacity-val sticker-control"><option value="0">0</option><option value="25">25</option><option value="50">50</option><option value="75">75</option><option value="100">100</option></select></div></div><div class="text-right"><a class="delete-sticker delete-label" id="deleteSticker">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function y(e,t){return e.w('<div class="se-control-detail clearfix addcallout-control-detail hide"><div class="addcallout-initial clearfix hide"><img class="callout-scroll-left pull-left" src="').h("eq",t,{else:b,block:w},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('"><div class="callout-btn-scroll-container pull-left"><div class="callout-btn-container"></div></div><img class="callout-scroll-right pull-right" src="').h("eq",t,{else:E,block:_},{key:t.get(["integrationType"],!1),value:"lessonly"},"h").w('"><div class="callout-scroll-hide-layer"></div></div><div class="addcallout-selected hide"><div class=""><input type="checkbox" class="lock-aspect-ratio callout-control wiz-checkbox-blue" id="callout-lock" checked /><label for="callout-lock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class=""><div class=""><span>').f(t.getPath(!1,["simpleEdit","opacity"]),t,"h").w('</span></div><div class=""><select class="opacity-val callout-control"><option value="0">0</option><option value="25">25</option><option value="50">50</option><option value="75">75</option><option value="100" selected>100</option></select></div></div><div class=""><div class=""><span>').f(t.getPath(!1,["simpleEdit","color"]),t,"h").w('</span></div><div class=""><select class="callout-control callout-variation"><option value="0">').f(t.getPath(!1,["simpleEdit","default"]),t,"h").w('</option><option value="1">').f(t.getPath(!1,["simpleEdit","yellow"]),t,"h").w('</option><option value="2">').f(t.getPath(!1,["simpleEdit","orange"]),t,"h").w('</option><option value="3">').f(t.getPath(!1,["simpleEdit","green"]),t,"h").w('</option><option value="4">').f(t.getPath(!1,["simpleEdit","violet"]),t,"h").w('</option><option value="5">').f(t.getPath(!1,["simpleEdit","blue"]),t,"h").w('</option><option value="6">').f(t.getPath(!1,["simpleEdit","dark"]),t,"h").w('</option><option value="7">').f(t.getPath(!1,["simpleEdit","white"]),t,"h").w('</option></select></div></div><div class="text-right"><a class="delete-callout delete-label" id="deleteCallout">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function b(e,t){return e.f(t.get(["origin"],!1),t,"h").w("/img/sli-aro-left.png")}function w(e,t){return e.w("/img/sli-aro-left-4a90e2.png")}function E(e,t){return e.f(t.get(["origin"],!1),t,"h").w("/img/sli-aro-right.png")}function _(e,t){return e.w("/img/sli-aro-right-4a90e2.png")}function S(e,t){return e.w('<div class="se-control-detail clearfix blur-control-detail text-left hide"><div class="blur-initial hide" id="blurInitial">').f(t.getPath(!1,["simpleEdit","blurDescription"]),t,"h").w('<div class="outline-btn pull-right" id="applyBlur"> ').f(t.getPath(!1,["simpleEdit","addNewBlur"]),t,"h").w(' </div></div><div class="blur-selected clearfix hide" id="blurSelected"><div class="pull-left"><input type="checkbox" class="lock-aspect-ratio blur-control wiz-checkbox-blue" id="blurLock" /><label for="blurLock">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="pull-left content-box"><div class="props-label pull-left"><span> ').f(t.getPath(!1,["simpleEdit","strength"]),t,"h").w(' </span></div><div class="pull-left"><div class="blur-control" id="blurStrength"></div></div><div class="pull-left"><input type="number" step="1" min="0" max="100" value="25" id="blurStrengthText" /></div></div><div class="pull-right text-right content-box"><a class="delete-blur delete-label" id="deleteblur">').f(t.getPath(!1,["simpleEdit","delete"]),t,"h").w("</a></div></div></div>")}function T(e,t){return e.w('<div class="se-resize-control-detail hide"><div class="se-control-detail clearfix primaryvid-control-detail hide"><input type="checkbox" class="lock-aspect-ratio primary-vid-control wiz-checkbox-blue" id="lock-three" checked /><label for="lock-three" class="cursor-pointer" >').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w('</label></div><div class="se-control-detail clearfix secondaryvid-control-detail hide"><input type="checkbox" class="lock-aspect-ratio secondary-vid-control wiz-checkbox-blue" id="lock-four" checked /><label for="lock-four">').f(t.getPath(!1,["simpleEdit","lockAspectRatioResize"]),t,"h").w("</label></div></div>")}function C(e,t){return e.f(t.get(["integrationType"],!1),t,"h").w("-se-icon-sprite")}function k(e,t){return e.w('<div class="wiz-simple-edit-btn trim-btn ').x(t.get(["isHideTrim"],!1),t,{block:x},{}).w('" id="trimBtn" tooltip="').f(t.getPath(!1,["simpleEdit","trim"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-trim"></span></div>')}function x(e,t){return e.w(" disp-none ")}function A(e,t){return e.w('<div class="wiz-simple-edit-btn crop-btn ').x(t.get(["isHideCorp"],!1),t,{block:P},{}).w('" id="cropBtn" tooltip="').f(t.getPath(!1,["simpleEdit","crop"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-crop"></span></div>')}function P(e,t){return e.w(" disp-none ")}function I(e,t){return e.h("ne",t,{block:R},{key:t.get(["text"],!1),value:"false"},"h").x(t.get(["isAddImageEnabled"],!1),t,{block:D},{})}function R(e,t){return e.w('<div class="wiz-simple-edit-btn add-text-btn" id="addTextBtn" tooltip="').f(t.getPath(!1,["simpleEdit","text"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-text"></span></div>')}function D(e,t){return e.h("ne",t,{block:O},{key:t.get(["image"],!1),value:"false"},"h")}function O(e,t){return e.w('<div class="wiz-simple-edit-btn add-image-btn" id="addImageMenuBtn" tooltip="').f(t.getPath(!1,["simpleEdit","image"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-image-personalisation"></span></div>')}function N(e,t){return e.w('<div class="wiz-simple-edit-btn add-stickers-btn ').x(t.get(["isHideStickers"],!1),t,{block:L},{}).w('" id="addStickersBtn" tooltip="').f(t.getPath(!1,["simpleEdit","emoji"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-sticker"></span></div>')}function L(e,t){return e.w(" disp-none ")}function M(e,t){return e.w('<div class="wiz-simple-edit-btn add-callouts-btn ').x(t.get(["isHideCallouts"],!1),t,{block:F},{}).w('" id="addCalloutsBtn" tooltip="').f(t.getPath(!1,["simpleEdit","callout"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-callout"></span></div>')}function F(e,t){return e.w(" disp-none ")}function U(e,t){return e.w('<div class="wiz-simple-edit-btn add-blur-btn ').x(t.get(["isHideBlur"],!1),t,{block:B},{}).w('" id="blurBtn" tooltip="').f(t.getPath(!1,["simpleEdit","blur"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-blur"></span></div>')}function B(e,t){return e.w(" disp-none ")}function V(e,t){return e.w('<div class="wiz-simple-edit-btn resize-draggable-btn ').x(t.get(["isResizableNotAllowed"],!1),t,{block:z},{}).w('" id="resizeDragBtn" tooltip="').f(t.getPath(!1,["simpleEdit","resize"]),t,"h").w('" tooltip-position="bottom"><span class="simple-edit-resize"></span></div>')}function z(e,t){return e.w(" disp-none ")}e.register("templates/simple_edit/sdk_controls",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0,I.__dustBody=!0,R.__dustBody=!0,D.__dustBody=!0,O.__dustBody=!0,N.__dustBody=!0,L.__dustBody=!0,M.__dustBody=!0,F.__dustBody=!0,U.__dustBody=!0,B.__dustBody=!0,V.__dustBody=!0,z.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/simple_edit/sdk_controls",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";i.d(t,"a",(function(){return u}));var n,r=i(1),o=i.n(r),a=i(4),s=i.n(a),l=i(3),u=l.c.div(n||(n=s()(["\n margin-top: ",";\n margin-left: auto;\n margin-right: auto;\n\n /* Because the css of image-upload-progress-container is not defined properly and you will need to import entire wiz-delivery.scss file for this to work */\n .image-upload-progress-container {\n display: none;\n }\n"])),function(e){var t=e.showSimpleEditor;return o()(this,void 0),t?"0":"38px"}.bind(void 0))},function(e,t,i){"use strict";i.d(t,"a",(function(){return x}));var n,r,o=i(1),a=i.n(o),s=i(0),l=i.n(s),u=i(57),c=i.n(u),d=i(3),h=i(4),p=i.n(h),f=d.c.div(n||(n=p()(["\n .progress-widget-header {\n position: relative;\n display: flex;\n align-items: center;\n width: 80%;\n border-bottom: 1px solid #E6E6E6;\n margin: 0 auto;\n &-progress-warpper {\n position: relative;\n }\n &-status-text {\n color: #000000;\n font: normal normal 600 14px/19px Open Sans;\n }\n &-percent-text {\n font: normal normal 600 14px/19px Open Sans;\n color: #000000;\n position: absolute;\n right: 0;\n }\n img {\n position: absolute;\n top: 11px;\n left: 10px;\n }\n }\n .progress-widget-content {\n width: 80%;\n margin: 0 auto;\n padding: 10px 10px;\n font: normal normal normal 12px/17px Open Sans;\n color: #6F6F6F;\n }\n"]))),g=d.c.div(r||(r=p()(["\n svg {\n width: 30px;\n height: 28px;\n .bg {\n fill: none;\n stroke-width: 2px;\n stroke: #E6E6E6;\n }\n .progress {\n fill: none;\n stroke-width: 2px;\n stroke: #F47A58;\n stroke-linecap: round;\n stroke-dasharray: 62.36;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n stroke-dashoffset: ",";\n transition: stroke-dashoffset 1s ease-in;\n }\n }\n"])),function(e){return a()(this,void 0),isNaN(e.progress)?"62":e.progress}.bind(void 0));function m(e){var t=this,i=e.progressPercent,n=void 0===i?0:i,r=Object(s.useMemo)(function(){return a()(this,t),62-n/100*62}.bind(this),[n]);return l.a.createElement(g,{progress:r},l.a.createElement("svg",null,l.a.createElement("circle",{className:"bg",cx:"15",cy:"15",r:"10"}),l.a.createElement("circle",{className:"progress two",cx:"15",cy:"15",r:"10"})))}var v,y=i(13),b={completedPercent:0,type:"upload"};function w(e){var t=this,i=e.recorder,n=e.onUploadComplete,r=e.onUploadError,o=Object(s.useState)(b),u=o[0],c=o[1],d=Object(s.useRef)(),h=Object(y.a)(u);return Object(s.useEffect)(function(){var e=this;a()(this,t),console.log("progressFetchInterval.current ",d.current),d.current||(d.current=setInterval(function(){var t=this;a()(this,e);try{i.getUploadDetails().then(function(e){return a()(this,t),e&&e.completed?(n&&n(),clearInterval(d.current),void(d.current=null)):e&&e.error?(clearInterval(d.current),d.current=null,void r(e.errorType)):void c(e)}.bind(this)).catch(function(e){a()(this,t),console.error("UPLOAD STATUS FETCH ERROR ",e),clearInterval(d.current),d.current=null}.bind(this))}catch(e){console.error("UPLOAD PROGRESS EX ",e),clearInterval(d.current),d.current=null}}.bind(this),1e3),function(){a()(this,e),clearInterval(d.current),d.current=null}.bind(this))}.bind(this)),l.a.createElement(f,null,l.a.createElement("div",{className:"progress-widget-header"},l.a.createElement("div",{className:"progress-widget-header-progress-warpper"},l.a.createElement(m,{progressPercent:u.completedPercent}),l.a.createElement("img",{src:Object(y.d)("/svg/rapi/webcam-icon.svg")})),l.a.createElement("div",{className:"progress-widget-header-status-text"},"Uploading video"),l.a.createElement("div",{className:"progress-widget-header-percent-text"},u.completedPercent,"%")),l.a.createElement("div",{className:"progress-widget-content"},l.a.createElement("div",null,h)))}var E,_=d.c.div(v||(v=p()(["\n margin: 0 auto;\n width: 90%;\n .hv-upload-error-screen-header {\n display: flex;\n align-items: center;\n padding-bottom: 10px;\n padding-top: 20px;\n border-bottom: 1px solid #e6e6e6;\n img {\n margin-right: 5px;\n }\n div {\n font: normal normal 600 14px/19px Open Sans;\n }\n }\n\n .hv-upload-error-screen-content {\n &-text {\n font: normal normal normal 12px/17px Open Sans;\n color: #212121;\n padding-top: 10px;\n }\n &-options-wrapper {\n text-align: center;\n padding: 20px 0px;\n }\n }\n"]))),S=i(16);function T(e){var t=this,i=e.downloadSources,n=e.onRetryUpload,r=function(){a()(this,t);var e=[];if(i)for(var n in i){var r=i[n];e.push({link:r,linkType:"download",downloadName:"Testing the name",linkName:"Download ".concat(n," source")})}return e}.bind(this);return l.a.createElement(_,null,l.a.createElement("div",{className:"hv-upload-error-screen-header"},l.a.createElement("img",{src:Object(y.d)("/svg/rapi/error-circle-red.svg")}),l.a.createElement("div",null,"Upload Failed")),l.a.createElement("div",{className:"hv-upload-error-screen-content"},l.a.createElement("div",null,l.a.createElement("div",{className:"hv-upload-error-screen-content-text"},"Your video upload has failed! Below are the few options you can try."),l.a.createElement("div",{className:"hv-upload-error-screen-content-options-wrapper"},l.a.createElement(S.d,{style:{marginRight:"10px"},icon:Object(y.d)("/svg/rapi/download-icon.svg"),text:"Download Video",options:r(),type:S.b.TRANSPARENT,buttonFeature:S.a.DROPDOWN,dropdownPosition:S.c.TOP}),l.a.createElement(S.d,{text:"Retry Upload",onClickHandler:n})))))}var C=d.c.div(E||(E=p()(["\n max-width: 400px;\n min-width: 300px;\n border: 1px solid #E6E6E6;\n background-color: #ffffff;\n box-shadow: 0px 8px 12px #0000001A;\n border-radius: 8px;\n"])));function k(e){var t=this,i=e.recorder,n=e.onUploadComplete,r=Object(s.useState)(!1),o=r[0],u=r[1],c=Object(s.useRef)(),d=function(e){a()(this,t),console.log("SETTING UPLOAD ERROR >>> ",e),c.current=i.getRecordingObjectUrls(),console.log("SETTING UPLOAD ERROR >>> ",c.current),u(e)}.bind(this),h=function(){a()(this,t),i.retryUpload(),u(!1)}.bind(this);return l.a.createElement(C,null,o?l.a.createElement(T,{downloadSources:c.current,onRetryUpload:h}):l.a.createElement(w,{recorder:i,onUploadComplete:n,onUploadError:d}))}function x(e,t){var i=P();c.a.render(l.a.createElement(d.a,{theme:t},l.a.createElement(k,{recorder:e,onUploadComplete:A})),i)}var A=function(){a()(this,void 0),c.a.unmountComponentAtNode(document.getElementsByClassName("hv-upload-progress-widget")[0])}.bind(void 0),P=function(){if(a()(this,void 0),document.getElementsByClassName("hv-upload-progress-widget").length>0)return document.getElementsByClassName("hv-upload-progress-widget")[0];var e=document.createElement("div");return e.className="hv-upload-progress-widget",e.style="position: fixed;bottom: 20px;right: 20px;",document.body.appendChild(e),e}.bind(void 0)},function(e,t,i){"use strict";i.d(t,"a",(function(){return m}));var n,r=i(1),o=i.n(r),a=i(0),s=i.n(a),l=i(57),u=i.n(l),c=i(192),d=i(193),h=i(4),p=i.n(h),f=i(3).c.div(n||(n=p()(["\n position: fixed;\n width: 320px;\n bottom: 0;\n left: 5px;\n z-index: 100;\n"])));function g(e){var t=e.stream,i=Object(a.useRef)(),n=Object(a.useRef)();return window.videoPreviewRef=i,window.lightingCanvasRef=n,s.a.createElement(f,null,s.a.createElement(c.a,{stream:t,ref:i}),t&&s.a.createElement(d.a,{ref:n}))}function m(e){var t=v();console.log("ROOT ELEMENT ",t),u.a.render(s.a.createElement(g,{stream:e}),t)}var v=function(){if(o()(this,void 0),document.getElementsByClassName("hv-rapi-webcam-preview").length>0)return document.getElementsByClassName("hv-rapi-webcam-preview")[0];var e=document.createElement("div");return e.className="hv-rapi-webcam-preview",document.body.appendChild(e),e}.bind(void 0)},function(e,t,i){"use strict";i.r(t),function(e){i.d(t,"removeWidget",(function(){return M})),i.d(t,"initialize",(function(){return F})),i.d(t,"availableRecordingSupport",(function(){return B})),i.d(t,"RecorderWidget",(function(){return z})),i.d(t,"ImportWidget",(function(){return H}));i(74);var n=i(49),r=i.n(n),o=i(53),a=i.n(o),s=i(41),l=i.n(s),u=i(36),c=i.n(u),d=i(37),h=i.n(d),p=i(359),f=i.n(p),g=i(1),m=i.n(g),v=i(249),y=i.n(v),b=(i(67),i(51),i(105),i(220),i(24),i(60),i(0)),w=i.n(b),E=i(57),_=i.n(E),S=i(26),T=i(5),C=i(187),k=i(206),x=i(400),A=i(399);function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=l()(e);if(t){var r=l()(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return a()(this,i)}}var I,R=["record_initiated","record_started","record_details","record_paused","record_resumed","record_stopped","record_aborted","record_error","video_cancelled","video_submitted","import_progress","import_complete","import_failed","source_uploaded"],D=!1,O={},N={screen:"screenRecord",webcam:"webCam",system_audio:"systemAudio",tab_recording:"tabRecording",separate_layer:"separateLayer",from_popup:"fromPopup",aspect_ratio:"aspectRatio",record_config:"recordConfig"};function L(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="";window&&window.performance&&(t="".concat(Math.round(window.performance.now())));for(var i=e.length,n=0;n<10;n++)t+=e.charAt(Math.floor(Math.random()*i));return t}var M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.getElementById("recorder1");m()(this,void 0);try{_.a.unmountComponentAtNode(e)}catch(e){}}.bind(void 0);function F(e,t){return U.apply(this,arguments)}function U(){return(U=f()(y.a.mark((function e(t,i){var n,r,o,a,s,l,u,c,d,h,p,f,g,m;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return i&&i(null,{error:"INVALID_CONFIGURATION",message:"The configuration passed is invalid"}),e.abrupt("return");case 3:if(n=t.token,r=t.token_type,o=void 0===r?T.e.RECORDER_SDK_TOKEN:r,a=t.environment,s=t.integration_type,l=void 0===s?"generic_recorder":s,n){e.next=7;break}return i&&i(null,{error:"TOKEN_NOT_FOUND",message:"The token was not passed in the method"}),e.abrupt("return");case 7:return u=new C.a({token:n,tokenType:o}),e.next=10,u.authenticateToken();case 10:if(c=e.sent,d=c[0],h=c[1],!d){e.next=25;break}if(p=d.data,f=p.user_id,console.log("SUCCESS ",d),!p.error){e.next=20;break}return i&&i(null,p),e.abrupt("return");case 20:g=L(),O[g]={token:n,userId:f,environment:a,initialized:!0,tokenType:o},K(l),Y(n),i&&i({key:g},null);case 25:if(!h){e.next=30;break}return console.log("ERROR ",h),m={error:"NETWORK_ERROR",message:"There was a network error. Please check network connection and try again"},i&&i(null,m),e.abrupt("return");case 30:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(){var e=Object(S.f)();return e.recording&&delete e.recording.system_audio,console.log("Recording capabilities ",e.recording,e.constraints),e}var V=function(){function t(e,i){var n=i.type,r=i.settings,o=void 0===r?{}:r,a=i.recorder_events;if(c()(this,t),!O.hasOwnProperty(e))throw new Error("INVALID_KEY");var s=o.extensionless,l=o.inline;if(this.eventCallbacks=[],this.recordingInProgress=!1,this.isRecorderOpen=l.open,this.recorderSettings=o,a&&this.eventCallbacks.push(a),O[e].initialized){var u,d,h;if(window.HippoVideo||(window.HippoVideo={}),this.eventListenerClass="hvr-evl-".concat((new Date).getTime()),this.recorderClassName="hv-recorder-".concat((new Date).getTime()),this.extensionless=s,!1!==l){var p=l.element_id,f=l.element;if(p&&(u=document.getElementById(p)),f&&(u=f),!u&&document.getElementsByTagName("hippo-video-recorder")[0]&&(u=document.getElementsByTagName("hippo-video-recorder")[0]),!u)return void $(this.eventCallbacks,"recorder_error",{error:"INLINE_ELEMENT_NOT_PROVIDED",message:'Parent element for adding recorder not found. Please pass the element id or element or set config "popup" as true.'})}else d="hvr-popup-".concat((new Date).getTime()),(h=document.createElement("div")).setAttribute("id",d),h.style.cssText="display:none;z-index: 100;position: absolute;width: 100%;height: 100%;top: 0;left: 0;justify-content: center;align-items: center;background: rgba(0,0,0,0.72);",document.body.appendChild(h),u=h,this.popupElement=u;this._cb=this._cb.bind(this),console.log("ELEMENT ",u,this.popupElementId),M(u),u.innerHTML="",_.a.render(w.a.createElement(k.b,{settings:o,userId:O[e].userId,type:n,token:O[e].token,recorderClassName:this.recorderClassName,eventListenerClass:this.eventListenerClass,eventCallback:this._cb}),u)}else $(this.eventCallbacks,"recorder_error",{error:"RECORDER_NOT_INITIALIZED",message:"Recorder not initialized. Please call initialize method first."})}return h()(t,[{key:"on",value:function(e){e&&this.eventCallbacks.push(e)}},{key:"getPageUrl",value:function(){console.log("PAGE URL IS ",window.location.href)}},{key:"_cb",value:function(t){if(console.log("EVENT CALLBACK ",t,this.eventListenerClass),R.includes(t.type)&&$(this.eventCallbacks,t.type,t.detail),t.type,"record_details"===t.type&&console.log("RECORDING DETAILS ",t.detail),"_record_started"===t.type){var i=t.detail||{};console.log("DDDDD ",i),this.recordingInProgress=!0,i.showWebcamPreview&&J(i.stream),i.showMarkupTools&&(n=this.recordingConfiguration,r=this.eventListenerClass,function(t,i){e('<div class="hv-focus-overlay" id="hvOverlayDiv" style="display: none;"> <div id="hvOverlayCircle"></div> </div>').appendTo("body"),e('<div id="hvHighLightDiv" class="hv-highlight-div" style="pointer-events: none">').appendTo("body"),e('<canvas id="hvCanvas" style="opacity:0.6;position: absolute;top: 0;height: 100%;left: 0;background-color: transparent;width: 100%;"></canvas>').appendTo("body"),function(t,i){e('<style>#hippo-overlay{\r\n\tposition: relative;\r\n\tz-index: 2555555;\r\n}\r\n#hvStop {\r\nmargin-bottom: 3px;\r\n}\r\n#hvPen{\r\nmargin-bottom: 2px;\r\n}\r\n#hvFocusArea{\r\nmargin-bottom: 2px;\r\n}\r\n#hvEraser {\r\nmargin-bottom: 2px;\r\n}\r\n#hvClearScreen{\r\nmargin-bottom: 5px;\r\n}\r\n#hippo-overlay-screenrecord{\r\n\tposition: fixed;\r\n\tleft: 0px;\r\n\tbottom: 0px;\r\n\tdisplay: none;\r\n\tborder: 0px solid gray;\r\n\tborder-radius: 5px !important;\r\n}\r\n#hippo-overlay-time {\r\n\tposition: fixed;\r\n\ttext-align: center;\r\n\ttop: 30%;\r\n\tleft:41.5%;\r\n\twidth: 250px;\r\n\theight:250px;\r\n\tborder-radius: 50%;\r\n\tdisplay: none;\r\n\tbackground-color: rgba(0, 0, 0, 0.5);\r\n\tborder:5px solid #f47a58;\r\n\tfont-family: \'Open Sans\';\r\n background-repeat: no-repeat;\r\n background-position: 50% 50%;\r\n\tbox-sizing: content-box;\r\n}\r\n#hippo-overlay-time span\r\n{\r\n\tfont-size: 3.750em !important;\r\n\tcolor: #f47a58 !important;\r\n\ttop: 85px;\r\n\tleft: 110px;\r\n\tposition: absolute;\r\n\tmargin-left:-11px;\r\n\tline-height: normal;\r\n}\r\n.hippo-embed-countdown {\r\n\tbackground-image: none !important;\r\n\tbackground-color: #fff !important;\r\n\tborder: 11px solid #000 !important;\r\n}\r\n.hippo-embed-countdown #countdown {\r\n\tposition: unset !important;\r\n\tmargin-left: 0 !important;\r\n\tdisplay: inline-block !important;\r\n\tmargin-left: 0 !important;\r\n\tfont-family: sans-serif !important;\r\n\tfont-weight: 600 !important;\r\n\tfont-size: 91px !important;\r\n\tmargin-top: 79px !important;\r\n\tcolor: #000 !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n}\r\n.hippo-video-countdown {\r\n\tbackground-image: none !important;\r\n\tbackground-color: #fff !important;}\r\n.hippo-video-countdown #countdown {\r\n\tposition: unset !important;\r\n\tmargin-left: 0 !important;\r\n\tdisplay: inline-block !important;\r\n\tmargin-left: 0 !important;\r\n\tfont-family: sans-serif !important;\r\n\tfont-weight: 600 !important;\r\n\tfont-size: 91px !important;\r\n\tmargin-top: 79px !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n}\r\n\r\n.hv-focus-overlay {\r\n top: 0;\r\n left: 0;\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n pointer-events: none;\r\n z-index: 10000;\r\n}\r\n\r\n#hvOverlayCircle:after {\r\n content: \'\';\r\n position: absolute;\r\n z-index: 10000000000000000;\r\n left: -75px;\r\n top: -75px;\r\n border-radius: 100%;\r\n width: 150px;\r\n height: 150px;\r\n box-shadow: 0px 0px 0px 3000px rgba(0, 0, 0, 0.39);\r\n pointer-events: none;\r\n}\r\n\r\n.hv-highlight-div{\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n z-index: 10000;\r\n}\r\n\r\n/*Highlight Featues Panel CSS*/\r\n.hv-act-comp-bottom-right {\r\n width: 333px; \r\n position: fixed;\r\n right: 30px;\r\n bottom: 0;\r\n -background-color: #424242;\r\n background-color: rgba(66, 66, 66, 0.8);\r\n max-height: 43px;\r\n -overflow: hidden;\r\n border: 0;\r\n border-radius: 5px 5px 0 0;\r\n cursor: default;\r\n z-index: 10000001;\r\n}\r\n\r\n.hv-act-comp-bottom-left {\r\n position: fixed;\r\n left: 30px;\r\n bottom: 0;\r\n -background-color: #424242;\r\n background-color: rgba(66, 66, 66, 0.8);\r\n max-height: 43px;\r\n -overflow: hidden;\r\n border: 0;\r\n border-radius: 5px 5px 0 0;\r\n cursor: default;\r\n z-index: 10000001;\r\n}\r\n\r\n.hv-highlight-options-div {\r\n -width: 330px;\r\n transition: all 300ms ease-out;\r\n}\r\n.hv-close-highlight-feature-panel {width: 0px;}\r\n/*Highlight Featues Panel CSS Ends*/\r\n\r\n\r\n/*Highlight option Icons and its effects*/\r\n.hv-icon-out-space {\r\n display: inline-block;\r\n padding-top: 13px;\r\n padding-right: 15px;\r\n padding-left: 15px;\r\n padding-bottom: 15px;\r\n cursor: pointer;\r\n}\r\n.hv-icon-out-space img {cursor: pointer;}\r\n.hv-icon-out-space:hover {background-color: #313131;}\r\n\r\n.hv-icon-out-disable {\r\n position: relative;\r\n top: -15px;\r\n opacity: .3;\r\n}\r\n\r\n.hv-icon-out-disable:hover {\r\n background-color: rgba(66, 66, 66, 0.8) !important;\r\n}\r\n\r\n.hv-pause-play {border-radius: 5px 0px 0px 0px;}\r\n\r\n.hv-togarrow-spacer {\r\n position: absolute;\r\n background-color: transparent;\r\n border-left: 1px solid;\r\n display: inline-block;\r\n border-radius: 0 5px 0px 0;\r\n cursor: pointer;\r\n}\r\n.hv-togarrow {padding: 16px 5px 19px 5px;}\r\n.hv-togarrow-left {\r\n padding: 16px 5px 19px 5px;\r\n transform: rotate(-180deg);\r\n}\r\n.hv-togarrow:hover {background-color: #313131;}\r\n\r\n.hv-active-tool {background-color: #313131;}\r\n/*Highlight option Icons and its effects ends*/\r\n\r\n/*Collape*/\r\n.hv-collapsed {\r\n width: 45px;\r\n\r\n background-color: rgba(49, 49, 49, 0.85);\r\n border-radius: 5px;\r\n padding: 10px;\r\n position: absolute;\r\n top: 0;\r\n right: 0px;\r\n max-height: 43px;\r\n cursor: pointer;\r\n transition: all 300ms ease-out;\r\n}\r\n.hv-collapsed-move {right: -30px;}\r\n/*Collape Ends*/\r\n\r\n/*Tooltip Panel*/\r\n.hv-tooltip-panel {\r\n width: 300px;\r\n -background-color: #313131;\r\n background-color: rgba(49, 49, 49, 0.85);\r\n padding: 12px 0px;\r\n border-radius: 5px 5px 0 0;\r\n font-size: 13px;\r\n font-weight: lighter;\r\n color: #ffffff;\r\n text-align: center;\r\n letter-spacing: 0.3px;\r\n margin: 0 auto;\r\n position: absolute;\r\n bottom: 43px;\r\n left: 0;\r\n right: 0;\r\n transition: all 300ms ease-out;\r\n line-height: 17px;\r\n white-space: pre-line;\r\n}\r\n.hv-tooltip-panel-toggle {bottom: -50px;}\r\n/*Tooltip Panel Ends*/\r\n\r\n.disp-none {display: none !important;}\r\n\r\n/*Color Palet*/\r\n.hv-choose-color-panel {\r\n background-color: #313131;\r\n border-radius: 5px 5px 0 0;\r\n max-height: 46px;\r\n overflow: hidden;\r\n position: absolute;\r\n top: -48px;\r\n left: 99px;\r\n line-height: 0;\r\n padding: 13px 5px 13px 10px;\r\n cursor: default;\r\n transition: top 300ms ease;\r\n display: none;\r\n}\r\n.hv-change-color-circle {\r\n width: 20px !important;\r\n height: 20px !important;\r\n border-radius: 100%;\r\n border: 1px solid transparent;\r\n margin-right: 5px;\r\n display: inline-block;\r\n cursor: pointer;\r\n}\r\n\r\n.hv-remove-highlight-div {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n\tpointer-events: none !important;\r\n}\r\n\r\n.hv-add-highlight-div {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n}\r\n\r\n.hv-add-eraser {\r\n\tposition: absolute;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\ttop: 0;\r\n\tz-index: 10000;\r\n}\r\n\r\n.hv-remove-canvas {\r\n\topacity:0.5;\r\n\tpointer-events: none;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-add-canvas {\r\n\topacity:0.5;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tpointer-events: all;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-add-canvas-eraser {\r\n\topacity:0.5;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\tbackground-color: transparent;\r\n\twidth: 100%;\r\n}\r\n\r\n.hv-pause-play{\r\n width: 46px;\r\n height: 44px;\r\n padding: 0px;\r\n text-align: center;\r\n position: relative;\r\n top: -17px;\r\n line-height: 59px;\r\n}\r\n\r\n.hv-black-color {background-color: #000000;}\r\n.hv-red-color {background-color: #ff0000;}\r\n.hv-violet-color {background-color: #8170cd;}\r\n.hv-orange-color {background-color: #ff9a44;}\r\n.hv-green-color {background-color: #7ddc68;}\r\n.hv-blue-color {background-color: #1edde1;}\r\n/*Color Palet Ends*/\r\n\r\n.hv-icon-selected #hvCursorAnimationImg {display: none;}\r\n.hv-icon-selected #hvCursorAnimationImgActive {display: block;}\r\n.hv-icon-unslected #hvCursorAnimationImg {display: block;}\r\n.hv-icon-unslected #hvCursorAnimationImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvPenImg {display: none;}\r\n.hv-icon-selected #hvPenImgActive {display: block;}\r\n.hv-icon-unslected #hvPenImg {display: block;}\r\n.hv-icon-unslected #hvPenImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvFocusImg {display: none;}\r\n.hv-icon-selected #hvFocusImgActive {display: block;}\r\n.hv-icon-unslected #hvFocusImg {display: block;}\r\n.hv-icon-unslected #hvFocusImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvEraseImg {display: none;}\r\n.hv-icon-selected #hvEraseImgActive {display: block;}\r\n.hv-icon-unslected #hvEraseImg {display: block;}\r\n.hv-icon-unslected #hvEraseImgActive {display: none;}\r\n\r\n.hv-icon-selected #hvClearImg {display: none;}\r\n.hv-icon-selected #hvClearImgActive {display: block;}\r\n.hv-icon-unslected #hvClearImg {display: block;}\r\n.hv-icon-unslected #hvClearImgActive {display: none;}\r\n\r\n/*.hv-icon-selected #hvPauseImg {display: none;}\r\n.hv-icon-selected #hvPauseImgActive {display: block;}\r\n.hv-icon-unslected #hvPauseImg {display: block;}\r\n.hv-icon-unslected #hvPauseImgActive {display: none;}*/\r\n\r\n.hv-icon-selected #hvStopImg {display: none;}\r\n.hv-icon-selected #hvStopImgActive {display: block;}\r\n.hv-icon-unslected #hvStopImg {display: block;}\r\n.hv-icon-unslected #hvStopImgActive {display: none;}\r\n\r\n/*intro-div*/\r\n.hv-feature-intro-div {\r\n position: fixed;\r\n top: 0;\r\n overflow: hidden;\r\n width: 100%;\r\n height: 100%;\r\n background-color: rgba(0,0,0,0.8);\r\n z-index: 1000;\r\n}\r\n.hv-feature-intro-div .hv-feature-intro-div-inner {\r\n position: relative;\r\n top: 30%;\r\n width: 800px;\r\n margin: 0 auto;\r\n text-align: center;\r\n color: #fff;\r\n font-weight: 300;\r\n font-size: 16px;\r\n letter-spacing: 0.2px;\r\n line-height: 30px;\r\n}\r\n.hv-arrow-pointer {\r\n position: absolute;\r\n top: 100px;\r\n right: 0;\r\n -webkit-animation: fling-arrow 5s infinite;\r\n animation: fling-arrow 5s infinite;\r\n}\r\n@-webkit-keyframes fling-arrow {\r\n 0% {top: 100px;}\r\n 50% {top: 200px;}\r\n 100% {top: 100px;}\r\n}\r\n@keyframes fling-arrow {\r\n 0% {top: 100px;}\r\n 50% {top: 200px;}\r\n 100% {top: 100px;}\r\n}\r\n.hv-primary-btn-2 {\r\n background-image: linear-gradient(to right, rgb(252, 96, 118) 0%, rgb(255, 154, 68) 51%, rgb(255, 154, 68) 100%);\r\n background-size: 200%;\r\n border-radius: 3px;\r\n box-sizing: border-box;\r\n color: rgb(255, 255, 255);\r\n cursor: pointer;\r\n font-family: "Open Sans";\r\n font-size: 13px;\r\n font-weight: 500;\r\n letter-spacing: 0.2px;\r\n margin: 10px 4px 10px 4px;\r\n padding: 8px 20px 9px 20px;\r\n text-align: center;\r\n text-transform: uppercase;\r\n transition-duration: 0.9s;\r\n transition-property: all;\r\n transition-timing-function: ease;\r\n border: unset;\r\n background-color: unset;\r\n}\r\n.hv-primary-btn {\r\n max-height: 35px;\r\n background-image: linear-gradient(120deg, #fc6076 0%, #ff9a44 100%);\r\n padding-top: 8px;\r\n padding-bottom: 7px;\r\n padding-left: 20px;\r\n padding-right: 20px;\r\n letter-spacing: 0.5px;\r\n transition: 0.5s;\r\n box-shadow: inset 0 0 0 0 #fc6076;\r\n border: 0;\r\n border-radius: 5px;\r\n font-size: 13px;\r\n font-weight: 300;\r\n color: #ffffff;\r\n outline: none;\r\n cursor: pointer;\r\n}\r\n.hv-primary-btn:hover {\r\n background-image: linear-gradient(120deg, #ff9a44 0%, #fc6076 100%);\r\n background-position: right center;\r\n}\r\n.hv-pen-cusor-area{\r\n position: fixed;\r\n\r\n}\r\n.hv-cancel-btn {\r\n\tmargin-right: 10px;\r\n\ttop: 18px;\r\n bottom: 0;\r\n position: relative;\r\n color: #4a90e2 !important;\r\n cursor: pointer;\r\n}\r\n.hv-cancel-btn:hover {\r\n text-decoration: underline;\r\n}\r\n#hippo-overlay-div {\r\n height: 100%;\r\n width: 100%;\r\n background-color: rgba(0,0,0,0.6);\r\n position: fixed;\r\n z-index: 1000001;\r\n top:0;\r\n text-align: center;\r\n}\r\n\r\n#hippo-inner-div {\r\n width: 700px;\r\n left: calc(50% - 350px);\r\n height: 506px;\r\n background-color: #fff;\r\n border-radius: 10px;\r\n position: absolute;\r\n top: 12%;\r\n bottom: 0px;\r\n}\r\n\r\n#hippo-action-div{\r\n position: absolute;\r\n bottom: 10px;\r\n left: 27px;\r\n width: 100%;\r\n}\r\n\r\n.hv-stop-recording-btn{\r\n font-size:14px;\r\n background-size: 200% auto;\r\n background-image: linear-gradient(to right, #fc6076 0%, #ff9a44 31%, #ff9a44 100%);\r\n padding: 8px 30px 8px 30px;\r\n border-radius: 4px;\r\n float: right;\r\n margin-right: 61px;\r\n color: #fff;\r\n cursor: pointer;\r\n}\r\n.hv-webcam-play-btn{\r\n font-size: 14px;\r\n background-color: #8b8b8b;\r\n padding: 8px 30px 8px 30px;\r\n border-radius: 4px;\r\n float: right;\r\n color: #fff;\r\n right: 25px;\r\n margin-left: -30px;\r\n position: relative;\r\n cursor: pointer;\r\n}\r\n\r\n#hv-iframe-overlay-div-drag {\r\n z-index: 100000;\r\n height: 200px;\r\n width: 271px;\r\n}\r\n\r\n.hv-webcam-rectangle-bottom-left{\r\n position: fixed;\r\n bottom:0;\r\n left:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-bottom-right{\r\n position: fixed;\r\n bottom:0;\r\n right:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-top-left{\r\n position: fixed;\r\n top:0;\r\n left:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\n\r\n.hv-webcam-rectangle-top-right{\r\n position: fixed;\r\n top:0;\r\n right:0;\r\n height:200px;\r\n z-index:1000000;\r\n border:0;\r\n display:none;\r\n}\r\ndiv.clickEffect{\r\n position:fixed;\r\n box-sizing:border-box;\r\n border-style:solid;\r\n border-color:#ff160b;\r\n border-radius:50%;\r\n animation:clickEffect 0.6s ease-out;\r\n z-index:99999;\r\n pointer-events: none;\r\n}\r\n@keyframes clickEffect{\r\n 0%{\r\n opacity:1;\r\n width:0.5em;\r\n height:0.5em;\r\n margin:-0.25em;\r\n border-width:8px;\r\n transform: scale(0.6, 0.6);\r\n }\r\n 100%{\r\n opacity:0.4;\r\n width:15em; height:15em;\r\n margin:-7.5em;\r\n border-width:0.48px;\r\n transform: scale(0.4, 0.4);\r\n }\r\n}\r\n\r\ndiv.clickEffect2{\r\n position:fixed;\r\n box-sizing:border-box;\r\n border-style:solid;\r\n border-color:#ff160b;\r\n border-radius:50%;\r\n animation:clickEffect2 0.6s ease-out;\r\n z-index:99999;\r\n pointer-events: none;\r\n}\r\n@keyframes clickEffect2{\r\n 0%{\r\n opacity:1;\r\n width:1em;\r\n height:1em;\r\n margin:-0.5em;\r\n border-width:8px;\r\n transform: scale(0.6, 0.6);\r\n }\r\n 100%{\r\n opacity:0.4;\r\n width:15em; height:15em;\r\n margin:-7.5em;\r\n border-width:0.48px;\r\n transform: scale(0.4, 0.4);\r\n }\r\n}\r\n.hv-blink-right, .hv-blink-left{\r\n width: 2px;\r\n height: 2px;\r\n background-color: white;\r\n animation: blink 1s infinite;\r\n opacity:0.1;\r\n border: 1px solid black;\r\n position: fixed;\r\n bottom:0;\r\n display: none;\r\n}\r\n.hv-blink-right{\r\n right: 0;\r\n}\r\n.hv-blink-left{\r\n left: 0;\r\n}\r\n\r\n@keyframes blink {\r\n 0% {transform: scale(1, 1);}\r\n 50% {transform: scale(1.3, 1.3);}\r\n}\r\n#hv-recordingTimer {\r\n font-size: 35px;\r\n font-weight: lighter;\r\n font-family: \'Open Sans\';\r\n color: #ef5253;\r\n text-align: center;\r\n margin-top: 5px !important;\r\n margin-left: 5px;\r\n float: left;\r\n}\r\n\r\n@keyframes fadeInOut {\r\n 0% {opacity: 0}\r\n 50% {opacity: 1}\r\n 100% {opacity: 0}\r\n}\r\n#recording-blinking {\r\n animation: fadeInOut 1s linear infinite;\r\n color: red;\r\n font-size: 12px;\r\n margin-bottom: 8px;\r\n text-align: center;\r\n padding-top: 5px;\r\n}\r\n#recording-blinking img{\r\n margin-right: 5px;\r\n position: relative;\r\n top: 6px;\r\n vertical-align: unset;\r\n}\r\n\r\n.lessonly-recording-frame {\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif !important;\r\n}\r\n\r\n.lessonly-recording-frame #hv-previewcontrol-stop {\r\n\twidth: 170px;\r\n\tfloat: right;\r\n\tbackground-color: #4a90e2 !important;\r\n\tbackground-image: unset;\r\n\tborder: 0;\r\n\tbox-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), inset 0 1px 0 0 #4a90e2, inset 0 2px 0 0 rgba(255, 255, 255, 0.2), 0 1px 2px 0 rgba(0, 0, 0, 0.09) !important;\r\n\tfont-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif;\r\n\tcolor: #fff;\r\n\tfont-size: 16px;\r\n\tfont-weight: normal;\r\n\tline-height: 20px;\r\n\tpadding: 0 16px;\r\n\tborder-radius: 3px;\r\n\theight: 40px;\r\n\tletter-spacing: normal;\r\n\ttext-transform: unset;\r\n\tmargin: 10px 4px;\r\n}\r\n\r\n.lessonly-recording-frame #hv-recordingTimer {\r\n color: #4a90e2 !important;\r\n font-family: "proxima-nova", "Open Sans", "Helvetica Neue", sans-serif !important;\r\n}\r\n\r\n#hv-iframe-wrapper {\r\n\twidth: 90%;\r\n margin-left: 5%;\r\n background-color: rgba(0,0,0,0.04);\r\n}\r\n.hv-align-right {\r\n\tfloat: right;\r\n}\r\n</style>').appendTo("head");var n,r,o,a=window._HVDomain||"",s=(o="Unknown",-1!=window.navigator.userAgent.indexOf("Windows")&&(o="Windows"),-1!=window.navigator.userAgent.indexOf("Mac")&&(o="Mac"),-1!=window.navigator.userAgent.indexOf("X11")&&(o="UNIX"),-1!=window.navigator.userAgent.indexOf("Linux")&&(o="Linux"),o);if(I={isEraser:!1,isPen:!1,cursorWidth:5,canvas:null,ctx:null,flag:!1,prevX:0,currX:0,prevY:0,currY:0,dot_flag:!1,penColor:"#000000",selectedColor:0,highlightCursorWidth:10,highlightCursorHeight:10,stopIcon:a+"/images/hv-highlight-icons/hb-stop.png",cursorIcon:a+"/images/hv-highlight-icons/hb-select.png",cursorIconActive:a+"/images/hv-highlight-icons/hb-select-active.png",penIcon:a+"/images/hv-highlight-icons/hb-pen.png",penIconActive:a+"/images/hv-highlight-icons/hb-pen-active.png",focusIcon:a+"/images/hv-highlight-icons/hb-focus.png",focusIconActive:a+"/images/hv-highlight-icons/hb-focus-active.png",eraseIcon:a+"/images/hv-highlight-icons/hb-erase.png",eraseIconActive:a+"/images/hv-highlight-icons/hb-erase-active.png",clearIcon:a+"/images/hv-highlight-icons/hb-clear.png",clearIconActive:a+"/images/hv-highlight-icons/hb-clear-active.png",video:a+"/images/hv-highlight-icons/hb-video-off.png",togarrow:a+"/images/hv-highlight-icons/hb-toggle-arrow.png",collapsIcon:a+"/images/hv-highlight-icons/collapse-icon.png",penColorIcon:a+"/images/hv-highlight-icons/pen-with-color.svg",penCursorIcon:a+"/images/hv-highlight-icons/pen-cusor.svg",eraseCursorIcon:a+"/images/hv-highlight-icons/erase-cursor.svg",arrowPointer:a+"/images/hv-highlight-icons/arrow-pointer.png",mouseAnimationIcon:a+"/images/hv-highlight-icons/hb-mouse-animation.png",mouseAnimationIconActive:a+"/images/hv-highlight-icons/hb-mouse-animation-active.png",highlightsColors:["#000000","#ff0000","#8170cd","#ff9a44","#7ddc68","#1edde1"],isAlt:!1,clearAction:"hvCursor",highlightOptions:function(e){var t=e.currentTarget.id;I.selectHiglightOptions(t,!0)},checkColorPanelVisible:function(t){e(".hv-choose-color-panel").is(":visible")&&I.tooltipHide()},pausePlay:function(t){e("#hvPause").hasClass("disp-none")?(e("#hvPlay").addClass("disp-none"),e("#hvPause").removeClass("disp-none"),I.highlightsEvents("hvPlay")):(e("#hvPlay").removeClass("disp-none"),e("#hvPause").addClass("disp-none"),I.highlightsEvents("hvPause"))},pausePlayWebcam:function(t){"hvResumeWebcam"===t.currentTarget.id?(e("#hvResumeWebcam").addClass("disp-none"),e("#hvPauseWebcam").removeClass("disp-none")):(e("#hvResumeWebcam").removeClass("disp-none"),e("#hvPauseWebcam").addClass("disp-none"))},handleStopRecording:function(e){console.log("SENDING EVENT ",i,"hv_stop_recording"),Z(i,"hv_stop_recording")},cancelRecording:function(e){},selectHiglightOptions:function(t,i){if("hvClearScreen"!==t&&(I.clearAction=t),e("#"+t).hasClass("hv-active-tool")&&i)return I.resetValues(),I.highlightsEvents("hvCursor"),void I.cursor();if("hvCursor"==t&&!i)return I.resetValues(),void I.cursor();switch(I.resetValues(),e("#"+t).addClass("hv-active-tool"),e("#"+t).removeClass("hv-icon-unslected"),e("#"+t).addClass("hv-icon-selected"),i&&"hvStop"!=t&&I.highlightsEvents(t),"hvPen"!=t&&"hvEraser"!=t&&"hvFocusArea"!=t||e(document).bind("mousemove",I.mouseMove),I.isPen=!1,t){case"hvCursor":I.cursor();break;case"hvCursorAnimation":I.cursorAnimation();break;case"hvPen":I.tooltipHide(),e("#hvHighLightDiv").removeClass("disp-none"),I.pen(),e(".hv-choose-color-panel").show();break;case"hvEraser":I.eraser();break;case"hvClearScreen":I.clearScreen();break;case"hvFocusArea":I.focusArea();break;case"hvStop":I.handleStopRecording()}},resetValues:function(){e(".hv-highlight-option").removeClass("hv-active-tool"),e(".hv-highlight-option").removeClass("hv-icon-selected"),e(".hv-highlight-option").addClass("hv-icon-unslected"),e(".hv-choose-color-panel").hide(),e("#hvHighLightDiv").removeClass("hv-add-highlight-div"),e("#hvHighLightDiv").removeClass("hv-add-eraser"),e("#hvCanvas").removeClass("hv-add-canvas"),e("#hvHighLightDiv").removeClass("hv-remove-highlight-div"),e("#hvCanvas").removeClass("hv-remove-canvas"),e(".hv-pen-cusor-area").remove(),e(document).unbind("mousemove"),document.removeEventListener("mouseup",I.clickEffect)},tooltipHide:function(t){e(".hv-tooltip-panel").hide()},tooltipShow:function(i){if(clearTimeout(r),0!=I.highlightsOpen){e(".hv-tooltip-panel").show();var n=i.currentTarget.id,r=setTimeout((function(){e(".hv-tooltip-panel").hide()}),3e3);switch(n){case"hvCursor":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + M for Cursor");break;case"hvCursorAnimation":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + A for Click Animation");break;case"hvPen":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + H for Highlight \n Hit UP / DOWN arrow to change size \n LEFT / RIGHT arrow to change color");break;case"hvEraser":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + E for Eraser");break;case"hvClearScreen":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + Z for Clear screen");break;case"hvFocusArea":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + F for Focus and ESC for Cursor");break;case"hvPause":case"hvPlay":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + P for Pause and Play");break;case"hvCloseHighlight":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + C for Close");break;case"hvStop":e(".hv-tooltip-panel").text("Press "+("Mac"===s?"Option":"Alt")+" + S for Stop recording");break;case"disabledState":t.screenRecord?e(".hv-tooltip-panel").text("Upgrade needed"):e(".hv-tooltip-panel").text("")}}},color:function(e){I.highlightsEvents("hvColorChoose"),I.isEraser=!1,I.penColor=e.target.id,I.selectedColor=I.highlightsColors.indexOf(e.target.id),I.setCursor(e.target.id)},draw:function(){I.ctx.beginPath(),1==I.isEraser?I.ctx.globalCompositeOperation="destination-out":I.ctx.globalCompositeOperation="source-over",I.ctx.lineCap="round",I.ctx.moveTo(I.prevX,I.prevY),I.ctx.fillStyle=I.penColor,I.ctx.globalAlpha=1,I.ctx.lineTo(I.currX,I.currY),I.ctx.strokeStyle=I.penColor,I.ctx.lineWidth=I.cursorWidth,I.ctx.stroke()},clearScreen:function(){var e=document.body,t=document.documentElement,i=Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight);I.canvas.height=i;var n=I.canvas.width,r=I.canvas.height;I.ctx.clearRect(0,0,n,r),I.selectHiglightOptions(I.clearAction,!1)},focusArea:function(){e("#hvHighLightDiv").addClass("hv-remove-highlight-div"),e("#hvCanvas").addClass("hv-remove-canvas");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").show()},cursor:function(){e("#hvHighLightDiv").css({"pointer-events":"none"});var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide(),e("#hvCanvas").addClass("hv-remove-canvas"),e("#hvCanvas").css("height",n+"px")},cursorAnimation:function(){document.addEventListener("mouseup",I.clickEffect),e("#hvHighLightDiv").css({"pointer-events":"none"});var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("body").css({cursor:"default"}),e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide(),e("#hvCanvas").addClass("hv-remove-canvas"),e("#hvCanvas").css("height",n+"px")},clickEffect:function(e){var t=document.createElement("div");t.className="clickEffect",t.style.top=e.clientY+"px",t.style.left=e.clientX+"px",document.body.appendChild(t),t.addEventListener("animationend",function(){t.parentElement.removeChild(t)}.bind(this));var i=document.createElement("div");i.className="clickEffect2",i.style.top=e.clientY+"px",i.style.left=e.clientX+"px",setTimeout((function(){document.body.appendChild(i),i.addEventListener("animationend",function(){i.parentElement.removeChild(i)}.bind(this))}),200)},pen:function(){I.isEraser=!1,I.isPen=!0,I.setCursor(I.penColor),e("#hvHighLightDiv").addClass("hv-add-highlight-div");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("#hvHighLightDiv").css("height",n+"px"),e("#hvCanvas").removeClass("hv-add-canvas-eraser"),e("#hvCanvas").addClass("hv-add-canvas"),e("#hvCanvas").css("height",n+"px"),e("#hvOverlayDiv").hide();var r='<svg class="hv-pen-cusor-area" xmlns="http://www.w3.org/2000/svg" width="'+I.highlightCursorWidth+'" height="'+I.highlightCursorHeight+'" viewBox="0 0 51 50.969"><metadata><?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about=""/></rdf:RDF></x:xmpmeta><?xpacket end="w"?></metadata><defs><style>.cls-1 {fill: none;stroke: #313131;stroke-linecap: round;stroke-linejoin: round;stroke-width: 1px;stroke-dasharray: 5 4;}</style></defs><circle class="cls-1" cx="25.5" cy="25.469" r="25"/></svg>';e(r).appendTo("body")},eraser:function(){I.isEraser=!0,e("body").css("cursor","url("+I.eraseCursorIcon+"), auto"),e("#hvHighLightDiv").addClass("hv-add-eraser"),e("#hvCanvas").addClass("hv-add-canvas-eraser"),e("#hvCanvas").css("height",n+"px");var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);e("#hvHighLightDiv").css("height",n+"px"),e("#hvOverlayDiv").hide();var r='<svg class="hv-pen-cusor-area" xmlns="http://www.w3.org/2000/svg" width="'+I.highlightCursorWidth+'" height="'+I.highlightCursorHeight+'" viewBox="0 0 51 50.969"><metadata><?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about=""/></rdf:RDF></x:xmpmeta><?xpacket end="w"?></metadata><defs><style>.cls-1 {fill: none;stroke: #313131;stroke-linecap: round;stroke-linejoin: round;stroke-width: 1px;stroke-dasharray: 5 4;}</style></defs><circle class="cls-1" cx="25.5" cy="25.469" r="25"/></svg>';e(r).appendTo("body")},mouseMove:function(t){var i=t.pageX,o=t.pageY,a=i/n,s=o/r;Xpos=Math.floor(100*a),Ypos=Math.floor(100*s);var l=i+"px",u=o+"px";e("#hvOverlayCircle").css({transform:"translate("+l+","+u+") translateZ(0px)"})},closeHighlights:function(t){I.tooltipHide(),I.highlightsOpen=!1,t&&I.highlightsEvents("hvCloseHighlight"),e(".hv-tooltip-panel").hide(),e(".hv-highlight-feature-panel").animate({width:"0"},200,(function(){e(".hv-collapsed").removeClass("disp-none")})),e(".hv-highlight-options-div").addClass("hv-close-highlight-feature-panel")},openHighlights:function(t){I.highlightsOpen=!0,t&&I.highlightsEvents("hvOpenHighlight"),e(".hv-highlight-feature-panel").animate({width:"333px"},200),e(".hv-highlight-options-div").removeClass("hv-close-highlight-feature-panel"),e(".hv-highlight-options-div").show().delay(1e3),e(".hv-collapsed").addClass("disp-none")},findxy:function(t,i){"down"==t&&(I.prevX=I.currX,I.prevY=I.currY,I.currX=i.offsetX-I.canvas.offsetLeft,I.currY=i.offsetY-I.canvas.offsetTop,I.currY+=15,I.currX+=5,I.flag=!0,I.dot_flag=!0,I.dot_flag&&(I.ctx.beginPath(),I.ctx.fillStyle=I.penColor,I.ctx.fillRect(I.currX,I.currY,2,2),I.ctx.closePath(),I.dot_flag=!1)),"up"!=t&&"out"!=t||(I.flag=!1),"move"==t&&(e(".hv-pen-cusor-area").css({left:i.offsetX-I.canvas.offsetLeft-e(".hv-pen-cusor-area").width()/2+2,top:i.offsetY-I.canvas.offsetTop-e(".hv-pen-cusor-area").height()/2+17}),I.flag&&(I.prevX=I.currX,I.prevY=I.currY,I.currX=i.offsetX-I.canvas.offsetLeft+5,I.currY=i.offsetY-I.canvas.offsetTop+17,I.draw()))},windowResize:function(){var t=document.body,i=document.documentElement,n=Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight);I.canvas.height=n,e("#hvHighLightDiv").css("height",n+"px")},highlightsEvents:function(e){},setCursor:function(t){if(t){if(0==I.isEraser){e("body").addClass("hv-"+t+"-cursor");var i='<svg xmlns="http://www.w3.org/2000/svg" width="20" viewBox="0 0 24.11 23.93"><defs><style>.cls-1,.cls-2{fill:#fff;stroke:#000;stroke-miterlimit:10;}.cls-2{fill-rule:evenodd;}</style></defs><title>highlight with color</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M22.58,1.35a2.91,2.91,0,0,1,0,4.11L21.21,6.82,17.11,2.72l1.37-1.37a2.91,2.91,0,0,1,4.11,0Z"/><polygon class="cls-1" points="2.05 17.77 0.69 23.25 6.16 21.88 19.85 8.19 15.74 4.09 2.05 17.77"/><path class="cls-2" style="fill:'+t+'" d="M20.11,15.94a3.5,3.5,0,1,1-3.5,3.5,3.5,3.5,0,0,1,3.5-3.5Z"/></g></g></svg>',n='url("data:image/svg+xml,'+(i=encodeURIComponent(i.replace(/"/g,"'")))+'"), auto';e("body").css("cursor",n)}}else e("body").css({cursor:"default"})},onkeyupEvent:function(e){18==e.which&&(I.isAlt=!1)},onkeydownEvent:function(t){18==t.which&&(I.isAlt=!0),I.isPen&&[37,38,39,40].indexOf(t.keyCode)>-1&&t.preventDefault(),83==t.which&&1==I.isAlt&&I.stopRecording(),67==t.which&&1==I.isAlt&&(t.preventDefault(),I.closeHighlights(!0)),79==t.which&&1==I.isAlt&&(t.preventDefault(),I.openHighlights(!0)),90==t.which&&1==I.isAlt&&(I.selectHiglightOptions("hvClearScreen",!0),clearScreen()),69==t.which&&1==I.isAlt&&(t.preventDefault(),I.selectHiglightOptions("hvEraser",!0),I.isEraser=!0),72==t.which&&1==I.isAlt&&(I.selectHiglightOptions("hvPen",!0),I.isEraser=!1,I.pen()),70==t.which&&1==I.isAlt&&(t.preventDefault(),I.selectHiglightOptions("hvFocusArea",!0),I.focusArea()),(77==t.which&&1==I.isAlt||27==t.which)&&(I.selectHiglightOptions("hvCursor",!0),I.cursor()),65==t.which&&1==I.isAlt&&I.selectHiglightOptions("hvCursorAnimation",!0),38==t.which&&I.cursorWidth<=200&&(I.cursorWidth+=1,I.highlightCursorWidth+=1,I.highlightCursorHeight+=1,e(".hv-pen-cusor-area").css({width:I.highlightCursorWidth,height:I.highlightCursorHeight})),38==t.which&&I.isAlt,40==t.which&&I.cursorWidth>=5&&(I.cursorWidth-=1,I.highlightCursorWidth-=1,I.highlightCursorHeight-=1,e(".hv-pen-cusor-area").css({width:I.highlightCursorWidth,height:I.highlightCursorHeight})),37==t.which&&0!==I.selectedColor&&(I.selectedColor=I.selectedColor-1,I.penColor=I.highlightsColors[I.selectedColor],I.setCursor(I.penColor)),39==t.which&&5!==I.selectedColor&&(I.selectedColor=I.selectedColor+1,I.penColor=I.highlightsColors[I.selectedColor],I.setCursor(I.penColor))}},!(e(".hv-highlight-feature-panel").length>0)){var l="Press "+("Mac"===s?"Option":"Alt")+" + O for Open",u="Press "+("Mac"===s?"Option":"Alt")+" + H for Highlight",c='<div class="hv-action-component hv-highlight-feature-panel hv-act-comp-bottom-right"> <div class="hv-highlight-options-div"> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvStop"> <img src="'+I.stopIcon+'" id="hvStopImg"/> <img src="'+I.stopIcon+'" id="hvStopImgActive"/> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvCursorAnimation"> <img src="'+I.mouseAnimationIcon+'" id="hvCursorAnimationImg" class=" hv-custom-mouse-pen-cursor" /> <img src="'+I.mouseAnimationIconActive+'" id="hvCursorAnimationImgActive" class=" hv-custom-mouse-pen-cursor" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvPen"> <img src="'+I.penIcon+'" id="hvPenImg" /> <img src="'+I.penIconActive+'" id="hvPenImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvFocusArea"> <img src="'+I.focusIcon+'" id="hvFocusImg" /> <img src="'+I.focusIconActive+'" id="hvFocusImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvEraser"> <img src="'+I.eraseIcon+'" class=" hv-custom-mouse-erase-cursor" id="hvEraseImg" /> <img src="'+I.eraseIconActive+'" class=" hv-custom-mouse-erase-cursor" id="hvEraseImgActive" /> </span> <span class="hv-highlight-option hv-icon-out-space hv-icon-unslected" id="hvClearScreen"> <img src="'+I.clearIcon+'" id="hvClearImg" /> <img src="'+I.clearIconActive+'" id="hvClearImgActive" /> </span> <span class="hv-togarrow-spacer hv-close-highlights" id="hvCloseHighlight"><img src="'+I.togarrow+'" class=" hv-togarrow" id="hvTogarrow" /></span> <div class="hv-choose-color-panel"> <div id="#000000" class="hv-change-color-circle hv-black-color"></div> <div id="#ff0000" class="hv-change-color-circle hv-red-color"></div> <div id="#8170cd" class="hv-change-color-circle hv-violet-color"></div> <div id="#ff9a44" class="hv-change-color-circle hv-orange-color"></div> <div id="#7ddc68" class="hv-change-color-circle hv-green-color"></div> <div id="#1edde1" class="hv-change-color-circle hv-blue-color"></div> </div> </div> <div class="hv-collapsed disp-none hv-open-highlights hv-collapsed-move" id="hvOpenHighlight" title="'+l+'"><img src="'+I.collapsIcon+'" class="hv-collapsed-icon" /></div> <div class="hv-tooltip-panel">'+u+"</div> </div>";e(c).appendTo("body"),e(".hv-highlight-option").bind("click",I.highlightOptions),e(".hv-change-color-circle").bind("click",I.color),e(".hv-close-highlights").bind("click",I.closeHighlights),e(".hv-open-highlights").bind("click",I.openHighlights),e(".hv-highlight-option").on("mouseenter",I.tooltipShow),e(".hv-icon-out-disable").on("mouseenter",I.tooltipShow),e(".hv-tooltip-panel").on("mouseenter",I.checkColorPanelVisible),e(".hv-close-highlights").on("mouseover",I.tooltipShow),window.addEventListener("keyup",I.onkeyupEvent),window.addEventListener("keydown",I.onkeydownEvent),window.addEventListener("resize",I.windowResize),I.canvas=document.getElementById("hvCanvas"),I.ctx=I.canvas.getContext("2d"),I.canvas.width=window.innerWidth,I.canvas.height=window.innerHeight,n=I.canvas.width,r=I.canvas.height;var d=document.body,h=document.documentElement,p=Math.max(d.scrollHeight,d.offsetHeight,h.clientHeight,h.scrollHeight,h.offsetHeight);I.canvas.height=p,e("#hvHighLightDiv").css("height",p+"px"),I.selectHiglightOptions("hvCursor"),e("#hvHighLightDiv").css({"pointer-events":"none"}),e("#hvOverlayDiv").hide(),I.canvas.addEventListener("mousemove",(function(e){I.findxy("move",e)}),!1),I.canvas.addEventListener("mousedown",(function(e){I.findxy("down",e)}),!1),I.canvas.addEventListener("mouseup",(function(e){I.findxy("up",e)}),!1),I.canvas.addEventListener("mouseout",(function(e){I.findxy("out",e)}),!1)}}(t,i)}(n,r))}var n,r,o,a,s;"_show_webcam_preview"===t.type&&(console.log("D ",t),J((t.detail||{}).stream));if("_remove_webcam_preview"===t.type&&X(),"_show_upload_progress"===t.type){var l=t.detail||{};console.log(">>>> D",t),o={recorder:l.recorder,theme:l.theme},a=o.recorder,s=o.theme,Object(A.a)(a,s)}"record_stopped"===t.type&&(this.popupElement&&(this.popupElement.style.display="flex"),this.recordingInProgress=!1,X(),Q()),"record_cancelled"===t.type&&(this.recordingInProgress=!1,X(),Q()),"video_submitted"!==t.type&&"hide_frame"!==t.type||this.popupElement&&(this.popupElement.style.display="none"),"show_frame"===t.type&&this.popupElement&&(this.popupElement.style.display="flex")}}]),t}(),z={create:function(e,t){return m()(this,void 0),new j(e,t)}.bind(void 0)},H={create:function(e,t){return m()(this,void 0),new q(e,t)}.bind(void 0)},j=function(e){r()(i,e);var t=P(i);function i(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:config,o=r.settings,a=r.recorder_events;return c()(this,i),console.log("add recorder ",e),n=t.call(this,e,{type:k.a.RECORDER,settings:o,recorder_events:a}),console.log("add recorder "),n}return h()(i,[{key:"startRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.recordingInProgress?$(this.eventCallbacks,"recording_error",{error:"recording_in_progress",message:"A recording is already in progress"}):(e=W(e),G(this.settings,e)?(this.popupElement&&(this.popupElement.style.display="flex"),Z(this.eventListenerClass,"start_recording",{recording_configuration:e,extension_available:D})):$(this.eventCallbacks,"record_error",{error:"INVALID_RECORD_OPTIONS",message:"The recording options given are invalid"}))}}]),i}(V),q=function(e){r()(i,e);var t=P(i);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:config,r=n.settings,o=n.recorder_events;return c()(this,i),t.call(this,e,{type:k.a.IMPORTER,settings:r,recorder_events:o})}return h()(i,[{key:"import",value:function(e){this.importMedia(null,e)}},{key:"importMedia",value:function(e,t){Z(this.eventListenerClass,"import_video",{file:e,uniqueId:t})}}]),i}(V);function G(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.screenRecord,n=t.audio,r=t.webCam,o=e.record_config||{},a=o.screen,s=o.webcam,l=o.mic;return!(!(i||n||r||a||s)&&l)}function W(e){var t=Object.assign({},e);for(var i in e)N[i]&&(delete t[i],t[N[i]]=e[i]);return t}function $(e,t,i){var n=this,r={type:t,data:i};e.forEach(function(e){m()(this,n),e(r)}.bind(this))}function Y(t){e("#recording-configuration").remove(),e('<input type=hidden id="recording-configuration" value="" />').appendTo("head");e("#actiontoextension").remove(),e('<input type=hidden id="actiontoextension" value="" />').appendTo("head");var i='<input type=hidden id="hippowiz-ew-digest" value="'.concat(t,'" />');e("#hippowiz-ew-digest").remove(),e(i).appendTo("head")}function K(e){var t=this;try{Object(S.j)(e).then(function(){m()(this,t),D=!0}.bind(this)).catch(function(){m()(this,t),console.log("CONNECTION ERROR!! CAN BE MORE SPECIFIC!! CHECK!!!"),D=!1}.bind(this))}catch(e){D=!1}}function J(e){Object(x.a)(e)}function X(){!function(e){var t=document.getElementsByClassName(e);for(;t.length>0;)t[0].parentNode.removeChild(t[0])}("hv-rapi-webcam-preview")}function Q(){!function(){I&&I.resetValues();e("#hvOverlayDiv, #hvHighLightDiv, #hvCanvas, .hv-highlight-feature-panel").remove(),e("body").css({cursor:"default"})}()}function Z(e,t,i){var n;try{n=new CustomEvent(t,{detail:i})}catch(e){(n=document.createEvent("Event")).detail=i,n.initEvent(t,!1,!1)}console.log("SENDING EVENT FROM LIBRARY ",n,document.getElementsByClassName(e)[0]),document.getElementsByClassName(e)[0].dispatchEvent(n)}}.call(this,i(2))},,function(e,t,i){var n=i(8),r=i(31),o=i(27),a=i(29),s=n.TypeError;e.exports=function(e,t){var i,n;if("string"===t&&o(i=e.toString)&&!a(n=r(i,e)))return n;if(o(i=e.valueOf)&&!a(n=r(i,e)))return n;if("string"!==t&&o(i=e.toString)&&!a(n=r(i,e)))return n;throw s("Can't convert object to primitive value")}},function(e,t,i){"use strict";var n=i(8),r=i(12),o=i(76),a=i(29),s=i(32),l=i(104),u=i(118),c=n.Function,d=r([].concat),h=r([].join),p={},f=function(e,t,i){if(!s(p,t)){for(var n=[],r=0;r<t;r++)n[r]="a["+r+"]";p[t]=c("C,a","return new C("+h(n,",")+")")}return p[t](e,i)};e.exports=u?c.bind:function(e){var t=o(this),i=t.prototype,n=l(arguments,1),r=function(){var i=d(n,l(arguments));return this instanceof r?f(t,i.length,i):t.apply(e,i)};return a(i)&&(r.prototype=i),r}},function(e,t){function i(t,n){return e.exports=i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t,n)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=function(e){"use strict";var t=Object.prototype,i=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,i){return e[t]=i}}function l(e,t,i,n){var r=t&&t.prototype instanceof d?t:d,o=Object.create(r.prototype),a=new S(n||[]);return o._invoke=function(e,t,i){var n="suspendedStart";return function(r,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw o;return C()}for(i.method=r,i.arg=o;;){var a=i.delegate;if(a){var s=w(a,i);if(s){if(s===c)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=u(e,t,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}(e,i,a),o}function u(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function d(){}function h(){}function p(){}var f={};s(f,r,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==t&&i.call(m,r)&&(f=m);var v=p.prototype=d.prototype=Object.create(f);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(r,o){function a(){return new t((function(n,a){!function n(r,o,a,s){var l=u(e[r],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&i.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}(r,o,n,a)}))}return n=n?n.then(a,a):a()}}function w(e,t){var i=e.iterator[t.method];if(void 0===i){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=u(i,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,c;var r=n.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=p,s(v,"constructor",p),s(p,"constructor",h),h.displayName=s(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(b.prototype),s(b.prototype,o,(function(){return this})),e.AsyncIterator=b,e.async=function(t,i,n,r,o){void 0===o&&(o=Promise);var a=new b(l(t,i,n,r),o);return e.isGeneratorFunction(i)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(v),s(v,a,"Generator"),s(v,r,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var i in e)t.push(i);return t.reverse(),function i(){for(;t.length;){var n=t.pop();if(n in e)return i.value=n,i.done=!1,i}return i.done=!0,i}},e.values=T,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(i,n){return a.type="throw",a.arg=e,t.next=i,n&&(t.method="next",t.arg=void 0),!!n}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),_(i),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;_(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:T(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(e,t,i){var n=i(12),r=i(43),o=Math.floor,a=n("".charAt),s=n("".replace),l=n("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,i,n,d,h){var p=i+e.length,f=n.length,g=c;return void 0!==d&&(d=r(d),g=u),s(h,g,(function(r,s){var u;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,i);case"'":return l(t,p);case"<":u=d[l(s,1,-1)];break;default:var c=+s;if(0===c)return r;if(c>f){var h=o(c/10);return 0===h?r:h<=f?void 0===n[h-1]?a(s,1):n[h-1]+a(s,1):r}u=n[c-1]}return void 0===u?"":u}))}},function(e,t,i){"use strict";var n=i(214),r=i(92);e.exports=n?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,i){"use strict";var n=i(46).forEach,r=i(161)("forEach");e.exports=r?[].forEach:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}},function(e,t,i){var n=i(8),r=i(160),o=i(154),a=i(29),s=i(22)("species"),l=n.Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(o(t)&&(t===l||r(t.prototype))||a(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?l:t}},function(e,t,i){"use strict";
|
|
249
249
|
/** @license React v16.14.0
|
|
250
250
|
* react.production.min.js
|
|
251
251
|
*
|
|
@@ -285,7 +285,7 @@ var n;n=function(){return function(){var e={686:function(e,t,i){"use strict";i.d
|
|
|
285
285
|
*
|
|
286
286
|
* This source code is licensed under the MIT license found in the
|
|
287
287
|
* LICENSE file in the root directory of this source tree.
|
|
288
|
-
*/var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,d=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,g=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,E=n?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case d:case h:case a:case l:case s:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case v:case m:case u:return e;default:return t}}case o:return t}}}function S(e){return _(e)===h}t.AsyncMode=d,t.ConcurrentMode=h,t.ContextConsumer=c,t.ContextProvider=u,t.Element=r,t.ForwardRef=p,t.Fragment=a,t.Lazy=v,t.Memo=m,t.Portal=o,t.Profiler=l,t.StrictMode=s,t.Suspense=f,t.isAsyncMode=function(e){return S(e)||_(e)===d},t.isConcurrentMode=S,t.isContextConsumer=function(e){return _(e)===c},t.isContextProvider=function(e){return _(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return _(e)===p},t.isFragment=function(e){return _(e)===a},t.isLazy=function(e){return _(e)===v},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===o},t.isProfiler=function(e){return _(e)===l},t.isStrictMode=function(e){return _(e)===s},t.isSuspense=function(e){return _(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===h||e===l||e===s||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===u||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===w||e.$$typeof===E||e.$$typeof===y)},t.typeOf=_},function(e,t,i){var n=i(616);e.exports=function(e){return null==e?"":n(e)}},function(e,t,i){var n=i(178),r=i(617),o=i(181),a=i(618),s=n?n.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return r(t,e)+"";if(a(t))return l?l.call(t):"";var i=t+"";return"0"==i&&1/t==-1/0?"-0":i}},function(e,t){e.exports=function(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r}},function(e,t,i){var n=i(141),r=i(142);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==n(e)}},function(e,t,i){var n=i(341);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(341);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(12),r=i(55),o=i(39),a=/"/g,s=n("".replace);e.exports=function(e,t,i,n){var l=o(r(e)),u="<"+t;return""!==i&&(u+=" "+i+'="'+s(o(n),a,""")+'"'),u+">"+l+"</"+t+">"}},function(e,t,i){var n=i(15);e.exports=function(e){return n((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,i){var n,r;n=[i(2),i(10),i(35),i(7),i(11),i(6),i(48),i(626),i(627),i(140),i(342),i(343),i(344),i(346),i(20),i(243),i(138),i(139),i(73),i(115)],void 0===(r=function(e,t,i,n,r,o,a,s,l,u,c,d,h,p,f){return r=r.default,f=f.default,i.View.extend({template:s,initialize:function(t){(t.fromSDK||!1)&&(this.template=l),this.id=t.id,this.src=t.src,this.type=null!=t.type?t.type:"url",this.title=t.title,this.initial=t.initial||!1,this.isPrivacy=t.isPrivacy||!1,this.statId=t.statId,this.audioSrc=t.audioSrc,this.isDelivery=null!=t.isDelivery&&t.isDelivery,this.analytics=null!=t.analytics&&t.analytics,this.userId=t.userId,this.primaryVideoLayout=t.primaryVideoLayout,this.secondaryVideoLayout=t.secondaryVideoLayout,this.showLogo=null==t.showLogo||t.showLogo,this.trimStart=t.trimStart?t.trimStart:0,this.trimEnd=t.trimEnd?t.trimEnd:0,this.duration=t.duration?t.duration:0,this.assetId=t.assetId,this.customlogo=t.customlogo,this.thumbnail=t.thumbnail,this.quickPreview=t.quickPreview,this.previewVideo=t.previewVideo,this.isMirrorWebCam=null==t.isMirrorWebCam||t.isMirrorWebCam,this.playAudio=null==t.playAudio||t.playAudio,this.playVideo=null==t.playVideo||t.playVideo,this.qualityControl=null!=t.qualityControl&&t.qualityControl,this.fullscreen=null!=t.fullscreen&&t.fullscreen,this.audioControl=null!=t.audioControl?t.audioControl:this.playAudio,this.fullscreenControl=null==t.fullscreenControl||t.fullscreenControl,this.simpleEditMode=null!=t.simpleEditMode&&t.simpleEditMode,this.showSpeedSettings=null!=t.showSpeedSettings&&t.showSpeedSettings,this.authorState=t.authorState,this.isError=t.isError,this.previousVolume=100,this.onPlayHandler=t.onPlayHandler?[t.onPlayHandler]:[],this.onPauseHandler=t.onPauseHandler?[t.onPauseHandler]:[],this.onSeekedHandler=t.onSeekedHandler,this.onSeekedHandlers=t.onSeekedHandlers?[t.onSeekedHandlers]:[],this.onSeekindHandler=t.onSeekindHandler,this.onLoadHandler=t.onLoadHandler,this.onProgressHandler=t.onProgressHandler,this.onDataLoadHandler=t.onDataLoadHandler,this.updateHandler=t.updateHandler,this.canplayHandler=t.canplayHandler,this.onComputedDurationHander=t.onComputedDurationHander,this.onEndHandler=t.onEndHandler?[t.onEndHandler]:[],this.privacySetting=null!=t.privacy&&t.privacy,this.isAudioOnly=null!=t.isAudioOnly&&t.isAudioOnly,this.isLessonly="lessonly"==t.integType,this.token=null!=t.token&&t.token,this.downloadVideo=t.downloadVideo,this.allowDownload=null!=t.allowDownload&&t.allowDownload,this.showComments=t.showComments,this.showReactions=t.showReactions,this.commentsCallbackHandler=t.commentsCallbackHandler||function(){},this.reactionsCallbackHandler=t.reactionsCallbackHandler||function(){},this.playerLogo=t.playerLogo,this.canPlayerLogoView=t.canPlayerLogoView,this.addLinkToPlayerLogo=t.addLinkToPlayerLogo,this.playerLogoLink=t.playerLogoLink,this.isImageMode=t.isImageMode||!1,this.loop=t.loop||!1,this.showSetFrame=t.showSetFrame&&!t.isImageMode||!1,this.playerTheme=null!=t.playerTheme&&t.playerTheme,this.subtitlesEnabled=t.subtitlesEnabled||!1,this.subtitles=t.subtitleUrl,this.showHoverActions=void 0===t.showHoverActions||t.showHoverActions,this.customColors=t.customColors,this.allowKeyboardShortcuts=t.allowKeyboardShortcuts||!1,this.saveThisFrameAsThumbnail=function(){},this.isMobilePlayer=r.isMobileBrowser(),this.isIphone=null!=navigator.userAgent.match(/iPhone|iPad|iPod/i),this.autoPlayVideo=!!t.autoPlayVideo&&!this.isImageMode;var i=n.getBrowserName().toLowerCase();this.isMutedAutoPlay=this.autoPlayVideo&&("chrome"===i||"safari"===i||"firefox"===i),this.canShowPlayerLoading="ie"!==i,this.showPersonalisedVideoLoading=t.showPersonalisedVideoLoading||!1,this.personalisedVideoDetailsSet=!1,this.isLandingPageVideo=t.isLandingPageVideo||!1,this.domainName=t.domain||!1,this.subtitlesFromServer=!1,this.isContainsAudio=null==t.isContainsAudio||t.isContainsAudio,this.addSourceAudioType="safari"===i&&this.isAudioOnly,t.forceAutoPlay&&(this.isMutedAutoPlay=!1),i=["Firefox","IE"],e.inArray(n.getBrowserName(),i)>=0&&(this.subtitlesFromServer=!0),this.customPlayIcon=t.customPlayIcon,this.playerState="initial",this.durationComputed=!1,this.allowPlay=!0,this.isCTAWaitingMode=!1,this._primaryVideoPlaying=!1,this._secondaryVideoPlaying=!1,this.progressSlided=this.progressSlided.bind(this),this.volumeChanged=this.volumeChanged.bind(this),this._handleTimeupdate=this._handleTimeupdate.bind(this),this._handlePlay=this._handlePlay.bind(this),this._handlePause=this._handlePause.bind(this),this._handleProgress=this._handleProgress.bind(this),this._handlePlayerClick=this._handlePlayerClick.bind(this),this._handlePlayPauseBtnClick=this._handlePlayPauseBtnClick.bind(this),this._handleForwardBtnClick=this._handleForwardBtnClick.bind(this),this._handleRewindBtnClick=this._handleRewindBtnClick.bind(this),this._handleAudioBtnClick=this._handleAudioBtnClick.bind(this),this._handleFullscreenBtnClick=this._handleFullscreenBtnClick.bind(this),this._handleWaiting=this._handleWaiting.bind(this),this._handleResume=this._handleResume.bind(this),this._handleCanplay=this._handleCanplay.bind(this),this._handleHover=this._handleHover.bind(this),this._handleEnded=this._handleEnded.bind(this),this._handleSeeked=this._handleSeeked.bind(this),this._handleSeeking=this._handleSeeking.bind(this),this._handleMetadataLoad=this._handleMetadataLoad.bind(this),this._handleDataLoad=this._handleDataLoad.bind(this),this._handleProgressBtnHover=this._handleProgressBtnHover.bind(this),this._handleProgressBtnLeave=this._handleProgressBtnLeave.bind(this),this._handleFullscreenChange=this._handleFullscreenChange.bind(this),this.resetPlayer=this.resetPlayer.bind(this),this.downloadVideoClick=this.downloadVideoClick.bind(this),this._handleCanvasMouseAction=this._handleCanvasMouseAction.bind(this),this.drawImageForPreview=this.drawImageForPreview.bind(this),this.seekAndChooseThumb=this.seekAndChooseThumb.bind(this),this.seekAndUpdateThumb=this.seekAndUpdateThumb.bind(this),this.setStatId=this.setStatId.bind(this),this.getStatId=this.getStatId.bind(this),this.toggleSubtitles=this.toggleSubtitles.bind(this),this._handleMutedAutoplayAudioClick=this._handleMutedAutoplayAudioClick.bind(this),this.segmented=t.segmented,this.auth_params=t.auth_params,this.cueChanged=this.cueChanged.bind(this)},render:function(){if(this.$el.html(this.template(t.extend(c,{id:this.id,type:this.type,title:this.title,isAudioOnly:this.isAudioOnly,addSourceAudioType:this.addSourceAudioType,isLessonly:this.isLessonly,initial:this.initial,isPrivacy:this.isPrivacy,audioControl:this.audioControl,qualityControl:this.qualityControl,fullscreenControl:this.fullscreenControl,showLogo:this.showLogo,customlogo:this.customlogo,thumbnail:this.thumbnail,quickPreview:this.quickPreview,previewVideo:this.previewVideo,privacy:this.privacySetting,downloadVideo:this.downloadVideo,allowDownload:this.allowDownload,showComments:this.showComments,showSetFrame:this.showSetFrame,showReactions:this.showReactions,isImageMode:this.isImageMode,playerLogo:this.playerLogo,isMutedAutoPlay:this.isMutedAutoPlay,canPlayerLogoView:this.canPlayerLogoView,addLinkToPlayerLogo:this.addLinkToPlayerLogo,playerLogoLink:this.playerLogoLink,playerTheme:this.playerTheme,subtitlesEnabled:this.subtitlesEnabled,subtitles:this.subtitles,showHoverActions:this.showHoverActions,showSpeedSettings:this.showSpeedSettings,isLandingPageVideo:this.isLandingPageVideo,token:this.token,domain:window.location.protocol+"//"+window.location.hostname,subtitlesFromServer:this.subtitlesFromServer,isContainsAudio:this.isContainsAudio}))),this.renderState=!0,this.setElement(this.$el.find("#"+this.id)),this.initial)return this.$el.height(9*this.$el.width()/16),void this.applyCustomColors();this.initializePlayer(),this._delegateViewEvents(),this.setMediaSource(),this.initializePlayerJS(),-1!=["m3u8","mpd"].indexOf(this.type)&&this.initializeAdapter(),this.initializeCSS(),this.applyCustomColors(),this.applyCustomPlayIcon(),n.toggleWebcamForMirrorVideo(this.isMirrorWebCam,null!=this.audioSrc&&""!=this.audioSrc?this.$el.find(".secondary-video"):this.$el.find("#primary-video"))},update:function(t){var i=this;t.showPersonalisedVideoLoading&&this.$el.find("#personalisedVideoLoading").show(),Object.keys(t).forEach((function(e){null!=t[e]&&(i[e]=t[e])})),this.setMediaSource(),-1!=["m3u8","mpd"].indexOf(this.type)&&this.initializeAdapter(),e("#videoQualityBtn")[this.qualityControl?"show":"hide"]()},setMediaSource:function(){this.$el.find("#gifImage").attr("src",this.src),this.$el.find("#primary-video source").attr("src",this.src),this.$el.find(".hidden-video source").attr("src",this.src),this.$el.find(".secondary-video source").attr("src",this.audioSrc),this.$el.find("#primary-video").length>0&&this.src&&-1==this.src.indexOf("fetch_video_stream")&&this.$el.find("#primary-video")[0].load(),this.$el.find(".secondary-video").length>0&&this.$el.find(".secondary-video")[0].load()},initializePlayer:function(){var t=this;this.mediaPlayer=this.$el.find(".primary-video")[0],this.customAudioPlayer=this.$el.find(".secondary-video")[0],this.mediaPlayer.controls=!1,isFinite(this.duration)&&this.duration>0&&!this.mediaPlayer.duration&&(this.mediaPlayer.duration=this.duration),e(this.$el.find(".player-progress")).slider({orientation:"horizontal",range:"min",max:100,value:0,slide:this.progressSlided}),e(this.$el.find(".player-audio-slider")).slider({range:"min",orientation:"vertical",min:0,max:100,value:100,stop:this.volumeChanged}),this.quickPreview&&!this.isAudioOnly&&(this.quickPreviewImg=document.createElement("img"),this.quickPreviewImg.setAttribute("src",this.quickPreview),this.quickPreviewCanvas=this.$el.find(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d")),this.showSetFrame?e(".thumbnail-wrap").show():e(".thumbnail-wrap").hide(),this.setSimpleEditMode(this.simpleEditMode),this.allowKeyboardShortcuts&&e(window).on("keydown",(function(e){if("TEXTAREA"!==e.target.nodeName&&"INPUT"!==e.target.nodeName&&"button"!==e.target.type){var i=e.key,n=e.keyCode;" "===i||"Spacebar"===i||32===n?t._handlePlayPauseBtnClick():"ArrowRight"===i||"Right"===i||39===n?t._handleForwardBtnClick():"ArrowLeft"===i||"Left"===i||37===n?t._handleRewindBtnClick():"f"!==i&&70!==n||t._handleFullscreenBtnClick()}})),this.$el.find(".video-speed-btn .player-speed-label").on("click",(function(){t.$el.find(".video-speed-btn .quality-container").slideToggle("fast"),t.$el.find("#videoQualityBtn .quality-container").slideUp("fast")})),this.$el.find(".video-speed-btn .quality-list li").on("click",(function(i){var n=e(i.currentTarget).attr("data-id");t.$el.find(".video-speed-btn .player-speed-label").click(),t.$el.find("#primary-video")[0].playbackRate=parseFloat(n),t.$el.find(".quality-list li").removeClass("active"),e(this).addClass("active"),t.$el.find(".video-speed-btn .player-speed-label").html(e(i.currentTarget).html())})),this.$el.find("#subtitlesTrack").css("bottom","55px"),this.initializePlayerTheme(".video-speed-btn .quality-list li")},initializePlayerTheme:function(t){try{if(this.playerTheme&&[4,7].includes(this.playerTheme.length)){var i=n.convertHexToRGB(this.playerTheme),r="rgba("+i.r+", "+i.g+", "+i.b+", 0.9)";this.$el.find(t).hover((function(){e(this).css({background:r})}),(function(){e(this).css({background:""})}))}}catch(e){}},sendToFront:function(){},initializePlayerJS:function(){var e=this;this.playerJSReceiver=new d.Receiver,this.playerJSReceiver.on("play",(function(){e.play()})),this.playerJSReceiver.on("pause",(function(){e.pause()})),this.playerJSReceiver.on("getPaused",(function(t){t(!e.playing)})),this.playerJSReceiver.on("mute",(function(){e.mute()})),this.playerJSReceiver.on("unmute",(function(){e.unmute()})),this.playerJSReceiver.on("getMuted",(function(t){t(0==e.getVolume())})),this.playerJSReceiver.on("setVolume",(function(t){e.setVolume(t)})),this.playerJSReceiver.on("getVolume",(function(t){t(e.getVolume())})),this.playerJSReceiver.on("getDuration",(function(t){t(e.mediaPlayer.duration)})),this.playerJSReceiver.on("setCurrentTime",(function(t){e.mediaPlayer.currentTime=t})),this.playerJSReceiver.on("getCurrentTime",(function(t){t(e.mediaPlayer.currentTime)})),this.playerJSReceiver.on("setLoop",(function(t){e.setLoop(t)})),this.playerJSReceiver.on("getLoop",(function(t){t(e.getLoop())})),this.playerJSReceiver.ready()},initializeDashPlayerJs:function(){this.adapter=dashjs.MediaPlayer().create(),this.adapter.getDebug().setLogToBrowserConsole(!1),this.adapter.setSegmentOverlapToleranceTime(2),this.adapter.setABRStrategy("abrBola"),this.adapter.addABRCustomRule("qualitySwitchRules","DownloadRatioRule",h.default);var e={type:"PERIODIC",authorizationUrl:HippoVideo.URL.PATH[HippoVideo.URI.Feature.VIDEO_PLAYER.CLOUD_FRONT_AUTHORIZER]+this.token,expiry:HippoVideo.Constants.Video.Expiry,authSettings:this.auth_params,manifestOnly:!this.segmented};this.adapter.initializeWithAuthorization(this.mediaPlayer,this.src,!1,e),this.currentStreamQuality=-1,this.adapterLoaded=!1,window.navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./)||this.adapter.setFastSwitchEnabled(!0)},initializeHLSPlayerJs:function(){var e=this;this.adapter=new p({enableWorker:!0},{onMediaAttached:function(){e.adapter.loadSource(e.src)},onManifestParser:function(t){e._handleMetadataLoad(t)}},e.auth_params,!0),this.adapter.attachMedia(this.mediaPlayer)},initializeAdapter:function(){this["mpd"==this.type?"initializeDashPlayerJs":"initializeHLSPlayerJs"]()},initializeCSS:function(){null==this.audioSrc&&this.$el.find(".secondary-video-container").hide(),0==this.showLogo&&this.$el.find(".player-logo").hide();var t=this;e(window).on("resize",(function(i){e(i.target).hasClass("ui-resizable")||t.resizePlayerForWindow()})),this.isError?(this.$el.find(".error-reason").html(this.getFaqOneLiner()+this.getFaqLink()),this.$el.find(".error-overlay").css("background-image","url(/img/tv-noise.gif)").show()):this.$el.find(".error-overlay").hide(),this.resizePlayerForWindow(),this.$el.find("video").css("height","100%"),this.primaryVideoLayout&&(null!=this.primaryVideoLayout.width&&this.$el.find(".primary-video-container").css("width",this.getValueForPlayerInitial(this.primaryVideoLayout.width,!0)+"px"),null!=this.primaryVideoLayout.height&&this.$el.find(".primary-video-container").css("height",this.getValueForPlayerInitial(this.primaryVideoLayout.height,!1)+"px"),null!=this.primaryVideoLayout.x&&this.$el.find(".primary-video-container").css("left",this.getValueForPlayerInitial(this.primaryVideoLayout.x,!0)+"px"),null!=this.primaryVideoLayout.y&&this.$el.find(".primary-video-container").css("top",this.getValueForPlayerInitial(this.primaryVideoLayout.y,!1)+"px")),this.secondaryVideoLayout&&(null!=this.secondaryVideoLayout.width&&this.$el.find(".secondary-video-container").css("width",this.getValueForPlayerInitial(this.secondaryVideoLayout.width,!0)+"px"),null!=this.secondaryVideoLayout.height&&this.$el.find(".secondary-video-container").css("height",this.getValueForPlayerInitial(this.secondaryVideoLayout.height,!1)+"px"),null!=this.secondaryVideoLayout.x&&this.$el.find(".secondary-video-container").css("left",this.getValueForPlayerInitial(this.secondaryVideoLayout.x,!0)+"px"),null!=this.secondaryVideoLayout.y&&this.$el.find(".secondary-video-container").css("top",this.getValueForPlayerInitial(this.secondaryVideoLayout.y,!1)+"px"));var i=e(".primary-video-container").width(),n=e(".primary-video-container").height();e(".access-denied-pop").width(i),e(".access-denied-pop").height(n),e(".password-pop").width(i),e(".password-pop").height(n),this.resizeFitThumnbail(),this.initializePlayerForMobile()},resizeFitThumnbail:function(){var e=this,t=new Image,i=this.isImageMode?"#gifImage":"#playerThumbnail";t.onload=function(t){var n=t.target.naturalWidth,o=t.target.naturalHeight,a=r.resizeImageToFit(n,o,e.$el.width(),e.$el.height()),s=r.getCoordinatesForResizedImage(a.width,a.height,e.$el.width(),e.$el.height());e.$el.find(i).css({width:a.width,height:a.height,top:s.yPos,left:s.xPos})},this.isImageMode?t.src=this.src:this.thumbnail&&(t.src=this.thumbnail)},resizeFitRenderless:function(){var e=this.$el.width(),t=this.$el.height();if(e&&t){var i=0,n=0;e/t>16/9?(e=16*t/9,i=(this.$el.width()-e)/2):(t=9*e/16,n=(this.$el.height()-t)/2),this.$el.find(".renderless-overlay").css({width:e+"px",height:t+"px",left:i+"px",top:n+"px"})}},initializePlayerForMobile:function(){this.isMobilePlayer&&(this.$el.addClass("mobile-player"),this.$el.find(".volume-container, .player-audio-slider, .emoji-wrap").hide(),e(".emoji-wrap-onplay").show())},toggleSubtitles:function(e){this.$el.find("#subtitlesTrack").is(":visible")?(this.$el.find("#subtitlesTrack").hide(),this.$el.find(".player-subtitle-icon").attr("src","/img/subtitle-cc-gray.png")):(this.$el.find(".player-subtitle-icon").attr("src","/img/subtitle-cc.png"),this.$el.find("#subtitlesTrack").show())},volumeChanged:function(t){var i=this.getVolume();this.mediaPlayer.volume=i/100,this.customAudioPlayer&&(this.customAudioPlayer.volume=i/100),0==i?(this.$el.find(".audio-img").attr("src","/svg/mute.svg"),e(".audio-img").addClass("mute"),e(".audio-img").removeClass("low high")):i<=50?(this.$el.find(".audio-img").attr("src","/svg/volume-low.svg"),e(".audio-img").addClass("low"),e(".audio-img").removeClass("mute high")):(this.$el.find(".audio-img").attr("src","/svg/volume-high.svg"),e(".audio-img").addClass("high"),e(".audio-img").removeClass("low mute"))},progressSlided:function(e,t){var i=this.map(t.value,0,100,this.trimStart,this.mediaPlayer.duration-this.trimEnd);this.goToTime(i)},goToTime:function(e){this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=this.mediaPlayer.currentTime,this.$el.find(".replay-btn-container").hide()},show:function(){this.renderState?this.$el.show():(this.undelegateEvents(),this.render())},hide:function(){this.renderState&&this.$el.hide()},destroy:function(){this.undelegateEvents(),this.$el.removeData().unbind(),e(window).unbind("beforeunload",!1),this.remove(),i.View.prototype.remove.call(this)},handleMainPlayPause:function(){},_delegateViewEvents:function(){this.delegate("webkitfullscreenchange mozfullscreenchange fullscreenchange",this._handleFullscreenChange),this.delegate("mouseenter mouseleave mousemove",this._handleHover),this.delegate("contextmenu","video",this._handleMenu),this.delegate("click","video, .play-btn-container, .replay-btn-container, .player-actions-container, .se-crop-scale, .player-touch-guard",this._handlePlayerClick),this.delegate("click",".play-pause-button",this._handlePlayPauseBtnClick),this.delegate("click",".player-volume",this._handleAudioBtnClick),this.delegate("click",".player-fullscreen-icon",this._handleFullscreenBtnClick),this.delegate("click",".player-download-icon",this.downloadVideoClick),this.delegate("click","#addCommentFromCanvas",this.commentsCallbackHandler),this.delegate("click",".react-now",this.reactionsCallbackHandler),this.delegate("click",".player-rewind-action",this._handleRewindBtnClick),this.delegate("click",".player-forward-action",this._handleForwardBtnClick),this.delegate("click",".player-play-pause-action",this._handlePlayPauseBtnClick),this.delegate("click",".muted-autoplay",this._handleMutedAutoplayAudioClick),this.delegate("mouseenter mouseleave","#canvasPreviewContainer",this._handleCanvasMouseAction),e(".set-frame-btn").bind("click",this.seekAndUpdateThumb),e(".player-subtitle-icon").bind("click",this.toggleSubtitles),!this.isMobilePlayer&&this.quickPreview&&(this.delegate("mousemove",".player-progress",this._handleProgressBtnHover),this.delegate("mouseleave",".player-progress",this._handleProgressBtnLeave)),this.mediaPlayer.addEventListener("timeupdate",this._handleTimeupdate,!1),this.mediaPlayer.addEventListener("play",this._handlePlay,!1),this.mediaPlayer.addEventListener("pause",this._handlePause,!1),this.mediaPlayer.addEventListener("progress",this._handleProgress,!1),this.mediaPlayer.addEventListener("waiting",this._handleWaiting,!1),this.mediaPlayer.addEventListener("playing",this._handleResume,!1),this.mediaPlayer.addEventListener("canplay",this._handleCanplay,!1),this.mediaPlayer.addEventListener("seeked",this._handleSeeked,!1),this.mediaPlayer.addEventListener("seeking",this._handleSeeking,!1),this.mediaPlayer.addEventListener("ended",this._handleEnded,!1),this.mediaPlayer.addEventListener("loadedmetadata",this._handleMetadataLoad,!1),this.mediaPlayer.addEventListener("loadeddata",this._handleDataLoad,!1)},_handleMetadataLoad:function(){var t=this;if(this.adapterLoaded||-1==["m3u8","mpd"].indexOf(this.type))"mpd"==this.type&&(this.adapter.setAutoSwitchQualityFor("video",!1),this.adapter.setQualityFor("video",this.currentStreamQuality),this.mediaPlayer.currentTime=this.dashQualitySwitchTime);else{this.adapterLoaded=!0;var i=this.adapter["mpd"==this.type?"getBitrateInfoListFor":"getLevels"]("mpd"==this.type?"video":"");console.log("Available bitrates",i),i.sort((function(e,t){return e.height>t.height?1:t.height>e.height?-1:0}));for(var r,o,a=this.$el.find("#videoQualityBtn .quality-list"),s=[],l=i.length-1;l>=0;l--){switch(o=i[l].height,!0){case o>144&&o<=240:r="240";break;case o>240&&o<=360:r="360";break;case o>360&&o<=480:r="480";break;case o>480&&o<=720:r="720";break;case o>720&&o<=1080:r="1080";break;case o>1080&&o<=2159:r="2K";break;case o>=2160&&o<=4319:r="4K";break;case o>=4320:r="8K"}s[l]=r,a.append('<li data-id="'+l+'"><i></i><a>'+r+"</a></li>")}var u="high"==n.getQueryParams().quality;if(u){var d=i.length-1;this.$el.find("#videoQualityBtn .quality-list li").removeClass("active"),"mpd"==this.type?(this.adapter.setAutoSwitchQualityFor("video",!1),this.adapter.setQualityFor("video",d)):this.adapter.setRepresentation(i.length-1)}s.length>0?(this.$el.find("#videoQualityBtn").show(),u?a.append('<li data-id="-1">'+c.wizPlayer.auto+"</li>"):a.append('<li class="active" data-id="-1">'+c.wizPlayer.auto+"</li>")):this.$el.find("#videoQualityBtn").hide();try{this.$el.find("#videoQualityBtn .player-quality-icon").on("click",(function(){t.$el.find("#videoQualityBtn .quality-container").slideToggle("fast")}))}catch(e){}this.$el.find("#videoQualityBtn .quality-list li").on("click",(function(i){var n=e(i.currentTarget).attr("data-id");t.$el.find("#videoQualityBtn .quality-list li").removeClass("active"),e(this).addClass("active"),"-1"==n?"mpd"==this.type?t.adapter.setAutoSwitchQualityFor("video",!0):t.adapter.setRepresentation(-1):"mpd"==this.type?parseInt(n)>~~t.currentStreamQuality&&(t.dashQualitySwitchTime=t.mediaPlayer.currentTime,t.adapter.reset(),t.adapter.attachSource(t.src),t.adapter.attachView(t.mediaPlayer),t._handleWaiting()):t.adapter.setRepresentation(Number(n)),t.currentStreamQuality=~~n}))}this.subtitlesEnabled&&document.getElementsByTagName("track")[0].addEventListener("cuechange",this.cueChanged);this.autoPlayVideo&&(this.isMutedAutoPlay&&(this.mute(),this.$el.find(".muted-autoplay").removeClass("hide")),t.play())},_handleDataLoad:function(){var e=!this.dataLoaded;this.dataLoaded=!0,e&&this.onDataLoadHandler&&this.onDataLoadHandler()},_handleFullscreenChange:function(t){var i=this;this.isFullScreen()?(e("#"+this.id).addClass("player-fullscreen-mode"),this.$el.find(".preview-add-comment").hide()):(e("#"+this.id).removeClass("player-fullscreen-mode"),this.$el.find(".preview-add-comment").show()),this.resizePlayerForWindow(),setTimeout((function(){i.resizePlayerForWindow()}),1e3)},_handleProgressBtnLeave:function(e){clearTimeout(this.hideQuickPreviewTimeout);var t=this;this.hideQuickPreviewTimeout=setTimeout((function(){t.$el.find("#canvasPreviewContainer").fadeOut(200)}),500)},_handleProgressBtnHover:function(t){var i=this.$el.find("#canvasPreviewContainer"),n=(t.target.className.includes("ui-slider-handle")?e(t.target).position().left:t.offsetX)-i.width()/2;if(i.css("left",n+"px"),!this.showSetFrame||this.quickPreviewImg&&this.quickPreviewContext){i.is(":visible")||i.fadeIn(),this.showSetFrame&&e(".player-controls-container").show();s=t.offsetX/this.$el.find(".player-progress").width();if(this.second=s*this.mediaPlayer.duration,!e(t.target).hasClass("player-progress")&&!e(t.target).hasClass("ui-slider-range")||isNaN(this.mediaPlayer.duration))return;var r=parseInt(this.second/2),o=parseInt(r/10),a=r%10;this.quickPreviewImg&&this.quickPreviewContext&&(this.quickPreviewContext.drawImage(this.quickPreviewImg,128*a,72*o,128,72,0,0,128,72),this.quickPreviewContext.fillStyle="rgba(0,0,0,0.5)",this.quickPreviewContext.fillRect(47,53,37,18),this.quickPreviewContext.font="9px",this.quickPreviewContext.fillStyle="white",this.quickPreviewContext.fillText(this.strToTime(this.second),55,67)),e("#canvasHoverTime").val(this.second),clearTimeout(this.hideQuickPreviewTimeout),this.hideQuickPreviewTimeout=setTimeout((function(){i.fadeOut(200)}),3e3)}else{i.fadeIn(),e(".player-controls-container").show();var s=t.offsetX/this.$el.find(".player-progress").width();this.second=s*this.mediaPlayer.duration,isNaN(this.second)&&(this.second=.2);var l=document.getElementsByClassName("hidden-video")[0];l.currentTime=Number(this.second),this.quickPreviewCanvas=this.$el.find(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d"),this.$el.find("#quick-preview-loading").show(),e(this.quickPreviewCanvas).hide(),l.removeEventListener("canplay",this.drawImageForPreview),l.addEventListener("canplay",this.drawImageForPreview)}},drawImageForPreview:function(){this.quickPreviewContext&&this.quickPreviewContext.drawImage(document.getElementsByClassName("hidden-video")[0],0,0,128,72),this.quickPreviewCanvas&&(e(this.quickPreviewCanvas).show(),this.$el.find("#quick-preview-loading").hide())},seekAndChooseThumb:function(t){e(".player-controls-container, .set-frame-btn").show(),e(".player-progress").bind("mousemove",this._handleProgressBtnHover),this.undelegateHoverActions(),this.showPlayerControls();var i=e("#canvasPreviewContainer");i.is(":visible")||i.fadeIn();var n=document.getElementsByClassName("hidden-video")[0];n&&(n.currentTime=Number(.2),this.quickPreviewCanvas=e(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d"),this.$el.find("#quick-preview-loading").show(),e(this.quickPreviewCanvas).hide(),n.removeEventListener("canplay",this.drawImageForPreview),n.addEventListener("canplay",this.drawImageForPreview))},hideSeekAndUpdateThumb:function(){this.undelegate("mouseenter mouseleave mousemove",this._handleHover),this.$el.find("#canvasPreviewContainer").hide(),e(".player-progress").unbind("mousemove mouseleave")},seekAndUpdateThumb:function(){this.hideSeekAndUpdateThumb(),this.saveThisFrameAsThumbnail(this.second)},setThumbnailFromFrameCallBack:function(e){this.saveThisFrameAsThumbnail=e},setOnDataLoadHandler:function(e){this.onDataLoadHandler=e,this.dataLoaded&&e()},_handleEnded:function(e){if(this.playing&&this.mediaPlayer.currentTime>=this.mediaPlayer.duration-this.trimEnd&&(this.simpleEditMode||(this.$el.find(".replay-btn-container").fadeIn(500),this.$el.find(".player-actions-container").fadeOut()),this.playerState="ended",this.playing=!1,this.checkAllowPlay()),this.isIphone&&this.fullscreen&&this.exitFullScreen(),this.playerJSReceiver&&this.playerJSReceiver.emit("ended"),this.onEndHandler.length>0)for(var t=0;t<this.onEndHandler.length;t++)this.onEndHandler[t]();this.playing||(this.simpleEditMode?this.$el.find(".play-pause-button").find("img").attr("src",this.customColors?"/img/simple-edit-play-icon-dark.png":"/img/simple-edit-play-icon.png"):this.$el.find(".play-pause-button, .player-play-pause-action").find("img").attr("src","/svg/play.svg"))},_handleHover:function(t){var i=this,n=t.type,r=e(t.target),o=this.$el.find(".player-controls-container").is(":visible"),a=e(t.target.parentElement);this.simpleEditMode||("mouseenter"===n?this.showPlayerControls():"mouseleave"===n?(this.$el.find(".player-actions-container").fadeOut(),this.setPlayerControlsTimeout(1e3)):"mousemove"===n&&(clearTimeout(this.mousemoveTimeout),!this.isMobilePlayer&&this.isFullScreen()?(this.showPlayerHoverActions(),o||this.showPlayerControls(),a.hasClass("player-action")?this.mousemoveTimeout=setTimeout((function(){i.setPlayerControlsTimeout(50)}),1e3):r.hasClass("player-controls-container")||a.hasClass("player-controls-container")||a.hasClass("controls-btn")||a.hasClass("play-pause-btn")||a.hasClass("player-progress")||(this.mousemoveTimeout=setTimeout((function(){i.setPlayerControlsTimeout(50)}),800))):(this.showPlayerHoverActions(),this.isMobilePlayer||(this.mousemoveTimeout=setTimeout((function(){i.$el.find(".player-actions-container").fadeOut()}),a.hasClass("player-action")?1e3:600)))))},showPlayerControls:function(){clearTimeout(this.mouseleaveTimeout),this.$el.find(".player-controls-container").addClass("showing-controls").slideDown(200),this.$el.find("for-reactions, .notification-line-onplay").hide(),this.$el.find("#subtitlesTrack").css("bottom","55px"),this.isMobilePlayer?this.setPlayerControlsTimeout(1500):e(".emoji-wrap-onplay").hide()},cueChanged:function(e){this.$el.find("#subtitlesTrack").text("");for(var t=document.getElementById("primary-video").textTracks[0],i="",n=0;n<t.activeCues.length;n++)i+=t.activeCues[n].text;""!=i&&(document.getElementById("primary-video").textTracks[0].mode="hidden",this.$el.find("#subtitlesTrack").html("<span>"+i+"</span>"))},setPlayerControlsTimeout:function(t){var i=this;this.mouseleaveTimeout=setTimeout((function(){clearTimeout(this),i.simpleEditMode||i.$el.find(".quality-container").is(":visible")||(i.$el.find(".player-actions-container").fadeOut(),i.$el.find(".player-controls-container").removeClass("showing-controls").slideUp(100),i.$el.find(".volume-container, .quality-container").slideUp(),i.$el.find("for-reactions, .notification-line-onplay").show(),i.$el.find("#subtitlesTrack").css("bottom","15px"),e(".emoji-wrap-onplay").show())}),t)},setPlayerState:function(e){this.playerState=e},showPlayerHoverActions:function(){this.showHoverActions&&"initial"!==this.playerState&&"ended"!==this.playerState&&!this.isCTAWaitingMode&&this.$el.find(".player-actions-container").fadeIn()},_handleMenu:function(e){},_handleWaiting:function(e){if(this.showPersonalisedVideoLoading)this.$el.find("#personalisedVideoLoading").fadeIn(),this.showHoverActions=!1;else{var t=this;this.waitingTimeout=setTimeout((function(){t.canShowPlayerLoading&&t.$el.find(".player-loading-overlay").fadeIn(200)}),200),this._secondaryVideoPlaying&&this.customAudioPlayer.pause()}},setPersonalisedVideo:function(e){this.$el.find("#primary-video source").attr("src",e.video_url),this.$el.find("#primary-video").length>0&&this.$el.find("#primary-video")[0].load(),this.$el.find(".thumbnail-container img").attr("src",e.thumbnail),this.quickPreview=e.quickpreview,this.personalisedVideoDetailsSet=!0,this.$el.find("#personalisedVideoLoading").fadeOut(),this.pause(),this.show()},_handleResume:function(e){if(clearTimeout(this.waitingTimeout),this.$el.find(".player-loading-overlay").fadeOut(200),this.customAudioPlayer){this.customAudioPlayer.currentTime=this.mediaPlayer.currentTime;var t=this,i=this.customAudioPlayer.play();i?i.then((function(){t._secondaryVideoPlaying=!0})).catch((function(e){t._secondaryVideoPlaying=!1})):t._secondaryVideoPlaying=!0}},_handleCanplay:function(t){clearTimeout(this.waitingTimeout),this.$el.find(".player-loading-overlay").fadeOut(200);var i=this;if(this.playing){var r=this.mediaPlayer.play();r?r.then((function(){i._primaryVideoPlaying=!0})).catch((function(e){i._primaryVideoPlaying=!1})):i._primaryVideoPlaying=!0}this.canplayHandler&&this.canplayHandler(t),browser=["Safari","Edge","IE"];var o=window.navigator.userAgent.toLowerCase(),a=/safari/.test(o),s=/iphone|ipod|ipad/.test(o),l=s&&!a;(e.inArray(n.getBrowserName(),browser)>=0||l)&&!this.largeValueSet?(this.mediaPlayer.currentTime=0,this.durationComputed=!0,this.largeValueSet=!0,this.mediaPlayer.duration||(this.mediaPlayer.duration=this.duration),this.onComputedDurationHander&&this.onComputedDurationHander()):this.largeValueSet||isFinite(this.mediaPlayer.duration)?!this.durationComputed&&isFinite(this.mediaPlayer.duration)&&(this.mediaPlayer.currentTime=0,this.durationComputed=!0,this.onComputedDurationHander&&this.onComputedDurationHander()):(this.largeValueSet=!0,this.mediaPlayer.currentTime=1e9)},_handleSeeked:function(){if(this.onSeekedHandler&&this.onSeekedHandler(),this.onSeekedHandlers)for(var e=0;e<this.onSeekedHandlers.length;e++)this.onSeekedHandlers[e]&&this.onSeekedHandlers[e]()},_handleSeeking:function(){this.seekingStartedAt=this.currentTimeUpdate,this.seekingEndedAt=this.mediaPlayer.currentTime,this.onSeekindHandler&&this.onSeekindHandler()},_handlePlayerClick:function(t){this.simpleEditMode||this.isImageMode||(new Date-this.previousClick<300?this._handleFullscreenBtnClick():e(t.currentTarget).hasClass("replay-btn-container")||e(t.currentTarget).hasClass("play-btn-container")?this.play():this.showHoverActions||this._handlePlayPauseBtnClick(),this.showPlayerControls(),this.previousClick=new Date)},_handlePlay:function(){if(this.$el.find(".thumbnail-container").is(":visible")&&this.$el.find(".thumbnail-container").fadeOut(100),this.simpleEditMode?this.$el.find(".play-pause-button").find("img").attr("src",this.customColors?"/img/simple-edit-pause-icon-dark.png":"/img/simple-edit-pause-icon.png"):this.$el.find(".play-pause-button, .player-play-pause-action").find("img").attr("src","/svg/pause-white.svg"),this.onPlayHandler.length>0)for(var e=0;e<this.onPlayHandler.length;e++)this.onPlayHandler[e]()},_handlePause:function(){if(!this.playing&&(this._secondaryVideoPlaying&&this.customAudioPlayer.pause(),this.simpleEditMode?this.$el.find(".play-pause-button").find("img").attr("src",this.customColors?"/img/simple-edit-play-icon-dark.png":"/img/simple-edit-play-icon.png"):this.$el.find(".play-pause-button, .player-play-pause-action").find("img").attr("src","/svg/play.svg"),this.onPauseHandler.length>0))for(var e=0;e<this.onPauseHandler.length;e++)this.onPauseHandler[e]()},_handleProgress:function(e){if(this.showPersonalisedVideoLoading&&this.personalisedVideoDetailsSet){var t="Opera"==n.getBrowserName();if(!t){var i=this.mediaPlayer.buffered;if(!i||!i.length)return;var r=i.start(0),o=i.end(i.length-1);t=0==r&&o>3}t&&(this.personalisedVideoDetailsSet=!1,this.$el.find("#personalisedVideoLoading").is(":visible")&&this.play(),this.showHoverActions=!0,this.showPersonalisedVideoLoading=!1,this.$el.find("#personalisedVideoLoading").fadeOut())}this.onProgressHandler&&this.onProgressHandler(e)},_handlePlayPauseBtnClick:function(){this.playing?this.pause():this.play()},_handleRewindBtnClick:function(){if(!this.isCTAWaitingMode){var e=this.mediaPlayer.currentTime;e=Math.max(e-5,0),this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=e}},_handleForwardBtnClick:function(){if(!this.isCTAWaitingMode){var e=this.mediaPlayer.currentTime;e!=this.mediaPlayer.duration&&(e=Math.min(e+5,this.mediaPlayer.duration),this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=e)}},_handleAudioBtnClick:function(){0!=this.getVolume()?this.mute():this.unmute()},_handleMutedAutoplayAudioClick:function(t){this.unmute(),e(t.currentTarget).remove()},_handleFullscreenBtnClick:function(){this.fullscreen?this.exitFullScreen():this.enterFullScreen()},_handleTimeupdate:function(e){var t=this.map(this.mediaPlayer.currentTime,this.trimStart,this.mediaPlayer.duration-this.trimEnd,0,100);if((isNaN(t)||this.mediaPlayer.currentTime<Math.round(100*this.trimStart)/100)&&(this.mediaPlayer.currentTime=Math.round(100*this.trimStart)/100),t>100&&(this._handleEnded(),this.mediaPlayer.currentTime=this.trimStart>=this.mediaPlayer.duration?this.mediaPlayer.duration:this.trimStart,this._primaryVideoPlaying&&this.mediaPlayer.pause()),isFinite(this.mediaPlayer.duration)){this.$el.find(".player-progress").slider("value",t);var i=this.mediaPlayer.duration,n=this.mediaPlayer.currentTime;isNaN(this.trimStart)||isNaN(this.trimEnd)||(i=i-this.trimStart-this.trimEnd,n-=this.trimStart),i=Math.max(i,0),n=Math.max(n,0),this.$el.find(".player-currenttime").text(this.strToTime(n)+" / "+this.strToTime(i)),this.currentTimeUpdate=n,this.updateHandler&&this.updateHandler(),this.playerJSReceiver&&this.playerJSReceiver.emit("timeupdate",{seconds:n,duration:i})}},mute:function(){this.previousVolume=this.getVolume(),this.setVolume(0),this.mediaPlayer.muted=!0,this.customAudioPlayer&&(this.customAudioPlayer.muted=!0)},unmute:function(){this.setVolume(this.previousVolume),this.mediaPlayer.muted=!1,this.$el.find(".muted-autoplay").remove(),this.customAudioPlayer&&(this.customAudioPlayer.muted=!1)},setLoop:function(e){this.loop=e},getLoop:function(){return this.loop},setUpdateHandler:function(e){this.updateHandler=e},setPlayPauseHandler:function(e,t){t?this.onPlayHandler.push(e):this.onPauseHandler.push(e)},setEndedHandler:function(e){this.onEndHandler.push(e)},setSeekedHandler:function(e){this.onSeekedHandler=e},addSeekedHandler:function(e){this.onSeekedHandlers.push(e)},setSeekingHandler:function(e){this.onSeekindHandler=e},setPlayerResizeHandler:function(e){this.playerResizeHandler=e},play:function(){if(!this.playing&&!this.isCTAWaitingMode){if("initial"==this.playerState||"ended"==this.playerState)return this.playerState="started",this.$el.find(".play-btn-container").fadeOut(),this.$el.find(".replay-btn-container").fadeOut(),this.$el.find(".play-btn-container video").remove(),void(this.allowPlay?this.play():this.renderWarning(7));this.playing=!0;var e=this,t=this.mediaPlayer.play();t?t.then((function(){e._primaryVideoPlaying=!0})).catch((function(t){e._primaryVideoPlaying=!1})):e._primaryVideoPlaying=!0,this.playerJSReceiver&&this.playerJSReceiver.emit("play")}},pause:function(){this.playing&&(this.playing=!1,this._primaryVideoPlaying&&this.mediaPlayer.pause(),this.playerJSReceiver&&this.playerJSReceiver.emit("pause"))},isPlaying:function(){return this.playing},setVolume:function(e){this.$el.find(".player-audio-slider").slider("value",e),this.volumeChanged()},getVolume:function(){return this.$el.find(".player-audio-slider").slider("value")},isFullScreen:function(){return document.fullScreenElement&&null!==document.fullScreenElement||document.mozFullScreen||document.webkitIsFullScreen},enterFullScreen:function(){var e=screen.msOrientation||screen.orientation||screen.mozOrientation||{};if(!this.fullscreen&&0!=this.fullscreenControl){var t;this.fullscreen=!0,(t=this.isIphone?document.getElementById("primary-video"):document.getElementById(this.id)).webkitEnterFullScreen?t.webkitEnterFullScreen():t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen();try{r.canForceLandscapeForFullscreen()&&e.lock("landscape")}catch(e){r.postErrorsToLog({error:"Error while trying to force full screen landscape in player",stackTrace:JSON.stringify(e)})}}},exitFullScreen:function(){var e=screen.msOrientation||screen.orientation||screen.mozOrientation||{};if(this.fullscreen){this.fullscreen=!1;var t=document;this.isIphone&&(t=document.getElementById("primary-video")),t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.webkitExitFullscreen&&t.webkitExitFullscreen();try{r.canForceLandscapeForFullscreen()&&e.unlock()}catch(e){r.postErrorsToLog({error:"Error while trying to force exit full screen landscape in player",stackTrace:JSON.stringify(e)})}}},strToTime:function(e){var t=parseFloat(e,10),i=Math.floor(t/3600),n=Math.floor((t-3600*i)/60),r=Math.floor(t-3600*i-60*n);return i>0&&n<10&&(n="0"+n),r<10&&(r="0"+r),i>0?i+":"+n+":"+r:n+":"+r},trim:function(e,t,i){if(this.trimStart!=e||this.trimEnd!=t)try{this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=e}catch(e){}if(this.trimStart=e,this.trimEnd=t,i&&("initial"==this.playerState||"ended"==this.playerState))return this.playerState="started",this.$el.find(".play-btn-container").fadeOut(100),this.$el.find(".replay-btn-container").fadeOut(100),void this.$el.find(".play-btn-container video").remove()},map:function(e,t,i,n,r){return(e-t)*(r-n)/(i-t)+n},setSimpleEditMode:function(e){this.simpleEditMode=e,this.simpleEditMode?(this.$el.animate({"margin-bottom":"0px"},200),this.$el.find(".player-controls-container").addClass("player-controls-outside"),this.$el.find(".player-controls-container").removeClass("player-controls-inside"),this.$el.find(".player-controls-container").fadeIn(),this.$el.find(".play-pause-button").find("img").attr("src",this.customColors?"/img/simple-edit-play-icon-dark.png":"/img/simple-edit-play-icon.png"),this.$el.find(".player-download, .for-reactions").hide(),this.$el.find(".notification-line-onplay").hide()):(this.$el.animate({"margin-bottom":"0px"},200),this.$el.find(".player-controls-container").removeClass("player-controls-outside"),this.$el.find(".player-controls-container").addClass("player-controls-inside"),this.$el.find(".play-pause-button").find("img").attr("src","/svg/play.svg"),this.$el.find(".player-download, .for-reactions").show(),this.$el.find(".notification-line-onplay").show())},setCTAWaitingMode:function(e){this.isCTAWaitingMode=e,e&&this.$el.find(".player-actions-container").fadeOut()},setStatId:function(e){this.statId=e},getStatId:function(){return this.statId},resizePlayerForWindow:function(){var e=screen.msOrientation||(screen.orientation||screen.mozOrientation||{}).type;this.$el.height(9*this.$el.width()/16),this.resizeFitThumnbail(),this.isMobilePlayer&&((e||"").includes("landscape")&&this.isFullScreen()?this.$el.find(".emoji-wrap").show():this.$el.find(".emoji-wrap").hide()),this.playerResizeHandler&&this.playerResizeHandler({width:this.$el.width(),height:this.$el.height()}),this.resizeFitRenderless()},getValueForPlayerInitial:function(e,t){var i=this.$el.width(),n=this.$el.height();return t?this.roundNumber(e*(i/384),2):this.roundNumber(e*(n/216),2)},roundNumber:function(e,t){return Math.round(10*e*t)/(10*t)},getFaqOneLiner:function(){return null!=u["faqoneliner_"+this.authorState]?u["faqoneliner_"+this.authorState]:"unknown error.. contact us for more details"},getFaqLink:function(){var e={5:"misc-error",6:"misc-error",13:"upload-issues",14:"upload-issues",16:"upload-issues",28:"upload-issues",22:"misc-error",23:"misc-error",27:"misc-error"};return null==e[this.authorState]?"":'<a target="_blank" href="https://www.hippovideo.io/faq.html#'+e[this.authorState]+'"> more info </a>'},resetPlayer:function(){this.isImageMode?this.$el.find(".primary-video-container img").attr("src",""):(this.$el.find(".secondary-video-container video").attr("src",""),this.$el.find(".primary-video-container video").attr("src",""),this.$el.find(".secondary-video-container video")[0].load(),this.$el.find(".primary-video-container video")[0].load(),this.canShowPlayerLoading&&this.$el.find(".player-loading-overlay").show(),this.$el.find(".title-paragraph-tag").text(""),this.$el.find(".player-currenttime").text("")),this.$el.find(".vdo-prev-head").hide(),this.$el.find(".hippo-video-buttons").hide(),this.$el.find(".play-btn-container").hide(),this.$el.find(".vdo-error-state").hide()},downloadVideoClick:function(){null!=this.downloadVideo&&this.downloadVideo()},_handleCanvasMouseAction:function(e){if(clearTimeout(this.hideQuickPreviewTimeout),"mouseleave"===e.type){var t=this;this.hideQuickPreviewTimeout=setTimeout((function(){t.$el.find("#canvasPreviewContainer").fadeOut(200)}),300)}},getCurrentTime:function(){return this.durationComputed?this.mediaPlayer.currentTime:.001},getDuration:function(){return parseInt(this.mediaPlayer.duration)||this.duration},checkAllowPlay:function(){if(this.token){var e=this,t={token:this.token};f.call({url:"/video_delivery/is_allow_play",method:"POST",data:t,success:function(t){e.allowPlay=t.is_allow}})}},renderWarning:function(t){var i=e("#"+this.$el.attr("id")).parent().attr("id");e("#"+i).empty(),e("#"+i).html(this.template({id:this.id,token:this.token,thumbnail:" ",privacy:t})),this.setElement(e("#"+this.id)),this.initializeCSS(),this.undelegateEvents(),e("#comments").hide(),e(".delivery-footer").hide(),e(".play-btn-container").hide()},undelegateHoverActions:function(){this.undelegate("mouseenter mouseleave mousemove",this._handleHover)},delegateHoverActions:function(){this.delegate("mouseenter mouseleave mousemove",this._handleHover)},overrideStyle:function(e,t,i){e.each((function(){this.style.setProperty(t,i,"important")}))},applyCustomColors:function(){if(this.customColors){var e="";this.customColors.primaryColor&&(this.overrideStyle(this.$el.find(".player-progress .ui-slider-range, .player-progress .ui-slider-handle, .player-audio-slider .ui-slider-range, .player-audio-slider .ui-slider-handle"),"background",this.customColors.primaryColor),this.overrideStyle(this.$el.find(".player-progress .ui-slider-range"),"background-image","unset"),e+=".trim-slider .ui-slider-handle:before,.hippo-video-player .ui-resizable-e, .hippo-video-player .ui-resizable-w, .hippo-video-player .ui-resizable-n, .hippo-video-player .ui-resizable-s, .hippo-video-player .ui-resizable-nw, .hippo-video-player .ui-resizable-ne, .hippo-video-player .ui-resizable-sw, .hippo-video-player .ui-resizable-se,.hippo-video-player .ui-resizable-nw::after, .hippo-video-player .ui-resizable-ne::after, .hippo-video-player .ui-resizable-sw::after, .hippo-video-player .ui-resizable-se::after {background: "+this.customColors.primaryColor+" !important;}",e+=".se-clip-time {border-color: "+this.customColors.primaryColor+" !important;}",e+=".player-controls-outside .player-currenttime {color: "+this.customColors.primaryColor+" !important;}"),this.customColors.secondaryColor&&(e+=".se-clip-time {background: "+this.customColors.secondaryColor+" !important;}"),this.customColors.bgColor&&(e+=".player-controls-outside {background: "+this.customColors.bgColor+" !important;}"),e.length>0&&(document.head.appendChild(document.createElement("style")).innerHTML=e)}},getBandwidthConsumed:function(){var e={type:this.type};if("m3u8"==this.type)e.totalFileSize=this.adapter.getBandwidthConsumed();else{for(var t=0,i=0;i<this.mediaPlayer.buffered.length;i++){var n=this.mediaPlayer.buffered.start(i);t+=100*(this.mediaPlayer.buffered.end(i)-n)/this.mediaPlayer.duration}e.perc=t}return e},applyCustomPlayIcon:function(){if(this.customPlayIcon){var t=document.createElement("div");t.classList.add("overlay"),e(".main-controls").each((function(){e(this).append(t)}));var i=document.createElement("div");i.classList.add("watch-video"),i.textContent="WATCH VIDEO",e(".main-plyBtn").each((function(){e(this).append(i)}));e(".main-plyBtn .playbutton").each((function(){e(this).find("svg").remove(),e(this).append('<svg xmlns="http://www.w3.org/2000/svg" width="47" height="47" viewBox="0 0 47 47" class="white-play-icon prim-vid"> <g transform="translate(-344.113 -1343.053)"> <g class="a" transform="translate(344.113 1343.053)"> <circle class="c" cx="23.5" cy="23.5" r="23.5"/> <circle class="d" cx="23.5" cy="23.5" r="23"/> </g> <path class="b" d="M7.312,0l7.312,12.56H0Z" transform="translate(375.756 1359.646) rotate(90)"/> </g> </svg>'),e(this).append('<svg xmlns="http://www.w3.org/2000/svg" width="47" height="47" viewBox="0 0 57 57" class="white-play-icon-filled" style="display:none;"> <g transform="translate(-932 -595)"> <circle class="a" cx="28.5" cy="28.5" r="28.5" transform="translate(932 595)"/> <path class="b" d="M8.813,0l8.813,15.137H0Z" transform="translate(970.137 615) rotate(90)"/> </g> </svg>')})),e("#videoPagePreviewBlock, #videoPageDeliveryBlock").addClass(this.customPlayIcon)}},updateIsMirrorWebCam:function(e){this.isMirrorWebCam=e,n.toggleWebcamForMirrorVideo(this.isMirrorWebCam,null!=this.audioSrc&&""!=this.audioSrc?this.$el.find(".secondary-video"):this.$el.find("#primary-video"))},updateQuickPreviewObjects:function(t){t&&!this.isAudioOnly&&this.getDuration()>=30?(this.quickPreviewImg=document.createElement("img"),this.quickPreviewImg.setAttribute("src",t),this.quickPreviewCanvas=this.$el.find(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d"),e(this.quickPreviewCanvas).hide(),this.$el.find("#quick-preview-loading").show()):(this.quickPreviewImg=void 0,this.quickPreviewCanvas=void 0,this.quickPreviewContext=void 0)},setShowSetFrame:function(e){e?this.seekAndChooseThumb():this.hideSeekAndUpdateThumb()}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.x(t.get(["isPrivacy"],!1),t,{else:i,block:te},{})}function i(e,t){return e.x(t.get(["initial"],!1),t,{else:n,block:ee},{})}function n(e,t){return e.w('<div class="hippo-video-player" id=').f(t.get(["id"],!1),t,"h").w('><div class="se-crop-scale">\x3c!-- <canvas class="blurred-bg-video" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;filter: blur(20px);-webkit-filter: blur(20px);transform: scale(1.2);"></canvas> --\x3e<div class="primary-video-overflow-container"><div class="primary-video-container">').x(t.get(["isImageMode"],!1),t,{else:r,block:f},{}).w("</div></div>").nx(t.get(["isImageMode"],!1),t,{block:g},{}).w('<canvas class="renderless-overlay" style="position: absolute;width: 100%;height: 100%"></canvas></div>').nx(t.get(["isImageMode"],!1),t,{block:v},{}).w('<div id="personalizeChapterId" class="hp-menu-tog hide"><img src="/svg/hamburger-white.svg" width="16"></div><div id="personalizeChaptersListId" class="hp-tog-content hide"><a class="chapter-close" id="chapterCloseId"><img src="/svg/close-gray.svg" width="10"></a><br><div id="chaptersListId"></div></div><div class="error-overlay hide" style="position:absolute;width:100%;height:100%;background: rgba(0,0,0,0.2);z-index:2;background-repeat: no-repeat;background-size: contain;"><div class="error-reason-div"><img src="/svg/warning.svg" class="status-warning" /><div class="error-reason"></div></div></div><div class="player-touch-guard"></div>').nx(t.get(["isImageMode"],!1),t,{block:C},{}).h("select",t,{block:q},{key:t.get(["privacy"],!1)},"h").w(" ").h("select",t,{block:Y},{key:t.get(["privacy"],!1)},"h").w(" ").h("eq",t,{block:J},{key:t.get(["privacy"],!1),value:7},"h").w(" ").h("eq",t,{block:X},{key:t.get(["privacy"],!1),value:2},"h").w("</div>").nx(t.get(["isImageMode"],!1),t,{block:Q},{})}function r(e,t){return e.x(t.get(["isAudioOnly"],!1),t,{block:o},{}).w('<video class="primary-video" id="primary-video" crossorigin="anonymous" controls playsinline>').h("eq",t,{block:l},{key:t.get(["type"],!1),value:"url"},"h").w("Your browser does not support the video tag.").x(t.get(["subtitlesEnabled"],!1),t,{block:c},{}).w('</video><canvas class="se-effects-canvas"></canvas><div class="se-effects-components-container"></div>').x(t.get(["showSetFrame"],!1),t,{block:p},{})}function o(e,t){return e.w("<div>").x(t.get(["isLessonly"],!1),t,{else:a,block:s},{}).w("</div>")}function a(e,t){return e.w('<img src="/img/onlyaudio.jpg" style="width:100%;height:100%" />')}function s(e,t){return e.w('<img src="/img/onlyaudio_lessonly.jpg" style="width:100%;height:100%" />')}function l(e,t){return e.w(" <source ").x(t.get(["addSourceAudioType"],!1),t,{block:u},{}).w(' crossorigin="anonymous" src=').f(t.get(["src"],!1),t,"h").w(">")}function u(e,t){return e.w(' type="audio/mp3" ')}function c(e,t){return e.x(t.get(["subtitlesFromServer"],!1),t,{else:d,block:h},{})}function d(e,t){return e.w('<track label="English" kind="subtitles" id="subtitleTrack" srclang="eng" src="').f(t.get(["subtitles"],!1),t,"h").w('" default="">')}function h(e,t){return e.w('<track label="English" kind="subtitles" id="subtitleTrack" srclang="eng" src="').f(t.get(["domain"],!1),t,"h").w("/video_delivery/subtitles/").f(t.get(["token"],!1),t,"h").w('" default="">')}function p(e,t){return e.w('<video class="hidden-video" controls playsinline crossorigin="anonymous" style="display: none;"><source crossorigin="anonymous" src=').f(t.get(["src"],!1),t,"h").w(">").f(t.getPath(!1,["wizPlayer","browserDoesNotSupport"]),t,"h").w("</video>")}function f(e,t){return e.w('<img src="').f(t.get(["src"],!1),t,"h").w('" class="primary-video" id="gifImage" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;">')}function g(e,t){return e.nx(t.get(["isDelivery"],!1),t,{block:m},{})}function m(e,t){return e.w('<div class="secondary-video-overflow-container"><div class="secondary-video-container"><video class="secondary-video" crossorigin="anonymous" ><source crossorigin="anonymous" src=').f(t.get(["audioSrc"],!1),t,"h").w('></video></div></div><textarea id="seTextEditable" class="se-text-editable custom-scroll hide" spellcheck="false" placeholder="Enter text here"></textarea><div class="se-components-container"></div><div class="se-crop-resizable hide"></div><div class="se-crop-highlighter se-crop-highlighter-top"></div><div class="se-crop-highlighter se-crop-highlighter-left"></div><div class="se-crop-highlighter se-crop-highlighter-bottom"></div><div class="se-crop-highlighter se-crop-highlighter-right"></div>')}function v(e,t){return e.w('<div class="se-components-droppable"></div><div class="player-border"></div>').x(t.get(["thumbnail"],!1),t,{block:y},{}).w('<div class="play-btn-container full-screen-container"><div class="play-center-ico text-center"><img src="/svg/play.svg"></div>').x(t.get(["previewVideo"],!1),t,{block:w},{}).w('</div><div class="replay-btn-container full-screen-container hide"><img src="/img/videoreplay.png" style="width: 20%; display: block; position: relative;top: 30%;margin:auto;z-index:100;"></div><div class="player-loading-overlay full-screen-container hide"><div><img src="/img/videoloading.gif"></div></div>').x(t.get(["isLandingPageVideo"],!1),t,{else:E,block:_},{}).x(t.get(["isMutedAutoPlay"],!1),t,{block:S},{}).x(t.get(["showHoverActions"],!1),t,{block:T},{})}function y(e,t){return e.nx(t.get(["isAudioOnly"],!1),t,{block:b},{})}function b(e,t){return e.w('<div class="thumbnail-container full-screen-container" style="position:absolute;width:100%;height:100%;cursor: pointer;z-index:1"><img src="').f(t.get(["thumbnail"],!1),t,"h").w('" id="playerThumbnail" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;" onerror="this.style.display=\'none\'"></div>')}function w(e,t){return e.w('<video src="').f(t.get(["previewVideo"],!1),t,"h").w('" crossorigin="anonymous" autoplay muted loop />')}function E(e,t){return e.w('<div id="personalisedVideoLoading" class="personalised-video-loading"><div class="inner-container"><center><div class="bar-loading"><div></div><div></div><div></div><div></div></div></center></div></div>')}function _(e,t){return e.w('<div id="personalisedVideoLoading" class="personalised-video-loading-page"><div class="loader-wrap"><div class="rp-loader"></div></div></div>')}function S(e,t){return e.w('<div class="player-info muted-autoplay cursor-pointer hide"><img src="/svg/mute.svg" alt="volume" /> ').f(t.getPath(!1,["wizPlayer","clickToUnmute"]),t,"h").w("</div>")}function T(e,t){return e.w('<div class="player-actions-container full-screen-container hide"><div class="player-actions text-center"><span class="player-action player-rewind-action"><img src="/svg/rewind.svg" alt="Rewind" /></span><span class="player-action player-play-pause-action"><img src="/svg/play.svg" alt="Play/Pause" /></span><span class="player-action player-forward-action"><img src="/svg/forward.svg" alt="Forward" /></span></div></div>')}function C(e,t){return e.w('<div class="canvas-preview-container ').x(t.get(["showComments"],!1),t,{block:k},{}).w('" id="canvasPreviewContainer" style="display:none;"><img src="/images/loading-more.svg" style="width: 175px;height: 90px;padding: 20px;display:none" id="quick-preview-loading"><canvas class="quickpreview-canvas" width=128 height=72></canvas>').x(t.get(["showComments"],!1),t,{block:x},{}).x(t.get(["showSetFrame"],!1),t,{block:A},{}).w('<input type="hidden" id="canvasHoverTime" /></div><div class="subtitles-line" id="subtitlesTrack"></div><div class="player-controls-container player-controls-inside"><a class="play-pause-button" id="pauseAndPlayBtn"><img src="/svg/play.svg"></a><div class="components-marker-container"></div><div class="components-time-container"><div class="se-clip-time hide"><span class="se-selected-type"></span><div class="timer-pop-up hide"><div class="timer-start-section"><div class="timer-label">').f(t.getPath(!1,["wizPlayer","startTime"]),t,"h").w('</div><input type="text" class="timer-start-input"><div class="timer-arrow-section"><div class="arrow up-arrow timer-input-btn timer-start-btn-plus"></div><div class="arrow down-arrow timer-input-btn timer-start-btn-minus"></div></div></div><div class="timer-stop-section"><div class="timer-label">').f(t.getPath(!1,["wizPlayer","stopTime"]),t,"h").w('</div><input type="text" class="timer-stop-input"><div class="timer-arrow-section"><div class="arrow up-arrow timer-input-btn timer-stop-btn-plus"></div><div class="arrow down-arrow timer-input-btn timer-stop-btn-minus"></div></div></div><div class="timer-div-arrow"></div></div></div></div><div class="notification-line"></div><div class="cta-indicator hide"><div id="ctaIndicatorInner" class="cta-indicator-inner"></div></div><div id="chapterIndicatorId" class="hp-indicator hide"></div><div class="player-progress"><div class="click-area-extended"></div></div><span class="player-currenttime"></span>').x(t.get(["showReactions"],!1),t,{block:P},{}).x(t.get(["canPlayerLogoView"],!1),t,{block:I},{}).w('<div class="actions-container pull-right">').x(t.get(["isContainsAudio"],!1),t,{else:L,block:U},{}).x(t.get(["showSpeedSettings"],!1),t,{block:B},{}).x(t.get(["qualityControl"],!1),t,{block:V},{}).x(t.get(["subtitlesEnabled"],!1),t,{block:z},{}).x(t.get(["fullscreenControl"],!1),t,{block:H},{}).x(t.get(["allowDownload"],!1),t,{block:j},{}).w('</div></div><div class="notification-line-onplay"></div><div class="player-progress for-reactions"><div class="click-area-extended"></div></div><div id="ctaPlayerComps" class="cta-player-comps hide"></div><div id="ctaPlayerAddComp" class="cta-player-add-container hide"></div>')}function k(e,t){return e.w(" canvas-preview-with-comment ")}function x(e,t){return e.w('<div class="preview-add-comment" id="addCommentFromCanvas"><img src="/svg/icon-discussions.svg" /> ').f(t.getPath(!1,["wizPlayer","addComments"]),t,"h").w("</div>")}function A(e,t){return e.w('<h6 class="set-frame-btn">').f(t.getPath(!1,["wizPlayer","setTheFrame"]),t,"h").w("</h6>")}function P(e,t){return e.w('<div class="emoji-wrap"><span><img class="react-now" reaction_id="1" id="reaction_id-1" src="/svg/emoji-type-1.svg" width="16"></span><span><img class="react-now" reaction_id="2" id="reaction_id-2" src="/svg/emoji-type-2.svg" width="16"></span><span><img class="react-now" reaction_id="3" id="reaction_id-3" src="/svg/emoji-type-3.svg" width="16"></span><span><img class="react-now" reaction_id="4" id="reaction_id-4" src="/svg/emoji-type-4.svg" width="16"></span><span><img class="react-now" reaction_id="5" id="reaction_id-5" src="/svg/emoji-type-5.svg" width="16"></span><span><img class="react-now" reaction_id="6" id="reaction_id-6" src="/svg/emoji-type-6.svg" width="16"></span></div>')}function I(e,t){return e.w('<div class="player-logo pull-right">').x(t.get(["playerLogo"],!1),t,{else:R,block:D},{}).w("</div>")}function R(e,t){return e.w('<a href="https://www.hippovideo.io/" target="_blank" class="brand-logo"><img src="/svg/hippo-player-logo.svg" alt="logo" /></a>')}function D(e,t){return e.w("<a ").x(t.get(["addLinkToPlayerLogo"],!1),t,{block:O},{}).w(' target="_blank" class="brand-logo"><img src="').f(t.get(["playerLogo"],!1),t,"h").w('" alt="logo" /></a>')}function O(e,t){return e.x(t.get(["playerLogoLink"],!1),t,{block:N},{})}function N(e,t){return e.w('href="').f(t.get(["playerLogoLink"],!1),t,"h").w('"')}function L(e,t){return e.x(t.get(["isLessonly"],!1),t,{else:M,block:F},{})}function M(e,t){return e.w('<span class="no-audio-box"><img class="audio-img mute player-volume" src="/svg/no-audio-mute.svg" alt="volume" width="15" /><div class="no-audio-pop">This video has no audio</div></span>')}function F(e,t){return e.w('<span class="player-audio controls-btn" id="videoVolumeBtn"><img class="audio-img high player-volume" src="/svg/volume-high.svg" alt="volume" /><div class="volume-container" style="display: none;"><div class="player-audio-slider"></div></div></span>')}function U(e,t){return e.w('<span class="player-audio controls-btn" id="videoVolumeBtn"><img class="audio-img high player-volume" src="/svg/volume-high.svg" alt="volume" /><div class="volume-container" style="display: none;"><div class="player-audio-slider"></div></div></span>')}function B(e,t){return e.w('<span class="controls-btn video-speed-btn"><span class="player-speed-label" style="color: white">1X</span><div class="quality-container" style="display: none;"><ul class="quality-list"><li data-id="0.5">0.5X</li><li data-id="1" class="active">1X</li><li data-id="1.5">1.5X</li><li data-id="2">2X</li><li data-id="5">5X</li></ul></div></span>')}function V(e,t){return e.w('<span class="player-quality controls-btn" id="videoQualityBtn"><img class="player-quality-icon" src="/svg/setting-white.svg" alt="quality" /><div class="quality-container" style="display: none;"><ul class="quality-list"></ul></div></span>')}function z(e,t){return e.w('<span class="player-subtitle controls-btn" id="videoSubtitleBtn"><img class="player-subtitle-icon" src="/img/subtitle-cc.png" alt="subtitle" /></span>')}function H(e,t){return e.w('<span class="player-fullscreen controls-btn" id="videoFullscreenBtn"><img class="player-fullscreen-icon" src="/svg/fullscreen.svg" alt="fullscreen" /></span>')}function j(e,t){return e.w('<span class="player-download controls-btn" id="videoDownloadBtn"><img class="player-download-icon" src="/svg/download-white.svg" alt="download" /></span>')}function q(e,t){return e.w(" ").h("eq",t,{},{value:0},"h").w(" ").h("eq",t,{},{value:3},"h").w(" ").h("eq",t,{},{value:4},"h").w(" ").h("any",t,{block:G},{},"h").w(" ")}function G(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/access-denied.svg"><h3>').h("eq",t,{else:W,block:$},{key:t.get(["privacy"],!1),value:3},"h").w("</h3></div>")}function W(e,t){return e.f(t.getPath(!1,["wizPlayer","permissionToView"]),t,"h")}function $(e,t){return e.f(t.getPath(!1,["wizPlayer","watchExpired"]),t,"h")}function Y(e,t){return e.w(" ").h("eq",t,{},{value:5},"h").w(" ").h("eq",t,{},{value:6},"h").w(" ").h("any",t,{block:K},{},"h").w(" ")}function K(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","accountDeactivated"]),t,"h").w("</h3></div>")}function J(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","limitExceeded"]),t,"h").w('</h3><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","contactOwner"]),t,"h").w("</h3></div>")}function X(e,t){return e.w('<div class="medium-12 columns password-pop text-center"><img class="lock-icon" style="width: 80px;height: 80px;" src="/svg/password-lock.svg"><div class="small-4 columns large-centered small-centered"><input type="password" class="form-control password-holder vdoPlayerPwdField" placeholder="').f(t.getPath(!1,["wizPlayer","enterPassword"]),t,"h").w('"><span class="pwd-error hide">').f(t.getPath(!1,["wizPlayer","passwordInvalid"]),t,"h").w('</span><a class="button wiz-overlay-btn passwordGoBtn">').f(t.getPath(!1,["wizPlayer","go"]),t,"h").w("</a></div></div>")}function Q(e,t){return e.x(t.get(["showReactions"],!1),t,{block:Z},{})}function Z(e,t){return e.w('<div class="emoji-wrap-onplay"><span><img class="react-now-play" reaction_id="1" id="reaction_id-1" src="/svg/emoji-type-1.svg" width="16"></span><span><img class="react-now-play" reaction_id="2" id="reaction_id-2" src="/svg/emoji-type-2.svg" width="16"></span><span><img class="react-now-play" reaction_id="3" id="reaction_id-3" src="/svg/emoji-type-3.svg" width="16"></span><span><img class="react-now-play" reaction_id="4" id="reaction_id-4" src="/svg/emoji-type-4.svg" width="16"></span><span><img class="react-now-play" reaction_id="5" id="reaction_id-5" src="/svg/emoji-type-5.svg" width="16"></span><span><img class="react-now-play" reaction_id="6" id="reaction_id-6" src="/svg/emoji-type-6.svg" width="16"></span></div>')}function ee(e,t){return e.w('<div class="hippo-video-player" id=').f(t.get(["id"],!1),t,"h").w('><div id="personalisedVideoLoading" class="personalised-video-loading-page" style="display: block;"><div class="loader-wrap"><div class="rp-loader"></div></div></div></div>')}function te(e,t){return e.w('<div class="hippo-video-player" id=').f(t.get(["id"],!1),t,"h").w(">").h("select",t,{block:ie},{key:t.get(["privacy"],!1)},"h").w(" ").h("select",t,{block:ae},{key:t.get(["privacy"],!1)},"h").w(" ").h("eq",t,{block:le},{key:t.get(["privacy"],!1),value:7},"h").w(" ").h("eq",t,{block:ue},{key:t.get(["privacy"],!1),value:2},"h").w("</div>")}function ie(e,t){return e.w(" ").h("eq",t,{},{value:0},"h").w(" ").h("eq",t,{},{value:3},"h").w(" ").h("eq",t,{},{value:4},"h").w(" ").h("any",t,{block:ne},{},"h").w(" ")}function ne(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/access-denied.svg"><h3>').h("eq",t,{else:re,block:oe},{key:t.get(["privacy"],!1),value:3},"h").w("</h3></div>")}function re(e,t){return e.f(t.getPath(!1,["wizPlayer","permissionToView"]),t,"h")}function oe(e,t){return e.f(t.getPath(!1,["wizPlayer","watchExpired"]),t,"h")}function ae(e,t){return e.w(" ").h("eq",t,{},{value:5},"h").w(" ").h("eq",t,{},{value:6},"h").w(" ").h("any",t,{block:se},{},"h").w(" ")}function se(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","accountDeactivated"]),t,"h").w("</h3></div>")}function le(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","limitExceeded"]),t,"h").w('</h3><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","contactOwner"]),t,"h").w("</h3></div>")}function ue(e,t){return e.w('<div class="medium-12 columns password-pop text-center"><img class="lock-icon" style="width: 80px;height: 80px;" src="/svg/password-lock.svg"><div class="small-4 columns large-centered small-centered"><input type="password" class="form-control password-holder vdoPlayerPwdField" placeholder="').f(t.getPath(!1,["wizPlayer","enterPassword"]),t,"h").w('"><span class="pwd-error hide">').f(t.getPath(!1,["wizPlayer","passwordInvalid"]),t,"h").w('</span><a class="button wiz-overlay-btn passwordGoBtn">').f(t.getPath(!1,["wizPlayer","go"]),t,"h").w("</a></div></div>")}e.register("templates/component/videoplayer",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0,I.__dustBody=!0,R.__dustBody=!0,D.__dustBody=!0,O.__dustBody=!0,N.__dustBody=!0,L.__dustBody=!0,M.__dustBody=!0,F.__dustBody=!0,U.__dustBody=!0,B.__dustBody=!0,V.__dustBody=!0,z.__dustBody=!0,H.__dustBody=!0,j.__dustBody=!0,q.__dustBody=!0,G.__dustBody=!0,W.__dustBody=!0,$.__dustBody=!0,Y.__dustBody=!0,K.__dustBody=!0,J.__dustBody=!0,X.__dustBody=!0,Q.__dustBody=!0,Z.__dustBody=!0,ee.__dustBody=!0,te.__dustBody=!0,ie.__dustBody=!0,ne.__dustBody=!0,re.__dustBody=!0,oe.__dustBody=!0,ae.__dustBody=!0,se.__dustBody=!0,le.__dustBody=!0,ue.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/videoplayer",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.x(t.get(["isPrivacy"],!1),t,{else:i,block:te},{})}function i(e,t){return e.x(t.get(["initial"],!1),t,{else:n,block:ee},{})}function n(e,t){return e.w('<div class="hippo-video-player new-sdk" id=').f(t.get(["id"],!1),t,"h").w('><div class="se-crop-scale">\x3c!-- <canvas class="blurred-bg-video" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;filter: blur(20px);-webkit-filter: blur(20px);transform: scale(1.2);"></canvas> --\x3e<div class="primary-video-overflow-container"><div class="primary-video-container">').x(t.get(["isImageMode"],!1),t,{else:r,block:f},{}).w("</div></div>").nx(t.get(["isImageMode"],!1),t,{block:g},{}).w('<canvas class="renderless-overlay" style="position: absolute;width: 100%;height: 100%"></canvas></div>').nx(t.get(["isImageMode"],!1),t,{block:v},{}).w('<div id="personalizeChapterId" class="hp-menu-tog hide"><img src="/svg/hamburger-white.svg" width="16"></div><div id="personalizeChaptersListId" class="hp-tog-content hide"><a class="chapter-close" id="chapterCloseId"><img src="/svg/close-gray.svg" width="10"></a><br><div id="chaptersListId"></div></div><div class="error-overlay hide" style="position:absolute;width:100%;height:100%;background: rgba(0,0,0,0.2);z-index:2;background-repeat: no-repeat;background-size: contain;"><div class="error-reason-div"><img src="/svg/warning.svg" class="status-warning" /><div class="error-reason"></div></div></div><div class="player-touch-guard"></div>').nx(t.get(["isImageMode"],!1),t,{block:C},{}).h("select",t,{block:q},{key:t.get(["privacy"],!1)},"h").w(" ").h("select",t,{block:Y},{key:t.get(["privacy"],!1)},"h").w(" ").h("eq",t,{block:J},{key:t.get(["privacy"],!1),value:7},"h").w(" ").h("eq",t,{block:X},{key:t.get(["privacy"],!1),value:2},"h").w("</div>").nx(t.get(["isImageMode"],!1),t,{block:Q},{})}function r(e,t){return e.x(t.get(["isAudioOnly"],!1),t,{block:o},{}).w('<video class="primary-video" id="primary-video" crossorigin="anonymous" controls playsinline>').h("eq",t,{block:l},{key:t.get(["type"],!1),value:"url"},"h").w("Your browser does not support the video tag.").x(t.get(["subtitlesEnabled"],!1),t,{block:c},{}).w('</video><canvas class="se-effects-canvas"></canvas><div class="se-effects-components-container"></div>').x(t.get(["showSetFrame"],!1),t,{block:p},{})}function o(e,t){return e.w("<div>").x(t.get(["isLessonly"],!1),t,{else:a,block:s},{}).w("</div>")}function a(e,t){return e.w('<img src="/img/onlyaudio.jpg" style="width:100%;height:100%" />')}function s(e,t){return e.w('<img src="/img/onlyaudio_lessonly.jpg" style="width:100%;height:100%" />')}function l(e,t){return e.w(" <source ").x(t.get(["addSourceAudioType"],!1),t,{block:u},{}).w(' crossorigin="anonymous" src=').f(t.get(["src"],!1),t,"h").w(">")}function u(e,t){return e.w(' type="audio/mp3" ')}function c(e,t){return e.x(t.get(["subtitlesFromServer"],!1),t,{else:d,block:h},{})}function d(e,t){return e.w('<track label="English" kind="subtitles" id="subtitleTrack" srclang="eng" src="').f(t.get(["subtitles"],!1),t,"h").w('" default="">')}function h(e,t){return e.w('<track label="English" kind="subtitles" id="subtitleTrack" srclang="eng" src="').f(t.get(["domain"],!1),t,"h").w("/video_delivery/subtitles/").f(t.get(["token"],!1),t,"h").w('" default="">')}function p(e,t){return e.w('<video class="hidden-video" controls playsinline crossorigin="anonymous" style="display: none;"><source crossorigin="anonymous" src=').f(t.get(["src"],!1),t,"h").w(">").f(t.getPath(!1,["wizPlayer","browserDoesNotSupport"]),t,"h").w("</video>")}function f(e,t){return e.w('<img src="').f(t.get(["src"],!1),t,"h").w('" class="primary-video" id="gifImage" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;">')}function g(e,t){return e.nx(t.get(["isDelivery"],!1),t,{block:m},{})}function m(e,t){return e.w('<div class="secondary-video-overflow-container"><div class="secondary-video-container"><video class="secondary-video" crossorigin="anonymous" ><source crossorigin="anonymous" src=').f(t.get(["audioSrc"],!1),t,"h").w('></video></div></div><textarea id="seTextEditable" class="se-text-editable custom-scroll hide" spellcheck="false" placeholder="Enter text here"></textarea><div class="se-components-container"></div><div class="se-crop-resizable hide"></div><div class="se-crop-highlighter se-crop-highlighter-top"></div><div class="se-crop-highlighter se-crop-highlighter-left"></div><div class="se-crop-highlighter se-crop-highlighter-bottom"></div><div class="se-crop-highlighter se-crop-highlighter-right"></div>')}function v(e,t){return e.w('<div class="se-components-droppable"></div><div class="player-border"></div>').x(t.get(["thumbnail"],!1),t,{block:y},{}).w('<div class="play-btn-container full-screen-container"><div class="play-center-ico text-center"><img src="/svg/play.svg"></div>').x(t.get(["previewVideo"],!1),t,{block:w},{}).w('</div><div class="replay-btn-container full-screen-container hide"><img src="/img/videoreplay.png" style="width: 20%; display: block; position: relative;top: 30%;margin:auto;z-index:100;"></div><div class="player-loading-overlay full-screen-container hide"><div><img src="/img/videoloading.gif"></div></div>').x(t.get(["isLandingPageVideo"],!1),t,{else:E,block:_},{}).x(t.get(["isMutedAutoPlay"],!1),t,{block:S},{}).x(t.get(["showHoverActions"],!1),t,{block:T},{})}function y(e,t){return e.nx(t.get(["isAudioOnly"],!1),t,{block:b},{})}function b(e,t){return e.w('<div class="thumbnail-container full-screen-container" style="position:absolute;width:100%;height:100%;cursor: pointer;z-index:1"><img src="').f(t.get(["thumbnail"],!1),t,"h").w('" id="playerThumbnail" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;" onerror="this.style.display=\'none\'"></div>')}function w(e,t){return e.w('<video src="').f(t.get(["previewVideo"],!1),t,"h").w('" crossorigin="anonymous" autoplay muted loop />')}function E(e,t){return e.w('<div id="personalisedVideoLoading" class="personalised-video-loading"><div class="inner-container"><center><div class="bar-loading"><div></div><div></div><div></div><div></div></div></center></div></div>')}function _(e,t){return e.w('<div id="personalisedVideoLoading" class="personalised-video-loading-page"><div class="loader-wrap"><div class="rp-loader"></div></div></div>')}function S(e,t){return e.w('<div class="player-info muted-autoplay cursor-pointer hide"><img src="/svg/mute.svg" alt="volume" /> ').f(t.getPath(!1,["wizPlayer","clickToUnmute"]),t,"h").w("</div>")}function T(e,t){return e.w('<div class="player-actions-container full-screen-container hide"><div class="player-actions text-center"><span class="player-action player-rewind-action"><img src="/svg/rewind.svg" alt="Rewind" /></span><span class="player-action player-play-pause-action"><img src="/svg/play.svg" alt="Play/Pause" /></span><span class="player-action player-forward-action"><img src="/svg/forward.svg" alt="Forward" /></span></div></div>')}function C(e,t){return e.w('<div class="canvas-preview-container ').x(t.get(["showComments"],!1),t,{block:k},{}).w('" id="canvasPreviewContainer" style="display:none;"><canvas class="quickpreview-canvas" width=128 height=72></canvas>').x(t.get(["showComments"],!1),t,{block:x},{}).x(t.get(["showSetFrame"],!1),t,{block:A},{}).w('<input type="hidden" id="canvasHoverTime" /></div><div class="subtitles-line" id="subtitlesTrack"></div><div class="player-controls-container player-controls-inside"><a class="play-pause-button" id="pauseAndPlayBtn"><img src="/svg/play.svg"></a><div class="components-marker-container"></div><div class="components-time-container"><div class="se-clip-time hide"><span class="se-selected-type"></span><div class="timer-pop-up hide"><div class="timer-start-section"><div class="timer-label">').f(t.getPath(!1,["wizPlayer","startTime"]),t,"h").w('</div><input type="text" class="timer-start-input"><div class="timer-arrow-section"><div class="arrow up-arrow timer-input-btn timer-start-btn-plus"></div><div class="arrow down-arrow timer-input-btn timer-start-btn-minus"></div></div></div><div class="timer-stop-section"><div class="timer-label">').f(t.getPath(!1,["wizPlayer","stopTime"]),t,"h").w('</div><input type="text" class="timer-stop-input"><div class="timer-arrow-section"><div class="arrow up-arrow timer-input-btn timer-stop-btn-plus"></div><div class="arrow down-arrow timer-input-btn timer-stop-btn-minus"></div></div></div><div class="timer-div-arrow"></div></div></div></div><div class="notification-line"></div><div class="cta-indicator hide"><div id="ctaIndicatorInner" class="cta-indicator-inner"></div></div><div id="chapterIndicatorId" class="hp-indicator hide"></div><div class="player-progress"><div class="click-area-extended"></div></div><span class="player-currenttime"></span>').x(t.get(["showReactions"],!1),t,{block:P},{}).x(t.get(["canPlayerLogoView"],!1),t,{block:I},{}).w('<div class="actions-container pull-right">').x(t.get(["isContainsAudio"],!1),t,{else:L,block:U},{}).x(t.get(["showSpeedSettings"],!1),t,{block:B},{}).x(t.get(["qualityControl"],!1),t,{block:V},{}).x(t.get(["subtitlesEnabled"],!1),t,{block:z},{}).x(t.get(["fullscreenControl"],!1),t,{block:H},{}).x(t.get(["allowDownload"],!1),t,{block:j},{}).w('</div></div><div class="notification-line-onplay"></div><div class="player-progress for-reactions"><div class="click-area-extended"></div></div><div id="ctaPlayerComps" class="cta-player-comps hide"></div><div id="ctaPlayerAddComp" class="cta-player-add-container hide"></div>')}function k(e,t){return e.w(" canvas-preview-with-comment ")}function x(e,t){return e.w('<div class="preview-add-comment" id="addCommentFromCanvas"><img src="/svg/icon-discussions.svg" /> ').f(t.getPath(!1,["wizPlayer","addComments"]),t,"h").w("</div>")}function A(e,t){return e.w('<h6 class="set-frame-btn">').f(t.getPath(!1,["wizPlayer","setTheFrame"]),t,"h").w("</h6>")}function P(e,t){return e.w('<div class="emoji-wrap"><span><img class="react-now" reaction_id="1" id="reaction_id-1" src="/svg/emoji-type-1.svg" width="16"></span><span><img class="react-now" reaction_id="2" id="reaction_id-2" src="/svg/emoji-type-2.svg" width="16"></span><span><img class="react-now" reaction_id="3" id="reaction_id-3" src="/svg/emoji-type-3.svg" width="16"></span><span><img class="react-now" reaction_id="4" id="reaction_id-4" src="/svg/emoji-type-4.svg" width="16"></span><span><img class="react-now" reaction_id="5" id="reaction_id-5" src="/svg/emoji-type-5.svg" width="16"></span><span><img class="react-now" reaction_id="6" id="reaction_id-6" src="/svg/emoji-type-6.svg" width="16"></span></div>')}function I(e,t){return e.w('<div class="player-logo pull-right">').x(t.get(["playerLogo"],!1),t,{else:R,block:D},{}).w("</div>")}function R(e,t){return e.w('<a href="https://www.hippovideo.io/" target="_blank" class="brand-logo"><img src="/svg/hippo-player-logo.svg" alt="logo" /></a>')}function D(e,t){return e.w("<a ").x(t.get(["addLinkToPlayerLogo"],!1),t,{block:O},{}).w(' target="_blank" class="brand-logo"><img src="').f(t.get(["playerLogo"],!1),t,"h").w('" alt="logo" /></a>')}function O(e,t){return e.x(t.get(["playerLogoLink"],!1),t,{block:N},{})}function N(e,t){return e.w('href="').f(t.get(["playerLogoLink"],!1),t,"h").w('"')}function L(e,t){return e.x(t.get(["isLessonly"],!1),t,{else:M,block:F},{})}function M(e,t){return e.w('<span class="no-audio-box"><img class="audio-img mute player-volume" src="/svg/no-audio-mute.svg" alt="volume" width="15" /><div class="no-audio-pop">This video has no audio</div></span>')}function F(e,t){return e.w('<span class="player-audio controls-btn" id="videoVolumeBtn"><img class="audio-img high player-volume" src="/svg/volume-high.svg" alt="volume" /><div class="volume-container" style="display: none;"><div class="player-audio-slider"></div></div></span>')}function U(e,t){return e.w('<span class="player-audio controls-btn" id="videoVolumeBtn"><img class="audio-img high player-volume" src="/svg/volume-high.svg" alt="volume" /><div class="volume-container" style="display: none;"><div class="player-audio-slider"></div></div></span>')}function B(e,t){return e.w('<span class="controls-btn video-speed-btn"><span class="player-speed-label" style="color: white">1X</span><div class="quality-container" style="display: none;"><ul class="quality-list"><li data-id="0.5">0.5X</li><li data-id="1" class="active">1X</li><li data-id="1.5">1.5X</li><li data-id="2">2X</li><li data-id="5">5X</li></ul></div></span>')}function V(e,t){return e.w('<span class="player-quality controls-btn" id="videoQualityBtn"><img class="player-quality-icon" src="/svg/setting-white.svg" alt="quality" /><div class="quality-container" style="display: none;"><ul class="quality-list"></ul></div></span>')}function z(e,t){return e.w('<span class="player-subtitle controls-btn" id="videoSubtitleBtn"><img class="player-subtitle-icon" src="/img/subtitle-cc.png" alt="subtitle" /></span>')}function H(e,t){return e.w('<span class="player-fullscreen controls-btn" id="videoFullscreenBtn"><img class="player-fullscreen-icon" src="/svg/fullscreen.svg" alt="fullscreen" /></span>')}function j(e,t){return e.w('<span class="player-download controls-btn" id="videoDownloadBtn"><img class="player-download-icon" src="/svg/download-white.svg" alt="download" /></span>')}function q(e,t){return e.w(" ").h("eq",t,{},{value:0},"h").w(" ").h("eq",t,{},{value:3},"h").w(" ").h("eq",t,{},{value:4},"h").w(" ").h("any",t,{block:G},{},"h").w(" ")}function G(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/access-denied.svg"><h3>').h("eq",t,{else:W,block:$},{key:t.get(["privacy"],!1),value:3},"h").w("</h3></div>")}function W(e,t){return e.f(t.getPath(!1,["wizPlayer","permissionToView"]),t,"h")}function $(e,t){return e.f(t.getPath(!1,["wizPlayer","watchExpired"]),t,"h")}function Y(e,t){return e.w(" ").h("eq",t,{},{value:5},"h").w(" ").h("eq",t,{},{value:6},"h").w(" ").h("any",t,{block:K},{},"h").w(" ")}function K(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","accountDeactivated"]),t,"h").w("</h3></div>")}function J(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","limitExceeded"]),t,"h").w('</h3><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","contactOwner"]),t,"h").w("</h3></div>")}function X(e,t){return e.w('<div class="medium-12 columns password-pop text-center"><img class="lock-icon" style="width: 80px;height: 80px;" src="/svg/password-lock.svg"><div class="small-4 columns large-centered small-centered"><input type="password" class="form-control password-holder vdoPlayerPwdField" placeholder="').f(t.getPath(!1,["wizPlayer","enterPassword"]),t,"h").w('"><span class="pwd-error hide">').f(t.getPath(!1,["wizPlayer","passwordInvalid"]),t,"h").w('</span><a class="button wiz-overlay-btn passwordGoBtn">').f(t.getPath(!1,["wizPlayer","go"]),t,"h").w("</a></div></div>")}function Q(e,t){return e.x(t.get(["showReactions"],!1),t,{block:Z},{})}function Z(e,t){return e.w('<div class="emoji-wrap-onplay"><span><img class="react-now-play" reaction_id="1" id="reaction_id-1" src="/svg/emoji-type-1.svg" width="16"></span><span><img class="react-now-play" reaction_id="2" id="reaction_id-2" src="/svg/emoji-type-2.svg" width="16"></span><span><img class="react-now-play" reaction_id="3" id="reaction_id-3" src="/svg/emoji-type-3.svg" width="16"></span><span><img class="react-now-play" reaction_id="4" id="reaction_id-4" src="/svg/emoji-type-4.svg" width="16"></span><span><img class="react-now-play" reaction_id="5" id="reaction_id-5" src="/svg/emoji-type-5.svg" width="16"></span><span><img class="react-now-play" reaction_id="6" id="reaction_id-6" src="/svg/emoji-type-6.svg" width="16"></span></div>')}function ee(e,t){return e.w('<div class="hippo-video-player new-sdk" id=').f(t.get(["id"],!1),t,"h").w('><div id="personalisedVideoLoading" class="personalised-video-loading-page" style="display: block;"><div class="loader-wrap"><div class="rp-loader"></div></div></div></div>')}function te(e,t){return e.w('<div class="hippo-video-player new-sdk" id=').f(t.get(["id"],!1),t,"h").w(">").h("select",t,{block:ie},{key:t.get(["privacy"],!1)},"h").w(" ").h("select",t,{block:ae},{key:t.get(["privacy"],!1)},"h").w(" ").h("eq",t,{block:le},{key:t.get(["privacy"],!1),value:7},"h").w(" ").h("eq",t,{block:ue},{key:t.get(["privacy"],!1),value:2},"h").w("</div>")}function ie(e,t){return e.w(" ").h("eq",t,{},{value:0},"h").w(" ").h("eq",t,{},{value:3},"h").w(" ").h("eq",t,{},{value:4},"h").w(" ").h("any",t,{block:ne},{},"h").w(" ")}function ne(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/access-denied.svg"><h3>').h("eq",t,{else:re,block:oe},{key:t.get(["privacy"],!1),value:3},"h").w("</h3></div>")}function re(e,t){return e.f(t.getPath(!1,["wizPlayer","permissionToView"]),t,"h")}function oe(e,t){return e.f(t.getPath(!1,["wizPlayer","watchExpired"]),t,"h")}function ae(e,t){return e.w(" ").h("eq",t,{},{value:5},"h").w(" ").h("eq",t,{},{value:6},"h").w(" ").h("any",t,{block:se},{},"h").w(" ")}function se(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","accountDeactivated"]),t,"h").w("</h3></div>")}function le(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","limitExceeded"]),t,"h").w('</h3><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","contactOwner"]),t,"h").w("</h3></div>")}function ue(e,t){return e.w('<div class="medium-12 columns password-pop text-center"><img class="lock-icon" style="width: 80px;height: 80px;" src="/svg/password-lock.svg"><div class="small-4 columns large-centered small-centered"><input type="password" class="form-control password-holder vdoPlayerPwdField" placeholder="').f(t.getPath(!1,["wizPlayer","enterPassword"]),t,"h").w('"><span class="pwd-error hide">').f(t.getPath(!1,["wizPlayer","passwordInvalid"]),t,"h").w('</span><a class="button wiz-overlay-btn passwordGoBtn">').f(t.getPath(!1,["wizPlayer","go"]),t,"h").w("</a></div></div>")}e.register("templates/component/sdk_videoplayer",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0,I.__dustBody=!0,R.__dustBody=!0,D.__dustBody=!0,O.__dustBody=!0,N.__dustBody=!0,L.__dustBody=!0,M.__dustBody=!0,F.__dustBody=!0,U.__dustBody=!0,B.__dustBody=!0,V.__dustBody=!0,z.__dustBody=!0,H.__dustBody=!0,j.__dustBody=!0,q.__dustBody=!0,G.__dustBody=!0,W.__dustBody=!0,$.__dustBody=!0,Y.__dustBody=!0,K.__dustBody=!0,J.__dustBody=!0,X.__dustBody=!0,Q.__dustBody=!0,Z.__dustBody=!0,ee.__dustBody=!0,te.__dustBody=!0,ie.__dustBody=!0,ne.__dustBody=!0,re.__dustBody=!0,oe.__dustBody=!0,ae.__dustBody=!0,se.__dustBody=!0,le.__dustBody=!0,ue.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/sdk_videoplayer",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";var n=i(8),r=i(59),o=i(39),a=i(55),s=n.RangeError;e.exports=function(e){var t=o(a(this)),i="",n=r(e);if(n<0||n==1/0)throw s("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(i+=t);return i}},function(e,t,i){"use strict";i.r(t);i(85),i(96),i(86),i(24),i(136),i(60),i(137);var n=i(98),r=i.n(n),o=i(36),a=i.n(o),s=i(37),l=i.n(s),u=(i(110),i(242),i(191)),c=i.n(u);function d(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function h(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?d(Object(i),!0).forEach((function(t){r()(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var p=function(){function e(t){var i=t.hlsInstance,n=t.statsJsonSeed;a()(this,e),this.hls=i,this.media=i.media,this.statsJsonSeed=n}return l()(e,[{key:"init",value:function(){this.initLogger(),this.HLSLogger&&this.setupMetrics()}},{key:"initLogger",value:function(){if(window.HippoVideo){var e=window.HippoVideo.Class,t=e.Level;this.generateStatConstants.call(this),this.HLSLogger=e.Logger.getLogger("[HLSAdapter]"),this.HLSLoggerLevel=t.INFO}}},{key:"generateStatConstants",value:function(){var e,t,i,n,r,o,a,s=(null===(e=window.HippoVideo)||void 0===e||null===(t=e.UserProfile)||void 0===t?void 0:t.tenantId)||null,l=(null===(i=window.HippoVideo)||void 0===i||null===(n=i.UserProfile)||void 0===n?void 0:n.userId)||null,u=null===(r=window.HippoVideo)||void 0===r?void 0:r.generateUniqueId(),c=!(null===(o=window.HippoVideo)||void 0===o||!o.isDelivery),d=null===(a=navigator.connection)||void 0===a?void 0:a.rtt;this.statsConstants=h(h({},this.statsJsonSeed),{},{tenant_id:s,user_id:l,session_id:u,isDelivery:c,rtt:d})}},{key:"setupMetrics",value:function(){var e=this;e.timeChart={done:!0},e.media.addEventListener("play",(function(){e.timeChart.playClickedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1})),e.hls.on(c.a.Events.FRAG_LOADED,(function(t,i){e.timeChart.firstFragLoadedAt||(e.timeChart.firstFragLoadedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1);try{e.timeChart.bandwidthConsumed||(e.timeChart.bandwidthConsumed=0),i&&i.frag&&i.frag.loaded&&(e.timeChart.bandwidthConsumed+=Number(i.frag.loaded))}catch(e){}})),e.hls.on(c.a.Events.LEVEL_SWITCHED,(function(){e.timeChart.levelSwitchedCount||(e.timeChart.levelSwitchedCount=0),e.timeChart.levelSwitchedCount++})),e.media.addEventListener("ended",(function(){e.timeChart.mediaEndedAt||(e.timeChart.mediaEndedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1)})),e.media.addEventListener("waiting",(function(){e.timeChart.mediaWaitingAtArr||(e.timeChart.mediaWaitingAtArr=[]),e.timeChart.mediaWaitingAtArr.push(Number(performance.now().toFixed(2)))})),e.media.addEventListener("playing",(function(){if(e.timeChart.mediaTimeLagArr||(e.timeChart.mediaTimeLagArr=[]),e.timeChart.mediaWaitingAtArr&&e.timeChart.mediaWaitingAtArr.length>e.timeChart.mediaTimeLagArr.length){var t=e.timeChart.mediaWaitingAtArr,i=t[t.length-1],n=Number(performance.now().toFixed(2));e.timeChart.mediaTimeLagArr.push(n-i),e.timeChart.mediaTimeLag=n-i}e.timeChart.done=!1})),e.media.addEventListener("seeked",(function(){e.timeChart.mediaSeekedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1})),window.addEventListener("beforeunload",(function(){e.timeChart.windowUnloadAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1,e.timeChartEval.call(e)})),setInterval((function(){e.timeChartEval()}),2e3)}},{key:"timeChartEval",value:function(){if(!this.timeChart.done){if(this.timeChart.playClickedAt&&(this.timeChart.firstFragLoadedAt&&(this.logg({metric_name:"time-to-first-frame",metric_value:Math.max(0,this.timeChart.firstFragLoadedAt-this.timeChart.playClickedAt)}),this.timeChart.videoStarted=!0,delete this.timeChart.playClickedAt),this.timeChart.videoPlayIntented=!0),this.timeChart.mediaEndedAt||this.timeChart.windowUnloadAt){var e;this.timeChart.levelSwitchedCount&&(this.logg({metric_name:"number-of-variant-changes",metric_value:this.timeChart.levelSwitchedCount}),delete this.timeChart.levelSwitchedCount),this.timeChart.mediaWaitingAtArr&&(this.logg({metric_name:"video-stalled-count",metric_value:this.timeChart.mediaWaitingAtArr.length}),delete this.timeChart.mediaWaitingAtArr),this.timeChart.bandwidthConsumed&&(this.logg({metric_name:"video-bandwidth-used",metric_value:this.timeChart.bandwidthConsumed}),delete this.timeChart.bandwidthConsumed),this.timeChart.videoPlayIntented&&!this.timeChart.videoStarted&&this.timeChart.windowUnloadAt&&this.logg({metric_name:"video-adandon-before-start",metric_value:this.timeChart.windowUnloadAt}),!this.timeChart.videoPlayIntented&&this.timeChart.windowUnloadAt&&this.logg({metric_name:"page-adandon-before-clicking-play",metric_value:this.timeChart.windowUnloadAt});var t=localStorage.getItem("hv-delivery-loaded");t&&null!==(e=this.statsJsonSeed)&&void 0!==e&&e.isDelivery&&(this.logg({metric_name:"hv-delivery-loaded",metric_value:t}),localStorage.removeItem("hv-delivery-loaded")),delete this.timeChart.mediaEndedAt,delete this.timeChart.windowUnloadAt}this.timeChart.mediaTimeLag&&(this.logg({metric_name:"video-stalled-time-to-resume",metric_value:this.timeChart.mediaTimeLag}),this.timeChart.mediaSeekedAt&&(this.logg({metric_name:"video-stalledBySeek-time-to-resume",metric_value:this.timeChart.mediaTimeLag}),delete this.timeChart.mediaSeekedAt),delete this.timeChart.mediaTimeLag),this.timeChart.done=!0}}},{key:"logg",value:function(e){var t=this.hls.currentLevel;this.HLSLogger.log(this.HLSLoggerLevel,"hlsPlayerMetrics",h(h(h({},this.statsConstants),e),{},{resolutionPlayed:t}))}}]),e}();t.default=p},function(e,t,i){var n,r;n=[i(2),i(10),i(35),i(7),i(11),i(631),i(140),i(342),i(343),i(344),i(189),i(346),i(327),i(20),i(243),i(138),i(139),i(73),i(115)],void 0===(r=function(e,t,i,n,r,o,a,s,l,u,c,d,h,p){return r=r.default,u=u.default,p=p.default,i.View.extend({template:o,initialize:function(i){i=t.extend({},n.getQueryParams(),i),this.id=i.id,this.src=i.src,this.parallelURLs=i.parallelURLs,this.type=null!=i.type?i.type:"url",this.title=i.title,this.controls=null==i.controls||parseBoolean(i.controls),this.loop=null!=i.loop&&parseBoolean(i.loop),this.initial=i.initial||!1,this.isPrivacy=i.isPrivacy||!1,this.statId=i.statId,this.audioSrc=i.audioSrc,this.isDelivery=null!=i.isDelivery&&i.isDelivery,this.analytics=null!=i.analytics&&i.analytics,this.userId=i.userId,this.primaryVideoLayout=i.primaryVideoLayout,this.secondaryVideoLayout=i.secondaryVideoLayout,this.showLogo=null==i.showLogo||i.showLogo,this.trimStart=i.trimStart?i.trimStart:0,this.trimEnd=i.trimEnd?i.trimEnd:0,this.duration=i.duration?i.duration:0,this.assetId=i.assetId,this.customlogo=i.customlogo,this.thumbnail=i.thumbnail,this.quickPreview=i.quickPreview,this.previewVideo=i.previewVideo,this.isMirrorWebCam=null==i.isMirrorWebCam||i.isMirrorWebCam,this.playAudio=null==i.playAudio||i.playAudio,this.playVideo=null==i.playVideo||i.playVideo,this.qualityControl=null==i.qualityControl||i.qualityControl,this.fullscreen=null!=i.fullscreen&&i.fullscreen,this.audioControl=null!=i.audioControl?i.audioControl:this.playAudio,this.fullscreenControl=null==i.fullscreenControl||i.fullscreenControl,this.simpleEditMode=null!=i.simpleEditMode&&i.simpleEditMode,this.showSpeedSettings=null!=i.showSpeedSettings&&i.showSpeedSettings,this.authorState=i.authorState,this.isError=i.isError,this.previousVolume=100,this.onPlayHandler=i.onPlayHandler?[i.onPlayHandler]:[],this.onPauseHandler=i.onPauseHandler?[i.onPauseHandler]:[],this.onSeekedHandler=i.onSeekedHandler,this.onSeekedHandlers=i.onSeekedHandlers?[i.onSeekedHandlers]:[],this.onSeekindHandler=i.onSeekindHandler,this.onLoadHandler=i.onLoadHandler,this.onProgressHandler=i.onProgressHandler,this.onDataLoadHandler=i.onDataLoadHandler,this.updateHandler=i.updateHandler,this.canplayHandler=i.canplayHandler,this.onComputedDurationHander=i.onComputedDurationHander,this.onEndHandler=i.onEndHandler?[i.onEndHandler]:[],this.onReplayHandlers=i.onReplayHandlers?[i.onReplayHandlers]:[],this.privacySetting=null!=i.privacy&&i.privacy,this.token=null!=i.token&&i.token,this.downloadVideo=i.downloadVideo,this.allowDownload=null!=i.allowDownload&&i.allowDownload,this.showComments=i.showComments,this.showReactions=i.showReactions,this.canShowDeliveryDownload=null!=i.deliveryDownload&&i.deliveryDownload,this.commentsCallbackHandler=i.commentsCallbackHandler||function(){},this.reactionsCallbackHandler=i.reactionsCallbackHandler||function(){},this.playerLogo=i.playerLogo,this.canShowAboutUs=i.canShowAboutUs,this.canPlayerLogoView=i.canPlayerLogoView,this.addLinkToPlayerLogo=i.addLinkToPlayerLogo,this.playerLogoLink=i.playerLogoLink,this.isImageMode=i.isImageMode||!1,this.showSetFrame=i.showSetFrame&&!i.isImageMode||!1,this.playerTheme=null!=i.playerTheme&&i.playerTheme,this.subtitlesEnabled=i.subtitlesEnabled||!1,this.subtitles=i.subtitleUrl,this.showHoverActions=void 0===i.showHoverActions||i.showHoverActions,this.customColors=i.customColors,this.allowKeyboardShortcuts=i.allowKeyboardShortcuts||!1,this.saveThisFrameAsThumbnail=function(){},this.isMobilePlayer=r.isMobileBrowser(),this.isIphone=null!=navigator.userAgent.match(/iPhone|iPad|iPod/i),this.autoPlayVideo=!!i.autoPlayVideo&&!this.isImageMode;var o=n.getBrowserName().toLowerCase();this.isMutedAutoPlay=this.autoPlayVideo&&("chrome"===o||"safari"===o||"firefox"===o),this.canShowPlayerLoading="ie"!==o,this.showPersonalisedVideoLoading=i.showPersonalisedVideoLoading||!1,this.personalisedVideoDetailsSet=!1,this.isLandingPageVideo=i.isLandingPageVideo||!1,this.domainName=i.domain||!1,this.subtitlesFromServer=!1,this.isContainsAudio=null==i.isContainsAudio||i.isContainsAudio,this.iosInBrowserFullScreen=null!=i.iosInBrowserFullScreen&&i.iosInBrowserFullScreen,i.forceAutoPlay&&(this.isMutedAutoPlay=!1),o=["Firefox","IE"],e.inArray(n.getBrowserName(),o)>=0&&(this.subtitlesFromServer=!0),this.customPlayIcon=i.customPlayIcon,this.playerState="initial",this.durationComputed=!1,this.allowPlay=!0,this.isCTAWaitingMode=!1,this._primaryVideoPlaying=!1,this._secondaryVideoPlaying=!1,this.isWating=!1,this.progressSlided=this.progressSlided.bind(this),this.volumeChanged=this.volumeChanged.bind(this),this._handleTimeupdate=this._handleTimeupdate.bind(this),this._handlePlay=this._handlePlay.bind(this),this._handlePause=this._handlePause.bind(this),this._handleProgress=this._handleProgress.bind(this),this._handlePlayerClick=this._handlePlayerClick.bind(this),this._handlePlayPauseBtnClick=this._handlePlayPauseBtnClick.bind(this),this._handleForwardBtnClick=this._handleForwardBtnClick.bind(this),this._handleRewindBtnClick=this._handleRewindBtnClick.bind(this),this._handleAudioBtnClick=this._handleAudioBtnClick.bind(this),this._handleFullscreenBtnClick=this._handleFullscreenBtnClick.bind(this),this._handleWaiting=this._handleWaiting.bind(this),this._handleResume=this._handleResume.bind(this),this._handleCanplay=this._handleCanplay.bind(this),this._handleHover=this._handleHover.bind(this),this._resolveHoverEvent=this._resolveHoverEvent.bind(this),this._handleEnded=this._handleEnded.bind(this),this._handleSeeked=this._handleSeeked.bind(this),this._handleSeeking=this._handleSeeking.bind(this),this._handleMetadataLoad=this._handleMetadataLoad.bind(this),this._handleDataLoad=this._handleDataLoad.bind(this),this._handleProgressBtnHover=this._handleProgressBtnHover.bind(this),this._handleProgressBtnLeave=this._handleProgressBtnLeave.bind(this),this._handleFullscreenChange=this._handleFullscreenChange.bind(this),this.resetPlayer=this.resetPlayer.bind(this),this.downloadVideoClick=this.downloadVideoClick.bind(this),this._handleCanvasMouseAction=this._handleCanvasMouseAction.bind(this),this.drawImageForPreview=this.drawImageForPreview.bind(this),this.seekAndChooseThumb=this.seekAndChooseThumb.bind(this),this.seekAndUpdateThumb=this.seekAndUpdateThumb.bind(this),this.toggleSubtitles=this.toggleSubtitles.bind(this),this._handleMutedAutoplayAudioClick=this._handleMutedAutoplayAudioClick.bind(this),this.getBandwidthConsumed=this.getBandwidthConsumed.bind(this),this.setStatId=this.setStatId.bind(this),this.getStatId=this.getStatId.bind(this),this.segmented=i.segmented,this.auth_params=i.auth_params||{},this.cueChanged=this.cueChanged.bind(this),this.deliveryDownload=this.deliveryDownload.bind(this),this.settingControl=this.qualityControl||this.showSpeedSettings||this.subtitlesEnabled,this.playing=!1,this.controlsEnabled=!0,this.clipboard=void 0,this.alive=!0},render:function(){if(this.$el.html(this.template(t.extend(s,{id:this.id,type:this.type,title:this.title,initial:this.initial,isPrivacy:this.isPrivacy,settingControl:this.settingControl,audioControl:this.audioControl,qualityControl:this.qualityControl,fullscreenControl:this.fullscreenControl,showLogo:this.showLogo,customlogo:this.customlogo,thumbnail:this.thumbnail,quickPreview:this.quickPreview,previewVideo:this.previewVideo,privacy:this.privacySetting,downloadVideo:this.downloadVideo,allowDownload:this.allowDownload,showComments:this.showComments,showSetFrame:this.showSetFrame,showReactions:this.showReactions,canShowDeliveryDownload:this.canShowDeliveryDownload,isImageMode:this.isImageMode,playerLogo:this.playerLogo,isMutedAutoPlay:this.isMutedAutoPlay,canPlayerLogoView:this.canPlayerLogoView,addLinkToPlayerLogo:this.addLinkToPlayerLogo,playerLogoLink:this.playerLogoLink,playerTheme:this.playerTheme,subtitlesEnabled:this.subtitlesEnabled,subtitles:this.subtitles,showHoverActions:this.showHoverActions,showSpeedSettings:this.showSpeedSettings,isLandingPageVideo:this.isLandingPageVideo,token:this.token,domain:window.location.protocol+"//"+window.location.hostname,subtitlesFromServer:this.subtitlesFromServer,isMobilePlayer:this.isMobilePlayer,isContainsAudio:this.isContainsAudio,controls:this.controls,loop:this.loop}))),this.renderState=!0,this.setElement(e("#"+this.id)),this.initial)return this.$el.height(9*this.$el.width()/16),void this.applyCustomColors();this.initializePlayer(),this.initializeNewPlayer(),this._delegateViewEvents(),this.setMediaSource(),this.initializePlayerJS(),-1!=["m3u8","mpd"].indexOf(this.type)&&this.initializeAdapter(),this.initializeCSS(),this.applyCustomColors(),this.applyCustomPlayIcon(),n.toggleWebcamForMirrorVideo(this.isMirrorWebCam,null!=this.audioSrc&&""!=this.audioSrc?this.$el.find(".secondary-video"):this.$el.find("#primary-video"));var i=window.location.href,r="";i.includes("/page/")&&!i.includes("/page/thumbnail/")?r=(r=i.replace("/page/","/page/thumbnail/")).includes("?")?r+"&is_play_time=true":r+"?is_play_time=true":i.includes("/play/")&&!i.includes("/thumbnail/")?r=(r=i.replace("/play/","/thumbnail/")).includes("?")?r+"&is_play_time=true":r+"?is_play_time=true":i.includes("/embed/")&&!i.includes("/thumbnail/")&&(r=i.replace("/embed/","/thumbnail/"),i=i.replace("/embed/","/play/"),this.$el.find(".hv-rclick-copy").hide()),this.copyWithThumbnail(i,r),this._handleVideoPreview()},update:function(t){var i=this;if(this.auth_params){var n=t.auth_params||{};for(var r in n)this.auth_params[r]=n[r]}else this.auth_params=t.auth_params||{};Object.keys(t).forEach((function(e){null!=t[e]&&(i[e]=t[e])})),t.showPersonalisedVideoLoading&&this.$el.find("#personalisedVideoLoading").show(),t.previewVideo?(this.$el.find(".play-btn-container video").attr("src",t.previewVideo),this._handleVideoPreview()):t.thumbnail&&this.$el.find("#playerThumbnail").attr("src",t.thumbnail),e("#qualityConrols")[this.qualityControl?"show":"hide"](),this.settingControl=this.qualityControl||this.showSpeedSettings||this.subtitlesEnabled,e(".settings-container")[this.settingControl?"show":"hide"](),this.hideSettingControlsIfPossible(),this.setMediaSource(),-1!=["m3u8","mpd"].indexOf(this.type)&&this.initializeAdapter()},_handlePlayPauseForNewPlayer:function(){for(var t=this,i=t.$el.find(".final-plybtn-click"),n=0;n<i.length;n++)i[n]&&r(i[n]);function r(i){e(i).children(".solidply")[t.playing?"addClass":"removeClass"]("solidpause"),e(i).children(".playbutton")[t.playing?"addClass":"removeClass"]("paused"),e(i).children(".playbutton").hasClass("paused")?e(i).find(".playthreepath").attr("d","M16,23 L16,1 L1,1 L1,23 L16,23 Z"):e(i).find(".playthreepath").attr("d","M1,1.618034 L1,1.618034 L21.763932,12 L1,22.381966 L1,12 Z"),e(i).children(".solidply").hasClass("solidpause")?(e(i).find(".solidply1").attr("d","M1,1 L1,1 1,5 16,5 16,1 Z"),e(i).find(".solidply2").attr("d","M1,11 L1,11 1,15 16,15 16,11 Z")):(e(i).find(".solidply1").attr("d","M1,1 L1,1 1,11 16,11 16,11 Z"),e(i).find(".solidply2").attr("d","M1,11 L1,11 1,22 16,11 16,11 Z"))}},initializeNewPlayer:function(){var t=this;function i(){var e=t.$el.find(".video-container"),i=8.21*(e.outerWidth()/16);e.css({height:i})}t.$el.find(".playbtn-container").click((function(e){t.showPlayerControls(),t._handlePlayPauseBtnClick(e)})),t.$el.find(".main-plyBtn").click((function(e){t.showPlayerControls(),t._handlePlayPauseBtnClick(e)})),i(),e(window).on("resize",(function(){i()})),e(".settingsbtn-container").click((function(){e(this).parent(".settings-container").toggleClass("opened")})),this.simpleEditMode||e(".player-touch-guard").addClass("disp-none"),this.fullscreenControl&&this.audioControl?(e(".player-controls-wrapper").removeClass("hide-one-ctrl"),e(".notification-line-onplay").removeClass("hide-one-ctrl"),e(".hp-indicator").removeClass("hide-one-ctrl")):(e(".player-controls-wrapper").addClass("hide-one-ctrl"),e(".notification-line-onplay").addClass("hide-one-ctrl"),e(".hp-indicator").addClass("hide-one-ctrl")),this.canPlayerLogoView||(e(".player-controls-wrapper").addClass("hide-logo"),e(".notification-line-onplay").addClass("hide-logo"),e(".hp-indicator").addClass("hide-logo")),this.hideSettingControlsIfPossible(),this.fullscreenControl||this.canPlayerLogoView||this.settingControl||this.audioControl&&(e(".player-controls-wrapper").addClass("only-vol-ctrl"),e(".notification-line-onplay").addClass("only-vol-ctrl"),e(".hp-indicator").removeClass("only-vol-ctrl")),this.$el.find(".player-controls-wrapper .duration-container").on("mousemove click mouseleave",(function(e){if("mouseleave"==e.type)return t.$el.find(".player-controls-wrapper .buffer-container").css("width","0%"),void t._handleProgressBtnLeave(e);var i=this.getRelativeMouseCoordinates(e),n=this.getBoundingClientRect(),r=Math.floor(i.x/Math.ceil(n.width)*100);if(t.$el.hasClass("player-rot90")&&(r=Math.floor(e.offsetX/Math.ceil(n.height)*100)),"click"==e.type)t._setProgressSliderValue(r);else{t.$el.find(".player-controls-wrapper .buffer-container").css("width",r+"%");var o=i.x-Math.min(80,2*r);t.$el.hasClass("player-rot90")&&(o=e.offsetX-Math.min(80,2*r)),r>=0&&!t.isMobilePlayer&&t.quickPreview&&o&&"ended"!=t.playerState&&t._handleProgressBtnHover(e,{x:o,percent:r/100})}}))},hideSettingControlsIfPossible:function(){this.settingControl||(e(".player-controls-wrapper").hasClass("hide-one-ctrl")||e(".player-controls-wrapper").hasClass("hide-logo")?(e(".player-controls-wrapper").removeClass("hide-one-ctrl"),e(".notification-line-onplay").removeClass("hide-one-ctrl"),e(".hp-indicator").removeClass("hide-one-ctrl"),e(".player-controls-wrapper").addClass("hide-two-ctrl"),e(".notification-line-onplay").addClass("hide-two-ctrl"),e(".hp-indicator").addClass("hide-two-ctrl")):(e(".notification-line-onplay").addClass("hide-one-ctrl"),e(".player-controls-wrapper").addClass("hide-one-ctrl"),e(".hp-indicator").addClass("hide-one-ctrl")))},_setNewPlayerProgress:function(e){"initial"!=this.playerState&&this.$el.find(".current-time-container").css("width",e+"%")},_handleVideoPreview:function(){try{if(this.previewVideo){var e=this.$el.find("#preview-video-player")[0];e.volume=0,e.muted=!0,e.play()}}catch(e){}},sendToFront:function(e){this.resizePlayerForWindow(),e||this._handlePlayPauseBtnClick()},_setNewPlayerTimestamp:function(e){var t=e.split("/"),i=t[0],n=t[1];this.$el.find(".end-time").html(i+" / "+n),this.$el.find(".buffer-container").addClass("completed")},setMediaSource:function(){if(this.$el.find("#gifImage").attr("src",this.src),this.$el.find("#primary-video source").attr("src",this.src),this.$el.find(".hidden-video source").attr("src",this.src),this.$el.find(".secondary-video source").attr("src",this.audioSrc),this.$el.find("#primary-video").length>0&&this.src&&-1==this.src.indexOf("fetch_video_stream")&&this.$el.find("#primary-video")[0].load(),this.$el.find(".secondary-video").length>0&&this.$el.find(".secondary-video")[0].load(),this.parallelURLs){e(".parallel-video").remove();for(var t=1;t<=this.parallelURLs.length;t++)this.$el.find(".parallel-video-container").append('<video class="parallel-video parallel-videos-'+t+'" crossorigin="anonymous" preload="auto" playsinline><source crossorigin="anonymous" src="'+this.parallelURLs[t-1]+'">'),this.$el.find(".parallel-videos-"+t)[0].load(),this.setMediaPlayerEvents(this.$el.find(".parallel-videos-"+t)[0])}},initializePlayer:function(){var t=this;this.mediaPlayer=this.$el.find(".primary-video")[0],this.customAudioPlayer=this.$el.find(".secondary-video")[0],this.mediaPlayer.controls=!1,this.$el.find(".volume-slider").slider({range:"min",orientation:"vertical",min:0,max:100,value:100,change:function(e,i){t.volumeChanged(e)},slide:function(e,i){t.volumeChanged(e)}});this.quickPreview&&(this.quickPreviewImg=document.createElement("img"),this.quickPreviewImg.setAttribute("src",this.quickPreview),this.quickPreviewCanvas=this.$el.find(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d")),this.showSetFrame?e(".thumbnail-wrap").show():e(".thumbnail-wrap").hide(),this.setSimpleEditMode(this.simpleEditMode),this.allowKeyboardShortcuts&&e(window).on("keydown",(function(i){if("TEXTAREA"!==i.target.nodeName&&"INPUT"!==i.target.nodeName&&"button"!==i.target.type&&t.alive){var n=i.key,r=i.keyCode;" "===n||"Spacebar"===n||32===r?(t._handlePlayPauseBtnClick(),t.setPlayerControlsTimeout(3e3)):"ArrowRight"===n||"Right"===n||39===r?t._handleForwardBtnClick():"ArrowLeft"===n||"Left"===n||37===r?t._handleRewindBtnClick():"f"!==n&&70!==r||e(".screensize-container").click()}})),this.$el.find(".video-speed-btn .player-speed-label").on("click",(function(){t.$el.find(".video-speed-btn .quality-container").slideToggle("fast"),t.$el.find("#videoQualityBtn .quality-container").slideUp("fast")})),this.$el.find(".settings-options-wrapper #speedControl li").on("click",(function(i){var n=e(i.currentTarget).attr("data-id");t.presetPlayerControls(),t.$el.find("#primary-video")[0].playbackRate=parseFloat(n),t.$el.find("#speedControl li").removeClass("selected"),e(this).addClass("selected"),t.$el.find(".settings-options-wrapper #speedInfo").html(n+"X - Speed")})),this.$el.find("#subtitlesTrack").css("bottom","55px")},initializePlayerJS:function(){var e=this;this.playerJSReceiver=new l.Receiver,this.playerJSReceiver.on("play",(function(){e.play()})),this.playerJSReceiver.on("pause",(function(){e.pause()})),this.playerJSReceiver.on("getPaused",(function(t){t(!e.playing)})),this.playerJSReceiver.on("mute",(function(){e.mute()})),this.playerJSReceiver.on("unmute",(function(){e.unmute()})),this.playerJSReceiver.on("getMuted",(function(t){t(0==e.getVolume())})),this.playerJSReceiver.on("setVolume",(function(t){e.setVolume(t)})),this.playerJSReceiver.on("getVolume",(function(t){t(e.getVolume())})),this.playerJSReceiver.on("getDuration",(function(t){t(e.mediaPlayer.duration)})),this.playerJSReceiver.on("setCurrentTime",(function(t){e.mediaPlayer.currentTime=t})),this.playerJSReceiver.on("getCurrentTime",(function(t){t(e.mediaPlayer.currentTime)})),this.playerJSReceiver.on("setLoop",(function(t){e.setLoop(t)})),this.playerJSReceiver.on("getLoop",(function(t){t(e.getLoop())})),this.playerJSReceiver.ready()},initializeDashPlayerJs:function(){this.adapter=dashjs.MediaPlayer().create(),this.adapter.getDebug().setLogToBrowserConsole(!1),this.adapter.setSegmentOverlapToleranceTime(2),this.adapter.setABRStrategy("abrBola"),this.adapter.addABRCustomRule("qualitySwitchRules","DownloadRatioRule",u);var e={type:"PERIODIC",authorizationUrl:HippoVideo.URL.PATH[HippoVideo.URI.Feature.VIDEO_PLAYER.CLOUD_FRONT_AUTHORIZER]+this.token,expiry:HippoVideo.Constants.Video.Expiry,authSettings:this.auth_params,manifestOnly:!this.segmented};this.adapter.initializeWithAuthorization(this.mediaPlayer,this.src,!1,e),this.currentStreamQuality=-1,this.dashPlayerLoaded=!1,window.navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./)||this.adapter.setFastSwitchEnabled(!0)},initializeHLSPlayerJs:function(){var e=this,t={asset_id:this.assetId};this.adapter=new d({enableWorker:!0},{onMediaAttached:function(){e.adapter.loadSource(e.src)},onManifestParser:function(t){e._handleMetadataLoad(t)}},e.auth_params,!0),this.adapter.attachPlayerMetrics({statsJsonSeed:t}),this.adapter.attachMedia(this.mediaPlayer)},initializeAdapter:function(){this["mpd"==this.type?"initializeDashPlayerJs":"initializeHLSPlayerJs"]()},initializeCSS:function(){this.renderState=!0,null==this.audioSrc&&this.$el.find(".secondary-video-container").hide(),0==this.showLogo&&this.$el.find(".player-logo").hide();var t=this;e(window).on("resize",(function(i){e(i.target).hasClass("ui-resizable")||t.resizePlayerForWindow()})),this.isError?(this.$el.find(".error-reason").html(this.getFaqOneLiner()+this.getFaqLink()),this.$el.find(".error-overlay").css("background-image","url(/img/tv-noise.gif)").show()):this.$el.find(".error-overlay").hide(),this.resizePlayerForWindow(),this.$el.find("video").css("height","100%"),this.primaryVideoLayout&&(null!=this.primaryVideoLayout.width&&this.$el.find(".primary-video-container").css("width",this.getValueForPlayerInitial(this.primaryVideoLayout.width,!0)+"px"),null!=this.primaryVideoLayout.height&&this.$el.find(".primary-video-container").css("height",this.getValueForPlayerInitial(this.primaryVideoLayout.height,!1)+"px"),null!=this.primaryVideoLayout.x&&this.$el.find(".primary-video-container").css("left",this.getValueForPlayerInitial(this.primaryVideoLayout.x,!0)+"px"),null!=this.primaryVideoLayout.y&&this.$el.find(".primary-video-container").css("top",this.getValueForPlayerInitial(this.primaryVideoLayout.y,!1)+"px")),this.secondaryVideoLayout&&(null!=this.secondaryVideoLayout.width&&this.$el.find(".secondary-video-container").css("width",this.getValueForPlayerInitial(this.secondaryVideoLayout.width,!0)+"px"),null!=this.secondaryVideoLayout.height&&this.$el.find(".secondary-video-container").css("height",this.getValueForPlayerInitial(this.secondaryVideoLayout.height,!1)+"px"),null!=this.secondaryVideoLayout.x&&this.$el.find(".secondary-video-container").css("left",this.getValueForPlayerInitial(this.secondaryVideoLayout.x,!0)+"px"),null!=this.secondaryVideoLayout.y&&this.$el.find(".secondary-video-container").css("top",this.getValueForPlayerInitial(this.secondaryVideoLayout.y,!1)+"px"));var i=e(".primary-video-container").width(),n=e(".primary-video-container").height();e(".access-denied-pop").width(i),e(".access-denied-pop").height(n),e(".password-pop").width(i),e(".password-pop").height(n),this.resizeFitThumnbail(),this.initializePlayerForMobile(),this.handleFwdBckBtn()},resizeFitThumnbail:function(){var e=this,t=new Image,i=this.isImageMode?"#gifImage":"#playerThumbnail";t.onload=function(t){var n=t.target.naturalWidth,o=t.target.naturalHeight,a=r.resizeImageToFit(n,o,e.$el.width(),e.$el.height()),s=r.getCoordinatesForResizedImage(a.width,a.height,e.$el.width(),e.$el.height());e.$el.find(i).css({width:a.width,height:a.height,top:s.yPos,left:s.xPos})},this.isImageMode?t.src=this.src:this.thumbnail&&(t.src=this.thumbnail)},resizeFitRenderless:function(){var e=this.$el.width(),t=this.$el.height();if(e&&t){var i=0,n=0;e/t>16/9?(e=16*t/9,i=(this.$el.width()-e)/2):(t=9*e/16,n=(this.$el.height()-t)/2),this.$el.find(".renderless-overlay").css({width:e+"px",height:t+"px",left:i+"px",top:n+"px"})}},initializePlayerForMobile:function(){this.isMobilePlayer},toggleSubtitlesEvent:function(e){this.$el.find("#subtitlesTrack").is(":visible")&&!e?(this.$el.find("#subtitlesTrack").hide(),this.toggleSubtitles(!1)):(this.toggleSubtitles(!0),this.$el.find("#subtitlesTrack").show()),this.presetPlayerControls()},toggleSubtitles:function(e){this.$el.find("#subtitleWrapper li").removeClass("selected"),this.$el.find('#subtitleWrapper li[data-value="'+(e?"on":"off")+'"]').addClass("selected")},_setProgressSliderValue:function(e){var t=this.$el.find(".current-time-container");t&&t.css("width",e+"%"),this.progressSlided(e)},volumeChanged:function(t){var i=this.getVolume(),n=e(".volumebtn");i>=60?(e(n).addClass("volumeon volume60"),e(n).removeClass("muted volume30")):i>=30?(e(n).addClass("volumeon volume30"),e(n).removeClass("muted volume60")):i>0?(e(n).addClass("volumeon"),e(n).removeClass("muted volume60 volume30")):0==i&&(e(n).addClass("muted"),e(n).removeClass("volumeon volume30 volume60")),this.mediaPlayer.volume=i/100},progressSlided:function(e){e=this.map(e,0,100,this.trimStart,this.mediaPlayer.duration-this.trimEnd);this.goToTime(e)},goToTime:function(e){this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=this.mediaPlayer.currentTime,this.$el.find(".replay-btn-container").hide()},show:function(){this.renderState?this.$el.show():(this.undelegateEvents(),this.render())},hide:function(){this.renderState&&this.$el.hide()},destroy:function(){this.alive=!1,this.undelegateEvents(),this.$el.removeData().unbind(),e(window).unbind("beforeunload",!1),this.remove(),i.View.prototype.remove.call(this),this.clipboard&&this.clipboard.destroy();try{this.adapter&&this.adapter.destroy&&this.adapter.destroy()}catch(e){}},handleFwdBckBtn:function(){"initial"==this.playerState&&(this.$el.find(".forwardbtn").addClass("disp-none"),this.$el.find(".backwardbtn").addClass("disp-none"))},handleMainPlayPause:function(){this.$el.find(".main-play-pause").click()},_delegateViewEvents:function(){var t=this;this.$el.dblclick((function(){e(".screensize-container").click()})),this.$el.find(".player-controls-container").dblclick((function(e){e.stopPropagation(),e.preventDefault()})),this.$el.find(".main-play-pause").click((function(i){if(i.stopPropagation(),i.preventDefault(),t.isMobilePlayer){if(t.isMobilePlayer){if(!t.controlsEnabled)return void t.showPlayerControls();t.showPlayerControls(),t._handlePlayPauseBtnClick(i)}}else t.showPlayerControls(),t._handlePlayPauseBtnClick(i);e(".hv-rclick-options").hasClass("hide")||e(".hv-rclick-options").addClass("hide")})),this.$el.find(".main-play-pause").mousedown((function(e){switch(e.which){case 3:e.target.addEventListener("contextmenu",(function(e){e.preventDefault()}));var i=e.target,n=e.target.nextSibling;t.showRightClickOption(i,n)}})),this.$el.find(".hv-rclick-about").click((function(t){e(".hv-rclick-options").addClass("hide"),window.open("https://www.hippovideo.io?utm_source=rightclick&utm_medium=player&utm_campaign=branding","_blank")})),this.$el.find(".main-controls").dblclick((function(e){e.stopPropagation(),e.preventDefault()})),this.delegate("webkitfullscreenchange mozfullscreenchange fullscreenchange",this._handleFullscreenChange),this.delegate("mouseenter mouseleave mousemove",this._handleHover),this.delegate("mouseenter mouseleave mousemove",".player-controls-wrapper",this._resolveHoverEvent),this.delegate("contextmenu","video",this._handleMenu),this.delegate("click",".replay-btn-container",this._handlePlayerClick),this.delegate("click",".volumebtn",this._handleAudioBtnClick),this.delegate("click",".screensize-container",this._handleFullscreenBtnClick),this.delegate("click",".player-download-icon",this.downloadVideoClick),this.delegate("click",".hv-player-download",this.deliveryDownload),this.delegate("click","#addCommentFromCanvas",(function(){t.playing&&t._handlePlayPauseForNewPlayer(),t.commentsCallbackHandler&&t.commentsCallbackHandler()})),this.delegate("click",".backwardbtn",this._handleRewindBtnClick),this.delegate("click",".forwardbtn",this._handleForwardBtnClick),this.delegate("click",".muted-autoplay",this._handleMutedAutoplayAudioClick),this.delegate("mouseenter mouseleave mousemove","#canvasPreviewContainer",this._handleCanvasMouseAction),e(".set-frame-btn").bind("click",this.seekAndUpdateThumb),e("#subtitles #subtitleWrapper li").bind("click",(function(){t.toggleSubtitlesEvent()})),this.setMediaPlayerEvents(this.mediaPlayer)},setMediaPlayerEvents:function(e){e.addEventListener("timeupdate",this._handleTimeupdate,!1),e.addEventListener("play",this._handlePlay,!1),e.addEventListener("pause",this._handlePause,!1),e.addEventListener("progress",this._handleProgress,!1),e.addEventListener("waiting",this._handleWaiting,!1),e.addEventListener("playing",this._handleResume,!1),e.addEventListener("canplay",this._handleCanplay,!1),e.addEventListener("seeked",this._handleSeeked,!1),e.addEventListener("seeking",this._handleSeeking,!1),e.addEventListener("ended",this._handleEnded,!1),e.addEventListener("loadedmetadata",this._handleMetadataLoad,!1),e.addEventListener("loadeddata",this._handleDataLoad,!1)},disableSubtitle:function(){document.getElementById("primary-video").textTracks[0].mode="hidden"},_handleMetadataLoad:function(){var t=this;if(this.adapterLoaded||-1==["m3u8","mpd"].indexOf(this.type))"mpd"==this.type?(this.adapter.setAutoSwitchQualityFor("video",!1),this.adapter.setQualityFor("video",this.currentStreamQuality),this.mediaPlayer.currentTime=this.dashQualitySwitchTime):this.settingControl&&(this.settingControl=this.adapterLoaded||this.showSpeedSettings||this.subtitlesEnabled,this.settingControl||e(".settings-container").hide(),this.hideSettingControlsIfPossible());else{this.adapterLoaded=!0;var i=this.adapter["mpd"==this.type?"getBitrateInfoListFor":"getLevels"]("mpd"==this.type?"video":"");i.sort((function(e,t){return e.height>t.height?1:t.height>e.height?-1:0}));for(var r,o,a=this.$el.find(".settings-options-wrapper #qualityControlWrapper"),l=[],u=i.length-1;u>=0;u--){switch(o=i[u].height,!0){case o>144&&o<=240:r="240";break;case o>240&&o<=360:r="360";break;case o>360&&o<=480:r="480";break;case o>480&&o<=720:r="720";break;case o>720&&o<=1080:r="1080";break;case o>1080&&o<=2159:r="2K";break;case o>=2160&&o<=4319:r="4K";break;case o>=4320:r="8K"}l[u]=r,a.append('<li data-id="'+u+'"><i></i><a>'+r+"</a></li>")}var c="high"==n.getQueryParams().quality;if(c){var d=i.length-1;t.$el.find(".settings-options-wrapper #qualityControlWrapper li").removeClass("selected"),t.$el.find('.settings-options-wrapper #qualityControlWrapper li[data-id="'+d+'"]').addClass("selected"),t.$el.find(".settings-options-wrapper #qualityinfo").html(l[d]),"mpd"==this.type?(this.adapter.setAutoSwitchQualityFor("video",!1),this.adapter.setQualityFor("video",d)):this.adapter.setRepresentation(i.length-1)}l.length>0?c?a.append('<li data-id="-1"><i></i><a>'+s.wizPlayer.auto+"</a></li>"):(a.append('<li class="selected" data-id="-1"><i></i><a>'+s.wizPlayer.auto+"</a></li>"),t.$el.find(".settings-options-wrapper #qualityinfo").html(s.wizPlayer.auto)):this.settingControl&&(this.settingControl=this.showSpeedSettings||this.subtitlesEnabled,this.settingControl||e(".settings-container").hide(),this.hideSettingControlsIfPossible()),this.$el.find(".settings-options-wrapper #qualityControlWrapper li").on("click",(function(i){var n=e(i.currentTarget).attr("data-id");t.$el.find(".settings-options-wrapper #qualityControlWrapper li").removeClass("selected"),e(this).addClass("selected"),"-1"==n?(t.$el.find(".settings-options-wrapper #qualityinfo").html(s.wizPlayer.auto),"mpd"==this.type?t.adapter.setAutoSwitchQualityFor("video",!0):t.adapter.setRepresentation(-1)):(t.$el.find(".settings-options-wrapper #qualityinfo").html(l[n]),"mpd"==this.type?parseInt(n)>~~t.currentStreamQuality&&(t.dashQualitySwitchTime=t.mediaPlayer.currentTime,t.adapter.reset(),t.adapter.attachSource(t.src),t.adapter.attachView(t.mediaPlayer),t._handleWaiting()):t.adapter.setRepresentation(Number(n))),t.currentStreamQuality=~~n,t.presetPlayerControls()}))}this.subtitlesEnabled?(document.getElementsByTagName("track")[0].addEventListener("cuechange",this.cueChanged),this.toggleSubtitlesEvent(this.subtitlesEnabled)):this.toggleSubtitles(!1);this.autoPlayVideo&&(this.isMutedAutoPlay&&(this.isMuted||this.mute(),this.$el.find(".muted-autoplay").removeClass("hide")),this.$el.find(".hv-new-player .controls").hasClass(".hide-controls")?(this.$el.find(".notification-line-onplay").removeClass("emoji-move-top"),this.$el.find(".hv-player-download").addClass("hide-hv-player-download")):(this.$el.find(".notification-line-onplay").addClass("emoji-move-top"),this.$el.find(".hv-player-download").removeClass("hide-hv-player-download")),t.play())},_handleDataLoad:function(){var e=!this.dataLoaded;this.dataLoaded=!0,e&&this.onDataLoadHandler&&this.onDataLoadHandler()},_handleFullscreenChange:function(t){var i=this;this.isFullScreen()?(e(".screensize-container").children(".screensizebtn").addClass("maximized"),this.$el.find(".preview-add-comment").hide()):(e(".screensize-container").children(".screensizebtn").removeClass("maximized"),this.$el.find(".preview-add-comment").show()),this.resizePlayerForWindow(),setTimeout((function(){i.resizePlayerForWindow()}),1e3)},_handleProgressBtnLeave:function(e){clearTimeout(this.hideQuickPreviewTimeout);var t=this;this.hideQuickPreviewTimeout=setTimeout((function(){t.$el.find("#canvasPreviewContainer").fadeOut(200)}),500)},_handleProgressBtnHover:function(t,i){var n=this.$el.find("#canvasPreviewContainer"),r=i.x+42;if(n.css("left",r+"px"),!this.showSetFrame||this.quickPreviewImg&&this.quickPreviewContext){n.is(":visible")||n.fadeIn(),this.showSetFrame&&e(".player-controls-container").show();l=i.percent;if(this.second=l*this.mediaPlayer.duration,isNaN(this.mediaPlayer.duration))return;var o=parseInt(this.second/2),a=parseInt(o/10),s=o%10;this.quickPreviewImg&&this.quickPreviewContext&&(this.quickPreviewContext.drawImage(this.quickPreviewImg,128*s,72*a,128,72,0,0,128,72),this.quickPreviewContext.fillStyle="rgba(0,0,0,0.5)",this.quickPreviewContext.fillRect(47,53,37,18),this.quickPreviewContext.font="9px",this.quickPreviewContext.fillStyle="white",this.quickPreviewContext.fillText(this.strToTime(this.second),55,67)),e("#canvasHoverTime").val(this.second),clearTimeout(this.hideQuickPreviewTimeout),this.hideQuickPreviewTimeout=setTimeout((function(){n.fadeOut(200)}),3e3)}else{n.fadeIn(),e(".player-controls-wrapper").show();var l=i.percent;this.second=l*this.mediaPlayer.duration,isNaN(this.second)&&(this.second=.2);var u=document.getElementsByClassName("hidden-video")[0];u.currentTime=Number(this.second),this.quickPreviewCanvas=this.$el.find(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d"),this.$el.find("#quick-preview-loading").show(),e(this.quickPreviewCanvas).hide(),u.removeEventListener("canplay",this.drawImageForPreview),u.addEventListener("canplay",this.drawImageForPreview)}},drawImageForPreview:function(){this.quickPreviewContext&&this.quickPreviewContext.drawImage(document.getElementsByClassName("hidden-video")[0],0,0,128,72),this.quickPreviewCanvas&&(e(this.quickPreviewCanvas).show(),this.$el.find("#quick-preview-loading").hide())},seekAndChooseThumb:function(t){e(".player-controls-wrapper, .set-frame-btn").show(),e(".player-progress").bind("mousemove",this._handleProgressBtnHover),this.undelegateHoverActions(),this.showPlayerControls();var i=e("#canvasPreviewContainer");i.is(":visible")||i.fadeIn();var n=document.getElementsByClassName("hidden-video")[0];n&&(n.currentTime=Number(.2),this.quickPreviewCanvas=e(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d"),this.$el.find("#quick-preview-loading").show(),e(this.quickPreviewCanvas).hide(),n.removeEventListener("canplay",this.drawImageForPreview),n.addEventListener("canplay",this.drawImageForPreview))},hideSeekAndUpdateThumb:function(){var t=this;this.undelegate("mouseenter mouseleave mousemove",this._handleHover),this.hideQuickPreviewTimeout=setTimeout((function(){t.$el.find("#canvasPreviewContainer").hide()}),500),e(".player-progress").unbind("mousemove mouseleave")},seekAndUpdateThumb:function(){this.hideSeekAndUpdateThumb(),this.saveThisFrameAsThumbnail()},setThumbnailFromFrameCallBack:function(e){this.saveThisFrameAsThumbnail=e},setOnDataLoadHandler:function(e){this.onDataLoadHandler=e,this.dataLoaded&&e()},_handleEnded:function(e){if(this.playing&&this.mediaPlayer.currentTime>=this.mediaPlayer.duration-this.trimEnd&&(this.simpleEditMode||this.$el.find(".replay-btn-container").show(),this.$el.find(".main-controls").fadeOut(),this.playerState="ended",this.playing=!1,this.checkAllowPlay()),this.isIphone&&this.fullscreen&&this.exitFullScreen(),this.playerJSReceiver&&this.playerJSReceiver.emit("ended"),this.onEndHandler.length>0)for(var t=0;t<this.onEndHandler.length;t++)this.onEndHandler[t]();this.setPlayerControlsTimeout(50)},_handleHover:function(e){var t=e.type;this.simpleEditMode||("mouseenter"!==t||this.isMobilePlayer?"mouseleave"===t?(this.showPlayerControls(),this.setPlayerControlsTimeout(500)):"mousemove"!==t||this.isMobilePlayer||(this.showPlayerControls(),this.setPlayerControlsTimeout(1500)):this.showPlayerControls(50))},_resolveHoverEvent:function(e){"mouseleave"===e.type&&this.setPlayerControlsTimeout(500),clearTimeout(this.mouseleaveTimeout)},_isAllowedToShowMainControls:function(){return!(!this.isMobilePlayer&&this.playing)},showPlayerControls:function(){"ended"==this.playerState||this.$el.find(".replay-btn-container").is(":visible")||(this.controlsEnabled=!0,this.$el.find(".notification-line-onplay").addClass("emoji-move-top"),this.$el.find(".player-controls-wrapper").show(),this.$el.find(".player-controls-wrapper").removeClass("hide-controls"),this.$el.find(".hv-player-download").removeClass("hide-hv-player-download"),this.$el.find(".hp-indicator").removeClass("hide-hp-indicator"),this.$el.find(".duration-container-fullscreen").addClass("disp-none"),!this.isWating&&this._isAllowedToShowMainControls()&&this.$el.find(".main-controls").show(),this.$el.find("#subtitlesTrack").css("bottom","55px"),this.setPlayerControlsTimeout(1500))},cueChanged:function(e){this.$el.find("#subtitlesTrack").text("");for(var t=document.getElementById("primary-video").textTracks[0],i="",n=0;n<t.activeCues.length;n++)i+=t.activeCues[n].text;""!=i&&(this.disableSubtitle(),this.$el.find("#subtitlesTrack").html("<span>"+i+"</span>"))},handlePlayerControlHideShow:function(){this.playing||this.$el.find(".replay-btn-container").is(":visible")||this.isCTAWaitingMode?(this.controlsEnabled=!1,this.$el.find(".player-controls-wrapper").addClass("hide-controls"),this.$el.find(".hv-player-download").addClass("hide-hv-player-download"),this.$el.find(".hp-indicator").addClass("hide-hp-indicator"),this.presetPlayerControls(),this.$el.find(".main-controls").hide(),this.$el.find(".duration-container-fullscreen").removeClass("disp-none"),this.$el.find(".notification-line-onplay").removeClass("emoji-move-top"),this.$el.find("#subtitlesTrack").css("bottom","15px")):(this.controlsEnabled=!0,this.$el.find(".duration-container-fullscreen").addClass("disp-none"),this.$el.find(".player-controls-wrapper").removeClass("hide-controls"),this.$el.find(".hv-player-download").removeClass("hide-hv-player-download"),this.$el.find(".hp-indicator").removeClass("hide-hp-indicator"),this._isAllowedToShowMainControls()&&this.$el.find(".main-controls").show(),this.$el.find(".notification-line-onplay").addClass("emoji-move-top"))},setPlayerControlsTimeout:function(e){var t=this;clearTimeout(this.mouseleaveTimeout),this.mouseleaveTimeout=setTimeout((function(){t.simpleEditMode||(t.presetPlayerControls(),t.handlePlayerControlHideShow())}),e)},presetPlayerControls:function(){e(".settings-container").hasClass("opened")&&e(".settingsbtn-container").click()},setPlayerState:function(e){this.playerState=e},showPlayerHoverActions:function(){this.showHoverActions&&"initial"!==this.playerState&&"ended"!==this.playerState&&!this.isCTAWaitingMode&&(this.$el.find(".player-controls-wrapper").show(),this._isAllowedToShowMainControls()&&this.$el.find(".main-controls").show())},_handleMenu:function(e){},_handleWaiting:function(e){if(this.isWating=!0,this.$el.find(".main-controls").hide(),this.showPersonalisedVideoLoading)this.$el.find("#personalisedVideoLoading").show(),this.showHoverActions=!1;else{var t=this;this.waitingTimeout=setTimeout((function(){t.canShowPlayerLoading&&t.$el.find(".player-loading-overlay").show()}),200),this._secondaryVideoPlaying&&this.customAudioPlayer.pause()}},setPersonalisedVideo:function(e){this.$el.find("#primary-video source").attr("src",e.video_url),this.$el.find("#primary-video").length>0&&this.$el.find("#primary-video")[0].load(),this.$el.find(".thumbnail-container img").attr("src",e.thumbnail),this.quickPreview=e.quickpreview,this.personalisedVideoDetailsSet=!0,this.$el.find("#personalisedVideoLoading").fadeOut(),this.pause(),this.show()},_handleResume:function(e){if(this.isWating=!1,clearTimeout(this.waitingTimeout),this.$el.find(".player-loading-overlay").fadeOut(200),this.customAudioPlayer){this.customAudioPlayer.currentTime=this.mediaPlayer.currentTime;var t=this,i=this.customAudioPlayer.play();i?i.then((function(){t._secondaryVideoPlaying=!0})).catch((function(e){t._secondaryVideoPlaying=!1})):t._secondaryVideoPlaying=!0}},_handleCanplay:function(t){clearTimeout(this.waitingTimeout),this.$el.find(".player-loading-overlay").fadeOut(200);var i=this;if(this.playing){var r=this.mediaPlayer.play();r?r.then((function(){i._primaryVideoPlaying=!0})).catch((function(e){console.log(e),i._primaryVideoPlaying=!1})):i._primaryVideoPlaying=!0}this.canplayHandler&&this.canplayHandler(t),browser=["Safari","Edge","IE"];var o=window.navigator.userAgent.toLowerCase(),a=/safari/.test(o),s=/iphone|ipod|ipad/.test(o),l=s&&!a;if((e.inArray(n.getBrowserName(),browser)>=0||l)&&!this.largeValueSet){if(this.mediaPlayer.currentTime=0,this.durationComputed=!0,this.largeValueSet=!0,this.mediaPlayer.duration||(this.mediaPlayer.duration=this.duration),this.onComputedDurationHander){this.onComputedDurationHander();var u=window.location.href.indexOf("video/embed")>-1;this.autoPlayVideo&&u&&this.$el.find(".main-controls").hide()}}else if(this.largeValueSet||isFinite(this.mediaPlayer.duration)){if(!this.durationComputed&&isFinite(this.mediaPlayer.duration)&&(this.mediaPlayer.currentTime=0,this.durationComputed=!0,this.onComputedDurationHander)){this.onComputedDurationHander();u=window.location.href.indexOf("video/embed")>-1;this.autoPlayVideo&&u&&this.$el.find(".main-controls").hide()}}else this.largeValueSet=!0,this.mediaPlayer.currentTime=1e9},_handleSeeked:function(){if(this.onSeekedHandler&&this.onSeekedHandler(),this.onSeekedHandlers)for(var e=0;e<this.onSeekedHandlers.length;e++)this.onSeekedHandlers[e]&&this.onSeekedHandlers[e]()},_handleSeeking:function(){this.seekingStartedAt=this.currentTimeUpdate,this.seekingEndedAt=this.mediaPlayer.currentTime,this.onSeekindHandler&&this.onSeekindHandler()},_handlePlayerClick:function(t){if(!this.simpleEditMode&&!this.isImageMode){if(e(t.currentTarget).hasClass("replay-btn-container")){if(this.$el.find(".replay-btn-container").hide(),this._handlePlayPauseBtnClick(),this.onReplayHandlers)for(var i=0;i<this.onReplayHandlers.length;i++)this.onReplayHandlers[i]&&this.onReplayHandlers[i]()}else this.showHoverActions||this._handlePlayPauseBtnClick();this.previousClick=new Date}},_handlePlay:function(){if(this.$el.find(".thumbnail-container").is(":visible")&&this.$el.find(".thumbnail-container").fadeOut(100),this.simpleEditMode?this.$el.find(".play-pause-button").find("img").attr("src",this.customColors?"/img/simple-edit-pause-icon-dark.png":"/img/simple-edit-pause-icon.png"):this.$el.find(".play-pause-button, .player-play-pause-action").find("img").attr("src","/svg/pause-white.svg"),this.onPlayHandler.length>0)for(var e=0;e<this.onPlayHandler.length;e++)this.onPlayHandler[e]()},_handlePause:function(){if(!this.playing&&(this._secondaryVideoPlaying&&this.customAudioPlayer.pause(),this.simpleEditMode?this.$el.find(".play-pause-button").find("img").attr("src",this.customColors?"/img/simple-edit-play-icon-dark.png":"/img/simple-edit-play-icon.png"):this.$el.find(".play-pause-button, .player-play-pause-action").find("img").attr("src","/svg/play.svg"),this.onPauseHandler.length>0))for(var e=0;e<this.onPauseHandler.length;e++)this.onPauseHandler[e]()},_handleProgress:function(t){if("initial"!=this.playerState)try{var i=this.mediaPlayer.buffered,r=Math.round(i.end(0))/Math.round(this.mediaPlayer.seekable.end(0))*100;r+="%",e(".video-buffered-container").css("width",r)}catch(t){e(".video-buffered-container").css("width","0")}if(this.showPersonalisedVideoLoading&&this.personalisedVideoDetailsSet){var o="Opera"==n.getBrowserName();if(!o){var a=this.mediaPlayer.buffered;if(!a||!a.length)return;var s=a.start(0),l=a.end(a.length-1);o=0==s&&l>3}o&&(this.personalisedVideoDetailsSet=!1,this.$el.find("#personalisedVideoLoading").is(":visible")&&this.play(),this.showHoverActions=!0,this.showPersonalisedVideoLoading=!1,this.$el.find("#personalisedVideoLoading").fadeOut())}this.onProgressHandler&&this.onProgressHandler(t)},_handlePlayPauseBtnClick:function(){this.alive&&(this.$el.find(".replay-btn-container").hide(),this.isMobilePlayer&&(this.$el.find(".forwardbtn").removeClass("disp-none"),this.$el.find(".backwardbtn").removeClass("disp-none")),this.$el.find(".hv-rclick-options").addClass("hide"),this.playing?this.pause():this.play(),this._handlePlayPauseForNewPlayer())},_handleRewindBtnClick:function(){if(!this.isCTAWaitingMode){var e=this.mediaPlayer.currentTime;e=Math.max(e-5,0),this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=e,this.$el.find(".hv-rclick-options").addClass("hide")}},_handleForwardBtnClick:function(){if(!this.isCTAWaitingMode){var e=this.mediaPlayer.currentTime;e!=this.mediaPlayer.duration&&(e=Math.min(e+5,this.mediaPlayer.duration),this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=e,this.$el.find(".hv-rclick-options").addClass("hide"))}},_handleAudioBtnClick:function(){0!=this.getVolume()?this.mute():this.unmute()},_handleMutedAutoplayAudioClick:function(t){this.unmute(),e(t.currentTarget).remove()},_handleFullscreenBtnClick:function(){this.fullscreen?this.exitFullScreen():this.enterFullScreen()},_handleTimeupdate:function(e){var t=this.map(this.mediaPlayer.currentTime,this.trimStart,this.mediaPlayer.duration-this.trimEnd,0,100);if((isNaN(t)||this.mediaPlayer.currentTime<Math.round(100*this.trimStart)/100)&&(this.mediaPlayer.currentTime=Math.round(100*this.trimStart)/100),t>100&&(this._handleEnded(),this.mediaPlayer.currentTime=this.trimStart>=this.mediaPlayer.duration?this.mediaPlayer.duration:this.trimStart,this._primaryVideoPlaying&&this.mediaPlayer.pause()),isFinite(this.mediaPlayer.duration)){this._setNewPlayerProgress(t);var i=this.mediaPlayer.duration,n=this.mediaPlayer.currentTime;isNaN(this.trimStart)||isNaN(this.trimEnd)||(i=i-this.trimStart-this.trimEnd,n-=this.trimStart),i=Math.max(i,0),n=Math.max(n,0),this.$el.find(".player-currenttime").text(this.strToTime(n)+" / "+this.strToTime(i)),this._setNewPlayerTimestamp(this.strToTime(n)+" / "+this.strToTime(i)),this.currentTimeUpdate=n,this.updateHandler&&this.updateHandler(),this.playerJSReceiver&&this.playerJSReceiver.emit("timeupdate",{seconds:n,duration:i})}},mute:function(){this.isMuted=!0,this.previousVolume=this.getVolume(),this.setVolume(0),this.mediaPlayer.muted=!0,this.customAudioPlayer&&(this.customAudioPlayer.muted=!0)},unmute:function(){this.isMuted=!1,this.setVolume(this.previousVolume),this.mediaPlayer.muted=!1,this.$el.find(".muted-autoplay").remove(),this.customAudioPlayer&&(this.customAudioPlayer.muted=!1)},setLoop:function(e){this.loop=e},getLoop:function(){return this.loop},setUpdateHandler:function(e){this.updateHandler=e},setPlayPauseHandler:function(e,t){t?this.onPlayHandler.push(e):this.onPauseHandler.push(e)},setEndedHandler:function(e){this.onEndHandler.push(e)},setSeekedHandler:function(e){this.onSeekedHandler=e},addSeekedHandler:function(e){this.onSeekedHandlers.push(e)},setSeekingHandler:function(e){this.onSeekindHandler=e},addReplayHandler:function(e){this.onReplayHandlers.push(e)},setPlayerResizeHandler:function(e){this.playerResizeHandler=e},play:function(){if(this.playing||this.isCTAWaitingMode)this._handlePlayPauseForNewPlayer();else{if("initial"==this.playerState||"ended"==this.playerState)return this.playerState="started",this.$el.find(".play-btn-container").fadeOut(),this.$el.find(".replay-btn-container").fadeOut(),this.$el.find(".play-btn-container video").remove(),void(this.allowPlay?this.play():this.renderWarning(7));var e=this;e.playing=!0;var t=window.location.href.indexOf("video/embed")>-1;this.autoPlayVideo&&t&&this.$el.find(".main-controls").hide();var i=this.mediaPlayer.play();i?i.then((function(){e._primaryVideoPlaying=!0})).catch((function(t){e._primaryVideoPlaying=!1})):e._primaryVideoPlaying=!0,this.playerJSReceiver&&this.playerJSReceiver.emit("play"),this._handlePlayPauseForNewPlayer()}},pause:function(){this.playing?(this.playing=!1,this._primaryVideoPlaying&&this.mediaPlayer.pause(),this.playerJSReceiver&&this.playerJSReceiver.emit("pause"),this._handlePlayPauseForNewPlayer()):this._handlePlayPauseForNewPlayer()},isPlaying:function(){return this.playing},setVolume:function(e){try{this.$el.find(".volume-slider").slider("value",e),this.volumeChanged()}catch(e){}},getVolume:function(){return~~this.$el.find(".volume-slider").slider("value")},isFullScreen:function(){return document.fullScreenElement&&null!==document.fullScreenElement||document.mozFullScreen||document.webkitIsFullScreen},enterFullScreen:function(){var e=screen.msOrientation||screen.orientation||screen.mozOrientation||{};if(!this.fullscreen){if(this.fullscreen=!0,this.iosInBrowserFullScreen&&this.isIphone)return this.$el.find(".thumbnail").css("z-index",-1),void this.resizePlayerForWindow();var t;(t=this.isIphone?document.getElementById("primary-video"):document.getElementById(this.id)).webkitEnterFullScreen?t.webkitEnterFullScreen():t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen();try{r.canForceLandscapeForFullscreen()&&e.lock("landscape")}catch(e){r.postErrorsToLog({error:"Error while trying to force full screen landscape in player",stackTrace:JSON.stringify(e)})}}},exitFullScreen:function(){var e=screen.msOrientation||screen.orientation||screen.mozOrientation||{};if(this.fullscreen)if(this.fullscreen=!1,this.iosInBrowserFullScreen&&this.isIphone){this.$el.find(".thumbnail").css("z-index",""),this.resizePlayerForWindow();var t=this;setTimeout((function(){t.$el.height(9*t.$el.width()/16)}),200)}else{var i=document;this.isIphone&&(i=document.getElementById("primary-video")),i.exitFullscreen?i.exitFullscreen():i.msExitFullscreen?i.msExitFullscreen():i.mozCancelFullScreen?i.mozCancelFullScreen():i.webkitExitFullscreen&&i.webkitExitFullscreen();try{r.canForceLandscapeForFullscreen()&&e.unlock()}catch(e){r.postErrorsToLog({error:"Error while trying to force exit full screen landscape in player",stackTrace:JSON.stringify(e)})}}},strToTime:function(e){var t=parseFloat(e,10),i=Math.floor(t/3600),n=Math.floor((t-3600*i)/60),r=Math.floor(t-3600*i-60*n);return i>0&&n<10&&(n="0"+n),r<10&&(r="0"+r),i>0?i+":"+n+":"+r:n+":"+r},trim:function(e,t,i){if(this.trimStart!=e||this.trimEnd!=t)try{this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=e}catch(e){}if(this.trimStart=e,this.trimEnd=t,i&&("initial"==this.playerState||"ended"==this.playerState))return this.playerState="started",void this.$el.find(".replay-btn-container").fadeOut(100)},map:function(e,t,i,n,r){return(e-t)*(r-n)/(i-t)+n},setSimpleEditMode:function(e){this.simpleEditMode=e,this.simpleEditMode?(this.$el.animate({"margin-bottom":"0px"},200),this.$el.find(".player-controls-wrapper").addClass("player-controls-outside"),this.$el.find(".player-controls-wrapper").removeClass("player-controls-inside"),this.$el.find(".player-controls-wrapper").fadeIn(),this.$el.find(".play-pause-button").find("img").attr("src",this.customColors?"/img/simple-edit-play-icon-dark.png":"/img/simple-edit-play-icon.png"),this.$el.find(".player-download, .for-reactions").hide(),this.$el.find(".notification-line-onplay").hide()):(this.$el.animate({"margin-bottom":"0px"},200),this.$el.find(".player-controls-wrapper").removeClass("player-controls-outside"),this.$el.find(".player-controls-wrapper").addClass("player-controls-inside"),this.$el.find(".play-pause-button").find("img").attr("src","/svg/play.svg"),this.$el.find(".player-download, .for-reactions").show(),this.$el.find(".notification-line-onplay").show())},setCTAWaitingMode:function(e){this.isCTAWaitingMode=e,e&&(this.$el.find(".main-controls").fadeOut(),this.$el.find("#hvRclickOptions").addClass("hide"))},setStatId:function(e){this.statId=e},getStatId:function(){return this.statId},resizePlayerForWindow:function(){var e=screen.msOrientation||(screen.orientation||screen.mozOrientation||{}).type;if(this.iosInBrowserFullScreen&&this.isIphone)if(this.fullscreen){if(window.innerWidth<window.innerHeight){this.$el.addClass("player-rot90"),this.$el.parent().addClass("player-rot90-container");var t=window.innerWidth,i=window.innerHeight;this.$el.height(t),this.$el.width(i)}else this.$el.removeClass("player-rot90"),this.$el.parent().removeClass("player-rot90-container"),this.$el.height(window.innerHeight),this.$el.width(window.innerWidth);this.$el.addClass("player-inbrowser-fullscreen"),this.$el.parent().addClass("player-container-fullscreen")}else this.$el.removeClass("player-rot90 player-inbrowser-fullscreen"),this.$el.width("100%"),this.$el.height(9*this.$el.width()/16),this.$el.parent().removeClass("player-container-fullscreen player-rot90-container");else this.$el.height(9*this.$el.width()/16);this.resizeFitThumnbail(),this.isMobilePlayer&&((e||"").includes("landscape")&&this.isFullScreen()?this.$el.find(".emoji-wrap").show():this.$el.find(".emoji-wrap").hide()),this.playerResizeHandler&&this.playerResizeHandler({width:this.$el.width(),height:this.$el.height()}),this.resizeFitRenderless()},getValueForPlayerInitial:function(e,t){var i=this.$el.width(),n=this.$el.height();return t?this.roundNumber(e*(i/384),2):this.roundNumber(e*(n/216),2)},roundNumber:function(e,t){return Math.round(10*e*t)/(10*t)},getFaqOneLiner:function(){return null!=a["faqoneliner_"+this.authorState]?a["faqoneliner_"+this.authorState]:"unknown error.. contact us for more details"},getFaqLink:function(){var e={5:"misc-error",6:"misc-error",13:"upload-issues",14:"upload-issues",16:"upload-issues",28:"upload-issues",22:"misc-error",23:"misc-error",27:"misc-error"};return null==e[this.authorState]?"":'<a target="_blank" href="https://www.hippovideo.io/faq.html#'+e[this.authorState]+'"> more info </a>'},resetPlayer:function(){this.isImageMode?this.$el.find(".primary-video-container img").attr("src",""):(this.$el.find(".secondary-video-container video").attr("src",""),this.$el.find(".primary-video-container video").attr("src",""),this.$el.find(".secondary-video-container video")[0].load(),this.$el.find(".primary-video-container video")[0].load(),this.canShowPlayerLoading&&this.$el.find(".player-loading-overlay").show(),this.$el.find(".title-paragraph-tag").text(""),this.$el.find(".player-currenttime").text("")),this.$el.find(".vdo-prev-head").hide(),this.$el.find(".hippo-video-buttons").hide(),this.$el.find(".play-btn-container").hide(),this.$el.find(".vdo-error-state").hide()},downloadVideoClick:function(){null!=this.downloadVideo&&this.downloadVideo()},deliveryDownload:function(){var e=n.getQueryParams();e?e.stat_id=this.statId:e={stat_id:this.statId},(new c).getDownloadLinkFromDelivery(this.token,e,(function(e){e.status&&r.downloadFile(e.signed_url)}))},_handleCanvasMouseAction:function(e){var t=this;clearTimeout(this.hideQuickPreviewTimeout),this.isCTAWaitingMode?t.$el.find("#canvasPreviewContainer").fadeOut(200):"mouseleave"===e.type&&(this.hideQuickPreviewTimeout=setTimeout((function(){t.$el.find("#canvasPreviewContainer").fadeOut(200)}),500))},getCurrentTime:function(){return this.durationComputed?this.mediaPlayer.currentTime:.001},getDuration:function(){return parseInt(this.mediaPlayer.duration)||this.duration},getRawDuration:function(){return this.mediaPlayer.duration||this.duration},checkAllowPlay:function(){if(this.token){var e=this,t={token:this.token};p.call({url:"/video_delivery/is_allow_play",method:"POST",data:t,success:function(t){e.allowPlay=t.is_allow}})}},renderWarning:function(t){var i=e("#"+this.$el.attr("id")).parent().attr("id");e("#"+i).empty(),e("#"+i).html(this.template({id:this.id,token:this.token,thumbnail:" ",privacy:t})),this.setElement(e("#"+this.id)),this.initializeCSS(),this.undelegateEvents(),e("#comments").hide(),e(".delivery-footer").hide(),e(".play-btn-container").hide()},undelegateHoverActions:function(){this.undelegate("mouseenter mouseleave mousemove",this._handleHover)},delegateHoverActions:function(){this.delegate("mouseenter mouseleave mousemove",this._handleHover)},overrideStyle:function(e,t,i){e.each((function(){this.style.setProperty(t,i,"important")}))},showRightClickOption:function(e,t){this.$el.find(".hv-rclick-options").removeClass("hide"),this.canShowAboutUs||this.$el.find(".hv-rclick-about").addClass("hide"),this.rightClickPositionMenu(e,t)},copyWithThumbnail:function(t,i){this.clipboard=new h("#hvRclickCopy",{target:function(){var r=t,o=i;return e("body").append('<div id="hvRclickCopyTarget" aria-hidden="true" tabindex="-1" > '+n.getStyleHtmlToCopy(r,o,null)+"</div>"),document.querySelector("#hvRclickCopyTarget")}}),this.clipboard.on("success",(function(){n.trackInThirdPartyTools("Successfully copied the Copy link and thumbnail option from player right click menu"),e(".hv-rclick-copy").text(s.newPlayer.linkCopied),e("#hvRclickCopyTarget").remove(),setTimeout((function(){e(".hv-rclick-copy").text(s.newPlayer.copyLinkAndThumbnail),e(".hv-rclick-options").addClass("hide")}),1500)})),this.clipboard.on("error",(function(t){n.trackInThirdPartyTools("Failed to copy the Copy link and thumbnail option from player right click menu"),e(".hv-rclick-copy").text(s.newPlayer.failedToCopy),e("#hvRclickCopyTarget").remove(),setTimeout((function(){e(".hv-rclick-copy").text(s.newPlayer.copyLinkAndThumbnail),e(".hv-rclick-options").addClass("hide")}),1500)}))},rightClickGetPosition:function(e,t,i){if(!e)e=window.event;var n=t.getBoundingClientRect(),r=n.left,o=n.top;return{x:e.clientX-r,y:e.clientY-o}},rightClickPositionMenu:function(e,t,i){var n=t,r=this.rightClickGetPosition(i,e,t),o=r.x,a=r.y,s=n.offsetWidth,l=n.offsetHeight,u=e.offsetWidth,c=e.offsetHeight;n.style.left=u-o<s?u-s+"px":o+"px",n.style.top=c-a-40<l?c-l-40+"px":a+"px"},applyCustomColors:function(){var t=void 0;this.playerTheme&&[4,7].includes(this.playerTheme.length)&&(t=this.playerTheme);try{t=this.customColors.primaryColor?this.customColors.primaryColor:t}catch(e){}if(this.customColors&&t){var i=n.convertHexToRGB(t);e(".video-container .main-controls .final-plybtn .playthree svg g").attr("stroke",t),e(".video-container .replay-btn-container .final-replybtn .replaythree svg path").attr("fill",t),e(".video-container .replay-btn-container .final-replybtn .replaythree svg path").attr("stroke",t),e(".video-container .main-controls .backwardbtn svg g path").attr("stroke",t),e(".video-container .main-controls .backwardbtn svg line").attr("stroke",t),e(".video-container .main-controls .forwardbtn svg g path").attr("stroke",t),e(".video-container .main-controls .forwardbtn svg line").attr("stroke",t),e("head").append("<style>.video-container .main-controls .backwardbtn:after{color:"+t+" !important;}</style>"),e("head").append("<style>.video-container .main-controls .forwardbtn:after{color:"+t+" !important;}</style>");var r="";r+=".video-container .current-time-bg, .canvas-preview-container .preview-add-comment { background-image : linear-gradient(to left,"+t+","+t+") !important}",r+=".video-container .buffer-container:after { background-image : linear-gradient(to right, transparent 20%, rgba( "+i.r+","+i.g+","+i.b+",0.2), rgba("+i.r+","+i.g+","+i.b+",0.25)) !important}",r+=".video-container .video-buffered-container { background:rgba( "+i.r+","+i.g+","+i.b+",0.2) !important}",r+=".video-container .volume-container .volume-slider .ui-slider-range, .canvas-preview-container .preview-add-comment, .video-container .volume-container .volume-slider .ui-slider-handle, .video-container .settings-container .settings-suboptions>li i, .personalised-video-loading .inner-container .bar-loading div, .player-loading-overlay .inner-container .bar-loading div { background-color : "+t+" !important}",r+=".video-container .settings-container .settings-options-container>ul>li:hover, .video-container .settings-container .settings-suboptions>li:hover {color: "+t+" !important}",r+=".volume-slider player-audio-slider ui-slider ui-corner-all ui-widget ui-widget-content ui-slider-vertical {background: none}",this.customColors.secondaryColor&&(r+=".se-clip-time {background: "+this.customColors.secondaryColor+" !important;}"),this.customColors.bgColor&&(r+=".player-controls-outside {background: "+this.customColors.bgColor+" !important;}"),r.length>0&&(document.head.appendChild(document.createElement("style")).innerHTML=r)}},getBandwidthConsumed:function(){var e={type:this.type};if("m3u8"==this.type)e.totalFileSize=this.adapter.getBandwidthConsumed();else{for(var t=0,i=0;i<this.mediaPlayer.buffered.length;i++){var n=this.mediaPlayer.buffered.start(i);t+=100*(this.mediaPlayer.buffered.end(i)-n)/this.mediaPlayer.duration}e.perc=t}return e},applyCustomPlayIcon:function(){if(this.customPlayIcon){var t=document.createElement("div");t.classList.add("overlay"),e(".main-controls").each((function(){e(this).append(t)}));var i=document.createElement("div");i.classList.add("watch-video"),i.textContent="WATCH VIDEO",e(".main-plyBtn").each((function(){e(this).append(i)}));e(".main-plyBtn .playbutton").each((function(){e(this).find("svg").remove(),e(this).append('<svg xmlns="http://www.w3.org/2000/svg" width="47" height="47" viewBox="0 0 47 47" class="white-play-icon prim-vid"> <g transform="translate(-344.113 -1343.053)"> <g class="a" transform="translate(344.113 1343.053)"> <circle class="c" cx="23.5" cy="23.5" r="23.5"/> <circle class="d" cx="23.5" cy="23.5" r="23"/> </g> <path class="b" d="M7.312,0l7.312,12.56H0Z" transform="translate(375.756 1359.646) rotate(90)"/> </g> </svg>'),e(this).append('<svg xmlns="http://www.w3.org/2000/svg" width="47" height="47" viewBox="0 0 57 57" class="white-play-icon-filled" style="display:none;"> <g transform="translate(-932 -595)"> <circle class="a" cx="28.5" cy="28.5" r="28.5" transform="translate(932 595)"/> <path class="b" d="M8.813,0l8.813,15.137H0Z" transform="translate(970.137 615) rotate(90)"/> </g> </svg>')})),e("#videoPagePreviewBlock, #videoPageDeliveryBlock").addClass(this.customPlayIcon)}},updateIsMirrorWebCam:function(e){this.isMirrorWebCam=e,n.toggleWebcamForMirrorVideo(this.isMirrorWebCam,null!=this.audioSrc&&""!=this.audioSrc?this.$el.find(".secondary-video"):this.$el.find("#primary-video"))},updateQuickPreviewObjects:function(t){t&&!this.isAudioOnly&&this.getDuration()>=30?(this.quickPreviewImg=document.createElement("img"),this.quickPreviewImg.setAttribute("src",t),this.quickPreviewCanvas=this.$el.find(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d"),e(this.quickPreviewCanvas).hide(),this.$el.find("#quick-preview-loading").show()):(this.quickPreviewImg=void 0,this.quickPreviewCanvas=void 0,this.quickPreviewContext=void 0)},setShowSetFrame:function(e){this.showSetFrame?this.seekAndChooseThumb():this.hideSeekAndUpdateThumb()}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.x(t.get(["isPrivacy"],!1),t,{else:i,block:oe},{})}function i(e,t){return e.x(t.get(["initial"],!1),t,{else:n,block:re},{})}function n(e,t){return e.w('<div class="video-container hippo-video-player hv-new-player" id=').f(t.get(["id"],!1),t,"h").w('><div class="thumbnail"><div class="se-crop-scale">\x3c!-- <canvas class="blurred-bg-video" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;filter: blur(20px);-webkit-filter: blur(20px);transform: scale(1.2);"></canvas> --\x3e<div class="primary-video-overflow-container"><div class="primary-video-container">').x(t.get(["isImageMode"],!1),t,{else:r,block:d},{}).w('</div></div><div class="parallel-video-container"><div class="goback-branching"><img src="/img/back-icon.png" width="25"><span></span></div><div class="goback-branching-new"><div class="left-container"><img src="/img/left.svg" width="25"></div><div class="branching-info"></div></div><div class="branching-menus"></div></div>').nx(t.get(["isImageMode"],!1),t,{block:h},{}).w('</div><canvas class="renderless-overlay" style="position: absolute;width: 100%;height: 100%"></canvas><div class="renderless-inputs-container" style="position: absolute;width: 100%;height: 100%;display:none"></div><div class="renderless-overlay-iframes" style="position: absolute;width: 100%;height: 100%;display:none"></div></div>').nx(t.get(["isImageMode"],!1),t,{block:f},{}).w('<div id="personalizeChapterId" class="hp-menu-tog hide"><img src="/svg/hamburger-white.svg" width="16"></div><div id="personalizeChaptersListId" class="hp-tog-content hide"><a class="chapter-close" id="chapterCloseId"><img src="/svg/close-gray.svg" width="10"></a><br><div id="chaptersListId"></div></div><div class="error-overlay hide" style="position:absolute;width:100%;height:100%;background: rgba(0,0,0,0.2);z-index:2;background-repeat: no-repeat;background-size: contain;"><div class="error-reason-div"><img src="/svg/warning.svg" class="status-warning" /><div class="error-reason"></div></div></div><div class="player-touch-guard"></div>').nx(t.get(["isImageMode"],!1),t,{block:k},{}).h("select",t,{block:J},{key:t.get(["privacy"],!1)},"h").w(" ").h("select",t,{block:ee},{key:t.get(["privacy"],!1)},"h").w(" ").h("eq",t,{block:ie},{key:t.get(["privacy"],!1),value:7},"h").w(" ").h("eq",t,{block:ne},{key:t.get(["privacy"],!1),value:2},"h").w("</div>")}function r(e,t){return e.w('<video class="primary-video" id="primary-video" crossorigin="anonymous" controls playsinline ').x(t.get(["loop"],!1),t,{block:o},{}).w(">").h("eq",t,{block:a},{key:t.get(["type"],!1),value:"url"},"h").w("Your browser does not support the video tag.").x(t.get(["subtitlesEnabled"],!1),t,{block:s},{}).w('</video><canvas class="se-effects-canvas"></canvas><div class="se-effects-components-container"></div>').x(t.get(["showSetFrame"],!1),t,{block:c},{}).w(" ")}function o(e,t){return e.w(" loop ")}function a(e,t){return e.w('<source crossorigin="anonymous" src=').f(t.get(["src"],!1),t,"h").w(">")}function s(e,t){return e.x(t.get(["subtitlesFromServer"],!1),t,{else:l,block:u},{})}function l(e,t){return e.w('<track label="English" kind="subtitles" id="subtitleTrack" srclang="eng" src="').f(t.get(["subtitles"],!1),t,"h").w('" default="">')}function u(e,t){return e.w('<track label="English" kind="subtitles" id="subtitleTrack" srclang="eng" src="').f(t.get(["domain"],!1),t,"h").w("/video_delivery/subtitles/").f(t.get(["token"],!1),t,"h").w('" default="">')}function c(e,t){return e.w('<video class="hidden-video" controls playsinline crossorigin="anonymous" style="display: none;"><source crossorigin="anonymous" src=').f(t.get(["src"],!1),t,"h").w(">").f(t.getPath(!1,["wizPlayer","browserDoesNotSupport"]),t,"h").w("</video> ")}function d(e,t){return e.w('<img src="').f(t.get(["src"],!1),t,"h").w('" class="primary-video" id="gifImage" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;"> ')}function h(e,t){return e.w(" ").nx(t.get(["isDelivery"],!1),t,{block:p},{}).w(" ")}function p(e,t){return e.w('<div class="secondary-video-overflow-container" style="top:0"><div class="secondary-video-container"><video class="secondary-video" crossorigin="anonymous"><source crossorigin="anonymous" src=').f(t.get(["audioSrc"],!1),t,"h").w('></video></div></div><textarea id="seTextEditable" class="se-text-editable custom-scroll hide" spellcheck="false" placeholder="Enter text here"></textarea><div class="se-components-container"></div><div class="se-crop-resizable hide"></div><div class="se-crop-highlighter se-crop-highlighter-top"></div><div class="se-crop-highlighter se-crop-highlighter-left"></div><div class="se-crop-highlighter se-crop-highlighter-bottom"></div><div class="se-crop-highlighter se-crop-highlighter-right"></div>')}function f(e,t){return e.w('<div class="se-components-droppable"></div><div class="player-border"></div>').x(t.get(["thumbnail"],!1),t,{block:g},{}).x(t.get(["previewVideo"],!1),t,{block:m},{}).x(t.get(["controls"],!1),t,{block:v},{}).w('<div class="renderless-builder-container" style="position: absolute;width: 100%;height: 100%;display:none;"></div>').x(t.get(["controls"],!1),t,{block:y},{}).w('<div class="player-loading-overlay full-screen-container hide"><div class="inner-container"></div></div>').x(t.get(["isLandingPageVideo"],!1),t,{else:b,block:w},{}).w(" ").x(t.get(["isMutedAutoPlay"],!1),t,{block:E},{}).w(" ").x(t.get(["showHoverActions"],!1),t,{block:T},{}).w(" ")}function g(e,t){return e.w('<div class="thumbnail-container full-screen-container" style="position:absolute;width:100%;height:100%;cursor: pointer;z-index:1"><img src="').f(t.get(["thumbnail"],!1),t,"h").w('" id="playerThumbnail" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;" onerror="this.style.display=\'none\'"></div>')}function m(e,t){return e.w('<div class="play-btn-container full-screen-container"><video src="').f(t.get(["previewVideo"],!1),t,"h").w('" id="preview-video-player" crossorigin="anonymous" playsinline loop /></div>')}function v(e,t){return e.w('<div id="hvMainPlayPause" class="main-play-pause"></div><div id="hvRclickOptions" class="hv-rclick-options hide" oncontextmenu="return false;"><ul><li id="hvRclickCopy" class="hv-rclick-copy">').f(t.getPath(!1,["newPlayer","copyLinkAndThumbnail"]),t,"h").w('</li><li class="hv-rclick-about">').f(t.getPath(!1,["newPlayer","aboutHippoVideo"]),t,"h").w("</li></ul></div>")}function y(e,t){return e.w('<div class="replay-btn-container full-screen-container hide"><span class="final-replybtn final-replybtn-click"><a class="replaythree replaybutton" width="20px" height="24px"><svg id="Layer_1" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 25.2 25.2"><path fill="#f47a58" d="M2.6 15.4c.7 2.5 2.4 4.7 4.8 6.1 4.9 2.8 11.2 1.1 14-3.8s1.1-11.2-3.8-14c-2.4-1.4-5.1-1.7-7.8-1-2.3.6-4.3 2-5.7 3.9l2.8-.2.2 2-4.4.3-2 .2-.2-2-.3-4.4 2-.2.2 2.9c1.7-2.3 4-3.9 6.8-4.7 3.2-.9 6.6-.4 9.5 1.2 6 3.4 8 11.1 4.6 17.1-.3.6-.7 1.1-1.1 1.6-3.8 4.7-10.6 6.1-16 3-2.9-1.7-4.9-4.4-5.8-7.5"/></svg></a></span></div>')}function b(e,t){return e.w('<div id="personalisedVideoLoading" class="personalised-video-loading"><div class="inner-container"><center><div class="bar-loading"><div></div><div></div><div></div><div></div></div></center></div></div>')}function w(e,t){return e.w('<div id="personalisedVideoLoading" class="personalised-video-loading-page"><div class="loader-wrap"><div class="rp-loader"></div></div></div>')}function E(e,t){return e.x(t.get(["controls"],!1),t,{block:_},{})}function _(e,t){return e.w('<div class="player-info muted-autoplay cursor-pointer hide"><img src="/svg/mute.svg" alt="volume" /> ').nx(t.get(["isMobilePlayer"],!1),t,{block:S},{}).w("</div>")}function S(e,t){return e.f(t.getPath(!1,["wizPlayer","clickToUnmute"]),t,"h")}function T(e,t){return e.w(" ").x(t.get(["controls"],!1),t,{block:C},{}).w(" ")}function C(e,t){return e.w('<div class="main-controls"><span class="backwardbtn" data-backward-value="5 sec"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"viewBox="70 10 40 40" style="enable-background:new 70 10 40 40;" xml:space="preserve"><g><path transform="translate(0,0)" stroke="#F47A58" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="transparent" d="M101.5,23.7v15.5c0,1.1-1.3,1.8-2.2,1.2l-12.8-8.2c-0.9-0.6-0.9-1.9,0-2.4l13.8-8.8 M101.5,20.2"/></g><g><path transform="translate(0,0)" stroke="#F47A58" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="transparent" d="M91.2,39.1v0.5c0,1.1-1.3,1.8-2.2,1.2l-12.8-8.2c-0.9-0.6-0.9-1.9,0-2.4L90,21.4 M91.2,20.6"/></g><line transform="translate(0,0)" stroke="#F47A58" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="transparent" x1="90" y1="21.4" x2="90" y2="26.9"/></svg></span><span class="final-plybtn final-plybtn-click main-plyBtn"><a class="playthree playbutton" width="20px" height="24px"><svg viewBox="0 0 24 24" version="1.1" xmlns="https://www.w3.org/2000/svg" xmlns:xlink="https://www.w3.org/1999/xlink" style="overflow: visible;"><g transform="translate(0,0)" stroke="#F47A58" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" fill="transparent"><path id="playbtnpath" class="playthreepath" d="M1,1.618034 L1,1.618034 L21.763932,12 L1,22.381966 L1,12 Z" id="Triangle2"></path></g></svg></a></span><span class="forwardbtn" data-forward-value="5 sec"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"viewBox="16 10 40 40" style="enable-background:new 16 10 40 40;" xml:space="preserve"><g><path transform="translate(0,0)" stroke="#F47A58" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="transparent" d="M24.5,23.7v15.5c0,1.1,1.3,1.8,2.2,1.2l12.8-8.2c0.9-0.6,0.9-1.9,0-2.4L25.8,21 M24.5,20.2"/></g><g><path transform="translate(0,0)" stroke="#F47A58" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="transparent" d="M34.8,39.1v0.5c0,1.1,1.3,1.8,2.2,1.2l12.8-8.2c0.9-0.6,0.9-1.9,0-2.4L36,21.4 M34.8,20.6"/></g><line transform="translate(0,0)" stroke="#F47A58" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="transparent" x1="36" y1="21.4" x2="36" y2="26.9"/></svg></span></div>')}function k(e,t){return e.w('<div class="canvas-preview-container ').nx(t.get(["showComments"],!1),t,{else:x,block:P},{}).w('" id="canvasPreviewContainer" style="display:none;"><canvas class="quickpreview-canvas" width=128 height=72></canvas> ').x(t.get(["showComments"],!1),t,{block:R},{}).w(" ").x(t.get(["showSetFrame"],!1),t,{block:D},{}).w(" ").x(t.get(["showReactions"],!1),t,{block:O},{}).w('<input type="hidden" id="canvasHoverTime" /></div><div class="subtitles-line" id="subtitlesTrack"></div><div class="notification-line-onplay"></div><div class="cta-indicator hide"><div id="ctaIndicatorInner" class="cta-indicator-inner"></div></div><div id="chapterIndicatorId" class="hp-indicator hide"></div><div class="player-progress for-reactions disp-none"><div class="click-area-extended"></div></div>').x(t.get(["controls"],!1),t,{block:N},{}).x(t.get(["canShowDeliveryDownload"],!1),t,{block:Y},{}).x(t.get(["controls"],!1),t,{block:K},{}).w('<div id="ctaPlayerComps" class="cta-player-comps hide"></div><div id="ctaPlayerAddComp" class="cta-player-add-container hide"></div>')}function x(e,t){return e.w(" ").nx(t.get(["showReactions"],!1),t,{block:A},{})}function A(e,t){return e.w(" canvas-only-comment")}function P(e,t){return e.nx(t.get(["showReactions"],!1),t,{block:I},{}).w(" ")}function I(e,t){return e.w(" canvas-only ")}function R(e,t){return e.w('<div class="preview-add-comment" id="addCommentFromCanvas"><img src="/img/icon-discussions-white.png" /></div>')}function D(e,t){return e.w('<h6 class="set-frame-btn">').f(t.getPath(!1,["wizPlayer","setTheFrame"]),t,"h").w("</h6>")}function O(e,t){return e.w('<div class="emoji-wrap"><span><img class="react-now-play" reaction_id="1" id="reaction_id-1" src="/svg/emoji-type-1.svg" width="16"></span><span><img class="react-now-play" reaction_id="2" id="reaction_id-2" src="/svg/emoji-type-2.svg" width="16"></span><span><img class="react-now-play" reaction_id="3" id="reaction_id-3" src="/svg/emoji-type-3.svg" width="16"></span><span><img class="react-now-play" reaction_id="4" id="reaction_id-4" src="/svg/emoji-type-4.svg" width="16"></span><span><img class="react-now-play" reaction_id="5" id="reaction_id-5" src="/svg/emoji-type-5.svg" width="16"></span><span><img class="react-now-play" reaction_id="6" id="reaction_id-6" src="/svg/emoji-type-6.svg" width="16"></span></div>')}function N(e,t){return e.w('<div class="controls clear-float player-controls-wrapper player-controls-container"><div class="playbtn-container final-plybtn-click btn-play-click"><a class="solidply"><svg viewBox="0 0 17 24" width="17px" height="24px"><g stroke="#FFFFFF" stroke-linecap="round" stroke-linejoin="round" fill="#FFFFFF"><path class="solidply1" d="M1,1 L1,1 1,11 16,11 16,11 Z"></path><path class="solidply2" d="M1,11 L1,11 1,22 16,11 16,11 Z"></path></g></svg></a></div><div class="duration-container"><div class="video-buffered-container"></div><div class="end-time-container"><span class="end-time"></span><div class="buffer-container"></div></div><div class="current-time-container"><div class="current-time-bg"></div><span class="current-time"></span></div></div>').x(t.get(["audioControl"],!1),t,{block:L},{}).x(t.get(["settingControl"],!1),t,{block:U},{}).x(t.get(["fullscreenControl"],!1),t,{block:H},{}).w(" ").x(t.get(["canPlayerLogoView"],!1),t,{block:j},{}).w("</div>")}function L(e,t){return e.w('<div class="volume-container">').x(t.get(["isContainsAudio"],!1),t,{else:M,block:F},{}).w("</div>")}function M(e,t){return e.w('<span class="no-audio-box"><img class="audio-img mute player-volume" src="/svg/no-audio-mute.svg" alt="volume" width="15" /><div class="no-audio-pop">This video has no audio</div></span>')}function F(e,t){return e.w('<a class="volumebtn volumeon volume60" height="20px"><img src="/svg/volume.svg"><span class="mute-line"></span><span class="volume-curve"><i class="curve1"></i><i class="curve2"></i><i class="curve3"></i></span></a><div class="volume-slider-wrapper"><div class="volume-slider-container"><div class="volume-slider"></div></div></div>')}function U(e,t){return e.w('<div class="settings-container"><span class="settingsbtn-container"><a class="settingsbtn"><img src="/svg/icon-settings.svg"></a></span><div class="settings-options-wrapper"><div class="settings-options-container"><ul>').x(t.get(["showSpeedSettings"],!1),t,{block:B},{}).x(t.get(["subtitlesEnabled"],!1),t,{block:V},{}).x(t.get(["qualityControl"],!1),t,{block:z},{}).w('</ul><span class="selectedpointer"></span></div></div></div>')}function B(e,t){return e.w('<li id="speedControl"><a id="speedInfo">1x - Speed</a><div class="settings-suboptions-wrapper"><ul class="settings-suboptions" id="speedControlWrapper"><li data-id="0.5"><i></i><a>0.5X</a></li><li class="selected" data-id="1"><i></i><a>1x</a></li><li data-id="1.5"><i></i><a>1.5x</a></li><li data-id="2"><i></i><a>2x</a></li><li data-id="5"><i></i><a>5x</a></li></ul></div></li>')}function V(e,t){return e.w('<li id="subtitles"><a>Subtitles</a><div class="settings-suboptions-wrapper"><ul class="settings-suboptions" id="subtitleWrapper"><li data-value="on"><i></i><a>On</a></li><li class="selected" data-value="off"><i></i><a>Off</a></li></ul></div></li>')}function z(e,t){return e.w('<li id="qualityConrols"><a id="qualityinfo">Auto</a><div class="settings-suboptions-wrapper"><ul class="settings-suboptions" id="qualityControlWrapper"></ul></div></li>')}function H(e,t){return e.w('<div class="screensize-container"><a class="screensizebtn"><i class="ss1"></i><i class="ss2"></i><i class="ss3"></i><i class="ss4"></i></a></div>')}function j(e,t){return e.w('<div class="logo-container">').x(t.get(["playerLogo"],!1),t,{else:q,block:G},{}).w("</div>")}function q(e,t){return e.w('<a href="https://www.hippovideo.io/" target="_blank"><img src="/svg/hippo-player-logo.svg" alt="logo" /></a>')}function G(e,t){return e.w("<a ").x(t.get(["addLinkToPlayerLogo"],!1),t,{block:W},{}).w(' target="_blank"><img src="').f(t.get(["playerLogo"],!1),t,"h").w('" alt="logo" /></a>')}function W(e,t){return e.x(t.get(["playerLogoLink"],!1),t,{block:$},{})}function $(e,t){return e.w('href="').f(t.get(["playerLogoLink"],!1),t,"h").w('" ')}function Y(e,t){return e.w('<div class="hv-player-download"></div>')}function K(e,t){return e.w('<div class="duration-container duration-container-fullscreen disp-none"><div class="current-time-container"><div class="current-time-bg"></div></div></div>')}function J(e,t){return e.w(" ").h("eq",t,{},{value:0},"h").w(" ").h("eq",t,{},{value:3},"h").w(" ").h("eq",t,{},{value:4},"h").w(" ").h("any",t,{block:X},{},"h").w(" ")}function X(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/access-denied.svg"><h3>').h("eq",t,{else:Q,block:Z},{key:t.get(["privacy"],!1),value:3},"h").w("</h3></div>")}function Q(e,t){return e.f(t.getPath(!1,["wizPlayer","permissionToView"]),t,"h")}function Z(e,t){return e.f(t.getPath(!1,["wizPlayer","watchExpired"]),t,"h")}function ee(e,t){return e.w(" ").h("eq",t,{},{value:5},"h").w(" ").h("eq",t,{},{value:6},"h").w(" ").h("any",t,{block:te},{},"h").w(" ")}function te(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","accountDeactivated"]),t,"h").w("</h3></div>")}function ie(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","limitExceeded"]),t,"h").w('</h3><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","contactOwner"]),t,"h").w("</h3></div>")}function ne(e,t){return e.w('<div class="medium-12 columns password-pop text-center"><img class="lock-icon" style="width: 80px;height: 80px;" src="/svg/password-lock.svg"><div class="small-4 columns large-centered small-centered"><input type="password" class="form-control password-holder vdoPlayerPwdField" placeholder="').f(t.getPath(!1,["wizPlayer","enterPassword"]),t,"h").w('"><span class="pwd-error hide">').f(t.getPath(!1,["wizPlayer","passwordInvalid"]),t,"h").w('</span><a class="button wiz-overlay-btn passwordGoBtn">').f(t.getPath(!1,["wizPlayer","go"]),t,"h").w("</a></div></div>")}function re(e,t){return e.w('<div class="video-container hippo-video-player hv-new-player" id=').f(t.get(["id"],!1),t,"h").w('><div id="personalisedVideoLoading" class="personalised-video-loading-page" style="display: block;"><div class="loader-wrap"><div class="rp-loader"></div></div></div></div>')}function oe(e,t){return e.w('<div class="video-container hippo-video-player hv-new-player" id=').f(t.get(["id"],!1),t,"h").w(">").h("select",t,{block:ae},{key:t.get(["privacy"],!1)},"h").w(" ").h("select",t,{block:ce},{key:t.get(["privacy"],!1)},"h").w(" ").h("eq",t,{block:he},{key:t.get(["privacy"],!1),value:7},"h").w(" ").h("eq",t,{block:pe},{key:t.get(["privacy"],!1),value:2},"h").w("</div>")}function ae(e,t){return e.w(" ").h("eq",t,{},{value:0},"h").w(" ").h("eq",t,{},{value:3},"h").w(" ").h("eq",t,{},{value:4},"h").w(" ").h("any",t,{block:se},{},"h").w(" ")}function se(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/access-denied.svg"><h3>').h("eq",t,{else:le,block:ue},{key:t.get(["privacy"],!1),value:3},"h").w("</h3></div>")}function le(e,t){return e.f(t.getPath(!1,["wizPlayer","permissionToView"]),t,"h")}function ue(e,t){return e.f(t.getPath(!1,["wizPlayer","watchExpired"]),t,"h")}function ce(e,t){return e.w(" ").h("eq",t,{},{value:5},"h").w(" ").h("eq",t,{},{value:6},"h").w(" ").h("any",t,{block:de},{},"h").w(" ")}function de(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","accountDeactivated"]),t,"h").w("</h3></div>")}function he(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","limitExceeded"]),t,"h").w('</h3><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","contactOwner"]),t,"h").w("</h3></div>")}function pe(e,t){return e.w('<div class="medium-12 columns password-pop text-center"><img class="lock-icon" style="width: 80px;height: 80px;" src="/svg/password-lock.svg"><div class="small-4 columns large-centered small-centered"><input type="password" class="form-control password-holder vdoPlayerPwdField" placeholder="').f(t.getPath(!1,["wizPlayer","enterPassword"]),t,"h").w('"><span class="pwd-error hide">').f(t.getPath(!1,["wizPlayer","passwordInvalid"]),t,"h").w('</span><a class="button wiz-overlay-btn passwordGoBtn">').f(t.getPath(!1,["wizPlayer","go"]),t,"h").w("</a></div></div>")}e.register("templates/component/NewPlayerView",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0,I.__dustBody=!0,R.__dustBody=!0,D.__dustBody=!0,O.__dustBody=!0,N.__dustBody=!0,L.__dustBody=!0,M.__dustBody=!0,F.__dustBody=!0,U.__dustBody=!0,B.__dustBody=!0,V.__dustBody=!0,z.__dustBody=!0,H.__dustBody=!0,j.__dustBody=!0,q.__dustBody=!0,G.__dustBody=!0,W.__dustBody=!0,$.__dustBody=!0,Y.__dustBody=!0,K.__dustBody=!0,J.__dustBody=!0,X.__dustBody=!0,Q.__dustBody=!0,Z.__dustBody=!0,ee.__dustBody=!0,te.__dustBody=!0,ie.__dustBody=!0,ne.__dustBody=!0,re.__dustBody=!0,oe.__dustBody=!0,ae.__dustBody=!0,se.__dustBody=!0,le.__dustBody=!0,ue.__dustBody=!0,ce.__dustBody=!0,de.__dustBody=!0,he.__dustBody=!0,pe.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/NewPlayerView",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";i.r(t);i(62),i(96),i(183),i(164),i(51),i(94),i(24),i(134),i(110),i(67),i(93);var n={getImportedImageInfo:function(e){var t=e.upload_type,i={};return"local_file"===t?(i.upload_type="local_file",i.file_name=e.name,i.size=e.size,i.description=e.description||e.name):"existing_media"===t?(i.upload_type="existing_media",i.video_id=e.id):"gdrive"===t?(i.upload_type="gdrive",i.id=e.id,i.token_id=e.token_id):"url"===t&&(i.upload_type="url",i.url=e.url),i.contains_image=!0,i},getMfImage:function(e,t){var i=document.createElement("canvas");i.width=2e3,i.height=1125;var n=i.getContext("2d");n.fillStyle="white",n.fillRect(0,0,i.width,i.height),n.fillStyle="#2a2a2a";var r="image"===t?"360px":"300px";n.font="700 "+r+" Open Sans";var o="image"===t?"IMAGE":"WEBSITE";n.fillText("$"+o+e+"$",100,500),n.fillStyle="#969ca2",n.font="170px Open Sans";var a="G O E S H E R E".split("").join(String.fromCharCode(8201));return n.fillText(a,110,800),i.toDataURL("image/png")},getNewImageMfId:function(e,t){for(var i=[],n=[],r="image"===t,o=0;o<e.clips.length;o++){var a=e.clips[o];"image-mf"===a.footage.type&&(r?void 0!==a.footage.is_website&&"false"!==a.footage.is_website.toString()||(a.footage.image_id?n.push(Number(a.footage.image_id)):n.push(Number(a.footage.id))):a.footage.is_website&&"true"===a.footage.is_website.toString()&&n.push(Number(a.footage.image_id)),i.push(Number(a.footage.id)))}var s=this.getId(i);return{imageId:this.getId(n),footageId:s}},getId:function(e){for(var t=1;e.includes(t);)++t;return t}};t.default=n},function(e,t,i){"use strict";i.r(t);i(135),i(24);var n=i(2),r=i.n(n),o={getPaletteConfig:function(e,t,i){var n=this,o={};return(HippoVideo.data.api.getProperty("showBrandingColorPalette")||i)&&(o={showSelectionPalette:!1,showPalette:!0,hideAfterPaletteSelect:!0,beforeShow:function(){var e=r()("."+t);return e.find("#showMoreContainer").remove(),e.addClass("palette-view"),e.find(".sp-picker-container .sp-top, .sp-picker-container .sp-input-container").hide(),e.find(".sp-picker-container").prepend("<div id='showMoreContainer'><div id='showMoreOption'>+ More Colors</div></div>"),e.find("#showMoreOption").off("click").on("click",{containerClassName:t,self:n},n.handleShowMore),!0},palette:[e]}),o},handleShowMore:function(e){var t=r()("."+e.data.containerClassName);e.data.self.showColorPicker(t)},showColorPicker:function(e){e.find(".sp-picker-container .sp-top, .sp-picker-container .sp-input-container").show(),e.removeClass("palette-view"),e.find("#showMoreContainer").remove()}};t.default=o},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="sticker-family-container sticker-family-container-').f(t.get(["i"],!1),t,"h").w('"><img class="sticker-family-main" src = "').f(t.get(["mainImg"],!1),t,"h").w('" id="sticker-family-main-').f(t.get(["i"],!1),t,"h").w('"><div class="custom-scroll sticker-family-all hide"></div></div>')}e.register("templates/simple_edit/sticker_family",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/simple_edit/sticker_family",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){(function(e){!function(t){"use strict";var n,r;function o(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function a(e,t){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=t,this.destLen=0,this.ltree=new o,this.dtree=new o}String.prototype.codePointAt||(n=function(){try{var e={},t=Object.defineProperty,i=t(e,e,e)&&t}catch(e){}return i}(),r=function(e){if(null==this)throw TypeError();var t=String(this),i=t.length,n=e?Number(e):0;if(n!=n&&(n=0),!(n<0||i<=n)){var r,o=t.charCodeAt(n);return 55296<=o&&o<=56319&&n+1<i&&56320<=(r=t.charCodeAt(n+1))&&r<=57343?1024*(o-55296)+r-56320+65536:o}},n?n(String.prototype,"codePointAt",{value:r,configurable:!0,writable:!0}):String.prototype.codePointAt=r);var s=new o,l=new o,u=new Uint8Array(30),c=new Uint16Array(30),d=new Uint8Array(30),h=new Uint16Array(30),p=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f=new o,g=new Uint8Array(320);function m(e,t,i,n){var r,o;for(r=0;r<i;++r)e[r]=0;for(r=0;r<30-i;++r)e[r+i]=r/i|0;for(o=n,r=0;r<30;++r)t[r]=o,o+=1<<e[r]}var v=new Uint16Array(16);function y(e,t,i,n){var r,o;for(r=0;r<16;++r)e.table[r]=0;for(r=0;r<n;++r)e.table[t[i+r]]++;for(r=o=e.table[0]=0;r<16;++r)v[r]=o,o+=e.table[r];for(r=0;r<n;++r)t[i+r]&&(e.trans[v[t[i+r]]++]=r)}function b(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var t=1&e.tag;return e.tag>>>=1,t}function w(e,t,i){if(!t)return i;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,n+i}function E(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;for(var i=0,n=0,r=0,o=e.tag;n=2*n+(1&o),o>>>=1,++r,i+=t.table[r],0<=(n-=t.table[r]););return e.tag=o,e.bitcount-=r,t.trans[i+n]}function _(e,t,i){var n,r,o,a,s,l;for(n=w(e,5,257),r=w(e,5,1),o=w(e,4,4),a=0;a<19;++a)g[a]=0;for(a=0;a<o;++a){var u=w(e,3,0);g[p[a]]=u}for(y(f,g,0,19),s=0;s<n+r;){var c=E(e,f);switch(c){case 16:var d=g[s-1];for(l=w(e,2,3);l;--l)g[s++]=d;break;case 17:for(l=w(e,3,3);l;--l)g[s++]=0;break;case 18:for(l=w(e,7,11);l;--l)g[s++]=0;break;default:g[s++]=c}}y(t,g,0,n),y(i,g,n,r)}function S(e,t,i){for(;;){var n,r,o,a,s=E(e,t);if(256===s)return 0;if(s<256)e.dest[e.destLen++]=s;else for(n=w(e,u[s-=257],c[s]),r=E(e,i),a=o=e.destLen-w(e,d[r],h[r]);a<o+n;++a)e.dest[e.destLen++]=e.dest[a]}}function T(e){for(var t,i;8<e.bitcount;)e.sourceIndex--,e.bitcount-=8;if((t=256*(t=e.source[e.sourceIndex+1])+e.source[e.sourceIndex])!==(65535&~(256*e.source[e.sourceIndex+3]+e.source[e.sourceIndex+2])))return-3;for(e.sourceIndex+=4,i=t;i;--i)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,0}function C(e,t,i,n,r){return Math.pow(1-r,3)*e+3*Math.pow(1-r,2)*r*t+3*(1-r)*Math.pow(r,2)*i+Math.pow(r,3)*n}function k(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}function x(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}function A(e){throw new Error(e)}function P(e,t){e||A(t)}!function(e,t){var i;for(i=0;i<7;++i)e.table[i]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,i=0;i<24;++i)e.trans[i]=256+i;for(i=0;i<144;++i)e.trans[24+i]=i;for(i=0;i<8;++i)e.trans[168+i]=280+i;for(i=0;i<112;++i)e.trans[176+i]=144+i;for(i=0;i<5;++i)t.table[i]=0;for(t.table[5]=32,i=0;i<32;++i)t.trans[i]=i}(s,l),m(u,c,4,3),m(d,h,2,1),u[28]=0,c[28]=258,k.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},k.prototype.addPoint=function(e,t){"number"==typeof e&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),"number"==typeof t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))},k.prototype.addX=function(e){this.addPoint(e,null)},k.prototype.addY=function(e){this.addPoint(null,e)},k.prototype.addBezier=function(e,t,i,n,r,o,a,s){var l=this,u=[e,t],c=[i,n],d=[r,o],h=[a,s];this.addPoint(e,t),this.addPoint(a,s);for(var p=0;p<=1;p++){var f=6*u[p]-12*c[p]+6*d[p],g=-3*u[p]+9*c[p]-9*d[p]+3*h[p],m=3*c[p]-3*u[p];if(0!==g){var v=Math.pow(f,2)-4*m*g;if(!(v<0)){var y=(-f+Math.sqrt(v))/(2*g);0<y&&y<1&&(0===p&&l.addX(C(u[p],c[p],d[p],h[p],y)),1===p&&l.addY(C(u[p],c[p],d[p],h[p],y)));var b=(-f-Math.sqrt(v))/(2*g);0<b&&b<1&&(0===p&&l.addX(C(u[p],c[p],d[p],h[p],b)),1===p&&l.addY(C(u[p],c[p],d[p],h[p],b)))}}else{if(0===f)continue;var w=-m/f;0<w&&w<1&&(0===p&&l.addX(C(u[p],c[p],d[p],h[p],w)),1===p&&l.addY(C(u[p],c[p],d[p],h[p],w)))}}},k.prototype.addQuad=function(e,t,i,n,r,o){var a=e+2/3*(i-e),s=t+2/3*(n-t),l=a+1/3*(r-e),u=s+1/3*(o-t);this.addBezier(e,t,a,s,l,u,r,o)},x.prototype.moveTo=function(e,t){this.commands.push({type:"M",x:e,y:t})},x.prototype.lineTo=function(e,t){this.commands.push({type:"L",x:e,y:t})},x.prototype.curveTo=x.prototype.bezierCurveTo=function(e,t,i,n,r,o){this.commands.push({type:"C",x1:e,y1:t,x2:i,y2:n,x:r,y:o})},x.prototype.quadTo=x.prototype.quadraticCurveTo=function(e,t,i,n){this.commands.push({type:"Q",x1:e,y1:t,x:i,y:n})},x.prototype.close=x.prototype.closePath=function(){this.commands.push({type:"Z"})},x.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof k){var t=e;return this.moveTo(t.x1,t.y1),this.lineTo(t.x2,t.y1),this.lineTo(t.x2,t.y2),this.lineTo(t.x1,t.y2),void this.close()}Array.prototype.push.apply(this.commands,e)},x.prototype.getBoundingBox=function(){for(var e=new k,t=0,i=0,n=0,r=0,o=0;o<this.commands.length;o++){var a=this.commands[o];switch(a.type){case"M":e.addPoint(a.x,a.y),t=n=a.x,i=r=a.y;break;case"L":e.addPoint(a.x,a.y),n=a.x,r=a.y;break;case"Q":e.addQuad(n,r,a.x1,a.y1,a.x,a.y),n=a.x,r=a.y;break;case"C":e.addBezier(n,r,a.x1,a.y1,a.x2,a.y2,a.x,a.y),n=a.x,r=a.y;break;case"Z":n=t,r=i;break;default:throw new Error("Unexpected path command "+a.type)}}return e.isEmpty()&&e.addPoint(0,0),e},x.prototype.draw=function(e){e.beginPath();for(var t=0;t<this.commands.length;t+=1){var i=this.commands[t];"M"===i.type?e.moveTo(i.x,i.y):"L"===i.type?e.lineTo(i.x,i.y):"C"===i.type?e.bezierCurveTo(i.x1,i.y1,i.x2,i.y2,i.x,i.y):"Q"===i.type?e.quadraticCurveTo(i.x1,i.y1,i.x,i.y):"Z"===i.type&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())},x.prototype.toPathData=function(e){function t(){for(var t,i=arguments,n="",r=0;r<arguments.length;r+=1){var o=i[r];0<=o&&0<r&&(n+=" "),n+=(t=o,Math.round(t)===t?""+Math.round(t):t.toFixed(e))}return n}e=void 0!==e?e:2;for(var i="",n=0;n<this.commands.length;n+=1){var r=this.commands[n];"M"===r.type?i+="M"+t(r.x,r.y):"L"===r.type?i+="L"+t(r.x,r.y):"C"===r.type?i+="C"+t(r.x1,r.y1,r.x2,r.y2,r.x,r.y):"Q"===r.type?i+="Q"+t(r.x1,r.y1,r.x,r.y):"Z"===r.type&&(i+="Z")}return i},x.prototype.toSVG=function(e){var t='<path d="';return t+=this.toPathData(e),t+='"',this.fill&&"black"!==this.fill&&(null===this.fill?t+=' fill="none"':t+=' fill="'+this.fill+'"'),this.stroke&&(t+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),t+"/>"},x.prototype.toDOMElement=function(e){var t=this.toPathData(e),i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i};var I={fail:A,argument:P,assert:P},R=2147483648,D={},O={},N={};function L(e){return function(){return e}}O.BYTE=function(e){return I.argument(0<=e&&e<=255,"Byte value should be between 0 and 255."),[e]},N.BYTE=L(1),O.CHAR=function(e){return[e.charCodeAt(0)]},N.CHAR=L(1),O.CHARARRAY=function(e){for(var t=[],i=0;i<e.length;i+=1)t[i]=e.charCodeAt(i);return t},N.CHARARRAY=function(e){return e.length},O.USHORT=function(e){return[e>>8&255,255&e]},N.USHORT=L(2),O.SHORT=function(e){return 32768<=e&&(e=-(65536-e)),[e>>8&255,255&e]},N.SHORT=L(2),O.UINT24=function(e){return[e>>16&255,e>>8&255,255&e]},N.UINT24=L(3),O.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},N.ULONG=L(4),O.LONG=function(e){return R<=e&&(e=-(2*R-e)),[e>>24&255,e>>16&255,e>>8&255,255&e]},N.LONG=L(4),O.FIXED=O.ULONG,N.FIXED=N.ULONG,O.FWORD=O.SHORT,N.FWORD=N.SHORT,O.UFWORD=O.USHORT,N.UFWORD=N.USHORT,O.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,255&e]},N.LONGDATETIME=L(8),O.TAG=function(e){return I.argument(4===e.length,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},N.TAG=L(4),O.Card8=O.BYTE,N.Card8=N.BYTE,O.Card16=O.USHORT,N.Card16=N.USHORT,O.OffSize=O.BYTE,N.OffSize=N.BYTE,O.SID=O.USHORT,N.SID=N.USHORT,O.NUMBER=function(e){return-107<=e&&e<=107?[e+139]:108<=e&&e<=1131?[247+((e-=108)>>8),255&e]:-1131<=e&&e<=-108?[251+((e=-e-108)>>8),255&e]:-32768<=e&&e<=32767?O.NUMBER16(e):O.NUMBER32(e)},N.NUMBER=function(e){return O.NUMBER(e).length},O.NUMBER16=function(e){return[28,e>>8&255,255&e]},N.NUMBER16=L(3),O.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,255&e]},N.NUMBER32=L(5),O.REAL=function(e){var t=e.toString(),i=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);if(i){var n=parseFloat("1e"+((i[2]?+i[2]:0)+i[1].length));t=(Math.round(e*n)/n).toString()}for(var r="",o=0,a=t.length;o<a;o+=1){var s=t[o];r+="e"===s?"-"===t[++o]?"c":"b":"."===s?"a":"-"===s?"e":s}for(var l=[30],u=0,c=(r+=1&r.length?"f":"ff").length;u<c;u+=2)l.push(parseInt(r.substr(u,2),16));return l},N.REAL=function(e){return O.REAL(e).length},O.NAME=O.CHARARRAY,N.NAME=N.CHARARRAY,O.STRING=O.CHARARRAY,N.STRING=N.CHARARRAY,D.UTF8=function(e,t,i){for(var n=[],r=i,o=0;o<r;o++,t+=1)n[o]=e.getUint8(t);return String.fromCharCode.apply(null,n)},D.UTF16=function(e,t,i){for(var n=[],r=i/2,o=0;o<r;o++,t+=2)n[o]=e.getUint16(t);return String.fromCharCode.apply(null,n)},O.UTF16=function(e){for(var t=[],i=0;i<e.length;i+=1){var n=e.charCodeAt(i);t[t.length]=n>>8&255,t[t.length]=255&n}return t},N.UTF16=function(e){return 2*e.length};var M={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"};D.MACSTRING=function(e,t,i,n){var r=M[n];if(void 0!==r){for(var o="",a=0;a<i;a++){var s=e.getUint8(t+a);o+=s<=127?String.fromCharCode(s):r[127&s]}return o}};var F,U="function"==typeof WeakMap&&new WeakMap;function B(e){return-128<=e&&e<=127}function V(e,t,i){for(var n=0,r=e.length;t<r&&n<64&&0===e[t];)++t,++n;return i.push(128|n-1),t}function z(e,t,i){for(var n=0,r=e.length,o=t;o<r&&n<64;){var a=e[o];if(!B(a))break;if(0===a&&o+1<r&&0===e[o+1])break;++o,++n}i.push(n-1);for(var s=t;s<o;++s)i.push(e[s]+256&255);return o}function H(e,t,i){for(var n=0,r=e.length,o=t;o<r&&n<64;){var a=e[o];if(0===a)break;if(B(a)&&o+1<r&&B(e[o+1]))break;++o,++n}i.push(64|n-1);for(var s=t;s<o;++s){var l=e[s];i.push(l+65536>>8&255,l+256&255)}return o}O.MACSTRING=function(e,t){var i=function(e){if(!F)for(var t in F={},M)F[t]=new String(t);var i=F[e];if(void 0!==i){if(U){var n=U.get(i);if(void 0!==n)return n}var r=M[e];if(void 0!==r){for(var o={},a=0;a<r.length;a++)o[r.charCodeAt(a)]=a+128;return U&&U.set(i,o),o}}}(t);if(void 0!==i){for(var n=[],r=0;r<e.length;r++){var o=e.charCodeAt(r);if(128<=o&&void 0===(o=i[o]))return;n[r]=o}return n}},N.MACSTRING=function(e,t){var i=O.MACSTRING(e,t);return void 0!==i?i.length:0},O.VARDELTAS=function(e){for(var t=0,i=[];t<e.length;){var n=e[t];t=0===n?V(e,t,i):-128<=n&&n<=127?z(e,t,i):H(e,t,i)}return i},O.INDEX=function(e){for(var t=1,i=[t],n=[],r=0;r<e.length;r+=1){var o=O.OBJECT(e[r]);Array.prototype.push.apply(n,o),t+=o.length,i.push(t)}if(0===n.length)return[0,0];for(var a=[],s=1+Math.floor(Math.log(t)/Math.log(2))/8|0,l=[void 0,O.BYTE,O.USHORT,O.UINT24,O.ULONG][s],u=0;u<i.length;u+=1){var c=l(i[u]);Array.prototype.push.apply(a,c)}return Array.prototype.concat(O.Card16(e.length),O.OffSize(s),a,n)},N.INDEX=function(e){return O.INDEX(e).length},O.DICT=function(e){for(var t=[],i=Object.keys(e),n=i.length,r=0;r<n;r+=1){var o=parseInt(i[r],0),a=e[o];t=(t=t.concat(O.OPERAND(a.value,a.type))).concat(O.OPERATOR(o))}return t},N.DICT=function(e){return O.DICT(e).length},O.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},O.OPERAND=function(e,t){var i=[];if(Array.isArray(t))for(var n=0;n<t.length;n+=1)I.argument(e.length===t.length,"Not enough arguments given for type"+t),i=i.concat(O.OPERAND(e[n],t[n]));else if("SID"===t)i=i.concat(O.NUMBER(e));else if("offset"===t)i=i.concat(O.NUMBER32(e));else if("number"===t)i=i.concat(O.NUMBER(e));else{if("real"!==t)throw new Error("Unknown operand type "+t);i=i.concat(O.REAL(e))}return i},O.OP=O.BYTE,N.OP=N.BYTE;var j="function"==typeof WeakMap&&new WeakMap;function q(e,t,i){for(var n=0;n<t.length;n+=1){var r=t[n];this[r.name]=r.value}if(this.tableName=e,this.fields=t,i)for(var o=Object.keys(i),a=0;a<o.length;a+=1){var s=o[a],l=i[s];void 0!==this[s]&&(this[s]=l)}}function G(e,t,i){void 0===i&&(i=t.length);var n=new Array(t.length+1);n[0]={name:e+"Count",type:"USHORT",value:i};for(var r=0;r<t.length;r++)n[r+1]={name:e+r,type:"USHORT",value:t[r]};return n}function W(e,t,i){var n=t.length,r=new Array(n+1);r[0]={name:e+"Count",type:"USHORT",value:n};for(var o=0;o<n;o++)r[o+1]={name:e+o,type:"TABLE",value:i(t[o],o)};return r}function $(e,t,i){var n=t.length,r=[];r[0]={name:e+"Count",type:"USHORT",value:n};for(var o=0;o<n;o++)r=r.concat(i(t[o],o));return r}function Y(e){1===e.format?q.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(G("glyph",e.glyphs))):I.assert(!1,"Can't create coverage table format 2 yet.")}function K(e){q.call(this,"scriptListTable",$("scriptRecord",e,(function(e,t){var i=e.script,n=i.defaultLangSys;return I.assert(!!n,"Unable to write GSUB: script "+e.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:e.tag},{name:"script"+t,type:"TABLE",value:new q("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new q("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:n.reqFeatureIndex}].concat(G("featureIndex",n.featureIndexes)))}].concat($("langSys",i.langSysRecords,(function(e,t){var i=e.langSys;return[{name:"langSysTag"+t,type:"TAG",value:e.tag},{name:"langSys"+t,type:"TABLE",value:new q("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:i.reqFeatureIndex}].concat(G("featureIndex",i.featureIndexes)))}]}))))}]})))}function J(e){q.call(this,"featureListTable",$("featureRecord",e,(function(e,t){var i=e.feature;return[{name:"featureTag"+t,type:"TAG",value:e.tag},{name:"feature"+t,type:"TABLE",value:new q("featureTable",[{name:"featureParams",type:"USHORT",value:i.featureParams}].concat(G("lookupListIndex",i.lookupListIndexes)))}]})))}function X(e,t){q.call(this,"lookupListTable",W("lookup",e,(function(e){var i=t[e.lookupType];return I.assert(!!i,"Unable to write GSUB lookup type "+e.lookupType+" tables."),new q("lookupTable",[{name:"lookupType",type:"USHORT",value:e.lookupType},{name:"lookupFlag",type:"USHORT",value:e.lookupFlag}].concat(W("subtable",e.subtables,i)))})))}O.CHARSTRING=function(e){if(j){var t=j.get(e);if(void 0!==t)return t}for(var i=[],n=e.length,r=0;r<n;r+=1){var o=e[r];i=i.concat(O[o.type](o.value))}return j&&j.set(e,i),i},N.CHARSTRING=function(e){return O.CHARSTRING(e).length},O.OBJECT=function(e){var t=O[e.type];return I.argument(void 0!==t,"No encoding function for type "+e.type),t(e.value)},N.OBJECT=function(e){var t=N[e.type];return I.argument(void 0!==t,"No sizeOf function for type "+e.type),t(e.value)},O.TABLE=function(e){for(var t=[],i=e.fields.length,n=[],r=[],o=0;o<i;o+=1){var a=e.fields[o],s=O[a.type];I.argument(void 0!==s,"No encoding function for field type "+a.type+" ("+a.name+")");var l=e[a.name];void 0===l&&(l=a.value);var u=s(l);"TABLE"===a.type?(r.push(t.length),t=t.concat([0,0]),n.push(u)):t=t.concat(u)}for(var c=0;c<n.length;c+=1){var d=r[c],h=t.length;I.argument(h<65536,"Table "+e.tableName+" too big."),t[d]=h>>8,t[d+1]=255&h,t=t.concat(n[c])}return t},N.TABLE=function(e){for(var t=0,i=e.fields.length,n=0;n<i;n+=1){var r=e.fields[n],o=N[r.type];I.argument(void 0!==o,"No sizeOf function for field type "+r.type+" ("+r.name+")");var a=e[r.name];void 0===a&&(a=r.value),t+=o(a),"TABLE"===r.type&&(t+=2)}return t},O.RECORD=O.TABLE,N.RECORD=N.TABLE,O.LITERAL=function(e){return e},N.LITERAL=function(e){return e.length},q.prototype.encode=function(){return O.TABLE(this)},q.prototype.sizeOf=function(){return N.TABLE(this)};var Q={Table:q,Record:q,Coverage:(Y.prototype=Object.create(q.prototype)).constructor=Y,ScriptList:(K.prototype=Object.create(q.prototype)).constructor=K,FeatureList:(J.prototype=Object.create(q.prototype)).constructor=J,LookupList:(X.prototype=Object.create(q.prototype)).constructor=X,ushortList:G,tableList:W,recordList:$};function Z(e,t){return e.getUint8(t)}function ee(e,t){return e.getUint16(t,!1)}function te(e,t){return e.getUint32(t,!1)}function ie(e,t){return e.getInt16(t,!1)+e.getUint16(t+2,!1)/65535}var ne={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function re(e,t){this.data=e,this.offset=t,this.relativeOffset=0}re.prototype.parseByte=function(){var e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},re.prototype.parseChar=function(){var e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},re.prototype.parseCard8=re.prototype.parseByte,re.prototype.parseCard16=re.prototype.parseUShort=function(){var e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},re.prototype.parseSID=re.prototype.parseUShort,re.prototype.parseOffset16=re.prototype.parseUShort,re.prototype.parseShort=function(){var e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},re.prototype.parseF2Dot14=function(){var e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},re.prototype.parseOffset32=re.prototype.parseULong=function(){var e=te(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},re.prototype.parseFixed=function(){var e=ie(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},re.prototype.parseString=function(e){var t=this.data,i=this.offset+this.relativeOffset,n="";this.relativeOffset+=e;for(var r=0;r<e;r++)n+=String.fromCharCode(t.getUint8(i+r));return n},re.prototype.parseTag=function(){return this.parseString(4)},re.prototype.parseLongDateTime=function(){var e=te(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},re.prototype.parseVersion=function(e){var t=ee(this.data,this.offset+this.relativeOffset),i=ee(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,void 0===e&&(e=4096),t+i/e/10},re.prototype.skip=function(e,t){void 0===t&&(t=1),this.relativeOffset+=ne[e]*t},re.prototype.parseULongList=function(e){void 0===e&&(e=this.parseULong());for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getUint32(n),n+=4;return this.relativeOffset+=4*e,t},re.prototype.parseOffset16List=re.prototype.parseUShortList=function(e){void 0===e&&(e=this.parseUShort());for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getUint16(n),n+=2;return this.relativeOffset+=2*e,t},re.prototype.parseShortList=function(e){for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getInt16(n),n+=2;return this.relativeOffset+=2*e,t},re.prototype.parseByteList=function(e){for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getUint8(n++);return this.relativeOffset+=e,t},re.prototype.parseList=function(e,t){t||(t=e,e=this.parseUShort());for(var i=new Array(e),n=0;n<e;n++)i[n]=t.call(this);return i},re.prototype.parseList32=function(e,t){t||(t=e,e=this.parseULong());for(var i=new Array(e),n=0;n<e;n++)i[n]=t.call(this);return i},re.prototype.parseRecordList=function(e,t){t||(t=e,e=this.parseUShort());for(var i=new Array(e),n=Object.keys(t),r=0;r<e;r++){for(var o={},a=0;a<n.length;a++){var s=n[a],l=t[s];o[s]=l.call(this)}i[r]=o}return i},re.prototype.parseRecordList32=function(e,t){t||(t=e,e=this.parseULong());for(var i=new Array(e),n=Object.keys(t),r=0;r<e;r++){for(var o={},a=0;a<n.length;a++){var s=n[a],l=t[s];o[s]=l.call(this)}i[r]=o}return i},re.prototype.parseStruct=function(e){if("function"==typeof e)return e.call(this);for(var t=Object.keys(e),i={},n=0;n<t.length;n++){var r=t[n],o=e[r];i[r]=o.call(this)}return i},re.prototype.parseValueRecord=function(e){if(void 0===e&&(e=this.parseUShort()),0!==e){var t={};return 1&e&&(t.xPlacement=this.parseShort()),2&e&&(t.yPlacement=this.parseShort()),4&e&&(t.xAdvance=this.parseShort()),8&e&&(t.yAdvance=this.parseShort()),16&e&&(t.xPlaDevice=void 0,this.parseShort()),32&e&&(t.yPlaDevice=void 0,this.parseShort()),64&e&&(t.xAdvDevice=void 0,this.parseShort()),128&e&&(t.yAdvDevice=void 0,this.parseShort()),t}},re.prototype.parseValueRecordList=function(){for(var e=this.parseUShort(),t=this.parseUShort(),i=new Array(t),n=0;n<t;n++)i[n]=this.parseValueRecord(e);return i},re.prototype.parsePointer=function(e){var t=this.parseOffset16();if(0<t)return new re(this.data,this.offset+t).parseStruct(e)},re.prototype.parsePointer32=function(e){var t=this.parseOffset32();if(0<t)return new re(this.data,this.offset+t).parseStruct(e)},re.prototype.parseListOfLists=function(e){for(var t=this,i=this.parseOffset16List(),n=i.length,r=this.relativeOffset,o=new Array(n),a=0;a<n;a++){var s=i[a];if(0!==s)if(t.relativeOffset=s,e){for(var l=t.parseOffset16List(),u=new Array(l.length),c=0;c<l.length;c++)t.relativeOffset=s+l[c],u[c]=e.call(t);o[a]=u}else o[a]=t.parseUShortList();else o[a]=void 0}return this.relativeOffset=r,o},re.prototype.parseCoverage=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort(),i=this.parseUShort();if(1===t)return{format:1,glyphs:this.parseUShortList(i)};if(2!==t)throw new Error("0x"+e.toString(16)+": Coverage format must be 1 or 2.");for(var n=new Array(i),r=0;r<i;r++)n[r]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:n}},re.prototype.parseClassDef=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(2===t)return{format:2,ranges:this.parseRecordList({start:re.uShort,end:re.uShort,classId:re.uShort})};throw new Error("0x"+e.toString(16)+": ClassDef format must be 1 or 2.")},re.list=function(e,t){return function(){return this.parseList(e,t)}},re.list32=function(e,t){return function(){return this.parseList32(e,t)}},re.recordList=function(e,t){return function(){return this.parseRecordList(e,t)}},re.recordList32=function(e,t){return function(){return this.parseRecordList32(e,t)}},re.pointer=function(e){return function(){return this.parsePointer(e)}},re.pointer32=function(e){return function(){return this.parsePointer32(e)}},re.tag=re.prototype.parseTag,re.byte=re.prototype.parseByte,re.uShort=re.offset16=re.prototype.parseUShort,re.uShortList=re.prototype.parseUShortList,re.uLong=re.offset32=re.prototype.parseULong,re.uLongList=re.prototype.parseULongList,re.struct=re.prototype.parseStruct,re.coverage=re.prototype.parseCoverage,re.classDef=re.prototype.parseClassDef;var oe={reserved:re.uShort,reqFeatureIndex:re.uShort,featureIndexes:re.uShortList};re.prototype.parseScriptList=function(){return this.parsePointer(re.recordList({tag:re.tag,script:re.pointer({defaultLangSys:re.pointer(oe),langSysRecords:re.recordList({tag:re.tag,langSys:re.pointer(oe)})})}))||[]},re.prototype.parseFeatureList=function(){return this.parsePointer(re.recordList({tag:re.tag,feature:re.pointer({featureParams:re.offset16,lookupListIndexes:re.uShortList})}))||[]},re.prototype.parseLookupList=function(e){return this.parsePointer(re.list(re.pointer((function(){var t=this.parseUShort();I.argument(1<=t&&t<=9,"GPOS/GSUB lookup type "+t+" unknown.");var i=this.parseUShort(),n=16&i;return{lookupType:t,lookupFlag:i,subtables:this.parseList(re.pointer(e[t])),markFilteringSet:n?this.parseUShort():void 0}}))))||[]},re.prototype.parseFeatureVariationsList=function(){return this.parsePointer32((function(){var e=this.parseUShort(),t=this.parseUShort();return I.argument(1===e&&t<1,"GPOS/GSUB feature variations table unknown."),this.parseRecordList32({conditionSetOffset:re.offset32,featureTableSubstitutionOffset:re.offset32})}))||[]};var ae={getByte:Z,getCard8:Z,getUShort:ee,getCard16:ee,getShort:function(e,t){return e.getInt16(t,!1)},getULong:te,getFixed:ie,getTag:function(e,t){for(var i="",n=t;n<t+4;n+=1)i+=String.fromCharCode(e.getInt8(n));return i},getOffset:function(e,t,i){for(var n=0,r=0;r<i;r+=1)n<<=8,n+=e.getUint8(t+r);return n},getBytes:function(e,t,i){for(var n=[],r=t;r<i;r+=1)n.push(e.getUint8(r));return n},bytesToString:function(e){for(var t="",i=0;i<e.length;i+=1)t+=String.fromCharCode(e[i]);return t},Parser:re},se=function(e,t){var i={};i.version=ae.getUShort(e,t),I.argument(0===i.version,"cmap table version should be 0."),i.numTables=ae.getUShort(e,t+2);for(var n=-1,r=i.numTables-1;0<=r;r-=1){var o=ae.getUShort(e,t+4+8*r),a=ae.getUShort(e,t+4+8*r+2);if(3===o&&(0===a||1===a||10===a)||0===o&&(0===a||1===a||2===a||3===a||4===a)){n=ae.getULong(e,t+4+8*r+4);break}}if(-1===n)throw new Error("No valid cmap sub-tables found.");var s=new ae.Parser(e,t+n);if(i.format=s.parseUShort(),12===i.format)!function(e,t){var i;t.parseUShort(),e.length=t.parseULong(),e.language=t.parseULong(),e.groupCount=i=t.parseULong(),e.glyphIndexMap={};for(var n=0;n<i;n+=1)for(var r=t.parseULong(),o=t.parseULong(),a=t.parseULong(),s=r;s<=o;s+=1)e.glyphIndexMap[s]=a,a++}(i,s);else{if(4!==i.format)throw new Error("Only format 4 and 12 cmap tables are supported (found format "+i.format+").");!function(e,t,i,n,r){var o;e.length=t.parseUShort(),e.language=t.parseUShort(),e.segCount=o=t.parseUShort()>>1,t.skip("uShort",3),e.glyphIndexMap={};for(var a=new ae.Parser(i,n+r+14),s=new ae.Parser(i,n+r+16+2*o),l=new ae.Parser(i,n+r+16+4*o),u=new ae.Parser(i,n+r+16+6*o),c=n+r+16+8*o,d=0;d<o-1;d+=1)for(var h=void 0,p=a.parseUShort(),f=s.parseUShort(),g=l.parseShort(),m=u.parseUShort(),v=f;v<=p;v+=1)0!==m?(c=u.offset+u.relativeOffset-2,c+=m,c+=2*(v-f),0!==(h=ae.getUShort(i,c))&&(h=h+g&65535)):h=v+g&65535,e.glyphIndexMap[v]=h}(i,s,e,t,n)}return i},le=function(e){var t,i=!0;for(t=e.length-1;0<t;t-=1)if(65535<e.get(t).unicode){console.log("Adding CMAP format 12 (needed!)"),i=!1;break}var n=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:i?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:i?12:20}];i||(n=n.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),n=n.concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);var r,o,a,s=new Q.Table("cmap",n);for(s.segments=[],t=0;t<e.length;t+=1){for(var l=e.get(t),u=0;u<l.unicodes.length;u+=1)r=s,o=l.unicodes[u],a=t,r.segments.push({end:o,start:o,delta:-(o-a),offset:0,glyphIndex:a});s.segments=s.segments.sort((function(e,t){return e.start-t.start}))}s.segments.push({end:65535,start:65535,delta:1,offset:0});var c=s.segments.length,d=0,h=[],p=[],f=[],g=[],m=[],v=[];for(t=0;t<c;t+=1){var y=s.segments[t];y.end<=65535&&y.start<=65535?(h=h.concat({name:"end_"+t,type:"USHORT",value:y.end}),p=p.concat({name:"start_"+t,type:"USHORT",value:y.start}),f=f.concat({name:"idDelta_"+t,type:"SHORT",value:y.delta}),g=g.concat({name:"idRangeOffset_"+t,type:"USHORT",value:y.offset}),void 0!==y.glyphId&&(m=m.concat({name:"glyph_"+t,type:"USHORT",value:y.glyphId}))):d+=1,i||void 0===y.glyphIndex||(v=(v=(v=v.concat({name:"cmap12Start_"+t,type:"ULONG",value:y.start})).concat({name:"cmap12End_"+t,type:"ULONG",value:y.end})).concat({name:"cmap12Glyph_"+t,type:"ULONG",value:y.glyphIndex}))}if(s.segCountX2=2*(c-d),s.searchRange=2*Math.pow(2,Math.floor(Math.log(c-d)/Math.log(2))),s.entrySelector=Math.log(s.searchRange/2)/Math.log(2),s.rangeShift=s.segCountX2-s.searchRange,s.fields=s.fields.concat(h),s.fields.push({name:"reservedPad",type:"USHORT",value:0}),s.fields=s.fields.concat(p),s.fields=s.fields.concat(f),s.fields=s.fields.concat(g),s.fields=s.fields.concat(m),s.cmap4Length=14+2*h.length+2+2*p.length+2*f.length+2*g.length+2*m.length,!i){var b=16+4*v.length;s.cmap12Offset=20+s.cmap4Length,s.fields=s.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:b},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:v.length/3}]),s.fields=s.fields.concat(v)}return s},ue=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],ce=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],de=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],he=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function pe(e){this.font=e}function fe(e){this.cmap=e}function ge(e,t){this.encoding=e,this.charset=t}function me(e){switch(e.version){case 1:this.names=he.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(var t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<he.length?this.names[t]=he[e.glyphNameIndex[t]]:this.names[t]=e.names[e.glyphNameIndex[t]-he.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(var i=0;i<e.numberOfGlyphs;i++)this.names[i]=he[i+e.glyphNameIndex[i]];break;case 3:default:this.names=[]}}pe.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),i=this.font.glyphs;if(i)for(var n=0;n<i.length;n+=1)for(var r=i.get(n),o=0;o<r.unicodes.length;o+=1)if(r.unicodes[o]===t)return n;return null},fe.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.codePointAt(0)]||0},ge.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),i=this.encoding[t];return this.charset.indexOf(i)},me.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},me.prototype.glyphIndexToName=function(e){return this.names[e]};var ve=function(e,t,i,n,r){e.beginPath(),e.moveTo(t,i),e.lineTo(n,r),e.stroke()};function ye(e){this.bindConstructorValues(e)}function be(e,t,i){Object.defineProperty(e,t,{get:function(){return e.path,e[i]},set:function(t){e[i]=t},enumerable:!0,configurable:!0})}function we(e,t){if(this.font=e,this.glyphs={},Array.isArray(t))for(var i=0;i<t.length;i++)this.glyphs[i]=t[i];this.length=t&&t.length||0}ye.prototype.bindConstructorValues=function(e){var t,i;this.index=e.index||0,this.name=e.name||null,this.unicode=e.unicode||void 0,this.unicodes=e.unicodes||void 0!==e.unicode?[e.unicode]:[],e.xMin&&(this.xMin=e.xMin),e.yMin&&(this.yMin=e.yMin),e.xMax&&(this.xMax=e.xMax),e.yMax&&(this.yMax=e.yMax),e.advanceWidth&&(this.advanceWidth=e.advanceWidth),Object.defineProperty(this,"path",(t=e.path,i=t||new x,{configurable:!0,get:function(){return"function"==typeof i&&(i=i()),i},set:function(e){i=e}}))},ye.prototype.addUnicode=function(e){0===this.unicodes.length&&(this.unicode=e),this.unicodes.push(e)},ye.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},ye.prototype.getPath=function(e,t,i,n,r){var o,a;e=void 0!==e?e:0,t=void 0!==t?t:0,i=void 0!==i?i:72,n||(n={});var s=n.xScale,l=n.yScale;if(n.hinting&&r&&r.hinting&&(a=this.path&&r.hinting.exec(this,i)),a)o=r.hinting.getCommands(a),e=Math.round(e),t=Math.round(t),s=l=1;else{o=this.path.commands;var u=1/this.path.unitsPerEm*i;void 0===s&&(s=u),void 0===l&&(l=u)}for(var c=new x,d=0;d<o.length;d+=1){var h=o[d];"M"===h.type?c.moveTo(e+h.x*s,t+-h.y*l):"L"===h.type?c.lineTo(e+h.x*s,t+-h.y*l):"Q"===h.type?c.quadraticCurveTo(e+h.x1*s,t+-h.y1*l,e+h.x*s,t+-h.y*l):"C"===h.type?c.curveTo(e+h.x1*s,t+-h.y1*l,e+h.x2*s,t+-h.y2*l,e+h.x*s,t+-h.y*l):"Z"===h.type&&c.closePath()}return c},ye.prototype.getContours=function(){if(void 0===this.points)return[];for(var e=[],t=[],i=0;i<this.points.length;i+=1){var n=this.points[i];t.push(n),n.lastPointOfContour&&(e.push(t),t=[])}return I.argument(0===t.length,"There are still points left in the current contour."),e},ye.prototype.getMetrics=function(){for(var e=this.path.commands,t=[],i=[],n=0;n<e.length;n+=1){var r=e[n];"Z"!==r.type&&(t.push(r.x),i.push(r.y)),"Q"!==r.type&&"C"!==r.type||(t.push(r.x1),i.push(r.y1)),"C"===r.type&&(t.push(r.x2),i.push(r.y2))}var o={xMin:Math.min.apply(null,t),yMin:Math.min.apply(null,i),xMax:Math.max.apply(null,t),yMax:Math.max.apply(null,i),leftSideBearing:this.leftSideBearing};return isFinite(o.xMin)||(o.xMin=0),isFinite(o.xMax)||(o.xMax=this.advanceWidth),isFinite(o.yMin)||(o.yMin=0),isFinite(o.yMax)||(o.yMax=0),o.rightSideBearing=this.advanceWidth-o.leftSideBearing-(o.xMax-o.xMin),o},ye.prototype.draw=function(e,t,i,n,r){this.getPath(t,i,n,r).draw(e)},ye.prototype.drawPoints=function(e,t,i,n){function r(t,i,n,r){var o=2*Math.PI;e.beginPath();for(var a=0;a<t.length;a+=1)e.moveTo(i+t[a].x*r,n+t[a].y*r),e.arc(i+t[a].x*r,n+t[a].y*r,2,0,o,!1);e.closePath(),e.fill()}t=void 0!==t?t:0,i=void 0!==i?i:0,n=void 0!==n?n:24;for(var o=1/this.path.unitsPerEm*n,a=[],s=[],l=this.path,u=0;u<l.commands.length;u+=1){var c=l.commands[u];void 0!==c.x&&a.push({x:c.x,y:-c.y}),void 0!==c.x1&&s.push({x:c.x1,y:-c.y1}),void 0!==c.x2&&s.push({x:c.x2,y:-c.y2})}e.fillStyle="blue",r(a,t,i,o),e.fillStyle="red",r(s,t,i,o)},ye.prototype.drawMetrics=function(e,t,i,n){var r;t=void 0!==t?t:0,i=void 0!==i?i:0,n=void 0!==n?n:24,r=1/this.path.unitsPerEm*n,e.lineWidth=1,e.strokeStyle="black",ve(e,t,-1e4,t,1e4),ve(e,-1e4,i,1e4,i);var o=this.xMin||0,a=this.yMin||0,s=this.xMax||0,l=this.yMax||0,u=this.advanceWidth||0;e.strokeStyle="blue",ve(e,t+o*r,-1e4,t+o*r,1e4),ve(e,t+s*r,-1e4,t+s*r,1e4),ve(e,-1e4,i+-a*r,1e4,i+-a*r),ve(e,-1e4,i+-l*r,1e4,i+-l*r),e.strokeStyle="green",ve(e,t+u*r,-1e4,t+u*r,1e4)},we.prototype.get=function(e){return"function"==typeof this.glyphs[e]&&(this.glyphs[e]=this.glyphs[e]()),this.glyphs[e]},we.prototype.push=function(e,t){this.glyphs[e]=t,this.length++};var Ee={GlyphSet:we,glyphLoader:function(e,t){return new ye({index:t,font:e})},ttfGlyphLoader:function(e,t,i,n,r,o){return function(){var a=new ye({index:t,font:e});return a.path=function(){i(a,n,r);var t=o(e.glyphs,a);return t.unitsPerEm=e.unitsPerEm,t},be(a,"xMin","_xMin"),be(a,"xMax","_xMax"),be(a,"yMin","_yMin"),be(a,"yMax","_yMax"),a}},cffGlyphLoader:function(e,t,i,n){return function(){var r=new ye({index:t,font:e});return r.path=function(){var t=i(e,r,n);return t.unitsPerEm=e.unitsPerEm,t},r}}};function _e(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i+=1)if(!_e(e[i],t[i]))return!1;return!0}return!1}function Se(e){return e.length<1240?107:e.length<33900?1131:32768}function Te(e,t,i){var n,r,o=[],a=[],s=ae.getCard16(e,t);if(0!==s){var l=ae.getByte(e,t+2);n=t+(s+1)*l+2;for(var u=t+3,c=0;c<s+1;c+=1)o.push(ae.getOffset(e,u,l)),u+=l;r=n+o[s]}else r=t+2;for(var d=0;d<o.length-1;d+=1){var h=ae.getBytes(e,n+o[d],n+o[d+1]);i&&(h=i(h)),a.push(h)}return{objects:a,startOffset:t,endOffset:r}}function Ce(e,t){if(28===t)return e.parseByte()<<8|e.parseByte();if(29===t)return e.parseByte()<<24|e.parseByte()<<16|e.parseByte()<<8|e.parseByte();if(30===t)return function(e){for(var t="",i=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var n=e.parseByte(),r=n>>4,o=15&n;if(15===r)break;if(t+=i[r],15===o)break;t+=i[o]}return parseFloat(t)}(e);if(32<=t&&t<=246)return t-139;if(247<=t&&t<=250)return 256*(t-247)+e.parseByte()+108;if(251<=t&&t<=254)return 256*-(t-251)-e.parseByte()-108;throw new Error("Invalid b0 "+t)}function ke(e,t,i){t=void 0!==t?t:0;var n=new ae.Parser(e,t),r=[],o=[];for(i=void 0!==i?i:e.length;n.relativeOffset<i;){var a=n.parseByte();a<=21?(12===a&&(a=1200+n.parseByte()),r.push([a,o]),o=[]):o.push(Ce(n,a))}return function(e){for(var t={},i=0;i<e.length;i+=1){var n,r=e[i][0],o=e[i][1];if(n=1===o.length?o[0]:o,t.hasOwnProperty(r)&&!isNaN(t[r]))throw new Error("Object "+t+" already has key "+r);t[r]=n}return t}(r)}function xe(e,t){return t<=390?ue[t]:e[t-391]}function Ae(e,t,i){for(var n,r={},o=0;o<t.length;o+=1){var a=t[o];if(Array.isArray(a.type)){var s=[];s.length=a.type.length;for(var l=0;l<a.type.length;l++)void 0===(n=void 0!==e[a.op]?e[a.op][l]:void 0)&&(n=void 0!==a.value&&void 0!==a.value[l]?a.value[l]:null),"SID"===a.type[l]&&(n=xe(i,n)),s[l]=n;r[a.name]=s}else void 0===(n=e[a.op])&&(n=void 0!==a.value?a.value:null),"SID"===a.type&&(n=xe(i,n)),r[a.name]=n}return r}var Pe=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],Ie=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function Re(e,t,i,n){return Ae(ke(e,t,i),Ie,n)}function De(e,t,i,n){for(var r,o,a=[],s=0;s<i.length;s+=1){var l=(o=n,Ae(ke(r=new DataView(new Uint8Array(i[s]).buffer),0,r.byteLength),Pe,o));l._subrs=[],l._subrsBias=0;var u=l.private[0],c=l.private[1];if(0!==u&&0!==c){var d=Re(e,c+t,u,n);if(l._defaultWidthX=d.defaultWidthX,l._nominalWidthX=d.nominalWidthX,0!==d.subrs){var h=Te(e,c+d.subrs+t);l._subrs=h.objects,l._subrsBias=Se(l._subrs)}l._privateDict=d}a.push(l)}return a}function Oe(e,t,i){var n,r,o,a,s,l,u,c,d=new x,h=[],p=0,f=!1,g=!1,m=0,v=0;if(e.isCIDFont){var y=e.tables.cff.topDict._fdSelect[t.index],b=e.tables.cff.topDict._fdArray[y];s=b._subrs,l=b._subrsBias,u=b._defaultWidthX,c=b._nominalWidthX}else s=e.tables.cff.topDict._subrs,l=e.tables.cff.topDict._subrsBias,u=e.tables.cff.topDict._defaultWidthX,c=e.tables.cff.topDict._nominalWidthX;var w=u;function E(e,t){g&&d.closePath(),d.moveTo(e,t),g=!0}function _(){h.length%2!=0&&!f&&(w=h.shift()+c),p+=h.length>>1,h.length=0,f=!0}return function i(u){for(var y,b,S,T,C,k,x,A,P,I,R,D,O=0;O<u.length;){var N=u[O];switch(O+=1,N){case 1:case 3:_();break;case 4:1<h.length&&!f&&(w=h.shift()+c,f=!0),v+=h.pop(),E(m,v);break;case 5:for(;0<h.length;)m+=h.shift(),v+=h.shift(),d.lineTo(m,v);break;case 6:for(;0<h.length&&(m+=h.shift(),d.lineTo(m,v),0!==h.length);)v+=h.shift(),d.lineTo(m,v);break;case 7:for(;0<h.length&&(v+=h.shift(),d.lineTo(m,v),0!==h.length);)m+=h.shift(),d.lineTo(m,v);break;case 8:for(;0<h.length;)n=m+h.shift(),r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),m=o+h.shift(),v=a+h.shift(),d.curveTo(n,r,o,a,m,v);break;case 10:C=h.pop()+l,(k=s[C])&&i(k);break;case 11:return;case 12:switch(N=u[O],O+=1,N){case 35:n=m+h.shift(),r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),x=o+h.shift(),A=a+h.shift(),P=x+h.shift(),I=A+h.shift(),R=P+h.shift(),D=I+h.shift(),m=R+h.shift(),v=D+h.shift(),h.shift(),d.curveTo(n,r,o,a,x,A),d.curveTo(P,I,R,D,m,v);break;case 34:n=m+h.shift(),r=v,o=n+h.shift(),a=r+h.shift(),x=o+h.shift(),A=a,P=x+h.shift(),I=a,R=P+h.shift(),D=v,m=R+h.shift(),d.curveTo(n,r,o,a,x,A),d.curveTo(P,I,R,D,m,v);break;case 36:n=m+h.shift(),r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),x=o+h.shift(),A=a,P=x+h.shift(),I=a,R=P+h.shift(),D=I+h.shift(),m=R+h.shift(),d.curveTo(n,r,o,a,x,A),d.curveTo(P,I,R,D,m,v);break;case 37:n=m+h.shift(),r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),x=o+h.shift(),A=a+h.shift(),P=x+h.shift(),I=A+h.shift(),R=P+h.shift(),D=I+h.shift(),Math.abs(R-m)>Math.abs(D-v)?m=R+h.shift():v=D+h.shift(),d.curveTo(n,r,o,a,x,A),d.curveTo(P,I,R,D,m,v);break;default:console.log("Glyph "+t.index+": unknown operator 1200"+N),h.length=0}break;case 14:0<h.length&&!f&&(w=h.shift()+c,f=!0),g&&(d.closePath(),g=!1);break;case 18:_();break;case 19:case 20:_(),O+=p+7>>3;break;case 21:2<h.length&&!f&&(w=h.shift()+c,f=!0),v+=h.pop(),E(m+=h.pop(),v);break;case 22:1<h.length&&!f&&(w=h.shift()+c,f=!0),E(m+=h.pop(),v);break;case 23:_();break;case 24:for(;2<h.length;)n=m+h.shift(),r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),m=o+h.shift(),v=a+h.shift(),d.curveTo(n,r,o,a,m,v);m+=h.shift(),v+=h.shift(),d.lineTo(m,v);break;case 25:for(;6<h.length;)m+=h.shift(),v+=h.shift(),d.lineTo(m,v);n=m+h.shift(),r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),m=o+h.shift(),v=a+h.shift(),d.curveTo(n,r,o,a,m,v);break;case 26:for(h.length%2&&(m+=h.shift());0<h.length;)n=m,r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),m=o,v=a+h.shift(),d.curveTo(n,r,o,a,m,v);break;case 27:for(h.length%2&&(v+=h.shift());0<h.length;)n=m+h.shift(),r=v,o=n+h.shift(),a=r+h.shift(),m=o+h.shift(),v=a,d.curveTo(n,r,o,a,m,v);break;case 28:y=u[O],b=u[O+1],h.push((y<<24|b<<16)>>16),O+=2;break;case 29:C=h.pop()+e.gsubrsBias,(k=e.gsubrs[C])&&i(k);break;case 30:for(;0<h.length&&(n=m,r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),m=o+h.shift(),v=a+(1===h.length?h.shift():0),d.curveTo(n,r,o,a,m,v),0!==h.length);)n=m+h.shift(),r=v,o=n+h.shift(),a=r+h.shift(),v=a+h.shift(),m=o+(1===h.length?h.shift():0),d.curveTo(n,r,o,a,m,v);break;case 31:for(;0<h.length&&(n=m+h.shift(),r=v,o=n+h.shift(),a=r+h.shift(),v=a+h.shift(),m=o+(1===h.length?h.shift():0),d.curveTo(n,r,o,a,m,v),0!==h.length);)n=m,r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),m=o+h.shift(),v=a+(1===h.length?h.shift():0),d.curveTo(n,r,o,a,m,v);break;default:N<32?console.log("Glyph "+t.index+": unknown operator "+N):N<247?h.push(N-139):N<251?(y=u[O],O+=1,h.push(256*(N-247)+y+108)):N<255?(y=u[O],O+=1,h.push(256*-(N-251)-y-108)):(y=u[O],b=u[O+1],S=u[O+2],T=u[O+3],O+=4,h.push((y<<24|b<<16|S<<8|T)/65536))}}}(i),t.advanceWidth=w,d}function Ne(e,t){var i,n=ue.indexOf(e);return 0<=n&&(i=n),0<=(n=t.indexOf(e))?i=n+ue.length:(i=ue.length+t.length,t.push(e)),i}function Le(e,t,i){for(var n={},r=0;r<e.length;r+=1){var o=e[r],a=t[o.name];void 0===a||_e(a,o.value)||("SID"===o.type&&(a=Ne(a,i)),n[o.op]={name:o.name,type:o.type,value:a})}return n}function Me(e,t){var i=new Q.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return i.dict=Le(Pe,e,t),i}function Fe(e){var t=new Q.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return t.topDicts=[{name:"topDict_0",type:"TABLE",value:e}],t}function Ue(e){var t=[],i=e.path;t.push({name:"width",type:"NUMBER",value:e.advanceWidth});for(var n=0,r=0,o=0;o<i.commands.length;o+=1){var a=void 0,s=void 0,l=i.commands[o];if("Q"===l.type&&(l={type:"C",x:l.x,y:l.y,x1:1/3*n+2/3*l.x1,y1:1/3*r+2/3*l.y1,x2:1/3*l.x+2/3*l.x1,y2:1/3*l.y+2/3*l.y1}),"M"===l.type)a=Math.round(l.x-n),s=Math.round(l.y-r),t.push({name:"dx",type:"NUMBER",value:a}),t.push({name:"dy",type:"NUMBER",value:s}),t.push({name:"rmoveto",type:"OP",value:21}),n=Math.round(l.x),r=Math.round(l.y);else if("L"===l.type)a=Math.round(l.x-n),s=Math.round(l.y-r),t.push({name:"dx",type:"NUMBER",value:a}),t.push({name:"dy",type:"NUMBER",value:s}),t.push({name:"rlineto",type:"OP",value:5}),n=Math.round(l.x),r=Math.round(l.y);else if("C"===l.type){var u=Math.round(l.x1-n),c=Math.round(l.y1-r),d=Math.round(l.x2-l.x1),h=Math.round(l.y2-l.y1);a=Math.round(l.x-l.x2),s=Math.round(l.y-l.y2),t.push({name:"dx1",type:"NUMBER",value:u}),t.push({name:"dy1",type:"NUMBER",value:c}),t.push({name:"dx2",type:"NUMBER",value:d}),t.push({name:"dy2",type:"NUMBER",value:h}),t.push({name:"dx",type:"NUMBER",value:a}),t.push({name:"dy",type:"NUMBER",value:s}),t.push({name:"rrcurveto",type:"OP",value:8}),n=Math.round(l.x),r=Math.round(l.y)}}return t.push({name:"endchar",type:"OP",value:14}),t}var Be=function(e,t,i){i.tables.cff={};var n,r,o,a=Te(e,Te(e,(n=e,r=t,(o={}).formatMajor=ae.getCard8(n,r),o.formatMinor=ae.getCard8(n,r+1),o.size=ae.getCard8(n,r+2),o.offsetSize=ae.getCard8(n,r+3),o.startOffset=r,o.endOffset=r+4,o).endOffset,ae.bytesToString).endOffset),s=Te(e,a.endOffset,ae.bytesToString),l=Te(e,s.endOffset);i.gsubrs=l.objects,i.gsubrsBias=Se(i.gsubrs);var u=De(e,t,a.objects,s.objects);if(1!==u.length)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+u.length);var c=u[0];if((i.tables.cff.topDict=c)._privateDict&&(i.defaultWidthX=c._privateDict.defaultWidthX,i.nominalWidthX=c._privateDict.nominalWidthX),void 0!==c.ros[0]&&void 0!==c.ros[1]&&(i.isCIDFont=!0),i.isCIDFont){var d=c.fdArray,h=c.fdSelect;if(0===d||0===h)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");var p=De(e,t,Te(e,d+=t).objects,s.objects);c._fdArray=p,h+=t,c._fdSelect=function(e,t,i,n){var r,o=[],a=new ae.Parser(e,t),s=a.parseCard8();if(0===s)for(var l=0;l<i;l++){if(n<=(r=a.parseCard8()))throw new Error("CFF table CID Font FDSelect has bad FD index value "+r+" (FD count "+n+")");o.push(r)}else{if(3!==s)throw new Error("CFF Table CID Font FDSelect table has unsupported format "+s);var u,c=a.parseCard16(),d=a.parseCard16();if(0!==d)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+d);for(var h=0;h<c;h++){if(r=a.parseCard8(),u=a.parseCard16(),n<=r)throw new Error("CFF table CID Font FDSelect has bad FD index value "+r+" (FD count "+n+")");if(i<u)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+u);for(;d<u;d++)o.push(r);d=u}if(u!==i)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+u)}return o}(e,h,i.numGlyphs,p.length)}var f=t+c.private[1],g=Re(e,f,c.private[0],s.objects);if(i.defaultWidthX=g.defaultWidthX,i.nominalWidthX=g.nominalWidthX,0!==g.subrs){var m=Te(e,f+g.subrs);i.subrs=m.objects,i.subrsBias=Se(i.subrs)}else i.subrs=[],i.subrsBias=0;var v=Te(e,t+c.charStrings);i.nGlyphs=v.objects.length;var y=function(e,t,i,n){var r,o,a=new ae.Parser(e,t);i-=1;var s=[".notdef"],l=a.parseCard8();if(0===l)for(var u=0;u<i;u+=1)r=a.parseSID(),s.push(xe(n,r));else if(1===l)for(;s.length<=i;){r=a.parseSID(),o=a.parseCard8();for(var c=0;c<=o;c+=1)s.push(xe(n,r)),r+=1}else{if(2!==l)throw new Error("Unknown charset format "+l);for(;s.length<=i;){r=a.parseSID(),o=a.parseCard16();for(var d=0;d<=o;d+=1)s.push(xe(n,r)),r+=1}}return s}(e,t+c.charset,i.nGlyphs,s.objects);0===c.encoding?i.cffEncoding=new ge(ce,y):1===c.encoding?i.cffEncoding=new ge(de,y):i.cffEncoding=function(e,t,i){var n,r={},o=new ae.Parser(e,t),a=o.parseCard8();if(0===a)for(var s=o.parseCard8(),l=0;l<s;l+=1)r[n=o.parseCard8()]=l;else{if(1!==a)throw new Error("Unknown encoding format "+a);var u=o.parseCard8();n=1;for(var c=0;c<u;c+=1)for(var d=o.parseCard8(),h=o.parseCard8(),p=d;p<=d+h;p+=1)r[p]=n,n+=1}return new ge(r,i)}(e,t+c.encoding,y),i.encoding=i.encoding||i.cffEncoding,i.glyphs=new Ee.GlyphSet(i);for(var b=0;b<i.nGlyphs;b+=1){var w=v.objects[b];i.glyphs.push(b,Ee.cffGlyphLoader(i,b,Oe,w))}},Ve=function(e,t){for(var i,n=new Q.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),r=1/t.unitsPerEm,o={version:t.version,fullName:t.fullName,familyName:t.familyName,weight:t.weightName,fontBBox:t.fontBBox||[0,0,0,0],fontMatrix:[r,0,0,r,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},a=[],s=1;s<e.length;s+=1)i=e.get(s),a.push(i.name);var l=[];n.header=new Q.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}]),n.nameIndex=function(e){var t=new Q.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);t.names=[];for(var i=0;i<e.length;i+=1)t.names.push({name:"name_"+i,type:"NAME",value:e[i]});return t}([t.postScriptName]);var u,c,d,h=Me(o,l);n.topDictIndex=Fe(h),n.globalSubrIndex=new Q.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}]),n.charsets=function(e,t){for(var i=new Q.Record("Charsets",[{name:"format",type:"Card8",value:0}]),n=0;n<e.length;n+=1){var r=Ne(e[n],t);i.fields.push({name:"glyph_"+n,type:"SID",value:r})}return i}(a,l),n.charStringsIndex=function(e){for(var t=new Q.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),i=0;i<e.length;i+=1){var n=e.get(i),r=Ue(n);t.charStrings.push({name:n.name,type:"CHARSTRING",value:r})}return t}(e),n.privateDict=(u={},c=l,(d=new Q.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}])).dict=Le(Ie,u,c),d),n.stringIndex=function(e){var t=new Q.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);t.strings=[];for(var i=0;i<e.length;i+=1)t.strings.push({name:"string_"+i,type:"STRING",value:e[i]});return t}(l);var p=n.header.sizeOf()+n.nameIndex.sizeOf()+n.topDictIndex.sizeOf()+n.stringIndex.sizeOf()+n.globalSubrIndex.sizeOf();return o.charset=p,o.encoding=0,o.charStrings=o.charset+n.charsets.sizeOf(),o.private[1]=o.charStrings+n.charStringsIndex.sizeOf(),h=Me(o,l),n.topDictIndex=Fe(h),n},ze=function(e,t){var i={},n=new ae.Parser(e,t);return i.version=n.parseVersion(),i.fontRevision=Math.round(1e3*n.parseFixed())/1e3,i.checkSumAdjustment=n.parseULong(),i.magicNumber=n.parseULong(),I.argument(1594834165===i.magicNumber,"Font header has wrong magic number."),i.flags=n.parseUShort(),i.unitsPerEm=n.parseUShort(),i.created=n.parseLongDateTime(),i.modified=n.parseLongDateTime(),i.xMin=n.parseShort(),i.yMin=n.parseShort(),i.xMax=n.parseShort(),i.yMax=n.parseShort(),i.macStyle=n.parseUShort(),i.lowestRecPPEM=n.parseUShort(),i.fontDirectionHint=n.parseShort(),i.indexToLocFormat=n.parseShort(),i.glyphDataFormat=n.parseShort(),i},He=function(e){var t=Math.round((new Date).getTime()/1e3)+2082844800,i=t;return e.createdTimestamp&&(i=e.createdTimestamp+2082844800),new Q.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:i},{name:"modified",type:"LONGDATETIME",value:t},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],e)},je=function(e,t){var i={},n=new ae.Parser(e,t);return i.version=n.parseVersion(),i.ascender=n.parseShort(),i.descender=n.parseShort(),i.lineGap=n.parseShort(),i.advanceWidthMax=n.parseUShort(),i.minLeftSideBearing=n.parseShort(),i.minRightSideBearing=n.parseShort(),i.xMaxExtent=n.parseShort(),i.caretSlopeRise=n.parseShort(),i.caretSlopeRun=n.parseShort(),i.caretOffset=n.parseShort(),n.relativeOffset+=8,i.metricDataFormat=n.parseShort(),i.numberOfHMetrics=n.parseUShort(),i},qe=function(e){return new Q.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],e)},Ge=function(e,t,i,n,r){for(var o,a,s=new ae.Parser(e,t),l=0;l<n;l+=1){l<i&&(o=s.parseUShort(),a=s.parseShort());var u=r.get(l);u.advanceWidth=o,u.leftSideBearing=a}},We=function(e){for(var t=new Q.Table("hmtx",[]),i=0;i<e.length;i+=1){var n=e.get(i),r=n.advanceWidth||0,o=n.leftSideBearing||0;t.fields.push({name:"advanceWidth_"+i,type:"USHORT",value:r}),t.fields.push({name:"leftSideBearing_"+i,type:"SHORT",value:o})}return t},$e=function(e){for(var t=new Q.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:e.length}]),i="",n=12+4*e.length,r=0;r<e.length;++r){var o=i.indexOf(e[r]);o<0&&(o=i.length,i+=e[r]),t.fields.push({name:"offset "+r,type:"USHORT",value:n+o}),t.fields.push({name:"length "+r,type:"USHORT",value:e[r].length})}return t.fields.push({name:"stringPool",type:"CHARARRAY",value:i}),t},Ye=function(e,t){var i=new ae.Parser(e,t),n=i.parseULong();I.argument(1===n,"Unsupported ltag table version."),i.skip("uLong",1);for(var r=i.parseULong(),o=[],a=0;a<r;a++){for(var s="",l=t+i.parseUShort(),u=i.parseUShort(),c=l;c<l+u;++c)s+=String.fromCharCode(e.getInt8(c));o.push(s)}return o},Ke=function(e,t){var i={},n=new ae.Parser(e,t);return i.version=n.parseVersion(),i.numGlyphs=n.parseUShort(),1===i.version&&(i.maxPoints=n.parseUShort(),i.maxContours=n.parseUShort(),i.maxCompositePoints=n.parseUShort(),i.maxCompositeContours=n.parseUShort(),i.maxZones=n.parseUShort(),i.maxTwilightPoints=n.parseUShort(),i.maxStorage=n.parseUShort(),i.maxFunctionDefs=n.parseUShort(),i.maxInstructionDefs=n.parseUShort(),i.maxStackElements=n.parseUShort(),i.maxSizeOfInstructions=n.parseUShort(),i.maxComponentElements=n.parseUShort(),i.maxComponentDepth=n.parseUShort()),i},Je=function(e){return new Q.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:e}])},Xe=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],Qe={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},Ze={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},et={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",1040:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"};function tt(e,t,i){switch(e){case 0:if(65535===t)return"und";if(i)return i[t];break;case 1:return Qe[t];case 3:return et[t]}}var it="utf-16",nt={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},rt={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function ot(e,t,i){switch(e){case 0:return it;case 1:return rt[i]||nt[t];case 3:if(1===t||10===t)return it}}function at(e){var t={};for(var i in e)t[e[i]]=parseInt(i);return t}function st(e,t,i,n,r,o){return new Q.Record("NameRecord",[{name:"platformID",type:"USHORT",value:e},{name:"encodingID",type:"USHORT",value:t},{name:"languageID",type:"USHORT",value:i},{name:"nameID",type:"USHORT",value:n},{name:"length",type:"USHORT",value:r},{name:"offset",type:"USHORT",value:o}])}function lt(e,t){var i=function(e,t){var i=e.length,n=t.length-i+1;e:for(var r=0;r<n;r++)for(;r<n;r++){for(var o=0;o<i;o++)if(t[r+o]!==e[o])continue e;return r}return-1}(e,t);if(i<0){i=t.length;for(var n=0,r=e.length;n<r;++n)t.push(e[n])}return i}var ut=function(e,t,i){for(var n={},r=new ae.Parser(e,t),o=r.parseUShort(),a=r.parseUShort(),s=r.offset+r.parseUShort(),l=0;l<a;l++){var u,c=r.parseUShort(),d=r.parseUShort(),h=r.parseUShort(),p=r.parseUShort(),f=Xe[p]||p,g=r.parseUShort(),m=r.parseUShort(),v=tt(c,h,i),y=ot(c,d,h);if(void 0!==y&&void 0!==v)if(u=y===it?D.UTF16(e,s+m,g):D.MACSTRING(e,s+m,g,y)){var b=n[f];void 0===b&&(b=n[f]={}),b[v]=u}}return 1===o&&r.parseUShort(),n},ct=function(e,t){var i,n=[],r={},o=at(Xe);for(var a in e){var s=o[a];if(void 0===s&&(s=a),i=parseInt(s),isNaN(i))throw new Error('Name table entry "'+a+'" does not exist, see nameTableNames for complete list.');r[i]=e[a],n.push(i)}for(var l=at(Qe),u=at(et),c=[],d=[],h=0;h<n.length;h++){var p=r[i=n[h]];for(var f in p){var g=p[f],m=1,v=l[f],y=Ze[v],b=ot(m,y,v),w=O.MACSTRING(g,b);void 0===w&&(m=0,(v=t.indexOf(f))<0&&(v=t.length,t.push(f)),y=4,w=O.UTF16(g));var E=lt(w,d);c.push(st(m,y,v,i,w.length,E));var _=u[f];if(void 0!==_){var S=O.UTF16(g),T=lt(S,d);c.push(st(3,1,_,i,S.length,T))}}}c.sort((function(e,t){return e.platformID-t.platformID||e.encodingID-t.encodingID||e.languageID-t.languageID||e.nameID-t.nameID}));for(var C=new Q.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:c.length},{name:"stringOffset",type:"USHORT",value:6+12*c.length}]),k=0;k<c.length;k++)C.fields.push({name:"record_"+k,type:"RECORD",value:c[k]});return C.fields.push({name:"strings",type:"LITERAL",value:d}),C},dt=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}],ht=function(e,t){var i={},n=new ae.Parser(e,t);i.version=n.parseUShort(),i.xAvgCharWidth=n.parseShort(),i.usWeightClass=n.parseUShort(),i.usWidthClass=n.parseUShort(),i.fsType=n.parseUShort(),i.ySubscriptXSize=n.parseShort(),i.ySubscriptYSize=n.parseShort(),i.ySubscriptXOffset=n.parseShort(),i.ySubscriptYOffset=n.parseShort(),i.ySuperscriptXSize=n.parseShort(),i.ySuperscriptYSize=n.parseShort(),i.ySuperscriptXOffset=n.parseShort(),i.ySuperscriptYOffset=n.parseShort(),i.yStrikeoutSize=n.parseShort(),i.yStrikeoutPosition=n.parseShort(),i.sFamilyClass=n.parseShort(),i.panose=[];for(var r=0;r<10;r++)i.panose[r]=n.parseByte();return i.ulUnicodeRange1=n.parseULong(),i.ulUnicodeRange2=n.parseULong(),i.ulUnicodeRange3=n.parseULong(),i.ulUnicodeRange4=n.parseULong(),i.achVendID=String.fromCharCode(n.parseByte(),n.parseByte(),n.parseByte(),n.parseByte()),i.fsSelection=n.parseUShort(),i.usFirstCharIndex=n.parseUShort(),i.usLastCharIndex=n.parseUShort(),i.sTypoAscender=n.parseShort(),i.sTypoDescender=n.parseShort(),i.sTypoLineGap=n.parseShort(),i.usWinAscent=n.parseUShort(),i.usWinDescent=n.parseUShort(),1<=i.version&&(i.ulCodePageRange1=n.parseULong(),i.ulCodePageRange2=n.parseULong()),2<=i.version&&(i.sxHeight=n.parseShort(),i.sCapHeight=n.parseShort(),i.usDefaultChar=n.parseUShort(),i.usBreakChar=n.parseUShort(),i.usMaxContent=n.parseUShort()),i},pt=function(e){return new Q.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],e)},ft=function(e){for(var t=0;t<dt.length;t+=1){var i=dt[t];if(e>=i.begin&&e<i.end)return t}return-1},gt=function(e,t){var i={},n=new ae.Parser(e,t);switch(i.version=n.parseVersion(),i.italicAngle=n.parseFixed(),i.underlinePosition=n.parseShort(),i.underlineThickness=n.parseShort(),i.isFixedPitch=n.parseULong(),i.minMemType42=n.parseULong(),i.maxMemType42=n.parseULong(),i.minMemType1=n.parseULong(),i.maxMemType1=n.parseULong(),i.version){case 1:i.names=he.slice();break;case 2:i.numberOfGlyphs=n.parseUShort(),i.glyphNameIndex=new Array(i.numberOfGlyphs);for(var r=0;r<i.numberOfGlyphs;r++)i.glyphNameIndex[r]=n.parseUShort();i.names=[];for(var o=0;o<i.numberOfGlyphs;o++)if(i.glyphNameIndex[o]>=he.length){var a=n.parseChar();i.names.push(n.parseString(a))}break;case 2.5:i.numberOfGlyphs=n.parseUShort(),i.offset=new Array(i.numberOfGlyphs);for(var s=0;s<i.numberOfGlyphs;s++)i.offset[s]=n.parseChar()}return i},mt=function(){return new Q.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:0},{name:"underlinePosition",type:"FWORD",value:0},{name:"underlineThickness",type:"FWORD",value:0},{name:"isFixedPitch",type:"ULONG",value:0},{name:"minMemType42",type:"ULONG",value:0},{name:"maxMemType42",type:"ULONG",value:0},{name:"minMemType1",type:"ULONG",value:0},{name:"maxMemType1",type:"ULONG",value:0}])},vt=new Array(9);vt[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(re.coverage),deltaGlyphId:this.parseUShort()}:2===t?{substFormat:2,coverage:this.parsePointer(re.coverage),substitute:this.parseOffset16List()}:void I.assert(!1,"0x"+e.toString(16)+": lookup type 1 format must be 1 or 2.")},vt[2]=function(){var e=this.parseUShort();return I.argument(1===e,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(re.coverage),sequences:this.parseListOfLists()}},vt[3]=function(){var e=this.parseUShort();return I.argument(1===e,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(re.coverage),alternateSets:this.parseListOfLists()}},vt[4]=function(){var e=this.parseUShort();return I.argument(1===e,"GSUB ligature table identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(re.coverage),ligatureSets:this.parseListOfLists((function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}}))}};var yt={sequenceIndex:re.uShort,lookupListIndex:re.uShort};vt[5]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{substFormat:t,coverage:this.parsePointer(re.coverage),ruleSets:this.parseListOfLists((function(){var e=this.parseUShort(),t=this.parseUShort();return{input:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,yt)}}))};if(2===t)return{substFormat:t,coverage:this.parsePointer(re.coverage),classDef:this.parsePointer(re.classDef),classSets:this.parseListOfLists((function(){var e=this.parseUShort(),t=this.parseUShort();return{classes:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,yt)}}))};if(3===t){var i=this.parseUShort(),n=this.parseUShort();return{substFormat:t,coverages:this.parseList(i,re.pointer(re.coverage)),lookupRecords:this.parseRecordList(n,yt)}}I.assert(!1,"0x"+e.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},vt[6]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(re.coverage),chainRuleSets:this.parseListOfLists((function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(yt)}}))}:2===t?{substFormat:2,coverage:this.parsePointer(re.coverage),backtrackClassDef:this.parsePointer(re.classDef),inputClassDef:this.parsePointer(re.classDef),lookaheadClassDef:this.parsePointer(re.classDef),chainClassSet:this.parseListOfLists((function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(yt)}}))}:3===t?{substFormat:3,backtrackCoverage:this.parseList(re.pointer(re.coverage)),inputCoverage:this.parseList(re.pointer(re.coverage)),lookaheadCoverage:this.parseList(re.pointer(re.coverage)),lookupRecords:this.parseRecordList(yt)}:void I.assert(!1,"0x"+e.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},vt[7]=function(){var e=this.parseUShort();I.argument(1===e,"GSUB Extension Substitution subtable identifier-format must be 1");var t=this.parseUShort(),i=new re(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:t,extension:vt[t].call(i)}},vt[8]=function(){var e=this.parseUShort();return I.argument(1===e,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(re.coverage),backtrackCoverage:this.parseList(re.pointer(re.coverage)),lookaheadCoverage:this.parseList(re.pointer(re.coverage)),substitutes:this.parseUShortList()}};var bt=new Array(9);bt[1]=function(e){return 1===e.substFormat?new Q.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new Q.Coverage(e.coverage)},{name:"deltaGlyphID",type:"USHORT",value:e.deltaGlyphId}]):new Q.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new Q.Coverage(e.coverage)}].concat(Q.ushortList("substitute",e.substitute)))},bt[3]=function(e){return I.assert(1===e.substFormat,"Lookup type 3 substFormat must be 1."),new Q.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new Q.Coverage(e.coverage)}].concat(Q.tableList("altSet",e.alternateSets,(function(e){return new Q.Table("alternateSetTable",Q.ushortList("alternate",e))}))))},bt[4]=function(e){return I.assert(1===e.substFormat,"Lookup type 4 substFormat must be 1."),new Q.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new Q.Coverage(e.coverage)}].concat(Q.tableList("ligSet",e.ligatureSets,(function(e){return new Q.Table("ligatureSetTable",Q.tableList("ligature",e,(function(e){return new Q.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:e.ligGlyph}].concat(Q.ushortList("component",e.components,e.components.length+1)))})))}))))};var wt=function(e,t){var i=new re(e,t=t||0),n=i.parseVersion(1);return I.argument(1===n||1.1===n,"Unsupported GSUB table version."),1===n?{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(vt)}:{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(vt),variations:i.parseFeatureVariationsList()}},Et=function(e){return new Q.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new Q.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new Q.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new Q.LookupList(e.lookups,bt)}])},_t=function(e,t){var i=new ae.Parser(e,t),n=i.parseULong();I.argument(1===n,"Unsupported META table version."),i.parseULong(),i.parseULong();for(var r=i.parseULong(),o={},a=0;a<r;a++){var s=i.parseTag(),l=i.parseULong(),u=i.parseULong(),c=D.UTF8(e,t+l,u);o[s]=c}return o},St=function(e){var t=Object.keys(e).length,i="",n=16+12*t,r=new Q.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:n},{name:"numTags",type:"ULONG",value:t}]);for(var o in e){var a=i.length;i+=e[o],r.fields.push({name:"tag "+o,type:"TAG",value:o}),r.fields.push({name:"offset "+o,type:"ULONG",value:n+a}),r.fields.push({name:"length "+o,type:"ULONG",value:e[o].length})}return r.fields.push({name:"stringPool",type:"CHARARRAY",value:i}),r};function Tt(e){return Math.log(e)/Math.log(2)|0}function Ct(e){for(;e.length%4!=0;)e.push(0);for(var t=0,i=0;i<e.length;i+=4)t+=(e[i]<<24)+(e[i+1]<<16)+(e[i+2]<<8)+e[i+3];return t%Math.pow(2,32)}function kt(e,t,i,n){return new Q.Record("Table Record",[{name:"tag",type:"TAG",value:void 0!==e?e:""},{name:"checkSum",type:"ULONG",value:void 0!==t?t:0},{name:"offset",type:"ULONG",value:void 0!==i?i:0},{name:"length",type:"ULONG",value:void 0!==n?n:0}])}function xt(e){var t=new Q.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);t.tables=e,t.numTables=e.length;var i=Math.pow(2,Tt(t.numTables));t.searchRange=16*i,t.entrySelector=Tt(i),t.rangeShift=16*t.numTables-t.searchRange;for(var n=[],r=[],o=t.sizeOf()+kt().sizeOf()*t.numTables;o%4!=0;)o+=1,r.push({name:"padding",type:"BYTE",value:0});for(var a=0;a<e.length;a+=1){var s=e[a];I.argument(4===s.tableName.length,"Table name"+s.tableName+" is invalid.");var l=s.sizeOf(),u=kt(s.tableName,Ct(s.encode()),o,l);for(n.push({name:u.tag+" Table Record",type:"RECORD",value:u}),r.push({name:s.tableName+" table",type:"RECORD",value:s}),o+=l,I.argument(!isNaN(o),"Something went wrong calculating the offset.");o%4!=0;)o+=1,r.push({name:"padding",type:"BYTE",value:0})}return n.sort((function(e,t){return e.value.tag>t.value.tag?1:-1})),t.fields=t.fields.concat(n),t.fields=t.fields.concat(r),t}function At(e,t,i){for(var n=0;n<t.length;n+=1){var r=e.charToGlyphIndex(t[n]);if(0<r)return e.glyphs.get(r).getMetrics()}return i}var Pt=function(e){for(var t,i=[],n=[],r=[],o=[],a=[],s=[],l=[],u=0,c=0,d=0,h=0,p=0,f=0;f<e.glyphs.length;f+=1){var g=e.glyphs.get(f),m=0|g.unicode;if(isNaN(g.advanceWidth))throw new Error("Glyph "+g.name+" ("+f+"): advanceWidth is not a number.");(m<t||void 0===t)&&0<m&&(t=m),u<m&&(u=m);var v=ft(m);if(v<32)c|=1<<v;else if(v<64)d|=1<<v-32;else if(v<96)h|=1<<v-64;else{if(!(v<123))throw new Error("Unicode ranges bits > 123 are reserved for internal usage");p|=1<<v-96}if(".notdef"!==g.name){var y=g.getMetrics();i.push(y.xMin),n.push(y.yMin),r.push(y.xMax),o.push(y.yMax),s.push(y.leftSideBearing),l.push(y.rightSideBearing),a.push(g.advanceWidth)}}var b={xMin:Math.min.apply(null,i),yMin:Math.min.apply(null,n),xMax:Math.max.apply(null,r),yMax:Math.max.apply(null,o),advanceWidthMax:Math.max.apply(null,a),advanceWidthAvg:function(e){for(var t=0,i=0;i<e.length;i+=1)t+=e[i];return t/e.length}(a),minLeftSideBearing:Math.min.apply(null,s),maxLeftSideBearing:Math.max.apply(null,s),minRightSideBearing:Math.min.apply(null,l)};b.ascender=e.ascender,b.descender=e.descender;var w=He({flags:3,unitsPerEm:e.unitsPerEm,xMin:b.xMin,yMin:b.yMin,xMax:b.xMax,yMax:b.yMax,lowestRecPPEM:3,createdTimestamp:e.createdTimestamp}),E=qe({ascender:b.ascender,descender:b.descender,advanceWidthMax:b.advanceWidthMax,minLeftSideBearing:b.minLeftSideBearing,minRightSideBearing:b.minRightSideBearing,xMaxExtent:b.maxLeftSideBearing+(b.xMax-b.xMin),numberOfHMetrics:e.glyphs.length}),_=Je(e.glyphs.length),S=pt({xAvgCharWidth:Math.round(b.advanceWidthAvg),usWeightClass:e.tables.os2.usWeightClass,usWidthClass:e.tables.os2.usWidthClass,usFirstCharIndex:t,usLastCharIndex:u,ulUnicodeRange1:c,ulUnicodeRange2:d,ulUnicodeRange3:h,ulUnicodeRange4:p,fsSelection:e.tables.os2.fsSelection,sTypoAscender:b.ascender,sTypoDescender:b.descender,sTypoLineGap:0,usWinAscent:b.yMax,usWinDescent:Math.abs(b.yMin),ulCodePageRange1:1,sxHeight:At(e,"xyvw",{yMax:Math.round(b.ascender/2)}).yMax,sCapHeight:At(e,"HIKLEFJMNTZBDPRAGOQSUVWXY",b).yMax,usDefaultChar:e.hasChar(" ")?32:0,usBreakChar:e.hasChar(" ")?32:0}),T=We(e.glyphs),C=le(e.glyphs),k=e.getEnglishName("fontFamily"),x=e.getEnglishName("fontSubfamily"),A=k+" "+x,P=e.getEnglishName("postScriptName");P||(P=k.replace(/\s/g,"")+"-"+x);var I={};for(var R in e.names)I[R]=e.names[R];I.uniqueID||(I.uniqueID={en:e.getEnglishName("manufacturer")+":"+A}),I.postScriptName||(I.postScriptName={en:P}),I.preferredFamily||(I.preferredFamily=e.names.fontFamily),I.preferredSubfamily||(I.preferredSubfamily=e.names.fontSubfamily);var D=[],O=ct(I,D),N=0<D.length?$e(D):void 0,L=mt(),M=Ve(e.glyphs,{version:e.getEnglishName("version"),fullName:A,familyName:k,weightName:x,postScriptName:P,unitsPerEm:e.unitsPerEm,fontBBox:[0,b.yMin,b.ascender,b.advanceWidthMax]}),F=e.metas&&0<Object.keys(e.metas).length?St(e.metas):void 0,U=[w,E,_,S,O,C,L,M,T];N&&U.push(N),e.tables.gsub&&U.push(Et(e.tables.gsub)),F&&U.push(F);for(var B=xt(U),V=Ct(B.encode()),z=B.fields,H=!1,j=0;j<z.length;j+=1)if("head table"===z[j].name){z[j].value.checkSumAdjustment=2981146554-V,H=!0;break}if(!H)throw new Error("Could not find head table with checkSum to adjust.");return B};function It(e,t){for(var i=0,n=e.length-1;i<=n;){var r=i+n>>>1,o=e[r].tag;if(o===t)return r;o<t?i=r+1:n=r-1}return-i-1}function Rt(e,t){for(var i=0,n=e.length-1;i<=n;){var r=i+n>>>1,o=e[r];if(o===t)return r;o<t?i=r+1:n=r-1}return-i-1}function Dt(e,t){for(var i,n=0,r=e.length-1;n<=r;){var o=n+r>>>1,a=(i=e[o]).start;if(a===t)return i;a<t?n=o+1:r=o-1}if(0<n)return t>(i=e[n-1]).end?0:i}function Ot(e,t){this.font=e,this.tableName=t}function Nt(e){Ot.call(this,e,"gpos")}function Lt(e){Ot.call(this,e,"gsub")}function Mt(e,t){var i=e.length;if(i!==t.length)return!1;for(var n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0}function Ft(e,t,i){for(var n=e.subtables,r=0;r<n.length;r++){var o=n[r];if(o.substFormat===t)return o}if(i)return n.push(i),i}function Ut(e){for(var t=new ArrayBuffer(e.length),i=new Uint8Array(t),n=0;n<e.length;++n)i[n]=e[n];return t}function Bt(e,t){if(!e)throw t}function Vt(e,t,i,n,r){var o;return 0<(t&n)?(o=e.parseByte(),0==(t&r)&&(o=-o),i+o):0<(t&r)?i:i+e.parseShort()}function zt(e,t,i){var n,r,o=new ae.Parser(t,i);if(e.numberOfContours=o.parseShort(),e._xMin=o.parseShort(),e._yMin=o.parseShort(),e._xMax=o.parseShort(),e._yMax=o.parseShort(),0<e.numberOfContours){for(var a=e.endPointIndices=[],s=0;s<e.numberOfContours;s+=1)a.push(o.parseUShort());e.instructionLength=o.parseUShort(),e.instructions=[];for(var l=0;l<e.instructionLength;l+=1)e.instructions.push(o.parseByte());var u=a[a.length-1]+1;n=[];for(var c=0;c<u;c+=1)if(r=o.parseByte(),n.push(r),0<(8&r))for(var d=o.parseByte(),h=0;h<d;h+=1)n.push(r),c+=1;if(I.argument(n.length===u,"Bad flags."),0<a.length){var p,f=[];if(0<u){for(var g=0;g<u;g+=1)r=n[g],(p={}).onCurve=!!(1&r),p.lastPointOfContour=0<=a.indexOf(g),f.push(p);for(var m=0,v=0;v<u;v+=1)r=n[v],(p=f[v]).x=Vt(o,r,m,2,16),m=p.x;for(var y=0,b=0;b<u;b+=1)r=n[b],(p=f[b]).y=Vt(o,r,y,4,32),y=p.y}e.points=f}else e.points=[]}else if(0===e.numberOfContours)e.points=[];else{e.isComposite=!0,e.points=[],e.components=[];for(var w=!0;w;){n=o.parseUShort();var E={glyphIndex:o.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};0<(1&n)?0<(2&n)?(E.dx=o.parseShort(),E.dy=o.parseShort()):E.matchedPoints=[o.parseUShort(),o.parseUShort()]:0<(2&n)?(E.dx=o.parseChar(),E.dy=o.parseChar()):E.matchedPoints=[o.parseByte(),o.parseByte()],0<(8&n)?E.xScale=E.yScale=o.parseF2Dot14():0<(64&n)?(E.xScale=o.parseF2Dot14(),E.yScale=o.parseF2Dot14()):0<(128&n)&&(E.xScale=o.parseF2Dot14(),E.scale01=o.parseF2Dot14(),E.scale10=o.parseF2Dot14(),E.yScale=o.parseF2Dot14()),e.components.push(E),w=!!(32&n)}if(256&n){e.instructionLength=o.parseUShort(),e.instructions=[];for(var _=0;_<e.instructionLength;_+=1)e.instructions.push(o.parseByte())}}}function Ht(e,t){for(var i=[],n=0;n<e.length;n+=1){var r=e[n],o={x:t.xScale*r.x+t.scale01*r.y+t.dx,y:t.scale10*r.x+t.yScale*r.y+t.dy,onCurve:r.onCurve,lastPointOfContour:r.lastPointOfContour};i.push(o)}return i}function jt(e){var t=new x;if(!e)return t;for(var i=function(e){for(var t=[],i=[],n=0;n<e.length;n+=1){var r=e[n];i.push(r),r.lastPointOfContour&&(t.push(i),i=[])}return I.argument(0===i.length,"There are still points left in the current contour."),t}(e),n=0;n<i.length;++n){var r=i[n],o=null,a=r[r.length-1],s=r[0];if(a.onCurve)t.moveTo(a.x,a.y);else if(s.onCurve)t.moveTo(s.x,s.y);else{var l={x:.5*(a.x+s.x),y:.5*(a.y+s.y)};t.moveTo(l.x,l.y)}for(var u=0;u<r.length;++u)if(o=a,a=s,s=r[(u+1)%r.length],a.onCurve)t.lineTo(a.x,a.y);else{var c=s;o.onCurve||(a.x,o.x,a.y,o.y),s.onCurve||(c={x:.5*(a.x+s.x),y:.5*(a.y+s.y)}),t.quadraticCurveTo(a.x,a.y,c.x,c.y)}t.closePath()}return t}function qt(e,t){if(t.isComposite)for(var i=0;i<t.components.length;i+=1){var n=t.components[i],r=e.get(n.glyphIndex);if(r.getPath(),r.points){var o=void 0;if(void 0===n.matchedPoints)o=Ht(r.points,n);else{if(n.matchedPoints[0]>t.points.length-1||n.matchedPoints[1]>r.points.length-1)throw Error("Matched points out of range in "+t.name);var a=t.points[n.matchedPoints[0]],s=r.points[n.matchedPoints[1]],l={xScale:n.xScale,scale01:n.scale01,scale10:n.scale10,yScale:n.yScale,dx:0,dy:0};s=Ht([s],l)[0],l.dx=a.x-s.x,l.dy=a.y-s.y,o=Ht(r.points,l)}t.points=t.points.concat(o)}}return jt(t.points)}(Nt.prototype=Ot.prototype={searchTag:It,binSearch:Rt,getTable:function(e){var t=this.font.tables[this.tableName];return!t&&e&&(t=this.font.tables[this.tableName]=this.createDefaultTable()),t},getScriptNames:function(){var e=this.getTable();return e?e.scripts.map((function(e){return e.tag})):[]},getDefaultScriptName:function(){var e=this.getTable();if(e){for(var t=!1,i=0;i<e.scripts.length;i++){var n=e.scripts[i].tag;if("DFLT"===n)return n;"latn"===n&&(t=!0)}return t?"latn":void 0}},getScriptTable:function(e,t){var i=this.getTable(t);if(i){e=e||"DFLT";var n=i.scripts,r=It(i.scripts,e);if(0<=r)return n[r].script;if(t){var o={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return n.splice(-1-r,0,o),o.script}}},getLangSysTable:function(e,t,i){var n=this.getScriptTable(e,i);if(n){if(!t||"dflt"===t||"DFLT"===t)return n.defaultLangSys;var r=It(n.langSysRecords,t);if(0<=r)return n.langSysRecords[r].langSys;if(i){var o={tag:t,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return n.langSysRecords.splice(-1-r,0,o),o.langSys}}},getFeatureTable:function(e,t,i,n){var r=this.getLangSysTable(e,t,n);if(r){for(var o,a=r.featureIndexes,s=this.font.tables[this.tableName].features,l=0;l<a.length;l++)if((o=s[a[l]]).tag===i)return o.feature;if(n){var u=s.length;return I.assert(0===u||i>=s[u-1].tag,"Features must be added in alphabetical order."),o={tag:i,feature:{params:0,lookupListIndexes:[]}},s.push(o),a.push(u),o.feature}}},getLookupTables:function(e,t,i,n,r){var o=this.getFeatureTable(e,t,i,r),a=[];if(o){for(var s,l=o.lookupListIndexes,u=this.font.tables[this.tableName].lookups,c=0;c<l.length;c++)(s=u[l[c]]).lookupType===n&&a.push(s);if(0===a.length&&r){s={lookupType:n,lookupFlag:0,subtables:[],markFilteringSet:void 0};var d=u.length;return u.push(s),l.push(d),[s]}}return a},getGlyphClass:function(e,t){switch(e.format){case 1:return e.startGlyph<=t&&t<e.startGlyph+e.classes.length?e.classes[t-e.startGlyph]:0;case 2:var i=Dt(e.ranges,t);return i?i.classId:0}},getCoverageIndex:function(e,t){switch(e.format){case 1:var i=Rt(e.glyphs,t);return 0<=i?i:-1;case 2:var n=Dt(e.ranges,t);return n?n.index+t-n.start:-1}},expandCoverage:function(e){if(1===e.format)return e.glyphs;for(var t=[],i=e.ranges,n=0;n<i.length;n++)for(var r=i[n],o=r.start,a=r.end,s=o;s<=a;s++)t.push(s);return t}}).init=function(){var e=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(e)},Nt.prototype.getKerningValue=function(e,t,i){for(var n=0;n<e.length;n++)for(var r=e[n].subtables,o=0;o<r.length;o++){var a=r[o],s=this.getCoverageIndex(a.coverage,t);if(!(s<0))switch(a.posFormat){case 1:for(var l=a.pairSets[s],u=0;u<l.length;u++){var c=l[u];if(c.secondGlyph===i)return c.value1&&c.value1.xAdvance||0}break;case 2:var d=this.getGlyphClass(a.classDef1,t),h=this.getGlyphClass(a.classDef2,i),p=a.classRecords[d][h];return p.value1&&p.value1.xAdvance||0}}return 0},Nt.prototype.getKerningTables=function(e,t){if(this.font.tables.gpos)return this.getLookupTables(e,t,"kern",2)},(Lt.prototype=Ot.prototype).createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},Lt.prototype.getSingle=function(e,t,i){for(var n=[],r=this.getLookupTables(t,i,e,1),o=0;o<r.length;o++)for(var a=r[o].subtables,s=0;s<a.length;s++){var l=a[s],u=this.expandCoverage(l.coverage),c=void 0;if(1===l.substFormat){var d=l.deltaGlyphId;for(c=0;c<u.length;c++){var h=u[c];n.push({sub:h,by:h+d})}}else{var p=l.substitute;for(c=0;c<u.length;c++)n.push({sub:u[c],by:p[c]})}}return n},Lt.prototype.getAlternates=function(e,t,i){for(var n=[],r=this.getLookupTables(t,i,e,3),o=0;o<r.length;o++)for(var a=r[o].subtables,s=0;s<a.length;s++)for(var l=a[s],u=this.expandCoverage(l.coverage),c=l.alternateSets,d=0;d<u.length;d++)n.push({sub:u[d],by:c[d]});return n},Lt.prototype.getLigatures=function(e,t,i){for(var n=[],r=this.getLookupTables(t,i,e,4),o=0;o<r.length;o++)for(var a=r[o].subtables,s=0;s<a.length;s++)for(var l=a[s],u=this.expandCoverage(l.coverage),c=l.ligatureSets,d=0;d<u.length;d++)for(var h=u[d],p=c[d],f=0;f<p.length;f++){var g=p[f];n.push({sub:[h].concat(g.components),by:g.ligGlyph})}return n},Lt.prototype.addSingle=function(e,t,i,n){var r=Ft(this.getLookupTables(i,n,e,1,!0)[0],2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});I.assert(1===r.coverage.format,"Ligature: unable to modify coverage table format "+r.coverage.format);var o=t.sub,a=this.binSearch(r.coverage.glyphs,o);a<0&&(a=-1-a,r.coverage.glyphs.splice(a,0,o),r.substitute.splice(a,0,0)),r.substitute[a]=t.by},Lt.prototype.addAlternate=function(e,t,i,n){var r=Ft(this.getLookupTables(i,n,e,3,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});I.assert(1===r.coverage.format,"Ligature: unable to modify coverage table format "+r.coverage.format);var o=t.sub,a=this.binSearch(r.coverage.glyphs,o);a<0&&(a=-1-a,r.coverage.glyphs.splice(a,0,o),r.alternateSets.splice(a,0,0)),r.alternateSets[a]=t.by},Lt.prototype.addLigature=function(e,t,i,n){var r=this.getLookupTables(i,n,e,4,!0)[0],o=r.subtables[0];o||(o={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},r.subtables[0]=o),I.assert(1===o.coverage.format,"Ligature: unable to modify coverage table format "+o.coverage.format);var a=t.sub[0],s=t.sub.slice(1),l={ligGlyph:t.by,components:s},u=this.binSearch(o.coverage.glyphs,a);if(0<=u){for(var c=o.ligatureSets[u],d=0;d<c.length;d++)if(Mt(c[d].components,s))return;c.push(l)}else u=-1-u,o.coverage.glyphs.splice(u,0,a),o.ligatureSets.splice(u,0,[l])},Lt.prototype.getFeature=function(e,t,i){if(/ss\d\d/.test(e))return this.getSingle(e,t,i);switch(e){case"aalt":case"salt":return this.getSingle(e,t,i).concat(this.getAlternates(e,t,i));case"dlig":case"liga":case"rlig":return this.getLigatures(e,t,i)}},Lt.prototype.add=function(e,t,i,n){if(/ss\d\d/.test(e))return this.addSingle(e,t,i,n);switch(e){case"aalt":case"salt":return"number"==typeof t.by?this.addSingle(e,t,i,n):this.addAlternate(e,t,i,n);case"dlig":case"liga":case"rlig":return this.addLigature(e,t,i,n)}};var Gt,Wt,$t,Yt,Kt={getPath:jt,parse:function(e,t,i,n){for(var r=new Ee.GlyphSet(n),o=0;o<i.length-1;o+=1){var a=i[o];a!==i[o+1]?r.push(o,Ee.ttfGlyphLoader(n,o,zt,e,t+a,qt)):r.push(o,Ee.glyphLoader(n,o))}return r}};function Jt(e){this.font=e,this.getCommands=function(e){return Kt.getPath(e).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function Xt(e){return e}function Qt(e){return Math.sign(e)*Math.round(Math.abs(e))}function Zt(e){return Math.sign(e)*Math.round(Math.abs(2*e))/2}function ei(e){return Math.sign(e)*(Math.round(Math.abs(e)+.5)-.5)}function ti(e){return Math.sign(e)*Math.ceil(Math.abs(e))}function ii(e){return Math.sign(e)*Math.floor(Math.abs(e))}var ni=function(e){var t=this.srPeriod,i=this.srPhase,n=1;return e<0&&(e=-e,n=-1),e+=this.srThreshold-i,e=Math.trunc(e/t)*t,(e+=i)<0?i*n:e*n},ri={x:1,y:0,axis:"x",distance:function(e,t,i,n){return(i?e.xo:e.x)-(n?t.xo:t.x)},interpolate:function(e,t,i,n){var r,o,a,s,l,u,c;if(!n||n===this)return r=e.xo-t.xo,o=e.xo-i.xo,l=t.x-t.xo,u=i.x-i.xo,0===(c=(a=Math.abs(r))+(s=Math.abs(o)))?void(e.x=e.xo+(l+u)/2):void(e.x=e.xo+(l*s+u*a)/c);r=n.distance(e,t,!0,!0),o=n.distance(e,i,!0,!0),l=n.distance(t,t,!1,!0),u=n.distance(i,i,!1,!0),0!==(c=(a=Math.abs(r))+(s=Math.abs(o)))?ri.setRelative(e,e,(l*s+u*a)/c,n,!0):ri.setRelative(e,e,(l+u)/2,n,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(e,t,i,n,r){if(n&&n!==this){var o=r?t.xo:t.x,a=r?t.yo:t.y,s=o+i*n.x,l=a+i*n.y;e.x=s+(e.y-l)/n.normalSlope}else e.x=(r?t.xo:t.x)+i},slope:0,touch:function(e){e.xTouched=!0},touched:function(e){return e.xTouched},untouch:function(e){e.xTouched=!1}},oi={x:0,y:1,axis:"y",distance:function(e,t,i,n){return(i?e.yo:e.y)-(n?t.yo:t.y)},interpolate:function(e,t,i,n){var r,o,a,s,l,u,c;if(!n||n===this)return r=e.yo-t.yo,o=e.yo-i.yo,l=t.y-t.yo,u=i.y-i.yo,0===(c=(a=Math.abs(r))+(s=Math.abs(o)))?void(e.y=e.yo+(l+u)/2):void(e.y=e.yo+(l*s+u*a)/c);r=n.distance(e,t,!0,!0),o=n.distance(e,i,!0,!0),l=n.distance(t,t,!1,!0),u=n.distance(i,i,!1,!0),0!==(c=(a=Math.abs(r))+(s=Math.abs(o)))?oi.setRelative(e,e,(l*s+u*a)/c,n,!0):oi.setRelative(e,e,(l+u)/2,n,!0)},normalSlope:0,setRelative:function(e,t,i,n,r){if(n&&n!==this){var o=r?t.xo:t.x,a=r?t.yo:t.y,s=o+i*n.x,l=a+i*n.y;e.y=l+n.normalSlope*(e.x-s)}else e.y=(r?t.yo:t.y)+i},slope:Number.POSITIVE_INFINITY,touch:function(e){e.yTouched=!0},touched:function(e){return e.yTouched},untouch:function(e){e.yTouched=!1}};function ai(e,t){this.x=e,this.y=t,this.axis=void 0,this.slope=t/e,this.normalSlope=-e/t,Object.freeze(this)}function si(e,t){var i=Math.sqrt(e*e+t*t);return t/=i,1==(e/=i)&&0===t?ri:0===e&&1===t?oi:new ai(e,t)}function li(e,t,i,n){this.x=this.xo=Math.round(64*e)/64,this.y=this.yo=Math.round(64*t)/64,this.lastPointOfContour=i,this.onCurve=n,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Object.freeze(ri),Object.freeze(oi),ai.prototype.distance=function(e,t,i,n){return this.x*ri.distance(e,t,i,n)+this.y*oi.distance(e,t,i,n)},ai.prototype.interpolate=function(e,t,i,n){var r,o,a,s,l,u,c;a=n.distance(e,t,!0,!0),s=n.distance(e,i,!0,!0),r=n.distance(t,t,!1,!0),o=n.distance(i,i,!1,!0),0!==(c=(l=Math.abs(a))+(u=Math.abs(s)))?this.setRelative(e,e,(r*u+o*l)/c,n,!0):this.setRelative(e,e,(r+o)/2,n,!0)},ai.prototype.setRelative=function(e,t,i,n,r){n=n||this;var o=r?t.xo:t.x,a=r?t.yo:t.y,s=o+i*n.x,l=a+i*n.y,u=n.normalSlope,c=this.slope,d=e.x,h=e.y;e.x=(c*d-u*s+l-h)/(c-u),e.y=c*(e.x-d)+h},ai.prototype.touch=function(e){e.xTouched=!0,e.yTouched=!0},li.prototype.nextTouched=function(e){for(var t=this.nextPointOnContour;!e.touched(t)&&t!==this;)t=t.nextPointOnContour;return t},li.prototype.prevTouched=function(e){for(var t=this.prevPointOnContour;!e.touched(t)&&t!==this;)t=t.prevPointOnContour;return t};var ui=Object.freeze(new li(0,0)),ci={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function di(e,t){switch(this.env=e,this.stack=[],this.prog=t,e){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=ri,this.round=Qt}}function hi(e){for(var t=e.tZone=new Array(e.gZone.length),i=0;i<t.length;i++)t[i]=new li(0,0)}function pi(e,t){var i,n=e.prog,r=e.ip,o=1;do{if(88===(i=n[++r]))o++;else if(89===i)o--;else if(64===i)r+=n[r+1]+1;else if(65===i)r+=2*n[r+1]+1;else if(176<=i&&i<=183)r+=i-176+1;else if(184<=i&&i<=191)r+=2*(i-184+1);else if(t&&1===o&&27===i)break}while(0<o);e.ip=r}function fi(e,i){t.DEBUG&&console.log(i.step,"SVTCA["+e.axis+"]"),i.fv=i.pv=i.dpv=e}function gi(e,i){t.DEBUG&&console.log(i.step,"SPVTCA["+e.axis+"]"),i.pv=i.dpv=e}function mi(e,i){t.DEBUG&&console.log(i.step,"SFVTCA["+e.axis+"]"),i.fv=e}function vi(e,i){var n,r,o=i.stack,a=o.pop(),s=o.pop(),l=i.z2[a],u=i.z1[s];t.DEBUG&&console.log("SPVTL["+e+"]",a,s),r=e?(n=l.y-u.y,u.x-l.x):(n=u.x-l.x,u.y-l.y),i.pv=i.dpv=si(n,r)}function yi(e,i){var n,r,o=i.stack,a=o.pop(),s=o.pop(),l=i.z2[a],u=i.z1[s];t.DEBUG&&console.log("SFVTL["+e+"]",a,s),r=e?(n=l.y-u.y,u.x-l.x):(n=u.x-l.x,u.y-l.y),i.fv=si(n,r)}function bi(e){t.DEBUG&&console.log(e.step,"POP[]"),e.stack.pop()}function wi(e,i){var n=i.stack.pop(),r=i.z0[n],o=i.fv,a=i.pv;t.DEBUG&&console.log(i.step,"MDAP["+e+"]",n);var s=a.distance(r,ui);e&&(s=i.round(s)),o.setRelative(r,ui,s,a),o.touch(r),i.rp0=i.rp1=n}function Ei(e,i){var n,r,o,a=i.z2,s=a.length-2;t.DEBUG&&console.log(i.step,"IUP["+e.axis+"]");for(var l=0;l<s;l++)n=a[l],e.touched(n)||(r=n.prevTouched(e))!==n&&(r===(o=n.nextTouched(e))&&e.setRelative(n,n,e.distance(r,r,!1,!0),e,!0),e.interpolate(n,r,o,e))}function _i(e,i){for(var n=i.stack,r=e?i.rp1:i.rp2,o=(e?i.z0:i.z1)[r],a=i.fv,s=i.pv,l=i.loop,u=i.z2;l--;){var c=n.pop(),d=u[c],h=s.distance(o,o,!1,!0);a.setRelative(d,d,h,s),a.touch(d),t.DEBUG&&console.log(i.step,(1<i.loop?"loop "+(i.loop-l)+": ":"")+"SHP["+(e?"rp1":"rp2")+"]",c)}i.loop=1}function Si(e,i){var n=i.stack,r=e?i.rp1:i.rp2,o=(e?i.z0:i.z1)[r],a=i.fv,s=i.pv,l=n.pop(),u=i.z2[i.contours[l]],c=u;t.DEBUG&&console.log(i.step,"SHC["+e+"]",l);for(var d=s.distance(o,o,!1,!0);c!==o&&a.setRelative(c,c,d,s),(c=c.nextPointOnContour)!==u;);}function Ti(e,i){var n,r,o=i.stack,a=e?i.rp1:i.rp2,s=(e?i.z0:i.z1)[a],l=i.fv,u=i.pv,c=o.pop();switch(t.DEBUG&&console.log(i.step,"SHZ["+e+"]",c),c){case 0:n=i.tZone;break;case 1:n=i.gZone;break;default:throw new Error("Invalid zone")}for(var d=u.distance(s,s,!1,!0),h=n.length-2,p=0;p<h;p++)r=n[p],l.setRelative(r,r,d,u)}function Ci(e,i){var n=i.stack,r=n.pop()/64,o=n.pop(),a=i.z1[o],s=i.z0[i.rp0],l=i.fv,u=i.pv;l.setRelative(a,s,r,u),l.touch(a),t.DEBUG&&console.log(i.step,"MSIRP["+e+"]",r,o),i.rp1=i.rp0,i.rp2=o,e&&(i.rp0=o)}function ki(e,i){var n=i.stack,r=n.pop(),o=n.pop(),a=i.z0[o],s=i.fv,l=i.pv,u=i.cvt[r];t.DEBUG&&console.log(i.step,"MIAP["+e+"]",r,"(",u,")",o);var c=l.distance(a,ui);e&&(Math.abs(c-u)<i.cvCutIn&&(c=u),c=i.round(c)),s.setRelative(a,ui,c,l),0===i.zp0&&(a.xo=a.x,a.yo=a.y),s.touch(a),i.rp0=i.rp1=o}function xi(e,i){var n=i.stack,r=n.pop(),o=i.z2[r];t.DEBUG&&console.log(i.step,"GC["+e+"]",r),n.push(64*i.dpv.distance(o,ui,e,!1))}function Ai(e,i){var n=i.stack,r=n.pop(),o=n.pop(),a=i.z1[r],s=i.z0[o],l=i.dpv.distance(s,a,e,e);t.DEBUG&&console.log(i.step,"MD["+e+"]",r,o,"->",l),i.stack.push(Math.round(64*l))}function Pi(e,i){var n=i.stack,r=n.pop(),o=i.fv,a=i.pv,s=i.ppem,l=i.deltaBase+16*(e-1),u=i.deltaShift,c=i.z0;t.DEBUG&&console.log(i.step,"DELTAP["+e+"]",r,n);for(var d=0;d<r;d++){var h=n.pop(),p=n.pop();if(l+((240&p)>>4)===s){var f=(15&p)-8;0<=f&&f++,t.DEBUG&&console.log(i.step,"DELTAPFIX",h,"by",f*u);var g=c[h];o.setRelative(g,g,f*u,a)}}}function Ii(e,i){var n=i.stack,r=n.pop();t.DEBUG&&console.log(i.step,"ROUND[]"),n.push(64*i.round(r/64))}function Ri(e,i){var n=i.stack,r=n.pop(),o=i.ppem,a=i.deltaBase+16*(e-1),s=i.deltaShift;t.DEBUG&&console.log(i.step,"DELTAC["+e+"]",r,n);for(var l=0;l<r;l++){var u=n.pop(),c=n.pop();if(a+((240&c)>>4)===o){var d=(15&c)-8;0<=d&&d++;var h=d*s;t.DEBUG&&console.log(i.step,"DELTACFIX",u,"by",h),i.cvt[u]+=h}}}function Di(e,i){var n,r,o=i.stack,a=o.pop(),s=o.pop(),l=i.z2[a],u=i.z1[s];t.DEBUG&&console.log(i.step,"SDPVTL["+e+"]",a,s),r=e?(n=l.y-u.y,u.x-l.x):(n=u.x-l.x,u.y-l.y),i.dpv=si(n,r)}function Oi(e,i){var n=i.stack,r=i.prog,o=i.ip;t.DEBUG&&console.log(i.step,"PUSHB["+e+"]");for(var a=0;a<e;a++)n.push(r[++o]);i.ip=o}function Ni(e,i){var n=i.ip,r=i.prog,o=i.stack;t.DEBUG&&console.log(i.ip,"PUSHW["+e+"]");for(var a=0;a<e;a++){var s=r[++n]<<8|r[++n];32768&s&&(s=-(1+(65535^s))),o.push(s)}i.ip=n}function Li(e,i,n,r,o,a){var s,l,u,c,d=a.stack,h=e&&d.pop(),p=d.pop(),f=a.rp0,g=a.z0[f],m=a.z1[p],v=a.minDis,y=a.fv,b=a.dpv;u=0<=(l=s=b.distance(m,g,!0,!0))?1:-1,l=Math.abs(l),e&&(c=a.cvt[h],r&&Math.abs(l-c)<a.cvCutIn&&(l=c)),n&&l<v&&(l=v),r&&(l=a.round(l)),y.setRelative(m,g,u*l,b),y.touch(m),t.DEBUG&&console.log(a.step,(e?"MIRP[":"MDRP[")+(i?"M":"m")+(n?">":"_")+(r?"R":"_")+(0===o?"Gr":1===o?"Bl":2===o?"Wh":"")+"]",e?h+"("+a.cvt[h]+","+c+")":"",p,"(d =",s,"->",u*l,")"),a.rp1=a.rp0,a.rp2=p,i&&(a.rp0=p)}function Mi(e){this.char=e,this.state={},this.activeState=null}function Fi(e,t,i){this.contextName=i,this.startIndex=e,this.endOffset=t}function Ui(e,t,i){this.contextName=e,this.openRange=null,this.ranges=[],this.checkStart=t,this.checkEnd=i}function Bi(e,t){this.context=e,this.index=t,this.length=e.length,this.current=e[t],this.backtrack=e.slice(0,t),this.lookahead=e.slice(t+1)}function Vi(e){this.eventId=e,this.subscribers=[]}function zi(e){this.tokens=[],this.registeredContexts={},this.contextCheckers=[],this.events={},this.registeredModifiers=[],function(e){var t=this,i=["start","end","next","newToken","contextStart","contextEnd","insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD","updateContextsRanges"];i.forEach((function(e){Object.defineProperty(t.events,e,{value:new Vi(e)})})),e&&i.forEach((function(i){var n=e[i];"function"==typeof n&&t.events[i].subscribe(n)})),["insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD"].forEach((function(e){t.events[e].subscribe(t.updateContextsRanges)}))}.call(this,e)}function Hi(e){return/[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(e)}function ji(e){return/[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(e)}function qi(e){return/[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(e)}Jt.prototype.exec=function(e,i){if("number"!=typeof i)throw new Error("Point size is not a number!");if(!(2<this._errorState)){var n=this.font,r=this._prepState;if(!r||r.ppem!==i){var o=this._fpgmState;if(!o){di.prototype=ci,(o=this._fpgmState=new di("fpgm",n.tables.fpgm)).funcs=[],o.font=n,t.DEBUG&&(console.log("---EXEC FPGM---"),o.step=-1);try{Wt(o)}catch(e){return console.log("Hinting error in FPGM:"+e),void(this._errorState=3)}}di.prototype=o,(r=this._prepState=new di("prep",n.tables.prep)).ppem=i;var a=n.tables.cvt;if(a)for(var s=r.cvt=new Array(a.length),l=i/n.unitsPerEm,u=0;u<a.length;u++)s[u]=a[u]*l;else r.cvt=[];t.DEBUG&&(console.log("---EXEC PREP---"),r.step=-1);try{Wt(r)}catch(e){this._errorState<2&&console.log("Hinting error in PREP:"+e),this._errorState=2}}if(!(1<this._errorState))try{return $t(e,r)}catch(e){return this._errorState<1&&(console.log("Hinting error:"+e),console.log("Note: further hinting errors are silenced")),void(this._errorState=1)}}},$t=function(e,i){var n,r,o,a=i.ppem/i.font.unitsPerEm,s=a,l=e.components;if(di.prototype=i,l){var u=i.font;r=[],n=[];for(var c=0;c<l.length;c++){var d=l[c],h=u.glyphs.get(d.glyphIndex);o=new di("glyf",h.instructions),t.DEBUG&&(console.log("---EXEC COMP "+c+"---"),o.step=-1),Yt(h,o,a,s);for(var p=Math.round(d.dx*a),f=Math.round(d.dy*s),g=o.gZone,m=o.contours,v=0;v<g.length;v++){var y=g[v];y.xTouched=y.yTouched=!1,y.xo=y.x=y.x+p,y.yo=y.y=y.y+f}var b=r.length;r.push.apply(r,g);for(var w=0;w<m.length;w++)n.push(m[w]+b)}e.instructions&&!o.inhibitGridFit&&((o=new di("glyf",e.instructions)).gZone=o.z0=o.z1=o.z2=r,o.contours=n,r.push(new li(0,0),new li(Math.round(e.advanceWidth*a),0)),t.DEBUG&&(console.log("---EXEC COMPOSITE---"),o.step=-1),Wt(o),r.length-=2)}else o=new di("glyf",e.instructions),t.DEBUG&&(console.log("---EXEC GLYPH---"),o.step=-1),Yt(e,o,a,s),r=o.gZone;return r},Yt=function(e,i,n,r){for(var o,a,s,l=e.points||[],u=l.length,c=i.gZone=i.z0=i.z1=i.z2=[],d=i.contours=[],h=0;h<u;h++)o=l[h],c[h]=new li(o.x*n,o.y*r,o.lastPointOfContour,o.onCurve);for(var p=0;p<u;p++)o=c[p],a||(a=o,d.push(p)),o.lastPointOfContour?((o.nextPointOnContour=a).prevPointOnContour=o,a=void 0):(s=c[p+1],(o.nextPointOnContour=s).prevPointOnContour=o);if(!i.inhibitGridFit){if(t.DEBUG){console.log("PROCESSING GLYPH",i.stack);for(var f=0;f<u;f++)console.log(f,c[f].x,c[f].y)}if(c.push(new li(0,0),new li(Math.round(e.advanceWidth*n),0)),Wt(i),c.length-=2,t.DEBUG){console.log("FINISHED GLYPH",i.stack);for(var g=0;g<u;g++)console.log(g,c[g].x,c[g].y)}}},Wt=function(e){var i=e.prog;if(i){var n,r=i.length;for(e.ip=0;e.ip<r;e.ip++){if(t.DEBUG&&e.step++,!(n=Gt[i[e.ip]]))throw new Error("unknown instruction: 0x"+Number(i[e.ip]).toString(16));n(e)}}},Gt=[fi.bind(void 0,oi),fi.bind(void 0,ri),gi.bind(void 0,oi),gi.bind(void 0,ri),mi.bind(void 0,oi),mi.bind(void 0,ri),vi.bind(void 0,0),vi.bind(void 0,1),yi.bind(void 0,0),yi.bind(void 0,1),function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"SPVFS[]",n,r),e.pv=e.dpv=si(r,n)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"SPVFS[]",n,r),e.fv=si(r,n)},function(e){var i=e.stack,n=e.pv;t.DEBUG&&console.log(e.step,"GPV[]"),i.push(16384*n.x),i.push(16384*n.y)},function(e){var i=e.stack,n=e.fv;t.DEBUG&&console.log(e.step,"GFV[]"),i.push(16384*n.x),i.push(16384*n.y)},function(e){e.fv=e.pv,t.DEBUG&&console.log(e.step,"SFVTPV[]")},function(e){var i=e.stack,n=i.pop(),r=i.pop(),o=i.pop(),a=i.pop(),s=i.pop(),l=e.z0,u=e.z1,c=l[n],d=l[r],h=u[o],p=u[a],f=e.z2[s];t.DEBUG&&console.log("ISECT[], ",n,r,o,a,s);var g=c.x,m=c.y,v=d.x,y=d.y,b=h.x,w=h.y,E=p.x,_=p.y,S=(g-v)*(w-_)-(m-y)*(b-E),T=g*y-m*v,C=b*_-w*E;f.x=(T*(b-E)-C*(g-v))/S,f.y=(T*(w-_)-C*(m-y))/S},function(e){e.rp0=e.stack.pop(),t.DEBUG&&console.log(e.step,"SRP0[]",e.rp0)},function(e){e.rp1=e.stack.pop(),t.DEBUG&&console.log(e.step,"SRP1[]",e.rp1)},function(e){e.rp2=e.stack.pop(),t.DEBUG&&console.log(e.step,"SRP2[]",e.rp2)},function(e){var i=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"SZP0[]",i),e.zp0=i){case 0:e.tZone||hi(e),e.z0=e.tZone;break;case 1:e.z0=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){var i=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"SZP1[]",i),e.zp1=i){case 0:e.tZone||hi(e),e.z1=e.tZone;break;case 1:e.z1=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){var i=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"SZP2[]",i),e.zp2=i){case 0:e.tZone||hi(e),e.z2=e.tZone;break;case 1:e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){var i=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"SZPS[]",i),e.zp0=e.zp1=e.zp2=i,i){case 0:e.tZone||hi(e),e.z0=e.z1=e.z2=e.tZone;break;case 1:e.z0=e.z1=e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){e.loop=e.stack.pop(),t.DEBUG&&console.log(e.step,"SLOOP[]",e.loop)},function(e){t.DEBUG&&console.log(e.step,"RTG[]"),e.round=Qt},function(e){t.DEBUG&&console.log(e.step,"RTHG[]"),e.round=ei},function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"SMD[]",i),e.minDis=i/64},function(e){t.DEBUG&&console.log(e.step,"ELSE[]"),pi(e,!1)},function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"JMPR[]",i),e.ip+=i-1},function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"SCVTCI[]",i),e.cvCutIn=i/64},void 0,void 0,function(e){var i=e.stack;t.DEBUG&&console.log(e.step,"DUP[]"),i.push(i[i.length-1])},bi,function(e){t.DEBUG&&console.log(e.step,"CLEAR[]"),e.stack.length=0},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"SWAP[]"),i.push(n),i.push(r)},function(e){var i=e.stack;t.DEBUG&&console.log(e.step,"DEPTH[]"),i.push(i.length)},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"CINDEX[]",n),i.push(i[i.length-n])},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"MINDEX[]",n),i.push(i.splice(i.length-n,1)[0])},void 0,void 0,void 0,function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"LOOPCALL[]",n,r);var o=e.ip,a=e.prog;e.prog=e.funcs[n];for(var s=0;s<r;s++)Wt(e),t.DEBUG&&console.log(++e.step,s+1<r?"next loopcall":"done loopcall",s);e.ip=o,e.prog=a},function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"CALL[]",i);var n=e.ip,r=e.prog;e.prog=e.funcs[i],Wt(e),e.ip=n,e.prog=r,t.DEBUG&&console.log(++e.step,"returning from",i)},function(e){if("fpgm"!==e.env)throw new Error("FDEF not allowed here");var i=e.stack,n=e.prog,r=e.ip,o=i.pop(),a=r;for(t.DEBUG&&console.log(e.step,"FDEF[]",o);45!==n[++r];);e.ip=r,e.funcs[o]=n.slice(a+1,r)},void 0,wi.bind(void 0,0),wi.bind(void 0,1),Ei.bind(void 0,oi),Ei.bind(void 0,ri),_i.bind(void 0,0),_i.bind(void 0,1),Si.bind(void 0,0),Si.bind(void 0,1),Ti.bind(void 0,0),Ti.bind(void 0,1),function(e){for(var i=e.stack,n=e.loop,r=e.fv,o=i.pop()/64,a=e.z2;n--;){var s=i.pop(),l=a[s];t.DEBUG&&console.log(e.step,(1<e.loop?"loop "+(e.loop-n)+": ":"")+"SHPIX[]",s,o),r.setRelative(l,l,o),r.touch(l)}e.loop=1},function(e){for(var i=e.stack,n=e.rp1,r=e.rp2,o=e.loop,a=e.z0[n],s=e.z1[r],l=e.fv,u=e.dpv,c=e.z2;o--;){var d=i.pop(),h=c[d];t.DEBUG&&console.log(e.step,(1<e.loop?"loop "+(e.loop-o)+": ":"")+"IP[]",d,n,"<->",r),l.interpolate(h,a,s,u),l.touch(h)}e.loop=1},Ci.bind(void 0,0),Ci.bind(void 0,1),function(e){for(var i=e.stack,n=e.rp0,r=e.z0[n],o=e.loop,a=e.fv,s=e.pv,l=e.z1;o--;){var u=i.pop(),c=l[u];t.DEBUG&&console.log(e.step,(1<e.loop?"loop "+(e.loop-o)+": ":"")+"ALIGNRP[]",u),a.setRelative(c,r,0,s),a.touch(c)}e.loop=1},function(e){t.DEBUG&&console.log(e.step,"RTDG[]"),e.round=Zt},ki.bind(void 0,0),ki.bind(void 0,1),function(e){var i=e.prog,n=e.ip,r=e.stack,o=i[++n];t.DEBUG&&console.log(e.step,"NPUSHB[]",o);for(var a=0;a<o;a++)r.push(i[++n]);e.ip=n},function(e){var i=e.ip,n=e.prog,r=e.stack,o=n[++i];t.DEBUG&&console.log(e.step,"NPUSHW[]",o);for(var a=0;a<o;a++){var s=n[++i]<<8|n[++i];32768&s&&(s=-(1+(65535^s))),r.push(s)}e.ip=i},function(e){var i=e.stack,n=e.store;n||(n=e.store=[]);var r=i.pop(),o=i.pop();t.DEBUG&&console.log(e.step,"WS",r,o),n[o]=r},function(e){var i=e.stack,n=e.store,r=i.pop();t.DEBUG&&console.log(e.step,"RS",r);var o=n&&n[r]||0;i.push(o)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"WCVTP",n,r),e.cvt[r]=n/64},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"RCVT",n),i.push(64*e.cvt[n])},xi.bind(void 0,0),xi.bind(void 0,1),void 0,Ai.bind(void 0,0),Ai.bind(void 0,1),function(e){t.DEBUG&&console.log(e.step,"MPPEM[]"),e.stack.push(e.ppem)},void 0,function(e){t.DEBUG&&console.log(e.step,"FLIPON[]"),e.autoFlip=!0},void 0,void 0,function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"LT[]",n,r),i.push(r<n?1:0)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"LTEQ[]",n,r),i.push(r<=n?1:0)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"GT[]",n,r),i.push(n<r?1:0)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"GTEQ[]",n,r),i.push(n<=r?1:0)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"EQ[]",n,r),i.push(n===r?1:0)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"NEQ[]",n,r),i.push(n!==r?1:0)},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"ODD[]",n),i.push(Math.trunc(n)%2?1:0)},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"EVEN[]",n),i.push(Math.trunc(n)%2?0:1)},function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"IF[]",i),i||(pi(e,!0),t.DEBUG&&console.log(e.step,"EIF[]"))},function(e){t.DEBUG&&console.log(e.step,"EIF[]")},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"AND[]",n,r),i.push(n&&r?1:0)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"OR[]",n,r),i.push(n||r?1:0)},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"NOT[]",n),i.push(n?0:1)},Pi.bind(void 0,1),function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"SDB[]",i),e.deltaBase=i},function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"SDS[]",i),e.deltaShift=Math.pow(.5,i)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"ADD[]",n,r),i.push(r+n)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"SUB[]",n,r),i.push(r-n)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"DIV[]",n,r),i.push(64*r/n)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"MUL[]",n,r),i.push(r*n/64)},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"ABS[]",n),i.push(Math.abs(n))},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"NEG[]",n),i.push(-n)},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"FLOOR[]",n),i.push(64*Math.floor(n/64))},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"CEILING[]",n),i.push(64*Math.ceil(n/64))},Ii.bind(void 0,0),Ii.bind(void 0,1),Ii.bind(void 0,2),Ii.bind(void 0,3),void 0,void 0,void 0,void 0,function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"WCVTF[]",n,r),e.cvt[r]=n*e.ppem/e.font.unitsPerEm},Pi.bind(void 0,2),Pi.bind(void 0,3),Ri.bind(void 0,1),Ri.bind(void 0,2),Ri.bind(void 0,3),function(e){var i,n=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"SROUND[]",n),e.round=ni,192&n){case 0:i=.5;break;case 64:i=1;break;case 128:i=2;break;default:throw new Error("invalid SROUND value")}switch(e.srPeriod=i,48&n){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*i;break;case 32:e.srPhase=.5*i;break;case 48:e.srPhase=.75*i;break;default:throw new Error("invalid SROUND value")}n&=15,e.srThreshold=0===n?0:(n/8-.5)*i},function(e){var i,n=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"S45ROUND[]",n),e.round=ni,192&n){case 0:i=Math.sqrt(2)/2;break;case 64:i=Math.sqrt(2);break;case 128:i=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(e.srPeriod=i,48&n){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*i;break;case 32:e.srPhase=.5*i;break;case 48:e.srPhase=.75*i;break;default:throw new Error("invalid S45ROUND value")}n&=15,e.srThreshold=0===n?0:(n/8-.5)*i},void 0,void 0,function(e){t.DEBUG&&console.log(e.step,"ROFF[]"),e.round=Xt},void 0,function(e){t.DEBUG&&console.log(e.step,"RUTG[]"),e.round=ti},function(e){t.DEBUG&&console.log(e.step,"RDTG[]"),e.round=ii},bi,bi,void 0,void 0,void 0,void 0,void 0,function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"SCANCTRL[]",i)},Di.bind(void 0,0),Di.bind(void 0,1),function(e){var i=e.stack,n=i.pop(),r=0;t.DEBUG&&console.log(e.step,"GETINFO[]",n),1&n&&(r=35),32&n&&(r|=4096),i.push(r)},void 0,function(e){var i=e.stack,n=i.pop(),r=i.pop(),o=i.pop();t.DEBUG&&console.log(e.step,"ROLL[]"),i.push(r),i.push(n),i.push(o)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"MAX[]",n,r),i.push(Math.max(r,n))},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"MIN[]",n,r),i.push(Math.min(r,n))},function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"SCANTYPE[]",i)},function(e){var i=e.stack.pop(),n=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"INSTCTRL[]",i,n),i){case 1:return void(e.inhibitGridFit=!!n);case 2:return void(e.ignoreCvt=!!n);default:throw new Error("invalid INSTCTRL[] selector")}},void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,Oi.bind(void 0,1),Oi.bind(void 0,2),Oi.bind(void 0,3),Oi.bind(void 0,4),Oi.bind(void 0,5),Oi.bind(void 0,6),Oi.bind(void 0,7),Oi.bind(void 0,8),Ni.bind(void 0,1),Ni.bind(void 0,2),Ni.bind(void 0,3),Ni.bind(void 0,4),Ni.bind(void 0,5),Ni.bind(void 0,6),Ni.bind(void 0,7),Ni.bind(void 0,8),Li.bind(void 0,0,0,0,0,0),Li.bind(void 0,0,0,0,0,1),Li.bind(void 0,0,0,0,0,2),Li.bind(void 0,0,0,0,0,3),Li.bind(void 0,0,0,0,1,0),Li.bind(void 0,0,0,0,1,1),Li.bind(void 0,0,0,0,1,2),Li.bind(void 0,0,0,0,1,3),Li.bind(void 0,0,0,1,0,0),Li.bind(void 0,0,0,1,0,1),Li.bind(void 0,0,0,1,0,2),Li.bind(void 0,0,0,1,0,3),Li.bind(void 0,0,0,1,1,0),Li.bind(void 0,0,0,1,1,1),Li.bind(void 0,0,0,1,1,2),Li.bind(void 0,0,0,1,1,3),Li.bind(void 0,0,1,0,0,0),Li.bind(void 0,0,1,0,0,1),Li.bind(void 0,0,1,0,0,2),Li.bind(void 0,0,1,0,0,3),Li.bind(void 0,0,1,0,1,0),Li.bind(void 0,0,1,0,1,1),Li.bind(void 0,0,1,0,1,2),Li.bind(void 0,0,1,0,1,3),Li.bind(void 0,0,1,1,0,0),Li.bind(void 0,0,1,1,0,1),Li.bind(void 0,0,1,1,0,2),Li.bind(void 0,0,1,1,0,3),Li.bind(void 0,0,1,1,1,0),Li.bind(void 0,0,1,1,1,1),Li.bind(void 0,0,1,1,1,2),Li.bind(void 0,0,1,1,1,3),Li.bind(void 0,1,0,0,0,0),Li.bind(void 0,1,0,0,0,1),Li.bind(void 0,1,0,0,0,2),Li.bind(void 0,1,0,0,0,3),Li.bind(void 0,1,0,0,1,0),Li.bind(void 0,1,0,0,1,1),Li.bind(void 0,1,0,0,1,2),Li.bind(void 0,1,0,0,1,3),Li.bind(void 0,1,0,1,0,0),Li.bind(void 0,1,0,1,0,1),Li.bind(void 0,1,0,1,0,2),Li.bind(void 0,1,0,1,0,3),Li.bind(void 0,1,0,1,1,0),Li.bind(void 0,1,0,1,1,1),Li.bind(void 0,1,0,1,1,2),Li.bind(void 0,1,0,1,1,3),Li.bind(void 0,1,1,0,0,0),Li.bind(void 0,1,1,0,0,1),Li.bind(void 0,1,1,0,0,2),Li.bind(void 0,1,1,0,0,3),Li.bind(void 0,1,1,0,1,0),Li.bind(void 0,1,1,0,1,1),Li.bind(void 0,1,1,0,1,2),Li.bind(void 0,1,1,0,1,3),Li.bind(void 0,1,1,1,0,0),Li.bind(void 0,1,1,1,0,1),Li.bind(void 0,1,1,1,0,2),Li.bind(void 0,1,1,1,0,3),Li.bind(void 0,1,1,1,1,0),Li.bind(void 0,1,1,1,1,1),Li.bind(void 0,1,1,1,1,2),Li.bind(void 0,1,1,1,1,3)],Mi.prototype.setState=function(e,t){return this.state[e]=t,this.activeState={key:e,value:this.state[e]},this.activeState},Mi.prototype.getState=function(e){return this.state[e]||null},zi.prototype.inboundIndex=function(e){return 0<=e&&e<this.tokens.length},zi.prototype.composeRUD=function(e){var t=this,i=e.map((function(e){return t[e[0]].apply(t,e.slice(1).concat(!0))})),n=function(e){return"object"==typeof e&&e.hasOwnProperty("FAIL")};if(i.every(n))return{FAIL:"composeRUD: one or more operations hasn't completed successfully",report:i.filter(n)};this.dispatch("composeRUD",[i.filter((function(e){return!n(e)}))])},zi.prototype.replaceRange=function(e,t,i,n){t=null!==t?t:this.tokens.length;var r=i.every((function(e){return e instanceof Mi}));if(!isNaN(e)&&this.inboundIndex(e)&&r){var o=this.tokens.splice.apply(this.tokens,[e,t].concat(i));return n||this.dispatch("replaceToken",[e,t,i]),[o,i]}return{FAIL:"replaceRange: invalid tokens or startIndex."}},zi.prototype.replaceToken=function(e,t,i){if(!isNaN(e)&&this.inboundIndex(e)&&t instanceof Mi){var n=this.tokens.splice(e,1,t);return i||this.dispatch("replaceToken",[e,t]),[n[0],t]}return{FAIL:"replaceToken: invalid token or index."}},zi.prototype.removeRange=function(e,t,i){t=isNaN(t)?this.tokens.length:t;var n=this.tokens.splice(e,t);return i||this.dispatch("removeRange",[n,e,t]),n},zi.prototype.removeToken=function(e,t){if(isNaN(e)||!this.inboundIndex(e))return{FAIL:"removeToken: invalid token index."};var i=this.tokens.splice(e,1);return t||this.dispatch("removeToken",[i,e]),i},zi.prototype.insertToken=function(e,t,i){return e.every((function(e){return e instanceof Mi}))?(this.tokens.splice.apply(this.tokens,[t,0].concat(e)),i||this.dispatch("insertToken",[e,t]),e):{FAIL:"insertToken: invalid token(s)."}},zi.prototype.registerModifier=function(e,t,i){this.events.newToken.subscribe((function(n,r){var o=[n,r],a=[n,r];if(null===t||!0===t.apply(this,o)){var s=i.apply(this,a);n.setState(e,s)}})),this.registeredModifiers.push(e)},Vi.prototype.subscribe=function(e){return"function"==typeof e?this.subscribers.push(e)-1:{FAIL:"invalid '"+this.eventId+"' event handler"}},Vi.prototype.unsubscribe=function(e){this.subscribers.splice(e,1)},Bi.prototype.setCurrentIndex=function(e){this.index=e,this.current=this.context[e],this.backtrack=this.context.slice(0,e),this.lookahead=this.context.slice(e+1)},Bi.prototype.get=function(e){switch(!0){case 0===e:return this.current;case e<0&&Math.abs(e)<=this.backtrack.length:return this.backtrack.slice(e)[0];case 0<e&&e<=this.lookahead.length:return this.lookahead[e-1];default:return null}},zi.prototype.rangeToText=function(e){if(e instanceof Fi)return this.getRangeTokens(e).map((function(e){return e.char})).join("")},zi.prototype.getText=function(){return this.tokens.map((function(e){return e.char})).join("")},zi.prototype.getContext=function(e){return this.registeredContexts[e]||null},zi.prototype.on=function(e,t){var i=this.events[e];return i?i.subscribe(t):null},zi.prototype.dispatch=function(e,t){var i=this,n=this.events[e];n instanceof Vi&&n.subscribers.forEach((function(e){e.apply(i,t||[])}))},zi.prototype.registerContextChecker=function(e,t,i){if(this.getContext(e))return{FAIL:"context name '"+e+"' is already registered."};if("function"!=typeof t)return{FAIL:"missing context start check."};if("function"!=typeof i)return{FAIL:"missing context end check."};var n=new Ui(e,t,i);return this.registeredContexts[e]=n,this.contextCheckers.push(n),n},zi.prototype.getRangeTokens=function(e){var t=e.startIndex+e.endOffset;return[].concat(this.tokens.slice(e.startIndex,t))},zi.prototype.getContextRanges=function(e){var t=this.getContext(e);return t?t.ranges:{FAIL:"context checker '"+e+"' is not registered."}},zi.prototype.resetContextsRanges=function(){var e=this.registeredContexts;for(var t in e)e.hasOwnProperty(t)&&(e[t].ranges=[])},zi.prototype.updateContextsRanges=function(){this.resetContextsRanges();for(var e=this.tokens.map((function(e){return e.char})),t=0;t<e.length;t++){var i=new Bi(e,t);this.runContextCheck(i)}this.dispatch("updateContextsRanges",[this.registeredContexts])},zi.prototype.setEndOffset=function(e,t){var i=new Fi(this.getContext(t).openRange.startIndex,e,t),n=this.getContext(t).ranges;return i.rangeId=t+"."+n.length,n.push(i),this.getContext(t).openRange=null,i},zi.prototype.runContextCheck=function(e){var t=this,i=e.index;this.contextCheckers.forEach((function(n){var r=n.contextName,o=t.getContext(r).openRange;if(!o&&n.checkStart(e)&&(o=new Fi(i,null,r),t.getContext(r).openRange=o,t.dispatch("contextStart",[r,i])),o&&n.checkEnd(e)){var a=i-o.startIndex+1,s=t.setEndOffset(a,r);t.dispatch("contextEnd",[r,s])}}))},zi.prototype.tokenize=function(e){this.tokens=[],this.resetContextsRanges();var t=Array.from(e);this.dispatch("start");for(var i=0;i<t.length;i++){var n=t[i],r=new Bi(t,i);this.dispatch("next",[r]),this.runContextCheck(r);var o=new Mi(n);this.tokens.push(o),this.dispatch("newToken",[o,r])}return this.dispatch("end",[this.tokens]),this.tokens};var Gi={arabicWordStartCheck:function(e){var t=e.current,i=e.get(-1);return null===i&&Hi(t)||!Hi(i)&&Hi(t)},arabicWordEndCheck:function(e){var t=e.get(1);return null===t||!Hi(t)}},Wi={arabicSentenceStartCheck:function(e){var t=e.current,i=e.get(-1);return(Hi(t)||qi(t))&&!Hi(i)},arabicSentenceEndCheck:function(e){var t=e.get(1);switch(!0){case null===t:return!0;case!Hi(t)&&!qi(t):var i=/\s/.test(t);if(!i)return!0;if(i&&!e.lookahead.some((function(e){return Hi(e)||qi(e)})))return!0;break;default:return!1}}};function $i(e){var t=this.features.arab,i=this.tokenizer.getRangeTokens(e);if(1!==i.length){var n=function(e,i,n){if(t.hasOwnProperty(e)){var r,o=(r=t[e].lookup(n)||null,1===r.length&&12===r[0].id&&r[0].substitution)[0];return 0<=o?i.setState(e,o):void 0}},r=new Bi(i,0),o=new Bi(i.map((function(e){return e.char})),0);i.forEach((function(e,t){if(!qi(e.char)){r.setCurrentIndex(t),o.setCurrentIndex(t);var i=0;switch(function(e){for(var t=[].concat(e.backtrack),i=t.length-1;0<=i;i--){var n=t[i],r=ji(n),o=qi(n);if(!r&&!o)return!0;if(r)return!1}return!1}(o)&&(i|=1),function(e){if(ji(e.current))return!1;for(var t=0;t<e.lookahead.length;t++)if(!qi(e.lookahead[t]))return!0;return!1}(o)&&(i|=2),i){case 0:return;case 1:n("fina",e,r);break;case 2:n("init",e,r);break;case 3:n("medi",e,r)}}}))}}function Yi(e){this.baseDir=e||"ltr",this.tokenizer=new zi,this.features=[]}function Ki(){if(-1===this.tokenizer.registeredModifiers.indexOf("glyphIndex"))throw new Error("glyphIndex modifier is required to apply arabic presentation features.")}function Ji(){var e=this;this.features.hasOwnProperty("arab")&&this.features.arab.hasOwnProperty("rlig")&&(Ki.call(this),this.tokenizer.getContextRanges("arabicWord").forEach((function(t){(function(e){var t=this.features.arab;if(t.hasOwnProperty("rlig"))for(var i=this.tokenizer.getRangeTokens(e),n=0;n<i.length;n++){var r=new Bi(i,n),o=t.rlig.lookup(r)||null,a=1===o.length&&63===o[0].id&&o[0].substitution,s=1===o.length&&41===o[0].id&&o[0].substitution[0],l=i[n];if(s){l.setState("rlig",[s.ligGlyph]);for(var u=0;u<s.components.length;u++){var c=s.components[u],d=r.get(u+1);d.activeState.value===c&&(d.state.deleted=!0)}}else if(a){var h=a&&1===a.length&&12===a[0].id&&a[0].substitution;h&&0<=h&&l.setState("rlig",h)}}}).call(e,t)})))}Yi.prototype.setText=function(e){this.text=e},Yi.prototype.contextChecks={arabicWordCheck:Gi,arabicSentenceCheck:Wi},Yi.prototype.subscribeArabicForms=function(e){var t=this;this.tokenizer.events.contextEnd.subscribe((function(i,n){if("arabicWord"===i)return $i.call(t.tokenizer,n,e)}))},Yi.prototype.applyFeatures=function(e){for(var t=0;t<e.length;t++){var i=e[t];if(i){var n=i.script;this.features[n]||(this.features[n]={}),this.features[n][i.tag]=i}}},Yi.prototype.registerModifier=function(e,t,i){this.tokenizer.registerModifier(e,t,i)},Yi.prototype.processText=function(e){this.text&&this.text===e||(this.setText(e),function(){return function(){var e=this.contextChecks.arabicWordCheck;return this.tokenizer.registerContextChecker("arabicWord",e.arabicWordStartCheck,e.arabicWordEndCheck)}.call(this),function(){var e=this.contextChecks.arabicSentenceCheck;return this.tokenizer.registerContextChecker("arabicSentence",e.arabicSentenceStartCheck,e.arabicSentenceEndCheck)}.call(this),this.tokenizer.tokenize(this.text)}.call(this),function(){var e=this;this.features.hasOwnProperty("arab")&&(Ki.call(this),this.tokenizer.getContextRanges("arabicWord").forEach((function(t){$i.call(e,t)})))}.call(this),Ji.call(this),function(){var e=this;this.tokenizer.getContextRanges("arabicSentence").forEach((function(t){var i=e.tokenizer.getRangeTokens(t);e.tokenizer.replaceRange(t.startIndex,t.endOffset,i.reverse())}))}.call(this))},Yi.prototype.getBidiText=function(e){return this.processText(e),this.tokenizer.getText()},Yi.prototype.getTextGlyphs=function(e){this.processText(e);for(var t=[],i=0;i<this.tokenizer.tokens.length;i++){var n=this.tokenizer.tokens[i];if(!n.state.deleted){var r=n.activeState.value;t.push(Array.isArray(r)?r[0]:r)}}return t};var Xi="ltr";function Qi(e,t){this.font=e,this.features={},Xi=t||Xi}function Zi(e,t,i,n){this.tag=e,this.featureRef=t,this.lookups=i.lookups,this.script=n}function en(e){this.table=e}function tn(e){this.ligatureSets=e}function nn(e,t,i){this.lookups=e,this.subtable=i,this.lookupTable=t,i.hasOwnProperty("coverage")&&(this.coverage=new en(i.coverage)),i.hasOwnProperty("inputCoverage")&&(this.inputCoverage=i.inputCoverage.map((function(e){return new en(e)}))),i.hasOwnProperty("backtrackCoverage")&&(this.backtrackCoverage=i.backtrackCoverage.map((function(e){return new en(e)}))),i.hasOwnProperty("lookaheadCoverage")&&(this.lookaheadCoverage=i.lookaheadCoverage.map((function(e){return new en(e)}))),i.hasOwnProperty("ligatureSets")&&(this.ligatureSets=new tn(i.ligatureSets))}function rn(e,t){this.index=e,this.subtables=t[e].subtables.map((function(i){return new nn(t,t[e],i)}))}function on(e,t){this.lookups=t.map((function(t){return new rn(t,e)}))}function an(e,t){for(var i=[],n=0;n<e.length;n++){var r=e[n],o=t.current.activeState.value;o=Array.isArray(o)?o[0]:o;var a=r.lookup(o);-1!==a&&i.push(a)}return i.length!==e.length?-1:i}function sn(e){(e=e||{}).empty||(Bt(e.familyName,"When creating a new Font object, familyName is required."),Bt(e.styleName,"When creating a new Font object, styleName is required."),Bt(e.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),Bt(e.ascender,"When creating a new Font object, ascender is required."),Bt(e.descender,"When creating a new Font object, descender is required."),Bt(e.descender<0,"Descender should be negative (e.g. -512)."),this.names={fontFamily:{en:e.familyName||" "},fontSubfamily:{en:e.styleName||" "},fullName:{en:e.fullName||e.familyName+" "+e.styleName},postScriptName:{en:e.postScriptName||(e.familyName+e.styleName).replace(/\s/g,"")},designer:{en:e.designer||" "},designerURL:{en:e.designerURL||" "},manufacturer:{en:e.manufacturer||" "},manufacturerURL:{en:e.manufacturerURL||" "},license:{en:e.license||" "},licenseURL:{en:e.licenseURL||" "},version:{en:e.version||"Version 0.1"},description:{en:e.description||" "},copyright:{en:e.copyright||" "},trademark:{en:e.trademark||" "}},this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.tables={os2:{usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,fsSelection:e.fsSelection||this.fsSelectionValues.REGULAR}}),this.supported=!0,this.glyphs=new Ee.GlyphSet(this,e.glyphs||[]),this.encoding=new pe(this),this.position=new Nt(this),this.substitution=new Lt(this),this.tables=this.tables||{},Object.defineProperty(this,"hinting",{get:function(){return this._hinting?this._hinting:"truetype"===this.outlinesFormat?this._hinting=new Jt(this):void 0}})}function ln(e,t,i,n){var r={},o=new ae.Parser(e,t);r.name=n[o.parseUShort()]||{},o.skip("uShort",1),r.coordinates={};for(var a=0;a<i.length;++a)r.coordinates[i[a].tag]=o.parseFixed();return r}tn.prototype.lookup=function(e,t){for(var i=this.ligatureSets[t],n=function(e,t){if(e.length>t.length)return null;for(var i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},r=0;r<i.length;r++){var o=i[r],a=e.lookahead.map((function(e){return e.activeState.value}));if("rtl"===Xi&&a.reverse(),n(o.components,a))return o}return null},rn.prototype.lookup=function(e){for(var t=[],i=0;i<this.subtables.length;i++){var n=this.subtables[i].lookup(e);(null!==n||n.length)&&(t=t.concat(n))}return t},nn.prototype.lookup=function(e){var t=[],i=this.lookupTable.lookupType,n=this.subtable.substFormat;if(1===i&&2===n){var r=function(e){var t=e.current.activeState.value;t=Array.isArray(t)?t[0]:t;var i=this.coverage.lookup(t);return-1===i?[]:[this.subtable.substitute[i]]}.call(this,e);0<r.length&&t.push({id:12,substitution:r})}if(6===i&&3===n){var o=function(e){var t=this.inputCoverage.length+this.lookaheadCoverage.length+this.backtrackCoverage.length;if(e.context.length<t)return[];var i=an(this.inputCoverage,e);if(-1===i)return[];var n=this.inputCoverage.length-1;if(e.lookahead.length<this.lookaheadCoverage.length)return[];for(var r=e.lookahead.slice(n);r.length&&qi(r[0].char);)r.shift();var o=new Bi(r,0),a=an(this.lookaheadCoverage,o),s=[].concat(e.backtrack);for(s.reverse();s.length&&qi(s[0].char);)s.shift();if(s.length<this.backtrackCoverage.length)return[];var l=new Bi(s,0),u=an(this.backtrackCoverage,l),c=[];if(i.length===this.inputCoverage.length&&a.length===this.lookaheadCoverage.length&&u.length===this.backtrackCoverage.length)for(var d=this.subtable.lookupRecords,h=0;h<d.length;h++)for(var p=d[h],f=0;f<i.length;f++){var g=new Bi([e.get(f)],0),m=new rn(p.lookupListIndex,this.lookups).lookup(g);c=c.concat(m)}return c}.call(this,e);0<o.length&&t.push({id:63,substitution:o})}if(4===i&&1===n){var a=function(e){var t=e.current.activeState.value,i=this.coverage.lookup(t);if(-1===i)return[];var n=this.ligatureSets.lookup(e,i);return n?[n]:[]}.call(this,e);0<a.length&&t.push({id:41,substitution:a})}return t},en.prototype.lookup=function(e){if(!e)return-1;switch(this.table.format){case 1:return this.table.glyphs.indexOf(e);case 2:for(var t=this.table.ranges,i=0;i<t.length;i++){var n=t[i];if(e>=n.start&&e<=n.end){var r=e-n.start;return n.index+r}}break;default:return-1}return-1},Zi.prototype.lookup=function(e){for(var t=[],i=0;i<this.lookups.length;i++){var n=this.lookups[i].lookup(e);(null!==n||n.length)&&(t=t.concat(n))}return t},Qi.prototype.getScriptFeaturesIndexes=function(e){if(!e)return[];if(!this.font.tables.gsub)return[];for(var t=this.font.tables.gsub.scripts,i=0;i<t.length;i++){var n=t[i];if(n.tag===e)return n.script.defaultLangSys.featureIndexes;var r=n.langSysRecords;if(r)for(var o=0;o<r.length;o++){var a=r[o];if(a.tag===e)return a.langSys.featureIndexes}}return[]},Qi.prototype.mapTagsToFeatures=function(e,t){for(var i={},n=0;n<e.length;n++){var r=e[n].feature,o=e[n].tag,a=new on(this.font.tables.gsub.lookups,r.lookupListIndexes);i[o]=new Zi(o,r,a,t)}this.features[t].tags=i},Qi.prototype.getScriptFeatures=function(e){var t=this.features[e];if(this.features.hasOwnProperty(e))return t;var i=this.getScriptFeaturesIndexes(e);if(!i)return null;var n=this.font.tables.gsub;return t=i.map((function(e){return n.features[e]})),this.features[e]=t,this.mapTagsToFeatures(t,e),t},Qi.prototype.getFeature=function(e){return this.font?(this.features.hasOwnProperty(e.script)||this.getScriptFeatures(e.script),this.features[e.script].tags[e.tag]||null):{FAIL:"No font was found"}},sn.prototype.hasChar=function(e){return null!==this.encoding.charToGlyphIndex(e)},sn.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)},sn.prototype.charToGlyph=function(e){var t=this.charToGlyphIndex(e),i=this.glyphs.get(t);return i||(i=this.glyphs.get(0)),i},sn.prototype.stringToGlyphs=function(e,t){var i=this;t=t||this.defaultRenderOptions;var n=new Yi;n.registerModifier("glyphIndex",null,(function(e){return i.charToGlyphIndex(e.char)}));var r=new Qi(this);n.applyFeatures(["init","medi","fina","rlig"].map((function(e){var t={tag:e,script:"arab"},i=r.getFeature(t);if(i)return i})));var o=n.getTextGlyphs(e),a=o.length;if(t.features){var s=t.script||this.substitution.getDefaultScriptName(),l=[];t.features.liga&&(l=l.concat(this.substitution.getFeature("liga",s,t.language))),t.features.rlig&&(l=l.concat(this.substitution.getFeature("rlig",s,t.language)));for(var u=0;u<a;u+=1)for(var c=0;c<l.length;c++){for(var d=l[c],h=d.sub,p=h.length,f=0;f<p&&h[f]===o[u+f];)f++;f===p&&(o.splice(u,p,d.by),a=a-p+1)}}for(var g=new Array(a),m=this.glyphs.get(0),v=0;v<a;v+=1)g[v]=i.glyphs.get(o[v])||m;return g},sn.prototype.nameToGlyphIndex=function(e){return this.glyphNames.nameToGlyphIndex(e)},sn.prototype.nameToGlyph=function(e){var t=this.nameToGlyphIndex(e),i=this.glyphs.get(t);return i||(i=this.glyphs.get(0)),i},sn.prototype.glyphIndexToName=function(e){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(e):""},sn.prototype.getKerningValue=function(e,t){e=e.index||e,t=t.index||t;var i=this.position.defaultKerningTables;return i?this.position.getKerningValue(i,e,t):this.kerningPairs[e+","+t]||0},sn.prototype.defaultRenderOptions={kerning:!0,features:{liga:!0,rlig:!0}},sn.prototype.forEachGlyph=function(e,t,i,n,r,o){t=void 0!==t?t:0,i=void 0!==i?i:0,n=void 0!==n?n:72,r=r||this.defaultRenderOptions;var a,s=1/this.unitsPerEm*n,l=this.stringToGlyphs(e,r);if(r.kerning){var u=r.script||this.position.getDefaultScriptName();a=this.position.getKerningTables(u,r.language)}for(var c=0;c<l.length;c+=1){var d=l[c];o.call(this,d,t,i,n,r),d.advanceWidth&&(t+=d.advanceWidth*s),r.kerning&&c<l.length-1&&(t+=(a?this.position.getKerningValue(a,d.index,l[c+1].index):this.getKerningValue(d,l[c+1]))*s),r.letterSpacing?t+=r.letterSpacing*n:r.tracking&&(t+=r.tracking/1e3*n)}return t},sn.prototype.getPath=function(e,t,i,n,r){var o=new x;return this.forEachGlyph(e,t,i,n,r,(function(e,t,i,n){var a=e.getPath(t,i,n,r,this);o.extend(a)})),o},sn.prototype.getPaths=function(e,t,i,n,r){var o=[];return this.forEachGlyph(e,t,i,n,r,(function(e,t,i,n){var a=e.getPath(t,i,n,r,this);o.push(a)})),o},sn.prototype.getAdvanceWidth=function(e,t,i){return this.forEachGlyph(e,0,0,t,i,(function(){}))},sn.prototype.draw=function(e,t,i,n,r,o){this.getPath(t,i,n,r,o).draw(e)},sn.prototype.drawPoints=function(e,t,i,n,r,o){this.forEachGlyph(t,i,n,r,o,(function(t,i,n,r){t.drawPoints(e,i,n,r)}))},sn.prototype.drawMetrics=function(e,t,i,n,r,o){this.forEachGlyph(t,i,n,r,o,(function(t,i,n,r){t.drawMetrics(e,i,n,r)}))},sn.prototype.getEnglishName=function(e){var t=this.names[e];if(t)return t.en},sn.prototype.validate=function(){var e=this;function t(t){var i=e.getEnglishName(t);i&&i.trim().length}t("fontFamily"),t("weightName"),t("manufacturer"),t("copyright"),t("version"),this.unitsPerEm},sn.prototype.toTables=function(){return Pt(this)},sn.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},sn.prototype.toArrayBuffer=function(){for(var e=this.toTables().encode(),t=new ArrayBuffer(e.length),i=new Uint8Array(t),n=0;n<e.length;n++)i[n]=e[n];return t},sn.prototype.download=function(t){var n=this.getEnglishName("fontFamily"),r=this.getEnglishName("fontSubfamily");t=t||n.replace(/\s/g,"")+"-"+r+".otf";var o=this.toArrayBuffer();if("undefined"!=typeof window)if(window.URL=window.URL||window.webkitURL,window.URL){var a=new DataView(o),s=new Blob([a],{type:"font/opentype"}),l=document.createElement("a");l.href=window.URL.createObjectURL(s),l.download=t;var u=document.createEvent("MouseEvents");u.initEvent("click",!0,!1),l.dispatchEvent(u)}else console.warn("Font file could not be downloaded. Try using a different browser.");else{var c=i(245),d=function(t){for(var i=new e(t.byteLength),n=new Uint8Array(t),r=0;r<i.length;++r)i[r]=n[r];return i}(o);c.writeFileSync(t,d)}},sn.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},sn.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9},sn.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};var un=function(e,t,i){var n=new ae.Parser(e,t),r=n.parseULong();I.argument(65536===r,"Unsupported fvar table version.");var o=n.parseOffset16();n.skip("uShort",1);for(var a,s,l,u,c,d=n.parseUShort(),h=n.parseUShort(),p=n.parseUShort(),f=n.parseUShort(),g=[],m=0;m<d;m++)g.push((a=e,s=t+o+m*h,l=i,c=u=void 0,u={},c=new ae.Parser(a,s),u.tag=c.parseTag(),u.minValue=c.parseFixed(),u.defaultValue=c.parseFixed(),u.maxValue=c.parseFixed(),c.skip("uShort",1),u.name=l[c.parseUShort()]||{},u));for(var v=[],y=t+o+d*h,b=0;b<p;b++)v.push(ln(e,y+b*f,g,i));return{axes:g,instances:v}},cn=new Array(10);cn[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{posFormat:1,coverage:this.parsePointer(re.coverage),value:this.parseValueRecord()}:2===t?{posFormat:2,coverage:this.parsePointer(re.coverage),values:this.parseValueRecordList()}:void I.assert(!1,"0x"+e.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},cn[2]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();I.assert(1===t||2===t,"0x"+e.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");var i=this.parsePointer(re.coverage),n=this.parseUShort(),r=this.parseUShort();if(1===t)return{posFormat:t,coverage:i,valueFormat1:n,valueFormat2:r,pairSets:this.parseList(re.pointer(re.list((function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(n),value2:this.parseValueRecord(r)}}))))};if(2===t){var o=this.parsePointer(re.classDef),a=this.parsePointer(re.classDef),s=this.parseUShort(),l=this.parseUShort();return{posFormat:t,coverage:i,valueFormat1:n,valueFormat2:r,classDef1:o,classDef2:a,class1Count:s,class2Count:l,classRecords:this.parseList(s,re.list(l,(function(){return{value1:this.parseValueRecord(n),value2:this.parseValueRecord(r)}})))}}},cn[3]=function(){return{error:"GPOS Lookup 3 not supported"}},cn[4]=function(){return{error:"GPOS Lookup 4 not supported"}},cn[5]=function(){return{error:"GPOS Lookup 5 not supported"}},cn[6]=function(){return{error:"GPOS Lookup 6 not supported"}},cn[7]=function(){return{error:"GPOS Lookup 7 not supported"}},cn[8]=function(){return{error:"GPOS Lookup 8 not supported"}},cn[9]=function(){return{error:"GPOS Lookup 9 not supported"}},new Array(10);var dn=function(e,t){var i=new re(e,t=t||0),n=i.parseVersion(1);return I.argument(1===n||1.1===n,"Unsupported GPOS table version "+n),1===n?{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(cn)}:{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(cn),variations:i.parseFeatureVariationsList()}},hn=function(e,t){var i=new ae.Parser(e,t),n=i.parseUShort();if(0===n)return function(e){var t={};e.skip("uShort");var i=e.parseUShort();I.argument(0===i,"Unsupported kern sub-table version."),e.skip("uShort",2);var n=e.parseUShort();e.skip("uShort",3);for(var r=0;r<n;r+=1){var o=e.parseUShort(),a=e.parseUShort(),s=e.parseShort();t[o+","+a]=s}return t}(i);if(1===n)return function(e){var t={};e.skip("uShort"),1<e.parseULong()&&console.warn("Only the first kern subtable is supported."),e.skip("uLong");var i=255&e.parseUShort();if(e.skip("uShort"),0===i){var n=e.parseUShort();e.skip("uShort",3);for(var r=0;r<n;r+=1){var o=e.parseUShort(),a=e.parseUShort(),s=e.parseShort();t[o+","+a]=s}}return t}(i);throw new Error("Unsupported kern table version ("+n+").")},pn=function(e,t,i,n){for(var r=new ae.Parser(e,t),o=n?r.parseUShort:r.parseULong,a=[],s=0;s<i+1;s+=1){var l=o.call(r);n&&(l*=2),a.push(l)}return a};function fn(e,t){i(245).readFile(e,(function(e,i){if(e)return t(e.message);t(null,Ut(i))}))}function gn(e,t){var i=new XMLHttpRequest;i.open("get",e,!0),i.responseType="arraybuffer",i.onload=function(){return i.response?t(null,i.response):t("Font could not be loaded: "+i.statusText)},i.onerror=function(){t("Font could not be loaded")},i.send()}function mn(e,t){for(var i=[],n=12,r=0;r<t;r+=1){var o=ae.getTag(e,n),a=ae.getULong(e,n+4),s=ae.getULong(e,n+8),l=ae.getULong(e,n+12);i.push({tag:o,checksum:a,offset:s,length:l,compression:!1}),n+=16}return i}function vn(e,t){if("WOFF"!==t.compression)return{data:e,offset:t.offset};var i=new Uint8Array(e.buffer,t.offset+2,t.compressedLength-2),n=new Uint8Array(t.length);if(function(e,t){var i,n,r=new a(e,t);do{switch(i=b(r),w(r,2,0)){case 0:n=T(r);break;case 1:n=S(r,s,l);break;case 2:_(r,r.ltree,r.dtree),n=S(r,r.ltree,r.dtree);break;default:n=-3}if(0!==n)throw new Error("Data error")}while(!i);r.destLen<r.dest.length?"function"==typeof r.dest.slice?r.dest.slice(0,r.destLen):r.dest.subarray(0,r.destLen):r.dest}(i,n),n.byteLength!==t.length)throw new Error("Decompression error: "+t.tag+" decompressed length doesn't match recorded length");return{data:new DataView(n.buffer,0),offset:0}}function yn(e){var t,i,n,r,o,a,s,l,u,c,d,h,p,f,g=new sn({empty:!0}),m=new DataView(e,0),v=[],y=ae.getTag(m,0);if(y===String.fromCharCode(0,1,0,0)||"true"===y||"typ1"===y)g.outlinesFormat="truetype",v=mn(m,n=ae.getUShort(m,4));else if("OTTO"===y)g.outlinesFormat="cff",v=mn(m,n=ae.getUShort(m,4));else{if("wOFF"!==y)throw new Error("Unsupported OpenType signature "+y);var b=ae.getTag(m,4);if(b===String.fromCharCode(0,1,0,0))g.outlinesFormat="truetype";else{if("OTTO"!==b)throw new Error("Unsupported OpenType flavor "+y);g.outlinesFormat="cff"}v=function(e,t){for(var i=[],n=44,r=0;r<t;r+=1){var o,a=ae.getTag(e,n),s=ae.getULong(e,n+4),l=ae.getULong(e,n+8),u=ae.getULong(e,n+12);o=l<u&&"WOFF",i.push({tag:a,offset:s,compression:o,compressedLength:l,length:u}),n+=20}return i}(m,n=ae.getUShort(m,12))}for(var w=0;w<n;w+=1){var E=v[w],_=void 0;switch(E.tag){case"cmap":_=vn(m,E),g.tables.cmap=se(_.data,_.offset),g.encoding=new fe(g.tables.cmap);break;case"cvt ":_=vn(m,E),f=new ae.Parser(_.data,_.offset),g.tables.cvt=f.parseShortList(E.length/2);break;case"fvar":o=E;break;case"fpgm":_=vn(m,E),f=new ae.Parser(_.data,_.offset),g.tables.fpgm=f.parseByteList(E.length);break;case"head":_=vn(m,E),g.tables.head=ze(_.data,_.offset),g.unitsPerEm=g.tables.head.unitsPerEm,t=g.tables.head.indexToLocFormat;break;case"hhea":_=vn(m,E),g.tables.hhea=je(_.data,_.offset),g.ascender=g.tables.hhea.ascender,g.descender=g.tables.hhea.descender,g.numberOfHMetrics=g.tables.hhea.numberOfHMetrics;break;case"hmtx":u=E;break;case"ltag":_=vn(m,E),i=Ye(_.data,_.offset);break;case"maxp":_=vn(m,E),g.tables.maxp=Ke(_.data,_.offset),g.numGlyphs=g.tables.maxp.numGlyphs;break;case"name":h=E;break;case"OS/2":_=vn(m,E),g.tables.os2=ht(_.data,_.offset);break;case"post":_=vn(m,E),g.tables.post=gt(_.data,_.offset),g.glyphNames=new me(g.tables.post);break;case"prep":_=vn(m,E),f=new ae.Parser(_.data,_.offset),g.tables.prep=f.parseByteList(E.length);break;case"glyf":a=E;break;case"loca":d=E;break;case"CFF ":r=E;break;case"kern":c=E;break;case"GPOS":s=E;break;case"GSUB":l=E;break;case"meta":p=E}}var S=vn(m,h);if(g.tables.name=ut(S.data,S.offset,i),g.names=g.tables.name,a&&d){var T=0===t,C=vn(m,d),k=pn(C.data,C.offset,g.numGlyphs,T),x=vn(m,a);g.glyphs=Kt.parse(x.data,x.offset,k,g)}else{if(!r)throw new Error("Font doesn't contain TrueType or CFF outlines.");var A=vn(m,r);Be(A.data,A.offset,g)}var P=vn(m,u);if(Ge(P.data,P.offset,g.numberOfHMetrics,g.numGlyphs,g.glyphs),function(e){for(var t,i=e.tables.cmap.glyphIndexMap,n=Object.keys(i),r=0;r<n.length;r+=1){var o=n[r],a=i[o];(t=e.glyphs.get(a)).addUnicode(parseInt(o))}for(var s=0;s<e.glyphs.length;s+=1)t=e.glyphs.get(s),e.cffEncoding?e.isCIDFont?t.name="gid"+s:t.name=e.cffEncoding.charset[s]:e.glyphNames.names&&(t.name=e.glyphNames.glyphIndexToName(s))}(g),c){var I=vn(m,c);g.kerningPairs=hn(I.data,I.offset)}else g.kerningPairs={};if(s){var R=vn(m,s);g.tables.gpos=dn(R.data,R.offset),g.position.init()}if(l){var D=vn(m,l);g.tables.gsub=wt(D.data,D.offset)}if(o){var O=vn(m,o);g.tables.fvar=un(O.data,O.offset,g.names)}if(p){var N=vn(m,p);g.tables.meta=_t(N.data,N.offset),g.metas=g.tables.meta}return g}t.Font=sn,t.Glyph=ye,t.Path=x,t.BoundingBox=k,t._parse=ae,t.parse=yn,t.load=function(e,t){("undefined"==typeof window?fn:gn)(e,(function(e,i){if(e)return t(e);var n;try{n=yn(i)}catch(e){return t(e,null)}return t(null,n)}))},t.loadSync=function(e){return yn(Ut(i(245).readFileSync(e)))},Object.defineProperty(t,"__esModule",{value:!0})}(t)}).call(this,i(108).Buffer)},function(e,t,i){"use strict";var n=i(18),r=i(46).findIndex,o=i(156),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),o("findIndex")},function(e,t,i){"use strict";var n=i(18),r=i(12),o=i(15),a=i(348),s=i(30),l=i(79),u=i(66),c=i(165),d=a.ArrayBuffer,h=a.DataView,p=h.prototype,f=r(d.prototype.slice),g=r(p.getUint8),m=r(p.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o((function(){return!new d(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(f&&void 0===t)return f(s(this),e);for(var i=s(this).byteLength,n=l(e,i),r=l(void 0===t?i:t,i),o=new(c(this,d))(u(r-n)),a=new h(this),p=new h(o),v=0;n<r;)m(p,v++,g(a,n++));return o}})},function(e,t,i){var n=i(8).Array,r=Math.abs,o=Math.pow,a=Math.floor,s=Math.log,l=Math.LN2;e.exports={pack:function(e,t,i){var u,c,d,h=n(i),p=8*i-t-1,f=(1<<p)-1,g=f>>1,m=23===t?o(2,-24)-o(2,-77):0,v=e<0||0===e&&1/e<0?1:0,y=0;for((e=r(e))!=e||e===1/0?(c=e!=e?1:0,u=f):(u=a(s(e)/l),e*(d=o(2,-u))<1&&(u--,d*=2),(e+=u+g>=1?m/d:m*o(2,1-g))*d>=2&&(u++,d/=2),u+g>=f?(c=0,u=f):u+g>=1?(c=(e*d-1)*o(2,t),u+=g):(c=e*o(2,g-1)*o(2,t),u=0));t>=8;)h[y++]=255&c,c/=256,t-=8;for(u=u<<t|c,p+=t;p>0;)h[y++]=255&u,u/=256,p-=8;return h[--y]|=128*v,h},unpack:function(e,t){var i,n=e.length,r=8*n-t-1,a=(1<<r)-1,s=a>>1,l=r-7,u=n-1,c=e[u--],d=127&c;for(c>>=7;l>0;)d=256*d+e[u--],l-=8;for(i=d&(1<<-l)-1,d>>=-l,l+=t;l>0;)i=256*i+e[u--],l-=8;if(0===d)d=1-s;else{if(d===a)return i?NaN:c?-1/0:1/0;i+=o(2,t),d-=s}return(c?-1:1)*i*o(2,d-t)}}},function(e,t,i){i(640)("Uint8",(function(e){return function(t,i,n){return e(this,t,i,n)}}))},function(e,t,i){"use strict";var n=i(18),r=i(8),o=i(31),a=i(33),s=i(641),l=i(25),u=i(348),c=i(95),d=i(89),h=i(58),p=i(642),f=i(66),g=i(350),m=i(352),v=i(120),y=i(32),b=i(92),w=i(29),E=i(121),_=i(81),S=i(65),T=i(107),C=i(78).f,k=i(644),x=i(46).forEach,A=i(225),P=i(42),I=i(69),R=i(50),D=i(174),O=R.get,N=R.set,L=P.f,M=I.f,F=Math.round,U=r.RangeError,B=u.ArrayBuffer,V=B.prototype,z=u.DataView,H=l.NATIVE_ARRAY_BUFFER_VIEWS,j=l.TYPED_ARRAY_CONSTRUCTOR,q=l.TYPED_ARRAY_TAG,G=l.TypedArray,W=l.TypedArrayPrototype,$=l.aTypedArrayConstructor,Y=l.isTypedArray,K=function(e,t){$(e);for(var i=0,n=t.length,r=new e(n);n>i;)r[i]=t[i++];return r},J=function(e,t){L(e,t,{get:function(){return O(this)[t]}})},X=function(e){var t;return S(V,e)||"ArrayBuffer"==(t=b(e))||"SharedArrayBuffer"==t},Q=function(e,t){return Y(e)&&!E(t)&&t in e&&p(+t)&&t>=0},Z=function(e,t){return t=v(t),Q(e,t)?d(2,e[t]):M(e,t)},ee=function(e,t,i){return t=v(t),!(Q(e,t)&&w(i)&&y(i,"value"))||y(i,"get")||y(i,"set")||i.configurable||y(i,"writable")&&!i.writable||y(i,"enumerable")&&!i.enumerable?L(e,t,i):(e[t]=i.value,e)};a?(H||(I.f=Z,P.f=ee,J(W,"buffer"),J(W,"byteOffset"),J(W,"byteLength"),J(W,"length")),n({target:"Object",stat:!0,forced:!H},{getOwnPropertyDescriptor:Z,defineProperty:ee}),e.exports=function(e,t,i){var a=e.match(/\d+$/)[0]/8,l=e+(i?"Clamped":"")+"Array",u="get"+e,d="set"+e,p=r[l],v=p,y=v&&v.prototype,b={},E=function(e,t){L(e,t,{get:function(){return function(e,t){var i=O(e);return i.view[u](t*a+i.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,n){var r=O(e);i&&(n=(n=F(n))<0?0:n>255?255:255&n),r.view[d](t*a+r.byteOffset,n,!0)}(this,t,e)},enumerable:!0})};H?s&&(v=t((function(e,t,i,n){return c(e,y),D(w(t)?X(t)?void 0!==n?new p(t,m(i,a),n):void 0!==i?new p(t,m(i,a)):new p(t):Y(t)?K(v,t):o(k,v,t):new p(g(t)),e,v)})),T&&T(v,G),x(C(p),(function(e){e in v||h(v,e,p[e])})),v.prototype=y):(v=t((function(e,t,i,n){c(e,y);var r,s,l,u=0,d=0;if(w(t)){if(!X(t))return Y(t)?K(v,t):o(k,v,t);r=t,d=m(i,a);var h=t.byteLength;if(void 0===n){if(h%a)throw U("Wrong length");if((s=h-d)<0)throw U("Wrong length")}else if((s=f(n)*a)+d>h)throw U("Wrong length");l=s/a}else l=g(t),r=new B(s=l*a);for(N(e,{buffer:r,byteOffset:d,byteLength:s,length:l,view:new z(r)});u<l;)E(e,u++)})),T&&T(v,G),y=v.prototype=_(W)),y.constructor!==v&&h(y,"constructor",v),h(y,j,v),q&&h(y,q,l),b[l]=v,n({global:!0,forced:v!=p,sham:!H},b),"BYTES_PER_ELEMENT"in v||h(v,"BYTES_PER_ELEMENT",a),"BYTES_PER_ELEMENT"in y||h(y,"BYTES_PER_ELEMENT",a),A(l)}):e.exports=function(){}},function(e,t,i){var n=i(8),r=i(15),o=i(167),a=i(25).NATIVE_ARRAY_BUFFER_VIEWS,s=n.ArrayBuffer,l=n.Int8Array;e.exports=!a||!r((function(){l(1)}))||!r((function(){new l(-1)}))||!o((function(e){new l,new l(null),new l(1.5),new l(e)}),!0)||r((function(){return 1!==new l(new s(2),1,void 0).length}))},function(e,t,i){var n=i(29),r=Math.floor;e.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&r(e)===e}},function(e,t,i){var n=i(8),r=i(59),o=n.RangeError;e.exports=function(e){var t=r(e);if(t<0)throw o("The argument can't be less than 0");return t}},function(e,t,i){var n=i(82),r=i(31),o=i(213),a=i(43),s=i(45),l=i(166),u=i(131),c=i(227),d=i(25).aTypedArrayConstructor;e.exports=function(e){var t,i,h,p,f,g,m=o(this),v=a(e),y=arguments.length,b=y>1?arguments[1]:void 0,w=void 0!==b,E=u(v);if(E&&!c(E))for(g=(f=l(v,E)).next,v=[];!(p=r(g,f)).done;)v.push(p.value);for(w&&y>2&&(b=n(b,arguments[2])),i=s(v),h=new(d(m))(i),t=0;i>t;t++)h[t]=w?b(v[t],t):v[t];return h}},function(e,t,i){"use strict";var n=i(12),r=i(25),o=n(i(646)),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(e,t){return o(a(this),e,t,arguments.length>2?arguments[2]:void 0)}))},function(e,t,i){"use strict";var n=i(43),r=i(79),o=i(45),a=Math.min;e.exports=[].copyWithin||function(e,t){var i=n(this),s=o(i),l=r(e,s),u=r(t,s),c=arguments.length>2?arguments[2]:void 0,d=a((void 0===c?s:r(c,s))-u,s-l),h=1;for(u<l&&l<u+d&&(h=-1,u+=d-1,l+=d-1);d-- >0;)u in i?i[l]=i[u]:delete i[l],l+=h,u+=h;return i}},function(e,t,i){"use strict";var n=i(25),r=i(46).every,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(e){return r(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=i(31),o=i(351),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("fill",(function(e){var t=arguments.length;return r(o,a(this),e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=i(46).filter,o=i(650),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(e){var t=r(a(this),e,arguments.length>1?arguments[1]:void 0);return o(this,t)}))},function(e,t,i){var n=i(651),r=i(184);e.exports=function(e,t){return n(r(e),t)}},function(e,t,i){var n=i(45);e.exports=function(e,t){for(var i=0,r=n(t),o=new e(r);r>i;)o[i]=t[i++];return o}},function(e,t,i){"use strict";var n=i(25),r=i(46).find,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(e){return r(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=i(46).findIndex,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(e){return r(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=i(46).forEach,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(e){r(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=i(153).includes,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(e){return r(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=i(153).indexOf,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(e){return r(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(8),r=i(15),o=i(12),a=i(25),s=i(56),l=i(22)("iterator"),u=n.Uint8Array,c=o(s.values),d=o(s.keys),h=o(s.entries),p=a.aTypedArray,f=a.exportTypedArrayMethod,g=u&&u.prototype,m=!r((function(){g[l].call([1])})),v=!!g&&g.values&&g[l]===g.values&&"values"===g.values.name,y=function(){return c(p(this))};f("entries",(function(){return h(p(this))}),m),f("keys",(function(){return d(p(this))}),m),f("values",y,m||!v,{name:"values"}),f(l,y,m||!v,{name:"values"})},function(e,t,i){"use strict";var n=i(25),r=i(12),o=n.aTypedArray,a=n.exportTypedArrayMethod,s=r([].join);a("join",(function(e){return s(o(this),e)}))},function(e,t,i){"use strict";var n=i(25),r=i(80),o=i(660),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return r(o,a(this),t>1?[e,arguments[1]]:[e])}))},function(e,t,i){"use strict";var n=i(80),r=i(54),o=i(59),a=i(45),s=i(161),l=Math.min,u=[].lastIndexOf,c=!!u&&1/[1].lastIndexOf(1,-0)<0,d=s("lastIndexOf"),h=c||!d;e.exports=h?function(e){if(c)return n(u,this,arguments)||0;var t=r(this),i=a(t),s=i-1;for(arguments.length>1&&(s=l(s,o(arguments[1]))),s<0&&(s=i+s);s>=0;s--)if(s in t&&t[s]===e)return s||0;return-1}:u},function(e,t,i){"use strict";var n=i(25),r=i(46).map,o=i(184),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("map",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(o(e))(t)}))}))},function(e,t,i){"use strict";var n=i(25),r=i(241).left,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return r(o(this),e,t,t>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=i(241).right,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return r(o(this),e,t,t>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=n.aTypedArray,o=n.exportTypedArrayMethod,a=Math.floor;o("reverse",(function(){for(var e,t=r(this).length,i=a(t/2),n=0;n<i;)e=this[n],this[n++]=this[--t],this[t]=e;return this}))},function(e,t,i){"use strict";var n=i(8),r=i(31),o=i(25),a=i(45),s=i(352),l=i(43),u=i(15),c=n.RangeError,d=n.Int8Array,h=d&&d.prototype,p=h&&h.set,f=o.aTypedArray,g=o.exportTypedArrayMethod,m=!u((function(){var e=new Uint8ClampedArray(2);return r(p,e,{length:1,0:3},1),3!==e[1]})),v=m&&o.NATIVE_ARRAY_BUFFER_VIEWS&&u((function(){var e=new d(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));g("set",(function(e){f(this);var t=s(arguments.length>1?arguments[1]:void 0,1),i=l(e);if(m)return r(p,this,i,t);var n=this.length,o=a(i),u=0;if(o+t>n)throw c("Wrong length");for(;u<o;)this[t+u]=i[u++]}),!m||v)},function(e,t,i){"use strict";var n=i(25),r=i(184),o=i(15),a=i(104),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("slice",(function(e,t){for(var i=a(s(this),e,t),n=r(this),o=0,l=i.length,u=new n(l);l>o;)u[o]=i[o++];return u}),o((function(){new Int8Array(1).slice()})))},function(e,t,i){"use strict";var n=i(25),r=i(46).some,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(e){return r(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(8),r=i(12),o=i(15),a=i(76),s=i(339),l=i(25),u=i(669),c=i(670),d=i(102),h=i(671),p=n.Array,f=l.aTypedArray,g=l.exportTypedArrayMethod,m=n.Uint16Array,v=m&&r(m.prototype.sort),y=!(!v||o((function(){v(new m(2),null)}))&&o((function(){v(new m(2),{})}))),b=!!v&&!o((function(){if(d)return d<74;if(u)return u<67;if(c)return!0;if(h)return h<602;var e,t,i=new m(516),n=p(516);for(e=0;e<516;e++)t=e%4,i[e]=515-e,n[e]=e-2*t+3;for(v(i,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(i[e]!==n[e])return!0}));g("sort",(function(e){return void 0!==e&&a(e),b?v(this,e):s(f(this),function(e){return function(t,i){return void 0!==e?+e(t,i)||0:i!=i?-1:t!=t?1:0===t&&0===i?1/t>0&&1/i<0?1:-1:t>i}}(e))}),!b||y)},function(e,t,i){var n=i(90).match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},function(e,t,i){var n=i(90);e.exports=/MSIE|Trident/.test(n)},function(e,t,i){var n=i(90).match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},function(e,t,i){"use strict";var n=i(25),r=i(66),o=i(79),a=i(184),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("subarray",(function(e,t){var i=s(this),n=i.length,l=o(e,n);return new(a(i))(i.buffer,i.byteOffset+l*i.BYTES_PER_ELEMENT,r((void 0===t?n:o(t,n))-l))}))},function(e,t,i){"use strict";var n=i(8),r=i(80),o=i(25),a=i(15),s=i(104),l=n.Int8Array,u=o.aTypedArray,c=o.exportTypedArrayMethod,d=[].toLocaleString,h=!!l&&a((function(){d.call(new l(1))}));c("toLocaleString",(function(){return r(d,h?s(u(this)):u(this),s(arguments))}),a((function(){return[1,2].toLocaleString()!=new l([1,2]).toLocaleString()}))||!a((function(){l.prototype.toLocaleString.call([1,2])})))},function(e,t,i){"use strict";var n=i(25).exportTypedArrayMethod,r=i(15),o=i(8),a=i(12),s=o.Uint8Array,l=s&&s.prototype||{},u=[].toString,c=a([].join);r((function(){u.call({})}))&&(u=function(){return c(this)});var d=l.toString!=u;n("toString",u,d)},function(e,t,i){"use strict";var n=i(31),r=i(158),o=i(30),a=i(66),s=i(39),l=i(55),u=i(91),c=i(218),d=i(159);r("match",(function(e,t,i){return[function(t){var i=l(this),r=null==t?void 0:u(t,e);return r?n(r,t,i):new RegExp(t)[e](s(i))},function(e){var n=o(this),r=s(e),l=i(t,n,r);if(l.done)return l.value;if(!n.global)return d(n,r);var u=n.unicode;n.lastIndex=0;for(var h,p=[],f=0;null!==(h=d(n,r));){var g=s(h[0]);p[f]=g,""===g&&(n.lastIndex=c(r,a(n.lastIndex),u)),f++}return 0===f?null:p}]}))},function(e,t,i){var n,r;n=[i(2),i(68),i(11),i(113),i(20)],void 0===(r=function(e,t,i,n,r){return i=i.default,n=n.default,r=r.default,{parseDebugDocument:function(e,i,n){r.call({url:JSON.parse(t).authoringParseDebugDocument+"/"+e,method:"POST",cache:!1,dataType:"json",contentType:!1,processData:!1,success:i,error:n})},parseDocument:function(e,i,n,o){r.call({url:JSON.parse(t).authoringParseDocument+"?id="+i,data:e,method:"POST",cache:!1,dataType:"json",contentType:!1,processData:!1,success:n,error:o})},uploadPresentation:function(e,i,n,o){r.call({url:JSON.parse(t).authoringUploadPresentation+"/"+i,data:e,method:"POST",cache:!1,dataType:"json",contentType:!1,processData:!1,success:n,error:o})},createPresentation:function(e,i,n,o){var a=new FormData;a.append("data",JSON.stringify(i)),r.call({url:JSON.parse(t).authoringCreatePresentation+"/"+e,data:a,method:"POST",processData:!1,contentType:!1,cache:!1,success:n,error:o})},createPdf:function(e,i,n,o,a){data={url:i,debugFast:n},r.call({url:JSON.parse(t).authoringCreatePdfFromUrl+"/"+e,data:JSON.stringify(data),method:"POST",cache:!1,dataType:"json",success:o,error:a})},uploadVideos:function(e,i,n,o,a){r.call({method:"POST",url:JSON.parse(t).authoringUploadVideo+"/"+i,data:e,xhr:function(){var e=r.callSettings.xhr();return e.upload&&e.upload.addEventListener("progress",n,!1),e},processData:!1,contentType:!1,success:o,error:a})},getRecordedGroups:function(e,i,n){r.call({method:"GET",url:JSON.parse(t).getRecordedGroups+"/"+e,processData:!1,contentType:!1,success:i,error:n})},listVideoFiles:function(e,i,n){r.call({method:"POST",url:JSON.parse(t).listVideoFiles+"/"+e,processData:!1,cache:!0,contentType:!1,success:i,error:n})},previewVideo:function(e,i,n,o){var a=new FormData;a.append("data",JSON.stringify(i)),r.call({url:JSON.parse(t).previewVideo+"/"+e,data:a,method:"POST",processData:!1,contentType:!1,cache:!1,success:n,error:o})},renderVideo:function(e,i,n,o,a,s){var l=new FormData;l.append("data",JSON.stringify(o)),l.append("tags",n),l.append("name",i),r.call({url:JSON.parse(t).renderVideo+"/"+e,data:l,method:"POST",processData:!1,contentType:!1,cache:!1,success:a,error:s})},getAssetDetails:function(e,i,n){r.call({url:JSON.parse(t).assetDetails+"/"+e,method:"GET",processData:!1,contentType:!1,success:i,error:n})},getTags:function(e,i){r.call({url:JSON.parse(t).getAllCategory,method:"GET",processData:!1,contentType:!1,success:e,error:i})},getData:function(e,i,n,o){r.call({url:JSON.parse(t).authoringGetData+"/"+e+"/"+i,method:"GET",cache:!1,success:n,error:o})},saveData:function(e,n,o,a,s){var l=new FormData,u=i.serializeProjectJSON(JSON.parse(JSON.stringify(n)));l.append("data",JSON.stringify(u)),r.call({url:JSON.parse(t).saveData+"/"+e+"/"+o,data:l,method:"POST",processData:!1,contentType:!1,cache:!1,success:a,error:s})},getVideoParams:function(e,i,n){r.call({url:JSON.parse(t).getVideoParams,data:JSON.stringify(e),method:"POST",cache:!1,success:i,error:n})},getAuthoredContend:function(e,i,n){r.call({url:JSON.parse(t).getAuthoredContent,method:"GET",cache:!1,success:i,error:n})},editVideos:function(e,i,n,o){r.call({url:JSON.parse(t).editVideoParams+"/"+e+"/"+i,method:"GET",cache:!1,success:n,error:o})},savePdfThumb:function(e,i,n,o){var a={imgBase64:i};r.call({url:JSON.parse(t).savePdfThumb+"/"+e,data:JSON.stringify(a),method:"POST",cache:!1,success:n,error:o})},getSignedUrl:function(e,i,n){r.call({url:JSON.parse(t).getSignedUrl,data:JSON.stringify(e),method:"POST",cache:!1,dataType:"json",contentType:!1,processData:!1,success:i,error:n})},statusOf:function(e,i,o,a,s,l,u){if(u)chrome.runtime.sendMessage({vbg_extn_status_poller:!0,params:{token:e,statusId:i,assetId:o,operationType:a}},(function(e){e.status?s(e.data):l(Error(e.data))}));else{var c=JSON.parse(t).statusOf;e&&(c=JSON.parse(t).statusOfGuest),c=null!=o?c+"?asset_id="+o:c+"?id="+i,e&&(c=c+"&token="+e),null!=a&&(c=c+"&operation_type="+a);r.call({url:c,method:"GET",cache:!1,dataType:"json",contentType:!1,processData:!1,success:s,error:l,headers:n.appendBasicAuthHeader()})}},deleteAssets:function(e,i,n){r.call({url:JSON.parse(t).authoring+"/"+e,method:"delete",cache:!1,success:i,error:n})}}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-local import-body-container hide" id="importFromLocal"><div class="import-local-banner" id="importLocalBanner"><img src="/svg/upload.svg" alt="upload" class="upload-icon"/><div class="local-text">').f(t.get(["dragdropYourFiles"],!1),t,"h").w(' <span class="link" id="browseFiles">').f(t.get(["browse"],!1),t,"h").w("</span>").h("select",t,{block:i},{key:t.get(["type"],!1)},"h").w('</div></div><div class="import-local-content image-gallery main-gallery custom-scroll hide" id="importLocalContentContainer"><div id="importLocalContent" class="import-images-container"></div></div></div>')}function i(e,t){return e.h("eq",t,{block:n},{value:"image"},"h").h("eq",t,{block:o},{value:"audio"},"h").h("eq",t,{block:s},{value:"video"},"h").h("eq",t,{block:u},{value:"doc"},"h").h("eq",t,{block:d},{value:"custom"},"h")}function n(e,t){return e.w('<input type="file" id="importFileUpload" name="files" class="hide" accept="').f(t.get(["acceptFormats"],!1),t,"h").w('" ').x(t.get(["isMultiple"],!1),t,{block:r},{}).w("/>")}function r(e,t){return e.w(" multiple ")}function o(e,t){return e.w('<input type="file" id="importFileUpload" name="files" class="hide" accept="audio/*" ').x(t.get(["isMultiple"],!1),t,{block:a},{}).w("/>")}function a(e,t){return e.w(" multiple ")}function s(e,t){return e.w('<input type="file" id="importFileUpload" name="files" class="hide" accept="').f(t.get(["acceptFormats"],!1),t,"h").w('" ').x(t.get(["isMultiple"],!1),t,{block:l},{}).w("/>")}function l(e,t){return e.w(" multiple ")}function u(e,t){return e.w('<input type="file" id="importFileUpload" name="files" class="hide" accept="').f(t.get(["acceptFormats"],!1),t,"h").w('" ').x(t.get(["isMultiple"],!1),t,{block:c},{}).w("/>")}function c(e,t){return e.w(" multiple ")}function d(e,t){return e.w('<input type="file" id="importFileUpload" name="files" class="hide" accept="').f(t.get(["acceptFormats"],!1),t,"h").w('" />')}e.register("templates/partials/import_from_local",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_from_local",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="recently-used import-body-container hide" id="importRecentlyUsed"><div class="recently-used-container import-web-content image-gallery main-gallery custom-scroll" id="importRecentlyUsedContainer"><div id="recentlyUsedContent" class="import-images-container"></div><div class="import-recent-spin-loading hide"><div class="spinner-loading"></div><span class="loading-msg"> ').f(t.get(["loading"],!1),t,"h").w(' </span></div><div id="recentlyUsedEmptyState" class="web-search-empty text-center hide"><img src="/svg/empty-result.svg" alt="No results" class="empty-search-icon"/><div class="result-info"> ').f(t.get(["emptyRecent"],!1),t,"h").w(' </div></div><div id="loadMoreContentrecent" class="text-right load-more hide"> ').f(t.get(["loadMore"],!1),t,"h").w(" </div></div></div>")}e.register("templates/partials/import_recently_used",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_recently_used",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-web import-body-container hide" id="importFromWeb"><div class="import-web-banner" id="importWebBanner"><p> ').f(t.get(["importWebText"],!1),t,"h").w(' </p><div class="search-box"><input type="text" placeholder="').f(t.get(["searchFreeStockImage"],!1),t,"h").w('" id="searchFromWebTextBox" class="search-from-web-box"/><img src="/svg/search.svg" alt="search" class="search-icon"/><div class="spinner-loading import-spin-loading hide"></div></div><div class="powered-by"><span class="powered-by-label"> ').f(t.get(["poweredBy"],!1),t,"h").w(' </span><img src="/svg/flickr-logo.svg" alt="Flickr" /><img src="/img/pexels-logo.png" alt="Pexels" /></div></div><div class="import-web-content image-gallery main-gallery custom-scroll hide" id="importWebContentContainer"><div class="search-box-container"><div class="search-box"><input type="text" placeholder="').f(t.get(["searchImages"],!1),t,"h").w('" id="searchFromWebTextBox" class="search-from-web-box"/><img src="/svg/search.svg" alt="search" class="search-icon"/><div class="spinner-loading import-spin-loading hide"></div></div></div><div id="webSearchEmptyState" class="web-search-empty text-center hide"><img src="/svg/empty-result.svg" alt="No results" class="empty-search-icon"/><div class="result-info"> ').f(t.get(["emptySearchTerm"],!1),t,"h").w(' </div></div><div id="importWebContent" class="import-images-container"></div><div id="loadMoreContent" class="text-right load-more hide"> ').f(t.get(["loadMore"],!1),t,"h").w(" </div></div></div>")}e.register("templates/partials/import_from_web",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_from_web",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-shopify import-body-container hide" id="importFromShopify"><div class="import-web-banner import-web-banner-shopify hide" id="importShopifyBanner"><img src="/img/shopify.png" alt="GDrive" class="drive-icon" /><input type="text" id="shopUrl" placeholder=').f(t.get(["placeholder"],!1),t,"h").w('><p class="shopify-info-title">').f(t.get(["shopifyDomainInfoTitle"],!1),t,"h").w('</p><ul><li class="shopify-info">').f(t.get(["shopifyDomainInfoOne"],!1),t,"h").w('</li><li class="shopify-info">').f(t.get(["shopifyDomainInfoTwo"],!1),t,"h").w('</li><li class="shopify-info">').f(t.get(["shopifyDomainInfoThree"],!1),t,"h").w('</li></ul><p class="drive-text"> ').f(t.get(["importShopifyText"],!1),t,"h").w(' </p><div><button class="button secondary" id="shopifyGrantAccessCancel"> ').f(t.get(["cancel"],!1),t,"h").w(' </button><button class="button wiz-primary-btn" id="shopifyAccessBtn"> ').f(t.get(["grantAccess"],!1),t,"h").w(' </button></div></div><div class="import-shopify-container import-shopify-content image-gallery main-gallery custom-scroll" id="importshopifyContainer"><div class="filters text-left hide shopify-product-list" id="shopifyProductsFilter"><div class="shopify-select-container"><div class="shopify-select-wrap" id="shopifyStoreWrap"><label class="shopify-product-title"> ').f(t.get(["store"],!1),t,"h").w(' </label><select id="shopifyStores"> </select></div><div class="shopify-select-wrap" id="shopifyProductWrap"><label class="shopify-product-title"> ').f(t.get(["products"],!1),t,"h").w(' </label><select id="shopifyProducts"> </select></div></div><div class="shopify-select-text">').f(t.get(["selectRequiredImages"],!1),t,"h").w('</div></div><div id="importshopifyContent" class="import-images-container"></div><div class="import-shopify-spin-loading hide"><div class="spinner-loading"></div><span class="loading-msg"> ').f(t.get(["loading"],!1),t,"h").w(' </span></div><div id="importshopifyEmptyState" class="web-search-empty text-center hide"><img src="/svg/empty-result.svg" alt="No results" class="empty-search-icon"/><div class="result-info"> ').f(t.get(["emptyResults"],!1),t,"h").w(' </div></div><div id="loadMoreContentDrive" class="text-right load-more hide"> ').f(t.get(["loadMore"],!1),t,"h").w(" </div></div></div>")}e.register("templates/partials/import_from_shopify",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_from_shopify",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-library import-body-container hide" id="importFromLibrary"><div class="import-library-content image-gallery main-gallery custom-scroll" id="importLibraryContentContainer"><div class="filters text-left"><label class="genre-title"> Genre </label><select id="mediaGenre"><option value="chill"> Chill </option><option value="classical"> Classical </option><option value="comedy"> Comedy </option><option value="country"> Country </option><option value="electronic"> Electronic </option><option value="fantasy"> Fantasy </option><option value="horror"> Horror </option><option value="jazz" selected> Jazz </option><option value="misc"> Miscellaneous </option><option value="percussion"> Percussion </option><option value="rock"> Rock </option><option value="romantic"> Romantic </option><option value="upbeat"> Upbeat </option><option value="world"> World </option></select><div class="spinner-loading import-spin-loading hide"></div></div><div id="importLibraryContent" class="import-images-container"></div></div></div>')}e.register("templates/partials/import_from_library",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_from_library",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-selection-container clearfix" id="selectionDrawer" style="display: none;"><div class="drawer-handle hide" id="closeDrawHandle"><img src="/svg/arrow-inactive.svg" alt="Left" class="arrow-marker" /></div><div class="selected-title text-left">').f(t.get(["selectedTitle"],!1),t,"h").w('<span class="counter" id="selectedFilesCounter"> 00 </span></div><div class="row image-strip"><div class="pull-left marker-container"><span class="arrow-marker scroll-arrow scroll-left" ></span></div><div class="pull-left image-gallery custom-scroll-h" id="selectedImageGallery"></div><div class="pull-right marker-container"><span class="arrow-marker scroll-arrow scroll-right" ></span></div></div></div>')}e.register("templates/partials/import_selected_drawer",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_selected_drawer",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-drive import-body-container hide" id="importFromDrive"><div class="import-web-banner hide" id="importDriveBanner"><img src="/img/drive.png" alt="GDrive" class="drive-icon" /><p class="drive-text"> ').f(t.get(["importDriveText"],!1),t,"h").w(' </p><button class="button wiz-primary-btn" id="driveAccessBtn"> ').f(t.get(["grantAccess"],!1),t,"h").w(' </button></div><div class="import-drive-container import-web-content image-gallery main-gallery custom-scroll" id="importDriveContainer"><div class="filters text-left hide" id="accountsFilter"><label> ').f(t.get(["account"],!1),t,"h").w(' </label><select id="driveAccounts"> </select></div><div id="importDriveContent" class="import-images-container"></div><div class="import-drive-spin-loading hide"><div class="spinner-loading"></div><span class="loading-msg"> ').f(t.get(["loading"],!1),t,"h").w(' </span></div><div id="importDriveEmptyState" class="web-search-empty text-center hide"><img src="/svg/empty-result.svg" alt="No results" class="empty-search-icon"/><div class="result-info"> ').f(t.get(["emptyResults"],!1),t,"h").w(' </div></div><div id="loadMoreContentDrive" class="text-right load-more hide"> ').f(t.get(["loadMore"],!1),t,"h").w(" </div></div></div>")}e.register("templates/partials/import_from_drive",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_from_drive",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-drive import-body-container import-custom-link custom-scroll hide" id="importFromLink"><div class="large-12 columns text-left outer-container"><span class="hv-link-note-first">').f(t.get(["addCustomLinkDesc"],!1),t,"h").w('</span> </br><span class="hv-link-note-label">').f(t.get(["addCustomLinkLabel"],!1),t,"h").w('</span><span class="hv-link-note-second">').f(t.get(["addCustomLinkNote"],!1),t,"h").w('</span></div><div class="outer-container link-label-cont"><div class="label-cont"><span class="link-label">').f(t.get(["enterLinkLabel"],!1),t,"h").w('</span></div><div class="hv-url-text-area"><input type="text" id="importCustomLinkTxt" placeholder="').f(t.get(["customLinkPlaceholder"],!1),t,"h").w('"/><div class="hv-http-text">https://</div><div class="error-msg-container link-error-msg"><span id="linkErrorId" class="error-msg disp-none">').f(t.get(["linkErrorMsg"],!1),t,"h").w('</span></div></div><div class="hv-btn-wrap"><button class="hv-check-link-btn" id="checkLinkBtn">').f(t.get(["checkLinkBtn"],!1),t,"h").w('</button></div></div><div id="linkNameField" class=" outer-container link-label-cont disp-none"><div class="label-cont"><span class="link-label">').f(t.get(["enterTitleLabel"],!1),t,"h").w('</span></div><div class="hv-url-text-area"><input type="text" id="CustomTitleTxt" placeholder="').f(t.get(["customTitlePlaceholder"],!1),t,"h").w('"/></div><div class="error-msg-container"><span id="titleErrorId" class="error-msg disp-none">').f(t.get(["titleErrorMsg"],!1),t,"h").w('</span></div></div><div id="linkThumbnailField" class="text-left outer-container link-label-cont disp-none"><div class="img-cont"><span class="link-label">').f(t.get(["enterThumbnailLabel"],!1),t,"h").w('</span></div><div class="hv-thumpnail-wrap"><img id="linkLogoImg" width="100" src="/img/link-thumbnail-default.png" class="link-thumbnail-edit" style="height: 115px; width: 200px;"><div id="linkDisplayOptions" class="disp-none outer-container btn-container link-options hv-btn-wrap"><button class="hv-reset-btn" id="resetLinkBtn">').f(t.get(["resetLinkBtn"],!1),t,"h").w('</button><button class="hv-check-link-btn" id="addLinkBtn">').f(t.get(["addLinkBtn"],!1),t,"h").w('</button></div></div><div class="thumbnail-options"><div class="error-msg-container change-btn"><input id="linkLogoInput" class="disp-none" name="document[quizlogo]" type="file" accept=".png, .jpg, .jpeg, .gif"><a id="changeCustomThumbnailId" class="link-img-edit-btn"><img src="/svg/Icon-material-edit.svg" class="link-img-edit-img" width="10">Edit thumbnail</a></div><span class="link-label thumbnail-label">').f(t.get(["recommendedThumbnailSize"],!1),t,"h").w("</span></div></div></div>")}e.register("templates/partials/import_from_custom_link",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_from_custom_link",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-drive import-body-container import-custom-link hide hvimport-link-body clear-float" id="importFromWebLink"><div class="large-12 columns text-left outer-container link-label-cont clear-float"><div class="medium-12 columns label-cont"><span class="link-label">').f(t.get(["enterLinkLabel"],!1),t,"h").w('</span></div><div class="medium-6 columns"><input type="text" id="importWebLinkTxt" placeholder="').f(t.get(["customWebLinkPlaceholder"],!1),t,"h").w('"/><input type="text" id="websiteName" class="disp-none" /></div><div class="medium-12 columns error-msg-container link-error-msg" id="weblinkErrorMsgContainer"><span id="WeblinkErrorId" class="error-msg disp-none">').f(t.get(["websiteLinkErrorMsg"],!1),t,"h").w('</span></div><button class="button wiz-primary-btn check-link-btn" id="checkWebsiteLinkBtn">').f(t.get(["checkWebsiteLinkBtn"],!1),t,"h").w('</button></div><div class="large-12 columns text-left outer-container link-label-cont hvimport-link-container"><div class="label-cont hvimport-link-title" id="websitePreviewDiv"><span class="link-label">').f(t.get(["websitePreviewTitle"],!1),t,"h").w('</span></div><div class="import-website-spin-loading" id="importWebsiteSpinner"><div class="color-loading"><span class="loading-bar"></span><span class="loading-bar"></span><span class="loading-bar"></span><span class="loading-bar"></span><span class="loading-bar"></span></div><p>Your website screenshot is being processed...</p></div><div class="label-cont disp-none" id="websiteErrorMsgDiv"><h5 class="link-label">').f(t.get(["websitePreviewTitle"],!1),t,"h").w('</h5><p class="link-label">').f(t.get(["websiteNoteMsg"],!1),t,"h").w('</p><button class="button wiz-primary-btn check-link-btn" id="checkWebsiteRetryBtn">').f(t.get(["checkWebsiteRetryBtn"],!1),t,"h").w('</button></div><div class="label-cont hvimport-link-image"><img id="WebsitePreviewImg" style="width: 400px;height:400px"></img></div></div></div>')}e.register("templates/partials/import_from_website_link",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_from_website_link",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){(function(n){var r,o,a;i(2);o=[i(2)],void 0===(a="function"==typeof(r=function(t){var i=function(){if(t&&t.fn&&t.fn.select2&&t.fn.select2.amd)var i=t.fn.select2.amd;return function(){
|
|
288
|
+
*/var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,d=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,g=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,E=n?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case d:case h:case a:case l:case s:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case v:case m:case u:return e;default:return t}}case o:return t}}}function S(e){return _(e)===h}t.AsyncMode=d,t.ConcurrentMode=h,t.ContextConsumer=c,t.ContextProvider=u,t.Element=r,t.ForwardRef=p,t.Fragment=a,t.Lazy=v,t.Memo=m,t.Portal=o,t.Profiler=l,t.StrictMode=s,t.Suspense=f,t.isAsyncMode=function(e){return S(e)||_(e)===d},t.isConcurrentMode=S,t.isContextConsumer=function(e){return _(e)===c},t.isContextProvider=function(e){return _(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return _(e)===p},t.isFragment=function(e){return _(e)===a},t.isLazy=function(e){return _(e)===v},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===o},t.isProfiler=function(e){return _(e)===l},t.isStrictMode=function(e){return _(e)===s},t.isSuspense=function(e){return _(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===h||e===l||e===s||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===u||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===w||e.$$typeof===E||e.$$typeof===y)},t.typeOf=_},function(e,t,i){var n=i(616);e.exports=function(e){return null==e?"":n(e)}},function(e,t,i){var n=i(178),r=i(617),o=i(181),a=i(618),s=n?n.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return r(t,e)+"";if(a(t))return l?l.call(t):"";var i=t+"";return"0"==i&&1/t==-1/0?"-0":i}},function(e,t){e.exports=function(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r}},function(e,t,i){var n=i(141),r=i(142);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==n(e)}},function(e,t,i){var n=i(341);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(341);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){var n=i(12),r=i(55),o=i(39),a=/"/g,s=n("".replace);e.exports=function(e,t,i,n){var l=o(r(e)),u="<"+t;return""!==i&&(u+=" "+i+'="'+s(o(n),a,""")+'"'),u+">"+l+"</"+t+">"}},function(e,t,i){var n=i(15);e.exports=function(e){return n((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,i){var n,r;n=[i(2),i(10),i(35),i(7),i(11),i(6),i(48),i(626),i(627),i(140),i(342),i(343),i(344),i(346),i(20),i(243),i(138),i(139),i(73),i(115)],void 0===(r=function(e,t,i,n,r,o,a,s,l,u,c,d,h,p,f){return r=r.default,f=f.default,i.View.extend({template:s,initialize:function(t){(t.fromSDK||!1)&&(this.template=l),this.origin=window._HVDomain||"https://www.hippovideo.io",this.id=t.id,this.src=t.src,this.type=null!=t.type?t.type:"url",this.title=t.title,this.initial=t.initial||!1,this.isPrivacy=t.isPrivacy||!1,this.statId=t.statId,this.audioSrc=t.audioSrc,this.isDelivery=null!=t.isDelivery&&t.isDelivery,this.analytics=null!=t.analytics&&t.analytics,this.userId=t.userId,this.primaryVideoLayout=t.primaryVideoLayout,this.secondaryVideoLayout=t.secondaryVideoLayout,this.showLogo=null==t.showLogo||t.showLogo,this.trimStart=t.trimStart?t.trimStart:0,this.trimEnd=t.trimEnd?t.trimEnd:0,this.duration=t.duration?t.duration:0,this.assetId=t.assetId,this.customlogo=t.customlogo,this.thumbnail=t.thumbnail,this.quickPreview=t.quickPreview,this.previewVideo=t.previewVideo,this.isMirrorWebCam=null==t.isMirrorWebCam||t.isMirrorWebCam,this.playAudio=null==t.playAudio||t.playAudio,this.playVideo=null==t.playVideo||t.playVideo,this.qualityControl=null!=t.qualityControl&&t.qualityControl,this.fullscreen=null!=t.fullscreen&&t.fullscreen,this.audioControl=null!=t.audioControl?t.audioControl:this.playAudio,this.fullscreenControl=null==t.fullscreenControl||t.fullscreenControl,this.simpleEditMode=null!=t.simpleEditMode&&t.simpleEditMode,this.showSpeedSettings=null!=t.showSpeedSettings&&t.showSpeedSettings,this.authorState=t.authorState,this.isError=t.isError,this.previousVolume=100,this.onPlayHandler=t.onPlayHandler?[t.onPlayHandler]:[],this.onPauseHandler=t.onPauseHandler?[t.onPauseHandler]:[],this.onSeekedHandler=t.onSeekedHandler,this.onSeekedHandlers=t.onSeekedHandlers?[t.onSeekedHandlers]:[],this.onSeekindHandler=t.onSeekindHandler,this.onLoadHandler=t.onLoadHandler,this.onProgressHandler=t.onProgressHandler,this.onDataLoadHandler=t.onDataLoadHandler,this.updateHandler=t.updateHandler,this.canplayHandler=t.canplayHandler,this.onComputedDurationHander=t.onComputedDurationHander,this.onEndHandler=t.onEndHandler?[t.onEndHandler]:[],this.privacySetting=null!=t.privacy&&t.privacy,this.isAudioOnly=null!=t.isAudioOnly&&t.isAudioOnly,this.isLessonly="lessonly"==t.integType,this.token=null!=t.token&&t.token,this.downloadVideo=t.downloadVideo,this.allowDownload=null!=t.allowDownload&&t.allowDownload,this.showComments=t.showComments,this.showReactions=t.showReactions,this.commentsCallbackHandler=t.commentsCallbackHandler||function(){},this.reactionsCallbackHandler=t.reactionsCallbackHandler||function(){},this.playerLogo=t.playerLogo,this.canPlayerLogoView=t.canPlayerLogoView,this.addLinkToPlayerLogo=t.addLinkToPlayerLogo,this.playerLogoLink=t.playerLogoLink,this.isImageMode=t.isImageMode||!1,this.loop=t.loop||!1,this.showSetFrame=t.showSetFrame&&!t.isImageMode||!1,this.playerTheme=null!=t.playerTheme&&t.playerTheme,this.subtitlesEnabled=t.subtitlesEnabled||!1,this.subtitles=t.subtitleUrl,this.showHoverActions=void 0===t.showHoverActions||t.showHoverActions,this.customColors=t.customColors,this.allowKeyboardShortcuts=t.allowKeyboardShortcuts||!1,this.saveThisFrameAsThumbnail=function(){},this.isMobilePlayer=r.isMobileBrowser(),this.isIphone=null!=navigator.userAgent.match(/iPhone|iPad|iPod/i),this.autoPlayVideo=!!t.autoPlayVideo&&!this.isImageMode;var i=n.getBrowserName().toLowerCase();this.isMutedAutoPlay=this.autoPlayVideo&&("chrome"===i||"safari"===i||"firefox"===i),this.canShowPlayerLoading="ie"!==i,this.showPersonalisedVideoLoading=t.showPersonalisedVideoLoading||!1,this.personalisedVideoDetailsSet=!1,this.isLandingPageVideo=t.isLandingPageVideo||!1,this.domainName=t.domain||!1,this.subtitlesFromServer=!1,this.isContainsAudio=null==t.isContainsAudio||t.isContainsAudio,this.addSourceAudioType="safari"===i&&this.isAudioOnly,t.forceAutoPlay&&(this.isMutedAutoPlay=!1),i=["Firefox","IE"],e.inArray(n.getBrowserName(),i)>=0&&(this.subtitlesFromServer=!0),this.customPlayIcon=t.customPlayIcon,this.playerState="initial",this.durationComputed=!1,this.allowPlay=!0,this.isCTAWaitingMode=!1,this._primaryVideoPlaying=!1,this._secondaryVideoPlaying=!1,this.progressSlided=this.progressSlided.bind(this),this.volumeChanged=this.volumeChanged.bind(this),this._handleTimeupdate=this._handleTimeupdate.bind(this),this._handlePlay=this._handlePlay.bind(this),this._handlePause=this._handlePause.bind(this),this._handleProgress=this._handleProgress.bind(this),this._handlePlayerClick=this._handlePlayerClick.bind(this),this._handlePlayPauseBtnClick=this._handlePlayPauseBtnClick.bind(this),this._handleForwardBtnClick=this._handleForwardBtnClick.bind(this),this._handleRewindBtnClick=this._handleRewindBtnClick.bind(this),this._handleAudioBtnClick=this._handleAudioBtnClick.bind(this),this._handleFullscreenBtnClick=this._handleFullscreenBtnClick.bind(this),this._handleWaiting=this._handleWaiting.bind(this),this._handleResume=this._handleResume.bind(this),this._handleCanplay=this._handleCanplay.bind(this),this._handleHover=this._handleHover.bind(this),this._handleEnded=this._handleEnded.bind(this),this._handleSeeked=this._handleSeeked.bind(this),this._handleSeeking=this._handleSeeking.bind(this),this._handleMetadataLoad=this._handleMetadataLoad.bind(this),this._handleDataLoad=this._handleDataLoad.bind(this),this._handleProgressBtnHover=this._handleProgressBtnHover.bind(this),this._handleProgressBtnLeave=this._handleProgressBtnLeave.bind(this),this._handleFullscreenChange=this._handleFullscreenChange.bind(this),this.resetPlayer=this.resetPlayer.bind(this),this.downloadVideoClick=this.downloadVideoClick.bind(this),this._handleCanvasMouseAction=this._handleCanvasMouseAction.bind(this),this.drawImageForPreview=this.drawImageForPreview.bind(this),this.seekAndChooseThumb=this.seekAndChooseThumb.bind(this),this.seekAndUpdateThumb=this.seekAndUpdateThumb.bind(this),this.setStatId=this.setStatId.bind(this),this.getStatId=this.getStatId.bind(this),this.toggleSubtitles=this.toggleSubtitles.bind(this),this._handleMutedAutoplayAudioClick=this._handleMutedAutoplayAudioClick.bind(this),this.segmented=t.segmented,this.auth_params=t.auth_params,this.cueChanged=this.cueChanged.bind(this)},render:function(){if(this.$el.html(this.template(t.extend(c,{id:this.id,origin:this.origin,type:this.type,title:this.title,isAudioOnly:this.isAudioOnly,addSourceAudioType:this.addSourceAudioType,isLessonly:this.isLessonly,initial:this.initial,isPrivacy:this.isPrivacy,audioControl:this.audioControl,qualityControl:this.qualityControl,fullscreenControl:this.fullscreenControl,showLogo:this.showLogo,customlogo:this.customlogo,thumbnail:this.thumbnail,quickPreview:this.quickPreview,previewVideo:this.previewVideo,privacy:this.privacySetting,downloadVideo:this.downloadVideo,allowDownload:this.allowDownload,showComments:this.showComments,showSetFrame:this.showSetFrame,showReactions:this.showReactions,isImageMode:this.isImageMode,playerLogo:this.playerLogo,isMutedAutoPlay:this.isMutedAutoPlay,canPlayerLogoView:this.canPlayerLogoView,addLinkToPlayerLogo:this.addLinkToPlayerLogo,playerLogoLink:this.playerLogoLink,playerTheme:this.playerTheme,subtitlesEnabled:this.subtitlesEnabled,subtitles:this.subtitles,showHoverActions:this.showHoverActions,showSpeedSettings:this.showSpeedSettings,isLandingPageVideo:this.isLandingPageVideo,token:this.token,domain:window.location.protocol+"//"+window.location.hostname,subtitlesFromServer:this.subtitlesFromServer,isContainsAudio:this.isContainsAudio}))),this.renderState=!0,this.setElement(this.$el.find("#"+this.id)),this.initial)return this.$el.height(9*this.$el.width()/16),void this.applyCustomColors();this.initializePlayer(),this._delegateViewEvents(),this.setMediaSource(),this.initializePlayerJS(),-1!=["m3u8","mpd"].indexOf(this.type)&&this.initializeAdapter(),this.initializeCSS(),this.applyCustomColors(),this.applyCustomPlayIcon(),n.toggleWebcamForMirrorVideo(this.isMirrorWebCam,null!=this.audioSrc&&""!=this.audioSrc?this.$el.find(".secondary-video"):this.$el.find("#primary-video"))},update:function(t){var i=this;t.showPersonalisedVideoLoading&&this.$el.find("#personalisedVideoLoading").show(),Object.keys(t).forEach((function(e){null!=t[e]&&(i[e]=t[e])})),this.setMediaSource(),-1!=["m3u8","mpd"].indexOf(this.type)&&this.initializeAdapter(),e("#videoQualityBtn")[this.qualityControl?"show":"hide"]()},setMediaSource:function(){this.$el.find("#gifImage").attr("src",this.src),this.$el.find("#primary-video source").attr("src",this.src),this.$el.find(".hidden-video source").attr("src",this.src),this.$el.find(".secondary-video source").attr("src",this.audioSrc),this.$el.find("#primary-video").length>0&&this.src&&-1==this.src.indexOf("fetch_video_stream")&&this.$el.find("#primary-video")[0].load(),this.$el.find(".secondary-video").length>0&&this.$el.find(".secondary-video")[0].load()},initializePlayer:function(){var t=this;this.mediaPlayer=this.$el.find(".primary-video")[0],this.customAudioPlayer=this.$el.find(".secondary-video")[0],this.mediaPlayer.controls=!1,isFinite(this.duration)&&this.duration>0&&!this.mediaPlayer.duration&&(this.mediaPlayer.duration=this.duration),e(this.$el.find(".player-progress")).slider({orientation:"horizontal",range:"min",max:100,value:0,slide:this.progressSlided}),e(this.$el.find(".player-audio-slider")).slider({range:"min",orientation:"vertical",min:0,max:100,value:100,stop:this.volumeChanged}),this.quickPreview&&!this.isAudioOnly&&(this.quickPreviewImg=document.createElement("img"),this.quickPreviewImg.setAttribute("src",this.quickPreview),this.quickPreviewCanvas=this.$el.find(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d")),this.showSetFrame?e(".thumbnail-wrap").show():e(".thumbnail-wrap").hide(),this.setSimpleEditMode(this.simpleEditMode),this.allowKeyboardShortcuts&&e(window).on("keydown",(function(e){if("TEXTAREA"!==e.target.nodeName&&"INPUT"!==e.target.nodeName&&"button"!==e.target.type){var i=e.key,n=e.keyCode;" "===i||"Spacebar"===i||32===n?t._handlePlayPauseBtnClick():"ArrowRight"===i||"Right"===i||39===n?t._handleForwardBtnClick():"ArrowLeft"===i||"Left"===i||37===n?t._handleRewindBtnClick():"f"!==i&&70!==n||t._handleFullscreenBtnClick()}})),this.$el.find(".video-speed-btn .player-speed-label").on("click",(function(){t.$el.find(".video-speed-btn .quality-container").slideToggle("fast"),t.$el.find("#videoQualityBtn .quality-container").slideUp("fast")})),this.$el.find(".video-speed-btn .quality-list li").on("click",(function(i){var n=e(i.currentTarget).attr("data-id");t.$el.find(".video-speed-btn .player-speed-label").click(),t.$el.find("#primary-video")[0].playbackRate=parseFloat(n),t.$el.find(".quality-list li").removeClass("active"),e(this).addClass("active"),t.$el.find(".video-speed-btn .player-speed-label").html(e(i.currentTarget).html())})),this.$el.find("#subtitlesTrack").css("bottom","55px"),this.initializePlayerTheme(".video-speed-btn .quality-list li")},initializePlayerTheme:function(t){try{if(this.playerTheme&&[4,7].includes(this.playerTheme.length)){var i=n.convertHexToRGB(this.playerTheme),r="rgba("+i.r+", "+i.g+", "+i.b+", 0.9)";this.$el.find(t).hover((function(){e(this).css({background:r})}),(function(){e(this).css({background:""})}))}}catch(e){}},sendToFront:function(){},initializePlayerJS:function(){var e=this;this.playerJSReceiver=new d.Receiver,this.playerJSReceiver.on("play",(function(){e.play()})),this.playerJSReceiver.on("pause",(function(){e.pause()})),this.playerJSReceiver.on("getPaused",(function(t){t(!e.playing)})),this.playerJSReceiver.on("mute",(function(){e.mute()})),this.playerJSReceiver.on("unmute",(function(){e.unmute()})),this.playerJSReceiver.on("getMuted",(function(t){t(0==e.getVolume())})),this.playerJSReceiver.on("setVolume",(function(t){e.setVolume(t)})),this.playerJSReceiver.on("getVolume",(function(t){t(e.getVolume())})),this.playerJSReceiver.on("getDuration",(function(t){t(e.mediaPlayer.duration)})),this.playerJSReceiver.on("setCurrentTime",(function(t){e.mediaPlayer.currentTime=t})),this.playerJSReceiver.on("getCurrentTime",(function(t){t(e.mediaPlayer.currentTime)})),this.playerJSReceiver.on("setLoop",(function(t){e.setLoop(t)})),this.playerJSReceiver.on("getLoop",(function(t){t(e.getLoop())})),this.playerJSReceiver.ready()},initializeDashPlayerJs:function(){this.adapter=dashjs.MediaPlayer().create(),this.adapter.getDebug().setLogToBrowserConsole(!1),this.adapter.setSegmentOverlapToleranceTime(2),this.adapter.setABRStrategy("abrBola"),this.adapter.addABRCustomRule("qualitySwitchRules","DownloadRatioRule",h.default);var e={type:"PERIODIC",authorizationUrl:HippoVideo.URL.PATH[HippoVideo.URI.Feature.VIDEO_PLAYER.CLOUD_FRONT_AUTHORIZER]+this.token,expiry:HippoVideo.Constants.Video.Expiry,authSettings:this.auth_params,manifestOnly:!this.segmented};this.adapter.initializeWithAuthorization(this.mediaPlayer,this.src,!1,e),this.currentStreamQuality=-1,this.adapterLoaded=!1,window.navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./)||this.adapter.setFastSwitchEnabled(!0)},initializeHLSPlayerJs:function(){var e=this;this.adapter=new p({enableWorker:!0},{onMediaAttached:function(){e.adapter.loadSource(e.src)},onManifestParser:function(t){e._handleMetadataLoad(t)}},e.auth_params,!0),this.adapter.attachMedia(this.mediaPlayer)},initializeAdapter:function(){this["mpd"==this.type?"initializeDashPlayerJs":"initializeHLSPlayerJs"]()},initializeCSS:function(){null==this.audioSrc&&this.$el.find(".secondary-video-container").hide(),0==this.showLogo&&this.$el.find(".player-logo").hide();var t=this;e(window).on("resize",(function(i){e(i.target).hasClass("ui-resizable")||t.resizePlayerForWindow()})),this.isError?(this.$el.find(".error-reason").html(this.getFaqOneLiner()+this.getFaqLink()),this.$el.find(".error-overlay").css("background-image","url(/img/tv-noise.gif)").show()):this.$el.find(".error-overlay").hide(),this.resizePlayerForWindow(),this.$el.find("video").css("height","100%"),this.primaryVideoLayout&&(null!=this.primaryVideoLayout.width&&this.$el.find(".primary-video-container").css("width",this.getValueForPlayerInitial(this.primaryVideoLayout.width,!0)+"px"),null!=this.primaryVideoLayout.height&&this.$el.find(".primary-video-container").css("height",this.getValueForPlayerInitial(this.primaryVideoLayout.height,!1)+"px"),null!=this.primaryVideoLayout.x&&this.$el.find(".primary-video-container").css("left",this.getValueForPlayerInitial(this.primaryVideoLayout.x,!0)+"px"),null!=this.primaryVideoLayout.y&&this.$el.find(".primary-video-container").css("top",this.getValueForPlayerInitial(this.primaryVideoLayout.y,!1)+"px")),this.secondaryVideoLayout&&(null!=this.secondaryVideoLayout.width&&this.$el.find(".secondary-video-container").css("width",this.getValueForPlayerInitial(this.secondaryVideoLayout.width,!0)+"px"),null!=this.secondaryVideoLayout.height&&this.$el.find(".secondary-video-container").css("height",this.getValueForPlayerInitial(this.secondaryVideoLayout.height,!1)+"px"),null!=this.secondaryVideoLayout.x&&this.$el.find(".secondary-video-container").css("left",this.getValueForPlayerInitial(this.secondaryVideoLayout.x,!0)+"px"),null!=this.secondaryVideoLayout.y&&this.$el.find(".secondary-video-container").css("top",this.getValueForPlayerInitial(this.secondaryVideoLayout.y,!1)+"px"));var i=e(".primary-video-container").width(),n=e(".primary-video-container").height();e(".access-denied-pop").width(i),e(".access-denied-pop").height(n),e(".password-pop").width(i),e(".password-pop").height(n),this.resizeFitThumnbail(),this.initializePlayerForMobile()},resizeFitThumnbail:function(){var e=this,t=new Image,i=this.isImageMode?"#gifImage":"#playerThumbnail";t.onload=function(t){var n=t.target.naturalWidth,o=t.target.naturalHeight,a=r.resizeImageToFit(n,o,e.$el.width(),e.$el.height()),s=r.getCoordinatesForResizedImage(a.width,a.height,e.$el.width(),e.$el.height());e.$el.find(i).css({width:a.width,height:a.height,top:s.yPos,left:s.xPos})},this.isImageMode?t.src=this.src:this.thumbnail&&(t.src=this.thumbnail)},resizeFitRenderless:function(){var e=this.$el.width(),t=this.$el.height();if(e&&t){var i=0,n=0;e/t>16/9?(e=16*t/9,i=(this.$el.width()-e)/2):(t=9*e/16,n=(this.$el.height()-t)/2),this.$el.find(".renderless-overlay").css({width:e+"px",height:t+"px",left:i+"px",top:n+"px"})}},initializePlayerForMobile:function(){this.isMobilePlayer&&(this.$el.addClass("mobile-player"),this.$el.find(".volume-container, .player-audio-slider, .emoji-wrap").hide(),e(".emoji-wrap-onplay").show())},toggleSubtitles:function(e){this.$el.find("#subtitlesTrack").is(":visible")?(this.$el.find("#subtitlesTrack").hide(),this.$el.find(".player-subtitle-icon").attr("src","/img/subtitle-cc-gray.png")):(this.$el.find(".player-subtitle-icon").attr("src","/img/subtitle-cc.png"),this.$el.find("#subtitlesTrack").show())},volumeChanged:function(t){var i=this.getVolume();this.mediaPlayer.volume=i/100,this.customAudioPlayer&&(this.customAudioPlayer.volume=i/100),0==i?(this.$el.find(".audio-img").attr("src","/svg/mute.svg"),e(".audio-img").addClass("mute"),e(".audio-img").removeClass("low high")):i<=50?(this.$el.find(".audio-img").attr("src","/svg/volume-low.svg"),e(".audio-img").addClass("low"),e(".audio-img").removeClass("mute high")):(this.$el.find(".audio-img").attr("src","/svg/volume-high.svg"),e(".audio-img").addClass("high"),e(".audio-img").removeClass("low mute"))},progressSlided:function(e,t){var i=this.map(t.value,0,100,this.trimStart,this.mediaPlayer.duration-this.trimEnd);this.goToTime(i)},goToTime:function(e){this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=this.mediaPlayer.currentTime,this.$el.find(".replay-btn-container").hide()},show:function(){this.renderState?this.$el.show():(this.undelegateEvents(),this.render())},hide:function(){this.renderState&&this.$el.hide()},destroy:function(){this.undelegateEvents(),this.$el.removeData().unbind(),e(window).unbind("beforeunload",!1),this.remove(),i.View.prototype.remove.call(this)},handleMainPlayPause:function(){},_delegateViewEvents:function(){this.delegate("webkitfullscreenchange mozfullscreenchange fullscreenchange",this._handleFullscreenChange),this.delegate("mouseenter mouseleave mousemove",this._handleHover),this.delegate("contextmenu","video",this._handleMenu),this.delegate("click","video, .play-btn-container, .replay-btn-container, .player-actions-container, .se-crop-scale, .player-touch-guard",this._handlePlayerClick),this.delegate("click",".play-pause-button",this._handlePlayPauseBtnClick),this.delegate("click",".player-volume",this._handleAudioBtnClick),this.delegate("click",".player-fullscreen-icon",this._handleFullscreenBtnClick),this.delegate("click",".player-download-icon",this.downloadVideoClick),this.delegate("click","#addCommentFromCanvas",this.commentsCallbackHandler),this.delegate("click",".react-now",this.reactionsCallbackHandler),this.delegate("click",".player-rewind-action",this._handleRewindBtnClick),this.delegate("click",".player-forward-action",this._handleForwardBtnClick),this.delegate("click",".player-play-pause-action",this._handlePlayPauseBtnClick),this.delegate("click",".muted-autoplay",this._handleMutedAutoplayAudioClick),this.delegate("mouseenter mouseleave","#canvasPreviewContainer",this._handleCanvasMouseAction),e(".set-frame-btn").bind("click",this.seekAndUpdateThumb),e(".player-subtitle-icon").bind("click",this.toggleSubtitles),!this.isMobilePlayer&&this.quickPreview&&(this.delegate("mousemove",".player-progress",this._handleProgressBtnHover),this.delegate("mouseleave",".player-progress",this._handleProgressBtnLeave)),this.mediaPlayer.addEventListener("timeupdate",this._handleTimeupdate,!1),this.mediaPlayer.addEventListener("play",this._handlePlay,!1),this.mediaPlayer.addEventListener("pause",this._handlePause,!1),this.mediaPlayer.addEventListener("progress",this._handleProgress,!1),this.mediaPlayer.addEventListener("waiting",this._handleWaiting,!1),this.mediaPlayer.addEventListener("playing",this._handleResume,!1),this.mediaPlayer.addEventListener("canplay",this._handleCanplay,!1),this.mediaPlayer.addEventListener("seeked",this._handleSeeked,!1),this.mediaPlayer.addEventListener("seeking",this._handleSeeking,!1),this.mediaPlayer.addEventListener("ended",this._handleEnded,!1),this.mediaPlayer.addEventListener("loadedmetadata",this._handleMetadataLoad,!1),this.mediaPlayer.addEventListener("loadeddata",this._handleDataLoad,!1)},_handleMetadataLoad:function(){var t=this;if(this.adapterLoaded||-1==["m3u8","mpd"].indexOf(this.type))"mpd"==this.type&&(this.adapter.setAutoSwitchQualityFor("video",!1),this.adapter.setQualityFor("video",this.currentStreamQuality),this.mediaPlayer.currentTime=this.dashQualitySwitchTime);else{this.adapterLoaded=!0;var i=this.adapter["mpd"==this.type?"getBitrateInfoListFor":"getLevels"]("mpd"==this.type?"video":"");console.log("Available bitrates",i),i.sort((function(e,t){return e.height>t.height?1:t.height>e.height?-1:0}));for(var r,o,a=this.$el.find("#videoQualityBtn .quality-list"),s=[],l=i.length-1;l>=0;l--){switch(o=i[l].height,!0){case o>144&&o<=240:r="240";break;case o>240&&o<=360:r="360";break;case o>360&&o<=480:r="480";break;case o>480&&o<=720:r="720";break;case o>720&&o<=1080:r="1080";break;case o>1080&&o<=2159:r="2K";break;case o>=2160&&o<=4319:r="4K";break;case o>=4320:r="8K"}s[l]=r,a.append('<li data-id="'+l+'"><i></i><a>'+r+"</a></li>")}var u="high"==n.getQueryParams().quality;if(u){var d=i.length-1;this.$el.find("#videoQualityBtn .quality-list li").removeClass("active"),"mpd"==this.type?(this.adapter.setAutoSwitchQualityFor("video",!1),this.adapter.setQualityFor("video",d)):this.adapter.setRepresentation(i.length-1)}s.length>0?(this.$el.find("#videoQualityBtn").show(),u?a.append('<li data-id="-1">'+c.wizPlayer.auto+"</li>"):a.append('<li class="active" data-id="-1">'+c.wizPlayer.auto+"</li>")):this.$el.find("#videoQualityBtn").hide();try{this.$el.find("#videoQualityBtn .player-quality-icon").on("click",(function(){t.$el.find("#videoQualityBtn .quality-container").slideToggle("fast")}))}catch(e){}this.$el.find("#videoQualityBtn .quality-list li").on("click",(function(i){var n=e(i.currentTarget).attr("data-id");t.$el.find("#videoQualityBtn .quality-list li").removeClass("active"),e(this).addClass("active"),"-1"==n?"mpd"==this.type?t.adapter.setAutoSwitchQualityFor("video",!0):t.adapter.setRepresentation(-1):"mpd"==this.type?parseInt(n)>~~t.currentStreamQuality&&(t.dashQualitySwitchTime=t.mediaPlayer.currentTime,t.adapter.reset(),t.adapter.attachSource(t.src),t.adapter.attachView(t.mediaPlayer),t._handleWaiting()):t.adapter.setRepresentation(Number(n)),t.currentStreamQuality=~~n}))}this.subtitlesEnabled&&document.getElementsByTagName("track")[0].addEventListener("cuechange",this.cueChanged);this.autoPlayVideo&&(this.isMutedAutoPlay&&(this.mute(),this.$el.find(".muted-autoplay").removeClass("hide")),t.play())},_handleDataLoad:function(){var e=!this.dataLoaded;this.dataLoaded=!0,e&&this.onDataLoadHandler&&this.onDataLoadHandler()},_handleFullscreenChange:function(t){var i=this;this.isFullScreen()?(e("#"+this.id).addClass("player-fullscreen-mode"),this.$el.find(".preview-add-comment").hide()):(e("#"+this.id).removeClass("player-fullscreen-mode"),this.$el.find(".preview-add-comment").show()),this.resizePlayerForWindow(),setTimeout((function(){i.resizePlayerForWindow()}),1e3)},_handleProgressBtnLeave:function(e){clearTimeout(this.hideQuickPreviewTimeout);var t=this;this.hideQuickPreviewTimeout=setTimeout((function(){t.$el.find("#canvasPreviewContainer").fadeOut(200)}),500)},_handleProgressBtnHover:function(t){var i=this.$el.find("#canvasPreviewContainer"),n=(t.target.className.includes("ui-slider-handle")?e(t.target).position().left:t.offsetX)-i.width()/2;if(i.css("left",n+"px"),!this.showSetFrame||this.quickPreviewImg&&this.quickPreviewContext){i.is(":visible")||i.fadeIn(),this.showSetFrame&&e(".player-controls-container").show();s=t.offsetX/this.$el.find(".player-progress").width();if(this.second=s*this.mediaPlayer.duration,!e(t.target).hasClass("player-progress")&&!e(t.target).hasClass("ui-slider-range")||isNaN(this.mediaPlayer.duration))return;var r=parseInt(this.second/2),o=parseInt(r/10),a=r%10;this.quickPreviewImg&&this.quickPreviewContext&&(this.quickPreviewContext.drawImage(this.quickPreviewImg,128*a,72*o,128,72,0,0,128,72),this.quickPreviewContext.fillStyle="rgba(0,0,0,0.5)",this.quickPreviewContext.fillRect(47,53,37,18),this.quickPreviewContext.font="9px",this.quickPreviewContext.fillStyle="white",this.quickPreviewContext.fillText(this.strToTime(this.second),55,67)),e("#canvasHoverTime").val(this.second),clearTimeout(this.hideQuickPreviewTimeout),this.hideQuickPreviewTimeout=setTimeout((function(){i.fadeOut(200)}),3e3)}else{i.fadeIn(),e(".player-controls-container").show();var s=t.offsetX/this.$el.find(".player-progress").width();this.second=s*this.mediaPlayer.duration,isNaN(this.second)&&(this.second=.2);var l=document.getElementsByClassName("hidden-video")[0];l.currentTime=Number(this.second),this.quickPreviewCanvas=this.$el.find(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d"),this.$el.find("#quick-preview-loading").show(),e(this.quickPreviewCanvas).hide(),l.removeEventListener("canplay",this.drawImageForPreview),l.addEventListener("canplay",this.drawImageForPreview)}},drawImageForPreview:function(){this.quickPreviewContext&&this.quickPreviewContext.drawImage(document.getElementsByClassName("hidden-video")[0],0,0,128,72),this.quickPreviewCanvas&&(e(this.quickPreviewCanvas).show(),this.$el.find("#quick-preview-loading").hide())},seekAndChooseThumb:function(t){e(".player-controls-container, .set-frame-btn").show(),e(".player-progress").bind("mousemove",this._handleProgressBtnHover),this.undelegateHoverActions(),this.showPlayerControls();var i=e("#canvasPreviewContainer");i.is(":visible")||i.fadeIn();var n=document.getElementsByClassName("hidden-video")[0];n&&(n.currentTime=Number(.2),this.quickPreviewCanvas=e(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d"),this.$el.find("#quick-preview-loading").show(),e(this.quickPreviewCanvas).hide(),n.removeEventListener("canplay",this.drawImageForPreview),n.addEventListener("canplay",this.drawImageForPreview))},hideSeekAndUpdateThumb:function(){this.undelegate("mouseenter mouseleave mousemove",this._handleHover),this.$el.find("#canvasPreviewContainer").hide(),e(".player-progress").unbind("mousemove mouseleave")},seekAndUpdateThumb:function(){this.hideSeekAndUpdateThumb(),this.saveThisFrameAsThumbnail(this.second)},setThumbnailFromFrameCallBack:function(e){this.saveThisFrameAsThumbnail=e},setOnDataLoadHandler:function(e){this.onDataLoadHandler=e,this.dataLoaded&&e()},_handleEnded:function(e){if(this.playing&&this.mediaPlayer.currentTime>=this.mediaPlayer.duration-this.trimEnd&&(this.simpleEditMode||(this.$el.find(".replay-btn-container").fadeIn(500),this.$el.find(".player-actions-container").fadeOut()),this.playerState="ended",this.playing=!1,this.checkAllowPlay()),this.isIphone&&this.fullscreen&&this.exitFullScreen(),this.playerJSReceiver&&this.playerJSReceiver.emit("ended"),this.onEndHandler.length>0)for(var t=0;t<this.onEndHandler.length;t++)this.onEndHandler[t]();this.playing||(this.simpleEditMode?this.$el.find(".play-pause-button").find("img").attr("src",this.customColors?"/img/simple-edit-play-icon-dark.png":"/img/simple-edit-play-icon.png"):this.$el.find(".play-pause-button, .player-play-pause-action").find("img").attr("src","/svg/play.svg"))},_handleHover:function(t){var i=this,n=t.type,r=e(t.target),o=this.$el.find(".player-controls-container").is(":visible"),a=e(t.target.parentElement);this.simpleEditMode||("mouseenter"===n?this.showPlayerControls():"mouseleave"===n?(this.$el.find(".player-actions-container").fadeOut(),this.setPlayerControlsTimeout(1e3)):"mousemove"===n&&(clearTimeout(this.mousemoveTimeout),!this.isMobilePlayer&&this.isFullScreen()?(this.showPlayerHoverActions(),o||this.showPlayerControls(),a.hasClass("player-action")?this.mousemoveTimeout=setTimeout((function(){i.setPlayerControlsTimeout(50)}),1e3):r.hasClass("player-controls-container")||a.hasClass("player-controls-container")||a.hasClass("controls-btn")||a.hasClass("play-pause-btn")||a.hasClass("player-progress")||(this.mousemoveTimeout=setTimeout((function(){i.setPlayerControlsTimeout(50)}),800))):(this.showPlayerHoverActions(),this.isMobilePlayer||(this.mousemoveTimeout=setTimeout((function(){i.$el.find(".player-actions-container").fadeOut()}),a.hasClass("player-action")?1e3:600)))))},showPlayerControls:function(){clearTimeout(this.mouseleaveTimeout),this.$el.find(".player-controls-container").addClass("showing-controls").slideDown(200),this.$el.find("for-reactions, .notification-line-onplay").hide(),this.$el.find("#subtitlesTrack").css("bottom","55px"),this.isMobilePlayer?this.setPlayerControlsTimeout(1500):e(".emoji-wrap-onplay").hide()},cueChanged:function(e){this.$el.find("#subtitlesTrack").text("");for(var t=document.getElementById("primary-video").textTracks[0],i="",n=0;n<t.activeCues.length;n++)i+=t.activeCues[n].text;""!=i&&(document.getElementById("primary-video").textTracks[0].mode="hidden",this.$el.find("#subtitlesTrack").html("<span>"+i+"</span>"))},setPlayerControlsTimeout:function(t){var i=this;this.mouseleaveTimeout=setTimeout((function(){clearTimeout(this),i.simpleEditMode||i.$el.find(".quality-container").is(":visible")||(i.$el.find(".player-actions-container").fadeOut(),i.$el.find(".player-controls-container").removeClass("showing-controls").slideUp(100),i.$el.find(".volume-container, .quality-container").slideUp(),i.$el.find("for-reactions, .notification-line-onplay").show(),i.$el.find("#subtitlesTrack").css("bottom","15px"),e(".emoji-wrap-onplay").show())}),t)},setPlayerState:function(e){this.playerState=e},showPlayerHoverActions:function(){this.showHoverActions&&"initial"!==this.playerState&&"ended"!==this.playerState&&!this.isCTAWaitingMode&&this.$el.find(".player-actions-container").fadeIn()},_handleMenu:function(e){},_handleWaiting:function(e){if(this.showPersonalisedVideoLoading)this.$el.find("#personalisedVideoLoading").fadeIn(),this.showHoverActions=!1;else{var t=this;this.waitingTimeout=setTimeout((function(){t.canShowPlayerLoading&&t.$el.find(".player-loading-overlay").fadeIn(200)}),200),this._secondaryVideoPlaying&&this.customAudioPlayer.pause()}},setPersonalisedVideo:function(e){this.$el.find("#primary-video source").attr("src",e.video_url),this.$el.find("#primary-video").length>0&&this.$el.find("#primary-video")[0].load(),this.$el.find(".thumbnail-container img").attr("src",e.thumbnail),this.quickPreview=e.quickpreview,this.personalisedVideoDetailsSet=!0,this.$el.find("#personalisedVideoLoading").fadeOut(),this.pause(),this.show()},_handleResume:function(e){if(clearTimeout(this.waitingTimeout),this.$el.find(".player-loading-overlay").fadeOut(200),this.customAudioPlayer){this.customAudioPlayer.currentTime=this.mediaPlayer.currentTime;var t=this,i=this.customAudioPlayer.play();i?i.then((function(){t._secondaryVideoPlaying=!0})).catch((function(e){t._secondaryVideoPlaying=!1})):t._secondaryVideoPlaying=!0}},_handleCanplay:function(t){clearTimeout(this.waitingTimeout),this.$el.find(".player-loading-overlay").fadeOut(200);var i=this;if(this.playing){var r=this.mediaPlayer.play();r?r.then((function(){i._primaryVideoPlaying=!0})).catch((function(e){i._primaryVideoPlaying=!1})):i._primaryVideoPlaying=!0}this.canplayHandler&&this.canplayHandler(t),browser=["Safari","Edge","IE"];var o=window.navigator.userAgent.toLowerCase(),a=/safari/.test(o),s=/iphone|ipod|ipad/.test(o),l=s&&!a;(e.inArray(n.getBrowserName(),browser)>=0||l)&&!this.largeValueSet?(this.mediaPlayer.currentTime=0,this.durationComputed=!0,this.largeValueSet=!0,this.mediaPlayer.duration||(this.mediaPlayer.duration=this.duration),this.onComputedDurationHander&&this.onComputedDurationHander()):this.largeValueSet||isFinite(this.mediaPlayer.duration)?!this.durationComputed&&isFinite(this.mediaPlayer.duration)&&(this.mediaPlayer.currentTime=0,this.durationComputed=!0,this.onComputedDurationHander&&this.onComputedDurationHander()):(this.largeValueSet=!0,this.mediaPlayer.currentTime=1e9)},_handleSeeked:function(){if(this.onSeekedHandler&&this.onSeekedHandler(),this.onSeekedHandlers)for(var e=0;e<this.onSeekedHandlers.length;e++)this.onSeekedHandlers[e]&&this.onSeekedHandlers[e]()},_handleSeeking:function(){this.seekingStartedAt=this.currentTimeUpdate,this.seekingEndedAt=this.mediaPlayer.currentTime,this.onSeekindHandler&&this.onSeekindHandler()},_handlePlayerClick:function(t){this.simpleEditMode||this.isImageMode||(new Date-this.previousClick<300?this._handleFullscreenBtnClick():e(t.currentTarget).hasClass("replay-btn-container")||e(t.currentTarget).hasClass("play-btn-container")?this.play():this.showHoverActions||this._handlePlayPauseBtnClick(),this.showPlayerControls(),this.previousClick=new Date)},_handlePlay:function(){if(this.$el.find(".thumbnail-container").is(":visible")&&this.$el.find(".thumbnail-container").fadeOut(100),this.simpleEditMode?this.$el.find(".play-pause-button").find("img").attr("src",this.customColors?"/img/simple-edit-pause-icon-dark.png":"/img/simple-edit-pause-icon.png"):this.$el.find(".play-pause-button, .player-play-pause-action").find("img").attr("src","/svg/pause-white.svg"),this.onPlayHandler.length>0)for(var e=0;e<this.onPlayHandler.length;e++)this.onPlayHandler[e]()},_handlePause:function(){if(!this.playing&&(this._secondaryVideoPlaying&&this.customAudioPlayer.pause(),this.simpleEditMode?this.$el.find(".play-pause-button").find("img").attr("src",this.customColors?"/img/simple-edit-play-icon-dark.png":"/img/simple-edit-play-icon.png"):this.$el.find(".play-pause-button, .player-play-pause-action").find("img").attr("src","/svg/play.svg"),this.onPauseHandler.length>0))for(var e=0;e<this.onPauseHandler.length;e++)this.onPauseHandler[e]()},_handleProgress:function(e){if(this.showPersonalisedVideoLoading&&this.personalisedVideoDetailsSet){var t="Opera"==n.getBrowserName();if(!t){var i=this.mediaPlayer.buffered;if(!i||!i.length)return;var r=i.start(0),o=i.end(i.length-1);t=0==r&&o>3}t&&(this.personalisedVideoDetailsSet=!1,this.$el.find("#personalisedVideoLoading").is(":visible")&&this.play(),this.showHoverActions=!0,this.showPersonalisedVideoLoading=!1,this.$el.find("#personalisedVideoLoading").fadeOut())}this.onProgressHandler&&this.onProgressHandler(e)},_handlePlayPauseBtnClick:function(){this.playing?this.pause():this.play()},_handleRewindBtnClick:function(){if(!this.isCTAWaitingMode){var e=this.mediaPlayer.currentTime;e=Math.max(e-5,0),this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=e}},_handleForwardBtnClick:function(){if(!this.isCTAWaitingMode){var e=this.mediaPlayer.currentTime;e!=this.mediaPlayer.duration&&(e=Math.min(e+5,this.mediaPlayer.duration),this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=e)}},_handleAudioBtnClick:function(){0!=this.getVolume()?this.mute():this.unmute()},_handleMutedAutoplayAudioClick:function(t){this.unmute(),e(t.currentTarget).remove()},_handleFullscreenBtnClick:function(){this.fullscreen?this.exitFullScreen():this.enterFullScreen()},_handleTimeupdate:function(e){var t=this.map(this.mediaPlayer.currentTime,this.trimStart,this.mediaPlayer.duration-this.trimEnd,0,100);if((isNaN(t)||this.mediaPlayer.currentTime<Math.round(100*this.trimStart)/100)&&(this.mediaPlayer.currentTime=Math.round(100*this.trimStart)/100),t>100&&(this._handleEnded(),this.mediaPlayer.currentTime=this.trimStart>=this.mediaPlayer.duration?this.mediaPlayer.duration:this.trimStart,this._primaryVideoPlaying&&this.mediaPlayer.pause()),isFinite(this.mediaPlayer.duration)){this.$el.find(".player-progress").slider("value",t);var i=this.mediaPlayer.duration,n=this.mediaPlayer.currentTime;isNaN(this.trimStart)||isNaN(this.trimEnd)||(i=i-this.trimStart-this.trimEnd,n-=this.trimStart),i=Math.max(i,0),n=Math.max(n,0),this.$el.find(".player-currenttime").text(this.strToTime(n)+" / "+this.strToTime(i)),this.currentTimeUpdate=n,this.updateHandler&&this.updateHandler(),this.playerJSReceiver&&this.playerJSReceiver.emit("timeupdate",{seconds:n,duration:i})}},mute:function(){this.previousVolume=this.getVolume(),this.setVolume(0),this.mediaPlayer.muted=!0,this.customAudioPlayer&&(this.customAudioPlayer.muted=!0)},unmute:function(){this.setVolume(this.previousVolume),this.mediaPlayer.muted=!1,this.$el.find(".muted-autoplay").remove(),this.customAudioPlayer&&(this.customAudioPlayer.muted=!1)},setLoop:function(e){this.loop=e},getLoop:function(){return this.loop},setUpdateHandler:function(e){this.updateHandler=e},setPlayPauseHandler:function(e,t){t?this.onPlayHandler.push(e):this.onPauseHandler.push(e)},setEndedHandler:function(e){this.onEndHandler.push(e)},setSeekedHandler:function(e){this.onSeekedHandler=e},addSeekedHandler:function(e){this.onSeekedHandlers.push(e)},setSeekingHandler:function(e){this.onSeekindHandler=e},setPlayerResizeHandler:function(e){this.playerResizeHandler=e},play:function(){if(!this.playing&&!this.isCTAWaitingMode){if("initial"==this.playerState||"ended"==this.playerState)return this.playerState="started",this.$el.find(".play-btn-container").fadeOut(),this.$el.find(".replay-btn-container").fadeOut(),this.$el.find(".play-btn-container video").remove(),void(this.allowPlay?this.play():this.renderWarning(7));this.playing=!0;var e=this,t=this.mediaPlayer.play();t?t.then((function(){e._primaryVideoPlaying=!0})).catch((function(t){e._primaryVideoPlaying=!1})):e._primaryVideoPlaying=!0,this.playerJSReceiver&&this.playerJSReceiver.emit("play")}},pause:function(){this.playing&&(this.playing=!1,this._primaryVideoPlaying&&this.mediaPlayer.pause(),this.playerJSReceiver&&this.playerJSReceiver.emit("pause"))},isPlaying:function(){return this.playing},setVolume:function(e){this.$el.find(".player-audio-slider").slider("value",e),this.volumeChanged()},getVolume:function(){return this.$el.find(".player-audio-slider").slider("value")},isFullScreen:function(){return document.fullScreenElement&&null!==document.fullScreenElement||document.mozFullScreen||document.webkitIsFullScreen},enterFullScreen:function(){var e=screen.msOrientation||screen.orientation||screen.mozOrientation||{};if(!this.fullscreen&&0!=this.fullscreenControl){var t;this.fullscreen=!0,(t=this.isIphone?document.getElementById("primary-video"):document.getElementById(this.id)).webkitEnterFullScreen?t.webkitEnterFullScreen():t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen();try{r.canForceLandscapeForFullscreen()&&e.lock("landscape")}catch(e){r.postErrorsToLog({error:"Error while trying to force full screen landscape in player",stackTrace:JSON.stringify(e)})}}},exitFullScreen:function(){var e=screen.msOrientation||screen.orientation||screen.mozOrientation||{};if(this.fullscreen){this.fullscreen=!1;var t=document;this.isIphone&&(t=document.getElementById("primary-video")),t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.webkitExitFullscreen&&t.webkitExitFullscreen();try{r.canForceLandscapeForFullscreen()&&e.unlock()}catch(e){r.postErrorsToLog({error:"Error while trying to force exit full screen landscape in player",stackTrace:JSON.stringify(e)})}}},strToTime:function(e){var t=parseFloat(e,10),i=Math.floor(t/3600),n=Math.floor((t-3600*i)/60),r=Math.floor(t-3600*i-60*n);return i>0&&n<10&&(n="0"+n),r<10&&(r="0"+r),i>0?i+":"+n+":"+r:n+":"+r},trim:function(e,t,i){if(this.trimStart!=e||this.trimEnd!=t)try{this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=e}catch(e){}if(this.trimStart=e,this.trimEnd=t,i&&("initial"==this.playerState||"ended"==this.playerState))return this.playerState="started",this.$el.find(".play-btn-container").fadeOut(100),this.$el.find(".replay-btn-container").fadeOut(100),void this.$el.find(".play-btn-container video").remove()},map:function(e,t,i,n,r){return(e-t)*(r-n)/(i-t)+n},setSimpleEditMode:function(e){this.simpleEditMode=e,this.simpleEditMode?(this.$el.animate({"margin-bottom":"0px"},200),this.$el.find(".player-controls-container").addClass("player-controls-outside"),this.$el.find(".player-controls-container").removeClass("player-controls-inside"),this.$el.find(".player-controls-container").fadeIn(),this.$el.find(".play-pause-button").find("img").attr("src",this.customColors?"/img/simple-edit-play-icon-dark.png":"/img/simple-edit-play-icon.png"),this.$el.find(".player-download, .for-reactions").hide(),this.$el.find(".notification-line-onplay").hide()):(this.$el.animate({"margin-bottom":"0px"},200),this.$el.find(".player-controls-container").removeClass("player-controls-outside"),this.$el.find(".player-controls-container").addClass("player-controls-inside"),this.$el.find(".play-pause-button").find("img").attr("src","/svg/play.svg"),this.$el.find(".player-download, .for-reactions").show(),this.$el.find(".notification-line-onplay").show())},setCTAWaitingMode:function(e){this.isCTAWaitingMode=e,e&&this.$el.find(".player-actions-container").fadeOut()},setStatId:function(e){this.statId=e},getStatId:function(){return this.statId},resizePlayerForWindow:function(){var e=screen.msOrientation||(screen.orientation||screen.mozOrientation||{}).type;this.$el.height(9*this.$el.width()/16),this.resizeFitThumnbail(),this.isMobilePlayer&&((e||"").includes("landscape")&&this.isFullScreen()?this.$el.find(".emoji-wrap").show():this.$el.find(".emoji-wrap").hide()),this.playerResizeHandler&&this.playerResizeHandler({width:this.$el.width(),height:this.$el.height()}),this.resizeFitRenderless()},getValueForPlayerInitial:function(e,t){var i=this.$el.width(),n=this.$el.height();return t?this.roundNumber(e*(i/384),2):this.roundNumber(e*(n/216),2)},roundNumber:function(e,t){return Math.round(10*e*t)/(10*t)},getFaqOneLiner:function(){return null!=u["faqoneliner_"+this.authorState]?u["faqoneliner_"+this.authorState]:"unknown error.. contact us for more details"},getFaqLink:function(){var e={5:"misc-error",6:"misc-error",13:"upload-issues",14:"upload-issues",16:"upload-issues",28:"upload-issues",22:"misc-error",23:"misc-error",27:"misc-error"};return null==e[this.authorState]?"":'<a target="_blank" href="https://www.hippovideo.io/faq.html#'+e[this.authorState]+'"> more info </a>'},resetPlayer:function(){this.isImageMode?this.$el.find(".primary-video-container img").attr("src",""):(this.$el.find(".secondary-video-container video").attr("src",""),this.$el.find(".primary-video-container video").attr("src",""),this.$el.find(".secondary-video-container video")[0].load(),this.$el.find(".primary-video-container video")[0].load(),this.canShowPlayerLoading&&this.$el.find(".player-loading-overlay").show(),this.$el.find(".title-paragraph-tag").text(""),this.$el.find(".player-currenttime").text("")),this.$el.find(".vdo-prev-head").hide(),this.$el.find(".hippo-video-buttons").hide(),this.$el.find(".play-btn-container").hide(),this.$el.find(".vdo-error-state").hide()},downloadVideoClick:function(){null!=this.downloadVideo&&this.downloadVideo()},_handleCanvasMouseAction:function(e){if(clearTimeout(this.hideQuickPreviewTimeout),"mouseleave"===e.type){var t=this;this.hideQuickPreviewTimeout=setTimeout((function(){t.$el.find("#canvasPreviewContainer").fadeOut(200)}),300)}},getCurrentTime:function(){return this.durationComputed?this.mediaPlayer.currentTime:.001},getDuration:function(){return parseInt(this.mediaPlayer.duration)||this.duration},checkAllowPlay:function(){if(this.token){var e=this,t={token:this.token};f.call({url:"/video_delivery/is_allow_play",method:"POST",data:t,success:function(t){e.allowPlay=t.is_allow}})}},renderWarning:function(t){var i=e("#"+this.$el.attr("id")).parent().attr("id");e("#"+i).empty(),e("#"+i).html(this.template({id:this.id,token:this.token,thumbnail:" ",privacy:t})),this.setElement(e("#"+this.id)),this.initializeCSS(),this.undelegateEvents(),e("#comments").hide(),e(".delivery-footer").hide(),e(".play-btn-container").hide()},undelegateHoverActions:function(){this.undelegate("mouseenter mouseleave mousemove",this._handleHover)},delegateHoverActions:function(){this.delegate("mouseenter mouseleave mousemove",this._handleHover)},overrideStyle:function(e,t,i){e.each((function(){this.style.setProperty(t,i,"important")}))},applyCustomColors:function(){if(this.customColors){var e="";this.customColors.primaryColor&&(this.overrideStyle(this.$el.find(".player-progress .ui-slider-range, .player-progress .ui-slider-handle, .player-audio-slider .ui-slider-range, .player-audio-slider .ui-slider-handle"),"background",this.customColors.primaryColor),this.overrideStyle(this.$el.find(".player-progress .ui-slider-range"),"background-image","unset"),e+=".trim-slider .ui-slider-handle:before,.hippo-video-player .ui-resizable-e, .hippo-video-player .ui-resizable-w, .hippo-video-player .ui-resizable-n, .hippo-video-player .ui-resizable-s, .hippo-video-player .ui-resizable-nw, .hippo-video-player .ui-resizable-ne, .hippo-video-player .ui-resizable-sw, .hippo-video-player .ui-resizable-se,.hippo-video-player .ui-resizable-nw::after, .hippo-video-player .ui-resizable-ne::after, .hippo-video-player .ui-resizable-sw::after, .hippo-video-player .ui-resizable-se::after {background: "+this.customColors.primaryColor+" !important;}",e+=".se-clip-time {border-color: "+this.customColors.primaryColor+" !important;}",e+=".player-controls-outside .player-currenttime {color: "+this.customColors.primaryColor+" !important;}"),this.customColors.secondaryColor&&(e+=".se-clip-time {background: "+this.customColors.secondaryColor+" !important;}"),this.customColors.bgColor&&(e+=".player-controls-outside {background: "+this.customColors.bgColor+" !important;}"),e.length>0&&(document.head.appendChild(document.createElement("style")).innerHTML=e)}},getBandwidthConsumed:function(){var e={type:this.type};if("m3u8"==this.type)e.totalFileSize=this.adapter.getBandwidthConsumed();else{for(var t=0,i=0;i<this.mediaPlayer.buffered.length;i++){var n=this.mediaPlayer.buffered.start(i);t+=100*(this.mediaPlayer.buffered.end(i)-n)/this.mediaPlayer.duration}e.perc=t}return e},applyCustomPlayIcon:function(){if(this.customPlayIcon){var t=document.createElement("div");t.classList.add("overlay"),e(".main-controls").each((function(){e(this).append(t)}));var i=document.createElement("div");i.classList.add("watch-video"),i.textContent="WATCH VIDEO",e(".main-plyBtn").each((function(){e(this).append(i)}));e(".main-plyBtn .playbutton").each((function(){e(this).find("svg").remove(),e(this).append('<svg xmlns="http://www.w3.org/2000/svg" width="47" height="47" viewBox="0 0 47 47" class="white-play-icon prim-vid"> <g transform="translate(-344.113 -1343.053)"> <g class="a" transform="translate(344.113 1343.053)"> <circle class="c" cx="23.5" cy="23.5" r="23.5"/> <circle class="d" cx="23.5" cy="23.5" r="23"/> </g> <path class="b" d="M7.312,0l7.312,12.56H0Z" transform="translate(375.756 1359.646) rotate(90)"/> </g> </svg>'),e(this).append('<svg xmlns="http://www.w3.org/2000/svg" width="47" height="47" viewBox="0 0 57 57" class="white-play-icon-filled" style="display:none;"> <g transform="translate(-932 -595)"> <circle class="a" cx="28.5" cy="28.5" r="28.5" transform="translate(932 595)"/> <path class="b" d="M8.813,0l8.813,15.137H0Z" transform="translate(970.137 615) rotate(90)"/> </g> </svg>')})),e("#videoPagePreviewBlock, #videoPageDeliveryBlock").addClass(this.customPlayIcon)}},updateIsMirrorWebCam:function(e){this.isMirrorWebCam=e,n.toggleWebcamForMirrorVideo(this.isMirrorWebCam,null!=this.audioSrc&&""!=this.audioSrc?this.$el.find(".secondary-video"):this.$el.find("#primary-video"))},updateQuickPreviewObjects:function(t){t&&!this.isAudioOnly&&this.getDuration()>=30?(this.quickPreviewImg=document.createElement("img"),this.quickPreviewImg.setAttribute("src",t),this.quickPreviewCanvas=this.$el.find(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d"),e(this.quickPreviewCanvas).hide(),this.$el.find("#quick-preview-loading").show()):(this.quickPreviewImg=void 0,this.quickPreviewCanvas=void 0,this.quickPreviewContext=void 0)},setShowSetFrame:function(e){e?this.seekAndChooseThumb():this.hideSeekAndUpdateThumb()}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.x(t.get(["isPrivacy"],!1),t,{else:i,block:te},{})}function i(e,t){return e.x(t.get(["initial"],!1),t,{else:n,block:ee},{})}function n(e,t){return e.w('<div class="hippo-video-player" id=').f(t.get(["id"],!1),t,"h").w('><div class="se-crop-scale">\x3c!-- <canvas class="blurred-bg-video" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;filter: blur(20px);-webkit-filter: blur(20px);transform: scale(1.2);"></canvas> --\x3e<div class="primary-video-overflow-container"><div class="primary-video-container">').x(t.get(["isImageMode"],!1),t,{else:r,block:f},{}).w("</div></div>").nx(t.get(["isImageMode"],!1),t,{block:g},{}).w('<canvas class="renderless-overlay" style="position: absolute;width: 100%;height: 100%"></canvas></div>').nx(t.get(["isImageMode"],!1),t,{block:v},{}).w('<div id="personalizeChapterId" class="hp-menu-tog hide"><img src="/svg/hamburger-white.svg" width="16"></div><div id="personalizeChaptersListId" class="hp-tog-content hide"><a class="chapter-close" id="chapterCloseId"><img src="/svg/close-gray.svg" width="10"></a><br><div id="chaptersListId"></div></div><div class="error-overlay hide" style="position:absolute;width:100%;height:100%;background: rgba(0,0,0,0.2);z-index:2;background-repeat: no-repeat;background-size: contain;"><div class="error-reason-div"><img src="/svg/warning.svg" class="status-warning" /><div class="error-reason"></div></div></div><div class="player-touch-guard"></div>').nx(t.get(["isImageMode"],!1),t,{block:C},{}).h("select",t,{block:q},{key:t.get(["privacy"],!1)},"h").w(" ").h("select",t,{block:Y},{key:t.get(["privacy"],!1)},"h").w(" ").h("eq",t,{block:J},{key:t.get(["privacy"],!1),value:7},"h").w(" ").h("eq",t,{block:X},{key:t.get(["privacy"],!1),value:2},"h").w("</div>").nx(t.get(["isImageMode"],!1),t,{block:Q},{})}function r(e,t){return e.x(t.get(["isAudioOnly"],!1),t,{block:o},{}).w('<video class="primary-video" id="primary-video" crossorigin="anonymous" controls playsinline>').h("eq",t,{block:l},{key:t.get(["type"],!1),value:"url"},"h").w("Your browser does not support the video tag.").x(t.get(["subtitlesEnabled"],!1),t,{block:c},{}).w('</video><canvas class="se-effects-canvas"></canvas><div class="se-effects-components-container"></div>').x(t.get(["showSetFrame"],!1),t,{block:p},{})}function o(e,t){return e.w("<div>").x(t.get(["isLessonly"],!1),t,{else:a,block:s},{}).w("</div>")}function a(e,t){return e.w('<img src="/img/onlyaudio.jpg" style="width:100%;height:100%" />')}function s(e,t){return e.w('<img src="/img/onlyaudio_lessonly.jpg" style="width:100%;height:100%" />')}function l(e,t){return e.w(" <source ").x(t.get(["addSourceAudioType"],!1),t,{block:u},{}).w(' crossorigin="anonymous" src=').f(t.get(["src"],!1),t,"h").w(">")}function u(e,t){return e.w(' type="audio/mp3" ')}function c(e,t){return e.x(t.get(["subtitlesFromServer"],!1),t,{else:d,block:h},{})}function d(e,t){return e.w('<track label="English" kind="subtitles" id="subtitleTrack" srclang="eng" src="').f(t.get(["subtitles"],!1),t,"h").w('" default="">')}function h(e,t){return e.w('<track label="English" kind="subtitles" id="subtitleTrack" srclang="eng" src="').f(t.get(["domain"],!1),t,"h").w("/video_delivery/subtitles/").f(t.get(["token"],!1),t,"h").w('" default="">')}function p(e,t){return e.w('<video class="hidden-video" controls playsinline crossorigin="anonymous" style="display: none;"><source crossorigin="anonymous" src=').f(t.get(["src"],!1),t,"h").w(">").f(t.getPath(!1,["wizPlayer","browserDoesNotSupport"]),t,"h").w("</video>")}function f(e,t){return e.w('<img src="').f(t.get(["src"],!1),t,"h").w('" class="primary-video" id="gifImage" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;">')}function g(e,t){return e.nx(t.get(["isDelivery"],!1),t,{block:m},{})}function m(e,t){return e.w('<div class="secondary-video-overflow-container"><div class="secondary-video-container"><video class="secondary-video" crossorigin="anonymous" ><source crossorigin="anonymous" src=').f(t.get(["audioSrc"],!1),t,"h").w('></video></div></div><textarea id="seTextEditable" class="se-text-editable custom-scroll hide" spellcheck="false" placeholder="Enter text here"></textarea><div class="se-components-container"></div><div class="se-crop-resizable hide"></div><div class="se-crop-highlighter se-crop-highlighter-top"></div><div class="se-crop-highlighter se-crop-highlighter-left"></div><div class="se-crop-highlighter se-crop-highlighter-bottom"></div><div class="se-crop-highlighter se-crop-highlighter-right"></div>')}function v(e,t){return e.w('<div class="se-components-droppable"></div><div class="player-border"></div>').x(t.get(["thumbnail"],!1),t,{block:y},{}).w('<div class="play-btn-container full-screen-container"><div class="play-center-ico text-center"><img src="/svg/play.svg"></div>').x(t.get(["previewVideo"],!1),t,{block:w},{}).w('</div><div class="replay-btn-container full-screen-container hide"><img src="/img/videoreplay.png" style="width: 20%; display: block; position: relative;top: 30%;margin:auto;z-index:100;"></div><div class="player-loading-overlay full-screen-container hide"><div><img src="/img/videoloading.gif"></div></div>').x(t.get(["isLandingPageVideo"],!1),t,{else:E,block:_},{}).x(t.get(["isMutedAutoPlay"],!1),t,{block:S},{}).x(t.get(["showHoverActions"],!1),t,{block:T},{})}function y(e,t){return e.nx(t.get(["isAudioOnly"],!1),t,{block:b},{})}function b(e,t){return e.w('<div class="thumbnail-container full-screen-container" style="position:absolute;width:100%;height:100%;cursor: pointer;z-index:1"><img src="').f(t.get(["thumbnail"],!1),t,"h").w('" id="playerThumbnail" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;" onerror="this.style.display=\'none\'"></div>')}function w(e,t){return e.w('<video src="').f(t.get(["previewVideo"],!1),t,"h").w('" crossorigin="anonymous" autoplay muted loop />')}function E(e,t){return e.w('<div id="personalisedVideoLoading" class="personalised-video-loading"><div class="inner-container"><center><div class="bar-loading"><div></div><div></div><div></div><div></div></div></center></div></div>')}function _(e,t){return e.w('<div id="personalisedVideoLoading" class="personalised-video-loading-page"><div class="loader-wrap"><div class="rp-loader"></div></div></div>')}function S(e,t){return e.w('<div class="player-info muted-autoplay cursor-pointer hide"><img src="/svg/mute.svg" alt="volume" /> ').f(t.getPath(!1,["wizPlayer","clickToUnmute"]),t,"h").w("</div>")}function T(e,t){return e.w('<div class="player-actions-container full-screen-container hide"><div class="player-actions text-center"><span class="player-action player-rewind-action"><img src="/svg/rewind.svg" alt="Rewind" /></span><span class="player-action player-play-pause-action"><img src="/svg/play.svg" alt="Play/Pause" /></span><span class="player-action player-forward-action"><img src="/svg/forward.svg" alt="Forward" /></span></div></div>')}function C(e,t){return e.w('<div class="canvas-preview-container ').x(t.get(["showComments"],!1),t,{block:k},{}).w('" id="canvasPreviewContainer" style="display:none;"><img src="/images/loading-more.svg" style="width: 175px;height: 90px;padding: 20px;display:none" id="quick-preview-loading"><canvas class="quickpreview-canvas" width=128 height=72></canvas>').x(t.get(["showComments"],!1),t,{block:x},{}).x(t.get(["showSetFrame"],!1),t,{block:A},{}).w('<input type="hidden" id="canvasHoverTime" /></div><div class="subtitles-line" id="subtitlesTrack"></div><div class="player-controls-container player-controls-inside"><a class="play-pause-button" id="pauseAndPlayBtn"><img src="/svg/play.svg"></a><div class="components-marker-container"></div><div class="components-time-container"><div class="se-clip-time hide"><span class="se-selected-type"></span><div class="timer-pop-up hide"><div class="timer-start-section"><div class="timer-label">').f(t.getPath(!1,["wizPlayer","startTime"]),t,"h").w('</div><input type="text" class="timer-start-input"><div class="timer-arrow-section"><div class="arrow up-arrow timer-input-btn timer-start-btn-plus"></div><div class="arrow down-arrow timer-input-btn timer-start-btn-minus"></div></div></div><div class="timer-stop-section"><div class="timer-label">').f(t.getPath(!1,["wizPlayer","stopTime"]),t,"h").w('</div><input type="text" class="timer-stop-input"><div class="timer-arrow-section"><div class="arrow up-arrow timer-input-btn timer-stop-btn-plus"></div><div class="arrow down-arrow timer-input-btn timer-stop-btn-minus"></div></div></div><div class="timer-div-arrow"></div></div></div></div><div class="notification-line"></div><div class="cta-indicator hide"><div id="ctaIndicatorInner" class="cta-indicator-inner"></div></div><div id="chapterIndicatorId" class="hp-indicator hide"></div><div class="player-progress"><div class="click-area-extended"></div></div><span class="player-currenttime"></span>').x(t.get(["showReactions"],!1),t,{block:P},{}).x(t.get(["canPlayerLogoView"],!1),t,{block:I},{}).w('<div class="actions-container pull-right">').x(t.get(["isContainsAudio"],!1),t,{else:L,block:U},{}).x(t.get(["showSpeedSettings"],!1),t,{block:B},{}).x(t.get(["qualityControl"],!1),t,{block:V},{}).x(t.get(["subtitlesEnabled"],!1),t,{block:z},{}).x(t.get(["fullscreenControl"],!1),t,{block:H},{}).x(t.get(["allowDownload"],!1),t,{block:j},{}).w('</div></div><div class="notification-line-onplay"></div><div class="player-progress for-reactions"><div class="click-area-extended"></div></div><div id="ctaPlayerComps" class="cta-player-comps hide"></div><div id="ctaPlayerAddComp" class="cta-player-add-container hide"></div>')}function k(e,t){return e.w(" canvas-preview-with-comment ")}function x(e,t){return e.w('<div class="preview-add-comment" id="addCommentFromCanvas"><img src="/svg/icon-discussions.svg" /> ').f(t.getPath(!1,["wizPlayer","addComments"]),t,"h").w("</div>")}function A(e,t){return e.w('<h6 class="set-frame-btn">').f(t.getPath(!1,["wizPlayer","setTheFrame"]),t,"h").w("</h6>")}function P(e,t){return e.w('<div class="emoji-wrap"><span><img class="react-now" reaction_id="1" id="reaction_id-1" src="/svg/emoji-type-1.svg" width="16"></span><span><img class="react-now" reaction_id="2" id="reaction_id-2" src="/svg/emoji-type-2.svg" width="16"></span><span><img class="react-now" reaction_id="3" id="reaction_id-3" src="/svg/emoji-type-3.svg" width="16"></span><span><img class="react-now" reaction_id="4" id="reaction_id-4" src="/svg/emoji-type-4.svg" width="16"></span><span><img class="react-now" reaction_id="5" id="reaction_id-5" src="/svg/emoji-type-5.svg" width="16"></span><span><img class="react-now" reaction_id="6" id="reaction_id-6" src="/svg/emoji-type-6.svg" width="16"></span></div>')}function I(e,t){return e.w('<div class="player-logo pull-right">').x(t.get(["playerLogo"],!1),t,{else:R,block:D},{}).w("</div>")}function R(e,t){return e.w('<a href="https://www.hippovideo.io/" target="_blank" class="brand-logo"><img src="/svg/hippo-player-logo.svg" alt="logo" /></a>')}function D(e,t){return e.w("<a ").x(t.get(["addLinkToPlayerLogo"],!1),t,{block:O},{}).w(' target="_blank" class="brand-logo"><img src="').f(t.get(["playerLogo"],!1),t,"h").w('" alt="logo" /></a>')}function O(e,t){return e.x(t.get(["playerLogoLink"],!1),t,{block:N},{})}function N(e,t){return e.w('href="').f(t.get(["playerLogoLink"],!1),t,"h").w('"')}function L(e,t){return e.x(t.get(["isLessonly"],!1),t,{else:M,block:F},{})}function M(e,t){return e.w('<span class="no-audio-box"><img class="audio-img mute player-volume" src="/svg/no-audio-mute.svg" alt="volume" width="15" /><div class="no-audio-pop">This video has no audio</div></span>')}function F(e,t){return e.w('<span class="player-audio controls-btn" id="videoVolumeBtn"><img class="audio-img high player-volume" src="/svg/volume-high.svg" alt="volume" /><div class="volume-container" style="display: none;"><div class="player-audio-slider"></div></div></span>')}function U(e,t){return e.w('<span class="player-audio controls-btn" id="videoVolumeBtn"><img class="audio-img high player-volume" src="/svg/volume-high.svg" alt="volume" /><div class="volume-container" style="display: none;"><div class="player-audio-slider"></div></div></span>')}function B(e,t){return e.w('<span class="controls-btn video-speed-btn"><span class="player-speed-label" style="color: white">1X</span><div class="quality-container" style="display: none;"><ul class="quality-list"><li data-id="0.5">0.5X</li><li data-id="1" class="active">1X</li><li data-id="1.5">1.5X</li><li data-id="2">2X</li><li data-id="5">5X</li></ul></div></span>')}function V(e,t){return e.w('<span class="player-quality controls-btn" id="videoQualityBtn"><img class="player-quality-icon" src="/svg/setting-white.svg" alt="quality" /><div class="quality-container" style="display: none;"><ul class="quality-list"></ul></div></span>')}function z(e,t){return e.w('<span class="player-subtitle controls-btn" id="videoSubtitleBtn"><img class="player-subtitle-icon" src="/img/subtitle-cc.png" alt="subtitle" /></span>')}function H(e,t){return e.w('<span class="player-fullscreen controls-btn" id="videoFullscreenBtn"><img class="player-fullscreen-icon" src="/svg/fullscreen.svg" alt="fullscreen" /></span>')}function j(e,t){return e.w('<span class="player-download controls-btn" id="videoDownloadBtn"><img class="player-download-icon" src="/svg/download-white.svg" alt="download" /></span>')}function q(e,t){return e.w(" ").h("eq",t,{},{value:0},"h").w(" ").h("eq",t,{},{value:3},"h").w(" ").h("eq",t,{},{value:4},"h").w(" ").h("any",t,{block:G},{},"h").w(" ")}function G(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/access-denied.svg"><h3>').h("eq",t,{else:W,block:$},{key:t.get(["privacy"],!1),value:3},"h").w("</h3></div>")}function W(e,t){return e.f(t.getPath(!1,["wizPlayer","permissionToView"]),t,"h")}function $(e,t){return e.f(t.getPath(!1,["wizPlayer","watchExpired"]),t,"h")}function Y(e,t){return e.w(" ").h("eq",t,{},{value:5},"h").w(" ").h("eq",t,{},{value:6},"h").w(" ").h("any",t,{block:K},{},"h").w(" ")}function K(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","accountDeactivated"]),t,"h").w("</h3></div>")}function J(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","limitExceeded"]),t,"h").w('</h3><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","contactOwner"]),t,"h").w("</h3></div>")}function X(e,t){return e.w('<div class="medium-12 columns password-pop text-center"><img class="lock-icon" style="width: 80px;height: 80px;" src="/svg/password-lock.svg"><div class="small-4 columns large-centered small-centered"><input type="password" class="form-control password-holder vdoPlayerPwdField" placeholder="').f(t.getPath(!1,["wizPlayer","enterPassword"]),t,"h").w('"><span class="pwd-error hide">').f(t.getPath(!1,["wizPlayer","passwordInvalid"]),t,"h").w('</span><a class="button wiz-overlay-btn passwordGoBtn">').f(t.getPath(!1,["wizPlayer","go"]),t,"h").w("</a></div></div>")}function Q(e,t){return e.x(t.get(["showReactions"],!1),t,{block:Z},{})}function Z(e,t){return e.w('<div class="emoji-wrap-onplay"><span><img class="react-now-play" reaction_id="1" id="reaction_id-1" src="/svg/emoji-type-1.svg" width="16"></span><span><img class="react-now-play" reaction_id="2" id="reaction_id-2" src="/svg/emoji-type-2.svg" width="16"></span><span><img class="react-now-play" reaction_id="3" id="reaction_id-3" src="/svg/emoji-type-3.svg" width="16"></span><span><img class="react-now-play" reaction_id="4" id="reaction_id-4" src="/svg/emoji-type-4.svg" width="16"></span><span><img class="react-now-play" reaction_id="5" id="reaction_id-5" src="/svg/emoji-type-5.svg" width="16"></span><span><img class="react-now-play" reaction_id="6" id="reaction_id-6" src="/svg/emoji-type-6.svg" width="16"></span></div>')}function ee(e,t){return e.w('<div class="hippo-video-player" id=').f(t.get(["id"],!1),t,"h").w('><div id="personalisedVideoLoading" class="personalised-video-loading-page" style="display: block;"><div class="loader-wrap"><div class="rp-loader"></div></div></div></div>')}function te(e,t){return e.w('<div class="hippo-video-player" id=').f(t.get(["id"],!1),t,"h").w(">").h("select",t,{block:ie},{key:t.get(["privacy"],!1)},"h").w(" ").h("select",t,{block:ae},{key:t.get(["privacy"],!1)},"h").w(" ").h("eq",t,{block:le},{key:t.get(["privacy"],!1),value:7},"h").w(" ").h("eq",t,{block:ue},{key:t.get(["privacy"],!1),value:2},"h").w("</div>")}function ie(e,t){return e.w(" ").h("eq",t,{},{value:0},"h").w(" ").h("eq",t,{},{value:3},"h").w(" ").h("eq",t,{},{value:4},"h").w(" ").h("any",t,{block:ne},{},"h").w(" ")}function ne(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/access-denied.svg"><h3>').h("eq",t,{else:re,block:oe},{key:t.get(["privacy"],!1),value:3},"h").w("</h3></div>")}function re(e,t){return e.f(t.getPath(!1,["wizPlayer","permissionToView"]),t,"h")}function oe(e,t){return e.f(t.getPath(!1,["wizPlayer","watchExpired"]),t,"h")}function ae(e,t){return e.w(" ").h("eq",t,{},{value:5},"h").w(" ").h("eq",t,{},{value:6},"h").w(" ").h("any",t,{block:se},{},"h").w(" ")}function se(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","accountDeactivated"]),t,"h").w("</h3></div>")}function le(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","limitExceeded"]),t,"h").w('</h3><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","contactOwner"]),t,"h").w("</h3></div>")}function ue(e,t){return e.w('<div class="medium-12 columns password-pop text-center"><img class="lock-icon" style="width: 80px;height: 80px;" src="/svg/password-lock.svg"><div class="small-4 columns large-centered small-centered"><input type="password" class="form-control password-holder vdoPlayerPwdField" placeholder="').f(t.getPath(!1,["wizPlayer","enterPassword"]),t,"h").w('"><span class="pwd-error hide">').f(t.getPath(!1,["wizPlayer","passwordInvalid"]),t,"h").w('</span><a class="button wiz-overlay-btn passwordGoBtn">').f(t.getPath(!1,["wizPlayer","go"]),t,"h").w("</a></div></div>")}e.register("templates/component/videoplayer",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0,I.__dustBody=!0,R.__dustBody=!0,D.__dustBody=!0,O.__dustBody=!0,N.__dustBody=!0,L.__dustBody=!0,M.__dustBody=!0,F.__dustBody=!0,U.__dustBody=!0,B.__dustBody=!0,V.__dustBody=!0,z.__dustBody=!0,H.__dustBody=!0,j.__dustBody=!0,q.__dustBody=!0,G.__dustBody=!0,W.__dustBody=!0,$.__dustBody=!0,Y.__dustBody=!0,K.__dustBody=!0,J.__dustBody=!0,X.__dustBody=!0,Q.__dustBody=!0,Z.__dustBody=!0,ee.__dustBody=!0,te.__dustBody=!0,ie.__dustBody=!0,ne.__dustBody=!0,re.__dustBody=!0,oe.__dustBody=!0,ae.__dustBody=!0,se.__dustBody=!0,le.__dustBody=!0,ue.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/videoplayer",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.x(t.get(["isPrivacy"],!1),t,{else:i,block:te},{})}function i(e,t){return e.x(t.get(["initial"],!1),t,{else:n,block:ee},{})}function n(e,t){return e.w('<div class="hippo-video-player new-sdk" id=').f(t.get(["id"],!1),t,"h").w('><div class="se-crop-scale">\x3c!-- <canvas class="blurred-bg-video" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;filter: blur(20px);-webkit-filter: blur(20px);transform: scale(1.2);"></canvas> --\x3e<div class="primary-video-overflow-container"><div class="primary-video-container">').x(t.get(["isImageMode"],!1),t,{else:r,block:f},{}).w("</div></div>").nx(t.get(["isImageMode"],!1),t,{block:g},{}).w('<canvas class="renderless-overlay" style="position: absolute;width: 100%;height: 100%"></canvas></div>').nx(t.get(["isImageMode"],!1),t,{block:v},{}).w('<div id="personalizeChapterId" class="hp-menu-tog hide"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/hamburger-white.svg" width="16"></div><div id="personalizeChaptersListId" class="hp-tog-content hide"><a class="chapter-close" id="chapterCloseId"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/close-gray.svg" width="10"></a><br><div id="chaptersListId"></div></div><div class="error-overlay hide" style="position:absolute;width:100%;height:100%;background: rgba(0,0,0,0.2);z-index:2;background-repeat: no-repeat;background-size: contain;"><div class="error-reason-div"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/warning.svg" class="status-warning" /><div class="error-reason"></div></div></div><div class="player-touch-guard"></div>').nx(t.get(["isImageMode"],!1),t,{block:C},{}).h("select",t,{block:q},{key:t.get(["privacy"],!1)},"h").w(" ").h("select",t,{block:Y},{key:t.get(["privacy"],!1)},"h").w(" ").h("eq",t,{block:J},{key:t.get(["privacy"],!1),value:7},"h").w(" ").h("eq",t,{block:X},{key:t.get(["privacy"],!1),value:2},"h").w("</div>").nx(t.get(["isImageMode"],!1),t,{block:Q},{})}function r(e,t){return e.x(t.get(["isAudioOnly"],!1),t,{block:o},{}).w('<video class="primary-video" id="primary-video" crossorigin="anonymous" controls playsinline>').h("eq",t,{block:l},{key:t.get(["type"],!1),value:"url"},"h").w("Your browser does not support the video tag.").x(t.get(["subtitlesEnabled"],!1),t,{block:c},{}).w('</video><canvas class="se-effects-canvas"></canvas><div class="se-effects-components-container"></div>').x(t.get(["showSetFrame"],!1),t,{block:p},{})}function o(e,t){return e.w("<div>").x(t.get(["isLessonly"],!1),t,{else:a,block:s},{}).w("</div>")}function a(e,t){return e.w('<img src="').f(t.get(["origin"],!1),t,"h").w('/img/onlyaudio.jpg" style="width:100%;height:100%" />')}function s(e,t){return e.w('<img src="').f(t.get(["origin"],!1),t,"h").w('/img/onlyaudio_lessonly.jpg" style="width:100%;height:100%" />')}function l(e,t){return e.w(" <source ").x(t.get(["addSourceAudioType"],!1),t,{block:u},{}).w(' crossorigin="anonymous" src=').f(t.get(["src"],!1),t,"h").w(">")}function u(e,t){return e.w(' type="audio/mp3" ')}function c(e,t){return e.x(t.get(["subtitlesFromServer"],!1),t,{else:d,block:h},{})}function d(e,t){return e.w('<track label="English" kind="subtitles" id="subtitleTrack" srclang="eng" src="').f(t.get(["subtitles"],!1),t,"h").w('" default="">')}function h(e,t){return e.w('<track label="English" kind="subtitles" id="subtitleTrack" srclang="eng" src="').f(t.get(["domain"],!1),t,"h").w("/video_delivery/subtitles/").f(t.get(["token"],!1),t,"h").w('" default="">')}function p(e,t){return e.w('<video class="hidden-video" controls playsinline crossorigin="anonymous" style="display: none;"><source crossorigin="anonymous" src=').f(t.get(["src"],!1),t,"h").w(">").f(t.getPath(!1,["wizPlayer","browserDoesNotSupport"]),t,"h").w("</video>")}function f(e,t){return e.w('<img src="').f(t.get(["src"],!1),t,"h").w('" class="primary-video" id="gifImage" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;">')}function g(e,t){return e.nx(t.get(["isDelivery"],!1),t,{block:m},{})}function m(e,t){return e.w('<div class="secondary-video-overflow-container"><div class="secondary-video-container"><video class="secondary-video" crossorigin="anonymous" ><source crossorigin="anonymous" src=').f(t.get(["audioSrc"],!1),t,"h").w('></video></div></div><textarea id="seTextEditable" class="se-text-editable custom-scroll hide" spellcheck="false" placeholder="Enter text here"></textarea><div class="se-components-container"></div><div class="se-crop-resizable hide"></div><div class="se-crop-highlighter se-crop-highlighter-top"></div><div class="se-crop-highlighter se-crop-highlighter-left"></div><div class="se-crop-highlighter se-crop-highlighter-bottom"></div><div class="se-crop-highlighter se-crop-highlighter-right"></div>')}function v(e,t){return e.w('<div class="se-components-droppable"></div><div class="player-border"></div>').x(t.get(["thumbnail"],!1),t,{block:y},{}).w('<div class="play-btn-container full-screen-container"><div class="play-center-ico text-center"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/play.svg"></div>').x(t.get(["previewVideo"],!1),t,{block:w},{}).w('</div><div class="replay-btn-container full-screen-container hide"><img src="').f(t.get(["origin"],!1),t,"h").w('/img/videoreplay.png" style="width: 20%; display: block; position: relative;top: 30%;margin:auto;z-index:100;"></div><div class="player-loading-overlay full-screen-container hide"><div><img src="').f(t.get(["origin"],!1),t,"h").w('/img/videoloading.gif"></div></div>').x(t.get(["isLandingPageVideo"],!1),t,{else:E,block:_},{}).x(t.get(["isMutedAutoPlay"],!1),t,{block:S},{}).x(t.get(["showHoverActions"],!1),t,{block:T},{})}function y(e,t){return e.nx(t.get(["isAudioOnly"],!1),t,{block:b},{})}function b(e,t){return e.w('<div class="thumbnail-container full-screen-container" style="position:absolute;width:100%;height:100%;cursor: pointer;z-index:1"><img src="').f(t.get(["thumbnail"],!1),t,"h").w('" id="playerThumbnail" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;" onerror="this.style.display=\'none\'"></div>')}function w(e,t){return e.w('<video src="').f(t.get(["previewVideo"],!1),t,"h").w('" crossorigin="anonymous" autoplay muted loop />')}function E(e,t){return e.w('<div id="personalisedVideoLoading" class="personalised-video-loading"><div class="inner-container"><center><div class="bar-loading"><div></div><div></div><div></div><div></div></div></center></div></div>')}function _(e,t){return e.w('<div id="personalisedVideoLoading" class="personalised-video-loading-page"><div class="loader-wrap"><div class="rp-loader"></div></div></div>')}function S(e,t){return e.w('<div class="player-info muted-autoplay cursor-pointer hide"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/mute.svg" alt="volume" /> ').f(t.getPath(!1,["wizPlayer","clickToUnmute"]),t,"h").w("</div>")}function T(e,t){return e.w('<div class="player-actions-container full-screen-container hide"><div class="player-actions text-center"><span class="player-action player-rewind-action"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/rewind.svg" alt="Rewind" /></span><span class="player-action player-play-pause-action"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/play.svg" alt="Play/Pause" /></span><span class="player-action player-forward-action"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/forward.svg" alt="Forward" /></span></div></div>')}function C(e,t){return e.w('<div class="canvas-preview-container ').x(t.get(["showComments"],!1),t,{block:k},{}).w('" id="canvasPreviewContainer" style="display:none;"><canvas class="quickpreview-canvas" width=128 height=72></canvas>').x(t.get(["showComments"],!1),t,{block:x},{}).x(t.get(["showSetFrame"],!1),t,{block:A},{}).w('<input type="hidden" id="canvasHoverTime" /></div><div class="subtitles-line" id="subtitlesTrack"></div><div class="player-controls-container player-controls-inside"><a class="play-pause-button" id="pauseAndPlayBtn"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/play.svg"></a><div class="components-marker-container"></div><div class="components-time-container"><div class="se-clip-time hide"><span class="se-selected-type"></span><div class="timer-pop-up hide"><div class="timer-start-section"><div class="timer-label">').f(t.getPath(!1,["wizPlayer","startTime"]),t,"h").w('</div><input type="text" class="timer-start-input"><div class="timer-arrow-section"><div class="arrow up-arrow timer-input-btn timer-start-btn-plus"></div><div class="arrow down-arrow timer-input-btn timer-start-btn-minus"></div></div></div><div class="timer-stop-section"><div class="timer-label">').f(t.getPath(!1,["wizPlayer","stopTime"]),t,"h").w('</div><input type="text" class="timer-stop-input"><div class="timer-arrow-section"><div class="arrow up-arrow timer-input-btn timer-stop-btn-plus"></div><div class="arrow down-arrow timer-input-btn timer-stop-btn-minus"></div></div></div><div class="timer-div-arrow"></div></div></div></div><div class="notification-line"></div><div class="cta-indicator hide"><div id="ctaIndicatorInner" class="cta-indicator-inner"></div></div><div id="chapterIndicatorId" class="hp-indicator hide"></div><div class="player-progress"><div class="click-area-extended"></div></div><span class="player-currenttime"></span>').x(t.get(["showReactions"],!1),t,{block:P},{}).x(t.get(["canPlayerLogoView"],!1),t,{block:I},{}).w('<div class="actions-container pull-right">').x(t.get(["isContainsAudio"],!1),t,{else:L,block:U},{}).x(t.get(["showSpeedSettings"],!1),t,{block:B},{}).x(t.get(["qualityControl"],!1),t,{block:V},{}).x(t.get(["subtitlesEnabled"],!1),t,{block:z},{}).x(t.get(["fullscreenControl"],!1),t,{block:H},{}).x(t.get(["allowDownload"],!1),t,{block:j},{}).w('</div></div><div class="notification-line-onplay"></div><div class="player-progress for-reactions"><div class="click-area-extended"></div></div><div id="ctaPlayerComps" class="cta-player-comps hide"></div><div id="ctaPlayerAddComp" class="cta-player-add-container hide"></div>')}function k(e,t){return e.w(" canvas-preview-with-comment ")}function x(e,t){return e.w('<div class="preview-add-comment" id="addCommentFromCanvas"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/icon-discussions.svg" /> ').f(t.getPath(!1,["wizPlayer","addComments"]),t,"h").w("</div>")}function A(e,t){return e.w('<h6 class="set-frame-btn">').f(t.getPath(!1,["wizPlayer","setTheFrame"]),t,"h").w("</h6>")}function P(e,t){return e.w('<div class="emoji-wrap"><span><img class="react-now" reaction_id="1" id="reaction_id-1" src="').f(t.get(["origin"],!1),t,"h").w('/emoji-type-1.svg" width="16"></span><span><img class="react-now" reaction_id="2" id="reaction_id-2" src="').f(t.get(["origin"],!1),t,"h").w('/svg/emoji-type-2.svg" width="16"></span><span><img class="react-now" reaction_id="3" id="reaction_id-3" src="').f(t.get(["origin"],!1),t,"h").w('/svg/emoji-type-3.svg" width="16"></span><span><img class="react-now" reaction_id="4" id="reaction_id-4" src="').f(t.get(["origin"],!1),t,"h").w('/svg/emoji-type-4.svg" width="16"></span><span><img class="react-now" reaction_id="5" id="reaction_id-5" src="').f(t.get(["origin"],!1),t,"h").w('/svg/emoji-type-5.svg" width="16"></span><span><img class="react-now" reaction_id="6" id="reaction_id-6" src="').f(t.get(["origin"],!1),t,"h").w('/svg/emoji-type-6.svg" width="16"></span></div>')}function I(e,t){return e.w('<div class="player-logo pull-right">').x(t.get(["playerLogo"],!1),t,{else:R,block:D},{}).w("</div>")}function R(e,t){return e.w('<a href="https://www.hippovideo.io/" target="_blank" class="brand-logo"><img src="').f(t.get(["origin"],!1),t,"h").w('/svg/hippo-player-logo.svg" alt="logo" /></a>')}function D(e,t){return e.w("<a ").x(t.get(["addLinkToPlayerLogo"],!1),t,{block:O},{}).w(' target="_blank" class="brand-logo"><img src="').f(t.get(["playerLogo"],!1),t,"h").w('" alt="logo" /></a>')}function O(e,t){return e.x(t.get(["playerLogoLink"],!1),t,{block:N},{})}function N(e,t){return e.w('href="').f(t.get(["playerLogoLink"],!1),t,"h").w('"')}function L(e,t){return e.x(t.get(["isLessonly"],!1),t,{else:M,block:F},{})}function M(e,t){return e.w('<span class="no-audio-box"><img class="audio-img mute player-volume" src="').f(t.get(["origin"],!1),t,"h").w('/svg/no-audio-mute.svg" alt="volume" width="15" /><div class="no-audio-pop">This video has no audio</div></span>')}function F(e,t){return e.w('<span class="player-audio controls-btn" id="videoVolumeBtn"><img class="audio-img high player-volume" src="').f(t.get(["origin"],!1),t,"h").w('/svg/volume-high.svg" alt="volume" /><div class="volume-container" style="display: none;"><div class="player-audio-slider"></div></div></span>')}function U(e,t){return e.w('<span class="player-audio controls-btn" id="videoVolumeBtn"><img class="audio-img high player-volume" src="').f(t.get(["origin"],!1),t,"h").w('/svg/volume-high.svg" alt="volume" /><div class="volume-container" style="display: none;"><div class="player-audio-slider"></div></div></span>')}function B(e,t){return e.w('<span class="controls-btn video-speed-btn"><span class="player-speed-label" style="color: white">1X</span><div class="quality-container" style="display: none;"><ul class="quality-list"><li data-id="0.5">0.5X</li><li data-id="1" class="active">1X</li><li data-id="1.5">1.5X</li><li data-id="2">2X</li><li data-id="5">5X</li></ul></div></span>')}function V(e,t){return e.w('<span class="player-quality controls-btn" id="videoQualityBtn"><img class="player-quality-icon" src="').f(t.get(["origin"],!1),t,"h").w('/svg/setting-white.svg" alt="quality" /><div class="quality-container" style="display: none;"><ul class="quality-list"></ul></div></span>')}function z(e,t){return e.w('<span class="player-subtitle controls-btn" id="videoSubtitleBtn"><img class="player-subtitle-icon" src="').f(t.get(["origin"],!1),t,"h").w('/img/subtitle-cc.png" alt="subtitle" /></span>')}function H(e,t){return e.w('<span class="player-fullscreen controls-btn" id="videoFullscreenBtn"><img class="player-fullscreen-icon" src="').f(t.get(["origin"],!1),t,"h").w('/svg/fullscreen.svg" alt="fullscreen" /></span>')}function j(e,t){return e.w('<span class="player-download controls-btn" id="videoDownloadBtn"><img class="player-download-icon" src="').f(t.get(["origin"],!1),t,"h").w('/svg/download-white.svg" alt="download" /></span>')}function q(e,t){return e.w(" ").h("eq",t,{},{value:0},"h").w(" ").h("eq",t,{},{value:3},"h").w(" ").h("eq",t,{},{value:4},"h").w(" ").h("any",t,{block:G},{},"h").w(" ")}function G(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="').f(t.get(["origin"],!1),t,"h").w('/svg/access-denied.svg"><h3>').h("eq",t,{else:W,block:$},{key:t.get(["privacy"],!1),value:3},"h").w("</h3></div>")}function W(e,t){return e.f(t.getPath(!1,["wizPlayer","permissionToView"]),t,"h")}function $(e,t){return e.f(t.getPath(!1,["wizPlayer","watchExpired"]),t,"h")}function Y(e,t){return e.w(" ").h("eq",t,{},{value:5},"h").w(" ").h("eq",t,{},{value:6},"h").w(" ").h("any",t,{block:K},{},"h").w(" ")}function K(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="').f(t.get(["origin"],!1),t,"h").w('/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","accountDeactivated"]),t,"h").w("</h3></div>")}function J(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="').f(t.get(["origin"],!1),t,"h").w('/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","limitExceeded"]),t,"h").w('</h3><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","contactOwner"]),t,"h").w("</h3></div>")}function X(e,t){return e.w('<div class="medium-12 columns password-pop text-center"><img class="lock-icon" style="width: 80px;height: 80px;" src="').f(t.get(["origin"],!1),t,"h").w('/svg/password-lock.svg"><div class="small-4 columns large-centered small-centered"><input type="password" class="form-control password-holder vdoPlayerPwdField" placeholder="').f(t.getPath(!1,["wizPlayer","enterPassword"]),t,"h").w('"><span class="pwd-error hide">').f(t.getPath(!1,["wizPlayer","passwordInvalid"]),t,"h").w('</span><a class="button wiz-overlay-btn passwordGoBtn">').f(t.getPath(!1,["wizPlayer","go"]),t,"h").w("</a></div></div>")}function Q(e,t){return e.x(t.get(["showReactions"],!1),t,{block:Z},{})}function Z(e,t){return e.w('<div class="emoji-wrap-onplay"><span><img class="react-now-play" reaction_id="1" id="reaction_id-1" src="').f(t.get(["origin"],!1),t,"h").w('/emoji-type-1.svg" width="16"></span><span><img class="react-now-play" reaction_id="2" id="reaction_id-2" src="').f(t.get(["origin"],!1),t,"h").w('/svg/emoji-type-2.svg" width="16"></span><span><img class="react-now-play" reaction_id="3" id="reaction_id-3" src="').f(t.get(["origin"],!1),t,"h").w('/svg/emoji-type-3.svg" width="16"></span><span><img class="react-now-play" reaction_id="4" id="reaction_id-4" src="').f(t.get(["origin"],!1),t,"h").w('/svg/emoji-type-4.svg" width="16"></span><span><img class="react-now-play" reaction_id="5" id="reaction_id-5" src="').f(t.get(["origin"],!1),t,"h").w('/svg/emoji-type-5.svg" width="16"></span><span><img class="react-now-play" reaction_id="6" id="reaction_id-6" src="').f(t.get(["origin"],!1),t,"h").w('/svg/emoji-type-6.svg" width="16"></span></div>')}function ee(e,t){return e.w('<div class="hippo-video-player new-sdk" id=').f(t.get(["id"],!1),t,"h").w('><div id="personalisedVideoLoading" class="personalised-video-loading-page" style="display: block;"><div class="loader-wrap"><div class="rp-loader"></div></div></div></div>')}function te(e,t){return e.w('<div class="hippo-video-player new-sdk" id=').f(t.get(["id"],!1),t,"h").w(">").h("select",t,{block:ie},{key:t.get(["privacy"],!1)},"h").w(" ").h("select",t,{block:ae},{key:t.get(["privacy"],!1)},"h").w(" ").h("eq",t,{block:le},{key:t.get(["privacy"],!1),value:7},"h").w(" ").h("eq",t,{block:ue},{key:t.get(["privacy"],!1),value:2},"h").w("</div>")}function ie(e,t){return e.w(" ").h("eq",t,{},{value:0},"h").w(" ").h("eq",t,{},{value:3},"h").w(" ").h("eq",t,{},{value:4},"h").w(" ").h("any",t,{block:ne},{},"h").w(" ")}function ne(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="').f(t.get(["origin"],!1),t,"h").w('/svg/access-denied.svg"><h3>').h("eq",t,{else:re,block:oe},{key:t.get(["privacy"],!1),value:3},"h").w("</h3></div>")}function re(e,t){return e.f(t.getPath(!1,["wizPlayer","permissionToView"]),t,"h")}function oe(e,t){return e.f(t.getPath(!1,["wizPlayer","watchExpired"]),t,"h")}function ae(e,t){return e.w(" ").h("eq",t,{},{value:5},"h").w(" ").h("eq",t,{},{value:6},"h").w(" ").h("any",t,{block:se},{},"h").w(" ")}function se(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="').f(t.get(["origin"],!1),t,"h").w('/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","accountDeactivated"]),t,"h").w("</h3></div>")}function le(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="').f(t.get(["origin"],!1),t,"h").w('/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","limitExceeded"]),t,"h").w('</h3><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","contactOwner"]),t,"h").w("</h3></div>")}function ue(e,t){return e.w('<div class="medium-12 columns password-pop text-center"><img class="lock-icon" style="width: 80px;height: 80px;" src="').f(t.get(["origin"],!1),t,"h").w('/svg/password-lock.svg"><div class="small-4 columns large-centered small-centered"><input type="password" class="form-control password-holder vdoPlayerPwdField" placeholder="').f(t.getPath(!1,["wizPlayer","enterPassword"]),t,"h").w('"><span class="pwd-error hide">').f(t.getPath(!1,["wizPlayer","passwordInvalid"]),t,"h").w('</span><a class="button wiz-overlay-btn passwordGoBtn">').f(t.getPath(!1,["wizPlayer","go"]),t,"h").w("</a></div></div>")}e.register("templates/component/sdk_videoplayer",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0,I.__dustBody=!0,R.__dustBody=!0,D.__dustBody=!0,O.__dustBody=!0,N.__dustBody=!0,L.__dustBody=!0,M.__dustBody=!0,F.__dustBody=!0,U.__dustBody=!0,B.__dustBody=!0,V.__dustBody=!0,z.__dustBody=!0,H.__dustBody=!0,j.__dustBody=!0,q.__dustBody=!0,G.__dustBody=!0,W.__dustBody=!0,$.__dustBody=!0,Y.__dustBody=!0,K.__dustBody=!0,J.__dustBody=!0,X.__dustBody=!0,Q.__dustBody=!0,Z.__dustBody=!0,ee.__dustBody=!0,te.__dustBody=!0,ie.__dustBody=!0,ne.__dustBody=!0,re.__dustBody=!0,oe.__dustBody=!0,ae.__dustBody=!0,se.__dustBody=!0,le.__dustBody=!0,ue.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/sdk_videoplayer",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";var n=i(8),r=i(59),o=i(39),a=i(55),s=n.RangeError;e.exports=function(e){var t=o(a(this)),i="",n=r(e);if(n<0||n==1/0)throw s("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(i+=t);return i}},function(e,t,i){"use strict";i.r(t);i(85),i(96),i(86),i(24),i(136),i(60),i(137);var n=i(98),r=i.n(n),o=i(36),a=i.n(o),s=i(37),l=i.n(s),u=(i(110),i(242),i(191)),c=i.n(u);function d(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function h(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?d(Object(i),!0).forEach((function(t){r()(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var p=function(){function e(t){var i=t.hlsInstance,n=t.statsJsonSeed;a()(this,e),this.hls=i,this.media=i.media,this.statsJsonSeed=n}return l()(e,[{key:"init",value:function(){this.initLogger(),this.HLSLogger&&this.setupMetrics()}},{key:"initLogger",value:function(){if(window.HippoVideo){var e=window.HippoVideo.Class,t=e.Level;this.generateStatConstants.call(this),this.HLSLogger=e.Logger.getLogger("[HLSAdapter]"),this.HLSLoggerLevel=t.INFO}}},{key:"generateStatConstants",value:function(){var e,t,i,n,r,o,a,s=(null===(e=window.HippoVideo)||void 0===e||null===(t=e.UserProfile)||void 0===t?void 0:t.tenantId)||null,l=(null===(i=window.HippoVideo)||void 0===i||null===(n=i.UserProfile)||void 0===n?void 0:n.userId)||null,u=null===(r=window.HippoVideo)||void 0===r?void 0:r.generateUniqueId(),c=!(null===(o=window.HippoVideo)||void 0===o||!o.isDelivery),d=null===(a=navigator.connection)||void 0===a?void 0:a.rtt;this.statsConstants=h(h({},this.statsJsonSeed),{},{tenant_id:s,user_id:l,session_id:u,isDelivery:c,rtt:d})}},{key:"setupMetrics",value:function(){var e=this;e.timeChart={done:!0},e.media.addEventListener("play",(function(){e.timeChart.playClickedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1})),e.hls.on(c.a.Events.FRAG_LOADED,(function(t,i){e.timeChart.firstFragLoadedAt||(e.timeChart.firstFragLoadedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1);try{e.timeChart.bandwidthConsumed||(e.timeChart.bandwidthConsumed=0),i&&i.frag&&i.frag.loaded&&(e.timeChart.bandwidthConsumed+=Number(i.frag.loaded))}catch(e){}})),e.hls.on(c.a.Events.LEVEL_SWITCHED,(function(){e.timeChart.levelSwitchedCount||(e.timeChart.levelSwitchedCount=0),e.timeChart.levelSwitchedCount++})),e.media.addEventListener("ended",(function(){e.timeChart.mediaEndedAt||(e.timeChart.mediaEndedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1)})),e.media.addEventListener("waiting",(function(){e.timeChart.mediaWaitingAtArr||(e.timeChart.mediaWaitingAtArr=[]),e.timeChart.mediaWaitingAtArr.push(Number(performance.now().toFixed(2)))})),e.media.addEventListener("playing",(function(){if(e.timeChart.mediaTimeLagArr||(e.timeChart.mediaTimeLagArr=[]),e.timeChart.mediaWaitingAtArr&&e.timeChart.mediaWaitingAtArr.length>e.timeChart.mediaTimeLagArr.length){var t=e.timeChart.mediaWaitingAtArr,i=t[t.length-1],n=Number(performance.now().toFixed(2));e.timeChart.mediaTimeLagArr.push(n-i),e.timeChart.mediaTimeLag=n-i}e.timeChart.done=!1})),e.media.addEventListener("seeked",(function(){e.timeChart.mediaSeekedAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1})),window.addEventListener("beforeunload",(function(){e.timeChart.windowUnloadAt=Number(performance.now().toFixed(2)),e.timeChart.done=!1,e.timeChartEval.call(e)})),setInterval((function(){e.timeChartEval()}),2e3)}},{key:"timeChartEval",value:function(){if(!this.timeChart.done){if(this.timeChart.playClickedAt&&(this.timeChart.firstFragLoadedAt&&(this.logg({metric_name:"time-to-first-frame",metric_value:Math.max(0,this.timeChart.firstFragLoadedAt-this.timeChart.playClickedAt)}),this.timeChart.videoStarted=!0,delete this.timeChart.playClickedAt),this.timeChart.videoPlayIntented=!0),this.timeChart.mediaEndedAt||this.timeChart.windowUnloadAt){var e;this.timeChart.levelSwitchedCount&&(this.logg({metric_name:"number-of-variant-changes",metric_value:this.timeChart.levelSwitchedCount}),delete this.timeChart.levelSwitchedCount),this.timeChart.mediaWaitingAtArr&&(this.logg({metric_name:"video-stalled-count",metric_value:this.timeChart.mediaWaitingAtArr.length}),delete this.timeChart.mediaWaitingAtArr),this.timeChart.bandwidthConsumed&&(this.logg({metric_name:"video-bandwidth-used",metric_value:this.timeChart.bandwidthConsumed}),delete this.timeChart.bandwidthConsumed),this.timeChart.videoPlayIntented&&!this.timeChart.videoStarted&&this.timeChart.windowUnloadAt&&this.logg({metric_name:"video-adandon-before-start",metric_value:this.timeChart.windowUnloadAt}),!this.timeChart.videoPlayIntented&&this.timeChart.windowUnloadAt&&this.logg({metric_name:"page-adandon-before-clicking-play",metric_value:this.timeChart.windowUnloadAt});var t=localStorage.getItem("hv-delivery-loaded");t&&null!==(e=this.statsJsonSeed)&&void 0!==e&&e.isDelivery&&(this.logg({metric_name:"hv-delivery-loaded",metric_value:t}),localStorage.removeItem("hv-delivery-loaded")),delete this.timeChart.mediaEndedAt,delete this.timeChart.windowUnloadAt}this.timeChart.mediaTimeLag&&(this.logg({metric_name:"video-stalled-time-to-resume",metric_value:this.timeChart.mediaTimeLag}),this.timeChart.mediaSeekedAt&&(this.logg({metric_name:"video-stalledBySeek-time-to-resume",metric_value:this.timeChart.mediaTimeLag}),delete this.timeChart.mediaSeekedAt),delete this.timeChart.mediaTimeLag),this.timeChart.done=!0}}},{key:"logg",value:function(e){var t=this.hls.currentLevel;this.HLSLogger.log(this.HLSLoggerLevel,"hlsPlayerMetrics",h(h(h({},this.statsConstants),e),{},{resolutionPlayed:t}))}}]),e}();t.default=p},function(e,t,i){var n,r;n=[i(2),i(10),i(35),i(7),i(11),i(631),i(140),i(342),i(343),i(344),i(189),i(346),i(327),i(20),i(243),i(138),i(139),i(73),i(115)],void 0===(r=function(e,t,i,n,r,o,a,s,l,u,c,d,h,p){return r=r.default,u=u.default,p=p.default,i.View.extend({template:o,initialize:function(i){i=t.extend({},n.getQueryParams(),i),this.id=i.id,this.src=i.src,this.parallelURLs=i.parallelURLs,this.type=null!=i.type?i.type:"url",this.title=i.title,this.controls=null==i.controls||parseBoolean(i.controls),this.loop=null!=i.loop&&parseBoolean(i.loop),this.initial=i.initial||!1,this.isPrivacy=i.isPrivacy||!1,this.statId=i.statId,this.audioSrc=i.audioSrc,this.isDelivery=null!=i.isDelivery&&i.isDelivery,this.analytics=null!=i.analytics&&i.analytics,this.userId=i.userId,this.primaryVideoLayout=i.primaryVideoLayout,this.secondaryVideoLayout=i.secondaryVideoLayout,this.showLogo=null==i.showLogo||i.showLogo,this.trimStart=i.trimStart?i.trimStart:0,this.trimEnd=i.trimEnd?i.trimEnd:0,this.duration=i.duration?i.duration:0,this.assetId=i.assetId,this.customlogo=i.customlogo,this.thumbnail=i.thumbnail,this.quickPreview=i.quickPreview,this.previewVideo=i.previewVideo,this.isMirrorWebCam=null==i.isMirrorWebCam||i.isMirrorWebCam,this.playAudio=null==i.playAudio||i.playAudio,this.playVideo=null==i.playVideo||i.playVideo,this.qualityControl=null==i.qualityControl||i.qualityControl,this.fullscreen=null!=i.fullscreen&&i.fullscreen,this.audioControl=null!=i.audioControl?i.audioControl:this.playAudio,this.fullscreenControl=null==i.fullscreenControl||i.fullscreenControl,this.simpleEditMode=null!=i.simpleEditMode&&i.simpleEditMode,this.showSpeedSettings=null!=i.showSpeedSettings&&i.showSpeedSettings,this.authorState=i.authorState,this.isError=i.isError,this.previousVolume=100,this.onPlayHandler=i.onPlayHandler?[i.onPlayHandler]:[],this.onPauseHandler=i.onPauseHandler?[i.onPauseHandler]:[],this.onSeekedHandler=i.onSeekedHandler,this.onSeekedHandlers=i.onSeekedHandlers?[i.onSeekedHandlers]:[],this.onSeekindHandler=i.onSeekindHandler,this.onLoadHandler=i.onLoadHandler,this.onProgressHandler=i.onProgressHandler,this.onDataLoadHandler=i.onDataLoadHandler,this.updateHandler=i.updateHandler,this.canplayHandler=i.canplayHandler,this.onComputedDurationHander=i.onComputedDurationHander,this.onEndHandler=i.onEndHandler?[i.onEndHandler]:[],this.onReplayHandlers=i.onReplayHandlers?[i.onReplayHandlers]:[],this.privacySetting=null!=i.privacy&&i.privacy,this.token=null!=i.token&&i.token,this.downloadVideo=i.downloadVideo,this.allowDownload=null!=i.allowDownload&&i.allowDownload,this.showComments=i.showComments,this.showReactions=i.showReactions,this.canShowDeliveryDownload=null!=i.deliveryDownload&&i.deliveryDownload,this.commentsCallbackHandler=i.commentsCallbackHandler||function(){},this.reactionsCallbackHandler=i.reactionsCallbackHandler||function(){},this.playerLogo=i.playerLogo,this.canShowAboutUs=i.canShowAboutUs,this.canPlayerLogoView=i.canPlayerLogoView,this.addLinkToPlayerLogo=i.addLinkToPlayerLogo,this.playerLogoLink=i.playerLogoLink,this.isImageMode=i.isImageMode||!1,this.showSetFrame=i.showSetFrame&&!i.isImageMode||!1,this.playerTheme=null!=i.playerTheme&&i.playerTheme,this.subtitlesEnabled=i.subtitlesEnabled||!1,this.subtitles=i.subtitleUrl,this.showHoverActions=void 0===i.showHoverActions||i.showHoverActions,this.customColors=i.customColors,this.allowKeyboardShortcuts=i.allowKeyboardShortcuts||!1,this.saveThisFrameAsThumbnail=function(){},this.isMobilePlayer=r.isMobileBrowser(),this.isIphone=null!=navigator.userAgent.match(/iPhone|iPad|iPod/i),this.autoPlayVideo=!!i.autoPlayVideo&&!this.isImageMode;var o=n.getBrowserName().toLowerCase();this.isMutedAutoPlay=this.autoPlayVideo&&("chrome"===o||"safari"===o||"firefox"===o),this.canShowPlayerLoading="ie"!==o,this.showPersonalisedVideoLoading=i.showPersonalisedVideoLoading||!1,this.personalisedVideoDetailsSet=!1,this.isLandingPageVideo=i.isLandingPageVideo||!1,this.domainName=i.domain||!1,this.subtitlesFromServer=!1,this.isContainsAudio=null==i.isContainsAudio||i.isContainsAudio,this.iosInBrowserFullScreen=null!=i.iosInBrowserFullScreen&&i.iosInBrowserFullScreen,i.forceAutoPlay&&(this.isMutedAutoPlay=!1),o=["Firefox","IE"],e.inArray(n.getBrowserName(),o)>=0&&(this.subtitlesFromServer=!0),this.customPlayIcon=i.customPlayIcon,this.playerState="initial",this.durationComputed=!1,this.allowPlay=!0,this.isCTAWaitingMode=!1,this._primaryVideoPlaying=!1,this._secondaryVideoPlaying=!1,this.isWating=!1,this.progressSlided=this.progressSlided.bind(this),this.volumeChanged=this.volumeChanged.bind(this),this._handleTimeupdate=this._handleTimeupdate.bind(this),this._handlePlay=this._handlePlay.bind(this),this._handlePause=this._handlePause.bind(this),this._handleProgress=this._handleProgress.bind(this),this._handlePlayerClick=this._handlePlayerClick.bind(this),this._handlePlayPauseBtnClick=this._handlePlayPauseBtnClick.bind(this),this._handleForwardBtnClick=this._handleForwardBtnClick.bind(this),this._handleRewindBtnClick=this._handleRewindBtnClick.bind(this),this._handleAudioBtnClick=this._handleAudioBtnClick.bind(this),this._handleFullscreenBtnClick=this._handleFullscreenBtnClick.bind(this),this._handleWaiting=this._handleWaiting.bind(this),this._handleResume=this._handleResume.bind(this),this._handleCanplay=this._handleCanplay.bind(this),this._handleHover=this._handleHover.bind(this),this._resolveHoverEvent=this._resolveHoverEvent.bind(this),this._handleEnded=this._handleEnded.bind(this),this._handleSeeked=this._handleSeeked.bind(this),this._handleSeeking=this._handleSeeking.bind(this),this._handleMetadataLoad=this._handleMetadataLoad.bind(this),this._handleDataLoad=this._handleDataLoad.bind(this),this._handleProgressBtnHover=this._handleProgressBtnHover.bind(this),this._handleProgressBtnLeave=this._handleProgressBtnLeave.bind(this),this._handleFullscreenChange=this._handleFullscreenChange.bind(this),this.resetPlayer=this.resetPlayer.bind(this),this.downloadVideoClick=this.downloadVideoClick.bind(this),this._handleCanvasMouseAction=this._handleCanvasMouseAction.bind(this),this.drawImageForPreview=this.drawImageForPreview.bind(this),this.seekAndChooseThumb=this.seekAndChooseThumb.bind(this),this.seekAndUpdateThumb=this.seekAndUpdateThumb.bind(this),this.toggleSubtitles=this.toggleSubtitles.bind(this),this._handleMutedAutoplayAudioClick=this._handleMutedAutoplayAudioClick.bind(this),this.getBandwidthConsumed=this.getBandwidthConsumed.bind(this),this.setStatId=this.setStatId.bind(this),this.getStatId=this.getStatId.bind(this),this.segmented=i.segmented,this.auth_params=i.auth_params||{},this.cueChanged=this.cueChanged.bind(this),this.deliveryDownload=this.deliveryDownload.bind(this),this.settingControl=this.qualityControl||this.showSpeedSettings||this.subtitlesEnabled,this.playing=!1,this.controlsEnabled=!0,this.clipboard=void 0,this.alive=!0},render:function(){if(this.$el.html(this.template(t.extend(s,{id:this.id,type:this.type,title:this.title,initial:this.initial,isPrivacy:this.isPrivacy,settingControl:this.settingControl,audioControl:this.audioControl,qualityControl:this.qualityControl,fullscreenControl:this.fullscreenControl,showLogo:this.showLogo,customlogo:this.customlogo,thumbnail:this.thumbnail,quickPreview:this.quickPreview,previewVideo:this.previewVideo,privacy:this.privacySetting,downloadVideo:this.downloadVideo,allowDownload:this.allowDownload,showComments:this.showComments,showSetFrame:this.showSetFrame,showReactions:this.showReactions,canShowDeliveryDownload:this.canShowDeliveryDownload,isImageMode:this.isImageMode,playerLogo:this.playerLogo,isMutedAutoPlay:this.isMutedAutoPlay,canPlayerLogoView:this.canPlayerLogoView,addLinkToPlayerLogo:this.addLinkToPlayerLogo,playerLogoLink:this.playerLogoLink,playerTheme:this.playerTheme,subtitlesEnabled:this.subtitlesEnabled,subtitles:this.subtitles,showHoverActions:this.showHoverActions,showSpeedSettings:this.showSpeedSettings,isLandingPageVideo:this.isLandingPageVideo,token:this.token,domain:window.location.protocol+"//"+window.location.hostname,subtitlesFromServer:this.subtitlesFromServer,isMobilePlayer:this.isMobilePlayer,isContainsAudio:this.isContainsAudio,controls:this.controls,loop:this.loop}))),this.renderState=!0,this.setElement(e("#"+this.id)),this.initial)return this.$el.height(9*this.$el.width()/16),void this.applyCustomColors();this.initializePlayer(),this.initializeNewPlayer(),this._delegateViewEvents(),this.setMediaSource(),this.initializePlayerJS(),-1!=["m3u8","mpd"].indexOf(this.type)&&this.initializeAdapter(),this.initializeCSS(),this.applyCustomColors(),this.applyCustomPlayIcon(),n.toggleWebcamForMirrorVideo(this.isMirrorWebCam,null!=this.audioSrc&&""!=this.audioSrc?this.$el.find(".secondary-video"):this.$el.find("#primary-video"));var i=window.location.href,r="";i.includes("/page/")&&!i.includes("/page/thumbnail/")?r=(r=i.replace("/page/","/page/thumbnail/")).includes("?")?r+"&is_play_time=true":r+"?is_play_time=true":i.includes("/play/")&&!i.includes("/thumbnail/")?r=(r=i.replace("/play/","/thumbnail/")).includes("?")?r+"&is_play_time=true":r+"?is_play_time=true":i.includes("/embed/")&&!i.includes("/thumbnail/")&&(r=i.replace("/embed/","/thumbnail/"),i=i.replace("/embed/","/play/"),this.$el.find(".hv-rclick-copy").hide()),this.copyWithThumbnail(i,r),this._handleVideoPreview()},update:function(t){var i=this;if(this.auth_params){var n=t.auth_params||{};for(var r in n)this.auth_params[r]=n[r]}else this.auth_params=t.auth_params||{};Object.keys(t).forEach((function(e){null!=t[e]&&(i[e]=t[e])})),t.showPersonalisedVideoLoading&&this.$el.find("#personalisedVideoLoading").show(),t.previewVideo?(this.$el.find(".play-btn-container video").attr("src",t.previewVideo),this._handleVideoPreview()):t.thumbnail&&this.$el.find("#playerThumbnail").attr("src",t.thumbnail),e("#qualityConrols")[this.qualityControl?"show":"hide"](),this.settingControl=this.qualityControl||this.showSpeedSettings||this.subtitlesEnabled,e(".settings-container")[this.settingControl?"show":"hide"](),this.hideSettingControlsIfPossible(),this.setMediaSource(),-1!=["m3u8","mpd"].indexOf(this.type)&&this.initializeAdapter()},_handlePlayPauseForNewPlayer:function(){for(var t=this,i=t.$el.find(".final-plybtn-click"),n=0;n<i.length;n++)i[n]&&r(i[n]);function r(i){e(i).children(".solidply")[t.playing?"addClass":"removeClass"]("solidpause"),e(i).children(".playbutton")[t.playing?"addClass":"removeClass"]("paused"),e(i).children(".playbutton").hasClass("paused")?e(i).find(".playthreepath").attr("d","M16,23 L16,1 L1,1 L1,23 L16,23 Z"):e(i).find(".playthreepath").attr("d","M1,1.618034 L1,1.618034 L21.763932,12 L1,22.381966 L1,12 Z"),e(i).children(".solidply").hasClass("solidpause")?(e(i).find(".solidply1").attr("d","M1,1 L1,1 1,5 16,5 16,1 Z"),e(i).find(".solidply2").attr("d","M1,11 L1,11 1,15 16,15 16,11 Z")):(e(i).find(".solidply1").attr("d","M1,1 L1,1 1,11 16,11 16,11 Z"),e(i).find(".solidply2").attr("d","M1,11 L1,11 1,22 16,11 16,11 Z"))}},initializeNewPlayer:function(){var t=this;function i(){var e=t.$el.find(".video-container"),i=8.21*(e.outerWidth()/16);e.css({height:i})}t.$el.find(".playbtn-container").click((function(e){t.showPlayerControls(),t._handlePlayPauseBtnClick(e)})),t.$el.find(".main-plyBtn").click((function(e){t.showPlayerControls(),t._handlePlayPauseBtnClick(e)})),i(),e(window).on("resize",(function(){i()})),e(".settingsbtn-container").click((function(){e(this).parent(".settings-container").toggleClass("opened")})),this.simpleEditMode||e(".player-touch-guard").addClass("disp-none"),this.fullscreenControl&&this.audioControl?(e(".player-controls-wrapper").removeClass("hide-one-ctrl"),e(".notification-line-onplay").removeClass("hide-one-ctrl"),e(".hp-indicator").removeClass("hide-one-ctrl")):(e(".player-controls-wrapper").addClass("hide-one-ctrl"),e(".notification-line-onplay").addClass("hide-one-ctrl"),e(".hp-indicator").addClass("hide-one-ctrl")),this.canPlayerLogoView||(e(".player-controls-wrapper").addClass("hide-logo"),e(".notification-line-onplay").addClass("hide-logo"),e(".hp-indicator").addClass("hide-logo")),this.hideSettingControlsIfPossible(),this.fullscreenControl||this.canPlayerLogoView||this.settingControl||this.audioControl&&(e(".player-controls-wrapper").addClass("only-vol-ctrl"),e(".notification-line-onplay").addClass("only-vol-ctrl"),e(".hp-indicator").removeClass("only-vol-ctrl")),this.$el.find(".player-controls-wrapper .duration-container").on("mousemove click mouseleave",(function(e){if("mouseleave"==e.type)return t.$el.find(".player-controls-wrapper .buffer-container").css("width","0%"),void t._handleProgressBtnLeave(e);var i=this.getRelativeMouseCoordinates(e),n=this.getBoundingClientRect(),r=Math.floor(i.x/Math.ceil(n.width)*100);if(t.$el.hasClass("player-rot90")&&(r=Math.floor(e.offsetX/Math.ceil(n.height)*100)),"click"==e.type)t._setProgressSliderValue(r);else{t.$el.find(".player-controls-wrapper .buffer-container").css("width",r+"%");var o=i.x-Math.min(80,2*r);t.$el.hasClass("player-rot90")&&(o=e.offsetX-Math.min(80,2*r)),r>=0&&!t.isMobilePlayer&&t.quickPreview&&o&&"ended"!=t.playerState&&t._handleProgressBtnHover(e,{x:o,percent:r/100})}}))},hideSettingControlsIfPossible:function(){this.settingControl||(e(".player-controls-wrapper").hasClass("hide-one-ctrl")||e(".player-controls-wrapper").hasClass("hide-logo")?(e(".player-controls-wrapper").removeClass("hide-one-ctrl"),e(".notification-line-onplay").removeClass("hide-one-ctrl"),e(".hp-indicator").removeClass("hide-one-ctrl"),e(".player-controls-wrapper").addClass("hide-two-ctrl"),e(".notification-line-onplay").addClass("hide-two-ctrl"),e(".hp-indicator").addClass("hide-two-ctrl")):(e(".notification-line-onplay").addClass("hide-one-ctrl"),e(".player-controls-wrapper").addClass("hide-one-ctrl"),e(".hp-indicator").addClass("hide-one-ctrl")))},_setNewPlayerProgress:function(e){"initial"!=this.playerState&&this.$el.find(".current-time-container").css("width",e+"%")},_handleVideoPreview:function(){try{if(this.previewVideo){var e=this.$el.find("#preview-video-player")[0];e.volume=0,e.muted=!0,e.play()}}catch(e){}},sendToFront:function(e){this.resizePlayerForWindow(),e||this._handlePlayPauseBtnClick()},_setNewPlayerTimestamp:function(e){var t=e.split("/"),i=t[0],n=t[1];this.$el.find(".end-time").html(i+" / "+n),this.$el.find(".buffer-container").addClass("completed")},setMediaSource:function(){if(this.$el.find("#gifImage").attr("src",this.src),this.$el.find("#primary-video source").attr("src",this.src),this.$el.find(".hidden-video source").attr("src",this.src),this.$el.find(".secondary-video source").attr("src",this.audioSrc),this.$el.find("#primary-video").length>0&&this.src&&-1==this.src.indexOf("fetch_video_stream")&&this.$el.find("#primary-video")[0].load(),this.$el.find(".secondary-video").length>0&&this.$el.find(".secondary-video")[0].load(),this.parallelURLs){e(".parallel-video").remove();for(var t=1;t<=this.parallelURLs.length;t++)this.$el.find(".parallel-video-container").append('<video class="parallel-video parallel-videos-'+t+'" crossorigin="anonymous" preload="auto" playsinline><source crossorigin="anonymous" src="'+this.parallelURLs[t-1]+'">'),this.$el.find(".parallel-videos-"+t)[0].load(),this.setMediaPlayerEvents(this.$el.find(".parallel-videos-"+t)[0])}},initializePlayer:function(){var t=this;this.mediaPlayer=this.$el.find(".primary-video")[0],this.customAudioPlayer=this.$el.find(".secondary-video")[0],this.mediaPlayer.controls=!1,this.$el.find(".volume-slider").slider({range:"min",orientation:"vertical",min:0,max:100,value:100,change:function(e,i){t.volumeChanged(e)},slide:function(e,i){t.volumeChanged(e)}});this.quickPreview&&(this.quickPreviewImg=document.createElement("img"),this.quickPreviewImg.setAttribute("src",this.quickPreview),this.quickPreviewCanvas=this.$el.find(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d")),this.showSetFrame?e(".thumbnail-wrap").show():e(".thumbnail-wrap").hide(),this.setSimpleEditMode(this.simpleEditMode),this.allowKeyboardShortcuts&&e(window).on("keydown",(function(i){if("TEXTAREA"!==i.target.nodeName&&"INPUT"!==i.target.nodeName&&"button"!==i.target.type&&t.alive){var n=i.key,r=i.keyCode;" "===n||"Spacebar"===n||32===r?(t._handlePlayPauseBtnClick(),t.setPlayerControlsTimeout(3e3)):"ArrowRight"===n||"Right"===n||39===r?t._handleForwardBtnClick():"ArrowLeft"===n||"Left"===n||37===r?t._handleRewindBtnClick():"f"!==n&&70!==r||e(".screensize-container").click()}})),this.$el.find(".video-speed-btn .player-speed-label").on("click",(function(){t.$el.find(".video-speed-btn .quality-container").slideToggle("fast"),t.$el.find("#videoQualityBtn .quality-container").slideUp("fast")})),this.$el.find(".settings-options-wrapper #speedControl li").on("click",(function(i){var n=e(i.currentTarget).attr("data-id");t.presetPlayerControls(),t.$el.find("#primary-video")[0].playbackRate=parseFloat(n),t.$el.find("#speedControl li").removeClass("selected"),e(this).addClass("selected"),t.$el.find(".settings-options-wrapper #speedInfo").html(n+"X - Speed")})),this.$el.find("#subtitlesTrack").css("bottom","55px")},initializePlayerJS:function(){var e=this;this.playerJSReceiver=new l.Receiver,this.playerJSReceiver.on("play",(function(){e.play()})),this.playerJSReceiver.on("pause",(function(){e.pause()})),this.playerJSReceiver.on("getPaused",(function(t){t(!e.playing)})),this.playerJSReceiver.on("mute",(function(){e.mute()})),this.playerJSReceiver.on("unmute",(function(){e.unmute()})),this.playerJSReceiver.on("getMuted",(function(t){t(0==e.getVolume())})),this.playerJSReceiver.on("setVolume",(function(t){e.setVolume(t)})),this.playerJSReceiver.on("getVolume",(function(t){t(e.getVolume())})),this.playerJSReceiver.on("getDuration",(function(t){t(e.mediaPlayer.duration)})),this.playerJSReceiver.on("setCurrentTime",(function(t){e.mediaPlayer.currentTime=t})),this.playerJSReceiver.on("getCurrentTime",(function(t){t(e.mediaPlayer.currentTime)})),this.playerJSReceiver.on("setLoop",(function(t){e.setLoop(t)})),this.playerJSReceiver.on("getLoop",(function(t){t(e.getLoop())})),this.playerJSReceiver.ready()},initializeDashPlayerJs:function(){this.adapter=dashjs.MediaPlayer().create(),this.adapter.getDebug().setLogToBrowserConsole(!1),this.adapter.setSegmentOverlapToleranceTime(2),this.adapter.setABRStrategy("abrBola"),this.adapter.addABRCustomRule("qualitySwitchRules","DownloadRatioRule",u);var e={type:"PERIODIC",authorizationUrl:HippoVideo.URL.PATH[HippoVideo.URI.Feature.VIDEO_PLAYER.CLOUD_FRONT_AUTHORIZER]+this.token,expiry:HippoVideo.Constants.Video.Expiry,authSettings:this.auth_params,manifestOnly:!this.segmented};this.adapter.initializeWithAuthorization(this.mediaPlayer,this.src,!1,e),this.currentStreamQuality=-1,this.dashPlayerLoaded=!1,window.navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./)||this.adapter.setFastSwitchEnabled(!0)},initializeHLSPlayerJs:function(){var e=this,t={asset_id:this.assetId};this.adapter=new d({enableWorker:!0},{onMediaAttached:function(){e.adapter.loadSource(e.src)},onManifestParser:function(t){e._handleMetadataLoad(t)}},e.auth_params,!0),this.adapter.attachPlayerMetrics({statsJsonSeed:t}),this.adapter.attachMedia(this.mediaPlayer)},initializeAdapter:function(){this["mpd"==this.type?"initializeDashPlayerJs":"initializeHLSPlayerJs"]()},initializeCSS:function(){this.renderState=!0,null==this.audioSrc&&this.$el.find(".secondary-video-container").hide(),0==this.showLogo&&this.$el.find(".player-logo").hide();var t=this;e(window).on("resize",(function(i){e(i.target).hasClass("ui-resizable")||t.resizePlayerForWindow()})),this.isError?(this.$el.find(".error-reason").html(this.getFaqOneLiner()+this.getFaqLink()),this.$el.find(".error-overlay").css("background-image","url(/img/tv-noise.gif)").show()):this.$el.find(".error-overlay").hide(),this.resizePlayerForWindow(),this.$el.find("video").css("height","100%"),this.primaryVideoLayout&&(null!=this.primaryVideoLayout.width&&this.$el.find(".primary-video-container").css("width",this.getValueForPlayerInitial(this.primaryVideoLayout.width,!0)+"px"),null!=this.primaryVideoLayout.height&&this.$el.find(".primary-video-container").css("height",this.getValueForPlayerInitial(this.primaryVideoLayout.height,!1)+"px"),null!=this.primaryVideoLayout.x&&this.$el.find(".primary-video-container").css("left",this.getValueForPlayerInitial(this.primaryVideoLayout.x,!0)+"px"),null!=this.primaryVideoLayout.y&&this.$el.find(".primary-video-container").css("top",this.getValueForPlayerInitial(this.primaryVideoLayout.y,!1)+"px")),this.secondaryVideoLayout&&(null!=this.secondaryVideoLayout.width&&this.$el.find(".secondary-video-container").css("width",this.getValueForPlayerInitial(this.secondaryVideoLayout.width,!0)+"px"),null!=this.secondaryVideoLayout.height&&this.$el.find(".secondary-video-container").css("height",this.getValueForPlayerInitial(this.secondaryVideoLayout.height,!1)+"px"),null!=this.secondaryVideoLayout.x&&this.$el.find(".secondary-video-container").css("left",this.getValueForPlayerInitial(this.secondaryVideoLayout.x,!0)+"px"),null!=this.secondaryVideoLayout.y&&this.$el.find(".secondary-video-container").css("top",this.getValueForPlayerInitial(this.secondaryVideoLayout.y,!1)+"px"));var i=e(".primary-video-container").width(),n=e(".primary-video-container").height();e(".access-denied-pop").width(i),e(".access-denied-pop").height(n),e(".password-pop").width(i),e(".password-pop").height(n),this.resizeFitThumnbail(),this.initializePlayerForMobile(),this.handleFwdBckBtn()},resizeFitThumnbail:function(){var e=this,t=new Image,i=this.isImageMode?"#gifImage":"#playerThumbnail";t.onload=function(t){var n=t.target.naturalWidth,o=t.target.naturalHeight,a=r.resizeImageToFit(n,o,e.$el.width(),e.$el.height()),s=r.getCoordinatesForResizedImage(a.width,a.height,e.$el.width(),e.$el.height());e.$el.find(i).css({width:a.width,height:a.height,top:s.yPos,left:s.xPos})},this.isImageMode?t.src=this.src:this.thumbnail&&(t.src=this.thumbnail)},resizeFitRenderless:function(){var e=this.$el.width(),t=this.$el.height();if(e&&t){var i=0,n=0;e/t>16/9?(e=16*t/9,i=(this.$el.width()-e)/2):(t=9*e/16,n=(this.$el.height()-t)/2),this.$el.find(".renderless-overlay").css({width:e+"px",height:t+"px",left:i+"px",top:n+"px"})}},initializePlayerForMobile:function(){this.isMobilePlayer},toggleSubtitlesEvent:function(e){this.$el.find("#subtitlesTrack").is(":visible")&&!e?(this.$el.find("#subtitlesTrack").hide(),this.toggleSubtitles(!1)):(this.toggleSubtitles(!0),this.$el.find("#subtitlesTrack").show()),this.presetPlayerControls()},toggleSubtitles:function(e){this.$el.find("#subtitleWrapper li").removeClass("selected"),this.$el.find('#subtitleWrapper li[data-value="'+(e?"on":"off")+'"]').addClass("selected")},_setProgressSliderValue:function(e){var t=this.$el.find(".current-time-container");t&&t.css("width",e+"%"),this.progressSlided(e)},volumeChanged:function(t){var i=this.getVolume(),n=e(".volumebtn");i>=60?(e(n).addClass("volumeon volume60"),e(n).removeClass("muted volume30")):i>=30?(e(n).addClass("volumeon volume30"),e(n).removeClass("muted volume60")):i>0?(e(n).addClass("volumeon"),e(n).removeClass("muted volume60 volume30")):0==i&&(e(n).addClass("muted"),e(n).removeClass("volumeon volume30 volume60")),this.mediaPlayer.volume=i/100},progressSlided:function(e){e=this.map(e,0,100,this.trimStart,this.mediaPlayer.duration-this.trimEnd);this.goToTime(e)},goToTime:function(e){this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=this.mediaPlayer.currentTime,this.$el.find(".replay-btn-container").hide()},show:function(){this.renderState?this.$el.show():(this.undelegateEvents(),this.render())},hide:function(){this.renderState&&this.$el.hide()},destroy:function(){this.alive=!1,this.undelegateEvents(),this.$el.removeData().unbind(),e(window).unbind("beforeunload",!1),this.remove(),i.View.prototype.remove.call(this),this.clipboard&&this.clipboard.destroy();try{this.adapter&&this.adapter.destroy&&this.adapter.destroy()}catch(e){}},handleFwdBckBtn:function(){"initial"==this.playerState&&(this.$el.find(".forwardbtn").addClass("disp-none"),this.$el.find(".backwardbtn").addClass("disp-none"))},handleMainPlayPause:function(){this.$el.find(".main-play-pause").click()},_delegateViewEvents:function(){var t=this;this.$el.dblclick((function(){e(".screensize-container").click()})),this.$el.find(".player-controls-container").dblclick((function(e){e.stopPropagation(),e.preventDefault()})),this.$el.find(".main-play-pause").click((function(i){if(i.stopPropagation(),i.preventDefault(),t.isMobilePlayer){if(t.isMobilePlayer){if(!t.controlsEnabled)return void t.showPlayerControls();t.showPlayerControls(),t._handlePlayPauseBtnClick(i)}}else t.showPlayerControls(),t._handlePlayPauseBtnClick(i);e(".hv-rclick-options").hasClass("hide")||e(".hv-rclick-options").addClass("hide")})),this.$el.find(".main-play-pause").mousedown((function(e){switch(e.which){case 3:e.target.addEventListener("contextmenu",(function(e){e.preventDefault()}));var i=e.target,n=e.target.nextSibling;t.showRightClickOption(i,n)}})),this.$el.find(".hv-rclick-about").click((function(t){e(".hv-rclick-options").addClass("hide"),window.open("https://www.hippovideo.io?utm_source=rightclick&utm_medium=player&utm_campaign=branding","_blank")})),this.$el.find(".main-controls").dblclick((function(e){e.stopPropagation(),e.preventDefault()})),this.delegate("webkitfullscreenchange mozfullscreenchange fullscreenchange",this._handleFullscreenChange),this.delegate("mouseenter mouseleave mousemove",this._handleHover),this.delegate("mouseenter mouseleave mousemove",".player-controls-wrapper",this._resolveHoverEvent),this.delegate("contextmenu","video",this._handleMenu),this.delegate("click",".replay-btn-container",this._handlePlayerClick),this.delegate("click",".volumebtn",this._handleAudioBtnClick),this.delegate("click",".screensize-container",this._handleFullscreenBtnClick),this.delegate("click",".player-download-icon",this.downloadVideoClick),this.delegate("click",".hv-player-download",this.deliveryDownload),this.delegate("click","#addCommentFromCanvas",(function(){t.playing&&t._handlePlayPauseForNewPlayer(),t.commentsCallbackHandler&&t.commentsCallbackHandler()})),this.delegate("click",".backwardbtn",this._handleRewindBtnClick),this.delegate("click",".forwardbtn",this._handleForwardBtnClick),this.delegate("click",".muted-autoplay",this._handleMutedAutoplayAudioClick),this.delegate("mouseenter mouseleave mousemove","#canvasPreviewContainer",this._handleCanvasMouseAction),e(".set-frame-btn").bind("click",this.seekAndUpdateThumb),e("#subtitles #subtitleWrapper li").bind("click",(function(){t.toggleSubtitlesEvent()})),this.setMediaPlayerEvents(this.mediaPlayer)},setMediaPlayerEvents:function(e){e.addEventListener("timeupdate",this._handleTimeupdate,!1),e.addEventListener("play",this._handlePlay,!1),e.addEventListener("pause",this._handlePause,!1),e.addEventListener("progress",this._handleProgress,!1),e.addEventListener("waiting",this._handleWaiting,!1),e.addEventListener("playing",this._handleResume,!1),e.addEventListener("canplay",this._handleCanplay,!1),e.addEventListener("seeked",this._handleSeeked,!1),e.addEventListener("seeking",this._handleSeeking,!1),e.addEventListener("ended",this._handleEnded,!1),e.addEventListener("loadedmetadata",this._handleMetadataLoad,!1),e.addEventListener("loadeddata",this._handleDataLoad,!1)},disableSubtitle:function(){document.getElementById("primary-video").textTracks[0].mode="hidden"},_handleMetadataLoad:function(){var t=this;if(this.adapterLoaded||-1==["m3u8","mpd"].indexOf(this.type))"mpd"==this.type?(this.adapter.setAutoSwitchQualityFor("video",!1),this.adapter.setQualityFor("video",this.currentStreamQuality),this.mediaPlayer.currentTime=this.dashQualitySwitchTime):this.settingControl&&(this.settingControl=this.adapterLoaded||this.showSpeedSettings||this.subtitlesEnabled,this.settingControl||e(".settings-container").hide(),this.hideSettingControlsIfPossible());else{this.adapterLoaded=!0;var i=this.adapter["mpd"==this.type?"getBitrateInfoListFor":"getLevels"]("mpd"==this.type?"video":"");i.sort((function(e,t){return e.height>t.height?1:t.height>e.height?-1:0}));for(var r,o,a=this.$el.find(".settings-options-wrapper #qualityControlWrapper"),l=[],u=i.length-1;u>=0;u--){switch(o=i[u].height,!0){case o>144&&o<=240:r="240";break;case o>240&&o<=360:r="360";break;case o>360&&o<=480:r="480";break;case o>480&&o<=720:r="720";break;case o>720&&o<=1080:r="1080";break;case o>1080&&o<=2159:r="2K";break;case o>=2160&&o<=4319:r="4K";break;case o>=4320:r="8K"}l[u]=r,a.append('<li data-id="'+u+'"><i></i><a>'+r+"</a></li>")}var c="high"==n.getQueryParams().quality;if(c){var d=i.length-1;t.$el.find(".settings-options-wrapper #qualityControlWrapper li").removeClass("selected"),t.$el.find('.settings-options-wrapper #qualityControlWrapper li[data-id="'+d+'"]').addClass("selected"),t.$el.find(".settings-options-wrapper #qualityinfo").html(l[d]),"mpd"==this.type?(this.adapter.setAutoSwitchQualityFor("video",!1),this.adapter.setQualityFor("video",d)):this.adapter.setRepresentation(i.length-1)}l.length>0?c?a.append('<li data-id="-1"><i></i><a>'+s.wizPlayer.auto+"</a></li>"):(a.append('<li class="selected" data-id="-1"><i></i><a>'+s.wizPlayer.auto+"</a></li>"),t.$el.find(".settings-options-wrapper #qualityinfo").html(s.wizPlayer.auto)):this.settingControl&&(this.settingControl=this.showSpeedSettings||this.subtitlesEnabled,this.settingControl||e(".settings-container").hide(),this.hideSettingControlsIfPossible()),this.$el.find(".settings-options-wrapper #qualityControlWrapper li").on("click",(function(i){var n=e(i.currentTarget).attr("data-id");t.$el.find(".settings-options-wrapper #qualityControlWrapper li").removeClass("selected"),e(this).addClass("selected"),"-1"==n?(t.$el.find(".settings-options-wrapper #qualityinfo").html(s.wizPlayer.auto),"mpd"==this.type?t.adapter.setAutoSwitchQualityFor("video",!0):t.adapter.setRepresentation(-1)):(t.$el.find(".settings-options-wrapper #qualityinfo").html(l[n]),"mpd"==this.type?parseInt(n)>~~t.currentStreamQuality&&(t.dashQualitySwitchTime=t.mediaPlayer.currentTime,t.adapter.reset(),t.adapter.attachSource(t.src),t.adapter.attachView(t.mediaPlayer),t._handleWaiting()):t.adapter.setRepresentation(Number(n))),t.currentStreamQuality=~~n,t.presetPlayerControls()}))}this.subtitlesEnabled?(document.getElementsByTagName("track")[0].addEventListener("cuechange",this.cueChanged),this.toggleSubtitlesEvent(this.subtitlesEnabled)):this.toggleSubtitles(!1);this.autoPlayVideo&&(this.isMutedAutoPlay&&(this.isMuted||this.mute(),this.$el.find(".muted-autoplay").removeClass("hide")),this.$el.find(".hv-new-player .controls").hasClass(".hide-controls")?(this.$el.find(".notification-line-onplay").removeClass("emoji-move-top"),this.$el.find(".hv-player-download").addClass("hide-hv-player-download")):(this.$el.find(".notification-line-onplay").addClass("emoji-move-top"),this.$el.find(".hv-player-download").removeClass("hide-hv-player-download")),t.play())},_handleDataLoad:function(){var e=!this.dataLoaded;this.dataLoaded=!0,e&&this.onDataLoadHandler&&this.onDataLoadHandler()},_handleFullscreenChange:function(t){var i=this;this.isFullScreen()?(e(".screensize-container").children(".screensizebtn").addClass("maximized"),this.$el.find(".preview-add-comment").hide()):(e(".screensize-container").children(".screensizebtn").removeClass("maximized"),this.$el.find(".preview-add-comment").show()),this.resizePlayerForWindow(),setTimeout((function(){i.resizePlayerForWindow()}),1e3)},_handleProgressBtnLeave:function(e){clearTimeout(this.hideQuickPreviewTimeout);var t=this;this.hideQuickPreviewTimeout=setTimeout((function(){t.$el.find("#canvasPreviewContainer").fadeOut(200)}),500)},_handleProgressBtnHover:function(t,i){var n=this.$el.find("#canvasPreviewContainer"),r=i.x+42;if(n.css("left",r+"px"),!this.showSetFrame||this.quickPreviewImg&&this.quickPreviewContext){n.is(":visible")||n.fadeIn(),this.showSetFrame&&e(".player-controls-container").show();l=i.percent;if(this.second=l*this.mediaPlayer.duration,isNaN(this.mediaPlayer.duration))return;var o=parseInt(this.second/2),a=parseInt(o/10),s=o%10;this.quickPreviewImg&&this.quickPreviewContext&&(this.quickPreviewContext.drawImage(this.quickPreviewImg,128*s,72*a,128,72,0,0,128,72),this.quickPreviewContext.fillStyle="rgba(0,0,0,0.5)",this.quickPreviewContext.fillRect(47,53,37,18),this.quickPreviewContext.font="9px",this.quickPreviewContext.fillStyle="white",this.quickPreviewContext.fillText(this.strToTime(this.second),55,67)),e("#canvasHoverTime").val(this.second),clearTimeout(this.hideQuickPreviewTimeout),this.hideQuickPreviewTimeout=setTimeout((function(){n.fadeOut(200)}),3e3)}else{n.fadeIn(),e(".player-controls-wrapper").show();var l=i.percent;this.second=l*this.mediaPlayer.duration,isNaN(this.second)&&(this.second=.2);var u=document.getElementsByClassName("hidden-video")[0];u.currentTime=Number(this.second),this.quickPreviewCanvas=this.$el.find(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d"),this.$el.find("#quick-preview-loading").show(),e(this.quickPreviewCanvas).hide(),u.removeEventListener("canplay",this.drawImageForPreview),u.addEventListener("canplay",this.drawImageForPreview)}},drawImageForPreview:function(){this.quickPreviewContext&&this.quickPreviewContext.drawImage(document.getElementsByClassName("hidden-video")[0],0,0,128,72),this.quickPreviewCanvas&&(e(this.quickPreviewCanvas).show(),this.$el.find("#quick-preview-loading").hide())},seekAndChooseThumb:function(t){e(".player-controls-wrapper, .set-frame-btn").show(),e(".player-progress").bind("mousemove",this._handleProgressBtnHover),this.undelegateHoverActions(),this.showPlayerControls();var i=e("#canvasPreviewContainer");i.is(":visible")||i.fadeIn();var n=document.getElementsByClassName("hidden-video")[0];n&&(n.currentTime=Number(.2),this.quickPreviewCanvas=e(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d"),this.$el.find("#quick-preview-loading").show(),e(this.quickPreviewCanvas).hide(),n.removeEventListener("canplay",this.drawImageForPreview),n.addEventListener("canplay",this.drawImageForPreview))},hideSeekAndUpdateThumb:function(){var t=this;this.undelegate("mouseenter mouseleave mousemove",this._handleHover),this.hideQuickPreviewTimeout=setTimeout((function(){t.$el.find("#canvasPreviewContainer").hide()}),500),e(".player-progress").unbind("mousemove mouseleave")},seekAndUpdateThumb:function(){this.hideSeekAndUpdateThumb(),this.saveThisFrameAsThumbnail()},setThumbnailFromFrameCallBack:function(e){this.saveThisFrameAsThumbnail=e},setOnDataLoadHandler:function(e){this.onDataLoadHandler=e,this.dataLoaded&&e()},_handleEnded:function(e){if(this.playing&&this.mediaPlayer.currentTime>=this.mediaPlayer.duration-this.trimEnd&&(this.simpleEditMode||this.$el.find(".replay-btn-container").show(),this.$el.find(".main-controls").fadeOut(),this.playerState="ended",this.playing=!1,this.checkAllowPlay()),this.isIphone&&this.fullscreen&&this.exitFullScreen(),this.playerJSReceiver&&this.playerJSReceiver.emit("ended"),this.onEndHandler.length>0)for(var t=0;t<this.onEndHandler.length;t++)this.onEndHandler[t]();this.setPlayerControlsTimeout(50)},_handleHover:function(e){var t=e.type;this.simpleEditMode||("mouseenter"!==t||this.isMobilePlayer?"mouseleave"===t?(this.showPlayerControls(),this.setPlayerControlsTimeout(500)):"mousemove"!==t||this.isMobilePlayer||(this.showPlayerControls(),this.setPlayerControlsTimeout(1500)):this.showPlayerControls(50))},_resolveHoverEvent:function(e){"mouseleave"===e.type&&this.setPlayerControlsTimeout(500),clearTimeout(this.mouseleaveTimeout)},_isAllowedToShowMainControls:function(){return!(!this.isMobilePlayer&&this.playing)},showPlayerControls:function(){"ended"==this.playerState||this.$el.find(".replay-btn-container").is(":visible")||(this.controlsEnabled=!0,this.$el.find(".notification-line-onplay").addClass("emoji-move-top"),this.$el.find(".player-controls-wrapper").show(),this.$el.find(".player-controls-wrapper").removeClass("hide-controls"),this.$el.find(".hv-player-download").removeClass("hide-hv-player-download"),this.$el.find(".hp-indicator").removeClass("hide-hp-indicator"),this.$el.find(".duration-container-fullscreen").addClass("disp-none"),!this.isWating&&this._isAllowedToShowMainControls()&&this.$el.find(".main-controls").show(),this.$el.find("#subtitlesTrack").css("bottom","55px"),this.setPlayerControlsTimeout(1500))},cueChanged:function(e){this.$el.find("#subtitlesTrack").text("");for(var t=document.getElementById("primary-video").textTracks[0],i="",n=0;n<t.activeCues.length;n++)i+=t.activeCues[n].text;""!=i&&(this.disableSubtitle(),this.$el.find("#subtitlesTrack").html("<span>"+i+"</span>"))},handlePlayerControlHideShow:function(){this.playing||this.$el.find(".replay-btn-container").is(":visible")||this.isCTAWaitingMode?(this.controlsEnabled=!1,this.$el.find(".player-controls-wrapper").addClass("hide-controls"),this.$el.find(".hv-player-download").addClass("hide-hv-player-download"),this.$el.find(".hp-indicator").addClass("hide-hp-indicator"),this.presetPlayerControls(),this.$el.find(".main-controls").hide(),this.$el.find(".duration-container-fullscreen").removeClass("disp-none"),this.$el.find(".notification-line-onplay").removeClass("emoji-move-top"),this.$el.find("#subtitlesTrack").css("bottom","15px")):(this.controlsEnabled=!0,this.$el.find(".duration-container-fullscreen").addClass("disp-none"),this.$el.find(".player-controls-wrapper").removeClass("hide-controls"),this.$el.find(".hv-player-download").removeClass("hide-hv-player-download"),this.$el.find(".hp-indicator").removeClass("hide-hp-indicator"),this._isAllowedToShowMainControls()&&this.$el.find(".main-controls").show(),this.$el.find(".notification-line-onplay").addClass("emoji-move-top"))},setPlayerControlsTimeout:function(e){var t=this;clearTimeout(this.mouseleaveTimeout),this.mouseleaveTimeout=setTimeout((function(){t.simpleEditMode||(t.presetPlayerControls(),t.handlePlayerControlHideShow())}),e)},presetPlayerControls:function(){e(".settings-container").hasClass("opened")&&e(".settingsbtn-container").click()},setPlayerState:function(e){this.playerState=e},showPlayerHoverActions:function(){this.showHoverActions&&"initial"!==this.playerState&&"ended"!==this.playerState&&!this.isCTAWaitingMode&&(this.$el.find(".player-controls-wrapper").show(),this._isAllowedToShowMainControls()&&this.$el.find(".main-controls").show())},_handleMenu:function(e){},_handleWaiting:function(e){if(this.isWating=!0,this.$el.find(".main-controls").hide(),this.showPersonalisedVideoLoading)this.$el.find("#personalisedVideoLoading").show(),this.showHoverActions=!1;else{var t=this;this.waitingTimeout=setTimeout((function(){t.canShowPlayerLoading&&t.$el.find(".player-loading-overlay").show()}),200),this._secondaryVideoPlaying&&this.customAudioPlayer.pause()}},setPersonalisedVideo:function(e){this.$el.find("#primary-video source").attr("src",e.video_url),this.$el.find("#primary-video").length>0&&this.$el.find("#primary-video")[0].load(),this.$el.find(".thumbnail-container img").attr("src",e.thumbnail),this.quickPreview=e.quickpreview,this.personalisedVideoDetailsSet=!0,this.$el.find("#personalisedVideoLoading").fadeOut(),this.pause(),this.show()},_handleResume:function(e){if(this.isWating=!1,clearTimeout(this.waitingTimeout),this.$el.find(".player-loading-overlay").fadeOut(200),this.customAudioPlayer){this.customAudioPlayer.currentTime=this.mediaPlayer.currentTime;var t=this,i=this.customAudioPlayer.play();i?i.then((function(){t._secondaryVideoPlaying=!0})).catch((function(e){t._secondaryVideoPlaying=!1})):t._secondaryVideoPlaying=!0}},_handleCanplay:function(t){clearTimeout(this.waitingTimeout),this.$el.find(".player-loading-overlay").fadeOut(200);var i=this;if(this.playing){var r=this.mediaPlayer.play();r?r.then((function(){i._primaryVideoPlaying=!0})).catch((function(e){console.log(e),i._primaryVideoPlaying=!1})):i._primaryVideoPlaying=!0}this.canplayHandler&&this.canplayHandler(t),browser=["Safari","Edge","IE"];var o=window.navigator.userAgent.toLowerCase(),a=/safari/.test(o),s=/iphone|ipod|ipad/.test(o),l=s&&!a;if((e.inArray(n.getBrowserName(),browser)>=0||l)&&!this.largeValueSet){if(this.mediaPlayer.currentTime=0,this.durationComputed=!0,this.largeValueSet=!0,this.mediaPlayer.duration||(this.mediaPlayer.duration=this.duration),this.onComputedDurationHander){this.onComputedDurationHander();var u=window.location.href.indexOf("video/embed")>-1;this.autoPlayVideo&&u&&this.$el.find(".main-controls").hide()}}else if(this.largeValueSet||isFinite(this.mediaPlayer.duration)){if(!this.durationComputed&&isFinite(this.mediaPlayer.duration)&&(this.mediaPlayer.currentTime=0,this.durationComputed=!0,this.onComputedDurationHander)){this.onComputedDurationHander();u=window.location.href.indexOf("video/embed")>-1;this.autoPlayVideo&&u&&this.$el.find(".main-controls").hide()}}else this.largeValueSet=!0,this.mediaPlayer.currentTime=1e9},_handleSeeked:function(){if(this.onSeekedHandler&&this.onSeekedHandler(),this.onSeekedHandlers)for(var e=0;e<this.onSeekedHandlers.length;e++)this.onSeekedHandlers[e]&&this.onSeekedHandlers[e]()},_handleSeeking:function(){this.seekingStartedAt=this.currentTimeUpdate,this.seekingEndedAt=this.mediaPlayer.currentTime,this.onSeekindHandler&&this.onSeekindHandler()},_handlePlayerClick:function(t){if(!this.simpleEditMode&&!this.isImageMode){if(e(t.currentTarget).hasClass("replay-btn-container")){if(this.$el.find(".replay-btn-container").hide(),this._handlePlayPauseBtnClick(),this.onReplayHandlers)for(var i=0;i<this.onReplayHandlers.length;i++)this.onReplayHandlers[i]&&this.onReplayHandlers[i]()}else this.showHoverActions||this._handlePlayPauseBtnClick();this.previousClick=new Date}},_handlePlay:function(){if(this.$el.find(".thumbnail-container").is(":visible")&&this.$el.find(".thumbnail-container").fadeOut(100),this.simpleEditMode?this.$el.find(".play-pause-button").find("img").attr("src",this.customColors?"/img/simple-edit-pause-icon-dark.png":"/img/simple-edit-pause-icon.png"):this.$el.find(".play-pause-button, .player-play-pause-action").find("img").attr("src","/svg/pause-white.svg"),this.onPlayHandler.length>0)for(var e=0;e<this.onPlayHandler.length;e++)this.onPlayHandler[e]()},_handlePause:function(){if(!this.playing&&(this._secondaryVideoPlaying&&this.customAudioPlayer.pause(),this.simpleEditMode?this.$el.find(".play-pause-button").find("img").attr("src",this.customColors?"/img/simple-edit-play-icon-dark.png":"/img/simple-edit-play-icon.png"):this.$el.find(".play-pause-button, .player-play-pause-action").find("img").attr("src","/svg/play.svg"),this.onPauseHandler.length>0))for(var e=0;e<this.onPauseHandler.length;e++)this.onPauseHandler[e]()},_handleProgress:function(t){if("initial"!=this.playerState)try{var i=this.mediaPlayer.buffered,r=Math.round(i.end(0))/Math.round(this.mediaPlayer.seekable.end(0))*100;r+="%",e(".video-buffered-container").css("width",r)}catch(t){e(".video-buffered-container").css("width","0")}if(this.showPersonalisedVideoLoading&&this.personalisedVideoDetailsSet){var o="Opera"==n.getBrowserName();if(!o){var a=this.mediaPlayer.buffered;if(!a||!a.length)return;var s=a.start(0),l=a.end(a.length-1);o=0==s&&l>3}o&&(this.personalisedVideoDetailsSet=!1,this.$el.find("#personalisedVideoLoading").is(":visible")&&this.play(),this.showHoverActions=!0,this.showPersonalisedVideoLoading=!1,this.$el.find("#personalisedVideoLoading").fadeOut())}this.onProgressHandler&&this.onProgressHandler(t)},_handlePlayPauseBtnClick:function(){this.alive&&(this.$el.find(".replay-btn-container").hide(),this.isMobilePlayer&&(this.$el.find(".forwardbtn").removeClass("disp-none"),this.$el.find(".backwardbtn").removeClass("disp-none")),this.$el.find(".hv-rclick-options").addClass("hide"),this.playing?this.pause():this.play(),this._handlePlayPauseForNewPlayer())},_handleRewindBtnClick:function(){if(!this.isCTAWaitingMode){var e=this.mediaPlayer.currentTime;e=Math.max(e-5,0),this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=e,this.$el.find(".hv-rclick-options").addClass("hide")}},_handleForwardBtnClick:function(){if(!this.isCTAWaitingMode){var e=this.mediaPlayer.currentTime;e!=this.mediaPlayer.duration&&(e=Math.min(e+5,this.mediaPlayer.duration),this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=e,this.$el.find(".hv-rclick-options").addClass("hide"))}},_handleAudioBtnClick:function(){0!=this.getVolume()?this.mute():this.unmute()},_handleMutedAutoplayAudioClick:function(t){this.unmute(),e(t.currentTarget).remove()},_handleFullscreenBtnClick:function(){this.fullscreen?this.exitFullScreen():this.enterFullScreen()},_handleTimeupdate:function(e){var t=this.map(this.mediaPlayer.currentTime,this.trimStart,this.mediaPlayer.duration-this.trimEnd,0,100);if((isNaN(t)||this.mediaPlayer.currentTime<Math.round(100*this.trimStart)/100)&&(this.mediaPlayer.currentTime=Math.round(100*this.trimStart)/100),t>100&&(this._handleEnded(),this.mediaPlayer.currentTime=this.trimStart>=this.mediaPlayer.duration?this.mediaPlayer.duration:this.trimStart,this._primaryVideoPlaying&&this.mediaPlayer.pause()),isFinite(this.mediaPlayer.duration)){this._setNewPlayerProgress(t);var i=this.mediaPlayer.duration,n=this.mediaPlayer.currentTime;isNaN(this.trimStart)||isNaN(this.trimEnd)||(i=i-this.trimStart-this.trimEnd,n-=this.trimStart),i=Math.max(i,0),n=Math.max(n,0),this.$el.find(".player-currenttime").text(this.strToTime(n)+" / "+this.strToTime(i)),this._setNewPlayerTimestamp(this.strToTime(n)+" / "+this.strToTime(i)),this.currentTimeUpdate=n,this.updateHandler&&this.updateHandler(),this.playerJSReceiver&&this.playerJSReceiver.emit("timeupdate",{seconds:n,duration:i})}},mute:function(){this.isMuted=!0,this.previousVolume=this.getVolume(),this.setVolume(0),this.mediaPlayer.muted=!0,this.customAudioPlayer&&(this.customAudioPlayer.muted=!0)},unmute:function(){this.isMuted=!1,this.setVolume(this.previousVolume),this.mediaPlayer.muted=!1,this.$el.find(".muted-autoplay").remove(),this.customAudioPlayer&&(this.customAudioPlayer.muted=!1)},setLoop:function(e){this.loop=e},getLoop:function(){return this.loop},setUpdateHandler:function(e){this.updateHandler=e},setPlayPauseHandler:function(e,t){t?this.onPlayHandler.push(e):this.onPauseHandler.push(e)},setEndedHandler:function(e){this.onEndHandler.push(e)},setSeekedHandler:function(e){this.onSeekedHandler=e},addSeekedHandler:function(e){this.onSeekedHandlers.push(e)},setSeekingHandler:function(e){this.onSeekindHandler=e},addReplayHandler:function(e){this.onReplayHandlers.push(e)},setPlayerResizeHandler:function(e){this.playerResizeHandler=e},play:function(){if(this.playing||this.isCTAWaitingMode)this._handlePlayPauseForNewPlayer();else{if("initial"==this.playerState||"ended"==this.playerState)return this.playerState="started",this.$el.find(".play-btn-container").fadeOut(),this.$el.find(".replay-btn-container").fadeOut(),this.$el.find(".play-btn-container video").remove(),void(this.allowPlay?this.play():this.renderWarning(7));var e=this;e.playing=!0;var t=window.location.href.indexOf("video/embed")>-1;this.autoPlayVideo&&t&&this.$el.find(".main-controls").hide();var i=this.mediaPlayer.play();i?i.then((function(){e._primaryVideoPlaying=!0})).catch((function(t){e._primaryVideoPlaying=!1})):e._primaryVideoPlaying=!0,this.playerJSReceiver&&this.playerJSReceiver.emit("play"),this._handlePlayPauseForNewPlayer()}},pause:function(){this.playing?(this.playing=!1,this._primaryVideoPlaying&&this.mediaPlayer.pause(),this.playerJSReceiver&&this.playerJSReceiver.emit("pause"),this._handlePlayPauseForNewPlayer()):this._handlePlayPauseForNewPlayer()},isPlaying:function(){return this.playing},setVolume:function(e){try{this.$el.find(".volume-slider").slider("value",e),this.volumeChanged()}catch(e){}},getVolume:function(){return~~this.$el.find(".volume-slider").slider("value")},isFullScreen:function(){return document.fullScreenElement&&null!==document.fullScreenElement||document.mozFullScreen||document.webkitIsFullScreen},enterFullScreen:function(){var e=screen.msOrientation||screen.orientation||screen.mozOrientation||{};if(!this.fullscreen){if(this.fullscreen=!0,this.iosInBrowserFullScreen&&this.isIphone)return this.$el.find(".thumbnail").css("z-index",-1),void this.resizePlayerForWindow();var t;(t=this.isIphone?document.getElementById("primary-video"):document.getElementById(this.id)).webkitEnterFullScreen?t.webkitEnterFullScreen():t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen();try{r.canForceLandscapeForFullscreen()&&e.lock("landscape")}catch(e){r.postErrorsToLog({error:"Error while trying to force full screen landscape in player",stackTrace:JSON.stringify(e)})}}},exitFullScreen:function(){var e=screen.msOrientation||screen.orientation||screen.mozOrientation||{};if(this.fullscreen)if(this.fullscreen=!1,this.iosInBrowserFullScreen&&this.isIphone){this.$el.find(".thumbnail").css("z-index",""),this.resizePlayerForWindow();var t=this;setTimeout((function(){t.$el.height(9*t.$el.width()/16)}),200)}else{var i=document;this.isIphone&&(i=document.getElementById("primary-video")),i.exitFullscreen?i.exitFullscreen():i.msExitFullscreen?i.msExitFullscreen():i.mozCancelFullScreen?i.mozCancelFullScreen():i.webkitExitFullscreen&&i.webkitExitFullscreen();try{r.canForceLandscapeForFullscreen()&&e.unlock()}catch(e){r.postErrorsToLog({error:"Error while trying to force exit full screen landscape in player",stackTrace:JSON.stringify(e)})}}},strToTime:function(e){var t=parseFloat(e,10),i=Math.floor(t/3600),n=Math.floor((t-3600*i)/60),r=Math.floor(t-3600*i-60*n);return i>0&&n<10&&(n="0"+n),r<10&&(r="0"+r),i>0?i+":"+n+":"+r:n+":"+r},trim:function(e,t,i){if(this.trimStart!=e||this.trimEnd!=t)try{this.mediaPlayer.currentTime=e,this.customAudioPlayer.currentTime=e}catch(e){}if(this.trimStart=e,this.trimEnd=t,i&&("initial"==this.playerState||"ended"==this.playerState))return this.playerState="started",void this.$el.find(".replay-btn-container").fadeOut(100)},map:function(e,t,i,n,r){return(e-t)*(r-n)/(i-t)+n},setSimpleEditMode:function(e){this.simpleEditMode=e,this.simpleEditMode?(this.$el.animate({"margin-bottom":"0px"},200),this.$el.find(".player-controls-wrapper").addClass("player-controls-outside"),this.$el.find(".player-controls-wrapper").removeClass("player-controls-inside"),this.$el.find(".player-controls-wrapper").fadeIn(),this.$el.find(".play-pause-button").find("img").attr("src",this.customColors?"/img/simple-edit-play-icon-dark.png":"/img/simple-edit-play-icon.png"),this.$el.find(".player-download, .for-reactions").hide(),this.$el.find(".notification-line-onplay").hide()):(this.$el.animate({"margin-bottom":"0px"},200),this.$el.find(".player-controls-wrapper").removeClass("player-controls-outside"),this.$el.find(".player-controls-wrapper").addClass("player-controls-inside"),this.$el.find(".play-pause-button").find("img").attr("src","/svg/play.svg"),this.$el.find(".player-download, .for-reactions").show(),this.$el.find(".notification-line-onplay").show())},setCTAWaitingMode:function(e){this.isCTAWaitingMode=e,e&&(this.$el.find(".main-controls").fadeOut(),this.$el.find("#hvRclickOptions").addClass("hide"))},setStatId:function(e){this.statId=e},getStatId:function(){return this.statId},resizePlayerForWindow:function(){var e=screen.msOrientation||(screen.orientation||screen.mozOrientation||{}).type;if(this.iosInBrowserFullScreen&&this.isIphone)if(this.fullscreen){if(window.innerWidth<window.innerHeight){this.$el.addClass("player-rot90"),this.$el.parent().addClass("player-rot90-container");var t=window.innerWidth,i=window.innerHeight;this.$el.height(t),this.$el.width(i)}else this.$el.removeClass("player-rot90"),this.$el.parent().removeClass("player-rot90-container"),this.$el.height(window.innerHeight),this.$el.width(window.innerWidth);this.$el.addClass("player-inbrowser-fullscreen"),this.$el.parent().addClass("player-container-fullscreen")}else this.$el.removeClass("player-rot90 player-inbrowser-fullscreen"),this.$el.width("100%"),this.$el.height(9*this.$el.width()/16),this.$el.parent().removeClass("player-container-fullscreen player-rot90-container");else this.$el.height(9*this.$el.width()/16);this.resizeFitThumnbail(),this.isMobilePlayer&&((e||"").includes("landscape")&&this.isFullScreen()?this.$el.find(".emoji-wrap").show():this.$el.find(".emoji-wrap").hide()),this.playerResizeHandler&&this.playerResizeHandler({width:this.$el.width(),height:this.$el.height()}),this.resizeFitRenderless()},getValueForPlayerInitial:function(e,t){var i=this.$el.width(),n=this.$el.height();return t?this.roundNumber(e*(i/384),2):this.roundNumber(e*(n/216),2)},roundNumber:function(e,t){return Math.round(10*e*t)/(10*t)},getFaqOneLiner:function(){return null!=a["faqoneliner_"+this.authorState]?a["faqoneliner_"+this.authorState]:"unknown error.. contact us for more details"},getFaqLink:function(){var e={5:"misc-error",6:"misc-error",13:"upload-issues",14:"upload-issues",16:"upload-issues",28:"upload-issues",22:"misc-error",23:"misc-error",27:"misc-error"};return null==e[this.authorState]?"":'<a target="_blank" href="https://www.hippovideo.io/faq.html#'+e[this.authorState]+'"> more info </a>'},resetPlayer:function(){this.isImageMode?this.$el.find(".primary-video-container img").attr("src",""):(this.$el.find(".secondary-video-container video").attr("src",""),this.$el.find(".primary-video-container video").attr("src",""),this.$el.find(".secondary-video-container video")[0].load(),this.$el.find(".primary-video-container video")[0].load(),this.canShowPlayerLoading&&this.$el.find(".player-loading-overlay").show(),this.$el.find(".title-paragraph-tag").text(""),this.$el.find(".player-currenttime").text("")),this.$el.find(".vdo-prev-head").hide(),this.$el.find(".hippo-video-buttons").hide(),this.$el.find(".play-btn-container").hide(),this.$el.find(".vdo-error-state").hide()},downloadVideoClick:function(){null!=this.downloadVideo&&this.downloadVideo()},deliveryDownload:function(){var e=n.getQueryParams();e?e.stat_id=this.statId:e={stat_id:this.statId},(new c).getDownloadLinkFromDelivery(this.token,e,(function(e){e.status&&r.downloadFile(e.signed_url)}))},_handleCanvasMouseAction:function(e){var t=this;clearTimeout(this.hideQuickPreviewTimeout),this.isCTAWaitingMode?t.$el.find("#canvasPreviewContainer").fadeOut(200):"mouseleave"===e.type&&(this.hideQuickPreviewTimeout=setTimeout((function(){t.$el.find("#canvasPreviewContainer").fadeOut(200)}),500))},getCurrentTime:function(){return this.durationComputed?this.mediaPlayer.currentTime:.001},getDuration:function(){return parseInt(this.mediaPlayer.duration)||this.duration},getRawDuration:function(){return this.mediaPlayer.duration||this.duration},checkAllowPlay:function(){if(this.token){var e=this,t={token:this.token};p.call({url:"/video_delivery/is_allow_play",method:"POST",data:t,success:function(t){e.allowPlay=t.is_allow}})}},renderWarning:function(t){var i=e("#"+this.$el.attr("id")).parent().attr("id");e("#"+i).empty(),e("#"+i).html(this.template({id:this.id,token:this.token,thumbnail:" ",privacy:t})),this.setElement(e("#"+this.id)),this.initializeCSS(),this.undelegateEvents(),e("#comments").hide(),e(".delivery-footer").hide(),e(".play-btn-container").hide()},undelegateHoverActions:function(){this.undelegate("mouseenter mouseleave mousemove",this._handleHover)},delegateHoverActions:function(){this.delegate("mouseenter mouseleave mousemove",this._handleHover)},overrideStyle:function(e,t,i){e.each((function(){this.style.setProperty(t,i,"important")}))},showRightClickOption:function(e,t){this.$el.find(".hv-rclick-options").removeClass("hide"),this.canShowAboutUs||this.$el.find(".hv-rclick-about").addClass("hide"),this.rightClickPositionMenu(e,t)},copyWithThumbnail:function(t,i){this.clipboard=new h("#hvRclickCopy",{target:function(){var r=t,o=i;return e("body").append('<div id="hvRclickCopyTarget" aria-hidden="true" tabindex="-1" > '+n.getStyleHtmlToCopy(r,o,null)+"</div>"),document.querySelector("#hvRclickCopyTarget")}}),this.clipboard.on("success",(function(){n.trackInThirdPartyTools("Successfully copied the Copy link and thumbnail option from player right click menu"),e(".hv-rclick-copy").text(s.newPlayer.linkCopied),e("#hvRclickCopyTarget").remove(),setTimeout((function(){e(".hv-rclick-copy").text(s.newPlayer.copyLinkAndThumbnail),e(".hv-rclick-options").addClass("hide")}),1500)})),this.clipboard.on("error",(function(t){n.trackInThirdPartyTools("Failed to copy the Copy link and thumbnail option from player right click menu"),e(".hv-rclick-copy").text(s.newPlayer.failedToCopy),e("#hvRclickCopyTarget").remove(),setTimeout((function(){e(".hv-rclick-copy").text(s.newPlayer.copyLinkAndThumbnail),e(".hv-rclick-options").addClass("hide")}),1500)}))},rightClickGetPosition:function(e,t,i){if(!e)e=window.event;var n=t.getBoundingClientRect(),r=n.left,o=n.top;return{x:e.clientX-r,y:e.clientY-o}},rightClickPositionMenu:function(e,t,i){var n=t,r=this.rightClickGetPosition(i,e,t),o=r.x,a=r.y,s=n.offsetWidth,l=n.offsetHeight,u=e.offsetWidth,c=e.offsetHeight;n.style.left=u-o<s?u-s+"px":o+"px",n.style.top=c-a-40<l?c-l-40+"px":a+"px"},applyCustomColors:function(){var t=void 0;this.playerTheme&&[4,7].includes(this.playerTheme.length)&&(t=this.playerTheme);try{t=this.customColors.primaryColor?this.customColors.primaryColor:t}catch(e){}if(this.customColors&&t){var i=n.convertHexToRGB(t);e(".video-container .main-controls .final-plybtn .playthree svg g").attr("stroke",t),e(".video-container .replay-btn-container .final-replybtn .replaythree svg path").attr("fill",t),e(".video-container .replay-btn-container .final-replybtn .replaythree svg path").attr("stroke",t),e(".video-container .main-controls .backwardbtn svg g path").attr("stroke",t),e(".video-container .main-controls .backwardbtn svg line").attr("stroke",t),e(".video-container .main-controls .forwardbtn svg g path").attr("stroke",t),e(".video-container .main-controls .forwardbtn svg line").attr("stroke",t),e("head").append("<style>.video-container .main-controls .backwardbtn:after{color:"+t+" !important;}</style>"),e("head").append("<style>.video-container .main-controls .forwardbtn:after{color:"+t+" !important;}</style>");var r="";r+=".video-container .current-time-bg, .canvas-preview-container .preview-add-comment { background-image : linear-gradient(to left,"+t+","+t+") !important}",r+=".video-container .buffer-container:after { background-image : linear-gradient(to right, transparent 20%, rgba( "+i.r+","+i.g+","+i.b+",0.2), rgba("+i.r+","+i.g+","+i.b+",0.25)) !important}",r+=".video-container .video-buffered-container { background:rgba( "+i.r+","+i.g+","+i.b+",0.2) !important}",r+=".video-container .volume-container .volume-slider .ui-slider-range, .canvas-preview-container .preview-add-comment, .video-container .volume-container .volume-slider .ui-slider-handle, .video-container .settings-container .settings-suboptions>li i, .personalised-video-loading .inner-container .bar-loading div, .player-loading-overlay .inner-container .bar-loading div { background-color : "+t+" !important}",r+=".video-container .settings-container .settings-options-container>ul>li:hover, .video-container .settings-container .settings-suboptions>li:hover {color: "+t+" !important}",r+=".volume-slider player-audio-slider ui-slider ui-corner-all ui-widget ui-widget-content ui-slider-vertical {background: none}",this.customColors.secondaryColor&&(r+=".se-clip-time {background: "+this.customColors.secondaryColor+" !important;}"),this.customColors.bgColor&&(r+=".player-controls-outside {background: "+this.customColors.bgColor+" !important;}"),r.length>0&&(document.head.appendChild(document.createElement("style")).innerHTML=r)}},getBandwidthConsumed:function(){var e={type:this.type};if("m3u8"==this.type)e.totalFileSize=this.adapter.getBandwidthConsumed();else{for(var t=0,i=0;i<this.mediaPlayer.buffered.length;i++){var n=this.mediaPlayer.buffered.start(i);t+=100*(this.mediaPlayer.buffered.end(i)-n)/this.mediaPlayer.duration}e.perc=t}return e},applyCustomPlayIcon:function(){if(this.customPlayIcon){var t=document.createElement("div");t.classList.add("overlay"),e(".main-controls").each((function(){e(this).append(t)}));var i=document.createElement("div");i.classList.add("watch-video"),i.textContent="WATCH VIDEO",e(".main-plyBtn").each((function(){e(this).append(i)}));e(".main-plyBtn .playbutton").each((function(){e(this).find("svg").remove(),e(this).append('<svg xmlns="http://www.w3.org/2000/svg" width="47" height="47" viewBox="0 0 47 47" class="white-play-icon prim-vid"> <g transform="translate(-344.113 -1343.053)"> <g class="a" transform="translate(344.113 1343.053)"> <circle class="c" cx="23.5" cy="23.5" r="23.5"/> <circle class="d" cx="23.5" cy="23.5" r="23"/> </g> <path class="b" d="M7.312,0l7.312,12.56H0Z" transform="translate(375.756 1359.646) rotate(90)"/> </g> </svg>'),e(this).append('<svg xmlns="http://www.w3.org/2000/svg" width="47" height="47" viewBox="0 0 57 57" class="white-play-icon-filled" style="display:none;"> <g transform="translate(-932 -595)"> <circle class="a" cx="28.5" cy="28.5" r="28.5" transform="translate(932 595)"/> <path class="b" d="M8.813,0l8.813,15.137H0Z" transform="translate(970.137 615) rotate(90)"/> </g> </svg>')})),e("#videoPagePreviewBlock, #videoPageDeliveryBlock").addClass(this.customPlayIcon)}},updateIsMirrorWebCam:function(e){this.isMirrorWebCam=e,n.toggleWebcamForMirrorVideo(this.isMirrorWebCam,null!=this.audioSrc&&""!=this.audioSrc?this.$el.find(".secondary-video"):this.$el.find("#primary-video"))},updateQuickPreviewObjects:function(t){t&&!this.isAudioOnly&&this.getDuration()>=30?(this.quickPreviewImg=document.createElement("img"),this.quickPreviewImg.setAttribute("src",t),this.quickPreviewCanvas=this.$el.find(".quickpreview-canvas")[0],this.quickPreviewContext=this.quickPreviewCanvas.getContext("2d"),e(this.quickPreviewCanvas).hide(),this.$el.find("#quick-preview-loading").show()):(this.quickPreviewImg=void 0,this.quickPreviewCanvas=void 0,this.quickPreviewContext=void 0)},setShowSetFrame:function(e){this.showSetFrame?this.seekAndChooseThumb():this.hideSeekAndUpdateThumb()}})}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.x(t.get(["isPrivacy"],!1),t,{else:i,block:oe},{})}function i(e,t){return e.x(t.get(["initial"],!1),t,{else:n,block:re},{})}function n(e,t){return e.w('<div class="video-container hippo-video-player hv-new-player" id=').f(t.get(["id"],!1),t,"h").w('><div class="thumbnail"><div class="se-crop-scale">\x3c!-- <canvas class="blurred-bg-video" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;filter: blur(20px);-webkit-filter: blur(20px);transform: scale(1.2);"></canvas> --\x3e<div class="primary-video-overflow-container"><div class="primary-video-container">').x(t.get(["isImageMode"],!1),t,{else:r,block:d},{}).w('</div></div><div class="parallel-video-container"><div class="goback-branching"><img src="/img/back-icon.png" width="25"><span></span></div><div class="goback-branching-new"><div class="left-container"><img src="/img/left.svg" width="25"></div><div class="branching-info"></div></div><div class="branching-menus"></div></div>').nx(t.get(["isImageMode"],!1),t,{block:h},{}).w('</div><canvas class="renderless-overlay" style="position: absolute;width: 100%;height: 100%"></canvas><div class="renderless-inputs-container" style="position: absolute;width: 100%;height: 100%;display:none"></div><div class="renderless-overlay-iframes" style="position: absolute;width: 100%;height: 100%;display:none"></div></div>').nx(t.get(["isImageMode"],!1),t,{block:f},{}).w('<div id="personalizeChapterId" class="hp-menu-tog hide"><img src="/svg/hamburger-white.svg" width="16"></div><div id="personalizeChaptersListId" class="hp-tog-content hide"><a class="chapter-close" id="chapterCloseId"><img src="/svg/close-gray.svg" width="10"></a><br><div id="chaptersListId"></div></div><div class="error-overlay hide" style="position:absolute;width:100%;height:100%;background: rgba(0,0,0,0.2);z-index:2;background-repeat: no-repeat;background-size: contain;"><div class="error-reason-div"><img src="/svg/warning.svg" class="status-warning" /><div class="error-reason"></div></div></div><div class="player-touch-guard"></div>').nx(t.get(["isImageMode"],!1),t,{block:k},{}).h("select",t,{block:J},{key:t.get(["privacy"],!1)},"h").w(" ").h("select",t,{block:ee},{key:t.get(["privacy"],!1)},"h").w(" ").h("eq",t,{block:ie},{key:t.get(["privacy"],!1),value:7},"h").w(" ").h("eq",t,{block:ne},{key:t.get(["privacy"],!1),value:2},"h").w("</div>")}function r(e,t){return e.w('<video class="primary-video" id="primary-video" crossorigin="anonymous" controls playsinline ').x(t.get(["loop"],!1),t,{block:o},{}).w(">").h("eq",t,{block:a},{key:t.get(["type"],!1),value:"url"},"h").w("Your browser does not support the video tag.").x(t.get(["subtitlesEnabled"],!1),t,{block:s},{}).w('</video><canvas class="se-effects-canvas"></canvas><div class="se-effects-components-container"></div>').x(t.get(["showSetFrame"],!1),t,{block:c},{}).w(" ")}function o(e,t){return e.w(" loop ")}function a(e,t){return e.w('<source crossorigin="anonymous" src=').f(t.get(["src"],!1),t,"h").w(">")}function s(e,t){return e.x(t.get(["subtitlesFromServer"],!1),t,{else:l,block:u},{})}function l(e,t){return e.w('<track label="English" kind="subtitles" id="subtitleTrack" srclang="eng" src="').f(t.get(["subtitles"],!1),t,"h").w('" default="">')}function u(e,t){return e.w('<track label="English" kind="subtitles" id="subtitleTrack" srclang="eng" src="').f(t.get(["domain"],!1),t,"h").w("/video_delivery/subtitles/").f(t.get(["token"],!1),t,"h").w('" default="">')}function c(e,t){return e.w('<video class="hidden-video" controls playsinline crossorigin="anonymous" style="display: none;"><source crossorigin="anonymous" src=').f(t.get(["src"],!1),t,"h").w(">").f(t.getPath(!1,["wizPlayer","browserDoesNotSupport"]),t,"h").w("</video> ")}function d(e,t){return e.w('<img src="').f(t.get(["src"],!1),t,"h").w('" class="primary-video" id="gifImage" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;"> ')}function h(e,t){return e.w(" ").nx(t.get(["isDelivery"],!1),t,{block:p},{}).w(" ")}function p(e,t){return e.w('<div class="secondary-video-overflow-container" style="top:0"><div class="secondary-video-container"><video class="secondary-video" crossorigin="anonymous"><source crossorigin="anonymous" src=').f(t.get(["audioSrc"],!1),t,"h").w('></video></div></div><textarea id="seTextEditable" class="se-text-editable custom-scroll hide" spellcheck="false" placeholder="Enter text here"></textarea><div class="se-components-container"></div><div class="se-crop-resizable hide"></div><div class="se-crop-highlighter se-crop-highlighter-top"></div><div class="se-crop-highlighter se-crop-highlighter-left"></div><div class="se-crop-highlighter se-crop-highlighter-bottom"></div><div class="se-crop-highlighter se-crop-highlighter-right"></div>')}function f(e,t){return e.w('<div class="se-components-droppable"></div><div class="player-border"></div>').x(t.get(["thumbnail"],!1),t,{block:g},{}).x(t.get(["previewVideo"],!1),t,{block:m},{}).x(t.get(["controls"],!1),t,{block:v},{}).w('<div class="renderless-builder-container" style="position: absolute;width: 100%;height: 100%;display:none;"></div>').x(t.get(["controls"],!1),t,{block:y},{}).w('<div class="player-loading-overlay full-screen-container hide"><div class="inner-container"></div></div>').x(t.get(["isLandingPageVideo"],!1),t,{else:b,block:w},{}).w(" ").x(t.get(["isMutedAutoPlay"],!1),t,{block:E},{}).w(" ").x(t.get(["showHoverActions"],!1),t,{block:T},{}).w(" ")}function g(e,t){return e.w('<div class="thumbnail-container full-screen-container" style="position:absolute;width:100%;height:100%;cursor: pointer;z-index:1"><img src="').f(t.get(["thumbnail"],!1),t,"h").w('" id="playerThumbnail" style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;" onerror="this.style.display=\'none\'"></div>')}function m(e,t){return e.w('<div class="play-btn-container full-screen-container"><video src="').f(t.get(["previewVideo"],!1),t,"h").w('" id="preview-video-player" crossorigin="anonymous" playsinline loop /></div>')}function v(e,t){return e.w('<div id="hvMainPlayPause" class="main-play-pause"></div><div id="hvRclickOptions" class="hv-rclick-options hide" oncontextmenu="return false;"><ul><li id="hvRclickCopy" class="hv-rclick-copy">').f(t.getPath(!1,["newPlayer","copyLinkAndThumbnail"]),t,"h").w('</li><li class="hv-rclick-about">').f(t.getPath(!1,["newPlayer","aboutHippoVideo"]),t,"h").w("</li></ul></div>")}function y(e,t){return e.w('<div class="replay-btn-container full-screen-container hide"><span class="final-replybtn final-replybtn-click"><a class="replaythree replaybutton" width="20px" height="24px"><svg id="Layer_1" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 25.2 25.2"><path fill="#f47a58" d="M2.6 15.4c.7 2.5 2.4 4.7 4.8 6.1 4.9 2.8 11.2 1.1 14-3.8s1.1-11.2-3.8-14c-2.4-1.4-5.1-1.7-7.8-1-2.3.6-4.3 2-5.7 3.9l2.8-.2.2 2-4.4.3-2 .2-.2-2-.3-4.4 2-.2.2 2.9c1.7-2.3 4-3.9 6.8-4.7 3.2-.9 6.6-.4 9.5 1.2 6 3.4 8 11.1 4.6 17.1-.3.6-.7 1.1-1.1 1.6-3.8 4.7-10.6 6.1-16 3-2.9-1.7-4.9-4.4-5.8-7.5"/></svg></a></span></div>')}function b(e,t){return e.w('<div id="personalisedVideoLoading" class="personalised-video-loading"><div class="inner-container"><center><div class="bar-loading"><div></div><div></div><div></div><div></div></div></center></div></div>')}function w(e,t){return e.w('<div id="personalisedVideoLoading" class="personalised-video-loading-page"><div class="loader-wrap"><div class="rp-loader"></div></div></div>')}function E(e,t){return e.x(t.get(["controls"],!1),t,{block:_},{})}function _(e,t){return e.w('<div class="player-info muted-autoplay cursor-pointer hide"><img src="/svg/mute.svg" alt="volume" /> ').nx(t.get(["isMobilePlayer"],!1),t,{block:S},{}).w("</div>")}function S(e,t){return e.f(t.getPath(!1,["wizPlayer","clickToUnmute"]),t,"h")}function T(e,t){return e.w(" ").x(t.get(["controls"],!1),t,{block:C},{}).w(" ")}function C(e,t){return e.w('<div class="main-controls"><span class="backwardbtn" data-backward-value="5 sec"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"viewBox="70 10 40 40" style="enable-background:new 70 10 40 40;" xml:space="preserve"><g><path transform="translate(0,0)" stroke="#F47A58" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="transparent" d="M101.5,23.7v15.5c0,1.1-1.3,1.8-2.2,1.2l-12.8-8.2c-0.9-0.6-0.9-1.9,0-2.4l13.8-8.8 M101.5,20.2"/></g><g><path transform="translate(0,0)" stroke="#F47A58" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="transparent" d="M91.2,39.1v0.5c0,1.1-1.3,1.8-2.2,1.2l-12.8-8.2c-0.9-0.6-0.9-1.9,0-2.4L90,21.4 M91.2,20.6"/></g><line transform="translate(0,0)" stroke="#F47A58" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="transparent" x1="90" y1="21.4" x2="90" y2="26.9"/></svg></span><span class="final-plybtn final-plybtn-click main-plyBtn"><a class="playthree playbutton" width="20px" height="24px"><svg viewBox="0 0 24 24" version="1.1" xmlns="https://www.w3.org/2000/svg" xmlns:xlink="https://www.w3.org/1999/xlink" style="overflow: visible;"><g transform="translate(0,0)" stroke="#F47A58" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" fill="transparent"><path id="playbtnpath" class="playthreepath" d="M1,1.618034 L1,1.618034 L21.763932,12 L1,22.381966 L1,12 Z" id="Triangle2"></path></g></svg></a></span><span class="forwardbtn" data-forward-value="5 sec"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"viewBox="16 10 40 40" style="enable-background:new 16 10 40 40;" xml:space="preserve"><g><path transform="translate(0,0)" stroke="#F47A58" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="transparent" d="M24.5,23.7v15.5c0,1.1,1.3,1.8,2.2,1.2l12.8-8.2c0.9-0.6,0.9-1.9,0-2.4L25.8,21 M24.5,20.2"/></g><g><path transform="translate(0,0)" stroke="#F47A58" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="transparent" d="M34.8,39.1v0.5c0,1.1,1.3,1.8,2.2,1.2l12.8-8.2c0.9-0.6,0.9-1.9,0-2.4L36,21.4 M34.8,20.6"/></g><line transform="translate(0,0)" stroke="#F47A58" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="transparent" x1="36" y1="21.4" x2="36" y2="26.9"/></svg></span></div>')}function k(e,t){return e.w('<div class="canvas-preview-container ').nx(t.get(["showComments"],!1),t,{else:x,block:P},{}).w('" id="canvasPreviewContainer" style="display:none;"><canvas class="quickpreview-canvas" width=128 height=72></canvas> ').x(t.get(["showComments"],!1),t,{block:R},{}).w(" ").x(t.get(["showSetFrame"],!1),t,{block:D},{}).w(" ").x(t.get(["showReactions"],!1),t,{block:O},{}).w('<input type="hidden" id="canvasHoverTime" /></div><div class="subtitles-line" id="subtitlesTrack"></div><div class="notification-line-onplay"></div><div class="cta-indicator hide"><div id="ctaIndicatorInner" class="cta-indicator-inner"></div></div><div id="chapterIndicatorId" class="hp-indicator hide"></div><div class="player-progress for-reactions disp-none"><div class="click-area-extended"></div></div>').x(t.get(["controls"],!1),t,{block:N},{}).x(t.get(["canShowDeliveryDownload"],!1),t,{block:Y},{}).x(t.get(["controls"],!1),t,{block:K},{}).w('<div id="ctaPlayerComps" class="cta-player-comps hide"></div><div id="ctaPlayerAddComp" class="cta-player-add-container hide"></div>')}function x(e,t){return e.w(" ").nx(t.get(["showReactions"],!1),t,{block:A},{})}function A(e,t){return e.w(" canvas-only-comment")}function P(e,t){return e.nx(t.get(["showReactions"],!1),t,{block:I},{}).w(" ")}function I(e,t){return e.w(" canvas-only ")}function R(e,t){return e.w('<div class="preview-add-comment" id="addCommentFromCanvas"><img src="/img/icon-discussions-white.png" /></div>')}function D(e,t){return e.w('<h6 class="set-frame-btn">').f(t.getPath(!1,["wizPlayer","setTheFrame"]),t,"h").w("</h6>")}function O(e,t){return e.w('<div class="emoji-wrap"><span><img class="react-now-play" reaction_id="1" id="reaction_id-1" src="/svg/emoji-type-1.svg" width="16"></span><span><img class="react-now-play" reaction_id="2" id="reaction_id-2" src="/svg/emoji-type-2.svg" width="16"></span><span><img class="react-now-play" reaction_id="3" id="reaction_id-3" src="/svg/emoji-type-3.svg" width="16"></span><span><img class="react-now-play" reaction_id="4" id="reaction_id-4" src="/svg/emoji-type-4.svg" width="16"></span><span><img class="react-now-play" reaction_id="5" id="reaction_id-5" src="/svg/emoji-type-5.svg" width="16"></span><span><img class="react-now-play" reaction_id="6" id="reaction_id-6" src="/svg/emoji-type-6.svg" width="16"></span></div>')}function N(e,t){return e.w('<div class="controls clear-float player-controls-wrapper player-controls-container"><div class="playbtn-container final-plybtn-click btn-play-click"><a class="solidply"><svg viewBox="0 0 17 24" width="17px" height="24px"><g stroke="#FFFFFF" stroke-linecap="round" stroke-linejoin="round" fill="#FFFFFF"><path class="solidply1" d="M1,1 L1,1 1,11 16,11 16,11 Z"></path><path class="solidply2" d="M1,11 L1,11 1,22 16,11 16,11 Z"></path></g></svg></a></div><div class="duration-container"><div class="video-buffered-container"></div><div class="end-time-container"><span class="end-time"></span><div class="buffer-container"></div></div><div class="current-time-container"><div class="current-time-bg"></div><span class="current-time"></span></div></div>').x(t.get(["audioControl"],!1),t,{block:L},{}).x(t.get(["settingControl"],!1),t,{block:U},{}).x(t.get(["fullscreenControl"],!1),t,{block:H},{}).w(" ").x(t.get(["canPlayerLogoView"],!1),t,{block:j},{}).w("</div>")}function L(e,t){return e.w('<div class="volume-container">').x(t.get(["isContainsAudio"],!1),t,{else:M,block:F},{}).w("</div>")}function M(e,t){return e.w('<span class="no-audio-box"><img class="audio-img mute player-volume" src="/svg/no-audio-mute.svg" alt="volume" width="15" /><div class="no-audio-pop">This video has no audio</div></span>')}function F(e,t){return e.w('<a class="volumebtn volumeon volume60" height="20px"><img src="/svg/volume.svg"><span class="mute-line"></span><span class="volume-curve"><i class="curve1"></i><i class="curve2"></i><i class="curve3"></i></span></a><div class="volume-slider-wrapper"><div class="volume-slider-container"><div class="volume-slider"></div></div></div>')}function U(e,t){return e.w('<div class="settings-container"><span class="settingsbtn-container"><a class="settingsbtn"><img src="/svg/icon-settings.svg"></a></span><div class="settings-options-wrapper"><div class="settings-options-container"><ul>').x(t.get(["showSpeedSettings"],!1),t,{block:B},{}).x(t.get(["subtitlesEnabled"],!1),t,{block:V},{}).x(t.get(["qualityControl"],!1),t,{block:z},{}).w('</ul><span class="selectedpointer"></span></div></div></div>')}function B(e,t){return e.w('<li id="speedControl"><a id="speedInfo">1x - Speed</a><div class="settings-suboptions-wrapper"><ul class="settings-suboptions" id="speedControlWrapper"><li data-id="0.5"><i></i><a>0.5X</a></li><li class="selected" data-id="1"><i></i><a>1x</a></li><li data-id="1.5"><i></i><a>1.5x</a></li><li data-id="2"><i></i><a>2x</a></li><li data-id="5"><i></i><a>5x</a></li></ul></div></li>')}function V(e,t){return e.w('<li id="subtitles"><a>Subtitles</a><div class="settings-suboptions-wrapper"><ul class="settings-suboptions" id="subtitleWrapper"><li data-value="on"><i></i><a>On</a></li><li class="selected" data-value="off"><i></i><a>Off</a></li></ul></div></li>')}function z(e,t){return e.w('<li id="qualityConrols"><a id="qualityinfo">Auto</a><div class="settings-suboptions-wrapper"><ul class="settings-suboptions" id="qualityControlWrapper"></ul></div></li>')}function H(e,t){return e.w('<div class="screensize-container"><a class="screensizebtn"><i class="ss1"></i><i class="ss2"></i><i class="ss3"></i><i class="ss4"></i></a></div>')}function j(e,t){return e.w('<div class="logo-container">').x(t.get(["playerLogo"],!1),t,{else:q,block:G},{}).w("</div>")}function q(e,t){return e.w('<a href="https://www.hippovideo.io/" target="_blank"><img src="/svg/hippo-player-logo.svg" alt="logo" /></a>')}function G(e,t){return e.w("<a ").x(t.get(["addLinkToPlayerLogo"],!1),t,{block:W},{}).w(' target="_blank"><img src="').f(t.get(["playerLogo"],!1),t,"h").w('" alt="logo" /></a>')}function W(e,t){return e.x(t.get(["playerLogoLink"],!1),t,{block:$},{})}function $(e,t){return e.w('href="').f(t.get(["playerLogoLink"],!1),t,"h").w('" ')}function Y(e,t){return e.w('<div class="hv-player-download"></div>')}function K(e,t){return e.w('<div class="duration-container duration-container-fullscreen disp-none"><div class="current-time-container"><div class="current-time-bg"></div></div></div>')}function J(e,t){return e.w(" ").h("eq",t,{},{value:0},"h").w(" ").h("eq",t,{},{value:3},"h").w(" ").h("eq",t,{},{value:4},"h").w(" ").h("any",t,{block:X},{},"h").w(" ")}function X(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/access-denied.svg"><h3>').h("eq",t,{else:Q,block:Z},{key:t.get(["privacy"],!1),value:3},"h").w("</h3></div>")}function Q(e,t){return e.f(t.getPath(!1,["wizPlayer","permissionToView"]),t,"h")}function Z(e,t){return e.f(t.getPath(!1,["wizPlayer","watchExpired"]),t,"h")}function ee(e,t){return e.w(" ").h("eq",t,{},{value:5},"h").w(" ").h("eq",t,{},{value:6},"h").w(" ").h("any",t,{block:te},{},"h").w(" ")}function te(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","accountDeactivated"]),t,"h").w("</h3></div>")}function ie(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","limitExceeded"]),t,"h").w('</h3><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","contactOwner"]),t,"h").w("</h3></div>")}function ne(e,t){return e.w('<div class="medium-12 columns password-pop text-center"><img class="lock-icon" style="width: 80px;height: 80px;" src="/svg/password-lock.svg"><div class="small-4 columns large-centered small-centered"><input type="password" class="form-control password-holder vdoPlayerPwdField" placeholder="').f(t.getPath(!1,["wizPlayer","enterPassword"]),t,"h").w('"><span class="pwd-error hide">').f(t.getPath(!1,["wizPlayer","passwordInvalid"]),t,"h").w('</span><a class="button wiz-overlay-btn passwordGoBtn">').f(t.getPath(!1,["wizPlayer","go"]),t,"h").w("</a></div></div>")}function re(e,t){return e.w('<div class="video-container hippo-video-player hv-new-player" id=').f(t.get(["id"],!1),t,"h").w('><div id="personalisedVideoLoading" class="personalised-video-loading-page" style="display: block;"><div class="loader-wrap"><div class="rp-loader"></div></div></div></div>')}function oe(e,t){return e.w('<div class="video-container hippo-video-player hv-new-player" id=').f(t.get(["id"],!1),t,"h").w(">").h("select",t,{block:ae},{key:t.get(["privacy"],!1)},"h").w(" ").h("select",t,{block:ce},{key:t.get(["privacy"],!1)},"h").w(" ").h("eq",t,{block:he},{key:t.get(["privacy"],!1),value:7},"h").w(" ").h("eq",t,{block:pe},{key:t.get(["privacy"],!1),value:2},"h").w("</div>")}function ae(e,t){return e.w(" ").h("eq",t,{},{value:0},"h").w(" ").h("eq",t,{},{value:3},"h").w(" ").h("eq",t,{},{value:4},"h").w(" ").h("any",t,{block:se},{},"h").w(" ")}function se(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/access-denied.svg"><h3>').h("eq",t,{else:le,block:ue},{key:t.get(["privacy"],!1),value:3},"h").w("</h3></div>")}function le(e,t){return e.f(t.getPath(!1,["wizPlayer","permissionToView"]),t,"h")}function ue(e,t){return e.f(t.getPath(!1,["wizPlayer","watchExpired"]),t,"h")}function ce(e,t){return e.w(" ").h("eq",t,{},{value:5},"h").w(" ").h("eq",t,{},{value:6},"h").w(" ").h("any",t,{block:de},{},"h").w(" ")}function de(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","accountDeactivated"]),t,"h").w("</h3></div>")}function he(e,t){return e.w('<div class="medium-12 columns access-denied-pop text-center"><img class="access-denied-icon" src="/svg/warning.svg" width="80"><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","limitExceeded"]),t,"h").w('</h3><h3 class="delete-video-msg">').f(t.getPath(!1,["wizPlayer","contactOwner"]),t,"h").w("</h3></div>")}function pe(e,t){return e.w('<div class="medium-12 columns password-pop text-center"><img class="lock-icon" style="width: 80px;height: 80px;" src="/svg/password-lock.svg"><div class="small-4 columns large-centered small-centered"><input type="password" class="form-control password-holder vdoPlayerPwdField" placeholder="').f(t.getPath(!1,["wizPlayer","enterPassword"]),t,"h").w('"><span class="pwd-error hide">').f(t.getPath(!1,["wizPlayer","passwordInvalid"]),t,"h").w('</span><a class="button wiz-overlay-btn passwordGoBtn">').f(t.getPath(!1,["wizPlayer","go"]),t,"h").w("</a></div></div>")}e.register("templates/component/NewPlayerView",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0,h.__dustBody=!0,p.__dustBody=!0,f.__dustBody=!0,g.__dustBody=!0,m.__dustBody=!0,v.__dustBody=!0,y.__dustBody=!0,b.__dustBody=!0,w.__dustBody=!0,E.__dustBody=!0,_.__dustBody=!0,S.__dustBody=!0,T.__dustBody=!0,C.__dustBody=!0,k.__dustBody=!0,x.__dustBody=!0,A.__dustBody=!0,P.__dustBody=!0,I.__dustBody=!0,R.__dustBody=!0,D.__dustBody=!0,O.__dustBody=!0,N.__dustBody=!0,L.__dustBody=!0,M.__dustBody=!0,F.__dustBody=!0,U.__dustBody=!0,B.__dustBody=!0,V.__dustBody=!0,z.__dustBody=!0,H.__dustBody=!0,j.__dustBody=!0,q.__dustBody=!0,G.__dustBody=!0,W.__dustBody=!0,$.__dustBody=!0,Y.__dustBody=!0,K.__dustBody=!0,J.__dustBody=!0,X.__dustBody=!0,Q.__dustBody=!0,Z.__dustBody=!0,ee.__dustBody=!0,te.__dustBody=!0,ie.__dustBody=!0,ne.__dustBody=!0,re.__dustBody=!0,oe.__dustBody=!0,ae.__dustBody=!0,se.__dustBody=!0,le.__dustBody=!0,ue.__dustBody=!0,ce.__dustBody=!0,de.__dustBody=!0,he.__dustBody=!0,pe.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/component/NewPlayerView",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){"use strict";i.r(t);i(62),i(96),i(183),i(164),i(51),i(94),i(24),i(134),i(110),i(67),i(93);var n={getImportedImageInfo:function(e){var t=e.upload_type,i={};return"local_file"===t?(i.upload_type="local_file",i.file_name=e.name,i.size=e.size,i.description=e.description||e.name):"existing_media"===t?(i.upload_type="existing_media",i.video_id=e.id):"gdrive"===t?(i.upload_type="gdrive",i.id=e.id,i.token_id=e.token_id):"url"===t&&(i.upload_type="url",i.url=e.url),i.contains_image=!0,i},getMfImage:function(e,t){var i=document.createElement("canvas");i.width=2e3,i.height=1125;var n=i.getContext("2d");n.fillStyle="white",n.fillRect(0,0,i.width,i.height),n.fillStyle="#2a2a2a";var r="image"===t?"360px":"300px";n.font="700 "+r+" Open Sans";var o="image"===t?"IMAGE":"WEBSITE";n.fillText("$"+o+e+"$",100,500),n.fillStyle="#969ca2",n.font="170px Open Sans";var a="G O E S H E R E".split("").join(String.fromCharCode(8201));return n.fillText(a,110,800),i.toDataURL("image/png")},getNewImageMfId:function(e,t){for(var i=[],n=[],r="image"===t,o=0;o<e.clips.length;o++){var a=e.clips[o];"image-mf"===a.footage.type&&(r?void 0!==a.footage.is_website&&"false"!==a.footage.is_website.toString()||(a.footage.image_id?n.push(Number(a.footage.image_id)):n.push(Number(a.footage.id))):a.footage.is_website&&"true"===a.footage.is_website.toString()&&n.push(Number(a.footage.image_id)),i.push(Number(a.footage.id)))}var s=this.getId(i);return{imageId:this.getId(n),footageId:s}},getId:function(e){for(var t=1;e.includes(t);)++t;return t}};t.default=n},function(e,t,i){"use strict";i.r(t);i(135),i(24);var n=i(2),r=i.n(n),o={getPaletteConfig:function(e,t,i){var n=this,o={};return(HippoVideo.data.api.getProperty("showBrandingColorPalette")||i)&&(o={showSelectionPalette:!1,showPalette:!0,hideAfterPaletteSelect:!0,beforeShow:function(){var e=r()("."+t);return e.find("#showMoreContainer").remove(),e.addClass("palette-view"),e.find(".sp-picker-container .sp-top, .sp-picker-container .sp-input-container").hide(),e.find(".sp-picker-container").prepend("<div id='showMoreContainer'><div id='showMoreOption'>+ More Colors</div></div>"),e.find("#showMoreOption").off("click").on("click",{containerClassName:t,self:n},n.handleShowMore),!0},palette:[e]}),o},handleShowMore:function(e){var t=r()("."+e.data.containerClassName);e.data.self.showColorPicker(t)},showColorPicker:function(e){e.find(".sp-picker-container .sp-top, .sp-picker-container .sp-input-container").show(),e.removeClass("palette-view"),e.find("#showMoreContainer").remove()}};t.default=o},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="sticker-family-container sticker-family-container-').f(t.get(["i"],!1),t,"h").w('"><img class="sticker-family-main" src = "').f(t.get(["mainImg"],!1),t,"h").w('" id="sticker-family-main-').f(t.get(["i"],!1),t,"h").w('"><div class="custom-scroll sticker-family-all hide"></div></div>')}e.register("templates/simple_edit/sticker_family",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/simple_edit/sticker_family",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){(function(e){!function(t){"use strict";var n,r;function o(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function a(e,t){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=t,this.destLen=0,this.ltree=new o,this.dtree=new o}String.prototype.codePointAt||(n=function(){try{var e={},t=Object.defineProperty,i=t(e,e,e)&&t}catch(e){}return i}(),r=function(e){if(null==this)throw TypeError();var t=String(this),i=t.length,n=e?Number(e):0;if(n!=n&&(n=0),!(n<0||i<=n)){var r,o=t.charCodeAt(n);return 55296<=o&&o<=56319&&n+1<i&&56320<=(r=t.charCodeAt(n+1))&&r<=57343?1024*(o-55296)+r-56320+65536:o}},n?n(String.prototype,"codePointAt",{value:r,configurable:!0,writable:!0}):String.prototype.codePointAt=r);var s=new o,l=new o,u=new Uint8Array(30),c=new Uint16Array(30),d=new Uint8Array(30),h=new Uint16Array(30),p=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f=new o,g=new Uint8Array(320);function m(e,t,i,n){var r,o;for(r=0;r<i;++r)e[r]=0;for(r=0;r<30-i;++r)e[r+i]=r/i|0;for(o=n,r=0;r<30;++r)t[r]=o,o+=1<<e[r]}var v=new Uint16Array(16);function y(e,t,i,n){var r,o;for(r=0;r<16;++r)e.table[r]=0;for(r=0;r<n;++r)e.table[t[i+r]]++;for(r=o=e.table[0]=0;r<16;++r)v[r]=o,o+=e.table[r];for(r=0;r<n;++r)t[i+r]&&(e.trans[v[t[i+r]]++]=r)}function b(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var t=1&e.tag;return e.tag>>>=1,t}function w(e,t,i){if(!t)return i;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,n+i}function E(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;for(var i=0,n=0,r=0,o=e.tag;n=2*n+(1&o),o>>>=1,++r,i+=t.table[r],0<=(n-=t.table[r]););return e.tag=o,e.bitcount-=r,t.trans[i+n]}function _(e,t,i){var n,r,o,a,s,l;for(n=w(e,5,257),r=w(e,5,1),o=w(e,4,4),a=0;a<19;++a)g[a]=0;for(a=0;a<o;++a){var u=w(e,3,0);g[p[a]]=u}for(y(f,g,0,19),s=0;s<n+r;){var c=E(e,f);switch(c){case 16:var d=g[s-1];for(l=w(e,2,3);l;--l)g[s++]=d;break;case 17:for(l=w(e,3,3);l;--l)g[s++]=0;break;case 18:for(l=w(e,7,11);l;--l)g[s++]=0;break;default:g[s++]=c}}y(t,g,0,n),y(i,g,n,r)}function S(e,t,i){for(;;){var n,r,o,a,s=E(e,t);if(256===s)return 0;if(s<256)e.dest[e.destLen++]=s;else for(n=w(e,u[s-=257],c[s]),r=E(e,i),a=o=e.destLen-w(e,d[r],h[r]);a<o+n;++a)e.dest[e.destLen++]=e.dest[a]}}function T(e){for(var t,i;8<e.bitcount;)e.sourceIndex--,e.bitcount-=8;if((t=256*(t=e.source[e.sourceIndex+1])+e.source[e.sourceIndex])!==(65535&~(256*e.source[e.sourceIndex+3]+e.source[e.sourceIndex+2])))return-3;for(e.sourceIndex+=4,i=t;i;--i)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,0}function C(e,t,i,n,r){return Math.pow(1-r,3)*e+3*Math.pow(1-r,2)*r*t+3*(1-r)*Math.pow(r,2)*i+Math.pow(r,3)*n}function k(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}function x(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}function A(e){throw new Error(e)}function P(e,t){e||A(t)}!function(e,t){var i;for(i=0;i<7;++i)e.table[i]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,i=0;i<24;++i)e.trans[i]=256+i;for(i=0;i<144;++i)e.trans[24+i]=i;for(i=0;i<8;++i)e.trans[168+i]=280+i;for(i=0;i<112;++i)e.trans[176+i]=144+i;for(i=0;i<5;++i)t.table[i]=0;for(t.table[5]=32,i=0;i<32;++i)t.trans[i]=i}(s,l),m(u,c,4,3),m(d,h,2,1),u[28]=0,c[28]=258,k.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},k.prototype.addPoint=function(e,t){"number"==typeof e&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),"number"==typeof t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))},k.prototype.addX=function(e){this.addPoint(e,null)},k.prototype.addY=function(e){this.addPoint(null,e)},k.prototype.addBezier=function(e,t,i,n,r,o,a,s){var l=this,u=[e,t],c=[i,n],d=[r,o],h=[a,s];this.addPoint(e,t),this.addPoint(a,s);for(var p=0;p<=1;p++){var f=6*u[p]-12*c[p]+6*d[p],g=-3*u[p]+9*c[p]-9*d[p]+3*h[p],m=3*c[p]-3*u[p];if(0!==g){var v=Math.pow(f,2)-4*m*g;if(!(v<0)){var y=(-f+Math.sqrt(v))/(2*g);0<y&&y<1&&(0===p&&l.addX(C(u[p],c[p],d[p],h[p],y)),1===p&&l.addY(C(u[p],c[p],d[p],h[p],y)));var b=(-f-Math.sqrt(v))/(2*g);0<b&&b<1&&(0===p&&l.addX(C(u[p],c[p],d[p],h[p],b)),1===p&&l.addY(C(u[p],c[p],d[p],h[p],b)))}}else{if(0===f)continue;var w=-m/f;0<w&&w<1&&(0===p&&l.addX(C(u[p],c[p],d[p],h[p],w)),1===p&&l.addY(C(u[p],c[p],d[p],h[p],w)))}}},k.prototype.addQuad=function(e,t,i,n,r,o){var a=e+2/3*(i-e),s=t+2/3*(n-t),l=a+1/3*(r-e),u=s+1/3*(o-t);this.addBezier(e,t,a,s,l,u,r,o)},x.prototype.moveTo=function(e,t){this.commands.push({type:"M",x:e,y:t})},x.prototype.lineTo=function(e,t){this.commands.push({type:"L",x:e,y:t})},x.prototype.curveTo=x.prototype.bezierCurveTo=function(e,t,i,n,r,o){this.commands.push({type:"C",x1:e,y1:t,x2:i,y2:n,x:r,y:o})},x.prototype.quadTo=x.prototype.quadraticCurveTo=function(e,t,i,n){this.commands.push({type:"Q",x1:e,y1:t,x:i,y:n})},x.prototype.close=x.prototype.closePath=function(){this.commands.push({type:"Z"})},x.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof k){var t=e;return this.moveTo(t.x1,t.y1),this.lineTo(t.x2,t.y1),this.lineTo(t.x2,t.y2),this.lineTo(t.x1,t.y2),void this.close()}Array.prototype.push.apply(this.commands,e)},x.prototype.getBoundingBox=function(){for(var e=new k,t=0,i=0,n=0,r=0,o=0;o<this.commands.length;o++){var a=this.commands[o];switch(a.type){case"M":e.addPoint(a.x,a.y),t=n=a.x,i=r=a.y;break;case"L":e.addPoint(a.x,a.y),n=a.x,r=a.y;break;case"Q":e.addQuad(n,r,a.x1,a.y1,a.x,a.y),n=a.x,r=a.y;break;case"C":e.addBezier(n,r,a.x1,a.y1,a.x2,a.y2,a.x,a.y),n=a.x,r=a.y;break;case"Z":n=t,r=i;break;default:throw new Error("Unexpected path command "+a.type)}}return e.isEmpty()&&e.addPoint(0,0),e},x.prototype.draw=function(e){e.beginPath();for(var t=0;t<this.commands.length;t+=1){var i=this.commands[t];"M"===i.type?e.moveTo(i.x,i.y):"L"===i.type?e.lineTo(i.x,i.y):"C"===i.type?e.bezierCurveTo(i.x1,i.y1,i.x2,i.y2,i.x,i.y):"Q"===i.type?e.quadraticCurveTo(i.x1,i.y1,i.x,i.y):"Z"===i.type&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())},x.prototype.toPathData=function(e){function t(){for(var t,i=arguments,n="",r=0;r<arguments.length;r+=1){var o=i[r];0<=o&&0<r&&(n+=" "),n+=(t=o,Math.round(t)===t?""+Math.round(t):t.toFixed(e))}return n}e=void 0!==e?e:2;for(var i="",n=0;n<this.commands.length;n+=1){var r=this.commands[n];"M"===r.type?i+="M"+t(r.x,r.y):"L"===r.type?i+="L"+t(r.x,r.y):"C"===r.type?i+="C"+t(r.x1,r.y1,r.x2,r.y2,r.x,r.y):"Q"===r.type?i+="Q"+t(r.x1,r.y1,r.x,r.y):"Z"===r.type&&(i+="Z")}return i},x.prototype.toSVG=function(e){var t='<path d="';return t+=this.toPathData(e),t+='"',this.fill&&"black"!==this.fill&&(null===this.fill?t+=' fill="none"':t+=' fill="'+this.fill+'"'),this.stroke&&(t+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),t+"/>"},x.prototype.toDOMElement=function(e){var t=this.toPathData(e),i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i};var I={fail:A,argument:P,assert:P},R=2147483648,D={},O={},N={};function L(e){return function(){return e}}O.BYTE=function(e){return I.argument(0<=e&&e<=255,"Byte value should be between 0 and 255."),[e]},N.BYTE=L(1),O.CHAR=function(e){return[e.charCodeAt(0)]},N.CHAR=L(1),O.CHARARRAY=function(e){for(var t=[],i=0;i<e.length;i+=1)t[i]=e.charCodeAt(i);return t},N.CHARARRAY=function(e){return e.length},O.USHORT=function(e){return[e>>8&255,255&e]},N.USHORT=L(2),O.SHORT=function(e){return 32768<=e&&(e=-(65536-e)),[e>>8&255,255&e]},N.SHORT=L(2),O.UINT24=function(e){return[e>>16&255,e>>8&255,255&e]},N.UINT24=L(3),O.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},N.ULONG=L(4),O.LONG=function(e){return R<=e&&(e=-(2*R-e)),[e>>24&255,e>>16&255,e>>8&255,255&e]},N.LONG=L(4),O.FIXED=O.ULONG,N.FIXED=N.ULONG,O.FWORD=O.SHORT,N.FWORD=N.SHORT,O.UFWORD=O.USHORT,N.UFWORD=N.USHORT,O.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,255&e]},N.LONGDATETIME=L(8),O.TAG=function(e){return I.argument(4===e.length,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},N.TAG=L(4),O.Card8=O.BYTE,N.Card8=N.BYTE,O.Card16=O.USHORT,N.Card16=N.USHORT,O.OffSize=O.BYTE,N.OffSize=N.BYTE,O.SID=O.USHORT,N.SID=N.USHORT,O.NUMBER=function(e){return-107<=e&&e<=107?[e+139]:108<=e&&e<=1131?[247+((e-=108)>>8),255&e]:-1131<=e&&e<=-108?[251+((e=-e-108)>>8),255&e]:-32768<=e&&e<=32767?O.NUMBER16(e):O.NUMBER32(e)},N.NUMBER=function(e){return O.NUMBER(e).length},O.NUMBER16=function(e){return[28,e>>8&255,255&e]},N.NUMBER16=L(3),O.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,255&e]},N.NUMBER32=L(5),O.REAL=function(e){var t=e.toString(),i=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);if(i){var n=parseFloat("1e"+((i[2]?+i[2]:0)+i[1].length));t=(Math.round(e*n)/n).toString()}for(var r="",o=0,a=t.length;o<a;o+=1){var s=t[o];r+="e"===s?"-"===t[++o]?"c":"b":"."===s?"a":"-"===s?"e":s}for(var l=[30],u=0,c=(r+=1&r.length?"f":"ff").length;u<c;u+=2)l.push(parseInt(r.substr(u,2),16));return l},N.REAL=function(e){return O.REAL(e).length},O.NAME=O.CHARARRAY,N.NAME=N.CHARARRAY,O.STRING=O.CHARARRAY,N.STRING=N.CHARARRAY,D.UTF8=function(e,t,i){for(var n=[],r=i,o=0;o<r;o++,t+=1)n[o]=e.getUint8(t);return String.fromCharCode.apply(null,n)},D.UTF16=function(e,t,i){for(var n=[],r=i/2,o=0;o<r;o++,t+=2)n[o]=e.getUint16(t);return String.fromCharCode.apply(null,n)},O.UTF16=function(e){for(var t=[],i=0;i<e.length;i+=1){var n=e.charCodeAt(i);t[t.length]=n>>8&255,t[t.length]=255&n}return t},N.UTF16=function(e){return 2*e.length};var M={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"};D.MACSTRING=function(e,t,i,n){var r=M[n];if(void 0!==r){for(var o="",a=0;a<i;a++){var s=e.getUint8(t+a);o+=s<=127?String.fromCharCode(s):r[127&s]}return o}};var F,U="function"==typeof WeakMap&&new WeakMap;function B(e){return-128<=e&&e<=127}function V(e,t,i){for(var n=0,r=e.length;t<r&&n<64&&0===e[t];)++t,++n;return i.push(128|n-1),t}function z(e,t,i){for(var n=0,r=e.length,o=t;o<r&&n<64;){var a=e[o];if(!B(a))break;if(0===a&&o+1<r&&0===e[o+1])break;++o,++n}i.push(n-1);for(var s=t;s<o;++s)i.push(e[s]+256&255);return o}function H(e,t,i){for(var n=0,r=e.length,o=t;o<r&&n<64;){var a=e[o];if(0===a)break;if(B(a)&&o+1<r&&B(e[o+1]))break;++o,++n}i.push(64|n-1);for(var s=t;s<o;++s){var l=e[s];i.push(l+65536>>8&255,l+256&255)}return o}O.MACSTRING=function(e,t){var i=function(e){if(!F)for(var t in F={},M)F[t]=new String(t);var i=F[e];if(void 0!==i){if(U){var n=U.get(i);if(void 0!==n)return n}var r=M[e];if(void 0!==r){for(var o={},a=0;a<r.length;a++)o[r.charCodeAt(a)]=a+128;return U&&U.set(i,o),o}}}(t);if(void 0!==i){for(var n=[],r=0;r<e.length;r++){var o=e.charCodeAt(r);if(128<=o&&void 0===(o=i[o]))return;n[r]=o}return n}},N.MACSTRING=function(e,t){var i=O.MACSTRING(e,t);return void 0!==i?i.length:0},O.VARDELTAS=function(e){for(var t=0,i=[];t<e.length;){var n=e[t];t=0===n?V(e,t,i):-128<=n&&n<=127?z(e,t,i):H(e,t,i)}return i},O.INDEX=function(e){for(var t=1,i=[t],n=[],r=0;r<e.length;r+=1){var o=O.OBJECT(e[r]);Array.prototype.push.apply(n,o),t+=o.length,i.push(t)}if(0===n.length)return[0,0];for(var a=[],s=1+Math.floor(Math.log(t)/Math.log(2))/8|0,l=[void 0,O.BYTE,O.USHORT,O.UINT24,O.ULONG][s],u=0;u<i.length;u+=1){var c=l(i[u]);Array.prototype.push.apply(a,c)}return Array.prototype.concat(O.Card16(e.length),O.OffSize(s),a,n)},N.INDEX=function(e){return O.INDEX(e).length},O.DICT=function(e){for(var t=[],i=Object.keys(e),n=i.length,r=0;r<n;r+=1){var o=parseInt(i[r],0),a=e[o];t=(t=t.concat(O.OPERAND(a.value,a.type))).concat(O.OPERATOR(o))}return t},N.DICT=function(e){return O.DICT(e).length},O.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},O.OPERAND=function(e,t){var i=[];if(Array.isArray(t))for(var n=0;n<t.length;n+=1)I.argument(e.length===t.length,"Not enough arguments given for type"+t),i=i.concat(O.OPERAND(e[n],t[n]));else if("SID"===t)i=i.concat(O.NUMBER(e));else if("offset"===t)i=i.concat(O.NUMBER32(e));else if("number"===t)i=i.concat(O.NUMBER(e));else{if("real"!==t)throw new Error("Unknown operand type "+t);i=i.concat(O.REAL(e))}return i},O.OP=O.BYTE,N.OP=N.BYTE;var j="function"==typeof WeakMap&&new WeakMap;function q(e,t,i){for(var n=0;n<t.length;n+=1){var r=t[n];this[r.name]=r.value}if(this.tableName=e,this.fields=t,i)for(var o=Object.keys(i),a=0;a<o.length;a+=1){var s=o[a],l=i[s];void 0!==this[s]&&(this[s]=l)}}function G(e,t,i){void 0===i&&(i=t.length);var n=new Array(t.length+1);n[0]={name:e+"Count",type:"USHORT",value:i};for(var r=0;r<t.length;r++)n[r+1]={name:e+r,type:"USHORT",value:t[r]};return n}function W(e,t,i){var n=t.length,r=new Array(n+1);r[0]={name:e+"Count",type:"USHORT",value:n};for(var o=0;o<n;o++)r[o+1]={name:e+o,type:"TABLE",value:i(t[o],o)};return r}function $(e,t,i){var n=t.length,r=[];r[0]={name:e+"Count",type:"USHORT",value:n};for(var o=0;o<n;o++)r=r.concat(i(t[o],o));return r}function Y(e){1===e.format?q.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(G("glyph",e.glyphs))):I.assert(!1,"Can't create coverage table format 2 yet.")}function K(e){q.call(this,"scriptListTable",$("scriptRecord",e,(function(e,t){var i=e.script,n=i.defaultLangSys;return I.assert(!!n,"Unable to write GSUB: script "+e.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:e.tag},{name:"script"+t,type:"TABLE",value:new q("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new q("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:n.reqFeatureIndex}].concat(G("featureIndex",n.featureIndexes)))}].concat($("langSys",i.langSysRecords,(function(e,t){var i=e.langSys;return[{name:"langSysTag"+t,type:"TAG",value:e.tag},{name:"langSys"+t,type:"TABLE",value:new q("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:i.reqFeatureIndex}].concat(G("featureIndex",i.featureIndexes)))}]}))))}]})))}function J(e){q.call(this,"featureListTable",$("featureRecord",e,(function(e,t){var i=e.feature;return[{name:"featureTag"+t,type:"TAG",value:e.tag},{name:"feature"+t,type:"TABLE",value:new q("featureTable",[{name:"featureParams",type:"USHORT",value:i.featureParams}].concat(G("lookupListIndex",i.lookupListIndexes)))}]})))}function X(e,t){q.call(this,"lookupListTable",W("lookup",e,(function(e){var i=t[e.lookupType];return I.assert(!!i,"Unable to write GSUB lookup type "+e.lookupType+" tables."),new q("lookupTable",[{name:"lookupType",type:"USHORT",value:e.lookupType},{name:"lookupFlag",type:"USHORT",value:e.lookupFlag}].concat(W("subtable",e.subtables,i)))})))}O.CHARSTRING=function(e){if(j){var t=j.get(e);if(void 0!==t)return t}for(var i=[],n=e.length,r=0;r<n;r+=1){var o=e[r];i=i.concat(O[o.type](o.value))}return j&&j.set(e,i),i},N.CHARSTRING=function(e){return O.CHARSTRING(e).length},O.OBJECT=function(e){var t=O[e.type];return I.argument(void 0!==t,"No encoding function for type "+e.type),t(e.value)},N.OBJECT=function(e){var t=N[e.type];return I.argument(void 0!==t,"No sizeOf function for type "+e.type),t(e.value)},O.TABLE=function(e){for(var t=[],i=e.fields.length,n=[],r=[],o=0;o<i;o+=1){var a=e.fields[o],s=O[a.type];I.argument(void 0!==s,"No encoding function for field type "+a.type+" ("+a.name+")");var l=e[a.name];void 0===l&&(l=a.value);var u=s(l);"TABLE"===a.type?(r.push(t.length),t=t.concat([0,0]),n.push(u)):t=t.concat(u)}for(var c=0;c<n.length;c+=1){var d=r[c],h=t.length;I.argument(h<65536,"Table "+e.tableName+" too big."),t[d]=h>>8,t[d+1]=255&h,t=t.concat(n[c])}return t},N.TABLE=function(e){for(var t=0,i=e.fields.length,n=0;n<i;n+=1){var r=e.fields[n],o=N[r.type];I.argument(void 0!==o,"No sizeOf function for field type "+r.type+" ("+r.name+")");var a=e[r.name];void 0===a&&(a=r.value),t+=o(a),"TABLE"===r.type&&(t+=2)}return t},O.RECORD=O.TABLE,N.RECORD=N.TABLE,O.LITERAL=function(e){return e},N.LITERAL=function(e){return e.length},q.prototype.encode=function(){return O.TABLE(this)},q.prototype.sizeOf=function(){return N.TABLE(this)};var Q={Table:q,Record:q,Coverage:(Y.prototype=Object.create(q.prototype)).constructor=Y,ScriptList:(K.prototype=Object.create(q.prototype)).constructor=K,FeatureList:(J.prototype=Object.create(q.prototype)).constructor=J,LookupList:(X.prototype=Object.create(q.prototype)).constructor=X,ushortList:G,tableList:W,recordList:$};function Z(e,t){return e.getUint8(t)}function ee(e,t){return e.getUint16(t,!1)}function te(e,t){return e.getUint32(t,!1)}function ie(e,t){return e.getInt16(t,!1)+e.getUint16(t+2,!1)/65535}var ne={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function re(e,t){this.data=e,this.offset=t,this.relativeOffset=0}re.prototype.parseByte=function(){var e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},re.prototype.parseChar=function(){var e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},re.prototype.parseCard8=re.prototype.parseByte,re.prototype.parseCard16=re.prototype.parseUShort=function(){var e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},re.prototype.parseSID=re.prototype.parseUShort,re.prototype.parseOffset16=re.prototype.parseUShort,re.prototype.parseShort=function(){var e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},re.prototype.parseF2Dot14=function(){var e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},re.prototype.parseOffset32=re.prototype.parseULong=function(){var e=te(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},re.prototype.parseFixed=function(){var e=ie(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},re.prototype.parseString=function(e){var t=this.data,i=this.offset+this.relativeOffset,n="";this.relativeOffset+=e;for(var r=0;r<e;r++)n+=String.fromCharCode(t.getUint8(i+r));return n},re.prototype.parseTag=function(){return this.parseString(4)},re.prototype.parseLongDateTime=function(){var e=te(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},re.prototype.parseVersion=function(e){var t=ee(this.data,this.offset+this.relativeOffset),i=ee(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,void 0===e&&(e=4096),t+i/e/10},re.prototype.skip=function(e,t){void 0===t&&(t=1),this.relativeOffset+=ne[e]*t},re.prototype.parseULongList=function(e){void 0===e&&(e=this.parseULong());for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getUint32(n),n+=4;return this.relativeOffset+=4*e,t},re.prototype.parseOffset16List=re.prototype.parseUShortList=function(e){void 0===e&&(e=this.parseUShort());for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getUint16(n),n+=2;return this.relativeOffset+=2*e,t},re.prototype.parseShortList=function(e){for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getInt16(n),n+=2;return this.relativeOffset+=2*e,t},re.prototype.parseByteList=function(e){for(var t=new Array(e),i=this.data,n=this.offset+this.relativeOffset,r=0;r<e;r++)t[r]=i.getUint8(n++);return this.relativeOffset+=e,t},re.prototype.parseList=function(e,t){t||(t=e,e=this.parseUShort());for(var i=new Array(e),n=0;n<e;n++)i[n]=t.call(this);return i},re.prototype.parseList32=function(e,t){t||(t=e,e=this.parseULong());for(var i=new Array(e),n=0;n<e;n++)i[n]=t.call(this);return i},re.prototype.parseRecordList=function(e,t){t||(t=e,e=this.parseUShort());for(var i=new Array(e),n=Object.keys(t),r=0;r<e;r++){for(var o={},a=0;a<n.length;a++){var s=n[a],l=t[s];o[s]=l.call(this)}i[r]=o}return i},re.prototype.parseRecordList32=function(e,t){t||(t=e,e=this.parseULong());for(var i=new Array(e),n=Object.keys(t),r=0;r<e;r++){for(var o={},a=0;a<n.length;a++){var s=n[a],l=t[s];o[s]=l.call(this)}i[r]=o}return i},re.prototype.parseStruct=function(e){if("function"==typeof e)return e.call(this);for(var t=Object.keys(e),i={},n=0;n<t.length;n++){var r=t[n],o=e[r];i[r]=o.call(this)}return i},re.prototype.parseValueRecord=function(e){if(void 0===e&&(e=this.parseUShort()),0!==e){var t={};return 1&e&&(t.xPlacement=this.parseShort()),2&e&&(t.yPlacement=this.parseShort()),4&e&&(t.xAdvance=this.parseShort()),8&e&&(t.yAdvance=this.parseShort()),16&e&&(t.xPlaDevice=void 0,this.parseShort()),32&e&&(t.yPlaDevice=void 0,this.parseShort()),64&e&&(t.xAdvDevice=void 0,this.parseShort()),128&e&&(t.yAdvDevice=void 0,this.parseShort()),t}},re.prototype.parseValueRecordList=function(){for(var e=this.parseUShort(),t=this.parseUShort(),i=new Array(t),n=0;n<t;n++)i[n]=this.parseValueRecord(e);return i},re.prototype.parsePointer=function(e){var t=this.parseOffset16();if(0<t)return new re(this.data,this.offset+t).parseStruct(e)},re.prototype.parsePointer32=function(e){var t=this.parseOffset32();if(0<t)return new re(this.data,this.offset+t).parseStruct(e)},re.prototype.parseListOfLists=function(e){for(var t=this,i=this.parseOffset16List(),n=i.length,r=this.relativeOffset,o=new Array(n),a=0;a<n;a++){var s=i[a];if(0!==s)if(t.relativeOffset=s,e){for(var l=t.parseOffset16List(),u=new Array(l.length),c=0;c<l.length;c++)t.relativeOffset=s+l[c],u[c]=e.call(t);o[a]=u}else o[a]=t.parseUShortList();else o[a]=void 0}return this.relativeOffset=r,o},re.prototype.parseCoverage=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort(),i=this.parseUShort();if(1===t)return{format:1,glyphs:this.parseUShortList(i)};if(2!==t)throw new Error("0x"+e.toString(16)+": Coverage format must be 1 or 2.");for(var n=new Array(i),r=0;r<i;r++)n[r]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:n}},re.prototype.parseClassDef=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(2===t)return{format:2,ranges:this.parseRecordList({start:re.uShort,end:re.uShort,classId:re.uShort})};throw new Error("0x"+e.toString(16)+": ClassDef format must be 1 or 2.")},re.list=function(e,t){return function(){return this.parseList(e,t)}},re.list32=function(e,t){return function(){return this.parseList32(e,t)}},re.recordList=function(e,t){return function(){return this.parseRecordList(e,t)}},re.recordList32=function(e,t){return function(){return this.parseRecordList32(e,t)}},re.pointer=function(e){return function(){return this.parsePointer(e)}},re.pointer32=function(e){return function(){return this.parsePointer32(e)}},re.tag=re.prototype.parseTag,re.byte=re.prototype.parseByte,re.uShort=re.offset16=re.prototype.parseUShort,re.uShortList=re.prototype.parseUShortList,re.uLong=re.offset32=re.prototype.parseULong,re.uLongList=re.prototype.parseULongList,re.struct=re.prototype.parseStruct,re.coverage=re.prototype.parseCoverage,re.classDef=re.prototype.parseClassDef;var oe={reserved:re.uShort,reqFeatureIndex:re.uShort,featureIndexes:re.uShortList};re.prototype.parseScriptList=function(){return this.parsePointer(re.recordList({tag:re.tag,script:re.pointer({defaultLangSys:re.pointer(oe),langSysRecords:re.recordList({tag:re.tag,langSys:re.pointer(oe)})})}))||[]},re.prototype.parseFeatureList=function(){return this.parsePointer(re.recordList({tag:re.tag,feature:re.pointer({featureParams:re.offset16,lookupListIndexes:re.uShortList})}))||[]},re.prototype.parseLookupList=function(e){return this.parsePointer(re.list(re.pointer((function(){var t=this.parseUShort();I.argument(1<=t&&t<=9,"GPOS/GSUB lookup type "+t+" unknown.");var i=this.parseUShort(),n=16&i;return{lookupType:t,lookupFlag:i,subtables:this.parseList(re.pointer(e[t])),markFilteringSet:n?this.parseUShort():void 0}}))))||[]},re.prototype.parseFeatureVariationsList=function(){return this.parsePointer32((function(){var e=this.parseUShort(),t=this.parseUShort();return I.argument(1===e&&t<1,"GPOS/GSUB feature variations table unknown."),this.parseRecordList32({conditionSetOffset:re.offset32,featureTableSubstitutionOffset:re.offset32})}))||[]};var ae={getByte:Z,getCard8:Z,getUShort:ee,getCard16:ee,getShort:function(e,t){return e.getInt16(t,!1)},getULong:te,getFixed:ie,getTag:function(e,t){for(var i="",n=t;n<t+4;n+=1)i+=String.fromCharCode(e.getInt8(n));return i},getOffset:function(e,t,i){for(var n=0,r=0;r<i;r+=1)n<<=8,n+=e.getUint8(t+r);return n},getBytes:function(e,t,i){for(var n=[],r=t;r<i;r+=1)n.push(e.getUint8(r));return n},bytesToString:function(e){for(var t="",i=0;i<e.length;i+=1)t+=String.fromCharCode(e[i]);return t},Parser:re},se=function(e,t){var i={};i.version=ae.getUShort(e,t),I.argument(0===i.version,"cmap table version should be 0."),i.numTables=ae.getUShort(e,t+2);for(var n=-1,r=i.numTables-1;0<=r;r-=1){var o=ae.getUShort(e,t+4+8*r),a=ae.getUShort(e,t+4+8*r+2);if(3===o&&(0===a||1===a||10===a)||0===o&&(0===a||1===a||2===a||3===a||4===a)){n=ae.getULong(e,t+4+8*r+4);break}}if(-1===n)throw new Error("No valid cmap sub-tables found.");var s=new ae.Parser(e,t+n);if(i.format=s.parseUShort(),12===i.format)!function(e,t){var i;t.parseUShort(),e.length=t.parseULong(),e.language=t.parseULong(),e.groupCount=i=t.parseULong(),e.glyphIndexMap={};for(var n=0;n<i;n+=1)for(var r=t.parseULong(),o=t.parseULong(),a=t.parseULong(),s=r;s<=o;s+=1)e.glyphIndexMap[s]=a,a++}(i,s);else{if(4!==i.format)throw new Error("Only format 4 and 12 cmap tables are supported (found format "+i.format+").");!function(e,t,i,n,r){var o;e.length=t.parseUShort(),e.language=t.parseUShort(),e.segCount=o=t.parseUShort()>>1,t.skip("uShort",3),e.glyphIndexMap={};for(var a=new ae.Parser(i,n+r+14),s=new ae.Parser(i,n+r+16+2*o),l=new ae.Parser(i,n+r+16+4*o),u=new ae.Parser(i,n+r+16+6*o),c=n+r+16+8*o,d=0;d<o-1;d+=1)for(var h=void 0,p=a.parseUShort(),f=s.parseUShort(),g=l.parseShort(),m=u.parseUShort(),v=f;v<=p;v+=1)0!==m?(c=u.offset+u.relativeOffset-2,c+=m,c+=2*(v-f),0!==(h=ae.getUShort(i,c))&&(h=h+g&65535)):h=v+g&65535,e.glyphIndexMap[v]=h}(i,s,e,t,n)}return i},le=function(e){var t,i=!0;for(t=e.length-1;0<t;t-=1)if(65535<e.get(t).unicode){console.log("Adding CMAP format 12 (needed!)"),i=!1;break}var n=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:i?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:i?12:20}];i||(n=n.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),n=n.concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);var r,o,a,s=new Q.Table("cmap",n);for(s.segments=[],t=0;t<e.length;t+=1){for(var l=e.get(t),u=0;u<l.unicodes.length;u+=1)r=s,o=l.unicodes[u],a=t,r.segments.push({end:o,start:o,delta:-(o-a),offset:0,glyphIndex:a});s.segments=s.segments.sort((function(e,t){return e.start-t.start}))}s.segments.push({end:65535,start:65535,delta:1,offset:0});var c=s.segments.length,d=0,h=[],p=[],f=[],g=[],m=[],v=[];for(t=0;t<c;t+=1){var y=s.segments[t];y.end<=65535&&y.start<=65535?(h=h.concat({name:"end_"+t,type:"USHORT",value:y.end}),p=p.concat({name:"start_"+t,type:"USHORT",value:y.start}),f=f.concat({name:"idDelta_"+t,type:"SHORT",value:y.delta}),g=g.concat({name:"idRangeOffset_"+t,type:"USHORT",value:y.offset}),void 0!==y.glyphId&&(m=m.concat({name:"glyph_"+t,type:"USHORT",value:y.glyphId}))):d+=1,i||void 0===y.glyphIndex||(v=(v=(v=v.concat({name:"cmap12Start_"+t,type:"ULONG",value:y.start})).concat({name:"cmap12End_"+t,type:"ULONG",value:y.end})).concat({name:"cmap12Glyph_"+t,type:"ULONG",value:y.glyphIndex}))}if(s.segCountX2=2*(c-d),s.searchRange=2*Math.pow(2,Math.floor(Math.log(c-d)/Math.log(2))),s.entrySelector=Math.log(s.searchRange/2)/Math.log(2),s.rangeShift=s.segCountX2-s.searchRange,s.fields=s.fields.concat(h),s.fields.push({name:"reservedPad",type:"USHORT",value:0}),s.fields=s.fields.concat(p),s.fields=s.fields.concat(f),s.fields=s.fields.concat(g),s.fields=s.fields.concat(m),s.cmap4Length=14+2*h.length+2+2*p.length+2*f.length+2*g.length+2*m.length,!i){var b=16+4*v.length;s.cmap12Offset=20+s.cmap4Length,s.fields=s.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:b},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:v.length/3}]),s.fields=s.fields.concat(v)}return s},ue=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],ce=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],de=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],he=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function pe(e){this.font=e}function fe(e){this.cmap=e}function ge(e,t){this.encoding=e,this.charset=t}function me(e){switch(e.version){case 1:this.names=he.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(var t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<he.length?this.names[t]=he[e.glyphNameIndex[t]]:this.names[t]=e.names[e.glyphNameIndex[t]-he.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(var i=0;i<e.numberOfGlyphs;i++)this.names[i]=he[i+e.glyphNameIndex[i]];break;case 3:default:this.names=[]}}pe.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),i=this.font.glyphs;if(i)for(var n=0;n<i.length;n+=1)for(var r=i.get(n),o=0;o<r.unicodes.length;o+=1)if(r.unicodes[o]===t)return n;return null},fe.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.codePointAt(0)]||0},ge.prototype.charToGlyphIndex=function(e){var t=e.codePointAt(0),i=this.encoding[t];return this.charset.indexOf(i)},me.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},me.prototype.glyphIndexToName=function(e){return this.names[e]};var ve=function(e,t,i,n,r){e.beginPath(),e.moveTo(t,i),e.lineTo(n,r),e.stroke()};function ye(e){this.bindConstructorValues(e)}function be(e,t,i){Object.defineProperty(e,t,{get:function(){return e.path,e[i]},set:function(t){e[i]=t},enumerable:!0,configurable:!0})}function we(e,t){if(this.font=e,this.glyphs={},Array.isArray(t))for(var i=0;i<t.length;i++)this.glyphs[i]=t[i];this.length=t&&t.length||0}ye.prototype.bindConstructorValues=function(e){var t,i;this.index=e.index||0,this.name=e.name||null,this.unicode=e.unicode||void 0,this.unicodes=e.unicodes||void 0!==e.unicode?[e.unicode]:[],e.xMin&&(this.xMin=e.xMin),e.yMin&&(this.yMin=e.yMin),e.xMax&&(this.xMax=e.xMax),e.yMax&&(this.yMax=e.yMax),e.advanceWidth&&(this.advanceWidth=e.advanceWidth),Object.defineProperty(this,"path",(t=e.path,i=t||new x,{configurable:!0,get:function(){return"function"==typeof i&&(i=i()),i},set:function(e){i=e}}))},ye.prototype.addUnicode=function(e){0===this.unicodes.length&&(this.unicode=e),this.unicodes.push(e)},ye.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},ye.prototype.getPath=function(e,t,i,n,r){var o,a;e=void 0!==e?e:0,t=void 0!==t?t:0,i=void 0!==i?i:72,n||(n={});var s=n.xScale,l=n.yScale;if(n.hinting&&r&&r.hinting&&(a=this.path&&r.hinting.exec(this,i)),a)o=r.hinting.getCommands(a),e=Math.round(e),t=Math.round(t),s=l=1;else{o=this.path.commands;var u=1/this.path.unitsPerEm*i;void 0===s&&(s=u),void 0===l&&(l=u)}for(var c=new x,d=0;d<o.length;d+=1){var h=o[d];"M"===h.type?c.moveTo(e+h.x*s,t+-h.y*l):"L"===h.type?c.lineTo(e+h.x*s,t+-h.y*l):"Q"===h.type?c.quadraticCurveTo(e+h.x1*s,t+-h.y1*l,e+h.x*s,t+-h.y*l):"C"===h.type?c.curveTo(e+h.x1*s,t+-h.y1*l,e+h.x2*s,t+-h.y2*l,e+h.x*s,t+-h.y*l):"Z"===h.type&&c.closePath()}return c},ye.prototype.getContours=function(){if(void 0===this.points)return[];for(var e=[],t=[],i=0;i<this.points.length;i+=1){var n=this.points[i];t.push(n),n.lastPointOfContour&&(e.push(t),t=[])}return I.argument(0===t.length,"There are still points left in the current contour."),e},ye.prototype.getMetrics=function(){for(var e=this.path.commands,t=[],i=[],n=0;n<e.length;n+=1){var r=e[n];"Z"!==r.type&&(t.push(r.x),i.push(r.y)),"Q"!==r.type&&"C"!==r.type||(t.push(r.x1),i.push(r.y1)),"C"===r.type&&(t.push(r.x2),i.push(r.y2))}var o={xMin:Math.min.apply(null,t),yMin:Math.min.apply(null,i),xMax:Math.max.apply(null,t),yMax:Math.max.apply(null,i),leftSideBearing:this.leftSideBearing};return isFinite(o.xMin)||(o.xMin=0),isFinite(o.xMax)||(o.xMax=this.advanceWidth),isFinite(o.yMin)||(o.yMin=0),isFinite(o.yMax)||(o.yMax=0),o.rightSideBearing=this.advanceWidth-o.leftSideBearing-(o.xMax-o.xMin),o},ye.prototype.draw=function(e,t,i,n,r){this.getPath(t,i,n,r).draw(e)},ye.prototype.drawPoints=function(e,t,i,n){function r(t,i,n,r){var o=2*Math.PI;e.beginPath();for(var a=0;a<t.length;a+=1)e.moveTo(i+t[a].x*r,n+t[a].y*r),e.arc(i+t[a].x*r,n+t[a].y*r,2,0,o,!1);e.closePath(),e.fill()}t=void 0!==t?t:0,i=void 0!==i?i:0,n=void 0!==n?n:24;for(var o=1/this.path.unitsPerEm*n,a=[],s=[],l=this.path,u=0;u<l.commands.length;u+=1){var c=l.commands[u];void 0!==c.x&&a.push({x:c.x,y:-c.y}),void 0!==c.x1&&s.push({x:c.x1,y:-c.y1}),void 0!==c.x2&&s.push({x:c.x2,y:-c.y2})}e.fillStyle="blue",r(a,t,i,o),e.fillStyle="red",r(s,t,i,o)},ye.prototype.drawMetrics=function(e,t,i,n){var r;t=void 0!==t?t:0,i=void 0!==i?i:0,n=void 0!==n?n:24,r=1/this.path.unitsPerEm*n,e.lineWidth=1,e.strokeStyle="black",ve(e,t,-1e4,t,1e4),ve(e,-1e4,i,1e4,i);var o=this.xMin||0,a=this.yMin||0,s=this.xMax||0,l=this.yMax||0,u=this.advanceWidth||0;e.strokeStyle="blue",ve(e,t+o*r,-1e4,t+o*r,1e4),ve(e,t+s*r,-1e4,t+s*r,1e4),ve(e,-1e4,i+-a*r,1e4,i+-a*r),ve(e,-1e4,i+-l*r,1e4,i+-l*r),e.strokeStyle="green",ve(e,t+u*r,-1e4,t+u*r,1e4)},we.prototype.get=function(e){return"function"==typeof this.glyphs[e]&&(this.glyphs[e]=this.glyphs[e]()),this.glyphs[e]},we.prototype.push=function(e,t){this.glyphs[e]=t,this.length++};var Ee={GlyphSet:we,glyphLoader:function(e,t){return new ye({index:t,font:e})},ttfGlyphLoader:function(e,t,i,n,r,o){return function(){var a=new ye({index:t,font:e});return a.path=function(){i(a,n,r);var t=o(e.glyphs,a);return t.unitsPerEm=e.unitsPerEm,t},be(a,"xMin","_xMin"),be(a,"xMax","_xMax"),be(a,"yMin","_yMin"),be(a,"yMax","_yMax"),a}},cffGlyphLoader:function(e,t,i,n){return function(){var r=new ye({index:t,font:e});return r.path=function(){var t=i(e,r,n);return t.unitsPerEm=e.unitsPerEm,t},r}}};function _e(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i+=1)if(!_e(e[i],t[i]))return!1;return!0}return!1}function Se(e){return e.length<1240?107:e.length<33900?1131:32768}function Te(e,t,i){var n,r,o=[],a=[],s=ae.getCard16(e,t);if(0!==s){var l=ae.getByte(e,t+2);n=t+(s+1)*l+2;for(var u=t+3,c=0;c<s+1;c+=1)o.push(ae.getOffset(e,u,l)),u+=l;r=n+o[s]}else r=t+2;for(var d=0;d<o.length-1;d+=1){var h=ae.getBytes(e,n+o[d],n+o[d+1]);i&&(h=i(h)),a.push(h)}return{objects:a,startOffset:t,endOffset:r}}function Ce(e,t){if(28===t)return e.parseByte()<<8|e.parseByte();if(29===t)return e.parseByte()<<24|e.parseByte()<<16|e.parseByte()<<8|e.parseByte();if(30===t)return function(e){for(var t="",i=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var n=e.parseByte(),r=n>>4,o=15&n;if(15===r)break;if(t+=i[r],15===o)break;t+=i[o]}return parseFloat(t)}(e);if(32<=t&&t<=246)return t-139;if(247<=t&&t<=250)return 256*(t-247)+e.parseByte()+108;if(251<=t&&t<=254)return 256*-(t-251)-e.parseByte()-108;throw new Error("Invalid b0 "+t)}function ke(e,t,i){t=void 0!==t?t:0;var n=new ae.Parser(e,t),r=[],o=[];for(i=void 0!==i?i:e.length;n.relativeOffset<i;){var a=n.parseByte();a<=21?(12===a&&(a=1200+n.parseByte()),r.push([a,o]),o=[]):o.push(Ce(n,a))}return function(e){for(var t={},i=0;i<e.length;i+=1){var n,r=e[i][0],o=e[i][1];if(n=1===o.length?o[0]:o,t.hasOwnProperty(r)&&!isNaN(t[r]))throw new Error("Object "+t+" already has key "+r);t[r]=n}return t}(r)}function xe(e,t){return t<=390?ue[t]:e[t-391]}function Ae(e,t,i){for(var n,r={},o=0;o<t.length;o+=1){var a=t[o];if(Array.isArray(a.type)){var s=[];s.length=a.type.length;for(var l=0;l<a.type.length;l++)void 0===(n=void 0!==e[a.op]?e[a.op][l]:void 0)&&(n=void 0!==a.value&&void 0!==a.value[l]?a.value[l]:null),"SID"===a.type[l]&&(n=xe(i,n)),s[l]=n;r[a.name]=s}else void 0===(n=e[a.op])&&(n=void 0!==a.value?a.value:null),"SID"===a.type&&(n=xe(i,n)),r[a.name]=n}return r}var Pe=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],Ie=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function Re(e,t,i,n){return Ae(ke(e,t,i),Ie,n)}function De(e,t,i,n){for(var r,o,a=[],s=0;s<i.length;s+=1){var l=(o=n,Ae(ke(r=new DataView(new Uint8Array(i[s]).buffer),0,r.byteLength),Pe,o));l._subrs=[],l._subrsBias=0;var u=l.private[0],c=l.private[1];if(0!==u&&0!==c){var d=Re(e,c+t,u,n);if(l._defaultWidthX=d.defaultWidthX,l._nominalWidthX=d.nominalWidthX,0!==d.subrs){var h=Te(e,c+d.subrs+t);l._subrs=h.objects,l._subrsBias=Se(l._subrs)}l._privateDict=d}a.push(l)}return a}function Oe(e,t,i){var n,r,o,a,s,l,u,c,d=new x,h=[],p=0,f=!1,g=!1,m=0,v=0;if(e.isCIDFont){var y=e.tables.cff.topDict._fdSelect[t.index],b=e.tables.cff.topDict._fdArray[y];s=b._subrs,l=b._subrsBias,u=b._defaultWidthX,c=b._nominalWidthX}else s=e.tables.cff.topDict._subrs,l=e.tables.cff.topDict._subrsBias,u=e.tables.cff.topDict._defaultWidthX,c=e.tables.cff.topDict._nominalWidthX;var w=u;function E(e,t){g&&d.closePath(),d.moveTo(e,t),g=!0}function _(){h.length%2!=0&&!f&&(w=h.shift()+c),p+=h.length>>1,h.length=0,f=!0}return function i(u){for(var y,b,S,T,C,k,x,A,P,I,R,D,O=0;O<u.length;){var N=u[O];switch(O+=1,N){case 1:case 3:_();break;case 4:1<h.length&&!f&&(w=h.shift()+c,f=!0),v+=h.pop(),E(m,v);break;case 5:for(;0<h.length;)m+=h.shift(),v+=h.shift(),d.lineTo(m,v);break;case 6:for(;0<h.length&&(m+=h.shift(),d.lineTo(m,v),0!==h.length);)v+=h.shift(),d.lineTo(m,v);break;case 7:for(;0<h.length&&(v+=h.shift(),d.lineTo(m,v),0!==h.length);)m+=h.shift(),d.lineTo(m,v);break;case 8:for(;0<h.length;)n=m+h.shift(),r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),m=o+h.shift(),v=a+h.shift(),d.curveTo(n,r,o,a,m,v);break;case 10:C=h.pop()+l,(k=s[C])&&i(k);break;case 11:return;case 12:switch(N=u[O],O+=1,N){case 35:n=m+h.shift(),r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),x=o+h.shift(),A=a+h.shift(),P=x+h.shift(),I=A+h.shift(),R=P+h.shift(),D=I+h.shift(),m=R+h.shift(),v=D+h.shift(),h.shift(),d.curveTo(n,r,o,a,x,A),d.curveTo(P,I,R,D,m,v);break;case 34:n=m+h.shift(),r=v,o=n+h.shift(),a=r+h.shift(),x=o+h.shift(),A=a,P=x+h.shift(),I=a,R=P+h.shift(),D=v,m=R+h.shift(),d.curveTo(n,r,o,a,x,A),d.curveTo(P,I,R,D,m,v);break;case 36:n=m+h.shift(),r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),x=o+h.shift(),A=a,P=x+h.shift(),I=a,R=P+h.shift(),D=I+h.shift(),m=R+h.shift(),d.curveTo(n,r,o,a,x,A),d.curveTo(P,I,R,D,m,v);break;case 37:n=m+h.shift(),r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),x=o+h.shift(),A=a+h.shift(),P=x+h.shift(),I=A+h.shift(),R=P+h.shift(),D=I+h.shift(),Math.abs(R-m)>Math.abs(D-v)?m=R+h.shift():v=D+h.shift(),d.curveTo(n,r,o,a,x,A),d.curveTo(P,I,R,D,m,v);break;default:console.log("Glyph "+t.index+": unknown operator 1200"+N),h.length=0}break;case 14:0<h.length&&!f&&(w=h.shift()+c,f=!0),g&&(d.closePath(),g=!1);break;case 18:_();break;case 19:case 20:_(),O+=p+7>>3;break;case 21:2<h.length&&!f&&(w=h.shift()+c,f=!0),v+=h.pop(),E(m+=h.pop(),v);break;case 22:1<h.length&&!f&&(w=h.shift()+c,f=!0),E(m+=h.pop(),v);break;case 23:_();break;case 24:for(;2<h.length;)n=m+h.shift(),r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),m=o+h.shift(),v=a+h.shift(),d.curveTo(n,r,o,a,m,v);m+=h.shift(),v+=h.shift(),d.lineTo(m,v);break;case 25:for(;6<h.length;)m+=h.shift(),v+=h.shift(),d.lineTo(m,v);n=m+h.shift(),r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),m=o+h.shift(),v=a+h.shift(),d.curveTo(n,r,o,a,m,v);break;case 26:for(h.length%2&&(m+=h.shift());0<h.length;)n=m,r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),m=o,v=a+h.shift(),d.curveTo(n,r,o,a,m,v);break;case 27:for(h.length%2&&(v+=h.shift());0<h.length;)n=m+h.shift(),r=v,o=n+h.shift(),a=r+h.shift(),m=o+h.shift(),v=a,d.curveTo(n,r,o,a,m,v);break;case 28:y=u[O],b=u[O+1],h.push((y<<24|b<<16)>>16),O+=2;break;case 29:C=h.pop()+e.gsubrsBias,(k=e.gsubrs[C])&&i(k);break;case 30:for(;0<h.length&&(n=m,r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),m=o+h.shift(),v=a+(1===h.length?h.shift():0),d.curveTo(n,r,o,a,m,v),0!==h.length);)n=m+h.shift(),r=v,o=n+h.shift(),a=r+h.shift(),v=a+h.shift(),m=o+(1===h.length?h.shift():0),d.curveTo(n,r,o,a,m,v);break;case 31:for(;0<h.length&&(n=m+h.shift(),r=v,o=n+h.shift(),a=r+h.shift(),v=a+h.shift(),m=o+(1===h.length?h.shift():0),d.curveTo(n,r,o,a,m,v),0!==h.length);)n=m,r=v+h.shift(),o=n+h.shift(),a=r+h.shift(),m=o+h.shift(),v=a+(1===h.length?h.shift():0),d.curveTo(n,r,o,a,m,v);break;default:N<32?console.log("Glyph "+t.index+": unknown operator "+N):N<247?h.push(N-139):N<251?(y=u[O],O+=1,h.push(256*(N-247)+y+108)):N<255?(y=u[O],O+=1,h.push(256*-(N-251)-y-108)):(y=u[O],b=u[O+1],S=u[O+2],T=u[O+3],O+=4,h.push((y<<24|b<<16|S<<8|T)/65536))}}}(i),t.advanceWidth=w,d}function Ne(e,t){var i,n=ue.indexOf(e);return 0<=n&&(i=n),0<=(n=t.indexOf(e))?i=n+ue.length:(i=ue.length+t.length,t.push(e)),i}function Le(e,t,i){for(var n={},r=0;r<e.length;r+=1){var o=e[r],a=t[o.name];void 0===a||_e(a,o.value)||("SID"===o.type&&(a=Ne(a,i)),n[o.op]={name:o.name,type:o.type,value:a})}return n}function Me(e,t){var i=new Q.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return i.dict=Le(Pe,e,t),i}function Fe(e){var t=new Q.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return t.topDicts=[{name:"topDict_0",type:"TABLE",value:e}],t}function Ue(e){var t=[],i=e.path;t.push({name:"width",type:"NUMBER",value:e.advanceWidth});for(var n=0,r=0,o=0;o<i.commands.length;o+=1){var a=void 0,s=void 0,l=i.commands[o];if("Q"===l.type&&(l={type:"C",x:l.x,y:l.y,x1:1/3*n+2/3*l.x1,y1:1/3*r+2/3*l.y1,x2:1/3*l.x+2/3*l.x1,y2:1/3*l.y+2/3*l.y1}),"M"===l.type)a=Math.round(l.x-n),s=Math.round(l.y-r),t.push({name:"dx",type:"NUMBER",value:a}),t.push({name:"dy",type:"NUMBER",value:s}),t.push({name:"rmoveto",type:"OP",value:21}),n=Math.round(l.x),r=Math.round(l.y);else if("L"===l.type)a=Math.round(l.x-n),s=Math.round(l.y-r),t.push({name:"dx",type:"NUMBER",value:a}),t.push({name:"dy",type:"NUMBER",value:s}),t.push({name:"rlineto",type:"OP",value:5}),n=Math.round(l.x),r=Math.round(l.y);else if("C"===l.type){var u=Math.round(l.x1-n),c=Math.round(l.y1-r),d=Math.round(l.x2-l.x1),h=Math.round(l.y2-l.y1);a=Math.round(l.x-l.x2),s=Math.round(l.y-l.y2),t.push({name:"dx1",type:"NUMBER",value:u}),t.push({name:"dy1",type:"NUMBER",value:c}),t.push({name:"dx2",type:"NUMBER",value:d}),t.push({name:"dy2",type:"NUMBER",value:h}),t.push({name:"dx",type:"NUMBER",value:a}),t.push({name:"dy",type:"NUMBER",value:s}),t.push({name:"rrcurveto",type:"OP",value:8}),n=Math.round(l.x),r=Math.round(l.y)}}return t.push({name:"endchar",type:"OP",value:14}),t}var Be=function(e,t,i){i.tables.cff={};var n,r,o,a=Te(e,Te(e,(n=e,r=t,(o={}).formatMajor=ae.getCard8(n,r),o.formatMinor=ae.getCard8(n,r+1),o.size=ae.getCard8(n,r+2),o.offsetSize=ae.getCard8(n,r+3),o.startOffset=r,o.endOffset=r+4,o).endOffset,ae.bytesToString).endOffset),s=Te(e,a.endOffset,ae.bytesToString),l=Te(e,s.endOffset);i.gsubrs=l.objects,i.gsubrsBias=Se(i.gsubrs);var u=De(e,t,a.objects,s.objects);if(1!==u.length)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+u.length);var c=u[0];if((i.tables.cff.topDict=c)._privateDict&&(i.defaultWidthX=c._privateDict.defaultWidthX,i.nominalWidthX=c._privateDict.nominalWidthX),void 0!==c.ros[0]&&void 0!==c.ros[1]&&(i.isCIDFont=!0),i.isCIDFont){var d=c.fdArray,h=c.fdSelect;if(0===d||0===h)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");var p=De(e,t,Te(e,d+=t).objects,s.objects);c._fdArray=p,h+=t,c._fdSelect=function(e,t,i,n){var r,o=[],a=new ae.Parser(e,t),s=a.parseCard8();if(0===s)for(var l=0;l<i;l++){if(n<=(r=a.parseCard8()))throw new Error("CFF table CID Font FDSelect has bad FD index value "+r+" (FD count "+n+")");o.push(r)}else{if(3!==s)throw new Error("CFF Table CID Font FDSelect table has unsupported format "+s);var u,c=a.parseCard16(),d=a.parseCard16();if(0!==d)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+d);for(var h=0;h<c;h++){if(r=a.parseCard8(),u=a.parseCard16(),n<=r)throw new Error("CFF table CID Font FDSelect has bad FD index value "+r+" (FD count "+n+")");if(i<u)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+u);for(;d<u;d++)o.push(r);d=u}if(u!==i)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+u)}return o}(e,h,i.numGlyphs,p.length)}var f=t+c.private[1],g=Re(e,f,c.private[0],s.objects);if(i.defaultWidthX=g.defaultWidthX,i.nominalWidthX=g.nominalWidthX,0!==g.subrs){var m=Te(e,f+g.subrs);i.subrs=m.objects,i.subrsBias=Se(i.subrs)}else i.subrs=[],i.subrsBias=0;var v=Te(e,t+c.charStrings);i.nGlyphs=v.objects.length;var y=function(e,t,i,n){var r,o,a=new ae.Parser(e,t);i-=1;var s=[".notdef"],l=a.parseCard8();if(0===l)for(var u=0;u<i;u+=1)r=a.parseSID(),s.push(xe(n,r));else if(1===l)for(;s.length<=i;){r=a.parseSID(),o=a.parseCard8();for(var c=0;c<=o;c+=1)s.push(xe(n,r)),r+=1}else{if(2!==l)throw new Error("Unknown charset format "+l);for(;s.length<=i;){r=a.parseSID(),o=a.parseCard16();for(var d=0;d<=o;d+=1)s.push(xe(n,r)),r+=1}}return s}(e,t+c.charset,i.nGlyphs,s.objects);0===c.encoding?i.cffEncoding=new ge(ce,y):1===c.encoding?i.cffEncoding=new ge(de,y):i.cffEncoding=function(e,t,i){var n,r={},o=new ae.Parser(e,t),a=o.parseCard8();if(0===a)for(var s=o.parseCard8(),l=0;l<s;l+=1)r[n=o.parseCard8()]=l;else{if(1!==a)throw new Error("Unknown encoding format "+a);var u=o.parseCard8();n=1;for(var c=0;c<u;c+=1)for(var d=o.parseCard8(),h=o.parseCard8(),p=d;p<=d+h;p+=1)r[p]=n,n+=1}return new ge(r,i)}(e,t+c.encoding,y),i.encoding=i.encoding||i.cffEncoding,i.glyphs=new Ee.GlyphSet(i);for(var b=0;b<i.nGlyphs;b+=1){var w=v.objects[b];i.glyphs.push(b,Ee.cffGlyphLoader(i,b,Oe,w))}},Ve=function(e,t){for(var i,n=new Q.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),r=1/t.unitsPerEm,o={version:t.version,fullName:t.fullName,familyName:t.familyName,weight:t.weightName,fontBBox:t.fontBBox||[0,0,0,0],fontMatrix:[r,0,0,r,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},a=[],s=1;s<e.length;s+=1)i=e.get(s),a.push(i.name);var l=[];n.header=new Q.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}]),n.nameIndex=function(e){var t=new Q.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);t.names=[];for(var i=0;i<e.length;i+=1)t.names.push({name:"name_"+i,type:"NAME",value:e[i]});return t}([t.postScriptName]);var u,c,d,h=Me(o,l);n.topDictIndex=Fe(h),n.globalSubrIndex=new Q.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}]),n.charsets=function(e,t){for(var i=new Q.Record("Charsets",[{name:"format",type:"Card8",value:0}]),n=0;n<e.length;n+=1){var r=Ne(e[n],t);i.fields.push({name:"glyph_"+n,type:"SID",value:r})}return i}(a,l),n.charStringsIndex=function(e){for(var t=new Q.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),i=0;i<e.length;i+=1){var n=e.get(i),r=Ue(n);t.charStrings.push({name:n.name,type:"CHARSTRING",value:r})}return t}(e),n.privateDict=(u={},c=l,(d=new Q.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}])).dict=Le(Ie,u,c),d),n.stringIndex=function(e){var t=new Q.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);t.strings=[];for(var i=0;i<e.length;i+=1)t.strings.push({name:"string_"+i,type:"STRING",value:e[i]});return t}(l);var p=n.header.sizeOf()+n.nameIndex.sizeOf()+n.topDictIndex.sizeOf()+n.stringIndex.sizeOf()+n.globalSubrIndex.sizeOf();return o.charset=p,o.encoding=0,o.charStrings=o.charset+n.charsets.sizeOf(),o.private[1]=o.charStrings+n.charStringsIndex.sizeOf(),h=Me(o,l),n.topDictIndex=Fe(h),n},ze=function(e,t){var i={},n=new ae.Parser(e,t);return i.version=n.parseVersion(),i.fontRevision=Math.round(1e3*n.parseFixed())/1e3,i.checkSumAdjustment=n.parseULong(),i.magicNumber=n.parseULong(),I.argument(1594834165===i.magicNumber,"Font header has wrong magic number."),i.flags=n.parseUShort(),i.unitsPerEm=n.parseUShort(),i.created=n.parseLongDateTime(),i.modified=n.parseLongDateTime(),i.xMin=n.parseShort(),i.yMin=n.parseShort(),i.xMax=n.parseShort(),i.yMax=n.parseShort(),i.macStyle=n.parseUShort(),i.lowestRecPPEM=n.parseUShort(),i.fontDirectionHint=n.parseShort(),i.indexToLocFormat=n.parseShort(),i.glyphDataFormat=n.parseShort(),i},He=function(e){var t=Math.round((new Date).getTime()/1e3)+2082844800,i=t;return e.createdTimestamp&&(i=e.createdTimestamp+2082844800),new Q.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:i},{name:"modified",type:"LONGDATETIME",value:t},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],e)},je=function(e,t){var i={},n=new ae.Parser(e,t);return i.version=n.parseVersion(),i.ascender=n.parseShort(),i.descender=n.parseShort(),i.lineGap=n.parseShort(),i.advanceWidthMax=n.parseUShort(),i.minLeftSideBearing=n.parseShort(),i.minRightSideBearing=n.parseShort(),i.xMaxExtent=n.parseShort(),i.caretSlopeRise=n.parseShort(),i.caretSlopeRun=n.parseShort(),i.caretOffset=n.parseShort(),n.relativeOffset+=8,i.metricDataFormat=n.parseShort(),i.numberOfHMetrics=n.parseUShort(),i},qe=function(e){return new Q.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],e)},Ge=function(e,t,i,n,r){for(var o,a,s=new ae.Parser(e,t),l=0;l<n;l+=1){l<i&&(o=s.parseUShort(),a=s.parseShort());var u=r.get(l);u.advanceWidth=o,u.leftSideBearing=a}},We=function(e){for(var t=new Q.Table("hmtx",[]),i=0;i<e.length;i+=1){var n=e.get(i),r=n.advanceWidth||0,o=n.leftSideBearing||0;t.fields.push({name:"advanceWidth_"+i,type:"USHORT",value:r}),t.fields.push({name:"leftSideBearing_"+i,type:"SHORT",value:o})}return t},$e=function(e){for(var t=new Q.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:e.length}]),i="",n=12+4*e.length,r=0;r<e.length;++r){var o=i.indexOf(e[r]);o<0&&(o=i.length,i+=e[r]),t.fields.push({name:"offset "+r,type:"USHORT",value:n+o}),t.fields.push({name:"length "+r,type:"USHORT",value:e[r].length})}return t.fields.push({name:"stringPool",type:"CHARARRAY",value:i}),t},Ye=function(e,t){var i=new ae.Parser(e,t),n=i.parseULong();I.argument(1===n,"Unsupported ltag table version."),i.skip("uLong",1);for(var r=i.parseULong(),o=[],a=0;a<r;a++){for(var s="",l=t+i.parseUShort(),u=i.parseUShort(),c=l;c<l+u;++c)s+=String.fromCharCode(e.getInt8(c));o.push(s)}return o},Ke=function(e,t){var i={},n=new ae.Parser(e,t);return i.version=n.parseVersion(),i.numGlyphs=n.parseUShort(),1===i.version&&(i.maxPoints=n.parseUShort(),i.maxContours=n.parseUShort(),i.maxCompositePoints=n.parseUShort(),i.maxCompositeContours=n.parseUShort(),i.maxZones=n.parseUShort(),i.maxTwilightPoints=n.parseUShort(),i.maxStorage=n.parseUShort(),i.maxFunctionDefs=n.parseUShort(),i.maxInstructionDefs=n.parseUShort(),i.maxStackElements=n.parseUShort(),i.maxSizeOfInstructions=n.parseUShort(),i.maxComponentElements=n.parseUShort(),i.maxComponentDepth=n.parseUShort()),i},Je=function(e){return new Q.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:e}])},Xe=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],Qe={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},Ze={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},et={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",1040:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"};function tt(e,t,i){switch(e){case 0:if(65535===t)return"und";if(i)return i[t];break;case 1:return Qe[t];case 3:return et[t]}}var it="utf-16",nt={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},rt={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function ot(e,t,i){switch(e){case 0:return it;case 1:return rt[i]||nt[t];case 3:if(1===t||10===t)return it}}function at(e){var t={};for(var i in e)t[e[i]]=parseInt(i);return t}function st(e,t,i,n,r,o){return new Q.Record("NameRecord",[{name:"platformID",type:"USHORT",value:e},{name:"encodingID",type:"USHORT",value:t},{name:"languageID",type:"USHORT",value:i},{name:"nameID",type:"USHORT",value:n},{name:"length",type:"USHORT",value:r},{name:"offset",type:"USHORT",value:o}])}function lt(e,t){var i=function(e,t){var i=e.length,n=t.length-i+1;e:for(var r=0;r<n;r++)for(;r<n;r++){for(var o=0;o<i;o++)if(t[r+o]!==e[o])continue e;return r}return-1}(e,t);if(i<0){i=t.length;for(var n=0,r=e.length;n<r;++n)t.push(e[n])}return i}var ut=function(e,t,i){for(var n={},r=new ae.Parser(e,t),o=r.parseUShort(),a=r.parseUShort(),s=r.offset+r.parseUShort(),l=0;l<a;l++){var u,c=r.parseUShort(),d=r.parseUShort(),h=r.parseUShort(),p=r.parseUShort(),f=Xe[p]||p,g=r.parseUShort(),m=r.parseUShort(),v=tt(c,h,i),y=ot(c,d,h);if(void 0!==y&&void 0!==v)if(u=y===it?D.UTF16(e,s+m,g):D.MACSTRING(e,s+m,g,y)){var b=n[f];void 0===b&&(b=n[f]={}),b[v]=u}}return 1===o&&r.parseUShort(),n},ct=function(e,t){var i,n=[],r={},o=at(Xe);for(var a in e){var s=o[a];if(void 0===s&&(s=a),i=parseInt(s),isNaN(i))throw new Error('Name table entry "'+a+'" does not exist, see nameTableNames for complete list.');r[i]=e[a],n.push(i)}for(var l=at(Qe),u=at(et),c=[],d=[],h=0;h<n.length;h++){var p=r[i=n[h]];for(var f in p){var g=p[f],m=1,v=l[f],y=Ze[v],b=ot(m,y,v),w=O.MACSTRING(g,b);void 0===w&&(m=0,(v=t.indexOf(f))<0&&(v=t.length,t.push(f)),y=4,w=O.UTF16(g));var E=lt(w,d);c.push(st(m,y,v,i,w.length,E));var _=u[f];if(void 0!==_){var S=O.UTF16(g),T=lt(S,d);c.push(st(3,1,_,i,S.length,T))}}}c.sort((function(e,t){return e.platformID-t.platformID||e.encodingID-t.encodingID||e.languageID-t.languageID||e.nameID-t.nameID}));for(var C=new Q.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:c.length},{name:"stringOffset",type:"USHORT",value:6+12*c.length}]),k=0;k<c.length;k++)C.fields.push({name:"record_"+k,type:"RECORD",value:c[k]});return C.fields.push({name:"strings",type:"LITERAL",value:d}),C},dt=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}],ht=function(e,t){var i={},n=new ae.Parser(e,t);i.version=n.parseUShort(),i.xAvgCharWidth=n.parseShort(),i.usWeightClass=n.parseUShort(),i.usWidthClass=n.parseUShort(),i.fsType=n.parseUShort(),i.ySubscriptXSize=n.parseShort(),i.ySubscriptYSize=n.parseShort(),i.ySubscriptXOffset=n.parseShort(),i.ySubscriptYOffset=n.parseShort(),i.ySuperscriptXSize=n.parseShort(),i.ySuperscriptYSize=n.parseShort(),i.ySuperscriptXOffset=n.parseShort(),i.ySuperscriptYOffset=n.parseShort(),i.yStrikeoutSize=n.parseShort(),i.yStrikeoutPosition=n.parseShort(),i.sFamilyClass=n.parseShort(),i.panose=[];for(var r=0;r<10;r++)i.panose[r]=n.parseByte();return i.ulUnicodeRange1=n.parseULong(),i.ulUnicodeRange2=n.parseULong(),i.ulUnicodeRange3=n.parseULong(),i.ulUnicodeRange4=n.parseULong(),i.achVendID=String.fromCharCode(n.parseByte(),n.parseByte(),n.parseByte(),n.parseByte()),i.fsSelection=n.parseUShort(),i.usFirstCharIndex=n.parseUShort(),i.usLastCharIndex=n.parseUShort(),i.sTypoAscender=n.parseShort(),i.sTypoDescender=n.parseShort(),i.sTypoLineGap=n.parseShort(),i.usWinAscent=n.parseUShort(),i.usWinDescent=n.parseUShort(),1<=i.version&&(i.ulCodePageRange1=n.parseULong(),i.ulCodePageRange2=n.parseULong()),2<=i.version&&(i.sxHeight=n.parseShort(),i.sCapHeight=n.parseShort(),i.usDefaultChar=n.parseUShort(),i.usBreakChar=n.parseUShort(),i.usMaxContent=n.parseUShort()),i},pt=function(e){return new Q.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],e)},ft=function(e){for(var t=0;t<dt.length;t+=1){var i=dt[t];if(e>=i.begin&&e<i.end)return t}return-1},gt=function(e,t){var i={},n=new ae.Parser(e,t);switch(i.version=n.parseVersion(),i.italicAngle=n.parseFixed(),i.underlinePosition=n.parseShort(),i.underlineThickness=n.parseShort(),i.isFixedPitch=n.parseULong(),i.minMemType42=n.parseULong(),i.maxMemType42=n.parseULong(),i.minMemType1=n.parseULong(),i.maxMemType1=n.parseULong(),i.version){case 1:i.names=he.slice();break;case 2:i.numberOfGlyphs=n.parseUShort(),i.glyphNameIndex=new Array(i.numberOfGlyphs);for(var r=0;r<i.numberOfGlyphs;r++)i.glyphNameIndex[r]=n.parseUShort();i.names=[];for(var o=0;o<i.numberOfGlyphs;o++)if(i.glyphNameIndex[o]>=he.length){var a=n.parseChar();i.names.push(n.parseString(a))}break;case 2.5:i.numberOfGlyphs=n.parseUShort(),i.offset=new Array(i.numberOfGlyphs);for(var s=0;s<i.numberOfGlyphs;s++)i.offset[s]=n.parseChar()}return i},mt=function(){return new Q.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:0},{name:"underlinePosition",type:"FWORD",value:0},{name:"underlineThickness",type:"FWORD",value:0},{name:"isFixedPitch",type:"ULONG",value:0},{name:"minMemType42",type:"ULONG",value:0},{name:"maxMemType42",type:"ULONG",value:0},{name:"minMemType1",type:"ULONG",value:0},{name:"maxMemType1",type:"ULONG",value:0}])},vt=new Array(9);vt[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(re.coverage),deltaGlyphId:this.parseUShort()}:2===t?{substFormat:2,coverage:this.parsePointer(re.coverage),substitute:this.parseOffset16List()}:void I.assert(!1,"0x"+e.toString(16)+": lookup type 1 format must be 1 or 2.")},vt[2]=function(){var e=this.parseUShort();return I.argument(1===e,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(re.coverage),sequences:this.parseListOfLists()}},vt[3]=function(){var e=this.parseUShort();return I.argument(1===e,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(re.coverage),alternateSets:this.parseListOfLists()}},vt[4]=function(){var e=this.parseUShort();return I.argument(1===e,"GSUB ligature table identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(re.coverage),ligatureSets:this.parseListOfLists((function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}}))}};var yt={sequenceIndex:re.uShort,lookupListIndex:re.uShort};vt[5]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{substFormat:t,coverage:this.parsePointer(re.coverage),ruleSets:this.parseListOfLists((function(){var e=this.parseUShort(),t=this.parseUShort();return{input:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,yt)}}))};if(2===t)return{substFormat:t,coverage:this.parsePointer(re.coverage),classDef:this.parsePointer(re.classDef),classSets:this.parseListOfLists((function(){var e=this.parseUShort(),t=this.parseUShort();return{classes:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,yt)}}))};if(3===t){var i=this.parseUShort(),n=this.parseUShort();return{substFormat:t,coverages:this.parseList(i,re.pointer(re.coverage)),lookupRecords:this.parseRecordList(n,yt)}}I.assert(!1,"0x"+e.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},vt[6]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(re.coverage),chainRuleSets:this.parseListOfLists((function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(yt)}}))}:2===t?{substFormat:2,coverage:this.parsePointer(re.coverage),backtrackClassDef:this.parsePointer(re.classDef),inputClassDef:this.parsePointer(re.classDef),lookaheadClassDef:this.parsePointer(re.classDef),chainClassSet:this.parseListOfLists((function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(yt)}}))}:3===t?{substFormat:3,backtrackCoverage:this.parseList(re.pointer(re.coverage)),inputCoverage:this.parseList(re.pointer(re.coverage)),lookaheadCoverage:this.parseList(re.pointer(re.coverage)),lookupRecords:this.parseRecordList(yt)}:void I.assert(!1,"0x"+e.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},vt[7]=function(){var e=this.parseUShort();I.argument(1===e,"GSUB Extension Substitution subtable identifier-format must be 1");var t=this.parseUShort(),i=new re(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:t,extension:vt[t].call(i)}},vt[8]=function(){var e=this.parseUShort();return I.argument(1===e,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(re.coverage),backtrackCoverage:this.parseList(re.pointer(re.coverage)),lookaheadCoverage:this.parseList(re.pointer(re.coverage)),substitutes:this.parseUShortList()}};var bt=new Array(9);bt[1]=function(e){return 1===e.substFormat?new Q.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new Q.Coverage(e.coverage)},{name:"deltaGlyphID",type:"USHORT",value:e.deltaGlyphId}]):new Q.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new Q.Coverage(e.coverage)}].concat(Q.ushortList("substitute",e.substitute)))},bt[3]=function(e){return I.assert(1===e.substFormat,"Lookup type 3 substFormat must be 1."),new Q.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new Q.Coverage(e.coverage)}].concat(Q.tableList("altSet",e.alternateSets,(function(e){return new Q.Table("alternateSetTable",Q.ushortList("alternate",e))}))))},bt[4]=function(e){return I.assert(1===e.substFormat,"Lookup type 4 substFormat must be 1."),new Q.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new Q.Coverage(e.coverage)}].concat(Q.tableList("ligSet",e.ligatureSets,(function(e){return new Q.Table("ligatureSetTable",Q.tableList("ligature",e,(function(e){return new Q.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:e.ligGlyph}].concat(Q.ushortList("component",e.components,e.components.length+1)))})))}))))};var wt=function(e,t){var i=new re(e,t=t||0),n=i.parseVersion(1);return I.argument(1===n||1.1===n,"Unsupported GSUB table version."),1===n?{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(vt)}:{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(vt),variations:i.parseFeatureVariationsList()}},Et=function(e){return new Q.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new Q.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new Q.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new Q.LookupList(e.lookups,bt)}])},_t=function(e,t){var i=new ae.Parser(e,t),n=i.parseULong();I.argument(1===n,"Unsupported META table version."),i.parseULong(),i.parseULong();for(var r=i.parseULong(),o={},a=0;a<r;a++){var s=i.parseTag(),l=i.parseULong(),u=i.parseULong(),c=D.UTF8(e,t+l,u);o[s]=c}return o},St=function(e){var t=Object.keys(e).length,i="",n=16+12*t,r=new Q.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:n},{name:"numTags",type:"ULONG",value:t}]);for(var o in e){var a=i.length;i+=e[o],r.fields.push({name:"tag "+o,type:"TAG",value:o}),r.fields.push({name:"offset "+o,type:"ULONG",value:n+a}),r.fields.push({name:"length "+o,type:"ULONG",value:e[o].length})}return r.fields.push({name:"stringPool",type:"CHARARRAY",value:i}),r};function Tt(e){return Math.log(e)/Math.log(2)|0}function Ct(e){for(;e.length%4!=0;)e.push(0);for(var t=0,i=0;i<e.length;i+=4)t+=(e[i]<<24)+(e[i+1]<<16)+(e[i+2]<<8)+e[i+3];return t%Math.pow(2,32)}function kt(e,t,i,n){return new Q.Record("Table Record",[{name:"tag",type:"TAG",value:void 0!==e?e:""},{name:"checkSum",type:"ULONG",value:void 0!==t?t:0},{name:"offset",type:"ULONG",value:void 0!==i?i:0},{name:"length",type:"ULONG",value:void 0!==n?n:0}])}function xt(e){var t=new Q.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);t.tables=e,t.numTables=e.length;var i=Math.pow(2,Tt(t.numTables));t.searchRange=16*i,t.entrySelector=Tt(i),t.rangeShift=16*t.numTables-t.searchRange;for(var n=[],r=[],o=t.sizeOf()+kt().sizeOf()*t.numTables;o%4!=0;)o+=1,r.push({name:"padding",type:"BYTE",value:0});for(var a=0;a<e.length;a+=1){var s=e[a];I.argument(4===s.tableName.length,"Table name"+s.tableName+" is invalid.");var l=s.sizeOf(),u=kt(s.tableName,Ct(s.encode()),o,l);for(n.push({name:u.tag+" Table Record",type:"RECORD",value:u}),r.push({name:s.tableName+" table",type:"RECORD",value:s}),o+=l,I.argument(!isNaN(o),"Something went wrong calculating the offset.");o%4!=0;)o+=1,r.push({name:"padding",type:"BYTE",value:0})}return n.sort((function(e,t){return e.value.tag>t.value.tag?1:-1})),t.fields=t.fields.concat(n),t.fields=t.fields.concat(r),t}function At(e,t,i){for(var n=0;n<t.length;n+=1){var r=e.charToGlyphIndex(t[n]);if(0<r)return e.glyphs.get(r).getMetrics()}return i}var Pt=function(e){for(var t,i=[],n=[],r=[],o=[],a=[],s=[],l=[],u=0,c=0,d=0,h=0,p=0,f=0;f<e.glyphs.length;f+=1){var g=e.glyphs.get(f),m=0|g.unicode;if(isNaN(g.advanceWidth))throw new Error("Glyph "+g.name+" ("+f+"): advanceWidth is not a number.");(m<t||void 0===t)&&0<m&&(t=m),u<m&&(u=m);var v=ft(m);if(v<32)c|=1<<v;else if(v<64)d|=1<<v-32;else if(v<96)h|=1<<v-64;else{if(!(v<123))throw new Error("Unicode ranges bits > 123 are reserved for internal usage");p|=1<<v-96}if(".notdef"!==g.name){var y=g.getMetrics();i.push(y.xMin),n.push(y.yMin),r.push(y.xMax),o.push(y.yMax),s.push(y.leftSideBearing),l.push(y.rightSideBearing),a.push(g.advanceWidth)}}var b={xMin:Math.min.apply(null,i),yMin:Math.min.apply(null,n),xMax:Math.max.apply(null,r),yMax:Math.max.apply(null,o),advanceWidthMax:Math.max.apply(null,a),advanceWidthAvg:function(e){for(var t=0,i=0;i<e.length;i+=1)t+=e[i];return t/e.length}(a),minLeftSideBearing:Math.min.apply(null,s),maxLeftSideBearing:Math.max.apply(null,s),minRightSideBearing:Math.min.apply(null,l)};b.ascender=e.ascender,b.descender=e.descender;var w=He({flags:3,unitsPerEm:e.unitsPerEm,xMin:b.xMin,yMin:b.yMin,xMax:b.xMax,yMax:b.yMax,lowestRecPPEM:3,createdTimestamp:e.createdTimestamp}),E=qe({ascender:b.ascender,descender:b.descender,advanceWidthMax:b.advanceWidthMax,minLeftSideBearing:b.minLeftSideBearing,minRightSideBearing:b.minRightSideBearing,xMaxExtent:b.maxLeftSideBearing+(b.xMax-b.xMin),numberOfHMetrics:e.glyphs.length}),_=Je(e.glyphs.length),S=pt({xAvgCharWidth:Math.round(b.advanceWidthAvg),usWeightClass:e.tables.os2.usWeightClass,usWidthClass:e.tables.os2.usWidthClass,usFirstCharIndex:t,usLastCharIndex:u,ulUnicodeRange1:c,ulUnicodeRange2:d,ulUnicodeRange3:h,ulUnicodeRange4:p,fsSelection:e.tables.os2.fsSelection,sTypoAscender:b.ascender,sTypoDescender:b.descender,sTypoLineGap:0,usWinAscent:b.yMax,usWinDescent:Math.abs(b.yMin),ulCodePageRange1:1,sxHeight:At(e,"xyvw",{yMax:Math.round(b.ascender/2)}).yMax,sCapHeight:At(e,"HIKLEFJMNTZBDPRAGOQSUVWXY",b).yMax,usDefaultChar:e.hasChar(" ")?32:0,usBreakChar:e.hasChar(" ")?32:0}),T=We(e.glyphs),C=le(e.glyphs),k=e.getEnglishName("fontFamily"),x=e.getEnglishName("fontSubfamily"),A=k+" "+x,P=e.getEnglishName("postScriptName");P||(P=k.replace(/\s/g,"")+"-"+x);var I={};for(var R in e.names)I[R]=e.names[R];I.uniqueID||(I.uniqueID={en:e.getEnglishName("manufacturer")+":"+A}),I.postScriptName||(I.postScriptName={en:P}),I.preferredFamily||(I.preferredFamily=e.names.fontFamily),I.preferredSubfamily||(I.preferredSubfamily=e.names.fontSubfamily);var D=[],O=ct(I,D),N=0<D.length?$e(D):void 0,L=mt(),M=Ve(e.glyphs,{version:e.getEnglishName("version"),fullName:A,familyName:k,weightName:x,postScriptName:P,unitsPerEm:e.unitsPerEm,fontBBox:[0,b.yMin,b.ascender,b.advanceWidthMax]}),F=e.metas&&0<Object.keys(e.metas).length?St(e.metas):void 0,U=[w,E,_,S,O,C,L,M,T];N&&U.push(N),e.tables.gsub&&U.push(Et(e.tables.gsub)),F&&U.push(F);for(var B=xt(U),V=Ct(B.encode()),z=B.fields,H=!1,j=0;j<z.length;j+=1)if("head table"===z[j].name){z[j].value.checkSumAdjustment=2981146554-V,H=!0;break}if(!H)throw new Error("Could not find head table with checkSum to adjust.");return B};function It(e,t){for(var i=0,n=e.length-1;i<=n;){var r=i+n>>>1,o=e[r].tag;if(o===t)return r;o<t?i=r+1:n=r-1}return-i-1}function Rt(e,t){for(var i=0,n=e.length-1;i<=n;){var r=i+n>>>1,o=e[r];if(o===t)return r;o<t?i=r+1:n=r-1}return-i-1}function Dt(e,t){for(var i,n=0,r=e.length-1;n<=r;){var o=n+r>>>1,a=(i=e[o]).start;if(a===t)return i;a<t?n=o+1:r=o-1}if(0<n)return t>(i=e[n-1]).end?0:i}function Ot(e,t){this.font=e,this.tableName=t}function Nt(e){Ot.call(this,e,"gpos")}function Lt(e){Ot.call(this,e,"gsub")}function Mt(e,t){var i=e.length;if(i!==t.length)return!1;for(var n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0}function Ft(e,t,i){for(var n=e.subtables,r=0;r<n.length;r++){var o=n[r];if(o.substFormat===t)return o}if(i)return n.push(i),i}function Ut(e){for(var t=new ArrayBuffer(e.length),i=new Uint8Array(t),n=0;n<e.length;++n)i[n]=e[n];return t}function Bt(e,t){if(!e)throw t}function Vt(e,t,i,n,r){var o;return 0<(t&n)?(o=e.parseByte(),0==(t&r)&&(o=-o),i+o):0<(t&r)?i:i+e.parseShort()}function zt(e,t,i){var n,r,o=new ae.Parser(t,i);if(e.numberOfContours=o.parseShort(),e._xMin=o.parseShort(),e._yMin=o.parseShort(),e._xMax=o.parseShort(),e._yMax=o.parseShort(),0<e.numberOfContours){for(var a=e.endPointIndices=[],s=0;s<e.numberOfContours;s+=1)a.push(o.parseUShort());e.instructionLength=o.parseUShort(),e.instructions=[];for(var l=0;l<e.instructionLength;l+=1)e.instructions.push(o.parseByte());var u=a[a.length-1]+1;n=[];for(var c=0;c<u;c+=1)if(r=o.parseByte(),n.push(r),0<(8&r))for(var d=o.parseByte(),h=0;h<d;h+=1)n.push(r),c+=1;if(I.argument(n.length===u,"Bad flags."),0<a.length){var p,f=[];if(0<u){for(var g=0;g<u;g+=1)r=n[g],(p={}).onCurve=!!(1&r),p.lastPointOfContour=0<=a.indexOf(g),f.push(p);for(var m=0,v=0;v<u;v+=1)r=n[v],(p=f[v]).x=Vt(o,r,m,2,16),m=p.x;for(var y=0,b=0;b<u;b+=1)r=n[b],(p=f[b]).y=Vt(o,r,y,4,32),y=p.y}e.points=f}else e.points=[]}else if(0===e.numberOfContours)e.points=[];else{e.isComposite=!0,e.points=[],e.components=[];for(var w=!0;w;){n=o.parseUShort();var E={glyphIndex:o.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};0<(1&n)?0<(2&n)?(E.dx=o.parseShort(),E.dy=o.parseShort()):E.matchedPoints=[o.parseUShort(),o.parseUShort()]:0<(2&n)?(E.dx=o.parseChar(),E.dy=o.parseChar()):E.matchedPoints=[o.parseByte(),o.parseByte()],0<(8&n)?E.xScale=E.yScale=o.parseF2Dot14():0<(64&n)?(E.xScale=o.parseF2Dot14(),E.yScale=o.parseF2Dot14()):0<(128&n)&&(E.xScale=o.parseF2Dot14(),E.scale01=o.parseF2Dot14(),E.scale10=o.parseF2Dot14(),E.yScale=o.parseF2Dot14()),e.components.push(E),w=!!(32&n)}if(256&n){e.instructionLength=o.parseUShort(),e.instructions=[];for(var _=0;_<e.instructionLength;_+=1)e.instructions.push(o.parseByte())}}}function Ht(e,t){for(var i=[],n=0;n<e.length;n+=1){var r=e[n],o={x:t.xScale*r.x+t.scale01*r.y+t.dx,y:t.scale10*r.x+t.yScale*r.y+t.dy,onCurve:r.onCurve,lastPointOfContour:r.lastPointOfContour};i.push(o)}return i}function jt(e){var t=new x;if(!e)return t;for(var i=function(e){for(var t=[],i=[],n=0;n<e.length;n+=1){var r=e[n];i.push(r),r.lastPointOfContour&&(t.push(i),i=[])}return I.argument(0===i.length,"There are still points left in the current contour."),t}(e),n=0;n<i.length;++n){var r=i[n],o=null,a=r[r.length-1],s=r[0];if(a.onCurve)t.moveTo(a.x,a.y);else if(s.onCurve)t.moveTo(s.x,s.y);else{var l={x:.5*(a.x+s.x),y:.5*(a.y+s.y)};t.moveTo(l.x,l.y)}for(var u=0;u<r.length;++u)if(o=a,a=s,s=r[(u+1)%r.length],a.onCurve)t.lineTo(a.x,a.y);else{var c=s;o.onCurve||(a.x,o.x,a.y,o.y),s.onCurve||(c={x:.5*(a.x+s.x),y:.5*(a.y+s.y)}),t.quadraticCurveTo(a.x,a.y,c.x,c.y)}t.closePath()}return t}function qt(e,t){if(t.isComposite)for(var i=0;i<t.components.length;i+=1){var n=t.components[i],r=e.get(n.glyphIndex);if(r.getPath(),r.points){var o=void 0;if(void 0===n.matchedPoints)o=Ht(r.points,n);else{if(n.matchedPoints[0]>t.points.length-1||n.matchedPoints[1]>r.points.length-1)throw Error("Matched points out of range in "+t.name);var a=t.points[n.matchedPoints[0]],s=r.points[n.matchedPoints[1]],l={xScale:n.xScale,scale01:n.scale01,scale10:n.scale10,yScale:n.yScale,dx:0,dy:0};s=Ht([s],l)[0],l.dx=a.x-s.x,l.dy=a.y-s.y,o=Ht(r.points,l)}t.points=t.points.concat(o)}}return jt(t.points)}(Nt.prototype=Ot.prototype={searchTag:It,binSearch:Rt,getTable:function(e){var t=this.font.tables[this.tableName];return!t&&e&&(t=this.font.tables[this.tableName]=this.createDefaultTable()),t},getScriptNames:function(){var e=this.getTable();return e?e.scripts.map((function(e){return e.tag})):[]},getDefaultScriptName:function(){var e=this.getTable();if(e){for(var t=!1,i=0;i<e.scripts.length;i++){var n=e.scripts[i].tag;if("DFLT"===n)return n;"latn"===n&&(t=!0)}return t?"latn":void 0}},getScriptTable:function(e,t){var i=this.getTable(t);if(i){e=e||"DFLT";var n=i.scripts,r=It(i.scripts,e);if(0<=r)return n[r].script;if(t){var o={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return n.splice(-1-r,0,o),o.script}}},getLangSysTable:function(e,t,i){var n=this.getScriptTable(e,i);if(n){if(!t||"dflt"===t||"DFLT"===t)return n.defaultLangSys;var r=It(n.langSysRecords,t);if(0<=r)return n.langSysRecords[r].langSys;if(i){var o={tag:t,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return n.langSysRecords.splice(-1-r,0,o),o.langSys}}},getFeatureTable:function(e,t,i,n){var r=this.getLangSysTable(e,t,n);if(r){for(var o,a=r.featureIndexes,s=this.font.tables[this.tableName].features,l=0;l<a.length;l++)if((o=s[a[l]]).tag===i)return o.feature;if(n){var u=s.length;return I.assert(0===u||i>=s[u-1].tag,"Features must be added in alphabetical order."),o={tag:i,feature:{params:0,lookupListIndexes:[]}},s.push(o),a.push(u),o.feature}}},getLookupTables:function(e,t,i,n,r){var o=this.getFeatureTable(e,t,i,r),a=[];if(o){for(var s,l=o.lookupListIndexes,u=this.font.tables[this.tableName].lookups,c=0;c<l.length;c++)(s=u[l[c]]).lookupType===n&&a.push(s);if(0===a.length&&r){s={lookupType:n,lookupFlag:0,subtables:[],markFilteringSet:void 0};var d=u.length;return u.push(s),l.push(d),[s]}}return a},getGlyphClass:function(e,t){switch(e.format){case 1:return e.startGlyph<=t&&t<e.startGlyph+e.classes.length?e.classes[t-e.startGlyph]:0;case 2:var i=Dt(e.ranges,t);return i?i.classId:0}},getCoverageIndex:function(e,t){switch(e.format){case 1:var i=Rt(e.glyphs,t);return 0<=i?i:-1;case 2:var n=Dt(e.ranges,t);return n?n.index+t-n.start:-1}},expandCoverage:function(e){if(1===e.format)return e.glyphs;for(var t=[],i=e.ranges,n=0;n<i.length;n++)for(var r=i[n],o=r.start,a=r.end,s=o;s<=a;s++)t.push(s);return t}}).init=function(){var e=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(e)},Nt.prototype.getKerningValue=function(e,t,i){for(var n=0;n<e.length;n++)for(var r=e[n].subtables,o=0;o<r.length;o++){var a=r[o],s=this.getCoverageIndex(a.coverage,t);if(!(s<0))switch(a.posFormat){case 1:for(var l=a.pairSets[s],u=0;u<l.length;u++){var c=l[u];if(c.secondGlyph===i)return c.value1&&c.value1.xAdvance||0}break;case 2:var d=this.getGlyphClass(a.classDef1,t),h=this.getGlyphClass(a.classDef2,i),p=a.classRecords[d][h];return p.value1&&p.value1.xAdvance||0}}return 0},Nt.prototype.getKerningTables=function(e,t){if(this.font.tables.gpos)return this.getLookupTables(e,t,"kern",2)},(Lt.prototype=Ot.prototype).createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},Lt.prototype.getSingle=function(e,t,i){for(var n=[],r=this.getLookupTables(t,i,e,1),o=0;o<r.length;o++)for(var a=r[o].subtables,s=0;s<a.length;s++){var l=a[s],u=this.expandCoverage(l.coverage),c=void 0;if(1===l.substFormat){var d=l.deltaGlyphId;for(c=0;c<u.length;c++){var h=u[c];n.push({sub:h,by:h+d})}}else{var p=l.substitute;for(c=0;c<u.length;c++)n.push({sub:u[c],by:p[c]})}}return n},Lt.prototype.getAlternates=function(e,t,i){for(var n=[],r=this.getLookupTables(t,i,e,3),o=0;o<r.length;o++)for(var a=r[o].subtables,s=0;s<a.length;s++)for(var l=a[s],u=this.expandCoverage(l.coverage),c=l.alternateSets,d=0;d<u.length;d++)n.push({sub:u[d],by:c[d]});return n},Lt.prototype.getLigatures=function(e,t,i){for(var n=[],r=this.getLookupTables(t,i,e,4),o=0;o<r.length;o++)for(var a=r[o].subtables,s=0;s<a.length;s++)for(var l=a[s],u=this.expandCoverage(l.coverage),c=l.ligatureSets,d=0;d<u.length;d++)for(var h=u[d],p=c[d],f=0;f<p.length;f++){var g=p[f];n.push({sub:[h].concat(g.components),by:g.ligGlyph})}return n},Lt.prototype.addSingle=function(e,t,i,n){var r=Ft(this.getLookupTables(i,n,e,1,!0)[0],2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});I.assert(1===r.coverage.format,"Ligature: unable to modify coverage table format "+r.coverage.format);var o=t.sub,a=this.binSearch(r.coverage.glyphs,o);a<0&&(a=-1-a,r.coverage.glyphs.splice(a,0,o),r.substitute.splice(a,0,0)),r.substitute[a]=t.by},Lt.prototype.addAlternate=function(e,t,i,n){var r=Ft(this.getLookupTables(i,n,e,3,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});I.assert(1===r.coverage.format,"Ligature: unable to modify coverage table format "+r.coverage.format);var o=t.sub,a=this.binSearch(r.coverage.glyphs,o);a<0&&(a=-1-a,r.coverage.glyphs.splice(a,0,o),r.alternateSets.splice(a,0,0)),r.alternateSets[a]=t.by},Lt.prototype.addLigature=function(e,t,i,n){var r=this.getLookupTables(i,n,e,4,!0)[0],o=r.subtables[0];o||(o={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},r.subtables[0]=o),I.assert(1===o.coverage.format,"Ligature: unable to modify coverage table format "+o.coverage.format);var a=t.sub[0],s=t.sub.slice(1),l={ligGlyph:t.by,components:s},u=this.binSearch(o.coverage.glyphs,a);if(0<=u){for(var c=o.ligatureSets[u],d=0;d<c.length;d++)if(Mt(c[d].components,s))return;c.push(l)}else u=-1-u,o.coverage.glyphs.splice(u,0,a),o.ligatureSets.splice(u,0,[l])},Lt.prototype.getFeature=function(e,t,i){if(/ss\d\d/.test(e))return this.getSingle(e,t,i);switch(e){case"aalt":case"salt":return this.getSingle(e,t,i).concat(this.getAlternates(e,t,i));case"dlig":case"liga":case"rlig":return this.getLigatures(e,t,i)}},Lt.prototype.add=function(e,t,i,n){if(/ss\d\d/.test(e))return this.addSingle(e,t,i,n);switch(e){case"aalt":case"salt":return"number"==typeof t.by?this.addSingle(e,t,i,n):this.addAlternate(e,t,i,n);case"dlig":case"liga":case"rlig":return this.addLigature(e,t,i,n)}};var Gt,Wt,$t,Yt,Kt={getPath:jt,parse:function(e,t,i,n){for(var r=new Ee.GlyphSet(n),o=0;o<i.length-1;o+=1){var a=i[o];a!==i[o+1]?r.push(o,Ee.ttfGlyphLoader(n,o,zt,e,t+a,qt)):r.push(o,Ee.glyphLoader(n,o))}return r}};function Jt(e){this.font=e,this.getCommands=function(e){return Kt.getPath(e).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function Xt(e){return e}function Qt(e){return Math.sign(e)*Math.round(Math.abs(e))}function Zt(e){return Math.sign(e)*Math.round(Math.abs(2*e))/2}function ei(e){return Math.sign(e)*(Math.round(Math.abs(e)+.5)-.5)}function ti(e){return Math.sign(e)*Math.ceil(Math.abs(e))}function ii(e){return Math.sign(e)*Math.floor(Math.abs(e))}var ni=function(e){var t=this.srPeriod,i=this.srPhase,n=1;return e<0&&(e=-e,n=-1),e+=this.srThreshold-i,e=Math.trunc(e/t)*t,(e+=i)<0?i*n:e*n},ri={x:1,y:0,axis:"x",distance:function(e,t,i,n){return(i?e.xo:e.x)-(n?t.xo:t.x)},interpolate:function(e,t,i,n){var r,o,a,s,l,u,c;if(!n||n===this)return r=e.xo-t.xo,o=e.xo-i.xo,l=t.x-t.xo,u=i.x-i.xo,0===(c=(a=Math.abs(r))+(s=Math.abs(o)))?void(e.x=e.xo+(l+u)/2):void(e.x=e.xo+(l*s+u*a)/c);r=n.distance(e,t,!0,!0),o=n.distance(e,i,!0,!0),l=n.distance(t,t,!1,!0),u=n.distance(i,i,!1,!0),0!==(c=(a=Math.abs(r))+(s=Math.abs(o)))?ri.setRelative(e,e,(l*s+u*a)/c,n,!0):ri.setRelative(e,e,(l+u)/2,n,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(e,t,i,n,r){if(n&&n!==this){var o=r?t.xo:t.x,a=r?t.yo:t.y,s=o+i*n.x,l=a+i*n.y;e.x=s+(e.y-l)/n.normalSlope}else e.x=(r?t.xo:t.x)+i},slope:0,touch:function(e){e.xTouched=!0},touched:function(e){return e.xTouched},untouch:function(e){e.xTouched=!1}},oi={x:0,y:1,axis:"y",distance:function(e,t,i,n){return(i?e.yo:e.y)-(n?t.yo:t.y)},interpolate:function(e,t,i,n){var r,o,a,s,l,u,c;if(!n||n===this)return r=e.yo-t.yo,o=e.yo-i.yo,l=t.y-t.yo,u=i.y-i.yo,0===(c=(a=Math.abs(r))+(s=Math.abs(o)))?void(e.y=e.yo+(l+u)/2):void(e.y=e.yo+(l*s+u*a)/c);r=n.distance(e,t,!0,!0),o=n.distance(e,i,!0,!0),l=n.distance(t,t,!1,!0),u=n.distance(i,i,!1,!0),0!==(c=(a=Math.abs(r))+(s=Math.abs(o)))?oi.setRelative(e,e,(l*s+u*a)/c,n,!0):oi.setRelative(e,e,(l+u)/2,n,!0)},normalSlope:0,setRelative:function(e,t,i,n,r){if(n&&n!==this){var o=r?t.xo:t.x,a=r?t.yo:t.y,s=o+i*n.x,l=a+i*n.y;e.y=l+n.normalSlope*(e.x-s)}else e.y=(r?t.yo:t.y)+i},slope:Number.POSITIVE_INFINITY,touch:function(e){e.yTouched=!0},touched:function(e){return e.yTouched},untouch:function(e){e.yTouched=!1}};function ai(e,t){this.x=e,this.y=t,this.axis=void 0,this.slope=t/e,this.normalSlope=-e/t,Object.freeze(this)}function si(e,t){var i=Math.sqrt(e*e+t*t);return t/=i,1==(e/=i)&&0===t?ri:0===e&&1===t?oi:new ai(e,t)}function li(e,t,i,n){this.x=this.xo=Math.round(64*e)/64,this.y=this.yo=Math.round(64*t)/64,this.lastPointOfContour=i,this.onCurve=n,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Object.freeze(ri),Object.freeze(oi),ai.prototype.distance=function(e,t,i,n){return this.x*ri.distance(e,t,i,n)+this.y*oi.distance(e,t,i,n)},ai.prototype.interpolate=function(e,t,i,n){var r,o,a,s,l,u,c;a=n.distance(e,t,!0,!0),s=n.distance(e,i,!0,!0),r=n.distance(t,t,!1,!0),o=n.distance(i,i,!1,!0),0!==(c=(l=Math.abs(a))+(u=Math.abs(s)))?this.setRelative(e,e,(r*u+o*l)/c,n,!0):this.setRelative(e,e,(r+o)/2,n,!0)},ai.prototype.setRelative=function(e,t,i,n,r){n=n||this;var o=r?t.xo:t.x,a=r?t.yo:t.y,s=o+i*n.x,l=a+i*n.y,u=n.normalSlope,c=this.slope,d=e.x,h=e.y;e.x=(c*d-u*s+l-h)/(c-u),e.y=c*(e.x-d)+h},ai.prototype.touch=function(e){e.xTouched=!0,e.yTouched=!0},li.prototype.nextTouched=function(e){for(var t=this.nextPointOnContour;!e.touched(t)&&t!==this;)t=t.nextPointOnContour;return t},li.prototype.prevTouched=function(e){for(var t=this.prevPointOnContour;!e.touched(t)&&t!==this;)t=t.prevPointOnContour;return t};var ui=Object.freeze(new li(0,0)),ci={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function di(e,t){switch(this.env=e,this.stack=[],this.prog=t,e){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=ri,this.round=Qt}}function hi(e){for(var t=e.tZone=new Array(e.gZone.length),i=0;i<t.length;i++)t[i]=new li(0,0)}function pi(e,t){var i,n=e.prog,r=e.ip,o=1;do{if(88===(i=n[++r]))o++;else if(89===i)o--;else if(64===i)r+=n[r+1]+1;else if(65===i)r+=2*n[r+1]+1;else if(176<=i&&i<=183)r+=i-176+1;else if(184<=i&&i<=191)r+=2*(i-184+1);else if(t&&1===o&&27===i)break}while(0<o);e.ip=r}function fi(e,i){t.DEBUG&&console.log(i.step,"SVTCA["+e.axis+"]"),i.fv=i.pv=i.dpv=e}function gi(e,i){t.DEBUG&&console.log(i.step,"SPVTCA["+e.axis+"]"),i.pv=i.dpv=e}function mi(e,i){t.DEBUG&&console.log(i.step,"SFVTCA["+e.axis+"]"),i.fv=e}function vi(e,i){var n,r,o=i.stack,a=o.pop(),s=o.pop(),l=i.z2[a],u=i.z1[s];t.DEBUG&&console.log("SPVTL["+e+"]",a,s),r=e?(n=l.y-u.y,u.x-l.x):(n=u.x-l.x,u.y-l.y),i.pv=i.dpv=si(n,r)}function yi(e,i){var n,r,o=i.stack,a=o.pop(),s=o.pop(),l=i.z2[a],u=i.z1[s];t.DEBUG&&console.log("SFVTL["+e+"]",a,s),r=e?(n=l.y-u.y,u.x-l.x):(n=u.x-l.x,u.y-l.y),i.fv=si(n,r)}function bi(e){t.DEBUG&&console.log(e.step,"POP[]"),e.stack.pop()}function wi(e,i){var n=i.stack.pop(),r=i.z0[n],o=i.fv,a=i.pv;t.DEBUG&&console.log(i.step,"MDAP["+e+"]",n);var s=a.distance(r,ui);e&&(s=i.round(s)),o.setRelative(r,ui,s,a),o.touch(r),i.rp0=i.rp1=n}function Ei(e,i){var n,r,o,a=i.z2,s=a.length-2;t.DEBUG&&console.log(i.step,"IUP["+e.axis+"]");for(var l=0;l<s;l++)n=a[l],e.touched(n)||(r=n.prevTouched(e))!==n&&(r===(o=n.nextTouched(e))&&e.setRelative(n,n,e.distance(r,r,!1,!0),e,!0),e.interpolate(n,r,o,e))}function _i(e,i){for(var n=i.stack,r=e?i.rp1:i.rp2,o=(e?i.z0:i.z1)[r],a=i.fv,s=i.pv,l=i.loop,u=i.z2;l--;){var c=n.pop(),d=u[c],h=s.distance(o,o,!1,!0);a.setRelative(d,d,h,s),a.touch(d),t.DEBUG&&console.log(i.step,(1<i.loop?"loop "+(i.loop-l)+": ":"")+"SHP["+(e?"rp1":"rp2")+"]",c)}i.loop=1}function Si(e,i){var n=i.stack,r=e?i.rp1:i.rp2,o=(e?i.z0:i.z1)[r],a=i.fv,s=i.pv,l=n.pop(),u=i.z2[i.contours[l]],c=u;t.DEBUG&&console.log(i.step,"SHC["+e+"]",l);for(var d=s.distance(o,o,!1,!0);c!==o&&a.setRelative(c,c,d,s),(c=c.nextPointOnContour)!==u;);}function Ti(e,i){var n,r,o=i.stack,a=e?i.rp1:i.rp2,s=(e?i.z0:i.z1)[a],l=i.fv,u=i.pv,c=o.pop();switch(t.DEBUG&&console.log(i.step,"SHZ["+e+"]",c),c){case 0:n=i.tZone;break;case 1:n=i.gZone;break;default:throw new Error("Invalid zone")}for(var d=u.distance(s,s,!1,!0),h=n.length-2,p=0;p<h;p++)r=n[p],l.setRelative(r,r,d,u)}function Ci(e,i){var n=i.stack,r=n.pop()/64,o=n.pop(),a=i.z1[o],s=i.z0[i.rp0],l=i.fv,u=i.pv;l.setRelative(a,s,r,u),l.touch(a),t.DEBUG&&console.log(i.step,"MSIRP["+e+"]",r,o),i.rp1=i.rp0,i.rp2=o,e&&(i.rp0=o)}function ki(e,i){var n=i.stack,r=n.pop(),o=n.pop(),a=i.z0[o],s=i.fv,l=i.pv,u=i.cvt[r];t.DEBUG&&console.log(i.step,"MIAP["+e+"]",r,"(",u,")",o);var c=l.distance(a,ui);e&&(Math.abs(c-u)<i.cvCutIn&&(c=u),c=i.round(c)),s.setRelative(a,ui,c,l),0===i.zp0&&(a.xo=a.x,a.yo=a.y),s.touch(a),i.rp0=i.rp1=o}function xi(e,i){var n=i.stack,r=n.pop(),o=i.z2[r];t.DEBUG&&console.log(i.step,"GC["+e+"]",r),n.push(64*i.dpv.distance(o,ui,e,!1))}function Ai(e,i){var n=i.stack,r=n.pop(),o=n.pop(),a=i.z1[r],s=i.z0[o],l=i.dpv.distance(s,a,e,e);t.DEBUG&&console.log(i.step,"MD["+e+"]",r,o,"->",l),i.stack.push(Math.round(64*l))}function Pi(e,i){var n=i.stack,r=n.pop(),o=i.fv,a=i.pv,s=i.ppem,l=i.deltaBase+16*(e-1),u=i.deltaShift,c=i.z0;t.DEBUG&&console.log(i.step,"DELTAP["+e+"]",r,n);for(var d=0;d<r;d++){var h=n.pop(),p=n.pop();if(l+((240&p)>>4)===s){var f=(15&p)-8;0<=f&&f++,t.DEBUG&&console.log(i.step,"DELTAPFIX",h,"by",f*u);var g=c[h];o.setRelative(g,g,f*u,a)}}}function Ii(e,i){var n=i.stack,r=n.pop();t.DEBUG&&console.log(i.step,"ROUND[]"),n.push(64*i.round(r/64))}function Ri(e,i){var n=i.stack,r=n.pop(),o=i.ppem,a=i.deltaBase+16*(e-1),s=i.deltaShift;t.DEBUG&&console.log(i.step,"DELTAC["+e+"]",r,n);for(var l=0;l<r;l++){var u=n.pop(),c=n.pop();if(a+((240&c)>>4)===o){var d=(15&c)-8;0<=d&&d++;var h=d*s;t.DEBUG&&console.log(i.step,"DELTACFIX",u,"by",h),i.cvt[u]+=h}}}function Di(e,i){var n,r,o=i.stack,a=o.pop(),s=o.pop(),l=i.z2[a],u=i.z1[s];t.DEBUG&&console.log(i.step,"SDPVTL["+e+"]",a,s),r=e?(n=l.y-u.y,u.x-l.x):(n=u.x-l.x,u.y-l.y),i.dpv=si(n,r)}function Oi(e,i){var n=i.stack,r=i.prog,o=i.ip;t.DEBUG&&console.log(i.step,"PUSHB["+e+"]");for(var a=0;a<e;a++)n.push(r[++o]);i.ip=o}function Ni(e,i){var n=i.ip,r=i.prog,o=i.stack;t.DEBUG&&console.log(i.ip,"PUSHW["+e+"]");for(var a=0;a<e;a++){var s=r[++n]<<8|r[++n];32768&s&&(s=-(1+(65535^s))),o.push(s)}i.ip=n}function Li(e,i,n,r,o,a){var s,l,u,c,d=a.stack,h=e&&d.pop(),p=d.pop(),f=a.rp0,g=a.z0[f],m=a.z1[p],v=a.minDis,y=a.fv,b=a.dpv;u=0<=(l=s=b.distance(m,g,!0,!0))?1:-1,l=Math.abs(l),e&&(c=a.cvt[h],r&&Math.abs(l-c)<a.cvCutIn&&(l=c)),n&&l<v&&(l=v),r&&(l=a.round(l)),y.setRelative(m,g,u*l,b),y.touch(m),t.DEBUG&&console.log(a.step,(e?"MIRP[":"MDRP[")+(i?"M":"m")+(n?">":"_")+(r?"R":"_")+(0===o?"Gr":1===o?"Bl":2===o?"Wh":"")+"]",e?h+"("+a.cvt[h]+","+c+")":"",p,"(d =",s,"->",u*l,")"),a.rp1=a.rp0,a.rp2=p,i&&(a.rp0=p)}function Mi(e){this.char=e,this.state={},this.activeState=null}function Fi(e,t,i){this.contextName=i,this.startIndex=e,this.endOffset=t}function Ui(e,t,i){this.contextName=e,this.openRange=null,this.ranges=[],this.checkStart=t,this.checkEnd=i}function Bi(e,t){this.context=e,this.index=t,this.length=e.length,this.current=e[t],this.backtrack=e.slice(0,t),this.lookahead=e.slice(t+1)}function Vi(e){this.eventId=e,this.subscribers=[]}function zi(e){this.tokens=[],this.registeredContexts={},this.contextCheckers=[],this.events={},this.registeredModifiers=[],function(e){var t=this,i=["start","end","next","newToken","contextStart","contextEnd","insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD","updateContextsRanges"];i.forEach((function(e){Object.defineProperty(t.events,e,{value:new Vi(e)})})),e&&i.forEach((function(i){var n=e[i];"function"==typeof n&&t.events[i].subscribe(n)})),["insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD"].forEach((function(e){t.events[e].subscribe(t.updateContextsRanges)}))}.call(this,e)}function Hi(e){return/[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(e)}function ji(e){return/[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(e)}function qi(e){return/[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(e)}Jt.prototype.exec=function(e,i){if("number"!=typeof i)throw new Error("Point size is not a number!");if(!(2<this._errorState)){var n=this.font,r=this._prepState;if(!r||r.ppem!==i){var o=this._fpgmState;if(!o){di.prototype=ci,(o=this._fpgmState=new di("fpgm",n.tables.fpgm)).funcs=[],o.font=n,t.DEBUG&&(console.log("---EXEC FPGM---"),o.step=-1);try{Wt(o)}catch(e){return console.log("Hinting error in FPGM:"+e),void(this._errorState=3)}}di.prototype=o,(r=this._prepState=new di("prep",n.tables.prep)).ppem=i;var a=n.tables.cvt;if(a)for(var s=r.cvt=new Array(a.length),l=i/n.unitsPerEm,u=0;u<a.length;u++)s[u]=a[u]*l;else r.cvt=[];t.DEBUG&&(console.log("---EXEC PREP---"),r.step=-1);try{Wt(r)}catch(e){this._errorState<2&&console.log("Hinting error in PREP:"+e),this._errorState=2}}if(!(1<this._errorState))try{return $t(e,r)}catch(e){return this._errorState<1&&(console.log("Hinting error:"+e),console.log("Note: further hinting errors are silenced")),void(this._errorState=1)}}},$t=function(e,i){var n,r,o,a=i.ppem/i.font.unitsPerEm,s=a,l=e.components;if(di.prototype=i,l){var u=i.font;r=[],n=[];for(var c=0;c<l.length;c++){var d=l[c],h=u.glyphs.get(d.glyphIndex);o=new di("glyf",h.instructions),t.DEBUG&&(console.log("---EXEC COMP "+c+"---"),o.step=-1),Yt(h,o,a,s);for(var p=Math.round(d.dx*a),f=Math.round(d.dy*s),g=o.gZone,m=o.contours,v=0;v<g.length;v++){var y=g[v];y.xTouched=y.yTouched=!1,y.xo=y.x=y.x+p,y.yo=y.y=y.y+f}var b=r.length;r.push.apply(r,g);for(var w=0;w<m.length;w++)n.push(m[w]+b)}e.instructions&&!o.inhibitGridFit&&((o=new di("glyf",e.instructions)).gZone=o.z0=o.z1=o.z2=r,o.contours=n,r.push(new li(0,0),new li(Math.round(e.advanceWidth*a),0)),t.DEBUG&&(console.log("---EXEC COMPOSITE---"),o.step=-1),Wt(o),r.length-=2)}else o=new di("glyf",e.instructions),t.DEBUG&&(console.log("---EXEC GLYPH---"),o.step=-1),Yt(e,o,a,s),r=o.gZone;return r},Yt=function(e,i,n,r){for(var o,a,s,l=e.points||[],u=l.length,c=i.gZone=i.z0=i.z1=i.z2=[],d=i.contours=[],h=0;h<u;h++)o=l[h],c[h]=new li(o.x*n,o.y*r,o.lastPointOfContour,o.onCurve);for(var p=0;p<u;p++)o=c[p],a||(a=o,d.push(p)),o.lastPointOfContour?((o.nextPointOnContour=a).prevPointOnContour=o,a=void 0):(s=c[p+1],(o.nextPointOnContour=s).prevPointOnContour=o);if(!i.inhibitGridFit){if(t.DEBUG){console.log("PROCESSING GLYPH",i.stack);for(var f=0;f<u;f++)console.log(f,c[f].x,c[f].y)}if(c.push(new li(0,0),new li(Math.round(e.advanceWidth*n),0)),Wt(i),c.length-=2,t.DEBUG){console.log("FINISHED GLYPH",i.stack);for(var g=0;g<u;g++)console.log(g,c[g].x,c[g].y)}}},Wt=function(e){var i=e.prog;if(i){var n,r=i.length;for(e.ip=0;e.ip<r;e.ip++){if(t.DEBUG&&e.step++,!(n=Gt[i[e.ip]]))throw new Error("unknown instruction: 0x"+Number(i[e.ip]).toString(16));n(e)}}},Gt=[fi.bind(void 0,oi),fi.bind(void 0,ri),gi.bind(void 0,oi),gi.bind(void 0,ri),mi.bind(void 0,oi),mi.bind(void 0,ri),vi.bind(void 0,0),vi.bind(void 0,1),yi.bind(void 0,0),yi.bind(void 0,1),function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"SPVFS[]",n,r),e.pv=e.dpv=si(r,n)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"SPVFS[]",n,r),e.fv=si(r,n)},function(e){var i=e.stack,n=e.pv;t.DEBUG&&console.log(e.step,"GPV[]"),i.push(16384*n.x),i.push(16384*n.y)},function(e){var i=e.stack,n=e.fv;t.DEBUG&&console.log(e.step,"GFV[]"),i.push(16384*n.x),i.push(16384*n.y)},function(e){e.fv=e.pv,t.DEBUG&&console.log(e.step,"SFVTPV[]")},function(e){var i=e.stack,n=i.pop(),r=i.pop(),o=i.pop(),a=i.pop(),s=i.pop(),l=e.z0,u=e.z1,c=l[n],d=l[r],h=u[o],p=u[a],f=e.z2[s];t.DEBUG&&console.log("ISECT[], ",n,r,o,a,s);var g=c.x,m=c.y,v=d.x,y=d.y,b=h.x,w=h.y,E=p.x,_=p.y,S=(g-v)*(w-_)-(m-y)*(b-E),T=g*y-m*v,C=b*_-w*E;f.x=(T*(b-E)-C*(g-v))/S,f.y=(T*(w-_)-C*(m-y))/S},function(e){e.rp0=e.stack.pop(),t.DEBUG&&console.log(e.step,"SRP0[]",e.rp0)},function(e){e.rp1=e.stack.pop(),t.DEBUG&&console.log(e.step,"SRP1[]",e.rp1)},function(e){e.rp2=e.stack.pop(),t.DEBUG&&console.log(e.step,"SRP2[]",e.rp2)},function(e){var i=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"SZP0[]",i),e.zp0=i){case 0:e.tZone||hi(e),e.z0=e.tZone;break;case 1:e.z0=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){var i=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"SZP1[]",i),e.zp1=i){case 0:e.tZone||hi(e),e.z1=e.tZone;break;case 1:e.z1=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){var i=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"SZP2[]",i),e.zp2=i){case 0:e.tZone||hi(e),e.z2=e.tZone;break;case 1:e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){var i=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"SZPS[]",i),e.zp0=e.zp1=e.zp2=i,i){case 0:e.tZone||hi(e),e.z0=e.z1=e.z2=e.tZone;break;case 1:e.z0=e.z1=e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){e.loop=e.stack.pop(),t.DEBUG&&console.log(e.step,"SLOOP[]",e.loop)},function(e){t.DEBUG&&console.log(e.step,"RTG[]"),e.round=Qt},function(e){t.DEBUG&&console.log(e.step,"RTHG[]"),e.round=ei},function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"SMD[]",i),e.minDis=i/64},function(e){t.DEBUG&&console.log(e.step,"ELSE[]"),pi(e,!1)},function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"JMPR[]",i),e.ip+=i-1},function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"SCVTCI[]",i),e.cvCutIn=i/64},void 0,void 0,function(e){var i=e.stack;t.DEBUG&&console.log(e.step,"DUP[]"),i.push(i[i.length-1])},bi,function(e){t.DEBUG&&console.log(e.step,"CLEAR[]"),e.stack.length=0},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"SWAP[]"),i.push(n),i.push(r)},function(e){var i=e.stack;t.DEBUG&&console.log(e.step,"DEPTH[]"),i.push(i.length)},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"CINDEX[]",n),i.push(i[i.length-n])},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"MINDEX[]",n),i.push(i.splice(i.length-n,1)[0])},void 0,void 0,void 0,function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"LOOPCALL[]",n,r);var o=e.ip,a=e.prog;e.prog=e.funcs[n];for(var s=0;s<r;s++)Wt(e),t.DEBUG&&console.log(++e.step,s+1<r?"next loopcall":"done loopcall",s);e.ip=o,e.prog=a},function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"CALL[]",i);var n=e.ip,r=e.prog;e.prog=e.funcs[i],Wt(e),e.ip=n,e.prog=r,t.DEBUG&&console.log(++e.step,"returning from",i)},function(e){if("fpgm"!==e.env)throw new Error("FDEF not allowed here");var i=e.stack,n=e.prog,r=e.ip,o=i.pop(),a=r;for(t.DEBUG&&console.log(e.step,"FDEF[]",o);45!==n[++r];);e.ip=r,e.funcs[o]=n.slice(a+1,r)},void 0,wi.bind(void 0,0),wi.bind(void 0,1),Ei.bind(void 0,oi),Ei.bind(void 0,ri),_i.bind(void 0,0),_i.bind(void 0,1),Si.bind(void 0,0),Si.bind(void 0,1),Ti.bind(void 0,0),Ti.bind(void 0,1),function(e){for(var i=e.stack,n=e.loop,r=e.fv,o=i.pop()/64,a=e.z2;n--;){var s=i.pop(),l=a[s];t.DEBUG&&console.log(e.step,(1<e.loop?"loop "+(e.loop-n)+": ":"")+"SHPIX[]",s,o),r.setRelative(l,l,o),r.touch(l)}e.loop=1},function(e){for(var i=e.stack,n=e.rp1,r=e.rp2,o=e.loop,a=e.z0[n],s=e.z1[r],l=e.fv,u=e.dpv,c=e.z2;o--;){var d=i.pop(),h=c[d];t.DEBUG&&console.log(e.step,(1<e.loop?"loop "+(e.loop-o)+": ":"")+"IP[]",d,n,"<->",r),l.interpolate(h,a,s,u),l.touch(h)}e.loop=1},Ci.bind(void 0,0),Ci.bind(void 0,1),function(e){for(var i=e.stack,n=e.rp0,r=e.z0[n],o=e.loop,a=e.fv,s=e.pv,l=e.z1;o--;){var u=i.pop(),c=l[u];t.DEBUG&&console.log(e.step,(1<e.loop?"loop "+(e.loop-o)+": ":"")+"ALIGNRP[]",u),a.setRelative(c,r,0,s),a.touch(c)}e.loop=1},function(e){t.DEBUG&&console.log(e.step,"RTDG[]"),e.round=Zt},ki.bind(void 0,0),ki.bind(void 0,1),function(e){var i=e.prog,n=e.ip,r=e.stack,o=i[++n];t.DEBUG&&console.log(e.step,"NPUSHB[]",o);for(var a=0;a<o;a++)r.push(i[++n]);e.ip=n},function(e){var i=e.ip,n=e.prog,r=e.stack,o=n[++i];t.DEBUG&&console.log(e.step,"NPUSHW[]",o);for(var a=0;a<o;a++){var s=n[++i]<<8|n[++i];32768&s&&(s=-(1+(65535^s))),r.push(s)}e.ip=i},function(e){var i=e.stack,n=e.store;n||(n=e.store=[]);var r=i.pop(),o=i.pop();t.DEBUG&&console.log(e.step,"WS",r,o),n[o]=r},function(e){var i=e.stack,n=e.store,r=i.pop();t.DEBUG&&console.log(e.step,"RS",r);var o=n&&n[r]||0;i.push(o)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"WCVTP",n,r),e.cvt[r]=n/64},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"RCVT",n),i.push(64*e.cvt[n])},xi.bind(void 0,0),xi.bind(void 0,1),void 0,Ai.bind(void 0,0),Ai.bind(void 0,1),function(e){t.DEBUG&&console.log(e.step,"MPPEM[]"),e.stack.push(e.ppem)},void 0,function(e){t.DEBUG&&console.log(e.step,"FLIPON[]"),e.autoFlip=!0},void 0,void 0,function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"LT[]",n,r),i.push(r<n?1:0)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"LTEQ[]",n,r),i.push(r<=n?1:0)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"GT[]",n,r),i.push(n<r?1:0)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"GTEQ[]",n,r),i.push(n<=r?1:0)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"EQ[]",n,r),i.push(n===r?1:0)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"NEQ[]",n,r),i.push(n!==r?1:0)},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"ODD[]",n),i.push(Math.trunc(n)%2?1:0)},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"EVEN[]",n),i.push(Math.trunc(n)%2?0:1)},function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"IF[]",i),i||(pi(e,!0),t.DEBUG&&console.log(e.step,"EIF[]"))},function(e){t.DEBUG&&console.log(e.step,"EIF[]")},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"AND[]",n,r),i.push(n&&r?1:0)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"OR[]",n,r),i.push(n||r?1:0)},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"NOT[]",n),i.push(n?0:1)},Pi.bind(void 0,1),function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"SDB[]",i),e.deltaBase=i},function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"SDS[]",i),e.deltaShift=Math.pow(.5,i)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"ADD[]",n,r),i.push(r+n)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"SUB[]",n,r),i.push(r-n)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"DIV[]",n,r),i.push(64*r/n)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"MUL[]",n,r),i.push(r*n/64)},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"ABS[]",n),i.push(Math.abs(n))},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"NEG[]",n),i.push(-n)},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"FLOOR[]",n),i.push(64*Math.floor(n/64))},function(e){var i=e.stack,n=i.pop();t.DEBUG&&console.log(e.step,"CEILING[]",n),i.push(64*Math.ceil(n/64))},Ii.bind(void 0,0),Ii.bind(void 0,1),Ii.bind(void 0,2),Ii.bind(void 0,3),void 0,void 0,void 0,void 0,function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"WCVTF[]",n,r),e.cvt[r]=n*e.ppem/e.font.unitsPerEm},Pi.bind(void 0,2),Pi.bind(void 0,3),Ri.bind(void 0,1),Ri.bind(void 0,2),Ri.bind(void 0,3),function(e){var i,n=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"SROUND[]",n),e.round=ni,192&n){case 0:i=.5;break;case 64:i=1;break;case 128:i=2;break;default:throw new Error("invalid SROUND value")}switch(e.srPeriod=i,48&n){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*i;break;case 32:e.srPhase=.5*i;break;case 48:e.srPhase=.75*i;break;default:throw new Error("invalid SROUND value")}n&=15,e.srThreshold=0===n?0:(n/8-.5)*i},function(e){var i,n=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"S45ROUND[]",n),e.round=ni,192&n){case 0:i=Math.sqrt(2)/2;break;case 64:i=Math.sqrt(2);break;case 128:i=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(e.srPeriod=i,48&n){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*i;break;case 32:e.srPhase=.5*i;break;case 48:e.srPhase=.75*i;break;default:throw new Error("invalid S45ROUND value")}n&=15,e.srThreshold=0===n?0:(n/8-.5)*i},void 0,void 0,function(e){t.DEBUG&&console.log(e.step,"ROFF[]"),e.round=Xt},void 0,function(e){t.DEBUG&&console.log(e.step,"RUTG[]"),e.round=ti},function(e){t.DEBUG&&console.log(e.step,"RDTG[]"),e.round=ii},bi,bi,void 0,void 0,void 0,void 0,void 0,function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"SCANCTRL[]",i)},Di.bind(void 0,0),Di.bind(void 0,1),function(e){var i=e.stack,n=i.pop(),r=0;t.DEBUG&&console.log(e.step,"GETINFO[]",n),1&n&&(r=35),32&n&&(r|=4096),i.push(r)},void 0,function(e){var i=e.stack,n=i.pop(),r=i.pop(),o=i.pop();t.DEBUG&&console.log(e.step,"ROLL[]"),i.push(r),i.push(n),i.push(o)},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"MAX[]",n,r),i.push(Math.max(r,n))},function(e){var i=e.stack,n=i.pop(),r=i.pop();t.DEBUG&&console.log(e.step,"MIN[]",n,r),i.push(Math.min(r,n))},function(e){var i=e.stack.pop();t.DEBUG&&console.log(e.step,"SCANTYPE[]",i)},function(e){var i=e.stack.pop(),n=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"INSTCTRL[]",i,n),i){case 1:return void(e.inhibitGridFit=!!n);case 2:return void(e.ignoreCvt=!!n);default:throw new Error("invalid INSTCTRL[] selector")}},void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,Oi.bind(void 0,1),Oi.bind(void 0,2),Oi.bind(void 0,3),Oi.bind(void 0,4),Oi.bind(void 0,5),Oi.bind(void 0,6),Oi.bind(void 0,7),Oi.bind(void 0,8),Ni.bind(void 0,1),Ni.bind(void 0,2),Ni.bind(void 0,3),Ni.bind(void 0,4),Ni.bind(void 0,5),Ni.bind(void 0,6),Ni.bind(void 0,7),Ni.bind(void 0,8),Li.bind(void 0,0,0,0,0,0),Li.bind(void 0,0,0,0,0,1),Li.bind(void 0,0,0,0,0,2),Li.bind(void 0,0,0,0,0,3),Li.bind(void 0,0,0,0,1,0),Li.bind(void 0,0,0,0,1,1),Li.bind(void 0,0,0,0,1,2),Li.bind(void 0,0,0,0,1,3),Li.bind(void 0,0,0,1,0,0),Li.bind(void 0,0,0,1,0,1),Li.bind(void 0,0,0,1,0,2),Li.bind(void 0,0,0,1,0,3),Li.bind(void 0,0,0,1,1,0),Li.bind(void 0,0,0,1,1,1),Li.bind(void 0,0,0,1,1,2),Li.bind(void 0,0,0,1,1,3),Li.bind(void 0,0,1,0,0,0),Li.bind(void 0,0,1,0,0,1),Li.bind(void 0,0,1,0,0,2),Li.bind(void 0,0,1,0,0,3),Li.bind(void 0,0,1,0,1,0),Li.bind(void 0,0,1,0,1,1),Li.bind(void 0,0,1,0,1,2),Li.bind(void 0,0,1,0,1,3),Li.bind(void 0,0,1,1,0,0),Li.bind(void 0,0,1,1,0,1),Li.bind(void 0,0,1,1,0,2),Li.bind(void 0,0,1,1,0,3),Li.bind(void 0,0,1,1,1,0),Li.bind(void 0,0,1,1,1,1),Li.bind(void 0,0,1,1,1,2),Li.bind(void 0,0,1,1,1,3),Li.bind(void 0,1,0,0,0,0),Li.bind(void 0,1,0,0,0,1),Li.bind(void 0,1,0,0,0,2),Li.bind(void 0,1,0,0,0,3),Li.bind(void 0,1,0,0,1,0),Li.bind(void 0,1,0,0,1,1),Li.bind(void 0,1,0,0,1,2),Li.bind(void 0,1,0,0,1,3),Li.bind(void 0,1,0,1,0,0),Li.bind(void 0,1,0,1,0,1),Li.bind(void 0,1,0,1,0,2),Li.bind(void 0,1,0,1,0,3),Li.bind(void 0,1,0,1,1,0),Li.bind(void 0,1,0,1,1,1),Li.bind(void 0,1,0,1,1,2),Li.bind(void 0,1,0,1,1,3),Li.bind(void 0,1,1,0,0,0),Li.bind(void 0,1,1,0,0,1),Li.bind(void 0,1,1,0,0,2),Li.bind(void 0,1,1,0,0,3),Li.bind(void 0,1,1,0,1,0),Li.bind(void 0,1,1,0,1,1),Li.bind(void 0,1,1,0,1,2),Li.bind(void 0,1,1,0,1,3),Li.bind(void 0,1,1,1,0,0),Li.bind(void 0,1,1,1,0,1),Li.bind(void 0,1,1,1,0,2),Li.bind(void 0,1,1,1,0,3),Li.bind(void 0,1,1,1,1,0),Li.bind(void 0,1,1,1,1,1),Li.bind(void 0,1,1,1,1,2),Li.bind(void 0,1,1,1,1,3)],Mi.prototype.setState=function(e,t){return this.state[e]=t,this.activeState={key:e,value:this.state[e]},this.activeState},Mi.prototype.getState=function(e){return this.state[e]||null},zi.prototype.inboundIndex=function(e){return 0<=e&&e<this.tokens.length},zi.prototype.composeRUD=function(e){var t=this,i=e.map((function(e){return t[e[0]].apply(t,e.slice(1).concat(!0))})),n=function(e){return"object"==typeof e&&e.hasOwnProperty("FAIL")};if(i.every(n))return{FAIL:"composeRUD: one or more operations hasn't completed successfully",report:i.filter(n)};this.dispatch("composeRUD",[i.filter((function(e){return!n(e)}))])},zi.prototype.replaceRange=function(e,t,i,n){t=null!==t?t:this.tokens.length;var r=i.every((function(e){return e instanceof Mi}));if(!isNaN(e)&&this.inboundIndex(e)&&r){var o=this.tokens.splice.apply(this.tokens,[e,t].concat(i));return n||this.dispatch("replaceToken",[e,t,i]),[o,i]}return{FAIL:"replaceRange: invalid tokens or startIndex."}},zi.prototype.replaceToken=function(e,t,i){if(!isNaN(e)&&this.inboundIndex(e)&&t instanceof Mi){var n=this.tokens.splice(e,1,t);return i||this.dispatch("replaceToken",[e,t]),[n[0],t]}return{FAIL:"replaceToken: invalid token or index."}},zi.prototype.removeRange=function(e,t,i){t=isNaN(t)?this.tokens.length:t;var n=this.tokens.splice(e,t);return i||this.dispatch("removeRange",[n,e,t]),n},zi.prototype.removeToken=function(e,t){if(isNaN(e)||!this.inboundIndex(e))return{FAIL:"removeToken: invalid token index."};var i=this.tokens.splice(e,1);return t||this.dispatch("removeToken",[i,e]),i},zi.prototype.insertToken=function(e,t,i){return e.every((function(e){return e instanceof Mi}))?(this.tokens.splice.apply(this.tokens,[t,0].concat(e)),i||this.dispatch("insertToken",[e,t]),e):{FAIL:"insertToken: invalid token(s)."}},zi.prototype.registerModifier=function(e,t,i){this.events.newToken.subscribe((function(n,r){var o=[n,r],a=[n,r];if(null===t||!0===t.apply(this,o)){var s=i.apply(this,a);n.setState(e,s)}})),this.registeredModifiers.push(e)},Vi.prototype.subscribe=function(e){return"function"==typeof e?this.subscribers.push(e)-1:{FAIL:"invalid '"+this.eventId+"' event handler"}},Vi.prototype.unsubscribe=function(e){this.subscribers.splice(e,1)},Bi.prototype.setCurrentIndex=function(e){this.index=e,this.current=this.context[e],this.backtrack=this.context.slice(0,e),this.lookahead=this.context.slice(e+1)},Bi.prototype.get=function(e){switch(!0){case 0===e:return this.current;case e<0&&Math.abs(e)<=this.backtrack.length:return this.backtrack.slice(e)[0];case 0<e&&e<=this.lookahead.length:return this.lookahead[e-1];default:return null}},zi.prototype.rangeToText=function(e){if(e instanceof Fi)return this.getRangeTokens(e).map((function(e){return e.char})).join("")},zi.prototype.getText=function(){return this.tokens.map((function(e){return e.char})).join("")},zi.prototype.getContext=function(e){return this.registeredContexts[e]||null},zi.prototype.on=function(e,t){var i=this.events[e];return i?i.subscribe(t):null},zi.prototype.dispatch=function(e,t){var i=this,n=this.events[e];n instanceof Vi&&n.subscribers.forEach((function(e){e.apply(i,t||[])}))},zi.prototype.registerContextChecker=function(e,t,i){if(this.getContext(e))return{FAIL:"context name '"+e+"' is already registered."};if("function"!=typeof t)return{FAIL:"missing context start check."};if("function"!=typeof i)return{FAIL:"missing context end check."};var n=new Ui(e,t,i);return this.registeredContexts[e]=n,this.contextCheckers.push(n),n},zi.prototype.getRangeTokens=function(e){var t=e.startIndex+e.endOffset;return[].concat(this.tokens.slice(e.startIndex,t))},zi.prototype.getContextRanges=function(e){var t=this.getContext(e);return t?t.ranges:{FAIL:"context checker '"+e+"' is not registered."}},zi.prototype.resetContextsRanges=function(){var e=this.registeredContexts;for(var t in e)e.hasOwnProperty(t)&&(e[t].ranges=[])},zi.prototype.updateContextsRanges=function(){this.resetContextsRanges();for(var e=this.tokens.map((function(e){return e.char})),t=0;t<e.length;t++){var i=new Bi(e,t);this.runContextCheck(i)}this.dispatch("updateContextsRanges",[this.registeredContexts])},zi.prototype.setEndOffset=function(e,t){var i=new Fi(this.getContext(t).openRange.startIndex,e,t),n=this.getContext(t).ranges;return i.rangeId=t+"."+n.length,n.push(i),this.getContext(t).openRange=null,i},zi.prototype.runContextCheck=function(e){var t=this,i=e.index;this.contextCheckers.forEach((function(n){var r=n.contextName,o=t.getContext(r).openRange;if(!o&&n.checkStart(e)&&(o=new Fi(i,null,r),t.getContext(r).openRange=o,t.dispatch("contextStart",[r,i])),o&&n.checkEnd(e)){var a=i-o.startIndex+1,s=t.setEndOffset(a,r);t.dispatch("contextEnd",[r,s])}}))},zi.prototype.tokenize=function(e){this.tokens=[],this.resetContextsRanges();var t=Array.from(e);this.dispatch("start");for(var i=0;i<t.length;i++){var n=t[i],r=new Bi(t,i);this.dispatch("next",[r]),this.runContextCheck(r);var o=new Mi(n);this.tokens.push(o),this.dispatch("newToken",[o,r])}return this.dispatch("end",[this.tokens]),this.tokens};var Gi={arabicWordStartCheck:function(e){var t=e.current,i=e.get(-1);return null===i&&Hi(t)||!Hi(i)&&Hi(t)},arabicWordEndCheck:function(e){var t=e.get(1);return null===t||!Hi(t)}},Wi={arabicSentenceStartCheck:function(e){var t=e.current,i=e.get(-1);return(Hi(t)||qi(t))&&!Hi(i)},arabicSentenceEndCheck:function(e){var t=e.get(1);switch(!0){case null===t:return!0;case!Hi(t)&&!qi(t):var i=/\s/.test(t);if(!i)return!0;if(i&&!e.lookahead.some((function(e){return Hi(e)||qi(e)})))return!0;break;default:return!1}}};function $i(e){var t=this.features.arab,i=this.tokenizer.getRangeTokens(e);if(1!==i.length){var n=function(e,i,n){if(t.hasOwnProperty(e)){var r,o=(r=t[e].lookup(n)||null,1===r.length&&12===r[0].id&&r[0].substitution)[0];return 0<=o?i.setState(e,o):void 0}},r=new Bi(i,0),o=new Bi(i.map((function(e){return e.char})),0);i.forEach((function(e,t){if(!qi(e.char)){r.setCurrentIndex(t),o.setCurrentIndex(t);var i=0;switch(function(e){for(var t=[].concat(e.backtrack),i=t.length-1;0<=i;i--){var n=t[i],r=ji(n),o=qi(n);if(!r&&!o)return!0;if(r)return!1}return!1}(o)&&(i|=1),function(e){if(ji(e.current))return!1;for(var t=0;t<e.lookahead.length;t++)if(!qi(e.lookahead[t]))return!0;return!1}(o)&&(i|=2),i){case 0:return;case 1:n("fina",e,r);break;case 2:n("init",e,r);break;case 3:n("medi",e,r)}}}))}}function Yi(e){this.baseDir=e||"ltr",this.tokenizer=new zi,this.features=[]}function Ki(){if(-1===this.tokenizer.registeredModifiers.indexOf("glyphIndex"))throw new Error("glyphIndex modifier is required to apply arabic presentation features.")}function Ji(){var e=this;this.features.hasOwnProperty("arab")&&this.features.arab.hasOwnProperty("rlig")&&(Ki.call(this),this.tokenizer.getContextRanges("arabicWord").forEach((function(t){(function(e){var t=this.features.arab;if(t.hasOwnProperty("rlig"))for(var i=this.tokenizer.getRangeTokens(e),n=0;n<i.length;n++){var r=new Bi(i,n),o=t.rlig.lookup(r)||null,a=1===o.length&&63===o[0].id&&o[0].substitution,s=1===o.length&&41===o[0].id&&o[0].substitution[0],l=i[n];if(s){l.setState("rlig",[s.ligGlyph]);for(var u=0;u<s.components.length;u++){var c=s.components[u],d=r.get(u+1);d.activeState.value===c&&(d.state.deleted=!0)}}else if(a){var h=a&&1===a.length&&12===a[0].id&&a[0].substitution;h&&0<=h&&l.setState("rlig",h)}}}).call(e,t)})))}Yi.prototype.setText=function(e){this.text=e},Yi.prototype.contextChecks={arabicWordCheck:Gi,arabicSentenceCheck:Wi},Yi.prototype.subscribeArabicForms=function(e){var t=this;this.tokenizer.events.contextEnd.subscribe((function(i,n){if("arabicWord"===i)return $i.call(t.tokenizer,n,e)}))},Yi.prototype.applyFeatures=function(e){for(var t=0;t<e.length;t++){var i=e[t];if(i){var n=i.script;this.features[n]||(this.features[n]={}),this.features[n][i.tag]=i}}},Yi.prototype.registerModifier=function(e,t,i){this.tokenizer.registerModifier(e,t,i)},Yi.prototype.processText=function(e){this.text&&this.text===e||(this.setText(e),function(){return function(){var e=this.contextChecks.arabicWordCheck;return this.tokenizer.registerContextChecker("arabicWord",e.arabicWordStartCheck,e.arabicWordEndCheck)}.call(this),function(){var e=this.contextChecks.arabicSentenceCheck;return this.tokenizer.registerContextChecker("arabicSentence",e.arabicSentenceStartCheck,e.arabicSentenceEndCheck)}.call(this),this.tokenizer.tokenize(this.text)}.call(this),function(){var e=this;this.features.hasOwnProperty("arab")&&(Ki.call(this),this.tokenizer.getContextRanges("arabicWord").forEach((function(t){$i.call(e,t)})))}.call(this),Ji.call(this),function(){var e=this;this.tokenizer.getContextRanges("arabicSentence").forEach((function(t){var i=e.tokenizer.getRangeTokens(t);e.tokenizer.replaceRange(t.startIndex,t.endOffset,i.reverse())}))}.call(this))},Yi.prototype.getBidiText=function(e){return this.processText(e),this.tokenizer.getText()},Yi.prototype.getTextGlyphs=function(e){this.processText(e);for(var t=[],i=0;i<this.tokenizer.tokens.length;i++){var n=this.tokenizer.tokens[i];if(!n.state.deleted){var r=n.activeState.value;t.push(Array.isArray(r)?r[0]:r)}}return t};var Xi="ltr";function Qi(e,t){this.font=e,this.features={},Xi=t||Xi}function Zi(e,t,i,n){this.tag=e,this.featureRef=t,this.lookups=i.lookups,this.script=n}function en(e){this.table=e}function tn(e){this.ligatureSets=e}function nn(e,t,i){this.lookups=e,this.subtable=i,this.lookupTable=t,i.hasOwnProperty("coverage")&&(this.coverage=new en(i.coverage)),i.hasOwnProperty("inputCoverage")&&(this.inputCoverage=i.inputCoverage.map((function(e){return new en(e)}))),i.hasOwnProperty("backtrackCoverage")&&(this.backtrackCoverage=i.backtrackCoverage.map((function(e){return new en(e)}))),i.hasOwnProperty("lookaheadCoverage")&&(this.lookaheadCoverage=i.lookaheadCoverage.map((function(e){return new en(e)}))),i.hasOwnProperty("ligatureSets")&&(this.ligatureSets=new tn(i.ligatureSets))}function rn(e,t){this.index=e,this.subtables=t[e].subtables.map((function(i){return new nn(t,t[e],i)}))}function on(e,t){this.lookups=t.map((function(t){return new rn(t,e)}))}function an(e,t){for(var i=[],n=0;n<e.length;n++){var r=e[n],o=t.current.activeState.value;o=Array.isArray(o)?o[0]:o;var a=r.lookup(o);-1!==a&&i.push(a)}return i.length!==e.length?-1:i}function sn(e){(e=e||{}).empty||(Bt(e.familyName,"When creating a new Font object, familyName is required."),Bt(e.styleName,"When creating a new Font object, styleName is required."),Bt(e.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),Bt(e.ascender,"When creating a new Font object, ascender is required."),Bt(e.descender,"When creating a new Font object, descender is required."),Bt(e.descender<0,"Descender should be negative (e.g. -512)."),this.names={fontFamily:{en:e.familyName||" "},fontSubfamily:{en:e.styleName||" "},fullName:{en:e.fullName||e.familyName+" "+e.styleName},postScriptName:{en:e.postScriptName||(e.familyName+e.styleName).replace(/\s/g,"")},designer:{en:e.designer||" "},designerURL:{en:e.designerURL||" "},manufacturer:{en:e.manufacturer||" "},manufacturerURL:{en:e.manufacturerURL||" "},license:{en:e.license||" "},licenseURL:{en:e.licenseURL||" "},version:{en:e.version||"Version 0.1"},description:{en:e.description||" "},copyright:{en:e.copyright||" "},trademark:{en:e.trademark||" "}},this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.tables={os2:{usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,fsSelection:e.fsSelection||this.fsSelectionValues.REGULAR}}),this.supported=!0,this.glyphs=new Ee.GlyphSet(this,e.glyphs||[]),this.encoding=new pe(this),this.position=new Nt(this),this.substitution=new Lt(this),this.tables=this.tables||{},Object.defineProperty(this,"hinting",{get:function(){return this._hinting?this._hinting:"truetype"===this.outlinesFormat?this._hinting=new Jt(this):void 0}})}function ln(e,t,i,n){var r={},o=new ae.Parser(e,t);r.name=n[o.parseUShort()]||{},o.skip("uShort",1),r.coordinates={};for(var a=0;a<i.length;++a)r.coordinates[i[a].tag]=o.parseFixed();return r}tn.prototype.lookup=function(e,t){for(var i=this.ligatureSets[t],n=function(e,t){if(e.length>t.length)return null;for(var i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},r=0;r<i.length;r++){var o=i[r],a=e.lookahead.map((function(e){return e.activeState.value}));if("rtl"===Xi&&a.reverse(),n(o.components,a))return o}return null},rn.prototype.lookup=function(e){for(var t=[],i=0;i<this.subtables.length;i++){var n=this.subtables[i].lookup(e);(null!==n||n.length)&&(t=t.concat(n))}return t},nn.prototype.lookup=function(e){var t=[],i=this.lookupTable.lookupType,n=this.subtable.substFormat;if(1===i&&2===n){var r=function(e){var t=e.current.activeState.value;t=Array.isArray(t)?t[0]:t;var i=this.coverage.lookup(t);return-1===i?[]:[this.subtable.substitute[i]]}.call(this,e);0<r.length&&t.push({id:12,substitution:r})}if(6===i&&3===n){var o=function(e){var t=this.inputCoverage.length+this.lookaheadCoverage.length+this.backtrackCoverage.length;if(e.context.length<t)return[];var i=an(this.inputCoverage,e);if(-1===i)return[];var n=this.inputCoverage.length-1;if(e.lookahead.length<this.lookaheadCoverage.length)return[];for(var r=e.lookahead.slice(n);r.length&&qi(r[0].char);)r.shift();var o=new Bi(r,0),a=an(this.lookaheadCoverage,o),s=[].concat(e.backtrack);for(s.reverse();s.length&&qi(s[0].char);)s.shift();if(s.length<this.backtrackCoverage.length)return[];var l=new Bi(s,0),u=an(this.backtrackCoverage,l),c=[];if(i.length===this.inputCoverage.length&&a.length===this.lookaheadCoverage.length&&u.length===this.backtrackCoverage.length)for(var d=this.subtable.lookupRecords,h=0;h<d.length;h++)for(var p=d[h],f=0;f<i.length;f++){var g=new Bi([e.get(f)],0),m=new rn(p.lookupListIndex,this.lookups).lookup(g);c=c.concat(m)}return c}.call(this,e);0<o.length&&t.push({id:63,substitution:o})}if(4===i&&1===n){var a=function(e){var t=e.current.activeState.value,i=this.coverage.lookup(t);if(-1===i)return[];var n=this.ligatureSets.lookup(e,i);return n?[n]:[]}.call(this,e);0<a.length&&t.push({id:41,substitution:a})}return t},en.prototype.lookup=function(e){if(!e)return-1;switch(this.table.format){case 1:return this.table.glyphs.indexOf(e);case 2:for(var t=this.table.ranges,i=0;i<t.length;i++){var n=t[i];if(e>=n.start&&e<=n.end){var r=e-n.start;return n.index+r}}break;default:return-1}return-1},Zi.prototype.lookup=function(e){for(var t=[],i=0;i<this.lookups.length;i++){var n=this.lookups[i].lookup(e);(null!==n||n.length)&&(t=t.concat(n))}return t},Qi.prototype.getScriptFeaturesIndexes=function(e){if(!e)return[];if(!this.font.tables.gsub)return[];for(var t=this.font.tables.gsub.scripts,i=0;i<t.length;i++){var n=t[i];if(n.tag===e)return n.script.defaultLangSys.featureIndexes;var r=n.langSysRecords;if(r)for(var o=0;o<r.length;o++){var a=r[o];if(a.tag===e)return a.langSys.featureIndexes}}return[]},Qi.prototype.mapTagsToFeatures=function(e,t){for(var i={},n=0;n<e.length;n++){var r=e[n].feature,o=e[n].tag,a=new on(this.font.tables.gsub.lookups,r.lookupListIndexes);i[o]=new Zi(o,r,a,t)}this.features[t].tags=i},Qi.prototype.getScriptFeatures=function(e){var t=this.features[e];if(this.features.hasOwnProperty(e))return t;var i=this.getScriptFeaturesIndexes(e);if(!i)return null;var n=this.font.tables.gsub;return t=i.map((function(e){return n.features[e]})),this.features[e]=t,this.mapTagsToFeatures(t,e),t},Qi.prototype.getFeature=function(e){return this.font?(this.features.hasOwnProperty(e.script)||this.getScriptFeatures(e.script),this.features[e.script].tags[e.tag]||null):{FAIL:"No font was found"}},sn.prototype.hasChar=function(e){return null!==this.encoding.charToGlyphIndex(e)},sn.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)},sn.prototype.charToGlyph=function(e){var t=this.charToGlyphIndex(e),i=this.glyphs.get(t);return i||(i=this.glyphs.get(0)),i},sn.prototype.stringToGlyphs=function(e,t){var i=this;t=t||this.defaultRenderOptions;var n=new Yi;n.registerModifier("glyphIndex",null,(function(e){return i.charToGlyphIndex(e.char)}));var r=new Qi(this);n.applyFeatures(["init","medi","fina","rlig"].map((function(e){var t={tag:e,script:"arab"},i=r.getFeature(t);if(i)return i})));var o=n.getTextGlyphs(e),a=o.length;if(t.features){var s=t.script||this.substitution.getDefaultScriptName(),l=[];t.features.liga&&(l=l.concat(this.substitution.getFeature("liga",s,t.language))),t.features.rlig&&(l=l.concat(this.substitution.getFeature("rlig",s,t.language)));for(var u=0;u<a;u+=1)for(var c=0;c<l.length;c++){for(var d=l[c],h=d.sub,p=h.length,f=0;f<p&&h[f]===o[u+f];)f++;f===p&&(o.splice(u,p,d.by),a=a-p+1)}}for(var g=new Array(a),m=this.glyphs.get(0),v=0;v<a;v+=1)g[v]=i.glyphs.get(o[v])||m;return g},sn.prototype.nameToGlyphIndex=function(e){return this.glyphNames.nameToGlyphIndex(e)},sn.prototype.nameToGlyph=function(e){var t=this.nameToGlyphIndex(e),i=this.glyphs.get(t);return i||(i=this.glyphs.get(0)),i},sn.prototype.glyphIndexToName=function(e){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(e):""},sn.prototype.getKerningValue=function(e,t){e=e.index||e,t=t.index||t;var i=this.position.defaultKerningTables;return i?this.position.getKerningValue(i,e,t):this.kerningPairs[e+","+t]||0},sn.prototype.defaultRenderOptions={kerning:!0,features:{liga:!0,rlig:!0}},sn.prototype.forEachGlyph=function(e,t,i,n,r,o){t=void 0!==t?t:0,i=void 0!==i?i:0,n=void 0!==n?n:72,r=r||this.defaultRenderOptions;var a,s=1/this.unitsPerEm*n,l=this.stringToGlyphs(e,r);if(r.kerning){var u=r.script||this.position.getDefaultScriptName();a=this.position.getKerningTables(u,r.language)}for(var c=0;c<l.length;c+=1){var d=l[c];o.call(this,d,t,i,n,r),d.advanceWidth&&(t+=d.advanceWidth*s),r.kerning&&c<l.length-1&&(t+=(a?this.position.getKerningValue(a,d.index,l[c+1].index):this.getKerningValue(d,l[c+1]))*s),r.letterSpacing?t+=r.letterSpacing*n:r.tracking&&(t+=r.tracking/1e3*n)}return t},sn.prototype.getPath=function(e,t,i,n,r){var o=new x;return this.forEachGlyph(e,t,i,n,r,(function(e,t,i,n){var a=e.getPath(t,i,n,r,this);o.extend(a)})),o},sn.prototype.getPaths=function(e,t,i,n,r){var o=[];return this.forEachGlyph(e,t,i,n,r,(function(e,t,i,n){var a=e.getPath(t,i,n,r,this);o.push(a)})),o},sn.prototype.getAdvanceWidth=function(e,t,i){return this.forEachGlyph(e,0,0,t,i,(function(){}))},sn.prototype.draw=function(e,t,i,n,r,o){this.getPath(t,i,n,r,o).draw(e)},sn.prototype.drawPoints=function(e,t,i,n,r,o){this.forEachGlyph(t,i,n,r,o,(function(t,i,n,r){t.drawPoints(e,i,n,r)}))},sn.prototype.drawMetrics=function(e,t,i,n,r,o){this.forEachGlyph(t,i,n,r,o,(function(t,i,n,r){t.drawMetrics(e,i,n,r)}))},sn.prototype.getEnglishName=function(e){var t=this.names[e];if(t)return t.en},sn.prototype.validate=function(){var e=this;function t(t){var i=e.getEnglishName(t);i&&i.trim().length}t("fontFamily"),t("weightName"),t("manufacturer"),t("copyright"),t("version"),this.unitsPerEm},sn.prototype.toTables=function(){return Pt(this)},sn.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},sn.prototype.toArrayBuffer=function(){for(var e=this.toTables().encode(),t=new ArrayBuffer(e.length),i=new Uint8Array(t),n=0;n<e.length;n++)i[n]=e[n];return t},sn.prototype.download=function(t){var n=this.getEnglishName("fontFamily"),r=this.getEnglishName("fontSubfamily");t=t||n.replace(/\s/g,"")+"-"+r+".otf";var o=this.toArrayBuffer();if("undefined"!=typeof window)if(window.URL=window.URL||window.webkitURL,window.URL){var a=new DataView(o),s=new Blob([a],{type:"font/opentype"}),l=document.createElement("a");l.href=window.URL.createObjectURL(s),l.download=t;var u=document.createEvent("MouseEvents");u.initEvent("click",!0,!1),l.dispatchEvent(u)}else console.warn("Font file could not be downloaded. Try using a different browser.");else{var c=i(245),d=function(t){for(var i=new e(t.byteLength),n=new Uint8Array(t),r=0;r<i.length;++r)i[r]=n[r];return i}(o);c.writeFileSync(t,d)}},sn.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},sn.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9},sn.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};var un=function(e,t,i){var n=new ae.Parser(e,t),r=n.parseULong();I.argument(65536===r,"Unsupported fvar table version.");var o=n.parseOffset16();n.skip("uShort",1);for(var a,s,l,u,c,d=n.parseUShort(),h=n.parseUShort(),p=n.parseUShort(),f=n.parseUShort(),g=[],m=0;m<d;m++)g.push((a=e,s=t+o+m*h,l=i,c=u=void 0,u={},c=new ae.Parser(a,s),u.tag=c.parseTag(),u.minValue=c.parseFixed(),u.defaultValue=c.parseFixed(),u.maxValue=c.parseFixed(),c.skip("uShort",1),u.name=l[c.parseUShort()]||{},u));for(var v=[],y=t+o+d*h,b=0;b<p;b++)v.push(ln(e,y+b*f,g,i));return{axes:g,instances:v}},cn=new Array(10);cn[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{posFormat:1,coverage:this.parsePointer(re.coverage),value:this.parseValueRecord()}:2===t?{posFormat:2,coverage:this.parsePointer(re.coverage),values:this.parseValueRecordList()}:void I.assert(!1,"0x"+e.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},cn[2]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();I.assert(1===t||2===t,"0x"+e.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");var i=this.parsePointer(re.coverage),n=this.parseUShort(),r=this.parseUShort();if(1===t)return{posFormat:t,coverage:i,valueFormat1:n,valueFormat2:r,pairSets:this.parseList(re.pointer(re.list((function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(n),value2:this.parseValueRecord(r)}}))))};if(2===t){var o=this.parsePointer(re.classDef),a=this.parsePointer(re.classDef),s=this.parseUShort(),l=this.parseUShort();return{posFormat:t,coverage:i,valueFormat1:n,valueFormat2:r,classDef1:o,classDef2:a,class1Count:s,class2Count:l,classRecords:this.parseList(s,re.list(l,(function(){return{value1:this.parseValueRecord(n),value2:this.parseValueRecord(r)}})))}}},cn[3]=function(){return{error:"GPOS Lookup 3 not supported"}},cn[4]=function(){return{error:"GPOS Lookup 4 not supported"}},cn[5]=function(){return{error:"GPOS Lookup 5 not supported"}},cn[6]=function(){return{error:"GPOS Lookup 6 not supported"}},cn[7]=function(){return{error:"GPOS Lookup 7 not supported"}},cn[8]=function(){return{error:"GPOS Lookup 8 not supported"}},cn[9]=function(){return{error:"GPOS Lookup 9 not supported"}},new Array(10);var dn=function(e,t){var i=new re(e,t=t||0),n=i.parseVersion(1);return I.argument(1===n||1.1===n,"Unsupported GPOS table version "+n),1===n?{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(cn)}:{version:n,scripts:i.parseScriptList(),features:i.parseFeatureList(),lookups:i.parseLookupList(cn),variations:i.parseFeatureVariationsList()}},hn=function(e,t){var i=new ae.Parser(e,t),n=i.parseUShort();if(0===n)return function(e){var t={};e.skip("uShort");var i=e.parseUShort();I.argument(0===i,"Unsupported kern sub-table version."),e.skip("uShort",2);var n=e.parseUShort();e.skip("uShort",3);for(var r=0;r<n;r+=1){var o=e.parseUShort(),a=e.parseUShort(),s=e.parseShort();t[o+","+a]=s}return t}(i);if(1===n)return function(e){var t={};e.skip("uShort"),1<e.parseULong()&&console.warn("Only the first kern subtable is supported."),e.skip("uLong");var i=255&e.parseUShort();if(e.skip("uShort"),0===i){var n=e.parseUShort();e.skip("uShort",3);for(var r=0;r<n;r+=1){var o=e.parseUShort(),a=e.parseUShort(),s=e.parseShort();t[o+","+a]=s}}return t}(i);throw new Error("Unsupported kern table version ("+n+").")},pn=function(e,t,i,n){for(var r=new ae.Parser(e,t),o=n?r.parseUShort:r.parseULong,a=[],s=0;s<i+1;s+=1){var l=o.call(r);n&&(l*=2),a.push(l)}return a};function fn(e,t){i(245).readFile(e,(function(e,i){if(e)return t(e.message);t(null,Ut(i))}))}function gn(e,t){var i=new XMLHttpRequest;i.open("get",e,!0),i.responseType="arraybuffer",i.onload=function(){return i.response?t(null,i.response):t("Font could not be loaded: "+i.statusText)},i.onerror=function(){t("Font could not be loaded")},i.send()}function mn(e,t){for(var i=[],n=12,r=0;r<t;r+=1){var o=ae.getTag(e,n),a=ae.getULong(e,n+4),s=ae.getULong(e,n+8),l=ae.getULong(e,n+12);i.push({tag:o,checksum:a,offset:s,length:l,compression:!1}),n+=16}return i}function vn(e,t){if("WOFF"!==t.compression)return{data:e,offset:t.offset};var i=new Uint8Array(e.buffer,t.offset+2,t.compressedLength-2),n=new Uint8Array(t.length);if(function(e,t){var i,n,r=new a(e,t);do{switch(i=b(r),w(r,2,0)){case 0:n=T(r);break;case 1:n=S(r,s,l);break;case 2:_(r,r.ltree,r.dtree),n=S(r,r.ltree,r.dtree);break;default:n=-3}if(0!==n)throw new Error("Data error")}while(!i);r.destLen<r.dest.length?"function"==typeof r.dest.slice?r.dest.slice(0,r.destLen):r.dest.subarray(0,r.destLen):r.dest}(i,n),n.byteLength!==t.length)throw new Error("Decompression error: "+t.tag+" decompressed length doesn't match recorded length");return{data:new DataView(n.buffer,0),offset:0}}function yn(e){var t,i,n,r,o,a,s,l,u,c,d,h,p,f,g=new sn({empty:!0}),m=new DataView(e,0),v=[],y=ae.getTag(m,0);if(y===String.fromCharCode(0,1,0,0)||"true"===y||"typ1"===y)g.outlinesFormat="truetype",v=mn(m,n=ae.getUShort(m,4));else if("OTTO"===y)g.outlinesFormat="cff",v=mn(m,n=ae.getUShort(m,4));else{if("wOFF"!==y)throw new Error("Unsupported OpenType signature "+y);var b=ae.getTag(m,4);if(b===String.fromCharCode(0,1,0,0))g.outlinesFormat="truetype";else{if("OTTO"!==b)throw new Error("Unsupported OpenType flavor "+y);g.outlinesFormat="cff"}v=function(e,t){for(var i=[],n=44,r=0;r<t;r+=1){var o,a=ae.getTag(e,n),s=ae.getULong(e,n+4),l=ae.getULong(e,n+8),u=ae.getULong(e,n+12);o=l<u&&"WOFF",i.push({tag:a,offset:s,compression:o,compressedLength:l,length:u}),n+=20}return i}(m,n=ae.getUShort(m,12))}for(var w=0;w<n;w+=1){var E=v[w],_=void 0;switch(E.tag){case"cmap":_=vn(m,E),g.tables.cmap=se(_.data,_.offset),g.encoding=new fe(g.tables.cmap);break;case"cvt ":_=vn(m,E),f=new ae.Parser(_.data,_.offset),g.tables.cvt=f.parseShortList(E.length/2);break;case"fvar":o=E;break;case"fpgm":_=vn(m,E),f=new ae.Parser(_.data,_.offset),g.tables.fpgm=f.parseByteList(E.length);break;case"head":_=vn(m,E),g.tables.head=ze(_.data,_.offset),g.unitsPerEm=g.tables.head.unitsPerEm,t=g.tables.head.indexToLocFormat;break;case"hhea":_=vn(m,E),g.tables.hhea=je(_.data,_.offset),g.ascender=g.tables.hhea.ascender,g.descender=g.tables.hhea.descender,g.numberOfHMetrics=g.tables.hhea.numberOfHMetrics;break;case"hmtx":u=E;break;case"ltag":_=vn(m,E),i=Ye(_.data,_.offset);break;case"maxp":_=vn(m,E),g.tables.maxp=Ke(_.data,_.offset),g.numGlyphs=g.tables.maxp.numGlyphs;break;case"name":h=E;break;case"OS/2":_=vn(m,E),g.tables.os2=ht(_.data,_.offset);break;case"post":_=vn(m,E),g.tables.post=gt(_.data,_.offset),g.glyphNames=new me(g.tables.post);break;case"prep":_=vn(m,E),f=new ae.Parser(_.data,_.offset),g.tables.prep=f.parseByteList(E.length);break;case"glyf":a=E;break;case"loca":d=E;break;case"CFF ":r=E;break;case"kern":c=E;break;case"GPOS":s=E;break;case"GSUB":l=E;break;case"meta":p=E}}var S=vn(m,h);if(g.tables.name=ut(S.data,S.offset,i),g.names=g.tables.name,a&&d){var T=0===t,C=vn(m,d),k=pn(C.data,C.offset,g.numGlyphs,T),x=vn(m,a);g.glyphs=Kt.parse(x.data,x.offset,k,g)}else{if(!r)throw new Error("Font doesn't contain TrueType or CFF outlines.");var A=vn(m,r);Be(A.data,A.offset,g)}var P=vn(m,u);if(Ge(P.data,P.offset,g.numberOfHMetrics,g.numGlyphs,g.glyphs),function(e){for(var t,i=e.tables.cmap.glyphIndexMap,n=Object.keys(i),r=0;r<n.length;r+=1){var o=n[r],a=i[o];(t=e.glyphs.get(a)).addUnicode(parseInt(o))}for(var s=0;s<e.glyphs.length;s+=1)t=e.glyphs.get(s),e.cffEncoding?e.isCIDFont?t.name="gid"+s:t.name=e.cffEncoding.charset[s]:e.glyphNames.names&&(t.name=e.glyphNames.glyphIndexToName(s))}(g),c){var I=vn(m,c);g.kerningPairs=hn(I.data,I.offset)}else g.kerningPairs={};if(s){var R=vn(m,s);g.tables.gpos=dn(R.data,R.offset),g.position.init()}if(l){var D=vn(m,l);g.tables.gsub=wt(D.data,D.offset)}if(o){var O=vn(m,o);g.tables.fvar=un(O.data,O.offset,g.names)}if(p){var N=vn(m,p);g.tables.meta=_t(N.data,N.offset),g.metas=g.tables.meta}return g}t.Font=sn,t.Glyph=ye,t.Path=x,t.BoundingBox=k,t._parse=ae,t.parse=yn,t.load=function(e,t){("undefined"==typeof window?fn:gn)(e,(function(e,i){if(e)return t(e);var n;try{n=yn(i)}catch(e){return t(e,null)}return t(null,n)}))},t.loadSync=function(e){return yn(Ut(i(245).readFileSync(e)))},Object.defineProperty(t,"__esModule",{value:!0})}(t)}).call(this,i(108).Buffer)},function(e,t,i){"use strict";var n=i(18),r=i(46).findIndex,o=i(156),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),o("findIndex")},function(e,t,i){"use strict";var n=i(18),r=i(12),o=i(15),a=i(348),s=i(30),l=i(79),u=i(66),c=i(165),d=a.ArrayBuffer,h=a.DataView,p=h.prototype,f=r(d.prototype.slice),g=r(p.getUint8),m=r(p.setUint8);n({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:o((function(){return!new d(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(f&&void 0===t)return f(s(this),e);for(var i=s(this).byteLength,n=l(e,i),r=l(void 0===t?i:t,i),o=new(c(this,d))(u(r-n)),a=new h(this),p=new h(o),v=0;n<r;)m(p,v++,g(a,n++));return o}})},function(e,t,i){var n=i(8).Array,r=Math.abs,o=Math.pow,a=Math.floor,s=Math.log,l=Math.LN2;e.exports={pack:function(e,t,i){var u,c,d,h=n(i),p=8*i-t-1,f=(1<<p)-1,g=f>>1,m=23===t?o(2,-24)-o(2,-77):0,v=e<0||0===e&&1/e<0?1:0,y=0;for((e=r(e))!=e||e===1/0?(c=e!=e?1:0,u=f):(u=a(s(e)/l),e*(d=o(2,-u))<1&&(u--,d*=2),(e+=u+g>=1?m/d:m*o(2,1-g))*d>=2&&(u++,d/=2),u+g>=f?(c=0,u=f):u+g>=1?(c=(e*d-1)*o(2,t),u+=g):(c=e*o(2,g-1)*o(2,t),u=0));t>=8;)h[y++]=255&c,c/=256,t-=8;for(u=u<<t|c,p+=t;p>0;)h[y++]=255&u,u/=256,p-=8;return h[--y]|=128*v,h},unpack:function(e,t){var i,n=e.length,r=8*n-t-1,a=(1<<r)-1,s=a>>1,l=r-7,u=n-1,c=e[u--],d=127&c;for(c>>=7;l>0;)d=256*d+e[u--],l-=8;for(i=d&(1<<-l)-1,d>>=-l,l+=t;l>0;)i=256*i+e[u--],l-=8;if(0===d)d=1-s;else{if(d===a)return i?NaN:c?-1/0:1/0;i+=o(2,t),d-=s}return(c?-1:1)*i*o(2,d-t)}}},function(e,t,i){i(640)("Uint8",(function(e){return function(t,i,n){return e(this,t,i,n)}}))},function(e,t,i){"use strict";var n=i(18),r=i(8),o=i(31),a=i(33),s=i(641),l=i(25),u=i(348),c=i(95),d=i(89),h=i(58),p=i(642),f=i(66),g=i(350),m=i(352),v=i(120),y=i(32),b=i(92),w=i(29),E=i(121),_=i(81),S=i(65),T=i(107),C=i(78).f,k=i(644),x=i(46).forEach,A=i(225),P=i(42),I=i(69),R=i(50),D=i(174),O=R.get,N=R.set,L=P.f,M=I.f,F=Math.round,U=r.RangeError,B=u.ArrayBuffer,V=B.prototype,z=u.DataView,H=l.NATIVE_ARRAY_BUFFER_VIEWS,j=l.TYPED_ARRAY_CONSTRUCTOR,q=l.TYPED_ARRAY_TAG,G=l.TypedArray,W=l.TypedArrayPrototype,$=l.aTypedArrayConstructor,Y=l.isTypedArray,K=function(e,t){$(e);for(var i=0,n=t.length,r=new e(n);n>i;)r[i]=t[i++];return r},J=function(e,t){L(e,t,{get:function(){return O(this)[t]}})},X=function(e){var t;return S(V,e)||"ArrayBuffer"==(t=b(e))||"SharedArrayBuffer"==t},Q=function(e,t){return Y(e)&&!E(t)&&t in e&&p(+t)&&t>=0},Z=function(e,t){return t=v(t),Q(e,t)?d(2,e[t]):M(e,t)},ee=function(e,t,i){return t=v(t),!(Q(e,t)&&w(i)&&y(i,"value"))||y(i,"get")||y(i,"set")||i.configurable||y(i,"writable")&&!i.writable||y(i,"enumerable")&&!i.enumerable?L(e,t,i):(e[t]=i.value,e)};a?(H||(I.f=Z,P.f=ee,J(W,"buffer"),J(W,"byteOffset"),J(W,"byteLength"),J(W,"length")),n({target:"Object",stat:!0,forced:!H},{getOwnPropertyDescriptor:Z,defineProperty:ee}),e.exports=function(e,t,i){var a=e.match(/\d+$/)[0]/8,l=e+(i?"Clamped":"")+"Array",u="get"+e,d="set"+e,p=r[l],v=p,y=v&&v.prototype,b={},E=function(e,t){L(e,t,{get:function(){return function(e,t){var i=O(e);return i.view[u](t*a+i.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,n){var r=O(e);i&&(n=(n=F(n))<0?0:n>255?255:255&n),r.view[d](t*a+r.byteOffset,n,!0)}(this,t,e)},enumerable:!0})};H?s&&(v=t((function(e,t,i,n){return c(e,y),D(w(t)?X(t)?void 0!==n?new p(t,m(i,a),n):void 0!==i?new p(t,m(i,a)):new p(t):Y(t)?K(v,t):o(k,v,t):new p(g(t)),e,v)})),T&&T(v,G),x(C(p),(function(e){e in v||h(v,e,p[e])})),v.prototype=y):(v=t((function(e,t,i,n){c(e,y);var r,s,l,u=0,d=0;if(w(t)){if(!X(t))return Y(t)?K(v,t):o(k,v,t);r=t,d=m(i,a);var h=t.byteLength;if(void 0===n){if(h%a)throw U("Wrong length");if((s=h-d)<0)throw U("Wrong length")}else if((s=f(n)*a)+d>h)throw U("Wrong length");l=s/a}else l=g(t),r=new B(s=l*a);for(N(e,{buffer:r,byteOffset:d,byteLength:s,length:l,view:new z(r)});u<l;)E(e,u++)})),T&&T(v,G),y=v.prototype=_(W)),y.constructor!==v&&h(y,"constructor",v),h(y,j,v),q&&h(y,q,l),b[l]=v,n({global:!0,forced:v!=p,sham:!H},b),"BYTES_PER_ELEMENT"in v||h(v,"BYTES_PER_ELEMENT",a),"BYTES_PER_ELEMENT"in y||h(y,"BYTES_PER_ELEMENT",a),A(l)}):e.exports=function(){}},function(e,t,i){var n=i(8),r=i(15),o=i(167),a=i(25).NATIVE_ARRAY_BUFFER_VIEWS,s=n.ArrayBuffer,l=n.Int8Array;e.exports=!a||!r((function(){l(1)}))||!r((function(){new l(-1)}))||!o((function(e){new l,new l(null),new l(1.5),new l(e)}),!0)||r((function(){return 1!==new l(new s(2),1,void 0).length}))},function(e,t,i){var n=i(29),r=Math.floor;e.exports=Number.isInteger||function(e){return!n(e)&&isFinite(e)&&r(e)===e}},function(e,t,i){var n=i(8),r=i(59),o=n.RangeError;e.exports=function(e){var t=r(e);if(t<0)throw o("The argument can't be less than 0");return t}},function(e,t,i){var n=i(82),r=i(31),o=i(213),a=i(43),s=i(45),l=i(166),u=i(131),c=i(227),d=i(25).aTypedArrayConstructor;e.exports=function(e){var t,i,h,p,f,g,m=o(this),v=a(e),y=arguments.length,b=y>1?arguments[1]:void 0,w=void 0!==b,E=u(v);if(E&&!c(E))for(g=(f=l(v,E)).next,v=[];!(p=r(g,f)).done;)v.push(p.value);for(w&&y>2&&(b=n(b,arguments[2])),i=s(v),h=new(d(m))(i),t=0;i>t;t++)h[t]=w?b(v[t],t):v[t];return h}},function(e,t,i){"use strict";var n=i(12),r=i(25),o=n(i(646)),a=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(e,t){return o(a(this),e,t,arguments.length>2?arguments[2]:void 0)}))},function(e,t,i){"use strict";var n=i(43),r=i(79),o=i(45),a=Math.min;e.exports=[].copyWithin||function(e,t){var i=n(this),s=o(i),l=r(e,s),u=r(t,s),c=arguments.length>2?arguments[2]:void 0,d=a((void 0===c?s:r(c,s))-u,s-l),h=1;for(u<l&&l<u+d&&(h=-1,u+=d-1,l+=d-1);d-- >0;)u in i?i[l]=i[u]:delete i[l],l+=h,u+=h;return i}},function(e,t,i){"use strict";var n=i(25),r=i(46).every,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",(function(e){return r(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=i(31),o=i(351),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("fill",(function(e){var t=arguments.length;return r(o,a(this),e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=i(46).filter,o=i(650),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("filter",(function(e){var t=r(a(this),e,arguments.length>1?arguments[1]:void 0);return o(this,t)}))},function(e,t,i){var n=i(651),r=i(184);e.exports=function(e,t){return n(r(e),t)}},function(e,t,i){var n=i(45);e.exports=function(e,t){for(var i=0,r=n(t),o=new e(r);r>i;)o[i]=t[i++];return o}},function(e,t,i){"use strict";var n=i(25),r=i(46).find,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",(function(e){return r(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=i(46).findIndex,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",(function(e){return r(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=i(46).forEach,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",(function(e){r(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=i(153).includes,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",(function(e){return r(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=i(153).indexOf,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",(function(e){return r(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(8),r=i(15),o=i(12),a=i(25),s=i(56),l=i(22)("iterator"),u=n.Uint8Array,c=o(s.values),d=o(s.keys),h=o(s.entries),p=a.aTypedArray,f=a.exportTypedArrayMethod,g=u&&u.prototype,m=!r((function(){g[l].call([1])})),v=!!g&&g.values&&g[l]===g.values&&"values"===g.values.name,y=function(){return c(p(this))};f("entries",(function(){return h(p(this))}),m),f("keys",(function(){return d(p(this))}),m),f("values",y,m||!v,{name:"values"}),f(l,y,m||!v,{name:"values"})},function(e,t,i){"use strict";var n=i(25),r=i(12),o=n.aTypedArray,a=n.exportTypedArrayMethod,s=r([].join);a("join",(function(e){return s(o(this),e)}))},function(e,t,i){"use strict";var n=i(25),r=i(80),o=i(660),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return r(o,a(this),t>1?[e,arguments[1]]:[e])}))},function(e,t,i){"use strict";var n=i(80),r=i(54),o=i(59),a=i(45),s=i(161),l=Math.min,u=[].lastIndexOf,c=!!u&&1/[1].lastIndexOf(1,-0)<0,d=s("lastIndexOf"),h=c||!d;e.exports=h?function(e){if(c)return n(u,this,arguments)||0;var t=r(this),i=a(t),s=i-1;for(arguments.length>1&&(s=l(s,o(arguments[1]))),s<0&&(s=i+s);s>=0;s--)if(s in t&&t[s]===e)return s||0;return-1}:u},function(e,t,i){"use strict";var n=i(25),r=i(46).map,o=i(184),a=n.aTypedArray;(0,n.exportTypedArrayMethod)("map",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(o(e))(t)}))}))},function(e,t,i){"use strict";var n=i(25),r=i(241).left,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return r(o(this),e,t,t>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=i(241).right,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return r(o(this),e,t,t>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(25),r=n.aTypedArray,o=n.exportTypedArrayMethod,a=Math.floor;o("reverse",(function(){for(var e,t=r(this).length,i=a(t/2),n=0;n<i;)e=this[n],this[n++]=this[--t],this[t]=e;return this}))},function(e,t,i){"use strict";var n=i(8),r=i(31),o=i(25),a=i(45),s=i(352),l=i(43),u=i(15),c=n.RangeError,d=n.Int8Array,h=d&&d.prototype,p=h&&h.set,f=o.aTypedArray,g=o.exportTypedArrayMethod,m=!u((function(){var e=new Uint8ClampedArray(2);return r(p,e,{length:1,0:3},1),3!==e[1]})),v=m&&o.NATIVE_ARRAY_BUFFER_VIEWS&&u((function(){var e=new d(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));g("set",(function(e){f(this);var t=s(arguments.length>1?arguments[1]:void 0,1),i=l(e);if(m)return r(p,this,i,t);var n=this.length,o=a(i),u=0;if(o+t>n)throw c("Wrong length");for(;u<o;)this[t+u]=i[u++]}),!m||v)},function(e,t,i){"use strict";var n=i(25),r=i(184),o=i(15),a=i(104),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("slice",(function(e,t){for(var i=a(s(this),e,t),n=r(this),o=0,l=i.length,u=new n(l);l>o;)u[o]=i[o++];return u}),o((function(){new Int8Array(1).slice()})))},function(e,t,i){"use strict";var n=i(25),r=i(46).some,o=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",(function(e){return r(o(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,i){"use strict";var n=i(8),r=i(12),o=i(15),a=i(76),s=i(339),l=i(25),u=i(669),c=i(670),d=i(102),h=i(671),p=n.Array,f=l.aTypedArray,g=l.exportTypedArrayMethod,m=n.Uint16Array,v=m&&r(m.prototype.sort),y=!(!v||o((function(){v(new m(2),null)}))&&o((function(){v(new m(2),{})}))),b=!!v&&!o((function(){if(d)return d<74;if(u)return u<67;if(c)return!0;if(h)return h<602;var e,t,i=new m(516),n=p(516);for(e=0;e<516;e++)t=e%4,i[e]=515-e,n[e]=e-2*t+3;for(v(i,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(i[e]!==n[e])return!0}));g("sort",(function(e){return void 0!==e&&a(e),b?v(this,e):s(f(this),function(e){return function(t,i){return void 0!==e?+e(t,i)||0:i!=i?-1:t!=t?1:0===t&&0===i?1/t>0&&1/i<0?1:-1:t>i}}(e))}),!b||y)},function(e,t,i){var n=i(90).match(/firefox\/(\d+)/i);e.exports=!!n&&+n[1]},function(e,t,i){var n=i(90);e.exports=/MSIE|Trident/.test(n)},function(e,t,i){var n=i(90).match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},function(e,t,i){"use strict";var n=i(25),r=i(66),o=i(79),a=i(184),s=n.aTypedArray;(0,n.exportTypedArrayMethod)("subarray",(function(e,t){var i=s(this),n=i.length,l=o(e,n);return new(a(i))(i.buffer,i.byteOffset+l*i.BYTES_PER_ELEMENT,r((void 0===t?n:o(t,n))-l))}))},function(e,t,i){"use strict";var n=i(8),r=i(80),o=i(25),a=i(15),s=i(104),l=n.Int8Array,u=o.aTypedArray,c=o.exportTypedArrayMethod,d=[].toLocaleString,h=!!l&&a((function(){d.call(new l(1))}));c("toLocaleString",(function(){return r(d,h?s(u(this)):u(this),s(arguments))}),a((function(){return[1,2].toLocaleString()!=new l([1,2]).toLocaleString()}))||!a((function(){l.prototype.toLocaleString.call([1,2])})))},function(e,t,i){"use strict";var n=i(25).exportTypedArrayMethod,r=i(15),o=i(8),a=i(12),s=o.Uint8Array,l=s&&s.prototype||{},u=[].toString,c=a([].join);r((function(){u.call({})}))&&(u=function(){return c(this)});var d=l.toString!=u;n("toString",u,d)},function(e,t,i){"use strict";var n=i(31),r=i(158),o=i(30),a=i(66),s=i(39),l=i(55),u=i(91),c=i(218),d=i(159);r("match",(function(e,t,i){return[function(t){var i=l(this),r=null==t?void 0:u(t,e);return r?n(r,t,i):new RegExp(t)[e](s(i))},function(e){var n=o(this),r=s(e),l=i(t,n,r);if(l.done)return l.value;if(!n.global)return d(n,r);var u=n.unicode;n.lastIndex=0;for(var h,p=[],f=0;null!==(h=d(n,r));){var g=s(h[0]);p[f]=g,""===g&&(n.lastIndex=c(r,a(n.lastIndex),u)),f++}return 0===f?null:p}]}))},function(e,t,i){var n,r;n=[i(2),i(68),i(11),i(113),i(20)],void 0===(r=function(e,t,i,n,r){return i=i.default,n=n.default,r=r.default,{parseDebugDocument:function(e,i,n){r.call({url:JSON.parse(t).authoringParseDebugDocument+"/"+e,method:"POST",cache:!1,dataType:"json",contentType:!1,processData:!1,success:i,error:n})},parseDocument:function(e,i,n,o){r.call({url:JSON.parse(t).authoringParseDocument+"?id="+i,data:e,method:"POST",cache:!1,dataType:"json",contentType:!1,processData:!1,success:n,error:o})},uploadPresentation:function(e,i,n,o){r.call({url:JSON.parse(t).authoringUploadPresentation+"/"+i,data:e,method:"POST",cache:!1,dataType:"json",contentType:!1,processData:!1,success:n,error:o})},createPresentation:function(e,i,n,o){var a=new FormData;a.append("data",JSON.stringify(i)),r.call({url:JSON.parse(t).authoringCreatePresentation+"/"+e,data:a,method:"POST",processData:!1,contentType:!1,cache:!1,success:n,error:o})},createPdf:function(e,i,n,o,a){data={url:i,debugFast:n},r.call({url:JSON.parse(t).authoringCreatePdfFromUrl+"/"+e,data:JSON.stringify(data),method:"POST",cache:!1,dataType:"json",success:o,error:a})},uploadVideos:function(e,i,n,o,a){r.call({method:"POST",url:JSON.parse(t).authoringUploadVideo+"/"+i,data:e,xhr:function(){var e=r.callSettings.xhr();return e.upload&&e.upload.addEventListener("progress",n,!1),e},processData:!1,contentType:!1,success:o,error:a})},getRecordedGroups:function(e,i,n){r.call({method:"GET",url:JSON.parse(t).getRecordedGroups+"/"+e,processData:!1,contentType:!1,success:i,error:n})},listVideoFiles:function(e,i,n){r.call({method:"POST",url:JSON.parse(t).listVideoFiles+"/"+e,processData:!1,cache:!0,contentType:!1,success:i,error:n})},previewVideo:function(e,i,n,o){var a=new FormData;a.append("data",JSON.stringify(i)),r.call({url:JSON.parse(t).previewVideo+"/"+e,data:a,method:"POST",processData:!1,contentType:!1,cache:!1,success:n,error:o})},renderVideo:function(e,i,n,o,a,s){var l=new FormData;l.append("data",JSON.stringify(o)),l.append("tags",n),l.append("name",i),r.call({url:JSON.parse(t).renderVideo+"/"+e,data:l,method:"POST",processData:!1,contentType:!1,cache:!1,success:a,error:s})},getAssetDetails:function(e,i,n){r.call({url:JSON.parse(t).assetDetails+"/"+e,method:"GET",processData:!1,contentType:!1,success:i,error:n})},getTags:function(e,i){r.call({url:JSON.parse(t).getAllCategory,method:"GET",processData:!1,contentType:!1,success:e,error:i})},getData:function(e,i,n,o){r.call({url:JSON.parse(t).authoringGetData+"/"+e+"/"+i,method:"GET",cache:!1,success:n,error:o})},saveData:function(e,n,o,a,s){var l=new FormData,u=i.serializeProjectJSON(JSON.parse(JSON.stringify(n)));l.append("data",JSON.stringify(u)),r.call({url:JSON.parse(t).saveData+"/"+e+"/"+o,data:l,method:"POST",processData:!1,contentType:!1,cache:!1,success:a,error:s})},getVideoParams:function(e,i,n){r.call({url:JSON.parse(t).getVideoParams,data:JSON.stringify(e),method:"POST",cache:!1,success:i,error:n})},getAuthoredContend:function(e,i,n){r.call({url:JSON.parse(t).getAuthoredContent,method:"GET",cache:!1,success:i,error:n})},editVideos:function(e,i,n,o){r.call({url:JSON.parse(t).editVideoParams+"/"+e+"/"+i,method:"GET",cache:!1,success:n,error:o})},savePdfThumb:function(e,i,n,o){var a={imgBase64:i};r.call({url:JSON.parse(t).savePdfThumb+"/"+e,data:JSON.stringify(a),method:"POST",cache:!1,success:n,error:o})},getSignedUrl:function(e,i,n){r.call({url:JSON.parse(t).getSignedUrl,data:JSON.stringify(e),method:"POST",cache:!1,dataType:"json",contentType:!1,processData:!1,success:i,error:n})},statusOf:function(e,i,o,a,s,l,u){if(u)chrome.runtime.sendMessage({vbg_extn_status_poller:!0,params:{token:e,statusId:i,assetId:o,operationType:a}},(function(e){e.status?s(e.data):l(Error(e.data))}));else{var c=JSON.parse(t).statusOf;e&&(c=JSON.parse(t).statusOfGuest),c=null!=o?c+"?asset_id="+o:c+"?id="+i,e&&(c=c+"&token="+e),null!=a&&(c=c+"&operation_type="+a);r.call({url:c,method:"GET",cache:!1,dataType:"json",contentType:!1,processData:!1,success:s,error:l,headers:n.appendBasicAuthHeader()})}},deleteAssets:function(e,i,n){r.call({url:JSON.parse(t).authoring+"/"+e,method:"delete",cache:!1,success:i,error:n})}}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-local import-body-container hide" id="importFromLocal"><div class="import-local-banner" id="importLocalBanner"><img src="/svg/upload.svg" alt="upload" class="upload-icon"/><div class="local-text">').f(t.get(["dragdropYourFiles"],!1),t,"h").w(' <span class="link" id="browseFiles">').f(t.get(["browse"],!1),t,"h").w("</span>").h("select",t,{block:i},{key:t.get(["type"],!1)},"h").w('</div></div><div class="import-local-content image-gallery main-gallery custom-scroll hide" id="importLocalContentContainer"><div id="importLocalContent" class="import-images-container"></div></div></div>')}function i(e,t){return e.h("eq",t,{block:n},{value:"image"},"h").h("eq",t,{block:o},{value:"audio"},"h").h("eq",t,{block:s},{value:"video"},"h").h("eq",t,{block:u},{value:"doc"},"h").h("eq",t,{block:d},{value:"custom"},"h")}function n(e,t){return e.w('<input type="file" id="importFileUpload" name="files" class="hide" accept="').f(t.get(["acceptFormats"],!1),t,"h").w('" ').x(t.get(["isMultiple"],!1),t,{block:r},{}).w("/>")}function r(e,t){return e.w(" multiple ")}function o(e,t){return e.w('<input type="file" id="importFileUpload" name="files" class="hide" accept="audio/*" ').x(t.get(["isMultiple"],!1),t,{block:a},{}).w("/>")}function a(e,t){return e.w(" multiple ")}function s(e,t){return e.w('<input type="file" id="importFileUpload" name="files" class="hide" accept="').f(t.get(["acceptFormats"],!1),t,"h").w('" ').x(t.get(["isMultiple"],!1),t,{block:l},{}).w("/>")}function l(e,t){return e.w(" multiple ")}function u(e,t){return e.w('<input type="file" id="importFileUpload" name="files" class="hide" accept="').f(t.get(["acceptFormats"],!1),t,"h").w('" ').x(t.get(["isMultiple"],!1),t,{block:c},{}).w("/>")}function c(e,t){return e.w(" multiple ")}function d(e,t){return e.w('<input type="file" id="importFileUpload" name="files" class="hide" accept="').f(t.get(["acceptFormats"],!1),t,"h").w('" />')}e.register("templates/partials/import_from_local",t),t.__dustBody=!0,i.__dustBody=!0,n.__dustBody=!0,r.__dustBody=!0,o.__dustBody=!0,a.__dustBody=!0,s.__dustBody=!0,l.__dustBody=!0,u.__dustBody=!0,c.__dustBody=!0,d.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_from_local",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="recently-used import-body-container hide" id="importRecentlyUsed"><div class="recently-used-container import-web-content image-gallery main-gallery custom-scroll" id="importRecentlyUsedContainer"><div id="recentlyUsedContent" class="import-images-container"></div><div class="import-recent-spin-loading hide"><div class="spinner-loading"></div><span class="loading-msg"> ').f(t.get(["loading"],!1),t,"h").w(' </span></div><div id="recentlyUsedEmptyState" class="web-search-empty text-center hide"><img src="/svg/empty-result.svg" alt="No results" class="empty-search-icon"/><div class="result-info"> ').f(t.get(["emptyRecent"],!1),t,"h").w(' </div></div><div id="loadMoreContentrecent" class="text-right load-more hide"> ').f(t.get(["loadMore"],!1),t,"h").w(" </div></div></div>")}e.register("templates/partials/import_recently_used",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_recently_used",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-web import-body-container hide" id="importFromWeb"><div class="import-web-banner" id="importWebBanner"><p> ').f(t.get(["importWebText"],!1),t,"h").w(' </p><div class="search-box"><input type="text" placeholder="').f(t.get(["searchFreeStockImage"],!1),t,"h").w('" id="searchFromWebTextBox" class="search-from-web-box"/><img src="/svg/search.svg" alt="search" class="search-icon"/><div class="spinner-loading import-spin-loading hide"></div></div><div class="powered-by"><span class="powered-by-label"> ').f(t.get(["poweredBy"],!1),t,"h").w(' </span><img src="/svg/flickr-logo.svg" alt="Flickr" /><img src="/img/pexels-logo.png" alt="Pexels" /></div></div><div class="import-web-content image-gallery main-gallery custom-scroll hide" id="importWebContentContainer"><div class="search-box-container"><div class="search-box"><input type="text" placeholder="').f(t.get(["searchImages"],!1),t,"h").w('" id="searchFromWebTextBox" class="search-from-web-box"/><img src="/svg/search.svg" alt="search" class="search-icon"/><div class="spinner-loading import-spin-loading hide"></div></div></div><div id="webSearchEmptyState" class="web-search-empty text-center hide"><img src="/svg/empty-result.svg" alt="No results" class="empty-search-icon"/><div class="result-info"> ').f(t.get(["emptySearchTerm"],!1),t,"h").w(' </div></div><div id="importWebContent" class="import-images-container"></div><div id="loadMoreContent" class="text-right load-more hide"> ').f(t.get(["loadMore"],!1),t,"h").w(" </div></div></div>")}e.register("templates/partials/import_from_web",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_from_web",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-shopify import-body-container hide" id="importFromShopify"><div class="import-web-banner import-web-banner-shopify hide" id="importShopifyBanner"><img src="/img/shopify.png" alt="GDrive" class="drive-icon" /><input type="text" id="shopUrl" placeholder=').f(t.get(["placeholder"],!1),t,"h").w('><p class="shopify-info-title">').f(t.get(["shopifyDomainInfoTitle"],!1),t,"h").w('</p><ul><li class="shopify-info">').f(t.get(["shopifyDomainInfoOne"],!1),t,"h").w('</li><li class="shopify-info">').f(t.get(["shopifyDomainInfoTwo"],!1),t,"h").w('</li><li class="shopify-info">').f(t.get(["shopifyDomainInfoThree"],!1),t,"h").w('</li></ul><p class="drive-text"> ').f(t.get(["importShopifyText"],!1),t,"h").w(' </p><div><button class="button secondary" id="shopifyGrantAccessCancel"> ').f(t.get(["cancel"],!1),t,"h").w(' </button><button class="button wiz-primary-btn" id="shopifyAccessBtn"> ').f(t.get(["grantAccess"],!1),t,"h").w(' </button></div></div><div class="import-shopify-container import-shopify-content image-gallery main-gallery custom-scroll" id="importshopifyContainer"><div class="filters text-left hide shopify-product-list" id="shopifyProductsFilter"><div class="shopify-select-container"><div class="shopify-select-wrap" id="shopifyStoreWrap"><label class="shopify-product-title"> ').f(t.get(["store"],!1),t,"h").w(' </label><select id="shopifyStores"> </select></div><div class="shopify-select-wrap" id="shopifyProductWrap"><label class="shopify-product-title"> ').f(t.get(["products"],!1),t,"h").w(' </label><select id="shopifyProducts"> </select></div></div><div class="shopify-select-text">').f(t.get(["selectRequiredImages"],!1),t,"h").w('</div></div><div id="importshopifyContent" class="import-images-container"></div><div class="import-shopify-spin-loading hide"><div class="spinner-loading"></div><span class="loading-msg"> ').f(t.get(["loading"],!1),t,"h").w(' </span></div><div id="importshopifyEmptyState" class="web-search-empty text-center hide"><img src="/svg/empty-result.svg" alt="No results" class="empty-search-icon"/><div class="result-info"> ').f(t.get(["emptyResults"],!1),t,"h").w(' </div></div><div id="loadMoreContentDrive" class="text-right load-more hide"> ').f(t.get(["loadMore"],!1),t,"h").w(" </div></div></div>")}e.register("templates/partials/import_from_shopify",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_from_shopify",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-library import-body-container hide" id="importFromLibrary"><div class="import-library-content image-gallery main-gallery custom-scroll" id="importLibraryContentContainer"><div class="filters text-left"><label class="genre-title"> Genre </label><select id="mediaGenre"><option value="chill"> Chill </option><option value="classical"> Classical </option><option value="comedy"> Comedy </option><option value="country"> Country </option><option value="electronic"> Electronic </option><option value="fantasy"> Fantasy </option><option value="horror"> Horror </option><option value="jazz" selected> Jazz </option><option value="misc"> Miscellaneous </option><option value="percussion"> Percussion </option><option value="rock"> Rock </option><option value="romantic"> Romantic </option><option value="upbeat"> Upbeat </option><option value="world"> World </option></select><div class="spinner-loading import-spin-loading hide"></div></div><div id="importLibraryContent" class="import-images-container"></div></div></div>')}e.register("templates/partials/import_from_library",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_from_library",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-selection-container clearfix" id="selectionDrawer" style="display: none;"><div class="drawer-handle hide" id="closeDrawHandle"><img src="/svg/arrow-inactive.svg" alt="Left" class="arrow-marker" /></div><div class="selected-title text-left">').f(t.get(["selectedTitle"],!1),t,"h").w('<span class="counter" id="selectedFilesCounter"> 00 </span></div><div class="row image-strip"><div class="pull-left marker-container"><span class="arrow-marker scroll-arrow scroll-left" ></span></div><div class="pull-left image-gallery custom-scroll-h" id="selectedImageGallery"></div><div class="pull-right marker-container"><span class="arrow-marker scroll-arrow scroll-right" ></span></div></div></div>')}e.register("templates/partials/import_selected_drawer",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_selected_drawer",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-drive import-body-container hide" id="importFromDrive"><div class="import-web-banner hide" id="importDriveBanner"><img src="/img/drive.png" alt="GDrive" class="drive-icon" /><p class="drive-text"> ').f(t.get(["importDriveText"],!1),t,"h").w(' </p><button class="button wiz-primary-btn" id="driveAccessBtn"> ').f(t.get(["grantAccess"],!1),t,"h").w(' </button></div><div class="import-drive-container import-web-content image-gallery main-gallery custom-scroll" id="importDriveContainer"><div class="filters text-left hide" id="accountsFilter"><label> ').f(t.get(["account"],!1),t,"h").w(' </label><select id="driveAccounts"> </select></div><div id="importDriveContent" class="import-images-container"></div><div class="import-drive-spin-loading hide"><div class="spinner-loading"></div><span class="loading-msg"> ').f(t.get(["loading"],!1),t,"h").w(' </span></div><div id="importDriveEmptyState" class="web-search-empty text-center hide"><img src="/svg/empty-result.svg" alt="No results" class="empty-search-icon"/><div class="result-info"> ').f(t.get(["emptyResults"],!1),t,"h").w(' </div></div><div id="loadMoreContentDrive" class="text-right load-more hide"> ').f(t.get(["loadMore"],!1),t,"h").w(" </div></div></div>")}e.register("templates/partials/import_from_drive",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_from_drive",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-drive import-body-container import-custom-link custom-scroll hide" id="importFromLink"><div class="large-12 columns text-left outer-container"><span class="hv-link-note-first">').f(t.get(["addCustomLinkDesc"],!1),t,"h").w('</span> </br><span class="hv-link-note-label">').f(t.get(["addCustomLinkLabel"],!1),t,"h").w('</span><span class="hv-link-note-second">').f(t.get(["addCustomLinkNote"],!1),t,"h").w('</span></div><div class="outer-container link-label-cont"><div class="label-cont"><span class="link-label">').f(t.get(["enterLinkLabel"],!1),t,"h").w('</span></div><div class="hv-url-text-area"><input type="text" id="importCustomLinkTxt" placeholder="').f(t.get(["customLinkPlaceholder"],!1),t,"h").w('"/><div class="hv-http-text">https://</div><div class="error-msg-container link-error-msg"><span id="linkErrorId" class="error-msg disp-none">').f(t.get(["linkErrorMsg"],!1),t,"h").w('</span></div></div><div class="hv-btn-wrap"><button class="hv-check-link-btn" id="checkLinkBtn">').f(t.get(["checkLinkBtn"],!1),t,"h").w('</button></div></div><div id="linkNameField" class=" outer-container link-label-cont disp-none"><div class="label-cont"><span class="link-label">').f(t.get(["enterTitleLabel"],!1),t,"h").w('</span></div><div class="hv-url-text-area"><input type="text" id="CustomTitleTxt" placeholder="').f(t.get(["customTitlePlaceholder"],!1),t,"h").w('"/></div><div class="error-msg-container"><span id="titleErrorId" class="error-msg disp-none">').f(t.get(["titleErrorMsg"],!1),t,"h").w('</span></div></div><div id="linkThumbnailField" class="text-left outer-container link-label-cont disp-none"><div class="img-cont"><span class="link-label">').f(t.get(["enterThumbnailLabel"],!1),t,"h").w('</span></div><div class="hv-thumpnail-wrap"><img id="linkLogoImg" width="100" src="/img/link-thumbnail-default.png" class="link-thumbnail-edit" style="height: 115px; width: 200px;"><div id="linkDisplayOptions" class="disp-none outer-container btn-container link-options hv-btn-wrap"><button class="hv-reset-btn" id="resetLinkBtn">').f(t.get(["resetLinkBtn"],!1),t,"h").w('</button><button class="hv-check-link-btn" id="addLinkBtn">').f(t.get(["addLinkBtn"],!1),t,"h").w('</button></div></div><div class="thumbnail-options"><div class="error-msg-container change-btn"><input id="linkLogoInput" class="disp-none" name="document[quizlogo]" type="file" accept=".png, .jpg, .jpeg, .gif"><a id="changeCustomThumbnailId" class="link-img-edit-btn"><img src="/svg/Icon-material-edit.svg" class="link-img-edit-img" width="10">Edit thumbnail</a></div><span class="link-label thumbnail-label">').f(t.get(["recommendedThumbnailSize"],!1),t,"h").w("</span></div></div></div>")}e.register("templates/partials/import_from_custom_link",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_from_custom_link",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){var n,r;n=[i(17),i(19)],void 0===(r=function(e,t){return function(e){function t(e,t){return e.w('<div class="import-drive import-body-container import-custom-link hide hvimport-link-body clear-float" id="importFromWebLink"><div class="large-12 columns text-left outer-container link-label-cont clear-float"><div class="medium-12 columns label-cont"><span class="link-label">').f(t.get(["enterLinkLabel"],!1),t,"h").w('</span></div><div class="medium-6 columns"><input type="text" id="importWebLinkTxt" placeholder="').f(t.get(["customWebLinkPlaceholder"],!1),t,"h").w('"/><input type="text" id="websiteName" class="disp-none" /></div><div class="medium-12 columns error-msg-container link-error-msg" id="weblinkErrorMsgContainer"><span id="WeblinkErrorId" class="error-msg disp-none">').f(t.get(["websiteLinkErrorMsg"],!1),t,"h").w('</span></div><button class="button wiz-primary-btn check-link-btn" id="checkWebsiteLinkBtn">').f(t.get(["checkWebsiteLinkBtn"],!1),t,"h").w('</button></div><div class="large-12 columns text-left outer-container link-label-cont hvimport-link-container"><div class="label-cont hvimport-link-title" id="websitePreviewDiv"><span class="link-label">').f(t.get(["websitePreviewTitle"],!1),t,"h").w('</span></div><div class="import-website-spin-loading" id="importWebsiteSpinner"><div class="color-loading"><span class="loading-bar"></span><span class="loading-bar"></span><span class="loading-bar"></span><span class="loading-bar"></span><span class="loading-bar"></span></div><p>Your website screenshot is being processed...</p></div><div class="label-cont disp-none" id="websiteErrorMsgDiv"><h5 class="link-label">').f(t.get(["websitePreviewTitle"],!1),t,"h").w('</h5><p class="link-label">').f(t.get(["websiteNoteMsg"],!1),t,"h").w('</p><button class="button wiz-primary-btn check-link-btn" id="checkWebsiteRetryBtn">').f(t.get(["checkWebsiteRetryBtn"],!1),t,"h").w('</button></div><div class="label-cont hvimport-link-image"><img id="WebsitePreviewImg" style="width: 400px;height:400px"></img></div></div></div>')}e.register("templates/partials/import_from_website_link",t),t.__dustBody=!0}(e),function(t,i){var n;return e.render("templates/partials/import_from_website_link",t,(function(e,t){if("function"==typeof i)try{i(e,t)}catch(e){}if(e)throw e;n=t})),n}}.apply(t,n))||(e.exports=r)},function(e,t,i){(function(n){var r,o,a;i(2);o=[i(2)],void 0===(a="function"==typeof(r=function(t){var i=function(){if(t&&t.fn&&t.fn.select2&&t.fn.select2.amd)var i=t.fn.select2.amd;return function(){
|
|
289
289
|
/**
|
|
290
290
|
* @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
|
|
291
291
|
* Available via the MIT or new BSD license.
|