diff --git a/internal/e2e-js/templates/blank/sdk_v2.min.js b/internal/e2e-js/templates/blank/sdk_v2.min.js new file mode 100644 index 000000000..6e4de60ca --- /dev/null +++ b/internal/e2e-js/templates/blank/sdk_v2.min.js @@ -0,0 +1,2 @@ +/*! For license information please see index.min.js.LICENSE.txt */ +(()=>{var e={401:function(e,t,n){var r,o;!function(i,s){"use strict";r=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function o(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(t,n){for(var o=0;o=0&&n<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(i=n,!1!==o&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t){try{return void(window.localStorage[u]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(u)+"="+n+";"}catch(e){}}}(n),s.call(a,n,e),typeof console===t&&n{"use strict";n.r(t),n.d(t,{v1:()=>p,v3:()=>w,v4:()=>S,v5:()=>E});var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),o=new Uint8Array(16);function i(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}for(var s=[],a=0;a<256;++a)s[a]=(a+256).toString(16).substr(1);const c=function(e,t){var n=t||0,r=s;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")};var u,l,d=0,f=0;const p=function(e,t,n){var r=t&&n||0,o=t||[],s=(e=e||{}).node||u,a=void 0!==e.clockseq?e.clockseq:l;if(null==s||null==a){var p=e.random||(e.rng||i)();null==s&&(s=u=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==a&&(a=l=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:f+1,y=h-d+(v-f)/1e4;if(y<0&&void 0===e.clockseq&&(a=a+1&16383),(y<0||h>d)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=h,f=v,l=a;var b=(1e4*(268435455&(h+=122192928e5))+v)%4294967296;o[r++]=b>>>24&255,o[r++]=b>>>16&255,o[r++]=b>>>8&255,o[r++]=255&b;var g=h/4294967296*1e4&268435455;o[r++]=g>>>8&255,o[r++]=255&g,o[r++]=g>>>24&15|16,o[r++]=g>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var _=0;_<6;++_)o[r+_]=s[_];return t||c(o)};function h(e,t,n){var r=function(e,r,o,i){var s=o&&i||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=new Array(e.length),n=0;n>16)+(t>>16)+(n>>16)<<16|65535&n}function y(e,t,n,r,o,i){return v((s=v(v(t,e),v(r,i)))<<(a=o)|s>>>32-a,n);var s,a}function b(e,t,n,r,o,i,s){return y(t&n|~t&r,e,t,o,i,s)}function g(e,t,n,r,o,i,s){return y(t&r|n&~r,e,t,o,i,s)}function _(e,t,n,r,o,i,s){return y(t^n^r,e,t,o,i,s)}function m(e,t,n,r,o,i,s){return y(n^(t|~r),e,t,o,i,s)}const w=h("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Array(t.length);for(var n=0;n>5]>>>t%32&255,r=parseInt(s.charAt(n>>>4&15)+s.charAt(15&n),16),o.push(r);return o}(function(e,t){var n,r,o,i,s;e[t>>5]|=128<>>9<<4)]=t;var a=1732584193,c=-271733879,u=-1732584194,l=271733878;for(n=0;n>2)-1]=void 0,t=0;t>5]|=(255&e[t/8])<>>32-t}const E=h("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=new Array(r.length);for(var o=0;o>>0;v=h,h=p,p=I(f,30)>>>0,f=d,d=b}n[0]=n[0]+d>>>0,n[1]=n[1]+f>>>0,n[2]=n[2]+p>>>0,n[3]=n[3]+h>>>0,n[4]=n[4]+v>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}))},305:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ping=t.Reauthenticate=t.Execute=t.Subscription=t.Connect=void 0;var r=n(995);Object.defineProperty(t,"Connect",{enumerable:!0,get:function(){return r.Connect}});var o=n(597);Object.defineProperty(t,"Execute",{enumerable:!0,get:function(){return o.Execute}});var i=n(943);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return i.Subscription}});var s=n(151);Object.defineProperty(t,"Reauthenticate",{enumerable:!0,get:function(){return s.Reauthenticate}});var a=n(410);Object.defineProperty(t,"Ping",{enumerable:!0,get:function(){return a.Ping}})},702:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Result=t.Unsubscribe=t.Subscribe=t.Broadcast=t.Info=t.Modify=t.Bye=t.Attach=t.Answer=t.Invite=t.Login=void 0;var s=i(n(84)),a=n(733);Object.defineProperty(t,"Login",{enumerable:!0,get:function(){return a.Login}});var c=n(46);Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return c.Result}});var u=n(257),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.toString=function(){return u.VertoMethod.Invite},t}(s.default);t.Invite=l;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.toString=function(){return u.VertoMethod.Answer},t}(s.default);t.Answer=d;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.toString=function(){return u.VertoMethod.Attach},t}(s.default);t.Attach=f;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.toString=function(){return u.VertoMethod.Bye},t}(s.default);t.Bye=p;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.toString=function(){return u.VertoMethod.Modify},t}(s.default);t.Modify=h;var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.toString=function(){return u.VertoMethod.Info},t}(s.default);t.Info=v;var y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.toString=function(){return u.VertoMethod.Broadcast},t}(s.default);t.Broadcast=y;var b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.toString=function(){return u.VertoMethod.Subscribe},t}(s.default);t.Subscribe=b;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.toString=function(){return u.VertoMethod.Unsubscribe},t}(s.default);t.Unsubscribe=g},995:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setAgentName=t.Connect=void 0;var s=i(n(269)),a=null;t.setAgentName=function(e){a=e};var c=function(e){function t(t,n){var r=e.call(this)||this;r.method="blade.connect";var o={version:{major:2,minor:1,revision:0},authentication:t};return n&&(o.sessionid=n),a&&(o.agent=a),r.buildRequest({method:r.method,params:o}),r}return o(t,e),t}(s.default);t.Connect=c},597:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Execute=void 0;var s=function(e){function t(t,n){void 0===n&&(n="");var r,o=e.call(this)||this;return o.method="blade.execute",r=t.hasOwnProperty("result")?{result:t}:{method:o.method,params:t},n&&(r.id=n),o.buildRequest(r),o}return o(t,e),t}(i(n(269)).default);t.Execute=s},410:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Ping=void 0;var s=function(e){function t(){var t=e.call(this)||this;return t.method="blade.ping",t.buildRequest({method:t.method,params:{}}),t}return o(t,e),t}(i(n(269)).default);t.Ping=s},151:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Reauthenticate=void 0;var s=function(e){function t(t,n,r){var o=e.call(this)||this;o.method="blade.reauthenticate";var i={sessionid:r,authentication:{project:t,jwt_token:n}};return o.buildRequest({method:o.method,params:i}),o}return o(t,e),t}(i(n(269)).default);t.Reauthenticate=s},943:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Subscription=void 0;var s=function(e){function t(t){var n=e.call(this)||this;return n.method="blade.subscription",t.hasOwnProperty("auto_create")&&!t.auto_create&&delete t.auto_create,t.hasOwnProperty("downstream")&&!t.downstream&&delete t.downstream,n.buildRequest({method:n.method,params:t}),n}return o(t,e),t}(i(n(269)).default);t.Subscription=s},84:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queueLength=t.isQueued=t.deRegisterAll=t.deRegister=t.registerOnce=t.register=t.trigger=void 0;var r=n(742),o="GLOBAL",i={},s=function(e,t){return void 0===t&&(t=o),i.hasOwnProperty(e)&&i[e].hasOwnProperty(t)};t.isQueued=s,t.queueLength=function(e,t){return void 0===t&&(t=o),s(e,t)?i[e][t].length:0};var a=function(e,t,n){void 0===n&&(n=o),i.hasOwnProperty(e)||(i[e]={}),i[e].hasOwnProperty(n)||(i[e][n]=[]),i[e][n].push(t)};t.register=a,t.registerOnce=function(e,t,n){void 0===n&&(n=o);var r=function r(o){c(e,r,n),t(o)};return r.prototype.targetRef=t,a(e,r,n)};var c=function(e,t,n){if(void 0===n&&(n=o),!s(e,n))return!1;if((0,r.isFunction)(t))for(var a=i[e][n].length-1;a>=0;a--){var c=i[e][n][a];(t===c||c.prototype&&t===c.prototype.targetRef)&&i[e][n].splice(a,1)}else i[e][n]=[];return 0===i[e][n].length&&(delete i[e][n],(0,r.objEmpty)(i[e])&&delete i[e]),!0};t.deRegister=c,t.trigger=function e(t,n,r,a){void 0===r&&(r=o),void 0===a&&(a=!0);var c=a&&r!==o;if(!s(t,r))return c&&e(t,n),!1;var u=i[t][r].length;if(!u)return c&&e(t,n),!1;for(var l=u-1;l>=0;l--)i[t][r][l](n);return c&&e(t,n),!0},t.deRegisterAll=function(e){delete i[e]}},572:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.BladeMethod=t.SwEvent=t.SESSION_ID=t.REMOVE=t.ADD=t.STORAGE_PREFIX=void 0,t.STORAGE_PREFIX="@signalwire:",t.ADD="add",t.REMOVE="remove",t.SESSION_ID="sessId",function(e){e.SocketOpen="signalwire.socket.open",e.SocketClose="signalwire.socket.close",e.SocketError="signalwire.socket.error",e.SocketMessage="signalwire.socket.message",e.SpeedTest="signalwire.internal.speedtest",e.Ready="signalwire.ready",e.Error="signalwire.error",e.Notification="signalwire.notification",e.Messages="signalwire.messages",e.Calls="signalwire.calls",e.MediaError="signalwire.rtc.mediaError"}(n||(t.SwEvent=n={})),function(e){e.Broadcast="blade.broadcast",e.Disconnect="blade.disconnect"}(r||(t.BladeMethod=r={}))},742:function(e,t,n){"use strict";function r(e){return r="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},r(e)}var o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.randomInt=t.destructResponse=t.checkWebSocketHost=t.findElementByType=t.isFunction=t.isDefined=t.safeParseJson=t.mutateLiveArrayData=t.mutateStorageKey=t.objEmpty=t.deepCopy=void 0;var s=i(n(10)),a=n(281);t.deepCopy=function(e){return JSON.parse(JSON.stringify(e))},t.objEmpty=function(e){return 0===Object.keys(e).length},t.mutateStorageKey=function(e){return"".concat(a.STORAGE_PREFIX).concat(e)},t.mutateLiveArrayData=function(e){var t=o(e,6),n=t[0],r=t[1],i=t[2],a=t[3],c=t[4],u=t[5],l={};try{l=JSON.parse(c.replace(/ID"/g,'Id"'))}catch(e){s.default.warn("Verto LA invalid media JSON string:",c)}return{participantId:Number(n),participantNumber:r,participantName:i,codec:a,media:l,participantData:u}},t.safeParseJson=function(e){if("string"!=typeof e)return e;try{return JSON.parse(e)}catch(t){return e}},t.isDefined=function(e){return void 0!==e},t.isFunction=function(e){return e instanceof Function||"function"==typeof e},t.findElementByType=function(e){return"object"===("undefined"==typeof document?"undefined":r(document))&&"getElementById"in document?"string"==typeof e?document.getElementById(e)||null:"function"==typeof e?e():e instanceof HTMLMediaElement?e:null:null};var c=/^(ws|wss):\/\//;t.checkWebSocketHost=function(e){var t=c.test(e)?"":"wss://";return"".concat(t).concat(e)},t.destructResponse=function(e,n){void 0===n&&(n=null);var r=e.result,o=void 0===r?{}:r,i=e.error;if(i)return{error:i};var s=o.result,a=void 0===s?null:s;if(null===a)return null!==n&&(o.node_id=n),{result:o};var c=a.code,u=void 0===c?null:c,l=a.node_id,d=void 0===l?null:l,f=a.result,p=void 0===f?null:f;return u&&"200"!==u?{error:a}:p?(0,t.destructResponse)(p,d):{result:a}},t.randomInt=function(e,t){return Math.floor(Math.random()*(t-e+1)+e)}},815:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},10:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(401)).default.getLogger("signalwire"),i=o.methodFactory;o.methodFactory=function(e,t,n){var r=i(e,t,n);return function(){for(var e=[(new Date).toISOString().replace("T"," ").replace("Z",""),"-"],t=0;t0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=0&&(n._lastSerno=e),t};var r=e.iceServers,o=e.speaker,i=e.micId,s=e.micLabel,a=e.camId,c=e.camLabel,u=e.localElement,l=e.remoteElement,d=e.mediaConstraints,f=d.audio,h=d.video;this.options=Object.assign({},p.DEFAULT_CALL_OPTIONS,{audio:f,video:h,iceServers:r,localElement:u,remoteElement:l,micId:i,micLabel:s,camId:a,camLabel:c,speakerId:o},t),this._onMediaError=this._onMediaError.bind(this),this._init()}return Object.defineProperty(e.prototype,"nodeId",{get:function(){return this._targetNodeId},set:function(e){this._targetNodeId=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localStream",{get:function(){return this.options.localStream},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"remoteStream",{get:function(){return this.options.remoteStream},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"memberChannel",{get:function(){return"conference-member.".concat(this.id)},enumerable:!1,configurable:!0}),e.prototype.invite=function(){this.direction=p.Direction.Outbound,this.peer=new d.default(p.PeerType.Offer,this.options),this._registerPeerEvents()},e.prototype.answer=function(e){e&&(null==e?void 0:e.iceTransportPolicy)&&(this.options.iceTransportPolicy=null==e?void 0:e.iceTransportPolicy),this.direction=p.Direction.Inbound,this.peer=new d.default(p.PeerType.Answer,this.options),this._registerPeerEvents()},e.prototype.applyMediaConstraints=function(e){var t=this,n=e.mediaParams;n&&Object.keys(n).forEach((function(e){var r;if("video"==e)t.peer.applyMediaConstraints(e,n[e]);else if("audio"==e){var o=null===(r=t.options.localStream)||void 0===r?void 0:r.getAudioTracks()[0].getSettings();o&&o.deviceId&&t.setAudioInDevice(o.deviceId,n[e])}}))},e.prototype.hangup=function(e,t){var n=this;void 0===e&&(e={}),void 0===t&&(t=!0),this.cause=e.cause||"NORMAL_CLEARING",this.causeCode=e.causeCode||16,this.setState(p.State.Hangup);var r=function(){n.peer&&n.peer.instance.close(),n.setState(p.State.Destroy)};if(t){var o=new l.Bye({sessid:this.session.sessionid,dialogParams:this.options});this._execute(o).catch((function(e){return u.default.error("verto.bye failed!",e)})).then(r.bind(this))}else r()},e.prototype.transfer=function(e){var t=new l.Modify({sessid:this.session.sessionid,action:"transfer",destination:e,dialogParams:this.options});this._execute(t)},e.prototype.replace=function(e){var t=new l.Modify({sessid:this.session.sessionid,action:"replace",replaceCallID:e,dialogParams:this.options});this._execute(t)},e.prototype.hold=function(){var e=new l.Modify({sessid:this.session.sessionid,action:"hold",dialogParams:this.options});return this._execute(e).then(this._handleChangeHoldStateSuccess.bind(this)).catch(this._handleChangeHoldStateError.bind(this))},e.prototype.unhold=function(){var e=new l.Modify({sessid:this.session.sessionid,action:"unhold",dialogParams:this.options});return this._execute(e).then(this._handleChangeHoldStateSuccess.bind(this)).catch(this._handleChangeHoldStateError.bind(this))},e.prototype.toggleHold=function(){var e=new l.Modify({sessid:this.session.sessionid,action:"toggleHold",dialogParams:this.options});return this._execute(e).then(this._handleChangeHoldStateSuccess.bind(this)).catch(this._handleChangeHoldStateError.bind(this))},e.prototype.dtmf=function(e){var t=new l.Info({sessid:this.session.sessionid,dtmf:e,dialogParams:this.options});this._execute(t)},e.prototype.message=function(e,t){var n={from:this.session.options.login,to:e,body:t},r=new l.Info({sessid:this.session.sessionid,msg:n,dialogParams:this.options});this._execute(r)},e.prototype.muteAudio=function(){(0,v.disableAudioTracks)(this.options.localStream)},e.prototype.unmuteAudio=function(){(0,v.enableAudioTracks)(this.options.localStream)},e.prototype.toggleAudioMute=function(){(0,v.toggleAudioTracks)(this.options.localStream)},e.prototype.setAudioInDevice=function(e,t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){var n,r,i,a,c;return s(this,(function(s){switch(s.label){case 0:return n=this.peer.instance,r=n.getSenders().find((function(e){return"audio"===e.track.kind})),r?[4,(0,b.getUserMedia)({audio:o({deviceId:{exact:e}},t)})]:[3,2];case 1:i=s.sent(),a=i.getAudioTracks()[0],r.replaceTrack(a),this.options.micId=e,(c=this.options.localStream).getAudioTracks().forEach((function(e){return e.stop()})),c.getVideoTracks().forEach((function(e){return i.addTrack(e)})),this.options.localStream=i,s.label=2;case 2:return[2]}}))}))},e.prototype.muteVideo=function(){(0,v.disableVideoTracks)(this.options.localStream)},e.prototype.unmuteVideo=function(){(0,v.enableVideoTracks)(this.options.localStream)},e.prototype.toggleVideoMute=function(){(0,v.toggleVideoTracks)(this.options.localStream)},e.prototype.setVideoDevice=function(e){return i(this,void 0,void 0,(function(){var t,n,r,o,i,a,c;return s(this,(function(s){switch(s.label){case 0:return t=this.peer.instance,n=t.getSenders().find((function(e){return"video"===e.track.kind})),n?[4,(0,b.getUserMedia)({video:{deviceId:{exact:e}}})]:[3,2];case 1:r=s.sent(),o=r.getVideoTracks()[0],n.replaceTrack(o),i=this.options,a=i.localElement,c=i.localStream,(0,b.attachMediaStream)(a,r),this.options.camId=e,c.getAudioTracks().forEach((function(e){return r.addTrack(e)})),c.getVideoTracks().forEach((function(e){return e.stop()})),this.options.localStream=r,s.label=2;case 2:return[2]}}))}))},e.prototype.deaf=function(){(0,v.disableAudioTracks)(this.options.remoteStream)},e.prototype.undeaf=function(){(0,v.enableAudioTracks)(this.options.remoteStream)},e.prototype.toggleDeaf=function(){(0,v.toggleAudioTracks)(this.options.remoteStream)},e.prototype.setState=function(e){var t=this;switch(this._prevState=this._state,this._state=e,this.state=p.State[this._state].toLowerCase(),this.prevState=p.State[this._prevState].toLowerCase(),u.default.info("Call ".concat(this.id," state change from ").concat(this.prevState," to ").concat(this.state)),this._dispatchNotification({type:p.NOTIFICATION_TYPE.callUpdate,call:this}),e){case p.State.Purge:this.hangup({cause:"PURGE",causeCode:"01"},!1);break;case p.State.Active:setTimeout((function(){var e=t.options,n=e.remoteElement,r=e.speakerId;n&&r&&(0,b.setMediaElementSinkId)(n,r)}),0);break;case p.State.Destroy:this._finalize()}},e.prototype.handleMessage=function(e){var t=e.method,n=e.params;switch(t){case p.VertoMethod.Answer:if(this.gotAnswer=!0,this._state>=p.State.Active)return;this._state>=p.State.Early&&this.setState(p.State.Active),this.gotEarly||this._onRemoteSdp(n.sdp);break;case p.VertoMethod.Media:if(this._state>=p.State.Early)return;this.gotEarly=!0,this._onRemoteSdp(n.sdp);break;case p.VertoMethod.Display:case p.VertoMethod.Attach:var r=n.display_name,i=n.display_number,s=n.display_direction;this.extension=i;var a=s===p.Direction.Inbound?p.Direction.Outbound:p.Direction.Inbound,c={type:p.NOTIFICATION_TYPE[t],call:this,displayName:r,displayNumber:i,displayDirection:a};(0,h.trigger)(f.SwEvent.Notification,c,this.id)||(0,h.trigger)(f.SwEvent.Notification,c,this.session.uuid);break;case p.VertoMethod.Info:case p.VertoMethod.Event:c=o(o({},n),{type:p.NOTIFICATION_TYPE.generic,call:this}),(0,h.trigger)(f.SwEvent.Notification,c,this.id)||(0,h.trigger)(f.SwEvent.Notification,c,this.session.uuid);break;case p.VertoMethod.MediaParams:this.applyMediaConstraints(n);break;case p.VertoMethod.Bye:this.hangup(n,!1)}},e.prototype.handleConferenceUpdate=function(e,t){return i(this,void 0,void 0,(function(){var n,r,i,a,c,l,d,f,h,v,b,g,_;return s(this,(function(s){switch(s.label){case 0:if(!this._checkConferenceSerno(e.wireSerno)&&e.name!==t.laName)return u.default.error("ConferenceUpdate invalid wireSerno or packet name:",e),[2,"INVALID_PACKET"];switch(n=e.action,r=e.data,i=e.hashKey,a=void 0===i?String(this._lastSerno):i,c=e.arrIndex,n){case"bootObj":return[3,1];case"add":return[3,8];case"modify":return[3,9];case"del":return[3,10];case"clear":return[3,11]}return[3,12];case 1:return this._lastSerno=0,t.chatID,l=t.chatChannel,d=t.infoChannel,f=t.modChannel,h=t.laName,v=t.conferenceMemberID,b=t.role,this._dispatchConferenceUpdate({action:p.ConferenceAction.Join,conferenceName:h,participantId:Number(v),role:b}),l?[4,this._subscribeConferenceChat(l)]:[3,3];case 2:s.sent(),s.label=3;case 3:return d?[4,this._subscribeConferenceInfo(d)]:[3,5];case 4:s.sent(),s.label=5;case 5:return f&&b===p.Role.Moderator?[4,this._subscribeConferenceModerator(f)]:[3,7];case 6:s.sent(),s.label=7;case 7:for(_ in g=[],r)g.push(o({callId:r[_][0],index:Number(_)},(0,y.mutateLiveArrayData)(r[_][1])));return this._dispatchConferenceUpdate({action:p.ConferenceAction.Bootstrap,participants:g}),[3,13];case 8:return this._dispatchConferenceUpdate(o({action:p.ConferenceAction.Add,callId:a,index:c},(0,y.mutateLiveArrayData)(r))),[3,13];case 9:return this._dispatchConferenceUpdate(o({action:p.ConferenceAction.Modify,callId:a,index:c},(0,y.mutateLiveArrayData)(r))),[3,13];case 10:return this._dispatchConferenceUpdate(o({action:p.ConferenceAction.Delete,callId:a,index:c},(0,y.mutateLiveArrayData)(r))),[3,13];case 11:return this._dispatchConferenceUpdate({action:p.ConferenceAction.Clear}),[3,13];case 12:return this._dispatchConferenceUpdate({action:n,data:r,callId:a,index:c}),[3,13];case 13:return[2]}}))}))},e.prototype._addChannel=function(e){this.channels.includes(e)||this.channels.push(e);var t=this.session.relayProtocol;this.session._existsSubscription(t,e)&&(this.session.subscriptions[t][e]=o(o({},this.session.subscriptions[t][e]),{callId:this.id}))},e.prototype._subscribeConferenceChat=function(e){return i(this,void 0,void 0,(function(){var t,n,r=this;return s(this,(function(o){switch(o.label){case 0:return t={nodeId:this.nodeId,channels:[e],handler:function(e){var t=e.data,n=t.direction,o=t.from,i=t.fromDisplay,s=t.message,a=t.type;r._dispatchConferenceUpdate({action:p.ConferenceAction.ChatMessage,direction:n,participantNumber:o,participantName:i,messageText:s,messageType:a,messageId:e.eventSerno})}},[4,this.session.vertoSubscribe(t).catch((function(e){u.default.error("ConfChat subscription error:",e)}))];case 1:return n=o.sent(),(0,v.checkSubscribeResponse)(n,e)&&(this._addChannel(e),Object.defineProperties(this,{sendChatMessage:{configurable:!0,value:function(t,n){r.session.vertoBroadcast({nodeId:r.nodeId,channel:e,data:{action:"send",message:t,type:n}})}}})),[2]}}))}))},e.prototype._subscribeConferenceInfo=function(e){return i(this,void 0,void 0,(function(){var t,n,r=this;return s(this,(function(o){switch(o.label){case 0:return t={nodeId:this.nodeId,channels:[e],handler:function(e){var t=e.eventData;"layout-info"===t.contentType?(t.callID=r.id,(0,g.MCULayoutEventHandler)(r.session,t)):u.default.error("Conference-Info unknown contentType",e)}},[4,this.session.vertoSubscribe(t).catch((function(e){u.default.error("ConfInfo subscription error:",e)}))];case 1:return n=o.sent(),(0,v.checkSubscribeResponse)(n,e)&&this._addChannel(e),[2]}}))}))},e.prototype._confControl=function(e,t){void 0===t&&(t={});var n=o({application:"conf-control",callID:this.id,value:null},t);this.session.vertoBroadcast({nodeId:this.nodeId,channel:e,data:n})},e.prototype._subscribeConferenceModerator=function(e){return i(this,void 0,void 0,(function(){var t,n,o,i,a=this;return s(this,(function(s){switch(s.label){case 0:return t=function(t,n,r){void 0===n&&(n=null),void 0===r&&(r=null);var o=parseInt(n)||null;a._confControl(e,{command:t,id:o,value:r})},n=function(){var e=a.options.video;if("boolean"==typeof e&&!e||"object"===r(e)&&(0,y.objEmpty)(e))throw"Conference ".concat(a.id," has no video!")},o={nodeId:this.nodeId,channels:[e],handler:function(e){var t=e.data;if("list-videoLayouts"===t["conf-command"]){if(t.responseData){var n=JSON.stringify(t.responseData).replace(/IDS"/g,'Ids"');a._dispatchConferenceUpdate({action:p.ConferenceAction.LayoutList,layouts:JSON.parse(n)})}}else a._dispatchConferenceUpdate({action:p.ConferenceAction.ModCmdResponse,command:t["conf-command"],response:t.response})}},[4,this.session.vertoSubscribe(o).catch((function(e){u.default.error("ConfMod subscription error:",e)}))];case 1:return i=s.sent(),(0,v.checkSubscribeResponse)(i,e)&&(this.role=p.Role.Moderator,this._addChannel(e),Object.defineProperties(this,{listVideoLayouts:{configurable:!0,value:function(){t("list-videoLayouts")}},playMedia:{configurable:!0,value:function(e){t("play",null,e)}},stopMedia:{configurable:!0,value:function(){t("stop",null,"all")}},deaf:{configurable:!0,value:function(e){t("deaf",e)}},undeaf:{configurable:!0,value:function(e){t("undeaf",e)}},startRecord:{configurable:!0,value:function(e){t("recording",null,["start",e])}},stopRecord:{configurable:!0,value:function(){t("recording",null,["stop","all"])}},snapshot:{configurable:!0,value:function(e){n(),t("vid-write-png",null,e)}},setVideoLayout:{configurable:!0,value:function(e,r){n(),t("vid-layout",null,r?[e,r]:e)}},kick:{configurable:!0,value:function(e){t("kick",e)}},muteMic:{configurable:!0,value:function(e){t("tmute",e)}},muteVideo:{configurable:!0,value:function(e){n(),t("tvmute",e)}},presenter:{configurable:!0,value:function(e){n(),t("vid-res-id",e,"presenter")}},videoFloor:{configurable:!0,value:function(e){n(),t("vid-floor",e,"force")}},banner:{configurable:!0,value:function(e,r){n(),t("vid-banner",e,encodeURI(r))}},volumeDown:{configurable:!0,value:function(e){t("volume_out",e,"down")}},volumeUp:{configurable:!0,value:function(e){t("volume_out",e,"up")}},gainDown:{configurable:!0,value:function(e){t("volume_in",e,"down")}},gainUp:{configurable:!0,value:function(e){t("volume_in",e,"up")}},transfer:{configurable:!0,value:function(e,n){t("transfer",e,n)}}})),[2]}}))}))},e.prototype._handleChangeHoldStateSuccess=function(e){return"active"===e.holdState?this.setState(p.State.Active):this.setState(p.State.Held),!0},e.prototype._handleChangeHoldStateError=function(e){return u.default.error("Failed to ".concat(e.action," on call ").concat(this.id)),!1},e.prototype._onRemoteSdp=function(e){var t=this,n=(0,v.sdpMediaOrderHack)(e,this.peer.instance.localDescription.sdp);this.options.useStereo&&(n=(0,v.sdpStereoHack)(n));var r=(0,b.sdpToJsonHack)({sdp:n,type:p.PeerType.Answer});this.peer.instance.setRemoteDescription(r).then((function(){t.gotEarly&&t.setState(p.State.Early),t.gotAnswer&&t.setState(p.State.Active)})).catch((function(e){u.default.error("Call setRemoteDescription Error: ",e),t.hangup()}))},e.prototype._requestAnotherLocalDescription=function(){(0,y.isFunction)(this.peer.onSdpReadyTwice)?(0,h.trigger)(f.SwEvent.Error,new Error("SDP without candidates for the second time!"),this.session.uuid):(Object.defineProperty(this.peer,"onSdpReadyTwice",{value:this._onIceSdp.bind(this)}),this._iceDone=!1,this.peer.startNegotiation())},e.prototype._onIceSdp=function(e){var t=this;this._iceTimeout&&clearTimeout(this._iceTimeout),this._iceTimeout=null,this._iceDone=!0;var n=e.sdp,r=e.type;if(-1!==n.indexOf("candidate")){var o=null,i={sessid:this.session.sessionid,sdp:n,dialogParams:this.options};switch(r){case p.PeerType.Offer:this.setState(p.State.Requesting),o=new l.Invite(i);break;case p.PeerType.Answer:this.setState(p.State.Answering),o=!0===this.options.attach?new l.Attach(i):new l.Answer(i);break;default:return u.default.error("".concat(this.id," - Unknown local SDP type:"),e),this.hangup({},!1)}this._execute(o).then((function(e){var n=e.node_id,o=void 0===n?null:n;t._targetNodeId=o,r===p.PeerType.Offer?t.setState(p.State.Trying):t.setState(p.State.Active)})).catch((function(e){u.default.error("".concat(t.id," - Sending ").concat(r," error:"),e),t.hangup()}))}else this._requestAnotherLocalDescription()},e.prototype._registerPeerEvents=function(){var e=this,t=this.peer.instance;this._iceDone=!1,t.onicecandidate=function(n){e._iceDone||(null===e._iceTimeout&&(e._iceTimeout=setTimeout((function(){return e._onIceSdp(t.localDescription)}),1e3)),n.candidate?u.default.info("IceCandidate:",n.candidate):e._onIceSdp(t.localDescription))},t.addEventListener("track",(function(t){e.options.remoteStream=t.streams[0];var n=e.options,r=n.remoteElement,o=n.remoteStream;!1===n.screenShare&&(0,b.attachMediaStream)(r,o)})),t.addEventListener("addstream",(function(t){e.options.remoteStream=t.stream}))},e.prototype._onMediaError=function(e){this._dispatchNotification({type:p.NOTIFICATION_TYPE.userMediaError,error:e}),this.hangup({},!1)},e.prototype._dispatchConferenceUpdate=function(e){this._dispatchNotification(o({type:p.NOTIFICATION_TYPE.conferenceUpdate,call:this},e))},e.prototype._dispatchNotification=function(e){!0!==this.options.screenShare&&((0,h.trigger)(f.SwEvent.Notification,e,this.id,!1)||(0,h.trigger)(f.SwEvent.Notification,e,this.session.uuid))},e.prototype._execute=function(e){return this.nodeId&&(e.targetNodeId=this.nodeId),this.session.execute(e)},e.prototype._init=function(){var e=this.options,t=e.id,n=e.userVariables,r=e.remoteCallerNumber,o=e.onNotification;t||(this.options.id=(0,c.v4)()),this.id=this.options.id,n&&!(0,y.objEmpty)(n)||(this.options.userVariables=this.session.options.userVariables||{}),r||(this.options.remoteCallerNumber=this.options.destinationNumber),this.session.calls[this.id]=this,(0,h.register)(f.SwEvent.MediaError,this._onMediaError,this.id),(0,y.isFunction)(o)&&(0,h.register)(f.SwEvent.Notification,o.bind(this),this.id),this.setState(p.State.New),u.default.info("New Call with Options:",this.options)},e.prototype._finalize=function(){var e=this.options,t=e.remoteStream,n=e.localStream,r=e.remoteElement,o=e.localElement;(0,b.stopStream)(t),(0,b.stopStream)(n),!0!==this.options.screenShare&&((0,b.detachMediaStream)(r),(0,b.detachMediaStream)(o)),(0,h.deRegister)(f.SwEvent.MediaError,null,this.id),this.peer=null,this.session.calls[this.id]=null,delete this.session.calls[this.id]},e}();t.default=_},662:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]=200&&e.status<300?[2,t]:(n="HTTP Request failed with status ".concat(e.status),(r=new Error(n)).payload=t,[2,Promise.reject(r)])}}))}))}))};var n=e.hostname,r=void 0===n?location.hostname:n;this.hostname=r}return e.prototype.userLogin=function(e,t){return o(this,void 0,void 0,(function(){var n;return i(this,(function(o){switch(o.label){case 0:return[4,this._fetch("".concat(this.baseUrl,"/login/user"),r(r({},c),{body:JSON.stringify({username:e,password:t,hostname:this.hostname})}))];case 1:return n=o.sent(),a.default.info("userLogin response",n),[2,n]}}))}))},e.prototype.guestLogin=function(e,t,n){return o(this,void 0,void 0,(function(){var o;return i(this,(function(i){switch(i.label){case 0:return[4,this._fetch("".concat(this.baseUrl,"/login/guest"),r(r({},c),{body:JSON.stringify({name:e,email:t,token:n,hostname:this.hostname})}))];case 1:return o=i.sent(),a.default.info("guestLogin response",o),[2,o]}}))}))},e.prototype.refresh=function(){return o(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this._fetch("".concat(this.baseUrl,"/refresh"),r(r({},c),{method:"PUT",body:JSON.stringify({hostname:this.hostname})}))];case 1:return e=t.sent(),a.default.info("refresh response",e),[2,e]}}))}))},e.prototype.checkInviteToken=function(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this._fetch("".concat(this.baseUrl,"/check-token"),r(r({},c),{body:JSON.stringify({token:e,hostname:this.hostname})}))];case 1:return t=n.sent(),a.default.info("checkInviteToken response",t),[2,t]}}))}))},e}();t.default=u},370:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{"use strict";var n,r,o,i,s,a,c,u;Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceType=t.ConferenceAction=t.Role=t.State=t.DEFAULT_CALL_OPTIONS=t.NOTIFICATION_TYPE=t.VertoMethod=t.Direction=t.PeerType=void 0,function(e){e.Offer="offer",e.Answer="answer"}(r||(t.PeerType=r={})),function(e){e.Inbound="inbound",e.Outbound="outbound"}(o||(t.Direction=o={})),function(e){e.Invite="verto.invite",e.Attach="verto.attach",e.Answer="verto.answer",e.Info="verto.info",e.Display="verto.display",e.Media="verto.media",e.Event="verto.event",e.Bye="verto.bye",e.Punt="verto.punt",e.Broadcast="verto.broadcast",e.Subscribe="verto.subscribe",e.Unsubscribe="verto.unsubscribe",e.ClientReady="verto.clientReady",e.Modify="verto.modify",e.MediaParams="verto.mediaParams"}(i||(t.VertoMethod=i={})),t.NOTIFICATION_TYPE=((n={generic:"event"})[i.Display]="participantData",n[i.Attach]="participantData",n.conferenceUpdate="conferenceUpdate",n.callUpdate="callUpdate",n.vertoClientReady="vertoClientReady",n.userMediaError="userMediaError",n.refreshToken="refreshToken",n),t.DEFAULT_CALL_OPTIONS={destinationNumber:"",remoteCallerName:"Outbound Call",remoteCallerNumber:"",callerName:"",callerNumber:"",audio:!0,video:!1,useStereo:!1,attach:!1,screenShare:!1,userVariables:{}},function(e){e[e.New=0]="New",e[e.Requesting=1]="Requesting",e[e.Trying=2]="Trying",e[e.Recovering=3]="Recovering",e[e.Ringing=4]="Ringing",e[e.Answering=5]="Answering",e[e.Early=6]="Early",e[e.Active=7]="Active",e[e.Held=8]="Held",e[e.Hangup=9]="Hangup",e[e.Destroy=10]="Destroy",e[e.Purge=11]="Purge"}(s||(t.State=s={})),function(e){e.Participant="participant",e.Moderator="moderator"}(a||(t.Role=a={})),function(e){e.Join="join",e.Leave="leave",e.Bootstrap="bootstrap",e.Add="add",e.Modify="modify",e.Delete="delete",e.Clear="clear",e.ChatMessage="chatMessage",e.LayerInfo="layerInfo",e.LogoInfo="logoInfo",e.LayoutInfo="layoutInfo",e.LayoutList="layoutList",e.ModCmdResponse="modCommandResponse"}(c||(t.ConferenceAction=c={})),function(e){e.Video="videoinput",e.AudioIn="audioinput",e.AudioOut="audiooutput"}(u||(t.DeviceType=u={}))},266:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},l=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o=0?/stereo=1;/.test(n[s])||(n[s]+="; stereo=1; sprop-stereo=1"):n[r]+="".concat(t,"a=fmtp:").concat(o," stereo=1; sprop-stereo=1"),n.join(t)};var w=function(e){return/^m=audio/.test(e)},S=function(e){return/^m=video/.test(e)};t.sdpMediaOrderHack=function(e,t){var n="\r\n",r=t.split(n);if(r.findIndex(w)0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r=n(223);for(var o in r)this[o]=r[o];r.__esModule&&Object.defineProperty(this,"__esModule",{value:!0})})(); \ No newline at end of file diff --git a/internal/e2e-js/templates/blank/v2vanilla.html b/internal/e2e-js/templates/blank/v2vanilla.html index 5d2480ae0..c3d6ee61f 100644 --- a/internal/e2e-js/templates/blank/v2vanilla.html +++ b/internal/e2e-js/templates/blank/v2vanilla.html @@ -9,8 +9,8 @@ - - + + @@ -94,6 +94,14 @@
Remote Video
+
+ + + + + + +