@playkit-js/unisphere 0.0.19-canary.0-1ad47e6 → 0.0.19-canary.0-4cd88e9

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.
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see playkit-unisphere.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("KalturaPlayer",[],t):"object"==typeof exports?exports.KalturaPlayer=t():(e.KalturaPlayer=e.KalturaPlayer||{},e.KalturaPlayer.plugins=e.KalturaPlayer.plugins||{},e.KalturaPlayer.plugins.unisphere=t())}(self,(()=>(()=>{var e={51:(e,t,r)=>{var n=r(564).default;function o(){"use strict";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(t){p=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof w?t:w,i=Object.create(o.prototype),a=new R(n||[]);return u(i,"_invoke",{value:k(e,r,a)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=d;var v="suspendedStart",y="suspendedYield",g="executing",m="completed",b={};function w(){}function E(){}function S(){}var P={};p(P,s,(function(){return this}));var O=Object.getPrototypeOf,I=O&&O(O(L([])));I&&I!==i&&a.call(I,s)&&(P=I);var x=S.prototype=w.prototype=Object.create(P);function _(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,u,c){var s=h(e[o],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&a.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){l.value=e,u(l)}),(function(e){return r("throw",e,u,c)}))}c(s.arg)}var o;u(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(e,r,n){var o=v;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=T(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?m:y,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function T(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function A(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 M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+" is not iterable")}return E.prototype=S,u(x,"constructor",{value:S,configurable:!0}),u(S,"constructor",{value:E,configurable:!0}),E.displayName=p(S,f,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,p(e,f,"GeneratorFunction")),e.prototype=Object.create(x),e},r.awrap=function(e){return{__await:e}},_(j.prototype),p(j.prototype,l,(function(){return this})),r.AsyncIterator=j,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new j(d(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(x),p(x,f,"Generator"),p(x,s,(function(){return this})),p(x,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=L,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},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 r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(i)},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),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),M(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;M(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},564:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},790:(e,t,r)=>{var n=r(51)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{PlayerEvent:()=>_h});const e=KalturaPlayer;function t(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function o(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,c,"next",e)}function c(e){t(a,o,i,u,c,"throw",e)}u(void 0)}))}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function s(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function h(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var v=r(790),y=r.n(v);const g=KalturaPlayer.ui.preact,m=KalturaPlayer.core;var b=function(e){return e.UPPER_BAR_ICON_SHOW="unisphere.event.player.upper-bar-icon.show",e.UPPER_BAR_ICON_CLICK="unisphere.event.player.upper-bar-icon.click",e.SIDE_PANEL_OPEN="unisphere.event.player.side-panel.open",e.SIDE_PANEL_CLOSE="unisphere.event.player.side-panel.close",e.SIDE_PANEL_TOGGLE="unisphere.event.player.side-panel.toggle",e.SET_VALUE_CURRENT_TIME="unisphere.event.player.set-value.current-time",e.CHAPTERS_ADD="unisphere.event.player.chapters.add",e.PLAYER_RESIZE="unisphere.event.player.resize",e.DISPATCH_EVENT="unisphere.event.player.dispatch-event",e.SIDE_PANEL_CLOSED="unisphere.event.player.side-panel.closed",e.SIDE_PANEL_OPENED="unisphere.event.player.side-panel.opened",e}({}),w=function(e){return e.SELECTED_CHAPTER="selectedChapter",e.CURRENT_TIME="currentTime",e.IS_PAUSED="isPaused",e.PLAYER_SESSION="player-session",e.IS_SMALL_SIZE="isSmallSize",e}(w||{}),E=function(e){var t;return(0,g.h)("div",{style:null!==(t=e.style)&&void 0!==t?t:{},id:e.id})},S=e.ui.components,P=S.Tooltip,O=S.Icon,I=function(t){var r=t.id,n=t.label,o=t.iconPath;return(0,g.h)(P,{label:n,type:"bottom"},(0,g.h)("button",{type:"button","data-testid":"playlist_pluginButton","aria-label":n,className:e.ui.style.upperBarIcon},(0,g.h)(O,{id:"unisphere-icon-".concat(r),height:32,width:32,viewBox:"0 0 32 32",path:o})))},x=function(){function e(){i(this,e)}return s(e,null,[{key:"set",value:function(t){e.workspaceInstance=t}},{key:"get",value:function(){return e.workspaceInstance}},{key:"destroy",value:function(){try{this.workspaceInstance.kill()}catch(e){}e.workspaceInstance=null}}])}();function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}h(x,"workspaceInstance",null);var T=function(){function e(){i(this,e)}return s(e,null,[{key:"addToUnsubscribeMap",value:function(t){return e.unsubscribeMap.set(e.sequence,t),++e.sequence,e.sequence}},{key:"unsubscribeAll",value:function(){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return k(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.unsubscribeMap);try{for(r.s();!(t=r.n()).done;){var n=j(t.value,2),o=n[0];(0,n[1])(),e.unsubscribeMap.delete(o)}}catch(e){r.e(e)}finally{r.f()}}},{key:"unsubscribe",value:function(t){var r=e.unsubscribeMap.get(t);r&&(r(),e.unsubscribeMap.delete(t))}}])}();function A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(A=function(){return!!e})()}h(T,"unsubscribeMap",new Map),h(T,"sequence",-1);var M,R=function(e){function t(){return i(this,t),e=this,n=arguments,r=f(r=t),l(e,A()?Reflect.construct(r,n||[],f(e).constructor):r.apply(e,n));var e,r,n}return d(t,e),s(t)}(T);function L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(L=function(){return!!e})()}h(R,"get",function(){var e=o(y().mark((function e(t){var r,n,o,i,a;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.widgetId,n=t.context,o=t.settings,i=x.get(),e.prev=2,e.next=5,null==i?void 0:i.loadRuntime(r,n,o||{});case 5:return a=e.sent,e.abrupt("return",a?null==a?void 0:a.runtime:null);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",Promise.reject(e.t0));case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}());var C,N="unisphere.service.pub-sub",D=function(e){function t(){return i(this,t),e=this,n=arguments,r=f(r=t),l(e,L()?Reflect.construct(r,n||[],f(e).constructor):r.apply(e,n));var e,r,n}return d(t,e),s(t,null,[{key:"destroy",value:function(){t.unsubscribeAll()}}])}(T);function U(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(U=function(){return!!e})()}M=D,h(D,"subscribe",(function(e,t){var r=x.get(),n=null==r?void 0:r.getService(N);if(n){var o=n.subscribe(e,t);return M.addToUnsubscribeMap(o)}return-1})),h(D,"emit",(function(e,t){var r=x.get(),n=null==r?void 0:r.getService(N);null==n||n.emit({id:e,version:"1.0.0",payload:t})}));var $="player",B="unisphere.service.storage",F=function(e){function t(){return i(this,t),e=this,n=arguments,r=f(r=t),l(e,U()?Reflect.construct(r,n||[],f(e).constructor):r.apply(e,n));var e,r,n}return d(t,e),s(t,null,[{key:"destroy",value:function(){t.unsubscribeAll()}}])}(T);function W(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=0;t<5;++t)e+=m.Utils.Generator.uniqueId();return e}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}C=F,h(F,"update",(function(e,t){var r=x.get(),n=null==r?void 0:r.getService(B);null==n||n.update($,e,t)})),h(F,"get",(function(e){var t=x.get(),r=null==t?void 0:t.getService(B);return r?r.get($,e):null})),h(F,"subscribe",(function(e,t){var r=x.get(),n=null==r?void 0:r.getService(B);if(n){var o=n.subscribe(t,{namespace:$,property:e,emitLastValue:!0});C.addToUnsubscribeMap(o)}}));var K=function(){return s((function e(){i(this,e),h(this,"_disposers",new Map)}),[{key:"generateId",value:function(e){return W("".concat(e.containerType,"_container_"))}},{key:"getSidePanelsManager",value:function(e){return e.getService("sidePanelsManager")}},{key:"addDisposer",value:function(e,t){this._disposers.set(e,t)}},{key:"dispose",value:function(e){var t=this._disposers.get(e);t&&(t(),this._disposers.delete(e))}},{key:"destroy",value:function(){var e,t=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return G(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?G(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this._disposers);try{for(t.s();!(e=t.n()).done;){var r=j(e.value,1)[0];this.dispose(r)}}catch(e){t.e(e)}finally{t.f()}}}])}();function z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(z=function(){return!!e})()}var H=function(e){function t(){return i(this,t),e=this,n=arguments,r=f(r=t),l(e,z()?Reflect.construct(r,n||[],f(e).constructor):r.apply(e,n));var e,r,n}return d(t,e),s(t,[{key:"createContainer",value:function(e,t){var r,n=this,o=this.generateId(t),i=t.unisphereArea,a=t.position,u=t.expandMode,c=t.presets,s=null===(r=this.getSidePanelsManager(e))||void 0===r?void 0:r.add({label:o,panelComponent:function(){return(0,g.h)(E,{style:{height:"100%"},id:o})},presets:c,position:a,expandMode:u});return"number"==typeof s?(this.addDisposer(o,(function(){var t;null===(t=n.getSidePanelsManager(e))||void 0===t||t.remove(s)})),F.update(i,{upperBarIcon:{panelId:s}}),o):null}}])}(K);function V(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(V=function(){return!!e})()}var q=function(e){function t(){return i(this,t),e=this,n=arguments,r=f(r=t),l(e,V()?Reflect.construct(r,n||[],f(e).constructor):r.apply(e,n));var e,r,n}return d(t,e),s(t,[{key:"createContainer",value:function(e,t){var r=this.generateId(t),n=t.playerArea,o=t.presets,i=e.ui.addComponent({label:r,presets:o,area:n,get:function(){return(0,g.h)(E,{style:{width:"inherit"},id:r})}});return this.addDisposer(r,i),r}}])}(K);function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Z=function(){return s((function e(t){i(this,e),h(this,"containerProducers",new Map([["sidepanel",new H],["simple",new q]])),this.player=t}),[{key:"createContainer",value:function(e){var t=this.containerProducers.get(e.containerType);return t?t.createContainer(this.player,e):null}},{key:"destroy",value:function(){var e,t=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Y(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Y(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this.containerProducers);try{for(t.s();!(e=t.n()).done;){var r,n=j(e.value,1)[0];null===(r=this.containerProducers.get(n))||void 0===r||r.destroy()}}catch(e){t.e(e)}finally{t.f()}}}])}();function J(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return X(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Q=e.ui.reducers.shell,ee=function(){return s((function e(t,r,n){i(this,e),h(this,"iconIds",new Map),h(this,"panelIds",new Set),h(this,"persistentIconIds",new Map),this.player=t,this.eventManager=r,this.logger=n,this.containerManager=new Z(t),this.currentIsSmallSize=void 0}),[{key:"upperBarManager",get:function(){return this.player.getService("upperBarManager")}},{key:"sidePanelsManager",get:function(){return this.player.getService("sidePanelsManager")}},{key:"timelineManager",get:function(){return this.player.getService("timeline")}},{key:"cuePointManager",get:function(){return this.player.getService("kalturaCuepoints")}},{key:"addEventHandlers",value:function(){var t=this,r=e.ui.redux.useStore();this.unsubscribeStore=r.subscribe((function(){var e=r.getState().shell.isSmallSize;e!==t.currentIsSmallSize&&(t.currentIsSmallSize=e,F.update(w.IS_SMALL_SIZE,e))})),D.subscribe(b.UPPER_BAR_ICON_SHOW,(function(e){var r=e.payload,n=r.id,o=r.label,i=r.order,a=r.iconPath,u=r.panelId,c=r.isPersistent;t.addUpperBarIcon(n,o,i,a,u,c)})),D.subscribe(b.SIDE_PANEL_OPEN,(function(e){var r,n=e.payload,o=n.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.activateItem(o),D.emit(b.SIDE_PANEL_OPENED,n)})),D.subscribe(b.SIDE_PANEL_CLOSE,(function(e){var r,n=e.payload,o=n.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.deactivateItem(o),D.emit(b.SIDE_PANEL_CLOSED,n)})),D.subscribe(b.SIDE_PANEL_TOGGLE,(function(e){var r,n,o,i=e.payload,a=i.panelId;null!==(r=t.sidePanelsManager)&&void 0!==r&&r.isItemActive(a)?(null===(n=t.sidePanelsManager)||void 0===n||n.deactivateItem(a),D.emit(b.SIDE_PANEL_CLOSED,i)):(null===(o=t.sidePanelsManager)||void 0===o||o.activateItem(a),D.emit(b.SIDE_PANEL_OPENED,i))})),D.subscribe(b.SET_VALUE_CURRENT_TIME,(function(e){var r=e.payload.currentTime;r>=0&&(t.player.currentTime=r)})),D.subscribe(b.CHAPTERS_ADD,(function(e){var r=e.payload,n=r.chapters;if(n&&n.length){var o;null===(o=t.timelineManager)||void 0===o||o.disableChapters();for(var i=0;i<n.length;++i){var a,u=n[i],c=u.title,s=+u.time;null===(a=t.timelineManager)||void 0===a||a.addKalturaCuePoint(s,"SummaryAndChapters",i,c,{onClick:function(e){var t=e.cuePoint;F.update(w.SELECTED_CHAPTER,t.id)}})}t.player.dispatchEvent(new m.FakeEvent(_h.UNISPHERE_CHAPTERS_ADDED,r))}})),D.subscribe(b.DISPATCH_EVENT,(function(e){var r=e.payload,n=r.eventName,o=r.data;t.player.dispatchEvent(new m.FakeEvent(n,o))})),this.eventManager.listen(this.player,e.core.EventType.TIME_UPDATE,(function(){F.update(w.CURRENT_TIME,"".concat(t.player.currentTime))})),this.eventManager.listen(this.player,e.ui.EventType.GUI_RESIZE,(function(){D.emit(b.PLAYER_RESIZE,{}),setTimeout((function(){D.emit(b.PLAYER_RESIZE,{})}),1e3)})),this.eventManager.listen(this.player,e.core.EventType.PAUSE,(function(){F.update(w.IS_PAUSED,!0)})),this.eventManager.listen(this.player,e.core.EventType.PLAY,(function(){F.update(w.IS_PAUSED,!1)}))}},{key:"addUpperBarIcon",value:function(e,t,r,n,o,i){var a;if(!this.iconIds.has(e)&&!this.persistentIconIds.has(e)){this.panelIds.add(o);var u=null===(a=this.upperBarManager)||void 0===a?void 0:a.add({displayName:t,ariaLabel:t,order:r,component:function(){return(0,g.h)(I,{id:e,label:t,iconPath:n})},svgIcon:{path:n},onClick:function(){D.emit(b.UPPER_BAR_ICON_CLICK,{id:e,panelId:o})}});i?this.persistentIconIds.set(e,u):this.iconIds.set(e,u)}}},{key:"isVideoClipped",value:function(){var e=this.player.config.sources,t=e.seekFrom,r=e.clipTo,n=e.duration;return"number"==typeof t&&t>0||"number"==typeof r&&r<n}},{key:"shouldLoadWidget",value:function(e){var t=e.widgetId,r=e.context;return!(t.includes("video-summary")&&"kaltura-player-list"===r&&this.isVideoClipped())}},{key:"loadWidgets",value:function(e){var t,r=this,n=J(e);try{var o=function(){var e=t.value,n=e.widgetId,o=e.context;if(!n||!o||!r.shouldLoadWidget(e))return 1;var i,a=J(e.containers);try{var u=function(){var t=i.value;if(!t.unisphereArea)return 1;var a=r.containerManager.createContainer(t);a&&R.get(e).then((function(e){null==e||e.assignAreaByName(t.unisphereArea,a)})).catch((function(e){r.logger.warn("Failed to load unisphere widget ".concat(n," with context ").concat(o," "),e)}))};for(a.s();!(i=a.n()).done;)u()}catch(e){a.e(e)}finally{a.f()}};for(n.s();!(t=n.n()).done;)o()}catch(e){n.e(e)}finally{n.f()}}},{key:"init",value:function(e,t){x.set(e),this.addEventHandlers(),this.loadWidgets(t)}},{key:"updateSessionData",value:function(){var e,t;F.update(w.PLAYER_SESSION,{entryId:this.player.sources.id,ks:null===(e=this.player.config.session)||void 0===e?void 0:e.ks,entryName:null===(t=this.player.sources.metadata)||void 0===t?void 0:t.name})}},{key:"reset",value:function(){var e,t=J(this.panelIds);try{for(t.s();!(e=t.n()).done;){var r,n=e.value;if(null!==(r=this.sidePanelsManager)&&void 0!==r&&r.isItemActive(n)){this.sidePanelsManager.deactivateItem(n);break}}}catch(e){t.e(e)}finally{t.f()}var o,i=J(this.iconIds.values());try{for(i.s();!(o=i.n()).done;){var a,u=o.value;null===(a=this.upperBarManager)||void 0===a||a.remove(u)}}catch(e){i.e(e)}finally{i.f()}this.iconIds.clear(),this.containerManager.destroy(),this.player.ui.store.dispatch(Q.actions.updateTimeDisplayIsMinimized(!1))}},{key:"destroy",value:function(){this.reset(),this.containerManager.destroy();var e,t=J(this.persistentIconIds.values());try{for(t.s();!(e=t.n()).done;){var r,n=e.value;null===(r=this.upperBarManager)||void 0===r||r.remove(n)}}catch(e){t.e(e)}finally{t.f()}D.destroy(),F.destroy(),x.destroy(),this.unsubscribeStore&&this.unsubscribeStore()}}])}(),te="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},re=function(e){return e&&e.Math===Math&&e},ne=re("object"==typeof globalThis&&globalThis)||re("object"==typeof window&&window)||re("object"==typeof self&&self)||re("object"==typeof te&&te)||re("object"==typeof te&&te)||function(){return this}()||Function("return this")(),oe={},ie=function(e){try{return!!e()}catch(e){return!0}},ae=!ie((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),ue=!ie((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ce=ue,se=Function.prototype.call,le=ce?se.bind(se):function(){return se.apply(se,arguments)},fe={},pe={}.propertyIsEnumerable,de=Object.getOwnPropertyDescriptor,he=de&&!pe.call({1:2},1);fe.f=he?function(e){var t=de(this,e);return!!t&&t.enumerable}:pe;var ve,ye,ge=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},me=ue,be=Function.prototype,we=be.call,Ee=me&&be.bind.bind(we,we),Se=me?Ee:function(e){return function(){return we.apply(e,arguments)}},Pe=Se,Oe=Pe({}.toString),Ie=Pe("".slice),xe=function(e){return Ie(Oe(e),8,-1)},_e=ie,je=xe,ke=Object,Te=Se("".split),Ae=_e((function(){return!ke("z").propertyIsEnumerable(0)}))?function(e){return"String"===je(e)?Te(e,""):ke(e)}:ke,Me=function(e){return null==e},Re=Me,Le=TypeError,Ce=function(e){if(Re(e))throw new Le("Can't call method on "+e);return e},Ne=Ae,De=Ce,Ue=function(e){return Ne(De(e))},$e="object"==typeof document&&document.all,Be=void 0===$e&&void 0!==$e?function(e){return"function"==typeof e||e===$e}:function(e){return"function"==typeof e},Fe=Be,We=function(e){return"object"==typeof e?null!==e:Fe(e)},Ge=ne,Ke=Be,ze=function(e,t){return arguments.length<2?(r=Ge[e],Ke(r)?r:void 0):Ge[e]&&Ge[e][t];var r},He=Se({}.isPrototypeOf),Ve="undefined"!=typeof navigator&&String(navigator.userAgent)||"",qe=ne,Ye=Ve,Ze=qe.process,Je=qe.Deno,Xe=Ze&&Ze.versions||Je&&Je.version,Qe=Xe&&Xe.v8;Qe&&(ye=(ve=Qe.split("."))[0]>0&&ve[0]<4?1:+(ve[0]+ve[1])),!ye&&Ye&&(!(ve=Ye.match(/Edge\/(\d+)/))||ve[1]>=74)&&(ve=Ye.match(/Chrome\/(\d+)/))&&(ye=+ve[1]);var et=ye,tt=et,rt=ie,nt=ne.String,ot=!!Object.getOwnPropertySymbols&&!rt((function(){var e=Symbol("symbol detection");return!nt(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&tt&&tt<41})),it=ot&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,at=ze,ut=Be,ct=He,st=Object,lt=it?function(e){return"symbol"==typeof e}:function(e){var t=at("Symbol");return ut(t)&&ct(t.prototype,st(e))},ft=String,pt=function(e){try{return ft(e)}catch(e){return"Object"}},dt=Be,ht=pt,vt=TypeError,yt=function(e){if(dt(e))return e;throw new vt(ht(e)+" is not a function")},gt=yt,mt=Me,bt=function(e,t){var r=e[t];return mt(r)?void 0:gt(r)},wt=le,Et=Be,St=We,Pt=TypeError,Ot={exports:{}},It=ne,xt=Object.defineProperty,_t=function(e,t){try{xt(It,e,{value:t,configurable:!0,writable:!0})}catch(r){It[e]=t}return t},jt=ne,kt=_t,Tt="__core-js_shared__",At=Ot.exports=jt[Tt]||kt(Tt,{});(At.versions||(At.versions=[])).push({version:"3.36.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Mt=Ot.exports,Rt=Mt,Lt=function(e,t){return Rt[e]||(Rt[e]=t||{})},Ct=Ce,Nt=Object,Dt=function(e){return Nt(Ct(e))},Ut=Dt,$t=Se({}.hasOwnProperty),Bt=Object.hasOwn||function(e,t){return $t(Ut(e),t)},Ft=Se,Wt=0,Gt=Math.random(),Kt=Ft(1..toString),zt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Kt(++Wt+Gt,36)},Ht=Lt,Vt=Bt,qt=zt,Yt=ot,Zt=it,Jt=ne.Symbol,Xt=Ht("wks"),Qt=Zt?Jt.for||Jt:Jt&&Jt.withoutSetter||qt,er=function(e){return Vt(Xt,e)||(Xt[e]=Yt&&Vt(Jt,e)?Jt[e]:Qt("Symbol."+e)),Xt[e]},tr=le,rr=We,nr=lt,or=bt,ir=TypeError,ar=er("toPrimitive"),ur=function(e,t){if(!rr(e)||nr(e))return e;var r,n=or(e,ar);if(n){if(void 0===t&&(t="default"),r=tr(n,e,t),!rr(r)||nr(r))return r;throw new ir("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&Et(r=e.toString)&&!St(n=wt(r,e)))return n;if(Et(r=e.valueOf)&&!St(n=wt(r,e)))return n;if("string"!==t&&Et(r=e.toString)&&!St(n=wt(r,e)))return n;throw new Pt("Can't convert object to primitive value")}(e,t)},cr=lt,sr=function(e){var t=ur(e,"string");return cr(t)?t:t+""},lr=We,fr=ne.document,pr=lr(fr)&&lr(fr.createElement),dr=function(e){return pr?fr.createElement(e):{}},hr=dr,vr=!ae&&!ie((function(){return 7!==Object.defineProperty(hr("div"),"a",{get:function(){return 7}}).a})),yr=ae,gr=le,mr=fe,br=ge,wr=Ue,Er=sr,Sr=Bt,Pr=vr,Or=Object.getOwnPropertyDescriptor;oe.f=yr?Or:function(e,t){if(e=wr(e),t=Er(t),Pr)try{return Or(e,t)}catch(e){}if(Sr(e,t))return br(!gr(mr.f,e,t),e[t])};var Ir={},xr=ae&&ie((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),_r=We,jr=String,kr=TypeError,Tr=function(e){if(_r(e))return e;throw new kr(jr(e)+" is not an object")},Ar=ae,Mr=vr,Rr=xr,Lr=Tr,Cr=sr,Nr=TypeError,Dr=Object.defineProperty,Ur=Object.getOwnPropertyDescriptor,$r="enumerable",Br="configurable",Fr="writable";Ir.f=Ar?Rr?function(e,t,r){if(Lr(e),t=Cr(t),Lr(r),"function"==typeof e&&"prototype"===t&&"value"in r&&Fr in r&&!r[Fr]){var n=Ur(e,t);n&&n[Fr]&&(e[t]=r.value,r={configurable:Br in r?r[Br]:n[Br],enumerable:$r in r?r[$r]:n[$r],writable:!1})}return Dr(e,t,r)}:Dr:function(e,t,r){if(Lr(e),t=Cr(t),Lr(r),Mr)try{return Dr(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new Nr("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Wr=Ir,Gr=ge,Kr=ae?function(e,t,r){return Wr.f(e,t,Gr(1,r))}:function(e,t,r){return e[t]=r,e},zr={exports:{}},Hr=ae,Vr=Bt,qr=Function.prototype,Yr=Hr&&Object.getOwnPropertyDescriptor,Zr=Vr(qr,"name"),Jr={EXISTS:Zr,PROPER:Zr&&"something"===function(){}.name,CONFIGURABLE:Zr&&(!Hr||Hr&&Yr(qr,"name").configurable)},Xr=Be,Qr=Mt,en=Se(Function.toString);Xr(Qr.inspectSource)||(Qr.inspectSource=function(e){return en(e)});var tn,rn,nn,on=Qr.inspectSource,an=Be,un=ne.WeakMap,cn=an(un)&&/native code/.test(String(un)),sn=zt,ln=Lt("keys"),fn=function(e){return ln[e]||(ln[e]=sn(e))},pn={},dn=cn,hn=ne,vn=We,yn=Kr,gn=Bt,mn=Mt,bn=fn,wn=pn,En="Object already initialized",Sn=hn.TypeError,Pn=hn.WeakMap;if(dn||mn.state){var On=mn.state||(mn.state=new Pn);On.get=On.get,On.has=On.has,On.set=On.set,tn=function(e,t){if(On.has(e))throw new Sn(En);return t.facade=e,On.set(e,t),t},rn=function(e){return On.get(e)||{}},nn=function(e){return On.has(e)}}else{var In=bn("state");wn[In]=!0,tn=function(e,t){if(gn(e,In))throw new Sn(En);return t.facade=e,yn(e,In,t),t},rn=function(e){return gn(e,In)?e[In]:{}},nn=function(e){return gn(e,In)}}var xn={set:tn,get:rn,has:nn,enforce:function(e){return nn(e)?rn(e):tn(e,{})},getterFor:function(e){return function(t){var r;if(!vn(t)||(r=rn(t)).type!==e)throw new Sn("Incompatible receiver, "+e+" required");return r}}},_n=Se,jn=ie,kn=Be,Tn=Bt,An=ae,Mn=Jr.CONFIGURABLE,Rn=on,Ln=xn.enforce,Cn=xn.get,Nn=String,Dn=Object.defineProperty,Un=_n("".slice),$n=_n("".replace),Bn=_n([].join),Fn=An&&!jn((function(){return 8!==Dn((function(){}),"length",{value:8}).length})),Wn=String(String).split("String"),Gn=zr.exports=function(e,t,r){"Symbol("===Un(Nn(t),0,7)&&(t="["+$n(Nn(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Tn(e,"name")||Mn&&e.name!==t)&&(An?Dn(e,"name",{value:t,configurable:!0}):e.name=t),Fn&&r&&Tn(r,"arity")&&e.length!==r.arity&&Dn(e,"length",{value:r.arity});try{r&&Tn(r,"constructor")&&r.constructor?An&&Dn(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=Ln(e);return Tn(n,"source")||(n.source=Bn(Wn,"string"==typeof t?t:"")),e};Function.prototype.toString=Gn((function(){return kn(this)&&Cn(this).source||Rn(this)}),"toString");var Kn=zr.exports,zn=Be,Hn=Ir,Vn=Kn,qn=_t,Yn=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(zn(r)&&Vn(r,i,n),n.global)o?e[t]=r:qn(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:Hn.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Zn={},Jn=Math.ceil,Xn=Math.floor,Qn=Math.trunc||function(e){var t=+e;return(t>0?Xn:Jn)(t)},eo=function(e){var t=+e;return t!=t||0===t?0:Qn(t)},to=eo,ro=Math.max,no=Math.min,oo=eo,io=Math.min,ao=function(e){var t=oo(e);return t>0?io(t,9007199254740991):0},uo=ao,co=function(e){return uo(e.length)},so=Ue,lo=co,fo=function(e){return function(t,r,n){var o=so(t),i=lo(o);if(0===i)return!e&&-1;var a,u=function(e,t){var r=to(e);return r<0?ro(r+t,0):no(r,t)}(n,i);if(e&&r!=r){for(;i>u;)if((a=o[u++])!=a)return!0}else for(;i>u;u++)if((e||u in o)&&o[u]===r)return e||u||0;return!e&&-1}},po={includes:fo(!0),indexOf:fo(!1)},ho=Bt,vo=Ue,yo=po.indexOf,go=pn,mo=Se([].push),bo=function(e,t){var r,n=vo(e),o=0,i=[];for(r in n)!ho(go,r)&&ho(n,r)&&mo(i,r);for(;t.length>o;)ho(n,r=t[o++])&&(~yo(i,r)||mo(i,r));return i},wo=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Eo=bo,So=wo.concat("length","prototype");Zn.f=Object.getOwnPropertyNames||function(e){return Eo(e,So)};var Po={};Po.f=Object.getOwnPropertySymbols;var Oo=ze,Io=Zn,xo=Po,_o=Tr,jo=Se([].concat),ko=Oo("Reflect","ownKeys")||function(e){var t=Io.f(_o(e)),r=xo.f;return r?jo(t,r(e)):t},To=Bt,Ao=ko,Mo=oe,Ro=Ir,Lo=function(e,t,r){for(var n=Ao(t),o=Ro.f,i=Mo.f,a=0;a<n.length;a++){var u=n[a];To(e,u)||r&&To(r,u)||o(e,u,i(t,u))}},Co=ie,No=Be,Do=/#|\.prototype\./,Uo=function(e,t){var r=Bo[$o(e)];return r===Wo||r!==Fo&&(No(t)?Co(t):!!t)},$o=Uo.normalize=function(e){return String(e).replace(Do,".").toLowerCase()},Bo=Uo.data={},Fo=Uo.NATIVE="N",Wo=Uo.POLYFILL="P",Go=Uo,Ko=ne,zo=oe.f,Ho=Kr,Vo=Yn,qo=_t,Yo=Lo,Zo=Go,Jo=function(e,t){var r,n,o,i,a,u=e.target,c=e.global,s=e.stat;if(r=c?Ko:s?Ko[u]||qo(u,{}):Ko[u]&&Ko[u].prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=zo(r,n))&&a.value:r[n],!Zo(c?n:u+(s?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Yo(i,o)}(e.sham||o&&o.sham)&&Ho(i,"sham",!0),Vo(r,n,i,e)}},Xo=ue,Qo=Function.prototype,ei=Qo.apply,ti=Qo.call,ri="object"==typeof Reflect&&Reflect.apply||(Xo?ti.bind(ei):function(){return ti.apply(ei,arguments)}),ni=Se,oi=yt,ii=We,ai=String,ui=TypeError,ci=We,si=Ce,li=function(e){if(function(e){return ii(e)||null===e}(e))return e;throw new ui("Can't set "+ai(e)+" as a prototype")},fi=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=function(e,t,r){try{return ni(oi(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return si(r),li(n),ci(r)?(t?e(r,n):r.__proto__=n,r):r}}():void 0),pi=Ir.f,di=Be,hi=We,vi=fi,yi={};yi[er("toStringTag")]="z";var gi="[object z]"===String(yi),mi=Be,bi=xe,wi=er("toStringTag"),Ei=Object,Si="Arguments"===bi(function(){return arguments}()),Pi=gi?bi:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Ei(e),wi))?r:Si?bi(t):"Object"===(n=bi(t))&&mi(t.callee)?"Arguments":n},Oi=Pi,Ii=String,xi=function(e){if("Symbol"===Oi(e))throw new TypeError("Cannot convert a Symbol value to a string");return Ii(e)},_i=xi,ji=We,ki=Kr,Ti=Error,Ai=Se("".replace),Mi=String(new Ti("zxcasd").stack),Ri=/\n\s*at [^:]*:[^\n]*/,Li=Ri.test(Mi),Ci=ge,Ni=!ie((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Ci(1,7)),7!==e.stack)})),Di=Kr,Ui=Ni,$i=Error.captureStackTrace,Bi=ze,Fi=Bt,Wi=Kr,Gi=He,Ki=fi,zi=Lo,Hi=function(e,t,r){r in e||pi(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},Vi=function(e,t,r,n){Ui&&($i?$i(e,t):Di(e,"stack",function(e,t){if(Li&&"string"==typeof e&&!Ti.prepareStackTrace)for(;t--;)e=Ai(e,Ri,"");return e}(r,n)))},qi=ae,Yi=Jo,Zi=ri,Ji=function(e,t,r,n){var o="stackTraceLimit",i=n?2:1,a=e.split("."),u=a[a.length-1],c=Bi.apply(null,a);if(c){var s=c.prototype;if(Fi(s,"cause")&&delete s.cause,!r)return c;var l=Bi("Error"),f=t((function(e,t){var r,o,a,u,l,p,d,h=function(e,t){return void 0===e?arguments.length<2?"":t:_i(e)}(n?t:e,void 0),v=n?new c(e):new c;return void 0!==h&&Wi(v,"message",h),Vi(v,f,v.stack,2),this&&Gi(s,this)&&(a=v,u=this,l=f,vi&&di(p=u.constructor)&&p!==l&&hi(d=p.prototype)&&d!==l.prototype&&vi(a,d)),arguments.length>i&&(r=v,ji(o=arguments[i])&&"cause"in o&&ki(r,"cause",o.cause)),v}));f.prototype=s,"Error"!==u?Ki?Ki(f,l):zi(f,l,{name:!0}):qi&&o in c&&(Hi(f,c,o),Hi(f,c,"prepareStackTrace")),zi(f,c);try{s.name!==u&&Wi(s,"name",u),s.constructor=f}catch(e){}return f}},Xi="WebAssembly",Qi=ne[Xi],ea=7!==new Error("e",{cause:7}).cause,ta=function(e,t){var r={};r[e]=Ji(e,t,ea),Yi({global:!0,constructor:!0,arity:1,forced:ea},r)},ra=function(e,t){if(Qi&&Qi[e]){var r={};r[e]=Ji(Xi+"."+e,t,ea),Yi({target:Xi,stat:!0,constructor:!0,arity:1,forced:ea},r)}};ta("Error",(function(e){return function(t){return Zi(e,this,arguments)}})),ta("EvalError",(function(e){return function(t){return Zi(e,this,arguments)}})),ta("RangeError",(function(e){return function(t){return Zi(e,this,arguments)}})),ta("ReferenceError",(function(e){return function(t){return Zi(e,this,arguments)}})),ta("SyntaxError",(function(e){return function(t){return Zi(e,this,arguments)}})),ta("TypeError",(function(e){return function(t){return Zi(e,this,arguments)}})),ta("URIError",(function(e){return function(t){return Zi(e,this,arguments)}})),ra("CompileError",(function(e){return function(t){return Zi(e,this,arguments)}})),ra("LinkError",(function(e){return function(t){return Zi(e,this,arguments)}})),ra("RuntimeError",(function(e){return function(t){return Zi(e,this,arguments)}})),Error;var na=xe,oa=ae,ia=Array.isArray||function(e){return"Array"===na(e)},aa=TypeError,ua=Object.getOwnPropertyDescriptor,ca=oa&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),sa=TypeError,la=Dt,fa=co,pa=ca?function(e,t){if(ia(e)&&!ua(e,"length").writable)throw new aa("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t};Jo({target:"Array",proto:!0,arity:1,forced:ie((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=la(this),r=fa(t),n=arguments.length;!function(e){if(e>9007199254740991)throw sa("Maximum allowed index exceeded")}(r+n);for(var o=0;o<n;o++)t[r]=arguments[o],r++;return pa(t,r),r}});var da=bo,ha=wo,va=Object.keys||function(e){return da(e,ha)},ya=ae,ga=Se,ma=le,ba=ie,wa=va,Ea=Po,Sa=fe,Pa=Dt,Oa=Ae,Ia=Object.assign,xa=Object.defineProperty,_a=ga([].concat),ja=!Ia||ba((function(){if(ya&&1!==Ia({b:1},Ia(xa({},"a",{enumerable:!0,get:function(){xa(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!==Ia({},e)[r]||wa(Ia({},t)).join("")!==n}))?function(e,t){for(var r=Pa(e),n=arguments.length,o=1,i=Ea.f,a=Sa.f;n>o;)for(var u,c=Oa(arguments[o++]),s=i?_a(wa(c),i(c)):wa(c),l=s.length,f=0;l>f;)u=s[f++],ya&&!ma(a,c,u)||(r[u]=c[u]);return r}:Ia,ka=ja;Jo({target:"Object",stat:!0,arity:2,forced:Object.assign!==ka},{assign:ka});var Ta={},Aa=ae,Ma=xr,Ra=Ir,La=Tr,Ca=Ue,Na=va;Ta.f=Aa&&!Ma?Object.defineProperties:function(e,t){La(e);for(var r,n=Ca(t),o=Na(t),i=o.length,a=0;i>a;)Ra.f(e,r=o[a++],n[r]);return e};var Da,Ua=ze("document","documentElement"),$a=Tr,Ba=Ta,Fa=wo,Wa=pn,Ga=Ua,Ka=dr,za="prototype",Ha="script",Va=fn("IE_PROTO"),qa=function(){},Ya=function(e){return"<"+Ha+">"+e+"</"+Ha+">"},Za=function(e){e.write(Ya("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ja=function(){try{Da=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;Ja="undefined"!=typeof document?document.domain&&Da?Za(Da):(t=Ka("iframe"),r="java"+Ha+":",t.style.display="none",Ga.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Ya("document.F=Object")),e.close(),e.F):Za(Da);for(var n=Fa.length;n--;)delete Ja[za][Fa[n]];return Ja()};Wa[Va]=!0;var Xa=Object.create||function(e,t){var r;return null!==e?(qa[za]=$a(e),r=new qa,qa[za]=null,r[Va]=e):r=Ja(),void 0===t?r:Ba.f(r,t)},Qa=er,eu=Xa,tu=Ir.f,ru=Qa("unscopables"),nu=Array.prototype;void 0===nu[ru]&&tu(nu,ru,{configurable:!0,value:eu(null)});var ou,iu=po.includes;Jo({target:"Array",proto:!0,forced:ie((function(){return!Array(1).includes()}))},{includes:function(e){return iu(this,e,arguments.length>1?arguments[1]:void 0)}}),ou="includes",nu[ru][ou]=!0;var au,uu="\t\n\v\f\r                 \u2028\u2029\ufeff",cu=Ce,su=xi,lu=uu,fu=Se("".replace),pu=RegExp("^["+lu+"]+"),du=RegExp("(^|[^"+lu+"])["+lu+"]+$"),hu=function(e){return function(t){var r=su(cu(t));return 1&e&&(r=fu(r,pu,"")),2&e&&(r=fu(r,du,"$1")),r}},vu={start:hu(1),end:hu(2),trim:hu(3)},yu=Jr.PROPER,gu=uu,mu=vu.trim;Jo({target:"String",proto:!0,forced:(au="trim",ie((function(){return!!gu[au]()||"​…᠎"!=="​…᠎"[au]()||yu&&gu[au].name!==au})))},{trim:function(){return mu(this)}});var bu,wu,Eu=Tr,Su=ie,Pu=ne.RegExp,Ou=Su((function(){var e=Pu("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),Iu=Ou||Su((function(){return!Pu("a","y").sticky})),xu={BROKEN_CARET:Ou||Su((function(){var e=Pu("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:Iu,UNSUPPORTED_Y:Ou},_u=ie,ju=ne.RegExp,ku=_u((function(){var e=ju(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),Tu=ie,Au=ne.RegExp,Mu=Tu((function(){var e=Au("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Ru=le,Lu=Se,Cu=xi,Nu=function(){var e=Eu(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Du=xu,Uu=Xa,$u=xn.get,Bu=ku,Fu=Mu,Wu=Lt("native-string-replace",String.prototype.replace),Gu=RegExp.prototype.exec,Ku=Gu,zu=Lu("".charAt),Hu=Lu("".indexOf),Vu=Lu("".replace),qu=Lu("".slice),Yu=(wu=/b*/g,Ru(Gu,bu=/a/,"a"),Ru(Gu,wu,"a"),0!==bu.lastIndex||0!==wu.lastIndex),Zu=Du.BROKEN_CARET,Ju=void 0!==/()??/.exec("")[1];(Yu||Ju||Zu||Bu||Fu)&&(Ku=function(e){var t,r,n,o,i,a,u,c=this,s=$u(c),l=Cu(e),f=s.raw;if(f)return f.lastIndex=c.lastIndex,t=Ru(Ku,f,l),c.lastIndex=f.lastIndex,t;var p=s.groups,d=Zu&&c.sticky,h=Ru(Nu,c),v=c.source,y=0,g=l;if(d&&(h=Vu(h,"y",""),-1===Hu(h,"g")&&(h+="g"),g=qu(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==zu(l,c.lastIndex-1))&&(v="(?: "+v+")",g=" "+g,y++),r=new RegExp("^(?:"+v+")",h)),Ju&&(r=new RegExp("^"+v+"$(?!\\s)",h)),Yu&&(n=c.lastIndex),o=Ru(Gu,d?r:c,g),d?o?(o.input=qu(o.input,y),o[0]=qu(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Yu&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Ju&&o&&o.length>1&&Ru(Wu,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=a=Uu(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Xu=Ku;Jo({target:"RegExp",proto:!0,forced:/./.exec!==Xu},{exec:Xu});var Qu=le,ec=Yn,tc=Xu,rc=ie,nc=er,oc=Kr,ic=nc("species"),ac=RegExp.prototype,uc=function(e,t,r,n){var o=nc(e),i=!rc((function(){var t={};return t[o]=function(){return 7},7!==""[e](t)})),a=i&&!rc((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[ic]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||r){var u=/./[o],c=t(o,""[e],(function(e,t,r,n,o){var a=t.exec;return a===tc||a===ac.exec?i&&!o?{done:!0,value:Qu(u,t,r,n)}:{done:!0,value:Qu(e,r,t,n)}:{done:!1}}));ec(String.prototype,e,c[0]),ec(ac,o,c[1])}n&&oc(ac[o],"sham",!0)},cc=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},sc=le,lc=Tr,fc=Be,pc=xe,dc=Xu,hc=TypeError,vc=function(e,t){var r=e.exec;if(fc(r)){var n=sc(r,e,t);return null!==n&&lc(n),n}if("RegExp"===pc(e))return sc(dc,e,t);throw new hc("RegExp#exec called on incompatible receiver")},yc=le,gc=Tr,mc=Me,bc=Ce,wc=cc,Ec=xi,Sc=bt,Pc=vc;uc("search",(function(e,t,r){return[function(t){var r=bc(this),n=mc(t)?void 0:Sc(t,e);return n?yc(n,t,r):new RegExp(t)[e](Ec(r))},function(e){var n=gc(this),o=Ec(e),i=r(t,n,o);if(i.done)return i.value;var a=n.lastIndex;wc(a,0)||(n.lastIndex=0);var u=Pc(n,o);return wc(n.lastIndex,a)||(n.lastIndex=a),null===u?-1:u.index}]}));const Oc=e=>{const t=window.location.search.substr(1).split("&"),r=`${e}=`,n=t.filter((e=>e.search(r)>=0));return n.length>0?n[0].substring(n[0].search(r)+r.length):""};let Ic="true"===Oc("unisphereVerbose")?"log":Oc("unisphereVerbose")||"";const xc=["log","debug"].includes(Ic)?Ic:"warn",_c=Oc("unisphereEnvironment")||"prod";let jc=localStorage.getItem("unisphereDevLoader")||null;const kc=Oc("unispherePresets")||null,Tc={logLevel:xc,loaderUrl:jc,verbose:Ic,environment:"dev"===_c?"dev":"prod",presets:kc?kc.split(",").map((e=>e.trim())):null},Ac=()=>Tc;let Mc=window.unisphere;function Rc(e,t,r){return e in Mc?{value:Mc[e],isNew:!1}:(null==t||t.debug(`${e} not found on 'window.unisphere', creating with default value`,{data:{defaultValue:r}}),Mc[e]=r,{value:r,isNew:!0})}"unisphere"in window||(Mc=window.unisphere={});const Lc={logToConsole:!0,logLevel:Ac().logLevel};class Cc{static createWorkspaceLogger(e){return new Cc(e)}kill(){this._killed=!0}constructor(e){this.workspaceName=e,this._killed=!1,this._settings=Object.assign({},Lc)}getLogger(e){return this._killed&&console.warn("Logger factory is killed, returning a new logger anyway"),new Nc(this.workspaceName,e,this.getSettings.bind(this))}getSettings(){return this._settings}updateSettings(e){this._settings=Object.assign(Object.assign({},this._settings),e)}}class Nc{constructor(e,t,r){this.workspaceName=e,this.runtime=t,this._getSettings=r;const n=function(){const{value:e}=Rc("loggers",null,{interceptors:[],logMessages:[]});return e}();this._globalLoggers=n}logMessage(e,t,r,n){const o={workspaceName:this.workspaceName,runtime:this.runtime,time:(new Date).toISOString(),message:t,data:r,error:n,level:e},i=this._getSettings();if(this._globalLoggers.logMessages.push(o),this._globalLoggers.interceptors.forEach((e=>{e(o)})),i.logToConsole&&this.shouldLog(e,i.logLevel)){const t=`${o.time} [Unisphere.${o.runtime}] ${o.message}`;switch(e){case"debug":console.debug(t,o.data);break;case"log":console.log(t,o.data);break;case"warn":console.warn(t,o.data);break;case"error":console.error(t,{data:o.data,error:o.error})}}}shouldLog(e,t){const r=["debug","log","warn","error"];return r.indexOf(e)>=r.indexOf(t)}log(e,t){this.logMessage("log",e,null==t?void 0:t.data)}debug(e,t){this.logMessage("debug",e,null==t?void 0:t.data)}warn(e,t){this.logMessage("warn",e,null==t?void 0:t.data)}error(e,t){this.logMessage("error",e,null==t?void 0:t.data,null==t?void 0:t.error)}}var Dc,Uc=xe,$c=Se,Bc=function(e){if("Function"===Uc(e))return $c(e)},Fc=We,Wc=xe,Gc=er("match"),Kc=TypeError,zc=function(e){if(function(e){var t;return Fc(e)&&(void 0!==(t=e[Gc])?!!t:"RegExp"===Wc(e))}(e))throw new Kc("The method doesn't accept regular expressions");return e},Hc=er("match"),Vc=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Hc]=!1,"/./"[e](t)}catch(e){}}return!1},qc=Jo,Yc=Bc,Zc=oe.f,Jc=ao,Xc=xi,Qc=zc,es=Ce,ts=Vc,rs=Yc("".slice),ns=Math.min,os=ts("startsWith");function is(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}c((n=n.apply(e,t||[])).next())}))}qc({target:"String",proto:!0,forced:!(!os&&(Dc=Zc(String.prototype,"startsWith"),Dc&&!Dc.writable)||os)},{startsWith:function(e){var t=Xc(es(this));Qc(e);var r=Jc(ns(arguments.length>1?arguments[1]:void 0,t.length)),n=Xc(e);return rs(t,r,r+n.length)===n}}),"function"==typeof SuppressedError&&SuppressedError;var as="process"===xe(ne.process),us=Ir.f,cs=Bt,ss=er("toStringTag"),ls=Kn,fs=Ir,ps=ze,ds=ae,hs=er("species"),vs=He,ys=TypeError,gs=Se,ms=ie,bs=Be,ws=Pi,Es=on,Ss=function(){},Ps=ze("Reflect","construct"),Os=/^\s*(?:class|function)\b/,Is=gs(Os.exec),xs=!Os.test(Ss),_s=function(e){if(!bs(e))return!1;try{return Ps(Ss,[],e),!0}catch(e){return!1}},js=function(e){if(!bs(e))return!1;switch(ws(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xs||!!Is(Os,Es(e))}catch(e){return!0}};js.sham=!0;var ks,Ts,As,Ms,Rs=!Ps||ms((function(){var e;return _s(_s.call)||!_s(Object)||!_s((function(){e=!0}))||e}))?js:_s,Ls=Rs,Cs=pt,Ns=TypeError,Ds=Tr,Us=Me,$s=er("species"),Bs=yt,Fs=ue,Ws=Bc(Bc.bind),Gs=function(e,t){return Bs(e),void 0===t?e:Fs?Ws(e,t):function(){return e.apply(t,arguments)}},Ks=Se([].slice),zs=TypeError,Hs=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ve),Vs=ne,qs=ri,Ys=Gs,Zs=Be,Js=Bt,Xs=ie,Qs=Ua,el=Ks,tl=dr,rl=Hs,nl=as,ol=Vs.setImmediate,il=Vs.clearImmediate,al=Vs.process,ul=Vs.Dispatch,cl=Vs.Function,sl=Vs.MessageChannel,ll=Vs.String,fl=0,pl={},dl="onreadystatechange";Xs((function(){ks=Vs.location}));var hl=function(e){if(Js(pl,e)){var t=pl[e];delete pl[e],t()}},vl=function(e){return function(){hl(e)}},yl=function(e){hl(e.data)},gl=function(e){Vs.postMessage(ll(e),ks.protocol+"//"+ks.host)};ol&&il||(ol=function(e){!function(e,t){if(e<t)throw new zs("Not enough arguments")}(arguments.length,1);var t=Zs(e)?e:cl(e),r=el(arguments,1);return pl[++fl]=function(){qs(t,void 0,r)},Ts(fl),fl},il=function(e){delete pl[e]},nl?Ts=function(e){al.nextTick(vl(e))}:ul&&ul.now?Ts=function(e){ul.now(vl(e))}:sl&&!rl?(Ms=(As=new sl).port2,As.port1.onmessage=yl,Ts=Ys(Ms.postMessage,Ms)):Vs.addEventListener&&Zs(Vs.postMessage)&&!Vs.importScripts&&ks&&"file:"!==ks.protocol&&!Xs(gl)?(Ts=gl,Vs.addEventListener("message",yl,!1)):Ts=dl in tl("script")?function(e){Qs.appendChild(tl("script"))[dl]=function(){Qs.removeChild(this),hl(e)}}:function(e){setTimeout(vl(e),0)});var ml={set:ol,clear:il},bl=ne,wl=ae,El=Object.getOwnPropertyDescriptor,Sl=function(){this.head=null,this.tail=null};Sl.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Pl,Ol,Il,xl,_l,jl=Sl,kl=/ipad|iphone|ipod/i.test(Ve)&&"undefined"!=typeof Pebble,Tl=/web0s(?!.*chrome)/i.test(Ve),Al=ne,Ml=Gs,Rl=ml.set,Ll=jl,Cl=Hs,Nl=kl,Dl=Tl,Ul=as,$l=Al.MutationObserver||Al.WebKitMutationObserver,Bl=Al.document,Fl=Al.process,Wl=Al.Promise,Gl=function(e){if(!wl)return bl[e];var t=El(bl,e);return t&&t.value}("queueMicrotask");if(!Gl){var Kl=new Ll,zl=function(){var e,t;for(Ul&&(e=Fl.domain)&&e.exit();t=Kl.get();)try{t()}catch(e){throw Kl.head&&Pl(),e}e&&e.enter()};Cl||Ul||Dl||!$l||!Bl?!Nl&&Wl&&Wl.resolve?((xl=Wl.resolve(void 0)).constructor=Wl,_l=Ml(xl.then,xl),Pl=function(){_l(zl)}):Ul?Pl=function(){Fl.nextTick(zl)}:(Rl=Ml(Rl,Al),Pl=function(){Rl(zl)}):(Ol=!0,Il=Bl.createTextNode(""),new $l(zl).observe(Il,{characterData:!0}),Pl=function(){Il.data=Ol=!Ol}),Gl=function(e){Kl.head||Pl(),Kl.add(e)}}var Hl=Gl,Vl=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},ql=ne.Promise,Yl="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Zl=!Yl&&!as&&"object"==typeof window&&"object"==typeof document,Jl=ne,Xl=ql,Ql=Be,ef=Go,tf=on,rf=er,nf=Zl,of=Yl,af=et;Xl&&Xl.prototype;var uf=rf("species"),cf=!1,sf=Ql(Jl.PromiseRejectionEvent),lf=ef("Promise",(function(){var e=tf(Xl),t=e!==String(Xl);if(!t&&66===af)return!0;if(!af||af<51||!/native code/.test(e)){var r=new Xl((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[uf]=n,!(cf=r.then((function(){}))instanceof n))return!0}return!t&&(nf||of)&&!sf})),ff={CONSTRUCTOR:lf,REJECTION_EVENT:sf,SUBCLASSING:cf},pf={},df=yt,hf=TypeError,vf=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new hf("Bad Promise constructor");t=e,r=n})),this.resolve=df(t),this.reject=df(r)};pf.f=function(e){return new vf(e)};var yf,gf,mf,bf,wf,Ef,Sf,Pf=Jo,Of=as,If=ne,xf=le,_f=Yn,jf=fi,kf=yt,Tf=Be,Af=We,Mf=function(e,t){var r,n=Ds(e).constructor;return void 0===n||Us(r=Ds(n)[$s])?t:function(e){if(Ls(e))return e;throw new Ns(Cs(e)+" is not a constructor")}(r)},Rf=ml.set,Lf=Hl,Cf=Vl,Nf=jl,Df=xn,Uf=ql,$f=pf,Bf="Promise",Ff=ff.CONSTRUCTOR,Wf=ff.REJECTION_EVENT,Gf=ff.SUBCLASSING,Kf=Df.getterFor(Bf),zf=Df.set,Hf=Uf&&Uf.prototype,Vf=Uf,qf=Hf,Yf=If.TypeError,Zf=If.document,Jf=If.process,Xf=$f.f,Qf=Xf,ep=!!(Zf&&Zf.createEvent&&If.dispatchEvent),tp="unhandledrejection",rp=function(e){var t;return!(!Af(e)||!Tf(t=e.then))&&t},np=function(e,t){var r,n,o,i=t.value,a=1===t.state,u=a?e.ok:e.fail,c=e.resolve,s=e.reject,l=e.domain;try{u?(a||(2===t.rejection&&cp(t),t.rejection=1),!0===u?r=i:(l&&l.enter(),r=u(i),l&&(l.exit(),o=!0)),r===e.promise?s(new Yf("Promise-chain cycle")):(n=rp(r))?xf(n,r,c,s):c(r)):s(i)}catch(e){l&&!o&&l.exit(),s(e)}},op=function(e,t){e.notified||(e.notified=!0,Lf((function(){for(var r,n=e.reactions;r=n.get();)np(r,e);e.notified=!1,t&&!e.rejection&&ap(e)})))},ip=function(e,t,r){var n,o;ep?((n=Zf.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),If.dispatchEvent(n)):n={promise:t,reason:r},!Wf&&(o=If["on"+e])?o(n):e===tp&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",r)},ap=function(e){xf(Rf,If,(function(){var t,r=e.facade,n=e.value;if(up(e)&&(t=Cf((function(){Of?Jf.emit("unhandledRejection",n,r):ip(tp,r,n)})),e.rejection=Of||up(e)?2:1,t.error))throw t.value}))},up=function(e){return 1!==e.rejection&&!e.parent},cp=function(e){xf(Rf,If,(function(){var t=e.facade;Of?Jf.emit("rejectionHandled",t):ip("rejectionhandled",t,e.value)}))},sp=function(e,t,r){return function(n){e(t,n,r)}},lp=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,op(e,!0))},fp=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new Yf("Promise can't be resolved itself");var n=rp(t);n?Lf((function(){var r={done:!1};try{xf(n,t,sp(fp,r,e),sp(lp,r,e))}catch(t){lp(r,t,e)}})):(e.value=t,e.state=1,op(e,!1))}catch(t){lp({done:!1},t,e)}}};if(Ff&&(qf=(Vf=function(e){(function(e,t){if(vs(t,e))return e;throw new ys("Incorrect invocation")})(this,qf),kf(e),xf(yf,this);var t=Kf(this);try{e(sp(fp,t),sp(lp,t))}catch(e){lp(t,e)}}).prototype,(yf=function(e){zf(this,{type:Bf,done:!1,notified:!1,parent:!1,reactions:new Nf,rejection:!1,state:0,value:void 0})}).prototype=_f(qf,"then",(function(e,t){var r=Kf(this),n=Xf(Mf(this,Vf));return r.parent=!0,n.ok=!Tf(e)||e,n.fail=Tf(t)&&t,n.domain=Of?Jf.domain:void 0,0===r.state?r.reactions.add(n):Lf((function(){np(n,r)})),n.promise})),gf=function(){var e=new yf,t=Kf(e);this.promise=e,this.resolve=sp(fp,t),this.reject=sp(lp,t)},$f.f=Xf=function(e){return e===Vf||void 0===e?new gf(e):Qf(e)},Tf(Uf)&&Hf!==Object.prototype)){mf=Hf.then,Gf||_f(Hf,"then",(function(e,t){var r=this;return new Vf((function(e,t){xf(mf,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete Hf.constructor}catch(e){}jf&&jf(Hf,qf)}Pf({global:!0,constructor:!0,wrap:!0,forced:Ff},{Promise:Vf}),Ef=Bf,Sf=!1,(wf=Vf)&&!Sf&&(wf=wf.prototype),wf&&!cs(wf,ss)&&us(wf,ss,{configurable:!0,value:Ef}),bf=ps(Bf),ds&&bf&&!bf[hs]&&function(e,t,r){r.get&&ls(r.get,t,{getter:!0}),r.set&&ls(r.set,t,{setter:!0}),fs.f(e,t,r)}(bf,hs,{configurable:!0,get:function(){return this}});var pp={},dp=pp,hp=er("iterator"),vp=Array.prototype,yp=Pi,gp=bt,mp=Me,bp=pp,wp=er("iterator"),Ep=function(e){if(!mp(e))return gp(e,wp)||gp(e,"@@iterator")||bp[yp(e)]},Sp=le,Pp=yt,Op=Tr,Ip=pt,xp=Ep,_p=TypeError,jp=le,kp=Tr,Tp=bt,Ap=Gs,Mp=le,Rp=Tr,Lp=pt,Cp=co,Np=He,Dp=Ep,Up=function(e,t,r){var n,o;kp(e);try{if(!(n=Tp(e,"return"))){if("throw"===t)throw r;return r}n=jp(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return kp(n),r},$p=TypeError,Bp=function(e,t){this.stopped=e,this.result=t},Fp=Bp.prototype,Wp=function(e,t,r){var n,o,i,a,u,c,s,l,f=r&&r.that,p=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=Ap(t,f),g=function(e){return n&&Up(n,"normal",e),new Bp(!0,e)},m=function(e){return p?(Rp(e),v?y(e[0],e[1],g):y(e[0],e[1])):v?y(e,g):y(e)};if(d)n=e.iterator;else if(h)n=e;else{if(!(o=Dp(e)))throw new $p(Lp(e)+" is not iterable");if(void 0!==(l=o)&&(dp.Array===l||vp[hp]===l)){for(i=0,a=Cp(e);a>i;i++)if((u=m(e[i]))&&Np(Fp,u))return u;return new Bp(!1)}n=function(e,t){var r=arguments.length<2?xp(e):t;if(Pp(r))return Op(Sp(r,e));throw new _p(Ip(e)+" is not iterable")}(e,o)}for(c=d?e.next:n.next;!(s=Mp(c,n)).done;){try{u=m(s.value)}catch(e){Up(n,"throw",e)}if("object"==typeof u&&u&&Np(Fp,u))return u}return new Bp(!1)},Gp=er("iterator"),Kp=!1;try{var zp=0,Hp={next:function(){return{done:!!zp++}},return:function(){Kp=!0}};Hp[Gp]=function(){return this},Array.from(Hp,(function(){throw 2}))}catch(e){}var Vp=ql,qp=ff.CONSTRUCTOR||!function(e,t){try{if(!t&&!Kp)return!1}catch(e){return!1}var r=!1;try{var n={};n[Gp]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}((function(e){Vp.all(e).then(void 0,(function(){}))})),Yp=le,Zp=yt,Jp=pf,Xp=Vl,Qp=Wp;Jo({target:"Promise",stat:!0,forced:qp},{all:function(e){var t=this,r=Jp.f(t),n=r.resolve,o=r.reject,i=Xp((function(){var r=Zp(t.resolve),i=[],a=0,u=1;Qp(e,(function(e){var c=a++,s=!1;u++,Yp(r,t,e).then((function(e){s||(s=!0,i[c]=e,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise}});var ed=Jo,td=ff.CONSTRUCTOR,rd=ql,nd=ze,od=Be,id=Yn,ad=rd&&rd.prototype;if(ed({target:"Promise",proto:!0,forced:td,real:!0},{catch:function(e){return this.then(void 0,e)}}),od(rd)){var ud=nd("Promise").prototype.catch;ad.catch!==ud&&id(ad,"catch",ud,{unsafe:!0})}var cd=le,sd=yt,ld=pf,fd=Vl,pd=Wp;Jo({target:"Promise",stat:!0,forced:qp},{race:function(e){var t=this,r=ld.f(t),n=r.reject,o=fd((function(){var o=sd(t.resolve);pd(e,(function(e){cd(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var dd=pf;Jo({target:"Promise",stat:!0,forced:ff.CONSTRUCTOR},{reject:function(e){var t=dd.f(this);return(0,t.reject)(e),t.promise}});var hd=Tr,vd=We,yd=pf,gd=Jo,md=ff.CONSTRUCTOR;ze("Promise"),gd({target:"Promise",stat:!0,forced:md},{resolve:function(e){return function(e,t){if(hd(e),vd(t)&&t.constructor===e)return t;var r=yd.f(e);return(0,r.resolve)(t),r.promise}(this,e)}});const bd=Cc.createWorkspaceLogger("window").getLogger("fetchers"),{value:{factoriesByOwner:wd}}=Rc("factoriesByOwner",bd,{factoriesByOwner:{}});function Ed(e){return is(this,arguments,void 0,(function*({owner:e,url:t}){let r=wd[e];r||(bd.log(`no factories found for ${e}, creating new list`),r=[],wd[e]=r);const n=r.find((e=>e.url===t));if(null==n?void 0:n.factoryModule)return bd.log(`using cached factory module for ${t}`),{factoryModule:n.factoryModule,error:null};const o=r.find((e=>e.url===t));if(o)return bd.log(`a request to fetch factory already in progress for ${t}, waiting for it to finish`),new Promise(((e,t)=>{o.onFetched.push(e),o.onError.push(t)}));bd.log(`fetching factory module for ${t}`);const i={url:t,factoryModule:null,error:null,onFetched:[],onError:[]};r.push(i);try{const e=yield import(t);bd.log(`fetched factory module for ${t}, caching it`),i.factoryModule=e,i.onFetched&&(bd.log(`calling onFetched callbacks for ${t} (${i.onFetched.length} queued)`),i.onFetched.forEach((r=>{try{r(e)}catch(e){bd.error(`error calling onFetched callback for ${t}`,{error:e})}}))),i.onFetched=[],i.onError=[]}catch(e){bd.log(`failed to fetch factory module for ${t}, removing from list`),i.onError&&(bd.log(`calling onError callbacks for ${t} (${i.onError.length} queued)`),i.onError.forEach((r=>{try{r(e)}catch(e){bd.error(`error calling onError callback for ${t}`,{error:e})}}))),i.onError=[],i.onFetched=[],r.splice(r.indexOf(i),1)}return{factoryModule:i.factoryModule,error:i.error}}))}const Sd=Ac(),Pd=e=>is(void 0,void 0,void 0,(function*(){const t=Cc.createWorkspaceLogger(e.workspaceName||"").getLogger("fetch-loader");let r="",n="";if(Sd.loaderUrl?(t.log(`using custom loader url from query params '${Sd.loaderUrl}'`),n=Sd.loaderUrl):e.devLoaderUrl&&(t.log(`using custom loader url from options '${e.devLoaderUrl}'`),n=e.devLoaderUrl),n){t.log(`verifying custom loader url '${n}' url against environment runtime json. fetching runtime json...`);const o=yield((e,t)=>is(void 0,void 0,void 0,(function*(){let r,n=`${e}/runtime.json`;try{t.log(`loading runtime versions for env from '${n}'`),r=yield fetch(n).then((e=>e.json()))}catch(e){throw t.error(`error loading runtime versions for env from '${n}'`,{error:e}),new Error(`failed to load runtime versions for env from '${n}'`)}if(!r||!("domains"in r))throw new Error("invalid runtime json, 'domains' is missing in the runtime json");return r.domains})))(e.serverUrl,t),i=n.startsWith(e.serverUrl),a=o.some((e=>n.startsWith(e)));if(t.log("ensuring custom loader url is in environment artifacts or from an allowed domain",{data:{customLoaderUrl:n,serverUrl:e.serverUrl,isInEnvironmentArtifacts:i,isInAllowedDomains:a}}),!i&&!a)throw new Error(`the custom loader url '${n}' is not in the environment artifacts or from an allowed domain`);t.log(`using custom loader url '${n}'`),r=n}else t.log("using environment loader"),r=`${e.serverUrl}/loader/index.esm.js`;t.log("fetching environment unisphere loader",{data:{environmentLoaderUrl:r,options:e}});const{factoryModule:{loader:o}}=yield Ed({owner:"runtime-js",url:r});if(!o)throw new Error(`failed to load dev loader from '${r}'`);return t.log("executing environment unisphere loader"),o(Object.assign({},e))}));var Od=Jo,Id=Bc,xd=oe.f,_d=ao,jd=xi,kd=zc,Td=Ce,Ad=Vc,Md=Id("".slice),Rd=Math.min,Ld=Ad("endsWith"),Cd=!Ld&&!!function(){var e=xd(String.prototype,"endsWith");return e&&!e.writable}();Od({target:"String",proto:!0,forced:!Cd&&!Ld},{endsWith:function(e){var t=jd(Td(this));kd(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,o=void 0===r?n:Rd(_d(r),n),i=jd(e);return Md(t,o-i.length,o)===i}});var Nd=Se,Dd=eo,Ud=xi,$d=Ce,Bd=Nd("".charAt),Fd=Nd("".charCodeAt),Wd=Nd("".slice),Gd=function(e){return function(t,r){var n,o,i=Ud($d(t)),a=Dd(r),u=i.length;return a<0||a>=u?e?"":void 0:(n=Fd(i,a))<55296||n>56319||a+1===u||(o=Fd(i,a+1))<56320||o>57343?e?Bd(i,a):n:e?Wd(i,a,a+2):o-56320+(n-55296<<10)+65536}},Kd=(Gd(!1),Gd(!0)),zd=Se,Hd=Dt,Vd=Math.floor,qd=zd("".charAt),Yd=zd("".replace),Zd=zd("".slice),Jd=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Xd=/\$([$&'`]|\d{1,2})/g,Qd=ri,eh=le,th=Se,rh=uc,nh=ie,oh=Tr,ih=Be,ah=Me,uh=eo,ch=ao,sh=xi,lh=Ce,fh=function(e,t,r){return t+(r?Kd(e,t).length:1)},ph=bt,dh=function(e,t,r,n,o,i){var a=r+e.length,u=n.length,c=Xd;return void 0!==o&&(o=Hd(o),c=Jd),Yd(i,c,(function(i,c){var s;switch(qd(c,0)){case"$":return"$";case"&":return e;case"`":return Zd(t,0,r);case"'":return Zd(t,a);case"<":s=o[Zd(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>u){var f=Vd(l/10);return 0===f?i:f<=u?void 0===n[f-1]?qd(c,1):n[f-1]+qd(c,1):i}s=n[l-1]}return void 0===s?"":s}))},hh=vc,vh=er("replace"),yh=Math.max,gh=Math.min,mh=th([].concat),bh=th([].push),wh=th("".indexOf),Eh=th("".slice),Sh="$0"==="a".replace(/./,"$0"),Ph=!!/./[vh]&&""===/./[vh]("a","$0");function Oh(e){return is(this,void 0,void 0,(function*(){return(yield function(){const e=window;return new Promise((t=>{var r,n;if(null===(n=null===(r=e.unisphere)||void 0===r?void 0:r.instancesManager)||void 0===n?void 0:n.get)t(e.unisphere.instancesManager.get);else{const r=()=>{document.removeEventListener("unisphere-ready",r),t(e.unisphere.instancesManager.get)};document.addEventListener("unisphere-ready",r)}}))}())(e)}))}function Ih(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ih=function(){return!!e})()}rh("replace",(function(e,t,r){var n=Ph?"$":"$0";return[function(e,r){var n=lh(this),o=ah(e)?void 0:ph(e,vh);return o?eh(o,e,n,r):eh(t,sh(n),e,r)},function(e,o){var i=oh(this),a=sh(e);if("string"==typeof o&&-1===wh(o,n)&&-1===wh(o,"$<")){var u=r(t,i,a,o);if(u.done)return u.value}var c=ih(o);c||(o=sh(o));var s,l=i.global;l&&(s=i.unicode,i.lastIndex=0);for(var f,p=[];null!==(f=hh(i,a))&&(bh(p,f),l);)""===sh(f[0])&&(i.lastIndex=fh(a,ch(i.lastIndex),s));for(var d,h="",v=0,y=0;y<p.length;y++){for(var g,m=sh((f=p[y])[0]),b=yh(gh(uh(f.index),a.length),0),w=[],E=1;E<f.length;E++)bh(w,void 0===(d=f[E])?d:String(d));var S=f.groups;if(c){var P=mh([m],w,b,a);void 0!==S&&bh(P,S),g=sh(Qd(o,void 0,P))}else g=dh(m,a,b,w,S,o);b>=v&&(h+=Eh(a,v,b)+g,v=b+m.length)}return h+Eh(a,v)}]}),!!nh((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Sh||Ph),Ac();var xh=function(e){function t(e,r,n){var o,a,u,c;return i(this,t),a=this,c=[e,r,n],u=f(u=t),h(o=l(a,Ih()?Reflect.construct(u,c||[],f(a).constructor):u.apply(a,c)),"isReady",!1),h(o,"workspaceName",""),h(o,"shouldCreateWorkspace",!1),o.unispherePluginManager=new ee(r,o.eventManager,o.logger),o.player.config.provider.unisphereLoaderUrl&&"string"==typeof o.config.workspaceName?o.workspaceName=o.config.workspaceName:(o.workspaceName=W("kaltura_player_workspace_"),o.shouldCreateWorkspace=!0),o}return d(t,e),s(t,[{key:"getWorkspace",value:(r=o(y().mark((function e(){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.shouldCreateWorkspace){e.next=2;break}return e.abrupt("return",Pd({serverUrl:this.player.config.provider.unisphereLoaderUrl,workspaceName:this.workspaceName,ui:{theme:"light",language:"en"}}));case 2:return e.abrupt("return",Oh(this.config.workspaceName));case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"loadMedia",value:function(){var e=this;this.isReady?(this.unispherePluginManager.updateSessionData(),this.unispherePluginManager.loadWidgets(this.config.widgets)):this.getWorkspace().then((function(t){e.unispherePluginManager.init(t,e.config.widgets),e.unispherePluginManager.updateSessionData(),e.isReady=!0})).catch((function(){e.logger.warn("Failed to load unisphere workspace",e.workspaceName)}))}},{key:"reset",value:function(){this.unispherePluginManager.reset()}},{key:"destroy",value:function(){this.eventManager.destroy(),this.unispherePluginManager.destroy()}}],[{key:"isValid",value:function(){return!0}}]);var r}(e.BasePlugin);h(xh,"defaultConfig",{widgets:[]}),(0,e.registerPlugin)("unisphere",xh);var _h=function(e){return e.UNISPHERE_CHAPTERS_ADDED="unisphere_chapters_added",e}({})})(),n})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("KalturaPlayer",[],t):"object"==typeof exports?exports.KalturaPlayer=t():(e.KalturaPlayer=e.KalturaPlayer||{},e.KalturaPlayer.plugins=e.KalturaPlayer.plugins||{},e.KalturaPlayer.plugins.unisphere=t())}(self,(()=>(()=>{var e={51:(e,t,r)=>{var n=r(564).default;function o(){"use strict";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(t){p=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof w?t:w,i=Object.create(o.prototype),a=new R(n||[]);return u(i,"_invoke",{value:k(e,r,a)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=d;var v="suspendedStart",y="suspendedYield",g="executing",m="completed",b={};function w(){}function E(){}function S(){}var P={};p(P,s,(function(){return this}));var O=Object.getPrototypeOf,I=O&&O(O(L([])));I&&I!==i&&a.call(I,s)&&(P=I);var x=S.prototype=w.prototype=Object.create(P);function _(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,u,c){var s=h(e[o],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&a.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){l.value=e,u(l)}),(function(e){return r("throw",e,u,c)}))}c(s.arg)}var o;u(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(e,r,n){var o=v;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=T(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?m:y,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function T(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function A(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 M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+" is not iterable")}return E.prototype=S,u(x,"constructor",{value:S,configurable:!0}),u(S,"constructor",{value:E,configurable:!0}),E.displayName=p(S,f,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,p(e,f,"GeneratorFunction")),e.prototype=Object.create(x),e},r.awrap=function(e){return{__await:e}},_(j.prototype),p(j.prototype,l,(function(){return this})),r.AsyncIterator=j,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new j(d(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(x),p(x,f,"Generator"),p(x,s,(function(){return this})),p(x,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=L,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},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 r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(i)},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),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),M(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;M(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},564:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},790:(e,t,r)=>{var n=r(51)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{PlayerEvent:()=>w});const e=KalturaPlayer;function t(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function o(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,c,"next",e)}function c(e){t(a,o,i,u,c,"throw",e)}u(void 0)}))}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function s(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function h(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var v=r(790),y=r.n(v);const g=KalturaPlayer.ui.preact,m=KalturaPlayer.core;var b=function(e){return e.UPPER_BAR_ICON_SHOW="unisphere.event.player.upper-bar-icon.show",e.UPPER_BAR_ICON_CLICK="unisphere.event.player.upper-bar-icon.click",e.SIDE_PANEL_OPEN="unisphere.event.player.side-panel.open",e.SIDE_PANEL_CLOSE="unisphere.event.player.side-panel.close",e.SIDE_PANEL_TOGGLE="unisphere.event.player.side-panel.toggle",e.SET_VALUE_CURRENT_TIME="unisphere.event.player.set-value.current-time",e.CHAPTERS_ADD="unisphere.event.player.chapters.add",e.PLAYER_RESIZE="unisphere.event.player.resize",e.DISPATCH_EVENT="unisphere.event.player.dispatch-event",e.SIDE_PANEL_CLOSED="unisphere.event.player.side-panel.closed",e.SIDE_PANEL_OPENED="unisphere.event.player.side-panel.opened",e}({}),w=function(e){return e.UNISPHERE_CHAPTERS_ADDED="unisphere_chapters_added",e}({}),E=function(e){return e.SELECTED_CHAPTER="selectedChapter",e.CURRENT_TIME="currentTime",e.IS_PAUSED="isPaused",e.PLAYER_SESSION="player-session",e.IS_SMALL_SIZE="isSmallSize",e}(E||{}),S=function(e){var t;return(0,g.h)("div",{style:null!==(t=e.style)&&void 0!==t?t:{},id:e.id})},P=e.ui.components,O=P.Tooltip,I=P.Icon,x=function(t){var r=t.id,n=t.label,o=t.iconPath;return(0,g.h)(O,{label:n,type:"bottom"},(0,g.h)("button",{type:"button","data-testid":"playlist_pluginButton","aria-label":n,className:e.ui.style.upperBarIcon},(0,g.h)(I,{id:"unisphere-icon-".concat(r),height:32,width:32,viewBox:"0 0 32 32",path:o})))},_=function(){function e(){i(this,e)}return s(e,null,[{key:"set",value:function(t){e.workspaceInstance=t}},{key:"get",value:function(){return e.workspaceInstance}},{key:"destroy",value:function(){try{this.workspaceInstance.kill()}catch(e){}e.workspaceInstance=null}}])}();function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}h(_,"workspaceInstance",null);var A=function(){function e(){i(this,e)}return s(e,null,[{key:"addToUnsubscribeMap",value:function(t){return e.unsubscribeMap.set(e.sequence,t),++e.sequence,e.sequence}},{key:"unsubscribeAll",value:function(){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return T(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.unsubscribeMap);try{for(r.s();!(t=r.n()).done;){var n=k(t.value,2),o=n[0];(0,n[1])(),e.unsubscribeMap.delete(o)}}catch(e){r.e(e)}finally{r.f()}}},{key:"unsubscribe",value:function(t){var r=e.unsubscribeMap.get(t);r&&(r(),e.unsubscribeMap.delete(t))}}])}();function M(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(M=function(){return!!e})()}h(A,"unsubscribeMap",new Map),h(A,"sequence",-1);var R,L=function(e){function t(){return i(this,t),e=this,n=arguments,r=f(r=t),l(e,M()?Reflect.construct(r,n||[],f(e).constructor):r.apply(e,n));var e,r,n}return d(t,e),s(t)}(A);function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}h(L,"get",function(){var e=o(y().mark((function e(t){var r,n,o,i,a;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.widgetId,n=t.context,o=t.settings,i=_.get(),e.prev=2,e.next=5,null==i?void 0:i.loadRuntime(r,n,o||{});case 5:return a=e.sent,e.abrupt("return",a?null==a?void 0:a.runtime:null);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",Promise.reject(e.t0));case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}());var N,D="unisphere.service.pub-sub",U=function(e){function t(){return i(this,t),e=this,n=arguments,r=f(r=t),l(e,C()?Reflect.construct(r,n||[],f(e).constructor):r.apply(e,n));var e,r,n}return d(t,e),s(t,null,[{key:"destroy",value:function(){t.unsubscribeAll()}}])}(A);function $(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($=function(){return!!e})()}R=U,h(U,"subscribe",(function(e,t){var r=_.get(),n=null==r?void 0:r.getService(D);if(n){var o=n.subscribe(e,t);return R.addToUnsubscribeMap(o)}return-1})),h(U,"emit",(function(e,t){var r=_.get(),n=null==r?void 0:r.getService(D);null==n||n.emit({id:e,version:"1.0.0",payload:t})}));var B="player",F="unisphere.service.storage",W=function(e){function t(){return i(this,t),e=this,n=arguments,r=f(r=t),l(e,$()?Reflect.construct(r,n||[],f(e).constructor):r.apply(e,n));var e,r,n}return d(t,e),s(t,null,[{key:"destroy",value:function(){t.unsubscribeAll()}}])}(A);function G(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=0;t<5;++t)e+=m.Utils.Generator.uniqueId();return e}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}N=W,h(W,"update",(function(e,t){var r=_.get(),n=null==r?void 0:r.getService(F);null==n||n.update(B,e,t)})),h(W,"get",(function(e){var t=_.get(),r=null==t?void 0:t.getService(F);return r?r.get(B,e):null})),h(W,"subscribe",(function(e,t){var r=_.get(),n=null==r?void 0:r.getService(F);if(n){var o=n.subscribe(t,{namespace:B,property:e,emitLastValue:!0});N.addToUnsubscribeMap(o)}}));var z=function(){return s((function e(){i(this,e),h(this,"_disposers",new Map)}),[{key:"generateId",value:function(e){return G("".concat(e.containerType,"_container_"))}},{key:"getSidePanelsManager",value:function(e){return e.getService("sidePanelsManager")}},{key:"addDisposer",value:function(e,t){this._disposers.set(e,t)}},{key:"dispose",value:function(e){var t=this._disposers.get(e);t&&(t(),this._disposers.delete(e))}},{key:"destroy",value:function(){var e,t=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return K(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this._disposers);try{for(t.s();!(e=t.n()).done;){var r=k(e.value,1)[0];this.dispose(r)}}catch(e){t.e(e)}finally{t.f()}}}])}();function H(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(H=function(){return!!e})()}var V=function(e){function t(){return i(this,t),e=this,n=arguments,r=f(r=t),l(e,H()?Reflect.construct(r,n||[],f(e).constructor):r.apply(e,n));var e,r,n}return d(t,e),s(t,[{key:"createContainer",value:function(e,t){var r,n=this,o=this.generateId(t),i=t.unisphereArea,a=t.position,u=t.expandMode,c=t.presets,s=null===(r=this.getSidePanelsManager(e))||void 0===r?void 0:r.add({label:o,panelComponent:function(){return(0,g.h)(S,{style:{height:"100%"},id:o})},presets:c,position:a,expandMode:u});return"number"==typeof s?(this.addDisposer(o,(function(){var t;null===(t=n.getSidePanelsManager(e))||void 0===t||t.remove(s)})),W.update(i,{upperBarIcon:{panelId:s}}),o):null}}])}(z);function q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(q=function(){return!!e})()}var Y=function(e){function t(){return i(this,t),e=this,n=arguments,r=f(r=t),l(e,q()?Reflect.construct(r,n||[],f(e).constructor):r.apply(e,n));var e,r,n}return d(t,e),s(t,[{key:"createContainer",value:function(e,t){var r=this.generateId(t),n=t.playerArea,o=t.presets,i=e.ui.addComponent({label:r,presets:o,area:n,get:function(){return(0,g.h)(S,{style:{width:"inherit"},id:r})}});return this.addDisposer(r,i),r}}])}(z);function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var J=function(){return s((function e(t){i(this,e),h(this,"containerProducers",new Map([["sidepanel",new V],["simple",new Y]])),this.player=t}),[{key:"createContainer",value:function(e){var t=this.containerProducers.get(e.containerType);return t?t.createContainer(this.player,e):null}},{key:"destroy",value:function(){var e,t=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Z(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this.containerProducers);try{for(t.s();!(e=t.n()).done;){var r,n=k(e.value,1)[0];null===(r=this.containerProducers.get(n))||void 0===r||r.destroy()}}catch(e){t.e(e)}finally{t.f()}}}])}();function X(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Q(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Q(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var ee=e.ui.reducers.shell,te=function(){return s((function e(t,r,n){i(this,e),h(this,"iconIds",new Map),h(this,"panelIds",new Set),h(this,"persistentIconIds",new Map),this.player=t,this.eventManager=r,this.logger=n,this.containerManager=new J(t),this.currentIsSmallSize=void 0}),[{key:"upperBarManager",get:function(){return this.player.getService("upperBarManager")}},{key:"sidePanelsManager",get:function(){return this.player.getService("sidePanelsManager")}},{key:"timelineManager",get:function(){return this.player.getService("timeline")}},{key:"cuePointManager",get:function(){return this.player.getService("kalturaCuepoints")}},{key:"addEventHandlers",value:function(){var t=this,r=e.ui.redux.useStore();this.unsubscribeStore=r.subscribe((function(){var e=r.getState().shell.isSmallSize;e!==t.currentIsSmallSize&&(t.currentIsSmallSize=e,W.update(E.IS_SMALL_SIZE,e))})),U.subscribe(b.UPPER_BAR_ICON_SHOW,(function(e){var r=e.payload,n=r.id,o=r.label,i=r.order,a=r.iconPath,u=r.panelId,c=r.isPersistent;t.addUpperBarIcon(n,o,i,a,u,c)})),U.subscribe(b.SIDE_PANEL_OPEN,(function(e){var r,n=e.payload,o=n.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.activateItem(o),U.emit(b.SIDE_PANEL_OPENED,n)})),U.subscribe(b.SIDE_PANEL_CLOSE,(function(e){var r,n=e.payload,o=n.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.deactivateItem(o),U.emit(b.SIDE_PANEL_CLOSED,n)})),U.subscribe(b.SIDE_PANEL_TOGGLE,(function(e){var r,n,o,i=e.payload,a=i.panelId;null!==(r=t.sidePanelsManager)&&void 0!==r&&r.isItemActive(a)?(null===(n=t.sidePanelsManager)||void 0===n||n.deactivateItem(a),U.emit(b.SIDE_PANEL_CLOSED,i)):(null===(o=t.sidePanelsManager)||void 0===o||o.activateItem(a),U.emit(b.SIDE_PANEL_OPENED,i))})),U.subscribe(b.SET_VALUE_CURRENT_TIME,(function(e){var r=e.payload.currentTime;r>=0&&(t.player.currentTime=r)})),U.subscribe(b.CHAPTERS_ADD,(function(e){var r=e.payload,n=r.chapters;if(n&&n.length){var o;null===(o=t.timelineManager)||void 0===o||o.disableChapters();for(var i=0;i<n.length;++i){var a,u=n[i],c=u.title,s=+u.time;null===(a=t.timelineManager)||void 0===a||a.addKalturaCuePoint(s,"SummaryAndChapters",i,c,{onClick:function(e){var t=e.cuePoint;W.update(E.SELECTED_CHAPTER,t.id)}})}t.player.dispatchEvent(new m.FakeEvent(w.UNISPHERE_CHAPTERS_ADDED,r))}})),U.subscribe(b.DISPATCH_EVENT,(function(e){var r=e.payload,n=r.eventName,o=r.data;t.player.dispatchEvent(new m.FakeEvent(n,o))})),this.eventManager.listen(this.player,e.core.EventType.TIME_UPDATE,(function(){W.update(E.CURRENT_TIME,"".concat(t.player.currentTime))})),this.eventManager.listen(this.player,e.ui.EventType.GUI_RESIZE,(function(){U.emit(b.PLAYER_RESIZE,{}),setTimeout((function(){U.emit(b.PLAYER_RESIZE,{})}),1e3)})),this.eventManager.listen(this.player,e.core.EventType.PAUSE,(function(){W.update(E.IS_PAUSED,!0)})),this.eventManager.listen(this.player,e.core.EventType.PLAY,(function(){W.update(E.IS_PAUSED,!1)}))}},{key:"addUpperBarIcon",value:function(e,t,r,n,o,i){var a;if(!this.iconIds.has(e)&&!this.persistentIconIds.has(e)){this.panelIds.add(o);var u=null===(a=this.upperBarManager)||void 0===a?void 0:a.add({displayName:t,ariaLabel:t,order:r,component:function(){return(0,g.h)(x,{id:e,label:t,iconPath:n})},svgIcon:{path:n},onClick:function(){U.emit(b.UPPER_BAR_ICON_CLICK,{id:e,panelId:o})}});i?this.persistentIconIds.set(e,u):this.iconIds.set(e,u)}}},{key:"isVideoClipped",value:function(){var e=this.player.config.sources,t=e.seekFrom,r=e.clipTo,n=e.duration;return"number"==typeof t&&t>0||"number"==typeof r&&r<n}},{key:"shouldLoadWidget",value:function(e){var t=e.widgetId,r=e.context;return!(t.includes("video-summary")&&"kaltura-player-list"===r&&this.isVideoClipped())}},{key:"loadWidgets",value:function(e){var t,r=this,n=X(e);try{var o=function(){var e=t.value,n=e.widgetId,o=e.context;if(!n||!o||!r.shouldLoadWidget(e))return 1;var i,a=X(e.containers);try{var u=function(){var t=i.value;if(!t.unisphereArea)return 1;var a=r.containerManager.createContainer(t);a&&L.get(e).then((function(e){null==e||e.assignAreaByName(t.unisphereArea,a)})).catch((function(e){r.logger.warn("Failed to load unisphere widget ".concat(n," with context ").concat(o," "),e)}))};for(a.s();!(i=a.n()).done;)u()}catch(e){a.e(e)}finally{a.f()}};for(n.s();!(t=n.n()).done;)o()}catch(e){n.e(e)}finally{n.f()}}},{key:"init",value:function(e,t){_.set(e),this.addEventHandlers(),this.loadWidgets(t)}},{key:"updateSessionData",value:function(){var e,t;W.update(E.PLAYER_SESSION,{entryId:this.player.sources.id,ks:null===(e=this.player.config.session)||void 0===e?void 0:e.ks,entryName:null===(t=this.player.sources.metadata)||void 0===t?void 0:t.name})}},{key:"reset",value:function(){var e,t=X(this.panelIds);try{for(t.s();!(e=t.n()).done;){var r,n=e.value;if(null!==(r=this.sidePanelsManager)&&void 0!==r&&r.isItemActive(n)){this.sidePanelsManager.deactivateItem(n);break}}}catch(e){t.e(e)}finally{t.f()}var o,i=X(this.iconIds.values());try{for(i.s();!(o=i.n()).done;){var a,u=o.value;null===(a=this.upperBarManager)||void 0===a||a.remove(u)}}catch(e){i.e(e)}finally{i.f()}this.iconIds.clear(),this.containerManager.destroy(),this.player.ui.store.dispatch(ee.actions.updateTimeDisplayIsMinimized(!1))}},{key:"destroy",value:function(){this.reset(),this.containerManager.destroy();var e,t=X(this.persistentIconIds.values());try{for(t.s();!(e=t.n()).done;){var r,n=e.value;null===(r=this.upperBarManager)||void 0===r||r.remove(n)}}catch(e){t.e(e)}finally{t.f()}U.destroy(),W.destroy(),_.destroy(),this.unsubscribeStore&&this.unsubscribeStore()}}])}(),re="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ne=function(e){return e&&e.Math===Math&&e},oe=ne("object"==typeof globalThis&&globalThis)||ne("object"==typeof window&&window)||ne("object"==typeof self&&self)||ne("object"==typeof re&&re)||ne("object"==typeof re&&re)||function(){return this}()||Function("return this")(),ie={},ae=function(e){try{return!!e()}catch(e){return!0}},ue=!ae((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),ce=!ae((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),se=ce,le=Function.prototype.call,fe=se?le.bind(le):function(){return le.apply(le,arguments)},pe={},de={}.propertyIsEnumerable,he=Object.getOwnPropertyDescriptor,ve=he&&!de.call({1:2},1);pe.f=ve?function(e){var t=he(this,e);return!!t&&t.enumerable}:de;var ye,ge,me=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},be=ce,we=Function.prototype,Ee=we.call,Se=be&&we.bind.bind(Ee,Ee),Pe=be?Se:function(e){return function(){return Ee.apply(e,arguments)}},Oe=Pe,Ie=Oe({}.toString),xe=Oe("".slice),_e=function(e){return xe(Ie(e),8,-1)},je=ae,ke=_e,Te=Object,Ae=Pe("".split),Me=je((function(){return!Te("z").propertyIsEnumerable(0)}))?function(e){return"String"===ke(e)?Ae(e,""):Te(e)}:Te,Re=function(e){return null==e},Le=Re,Ce=TypeError,Ne=function(e){if(Le(e))throw new Ce("Can't call method on "+e);return e},De=Me,Ue=Ne,$e=function(e){return De(Ue(e))},Be="object"==typeof document&&document.all,Fe=void 0===Be&&void 0!==Be?function(e){return"function"==typeof e||e===Be}:function(e){return"function"==typeof e},We=Fe,Ge=function(e){return"object"==typeof e?null!==e:We(e)},Ke=oe,ze=Fe,He=function(e,t){return arguments.length<2?(r=Ke[e],ze(r)?r:void 0):Ke[e]&&Ke[e][t];var r},Ve=Pe({}.isPrototypeOf),qe="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Ye=oe,Ze=qe,Je=Ye.process,Xe=Ye.Deno,Qe=Je&&Je.versions||Xe&&Xe.version,et=Qe&&Qe.v8;et&&(ge=(ye=et.split("."))[0]>0&&ye[0]<4?1:+(ye[0]+ye[1])),!ge&&Ze&&(!(ye=Ze.match(/Edge\/(\d+)/))||ye[1]>=74)&&(ye=Ze.match(/Chrome\/(\d+)/))&&(ge=+ye[1]);var tt=ge,rt=tt,nt=ae,ot=oe.String,it=!!Object.getOwnPropertySymbols&&!nt((function(){var e=Symbol("symbol detection");return!ot(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&rt&&rt<41})),at=it&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ut=He,ct=Fe,st=Ve,lt=Object,ft=at?function(e){return"symbol"==typeof e}:function(e){var t=ut("Symbol");return ct(t)&&st(t.prototype,lt(e))},pt=String,dt=function(e){try{return pt(e)}catch(e){return"Object"}},ht=Fe,vt=dt,yt=TypeError,gt=function(e){if(ht(e))return e;throw new yt(vt(e)+" is not a function")},mt=gt,bt=Re,wt=function(e,t){var r=e[t];return bt(r)?void 0:mt(r)},Et=fe,St=Fe,Pt=Ge,Ot=TypeError,It={exports:{}},xt=oe,_t=Object.defineProperty,jt=function(e,t){try{_t(xt,e,{value:t,configurable:!0,writable:!0})}catch(r){xt[e]=t}return t},kt=oe,Tt=jt,At="__core-js_shared__",Mt=It.exports=kt[At]||Tt(At,{});(Mt.versions||(Mt.versions=[])).push({version:"3.36.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Rt=It.exports,Lt=Rt,Ct=function(e,t){return Lt[e]||(Lt[e]=t||{})},Nt=Ne,Dt=Object,Ut=function(e){return Dt(Nt(e))},$t=Ut,Bt=Pe({}.hasOwnProperty),Ft=Object.hasOwn||function(e,t){return Bt($t(e),t)},Wt=Pe,Gt=0,Kt=Math.random(),zt=Wt(1..toString),Ht=function(e){return"Symbol("+(void 0===e?"":e)+")_"+zt(++Gt+Kt,36)},Vt=Ct,qt=Ft,Yt=Ht,Zt=it,Jt=at,Xt=oe.Symbol,Qt=Vt("wks"),er=Jt?Xt.for||Xt:Xt&&Xt.withoutSetter||Yt,tr=function(e){return qt(Qt,e)||(Qt[e]=Zt&&qt(Xt,e)?Xt[e]:er("Symbol."+e)),Qt[e]},rr=fe,nr=Ge,or=ft,ir=wt,ar=TypeError,ur=tr("toPrimitive"),cr=function(e,t){if(!nr(e)||or(e))return e;var r,n=ir(e,ur);if(n){if(void 0===t&&(t="default"),r=rr(n,e,t),!nr(r)||or(r))return r;throw new ar("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&St(r=e.toString)&&!Pt(n=Et(r,e)))return n;if(St(r=e.valueOf)&&!Pt(n=Et(r,e)))return n;if("string"!==t&&St(r=e.toString)&&!Pt(n=Et(r,e)))return n;throw new Ot("Can't convert object to primitive value")}(e,t)},sr=ft,lr=function(e){var t=cr(e,"string");return sr(t)?t:t+""},fr=Ge,pr=oe.document,dr=fr(pr)&&fr(pr.createElement),hr=function(e){return dr?pr.createElement(e):{}},vr=hr,yr=!ue&&!ae((function(){return 7!==Object.defineProperty(vr("div"),"a",{get:function(){return 7}}).a})),gr=ue,mr=fe,br=pe,wr=me,Er=$e,Sr=lr,Pr=Ft,Or=yr,Ir=Object.getOwnPropertyDescriptor;ie.f=gr?Ir:function(e,t){if(e=Er(e),t=Sr(t),Or)try{return Ir(e,t)}catch(e){}if(Pr(e,t))return wr(!mr(br.f,e,t),e[t])};var xr={},_r=ue&&ae((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),jr=Ge,kr=String,Tr=TypeError,Ar=function(e){if(jr(e))return e;throw new Tr(kr(e)+" is not an object")},Mr=ue,Rr=yr,Lr=_r,Cr=Ar,Nr=lr,Dr=TypeError,Ur=Object.defineProperty,$r=Object.getOwnPropertyDescriptor,Br="enumerable",Fr="configurable",Wr="writable";xr.f=Mr?Lr?function(e,t,r){if(Cr(e),t=Nr(t),Cr(r),"function"==typeof e&&"prototype"===t&&"value"in r&&Wr in r&&!r[Wr]){var n=$r(e,t);n&&n[Wr]&&(e[t]=r.value,r={configurable:Fr in r?r[Fr]:n[Fr],enumerable:Br in r?r[Br]:n[Br],writable:!1})}return Ur(e,t,r)}:Ur:function(e,t,r){if(Cr(e),t=Nr(t),Cr(r),Rr)try{return Ur(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new Dr("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Gr=xr,Kr=me,zr=ue?function(e,t,r){return Gr.f(e,t,Kr(1,r))}:function(e,t,r){return e[t]=r,e},Hr={exports:{}},Vr=ue,qr=Ft,Yr=Function.prototype,Zr=Vr&&Object.getOwnPropertyDescriptor,Jr=qr(Yr,"name"),Xr={EXISTS:Jr,PROPER:Jr&&"something"===function(){}.name,CONFIGURABLE:Jr&&(!Vr||Vr&&Zr(Yr,"name").configurable)},Qr=Fe,en=Rt,tn=Pe(Function.toString);Qr(en.inspectSource)||(en.inspectSource=function(e){return tn(e)});var rn,nn,on,an=en.inspectSource,un=Fe,cn=oe.WeakMap,sn=un(cn)&&/native code/.test(String(cn)),ln=Ht,fn=Ct("keys"),pn=function(e){return fn[e]||(fn[e]=ln(e))},dn={},hn=sn,vn=oe,yn=Ge,gn=zr,mn=Ft,bn=Rt,wn=pn,En=dn,Sn="Object already initialized",Pn=vn.TypeError,On=vn.WeakMap;if(hn||bn.state){var In=bn.state||(bn.state=new On);In.get=In.get,In.has=In.has,In.set=In.set,rn=function(e,t){if(In.has(e))throw new Pn(Sn);return t.facade=e,In.set(e,t),t},nn=function(e){return In.get(e)||{}},on=function(e){return In.has(e)}}else{var xn=wn("state");En[xn]=!0,rn=function(e,t){if(mn(e,xn))throw new Pn(Sn);return t.facade=e,gn(e,xn,t),t},nn=function(e){return mn(e,xn)?e[xn]:{}},on=function(e){return mn(e,xn)}}var _n={set:rn,get:nn,has:on,enforce:function(e){return on(e)?nn(e):rn(e,{})},getterFor:function(e){return function(t){var r;if(!yn(t)||(r=nn(t)).type!==e)throw new Pn("Incompatible receiver, "+e+" required");return r}}},jn=Pe,kn=ae,Tn=Fe,An=Ft,Mn=ue,Rn=Xr.CONFIGURABLE,Ln=an,Cn=_n.enforce,Nn=_n.get,Dn=String,Un=Object.defineProperty,$n=jn("".slice),Bn=jn("".replace),Fn=jn([].join),Wn=Mn&&!kn((function(){return 8!==Un((function(){}),"length",{value:8}).length})),Gn=String(String).split("String"),Kn=Hr.exports=function(e,t,r){"Symbol("===$n(Dn(t),0,7)&&(t="["+Bn(Dn(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!An(e,"name")||Rn&&e.name!==t)&&(Mn?Un(e,"name",{value:t,configurable:!0}):e.name=t),Wn&&r&&An(r,"arity")&&e.length!==r.arity&&Un(e,"length",{value:r.arity});try{r&&An(r,"constructor")&&r.constructor?Mn&&Un(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=Cn(e);return An(n,"source")||(n.source=Fn(Gn,"string"==typeof t?t:"")),e};Function.prototype.toString=Kn((function(){return Tn(this)&&Nn(this).source||Ln(this)}),"toString");var zn=Hr.exports,Hn=Fe,Vn=xr,qn=zn,Yn=jt,Zn=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(Hn(r)&&qn(r,i,n),n.global)o?e[t]=r:Yn(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:Vn.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Jn={},Xn=Math.ceil,Qn=Math.floor,eo=Math.trunc||function(e){var t=+e;return(t>0?Qn:Xn)(t)},to=function(e){var t=+e;return t!=t||0===t?0:eo(t)},ro=to,no=Math.max,oo=Math.min,io=to,ao=Math.min,uo=function(e){var t=io(e);return t>0?ao(t,9007199254740991):0},co=uo,so=function(e){return co(e.length)},lo=$e,fo=so,po=function(e){return function(t,r,n){var o=lo(t),i=fo(o);if(0===i)return!e&&-1;var a,u=function(e,t){var r=ro(e);return r<0?no(r+t,0):oo(r,t)}(n,i);if(e&&r!=r){for(;i>u;)if((a=o[u++])!=a)return!0}else for(;i>u;u++)if((e||u in o)&&o[u]===r)return e||u||0;return!e&&-1}},ho={includes:po(!0),indexOf:po(!1)},vo=Ft,yo=$e,go=ho.indexOf,mo=dn,bo=Pe([].push),wo=function(e,t){var r,n=yo(e),o=0,i=[];for(r in n)!vo(mo,r)&&vo(n,r)&&bo(i,r);for(;t.length>o;)vo(n,r=t[o++])&&(~go(i,r)||bo(i,r));return i},Eo=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],So=wo,Po=Eo.concat("length","prototype");Jn.f=Object.getOwnPropertyNames||function(e){return So(e,Po)};var Oo={};Oo.f=Object.getOwnPropertySymbols;var Io=He,xo=Jn,_o=Oo,jo=Ar,ko=Pe([].concat),To=Io("Reflect","ownKeys")||function(e){var t=xo.f(jo(e)),r=_o.f;return r?ko(t,r(e)):t},Ao=Ft,Mo=To,Ro=ie,Lo=xr,Co=function(e,t,r){for(var n=Mo(t),o=Lo.f,i=Ro.f,a=0;a<n.length;a++){var u=n[a];Ao(e,u)||r&&Ao(r,u)||o(e,u,i(t,u))}},No=ae,Do=Fe,Uo=/#|\.prototype\./,$o=function(e,t){var r=Fo[Bo(e)];return r===Go||r!==Wo&&(Do(t)?No(t):!!t)},Bo=$o.normalize=function(e){return String(e).replace(Uo,".").toLowerCase()},Fo=$o.data={},Wo=$o.NATIVE="N",Go=$o.POLYFILL="P",Ko=$o,zo=oe,Ho=ie.f,Vo=zr,qo=Zn,Yo=jt,Zo=Co,Jo=Ko,Xo=function(e,t){var r,n,o,i,a,u=e.target,c=e.global,s=e.stat;if(r=c?zo:s?zo[u]||Yo(u,{}):zo[u]&&zo[u].prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=Ho(r,n))&&a.value:r[n],!Jo(c?n:u+(s?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Zo(i,o)}(e.sham||o&&o.sham)&&Vo(i,"sham",!0),qo(r,n,i,e)}},Qo=ce,ei=Function.prototype,ti=ei.apply,ri=ei.call,ni="object"==typeof Reflect&&Reflect.apply||(Qo?ri.bind(ti):function(){return ri.apply(ti,arguments)}),oi=Pe,ii=gt,ai=Ge,ui=String,ci=TypeError,si=Ge,li=Ne,fi=function(e){if(function(e){return ai(e)||null===e}(e))return e;throw new ci("Can't set "+ui(e)+" as a prototype")},pi=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=function(e,t,r){try{return oi(ii(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return li(r),fi(n),si(r)?(t?e(r,n):r.__proto__=n,r):r}}():void 0),di=xr.f,hi=Fe,vi=Ge,yi=pi,gi={};gi[tr("toStringTag")]="z";var mi="[object z]"===String(gi),bi=Fe,wi=_e,Ei=tr("toStringTag"),Si=Object,Pi="Arguments"===wi(function(){return arguments}()),Oi=mi?wi:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Si(e),Ei))?r:Pi?wi(t):"Object"===(n=wi(t))&&bi(t.callee)?"Arguments":n},Ii=Oi,xi=String,_i=function(e){if("Symbol"===Ii(e))throw new TypeError("Cannot convert a Symbol value to a string");return xi(e)},ji=_i,ki=Ge,Ti=zr,Ai=Error,Mi=Pe("".replace),Ri=String(new Ai("zxcasd").stack),Li=/\n\s*at [^:]*:[^\n]*/,Ci=Li.test(Ri),Ni=me,Di=!ae((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Ni(1,7)),7!==e.stack)})),Ui=zr,$i=Di,Bi=Error.captureStackTrace,Fi=He,Wi=Ft,Gi=zr,Ki=Ve,zi=pi,Hi=Co,Vi=function(e,t,r){r in e||di(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},qi=function(e,t,r,n){$i&&(Bi?Bi(e,t):Ui(e,"stack",function(e,t){if(Ci&&"string"==typeof e&&!Ai.prepareStackTrace)for(;t--;)e=Mi(e,Li,"");return e}(r,n)))},Yi=ue,Zi=Xo,Ji=ni,Xi=function(e,t,r,n){var o="stackTraceLimit",i=n?2:1,a=e.split("."),u=a[a.length-1],c=Fi.apply(null,a);if(c){var s=c.prototype;if(Wi(s,"cause")&&delete s.cause,!r)return c;var l=Fi("Error"),f=t((function(e,t){var r,o,a,u,l,p,d,h=function(e,t){return void 0===e?arguments.length<2?"":t:ji(e)}(n?t:e,void 0),v=n?new c(e):new c;return void 0!==h&&Gi(v,"message",h),qi(v,f,v.stack,2),this&&Ki(s,this)&&(a=v,u=this,l=f,yi&&hi(p=u.constructor)&&p!==l&&vi(d=p.prototype)&&d!==l.prototype&&yi(a,d)),arguments.length>i&&(r=v,ki(o=arguments[i])&&"cause"in o&&Ti(r,"cause",o.cause)),v}));f.prototype=s,"Error"!==u?zi?zi(f,l):Hi(f,l,{name:!0}):Yi&&o in c&&(Vi(f,c,o),Vi(f,c,"prepareStackTrace")),Hi(f,c);try{s.name!==u&&Gi(s,"name",u),s.constructor=f}catch(e){}return f}},Qi="WebAssembly",ea=oe[Qi],ta=7!==new Error("e",{cause:7}).cause,ra=function(e,t){var r={};r[e]=Xi(e,t,ta),Zi({global:!0,constructor:!0,arity:1,forced:ta},r)},na=function(e,t){if(ea&&ea[e]){var r={};r[e]=Xi(Qi+"."+e,t,ta),Zi({target:Qi,stat:!0,constructor:!0,arity:1,forced:ta},r)}};ra("Error",(function(e){return function(t){return Ji(e,this,arguments)}})),ra("EvalError",(function(e){return function(t){return Ji(e,this,arguments)}})),ra("RangeError",(function(e){return function(t){return Ji(e,this,arguments)}})),ra("ReferenceError",(function(e){return function(t){return Ji(e,this,arguments)}})),ra("SyntaxError",(function(e){return function(t){return Ji(e,this,arguments)}})),ra("TypeError",(function(e){return function(t){return Ji(e,this,arguments)}})),ra("URIError",(function(e){return function(t){return Ji(e,this,arguments)}})),na("CompileError",(function(e){return function(t){return Ji(e,this,arguments)}})),na("LinkError",(function(e){return function(t){return Ji(e,this,arguments)}})),na("RuntimeError",(function(e){return function(t){return Ji(e,this,arguments)}})),Error;var oa=_e,ia=ue,aa=Array.isArray||function(e){return"Array"===oa(e)},ua=TypeError,ca=Object.getOwnPropertyDescriptor,sa=ia&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),la=TypeError,fa=Ut,pa=so,da=sa?function(e,t){if(aa(e)&&!ca(e,"length").writable)throw new ua("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t};Xo({target:"Array",proto:!0,arity:1,forced:ae((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=fa(this),r=pa(t),n=arguments.length;!function(e){if(e>9007199254740991)throw la("Maximum allowed index exceeded")}(r+n);for(var o=0;o<n;o++)t[r]=arguments[o],r++;return da(t,r),r}});var ha=wo,va=Eo,ya=Object.keys||function(e){return ha(e,va)},ga=ue,ma=Pe,ba=fe,wa=ae,Ea=ya,Sa=Oo,Pa=pe,Oa=Ut,Ia=Me,xa=Object.assign,_a=Object.defineProperty,ja=ma([].concat),ka=!xa||wa((function(){if(ga&&1!==xa({b:1},xa(_a({},"a",{enumerable:!0,get:function(){_a(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!==xa({},e)[r]||Ea(xa({},t)).join("")!==n}))?function(e,t){for(var r=Oa(e),n=arguments.length,o=1,i=Sa.f,a=Pa.f;n>o;)for(var u,c=Ia(arguments[o++]),s=i?ja(Ea(c),i(c)):Ea(c),l=s.length,f=0;l>f;)u=s[f++],ga&&!ba(a,c,u)||(r[u]=c[u]);return r}:xa,Ta=ka;Xo({target:"Object",stat:!0,arity:2,forced:Object.assign!==Ta},{assign:Ta});var Aa={},Ma=ue,Ra=_r,La=xr,Ca=Ar,Na=$e,Da=ya;Aa.f=Ma&&!Ra?Object.defineProperties:function(e,t){Ca(e);for(var r,n=Na(t),o=Da(t),i=o.length,a=0;i>a;)La.f(e,r=o[a++],n[r]);return e};var Ua,$a=He("document","documentElement"),Ba=Ar,Fa=Aa,Wa=Eo,Ga=dn,Ka=$a,za=hr,Ha="prototype",Va="script",qa=pn("IE_PROTO"),Ya=function(){},Za=function(e){return"<"+Va+">"+e+"</"+Va+">"},Ja=function(e){e.write(Za("")),e.close();var t=e.parentWindow.Object;return e=null,t},Xa=function(){try{Ua=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;Xa="undefined"!=typeof document?document.domain&&Ua?Ja(Ua):(t=za("iframe"),r="java"+Va+":",t.style.display="none",Ka.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Za("document.F=Object")),e.close(),e.F):Ja(Ua);for(var n=Wa.length;n--;)delete Xa[Ha][Wa[n]];return Xa()};Ga[qa]=!0;var Qa=Object.create||function(e,t){var r;return null!==e?(Ya[Ha]=Ba(e),r=new Ya,Ya[Ha]=null,r[qa]=e):r=Xa(),void 0===t?r:Fa.f(r,t)},eu=tr,tu=Qa,ru=xr.f,nu=eu("unscopables"),ou=Array.prototype;void 0===ou[nu]&&ru(ou,nu,{configurable:!0,value:tu(null)});var iu,au=ho.includes;Xo({target:"Array",proto:!0,forced:ae((function(){return!Array(1).includes()}))},{includes:function(e){return au(this,e,arguments.length>1?arguments[1]:void 0)}}),iu="includes",ou[nu][iu]=!0;var uu,cu="\t\n\v\f\r                 \u2028\u2029\ufeff",su=Ne,lu=_i,fu=cu,pu=Pe("".replace),du=RegExp("^["+fu+"]+"),hu=RegExp("(^|[^"+fu+"])["+fu+"]+$"),vu=function(e){return function(t){var r=lu(su(t));return 1&e&&(r=pu(r,du,"")),2&e&&(r=pu(r,hu,"$1")),r}},yu={start:vu(1),end:vu(2),trim:vu(3)},gu=Xr.PROPER,mu=cu,bu=yu.trim;Xo({target:"String",proto:!0,forced:(uu="trim",ae((function(){return!!mu[uu]()||"​…᠎"!=="​…᠎"[uu]()||gu&&mu[uu].name!==uu})))},{trim:function(){return bu(this)}});var wu,Eu,Su=Ar,Pu=ae,Ou=oe.RegExp,Iu=Pu((function(){var e=Ou("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),xu=Iu||Pu((function(){return!Ou("a","y").sticky})),_u={BROKEN_CARET:Iu||Pu((function(){var e=Ou("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:xu,UNSUPPORTED_Y:Iu},ju=ae,ku=oe.RegExp,Tu=ju((function(){var e=ku(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),Au=ae,Mu=oe.RegExp,Ru=Au((function(){var e=Mu("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Lu=fe,Cu=Pe,Nu=_i,Du=function(){var e=Su(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Uu=_u,$u=Qa,Bu=_n.get,Fu=Tu,Wu=Ru,Gu=Ct("native-string-replace",String.prototype.replace),Ku=RegExp.prototype.exec,zu=Ku,Hu=Cu("".charAt),Vu=Cu("".indexOf),qu=Cu("".replace),Yu=Cu("".slice),Zu=(Eu=/b*/g,Lu(Ku,wu=/a/,"a"),Lu(Ku,Eu,"a"),0!==wu.lastIndex||0!==Eu.lastIndex),Ju=Uu.BROKEN_CARET,Xu=void 0!==/()??/.exec("")[1];(Zu||Xu||Ju||Fu||Wu)&&(zu=function(e){var t,r,n,o,i,a,u,c=this,s=Bu(c),l=Nu(e),f=s.raw;if(f)return f.lastIndex=c.lastIndex,t=Lu(zu,f,l),c.lastIndex=f.lastIndex,t;var p=s.groups,d=Ju&&c.sticky,h=Lu(Du,c),v=c.source,y=0,g=l;if(d&&(h=qu(h,"y",""),-1===Vu(h,"g")&&(h+="g"),g=Yu(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Hu(l,c.lastIndex-1))&&(v="(?: "+v+")",g=" "+g,y++),r=new RegExp("^(?:"+v+")",h)),Xu&&(r=new RegExp("^"+v+"$(?!\\s)",h)),Zu&&(n=c.lastIndex),o=Lu(Ku,d?r:c,g),d?o?(o.input=Yu(o.input,y),o[0]=Yu(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Zu&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Xu&&o&&o.length>1&&Lu(Gu,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=a=$u(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Qu=zu;Xo({target:"RegExp",proto:!0,forced:/./.exec!==Qu},{exec:Qu});var ec=fe,tc=Zn,rc=Qu,nc=ae,oc=tr,ic=zr,ac=oc("species"),uc=RegExp.prototype,cc=function(e,t,r,n){var o=oc(e),i=!nc((function(){var t={};return t[o]=function(){return 7},7!==""[e](t)})),a=i&&!nc((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[ac]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||r){var u=/./[o],c=t(o,""[e],(function(e,t,r,n,o){var a=t.exec;return a===rc||a===uc.exec?i&&!o?{done:!0,value:ec(u,t,r,n)}:{done:!0,value:ec(e,r,t,n)}:{done:!1}}));tc(String.prototype,e,c[0]),tc(uc,o,c[1])}n&&ic(uc[o],"sham",!0)},sc=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},lc=fe,fc=Ar,pc=Fe,dc=_e,hc=Qu,vc=TypeError,yc=function(e,t){var r=e.exec;if(pc(r)){var n=lc(r,e,t);return null!==n&&fc(n),n}if("RegExp"===dc(e))return lc(hc,e,t);throw new vc("RegExp#exec called on incompatible receiver")},gc=fe,mc=Ar,bc=Re,wc=Ne,Ec=sc,Sc=_i,Pc=wt,Oc=yc;cc("search",(function(e,t,r){return[function(t){var r=wc(this),n=bc(t)?void 0:Pc(t,e);return n?gc(n,t,r):new RegExp(t)[e](Sc(r))},function(e){var n=mc(this),o=Sc(e),i=r(t,n,o);if(i.done)return i.value;var a=n.lastIndex;Ec(a,0)||(n.lastIndex=0);var u=Oc(n,o);return Ec(n.lastIndex,a)||(n.lastIndex=a),null===u?-1:u.index}]}));const Ic=e=>{const t=window.location.search.substr(1).split("&"),r=`${e}=`,n=t.filter((e=>e.search(r)>=0));return n.length>0?n[0].substring(n[0].search(r)+r.length):""};let xc="true"===Ic("unisphereVerbose")?"log":Ic("unisphereVerbose")||"";const _c=["log","debug"].includes(xc)?xc:"warn",jc=Ic("unisphereEnvironment")||"prod";let kc=localStorage.getItem("unisphereDevLoader")||null;const Tc=Ic("unispherePresets")||null,Ac={logLevel:_c,loaderUrl:kc,verbose:xc,environment:"dev"===jc?"dev":"prod",presets:Tc?Tc.split(",").map((e=>e.trim())):null},Mc=()=>Ac;let Rc=window.unisphere;function Lc(e,t,r){return e in Rc?{value:Rc[e],isNew:!1}:(null==t||t.debug(`${e} not found on 'window.unisphere', creating with default value`,{data:{defaultValue:r}}),Rc[e]=r,{value:r,isNew:!0})}"unisphere"in window||(Rc=window.unisphere={});const Cc={logToConsole:!0,logLevel:Mc().logLevel};class Nc{static createWorkspaceLogger(e){return new Nc(e)}kill(){this._killed=!0}constructor(e){this.workspaceName=e,this._killed=!1,this._settings=Object.assign({},Cc)}getLogger(e){return this._killed&&console.warn("Logger factory is killed, returning a new logger anyway"),new Dc(this.workspaceName,e,this.getSettings.bind(this))}getSettings(){return this._settings}updateSettings(e){this._settings=Object.assign(Object.assign({},this._settings),e)}}class Dc{constructor(e,t,r){this.workspaceName=e,this.runtime=t,this._getSettings=r;const n=function(){const{value:e}=Lc("loggers",null,{interceptors:[],logMessages:[]});return e}();this._globalLoggers=n}logMessage(e,t,r,n){const o={workspaceName:this.workspaceName,runtime:this.runtime,time:(new Date).toISOString(),message:t,data:r,error:n,level:e},i=this._getSettings();if(this._globalLoggers.logMessages.push(o),this._globalLoggers.interceptors.forEach((e=>{e(o)})),i.logToConsole&&this.shouldLog(e,i.logLevel)){const t=`${o.time} [Unisphere.${o.runtime}] ${o.message}`;switch(e){case"debug":console.debug(t,o.data);break;case"log":console.log(t,o.data);break;case"warn":console.warn(t,o.data);break;case"error":console.error(t,{data:o.data,error:o.error})}}}shouldLog(e,t){const r=["debug","log","warn","error"];return r.indexOf(e)>=r.indexOf(t)}log(e,t){this.logMessage("log",e,null==t?void 0:t.data)}debug(e,t){this.logMessage("debug",e,null==t?void 0:t.data)}warn(e,t){this.logMessage("warn",e,null==t?void 0:t.data)}error(e,t){this.logMessage("error",e,null==t?void 0:t.data,null==t?void 0:t.error)}}var Uc,$c=_e,Bc=Pe,Fc=function(e){if("Function"===$c(e))return Bc(e)},Wc=Ge,Gc=_e,Kc=tr("match"),zc=TypeError,Hc=function(e){if(function(e){var t;return Wc(e)&&(void 0!==(t=e[Kc])?!!t:"RegExp"===Gc(e))}(e))throw new zc("The method doesn't accept regular expressions");return e},Vc=tr("match"),qc=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Vc]=!1,"/./"[e](t)}catch(e){}}return!1},Yc=Xo,Zc=Fc,Jc=ie.f,Xc=uo,Qc=_i,es=Hc,ts=Ne,rs=qc,ns=Zc("".slice),os=Math.min,is=rs("startsWith");function as(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}c((n=n.apply(e,t||[])).next())}))}Yc({target:"String",proto:!0,forced:!(!is&&(Uc=Jc(String.prototype,"startsWith"),Uc&&!Uc.writable)||is)},{startsWith:function(e){var t=Qc(ts(this));es(e);var r=Xc(os(arguments.length>1?arguments[1]:void 0,t.length)),n=Qc(e);return ns(t,r,r+n.length)===n}}),"function"==typeof SuppressedError&&SuppressedError;var us="process"===_e(oe.process),cs=xr.f,ss=Ft,ls=tr("toStringTag"),fs=zn,ps=xr,ds=He,hs=ue,vs=tr("species"),ys=Ve,gs=TypeError,ms=Pe,bs=ae,ws=Fe,Es=Oi,Ss=an,Ps=function(){},Os=He("Reflect","construct"),Is=/^\s*(?:class|function)\b/,xs=ms(Is.exec),_s=!Is.test(Ps),js=function(e){if(!ws(e))return!1;try{return Os(Ps,[],e),!0}catch(e){return!1}},ks=function(e){if(!ws(e))return!1;switch(Es(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _s||!!xs(Is,Ss(e))}catch(e){return!0}};ks.sham=!0;var Ts,As,Ms,Rs,Ls=!Os||bs((function(){var e;return js(js.call)||!js(Object)||!js((function(){e=!0}))||e}))?ks:js,Cs=Ls,Ns=dt,Ds=TypeError,Us=Ar,$s=Re,Bs=tr("species"),Fs=gt,Ws=ce,Gs=Fc(Fc.bind),Ks=function(e,t){return Fs(e),void 0===t?e:Ws?Gs(e,t):function(){return e.apply(t,arguments)}},zs=Pe([].slice),Hs=TypeError,Vs=/(?:ipad|iphone|ipod).*applewebkit/i.test(qe),qs=oe,Ys=ni,Zs=Ks,Js=Fe,Xs=Ft,Qs=ae,el=$a,tl=zs,rl=hr,nl=Vs,ol=us,il=qs.setImmediate,al=qs.clearImmediate,ul=qs.process,cl=qs.Dispatch,sl=qs.Function,ll=qs.MessageChannel,fl=qs.String,pl=0,dl={},hl="onreadystatechange";Qs((function(){Ts=qs.location}));var vl=function(e){if(Xs(dl,e)){var t=dl[e];delete dl[e],t()}},yl=function(e){return function(){vl(e)}},gl=function(e){vl(e.data)},ml=function(e){qs.postMessage(fl(e),Ts.protocol+"//"+Ts.host)};il&&al||(il=function(e){!function(e,t){if(e<t)throw new Hs("Not enough arguments")}(arguments.length,1);var t=Js(e)?e:sl(e),r=tl(arguments,1);return dl[++pl]=function(){Ys(t,void 0,r)},As(pl),pl},al=function(e){delete dl[e]},ol?As=function(e){ul.nextTick(yl(e))}:cl&&cl.now?As=function(e){cl.now(yl(e))}:ll&&!nl?(Rs=(Ms=new ll).port2,Ms.port1.onmessage=gl,As=Zs(Rs.postMessage,Rs)):qs.addEventListener&&Js(qs.postMessage)&&!qs.importScripts&&Ts&&"file:"!==Ts.protocol&&!Qs(ml)?(As=ml,qs.addEventListener("message",gl,!1)):As=hl in rl("script")?function(e){el.appendChild(rl("script"))[hl]=function(){el.removeChild(this),vl(e)}}:function(e){setTimeout(yl(e),0)});var bl={set:il,clear:al},wl=oe,El=ue,Sl=Object.getOwnPropertyDescriptor,Pl=function(){this.head=null,this.tail=null};Pl.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Ol,Il,xl,_l,jl,kl=Pl,Tl=/ipad|iphone|ipod/i.test(qe)&&"undefined"!=typeof Pebble,Al=/web0s(?!.*chrome)/i.test(qe),Ml=oe,Rl=Ks,Ll=bl.set,Cl=kl,Nl=Vs,Dl=Tl,Ul=Al,$l=us,Bl=Ml.MutationObserver||Ml.WebKitMutationObserver,Fl=Ml.document,Wl=Ml.process,Gl=Ml.Promise,Kl=function(e){if(!El)return wl[e];var t=Sl(wl,e);return t&&t.value}("queueMicrotask");if(!Kl){var zl=new Cl,Hl=function(){var e,t;for($l&&(e=Wl.domain)&&e.exit();t=zl.get();)try{t()}catch(e){throw zl.head&&Ol(),e}e&&e.enter()};Nl||$l||Ul||!Bl||!Fl?!Dl&&Gl&&Gl.resolve?((_l=Gl.resolve(void 0)).constructor=Gl,jl=Rl(_l.then,_l),Ol=function(){jl(Hl)}):$l?Ol=function(){Wl.nextTick(Hl)}:(Ll=Rl(Ll,Ml),Ol=function(){Ll(Hl)}):(Il=!0,xl=Fl.createTextNode(""),new Bl(Hl).observe(xl,{characterData:!0}),Ol=function(){xl.data=Il=!Il}),Kl=function(e){zl.head||Ol(),zl.add(e)}}var Vl=Kl,ql=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Yl=oe.Promise,Zl="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Jl=!Zl&&!us&&"object"==typeof window&&"object"==typeof document,Xl=oe,Ql=Yl,ef=Fe,tf=Ko,rf=an,nf=tr,of=Jl,af=Zl,uf=tt;Ql&&Ql.prototype;var cf=nf("species"),sf=!1,lf=ef(Xl.PromiseRejectionEvent),ff=tf("Promise",(function(){var e=rf(Ql),t=e!==String(Ql);if(!t&&66===uf)return!0;if(!uf||uf<51||!/native code/.test(e)){var r=new Ql((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[cf]=n,!(sf=r.then((function(){}))instanceof n))return!0}return!t&&(of||af)&&!lf})),pf={CONSTRUCTOR:ff,REJECTION_EVENT:lf,SUBCLASSING:sf},df={},hf=gt,vf=TypeError,yf=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new vf("Bad Promise constructor");t=e,r=n})),this.resolve=hf(t),this.reject=hf(r)};df.f=function(e){return new yf(e)};var gf,mf,bf,wf,Ef,Sf,Pf,Of=Xo,If=us,xf=oe,_f=fe,jf=Zn,kf=pi,Tf=gt,Af=Fe,Mf=Ge,Rf=function(e,t){var r,n=Us(e).constructor;return void 0===n||$s(r=Us(n)[Bs])?t:function(e){if(Cs(e))return e;throw new Ds(Ns(e)+" is not a constructor")}(r)},Lf=bl.set,Cf=Vl,Nf=ql,Df=kl,Uf=_n,$f=Yl,Bf=df,Ff="Promise",Wf=pf.CONSTRUCTOR,Gf=pf.REJECTION_EVENT,Kf=pf.SUBCLASSING,zf=Uf.getterFor(Ff),Hf=Uf.set,Vf=$f&&$f.prototype,qf=$f,Yf=Vf,Zf=xf.TypeError,Jf=xf.document,Xf=xf.process,Qf=Bf.f,ep=Qf,tp=!!(Jf&&Jf.createEvent&&xf.dispatchEvent),rp="unhandledrejection",np=function(e){var t;return!(!Mf(e)||!Af(t=e.then))&&t},op=function(e,t){var r,n,o,i=t.value,a=1===t.state,u=a?e.ok:e.fail,c=e.resolve,s=e.reject,l=e.domain;try{u?(a||(2===t.rejection&&sp(t),t.rejection=1),!0===u?r=i:(l&&l.enter(),r=u(i),l&&(l.exit(),o=!0)),r===e.promise?s(new Zf("Promise-chain cycle")):(n=np(r))?_f(n,r,c,s):c(r)):s(i)}catch(e){l&&!o&&l.exit(),s(e)}},ip=function(e,t){e.notified||(e.notified=!0,Cf((function(){for(var r,n=e.reactions;r=n.get();)op(r,e);e.notified=!1,t&&!e.rejection&&up(e)})))},ap=function(e,t,r){var n,o;tp?((n=Jf.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),xf.dispatchEvent(n)):n={promise:t,reason:r},!Gf&&(o=xf["on"+e])?o(n):e===rp&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",r)},up=function(e){_f(Lf,xf,(function(){var t,r=e.facade,n=e.value;if(cp(e)&&(t=Nf((function(){If?Xf.emit("unhandledRejection",n,r):ap(rp,r,n)})),e.rejection=If||cp(e)?2:1,t.error))throw t.value}))},cp=function(e){return 1!==e.rejection&&!e.parent},sp=function(e){_f(Lf,xf,(function(){var t=e.facade;If?Xf.emit("rejectionHandled",t):ap("rejectionhandled",t,e.value)}))},lp=function(e,t,r){return function(n){e(t,n,r)}},fp=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,ip(e,!0))},pp=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new Zf("Promise can't be resolved itself");var n=np(t);n?Cf((function(){var r={done:!1};try{_f(n,t,lp(pp,r,e),lp(fp,r,e))}catch(t){fp(r,t,e)}})):(e.value=t,e.state=1,ip(e,!1))}catch(t){fp({done:!1},t,e)}}};if(Wf&&(Yf=(qf=function(e){(function(e,t){if(ys(t,e))return e;throw new gs("Incorrect invocation")})(this,Yf),Tf(e),_f(gf,this);var t=zf(this);try{e(lp(pp,t),lp(fp,t))}catch(e){fp(t,e)}}).prototype,(gf=function(e){Hf(this,{type:Ff,done:!1,notified:!1,parent:!1,reactions:new Df,rejection:!1,state:0,value:void 0})}).prototype=jf(Yf,"then",(function(e,t){var r=zf(this),n=Qf(Rf(this,qf));return r.parent=!0,n.ok=!Af(e)||e,n.fail=Af(t)&&t,n.domain=If?Xf.domain:void 0,0===r.state?r.reactions.add(n):Cf((function(){op(n,r)})),n.promise})),mf=function(){var e=new gf,t=zf(e);this.promise=e,this.resolve=lp(pp,t),this.reject=lp(fp,t)},Bf.f=Qf=function(e){return e===qf||void 0===e?new mf(e):ep(e)},Af($f)&&Vf!==Object.prototype)){bf=Vf.then,Kf||jf(Vf,"then",(function(e,t){var r=this;return new qf((function(e,t){_f(bf,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete Vf.constructor}catch(e){}kf&&kf(Vf,Yf)}Of({global:!0,constructor:!0,wrap:!0,forced:Wf},{Promise:qf}),Sf=Ff,Pf=!1,(Ef=qf)&&!Pf&&(Ef=Ef.prototype),Ef&&!ss(Ef,ls)&&cs(Ef,ls,{configurable:!0,value:Sf}),wf=ds(Ff),hs&&wf&&!wf[vs]&&function(e,t,r){r.get&&fs(r.get,t,{getter:!0}),r.set&&fs(r.set,t,{setter:!0}),ps.f(e,t,r)}(wf,vs,{configurable:!0,get:function(){return this}});var dp={},hp=dp,vp=tr("iterator"),yp=Array.prototype,gp=Oi,mp=wt,bp=Re,wp=dp,Ep=tr("iterator"),Sp=function(e){if(!bp(e))return mp(e,Ep)||mp(e,"@@iterator")||wp[gp(e)]},Pp=fe,Op=gt,Ip=Ar,xp=dt,_p=Sp,jp=TypeError,kp=fe,Tp=Ar,Ap=wt,Mp=Ks,Rp=fe,Lp=Ar,Cp=dt,Np=so,Dp=Ve,Up=Sp,$p=function(e,t,r){var n,o;Tp(e);try{if(!(n=Ap(e,"return"))){if("throw"===t)throw r;return r}n=kp(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return Tp(n),r},Bp=TypeError,Fp=function(e,t){this.stopped=e,this.result=t},Wp=Fp.prototype,Gp=function(e,t,r){var n,o,i,a,u,c,s,l,f=r&&r.that,p=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=Mp(t,f),g=function(e){return n&&$p(n,"normal",e),new Fp(!0,e)},m=function(e){return p?(Lp(e),v?y(e[0],e[1],g):y(e[0],e[1])):v?y(e,g):y(e)};if(d)n=e.iterator;else if(h)n=e;else{if(!(o=Up(e)))throw new Bp(Cp(e)+" is not iterable");if(void 0!==(l=o)&&(hp.Array===l||yp[vp]===l)){for(i=0,a=Np(e);a>i;i++)if((u=m(e[i]))&&Dp(Wp,u))return u;return new Fp(!1)}n=function(e,t){var r=arguments.length<2?_p(e):t;if(Op(r))return Ip(Pp(r,e));throw new jp(xp(e)+" is not iterable")}(e,o)}for(c=d?e.next:n.next;!(s=Rp(c,n)).done;){try{u=m(s.value)}catch(e){$p(n,"throw",e)}if("object"==typeof u&&u&&Dp(Wp,u))return u}return new Fp(!1)},Kp=tr("iterator"),zp=!1;try{var Hp=0,Vp={next:function(){return{done:!!Hp++}},return:function(){zp=!0}};Vp[Kp]=function(){return this},Array.from(Vp,(function(){throw 2}))}catch(e){}var qp=Yl,Yp=pf.CONSTRUCTOR||!function(e,t){try{if(!t&&!zp)return!1}catch(e){return!1}var r=!1;try{var n={};n[Kp]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}((function(e){qp.all(e).then(void 0,(function(){}))})),Zp=fe,Jp=gt,Xp=df,Qp=ql,ed=Gp;Xo({target:"Promise",stat:!0,forced:Yp},{all:function(e){var t=this,r=Xp.f(t),n=r.resolve,o=r.reject,i=Qp((function(){var r=Jp(t.resolve),i=[],a=0,u=1;ed(e,(function(e){var c=a++,s=!1;u++,Zp(r,t,e).then((function(e){s||(s=!0,i[c]=e,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise}});var td=Xo,rd=pf.CONSTRUCTOR,nd=Yl,od=He,id=Fe,ad=Zn,ud=nd&&nd.prototype;if(td({target:"Promise",proto:!0,forced:rd,real:!0},{catch:function(e){return this.then(void 0,e)}}),id(nd)){var cd=od("Promise").prototype.catch;ud.catch!==cd&&ad(ud,"catch",cd,{unsafe:!0})}var sd=fe,ld=gt,fd=df,pd=ql,dd=Gp;Xo({target:"Promise",stat:!0,forced:Yp},{race:function(e){var t=this,r=fd.f(t),n=r.reject,o=pd((function(){var o=ld(t.resolve);dd(e,(function(e){sd(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var hd=df;Xo({target:"Promise",stat:!0,forced:pf.CONSTRUCTOR},{reject:function(e){var t=hd.f(this);return(0,t.reject)(e),t.promise}});var vd=Ar,yd=Ge,gd=df,md=Xo,bd=pf.CONSTRUCTOR;He("Promise"),md({target:"Promise",stat:!0,forced:bd},{resolve:function(e){return function(e,t){if(vd(e),yd(t)&&t.constructor===e)return t;var r=gd.f(e);return(0,r.resolve)(t),r.promise}(this,e)}});const wd=Nc.createWorkspaceLogger("window").getLogger("fetchers"),{value:{factoriesByOwner:Ed}}=Lc("factoriesByOwner",wd,{factoriesByOwner:{}});function Sd(e){return as(this,arguments,void 0,(function*({owner:e,url:t}){let r=Ed[e];r||(wd.log(`no factories found for ${e}, creating new list`),r=[],Ed[e]=r);const n=r.find((e=>e.url===t));if(null==n?void 0:n.factoryModule)return wd.log(`using cached factory module for ${t}`),{factoryModule:n.factoryModule,error:null};const o=r.find((e=>e.url===t));if(o)return wd.log(`a request to fetch factory already in progress for ${t}, waiting for it to finish`),new Promise(((e,t)=>{o.onFetched.push(e),o.onError.push(t)}));wd.log(`fetching factory module for ${t}`);const i={url:t,factoryModule:null,error:null,onFetched:[],onError:[]};r.push(i);try{const e=yield import(t);wd.log(`fetched factory module for ${t}, caching it`),i.factoryModule=e,i.onFetched&&(wd.log(`calling onFetched callbacks for ${t} (${i.onFetched.length} queued)`),i.onFetched.forEach((r=>{try{r(e)}catch(e){wd.error(`error calling onFetched callback for ${t}`,{error:e})}}))),i.onFetched=[],i.onError=[]}catch(e){wd.log(`failed to fetch factory module for ${t}, removing from list`),i.onError&&(wd.log(`calling onError callbacks for ${t} (${i.onError.length} queued)`),i.onError.forEach((r=>{try{r(e)}catch(e){wd.error(`error calling onError callback for ${t}`,{error:e})}}))),i.onError=[],i.onFetched=[],r.splice(r.indexOf(i),1)}return{factoryModule:i.factoryModule,error:i.error}}))}const Pd=Mc(),Od=e=>as(void 0,void 0,void 0,(function*(){const t=Nc.createWorkspaceLogger(e.workspaceName||"").getLogger("fetch-loader");let r="",n="";if(Pd.loaderUrl?(t.log(`using custom loader url from query params '${Pd.loaderUrl}'`),n=Pd.loaderUrl):e.devLoaderUrl&&(t.log(`using custom loader url from options '${e.devLoaderUrl}'`),n=e.devLoaderUrl),n){t.log(`verifying custom loader url '${n}' url against environment runtime json. fetching runtime json...`);const o=yield((e,t)=>as(void 0,void 0,void 0,(function*(){let r,n=`${e}/runtime.json`;try{t.log(`loading runtime versions for env from '${n}'`),r=yield fetch(n).then((e=>e.json()))}catch(e){throw t.error(`error loading runtime versions for env from '${n}'`,{error:e}),new Error(`failed to load runtime versions for env from '${n}'`)}if(!r||!("domains"in r))throw new Error("invalid runtime json, 'domains' is missing in the runtime json");return r.domains})))(e.serverUrl,t),i=n.startsWith(e.serverUrl),a=o.some((e=>n.startsWith(e)));if(t.log("ensuring custom loader url is in environment artifacts or from an allowed domain",{data:{customLoaderUrl:n,serverUrl:e.serverUrl,isInEnvironmentArtifacts:i,isInAllowedDomains:a}}),!i&&!a)throw new Error(`the custom loader url '${n}' is not in the environment artifacts or from an allowed domain`);t.log(`using custom loader url '${n}'`),r=n}else t.log("using environment loader"),r=`${e.serverUrl}/loader/index.esm.js`;t.log("fetching environment unisphere loader",{data:{environmentLoaderUrl:r,options:e}});const{factoryModule:{loader:o}}=yield Sd({owner:"runtime-js",url:r});if(!o)throw new Error(`failed to load dev loader from '${r}'`);return t.log("executing environment unisphere loader"),o(Object.assign({},e))}));var Id=Xo,xd=Fc,_d=ie.f,jd=uo,kd=_i,Td=Hc,Ad=Ne,Md=qc,Rd=xd("".slice),Ld=Math.min,Cd=Md("endsWith"),Nd=!Cd&&!!function(){var e=_d(String.prototype,"endsWith");return e&&!e.writable}();Id({target:"String",proto:!0,forced:!Nd&&!Cd},{endsWith:function(e){var t=kd(Ad(this));Td(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,o=void 0===r?n:Ld(jd(r),n),i=kd(e);return Rd(t,o-i.length,o)===i}});var Dd=Pe,Ud=to,$d=_i,Bd=Ne,Fd=Dd("".charAt),Wd=Dd("".charCodeAt),Gd=Dd("".slice),Kd=function(e){return function(t,r){var n,o,i=$d(Bd(t)),a=Ud(r),u=i.length;return a<0||a>=u?e?"":void 0:(n=Wd(i,a))<55296||n>56319||a+1===u||(o=Wd(i,a+1))<56320||o>57343?e?Fd(i,a):n:e?Gd(i,a,a+2):o-56320+(n-55296<<10)+65536}},zd=(Kd(!1),Kd(!0)),Hd=Pe,Vd=Ut,qd=Math.floor,Yd=Hd("".charAt),Zd=Hd("".replace),Jd=Hd("".slice),Xd=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Qd=/\$([$&'`]|\d{1,2})/g,eh=ni,th=fe,rh=Pe,nh=cc,oh=ae,ih=Ar,ah=Fe,uh=Re,ch=to,sh=uo,lh=_i,fh=Ne,ph=function(e,t,r){return t+(r?zd(e,t).length:1)},dh=wt,hh=function(e,t,r,n,o,i){var a=r+e.length,u=n.length,c=Qd;return void 0!==o&&(o=Vd(o),c=Xd),Zd(i,c,(function(i,c){var s;switch(Yd(c,0)){case"$":return"$";case"&":return e;case"`":return Jd(t,0,r);case"'":return Jd(t,a);case"<":s=o[Jd(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>u){var f=qd(l/10);return 0===f?i:f<=u?void 0===n[f-1]?Yd(c,1):n[f-1]+Yd(c,1):i}s=n[l-1]}return void 0===s?"":s}))},vh=yc,yh=tr("replace"),gh=Math.max,mh=Math.min,bh=rh([].concat),wh=rh([].push),Eh=rh("".indexOf),Sh=rh("".slice),Ph="$0"==="a".replace(/./,"$0"),Oh=!!/./[yh]&&""===/./[yh]("a","$0");function Ih(e){return as(this,void 0,void 0,(function*(){return(yield function(){const e=window;return new Promise((t=>{var r,n;if(null===(n=null===(r=e.unisphere)||void 0===r?void 0:r.instancesManager)||void 0===n?void 0:n.get)t(e.unisphere.instancesManager.get);else{const r=()=>{document.removeEventListener("unisphere-ready",r),t(e.unisphere.instancesManager.get)};document.addEventListener("unisphere-ready",r)}}))}())(e)}))}function xh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xh=function(){return!!e})()}nh("replace",(function(e,t,r){var n=Oh?"$":"$0";return[function(e,r){var n=fh(this),o=uh(e)?void 0:dh(e,yh);return o?th(o,e,n,r):th(t,lh(n),e,r)},function(e,o){var i=ih(this),a=lh(e);if("string"==typeof o&&-1===Eh(o,n)&&-1===Eh(o,"$<")){var u=r(t,i,a,o);if(u.done)return u.value}var c=ah(o);c||(o=lh(o));var s,l=i.global;l&&(s=i.unicode,i.lastIndex=0);for(var f,p=[];null!==(f=vh(i,a))&&(wh(p,f),l);)""===lh(f[0])&&(i.lastIndex=ph(a,sh(i.lastIndex),s));for(var d,h="",v=0,y=0;y<p.length;y++){for(var g,m=lh((f=p[y])[0]),b=gh(mh(ch(f.index),a.length),0),w=[],E=1;E<f.length;E++)wh(w,void 0===(d=f[E])?d:String(d));var S=f.groups;if(c){var P=bh([m],w,b,a);void 0!==S&&wh(P,S),g=lh(eh(o,void 0,P))}else g=hh(m,a,b,w,S,o);b>=v&&(h+=Sh(a,v,b)+g,v=b+m.length)}return h+Sh(a,v)}]}),!!oh((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Ph||Oh),Mc();var _h=function(e){function t(e,r,n){var o,a,u,c;return i(this,t),a=this,c=[e,r,n],u=f(u=t),h(o=l(a,xh()?Reflect.construct(u,c||[],f(a).constructor):u.apply(a,c)),"isReady",!1),h(o,"workspaceName",""),h(o,"shouldCreateWorkspace",!1),o.unispherePluginManager=new te(r,o.eventManager,o.logger),o.player.config.provider.unisphereLoaderUrl&&"string"==typeof o.config.workspaceName?o.workspaceName=o.config.workspaceName:(o.workspaceName=G("kaltura_player_workspace_"),o.shouldCreateWorkspace=!0),o}return d(t,e),s(t,[{key:"getWorkspace",value:(r=o(y().mark((function e(){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.shouldCreateWorkspace){e.next=2;break}return e.abrupt("return",Od({serverUrl:this.player.config.provider.unisphereLoaderUrl,workspaceName:this.workspaceName,ui:{theme:"light",language:"en"}}));case 2:return e.abrupt("return",Ih(this.config.workspaceName));case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"loadMedia",value:function(){var e=this;this.isReady?(this.unispherePluginManager.updateSessionData(),this.unispherePluginManager.loadWidgets(this.config.widgets)):this.getWorkspace().then((function(t){e.unispherePluginManager.init(t,e.config.widgets),e.unispherePluginManager.updateSessionData(),e.isReady=!0})).catch((function(){e.logger.warn("Failed to load unisphere workspace",e.workspaceName)}))}},{key:"reset",value:function(){this.unispherePluginManager.reset()}},{key:"destroy",value:function(){this.eventManager.destroy(),this.unispherePluginManager.destroy()}}],[{key:"isValid",value:function(){return!0}}]);var r}(e.BasePlugin);h(_h,"defaultConfig",{widgets:[]}),(0,e.registerPlugin)("unisphere",_h)})(),n})()));
3
3
  //# sourceMappingURL=playkit-unisphere.js.map