@daily-co/daily-js
Version:
Please check our [our documentation site](https://docs.daily.co/) to get started. If you're building a web app with our `daily-js` front-end JavaScript library, you may be particularly interested in:
8 lines • 247 kB
JavaScript
function e(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){return n="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},n(e)}function r(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){if(t&&("object"==n(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 a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function l(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&&c(e,t)}function u(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t,n,r,i,o,s){try{var a=e[o](s),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(r,i)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){d(o,r,i,s,a,"next",e)}function a(e){d(o,r,i,s,a,"throw",e)}s(void 0)}))}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(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 v(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var g,m={exports:{}},y="object"==typeof Reflect?Reflect:null,b=y&&"function"==typeof y.apply?y.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};g=y&&"function"==typeof y.ownKeys?y.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var _=Number.isNaN||function(e){return e!=e};function w(){w.init.call(this)}m.exports=w,m.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}j(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&j(e,"error",t,n)}(e,i,{once:!0})}))},w.EventEmitter=w,w.prototype._events=void 0,w.prototype._eventsCount=0,w.prototype._maxListeners=void 0;var S=10;function k(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function M(e){return void 0===e._maxListeners?w.defaultMaxListeners:e._maxListeners}function C(e,t,n,r){var i,o,s,a;if(k(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=M(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function E(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function T(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=E.bind(r);return i.listener=n,r.wrapFn=i,i}function O(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):A(i,i.length)}function P(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function A(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function j(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(w,"defaultMaxListeners",{enumerable:!0,get:function(){return S},set:function(e){if("number"!=typeof e||e<0||_(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");S=e}}),w.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},w.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||_(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},w.prototype.getMaxListeners=function(){return M(this)},w.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[e];if(void 0===a)return!1;if("function"==typeof a)b(a,this,t);else{var c=a.length,l=A(a,c);for(n=0;n<c;++n)b(l[n],this,t)}return!0},w.prototype.addListener=function(e,t){return C(this,e,t,!1)},w.prototype.on=w.prototype.addListener,w.prototype.prependListener=function(e,t){return C(this,e,t,!0)},w.prototype.once=function(e,t){return k(t),this.on(e,T(this,e,t)),this},w.prototype.prependOnceListener=function(e,t){return k(t),this.prependListener(e,T(this,e,t)),this},w.prototype.removeListener=function(e,t){var n,r,i,o,s;if(k(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},w.prototype.off=w.prototype.removeListener,w.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},w.prototype.listeners=function(e){return O(this,e,!0)},w.prototype.rawListeners=function(e){return O(this,e,!1)},w.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):P.call(e,t)},w.prototype.listenerCount=P,w.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]};var I=m.exports,x=v(I),L=Object.prototype.hasOwnProperty;function D(e,t,n){for(n of e.keys())if(N(n,t))return n}function N(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&N(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((i=r)&&"object"==typeof i&&!(i=D(t,i)))return!1;if(!t.has(i))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((i=r[0])&&"object"==typeof i&&!(i=D(t,i)))return!1;if(!N(r[1],t.get(i)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if(L.call(e,n)&&++r&&!L.call(t,n))return!1;if(!(n in t)||!N(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}const R={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},F={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},B={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},U={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},V={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class J{static getFirstMatch(e,t){const n=t.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,t){const n=t.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){const t=e.split(".").splice(0,2).map((e=>parseInt(e,10)||0));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){const t=e.split(".").splice(0,2).map((e=>parseInt(e,10)||0));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,n=!1){const r=J.getVersionPrecision(e),i=J.getVersionPrecision(t);let o=Math.max(r,i),s=0;const a=J.map([e,t],(e=>{const t=o-J.getVersionPrecision(e),n=e+new Array(t+1).join(".0");return J.map(n.split("."),(e=>new Array(20-e.length).join("0")+e)).reverse()}));for(n&&(s=o-Math.min(r,i)),o-=1;o>=s;){if(a[0][o]>a[1][o])return 1;if(a[0][o]===a[1][o]){if(o===s)return 0;o-=1}else if(a[0][o]<a[1][o])return-1}}static map(e,t){const n=[];let r;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n}static find(e,t){let n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){const r=e[n];if(t(r,n))return r}}static assign(e,...t){const n=e;let r,i;if(Object.assign)return Object.assign(e,...t);for(r=0,i=t.length;r<i;r+=1){const e=t[r];if("object"==typeof e&&null!==e){Object.keys(e).forEach((t=>{n[t]=e[t]}))}}return e}static getBrowserAlias(e){return R[e]}static getBrowserTypeByAlias(e){return F[e]||""}}const $=/version\/(\d+(\.?_?\d+)+)/i,q=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=J.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||J.getFirstMatch($,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=J.getFirstMatch($,e)||J.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=J.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||J.getFirstMatch($,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=J.getFirstMatch($,e)||J.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=J.getFirstMatch($,e)||J.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=J.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||J.getFirstMatch($,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=J.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||J.getFirstMatch($,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=J.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||J.getFirstMatch($,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=J.getFirstMatch($,e)||J.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=J.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||J.getFirstMatch($,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=J.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||J.getFirstMatch($,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=J.getFirstMatch($,e)||J.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=J.getFirstMatch($,e)||J.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=J.getFirstMatch($,e)||J.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=J.getFirstMatch($,e)||J.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=J.getFirstMatch($,e)||J.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=J.getFirstMatch($,e)||J.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=J.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||J.getFirstMatch($,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=J.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||J.getFirstMatch($,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=J.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=J.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=J.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=J.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=J.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=J.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=J.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=J.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=J.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=J.getFirstMatch($,e)||J.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=J.getFirstMatch($,e)||J.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=J.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=J.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||J.getFirstMatch($,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=J.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||J.getFirstMatch($,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=J.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=J.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=J.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=J.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||J.getFirstMatch($,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=J.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=J.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=J.getFirstMatch($,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=J.getFirstMatch($,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=J.getFirstMatch($,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:J.getFirstMatch(t,e),version:J.getSecondMatch(t,e)}}}];var z=[{test:[/Roku\/DVP/],describe(e){const t=J.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:U.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=J.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:U.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=J.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=J.getWindowsVersionName(t);return{name:U.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:U.iOS},n=J.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=J.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=J.getMacOSVersionName(t),r={name:U.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=J.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:U.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=J.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=J.getAndroidVersionName(t),r={name:U.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=J.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:U.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=J.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||J.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||J.getFirstMatch(/\bbb(\d+)/i,e);return{name:U.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=J.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:U.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=J.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:U.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:U.Linux})},{test:[/CrOS/],describe:()=>({name:U.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=J.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:U.PlayStation4,version:t}}}],W=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(e){const t=J.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:B.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:B.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:B.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:B.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:B.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:B.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:B.tablet})},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=J.getFirstMatch(/(ipod|iphone)/i,e);return{type:B.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:B.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:B.mobile})},{test:e=>"blackberry"===e.getBrowserName(!0),describe:()=>({type:B.mobile,vendor:"BlackBerry"})},{test:e=>"bada"===e.getBrowserName(!0),describe:()=>({type:B.mobile})},{test:e=>"windows phone"===e.getBrowserName(),describe:()=>({type:B.mobile,vendor:"Microsoft"})},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:()=>({type:B.tablet})},{test:e=>"android"===e.getOSName(!0),describe:()=>({type:B.mobile})},{test:e=>"macos"===e.getOSName(!0),describe:()=>({type:B.desktop,vendor:"Apple"})},{test:e=>"windows"===e.getOSName(!0),describe:()=>({type:B.desktop})},{test:e=>"linux"===e.getOSName(!0),describe:()=>({type:B.desktop})},{test:e=>"playstation 4"===e.getOSName(!0),describe:()=>({type:B.tv})},{test:e=>"roku"===e.getOSName(!0),describe:()=>({type:B.tv})}],H=[{test:e=>"microsoft edge"===e.getBrowserName(!0),describe(e){if(/\sedg\//i.test(e))return{name:V.Blink};const t=J.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:V.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:V.Trident},n=J.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:V.Presto},n=J.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:V.Gecko},n=J.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:V.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:V.WebKit},n=J.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class G{constructor(e,t=!1){if(null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=J.find(q,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=J.find(z,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};const e=J.find(W,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=J.find(H,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return J.assign({},this.parsedResult)}satisfies(e){const t={};let n=0;const r={};let i=0;if(Object.keys(e).forEach((o=>{const s=e[o];"string"==typeof s?(r[o]=s,i+=1):"object"==typeof s&&(t[o]=s,n+=1)})),n>0){const e=Object.keys(t),n=J.find(e,(e=>this.isOS(e)));if(n){const e=this.satisfies(t[n]);if(void 0!==e)return e}const r=J.find(e,(e=>this.isPlatform(e)));if(r){const e=this.satisfies(t[r]);if(void 0!==e)return e}}if(i>0){const e=Object.keys(r),t=J.find(e,(e=>this.isBrowser(e,!0)));if(void 0!==t)return this.compareVersion(r[t])}}isBrowser(e,t=!1){const n=this.getBrowserName().toLowerCase();let r=e.toLowerCase();const i=J.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1;const i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(J.compareVersions(i,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some((e=>this.is(e)))}}
/*!
* Bowser - a browser detector
* https://github.com/lancedikson/bowser
* MIT License | (c) Dustin Diaz 2012-2015
* MIT License | (c) Denis Demchenko 2015-2019
*/class Q{static getParser(e,t=!1){if("string"!=typeof e)throw new Error("UserAgent should be a string");return new G(e,t)}static parse(e){return new G(e).getResult()}static get BROWSER_MAP(){return F}static get ENGINE_MAP(){return V}static get OS_MAP(){return U}static get PLATFORMS_MAP(){return B}}function K(){return Date.now()+Math.random().toString()}function Y(){throw new Error("Method must be implemented in subclass")}function X(e,t){return null!=t&&t.proxyUrl?t.proxyUrl+("/"===t.proxyUrl.slice(-1)?"":"/")+e.substring(8):e}function Z(e){return null!=e&&e.callObjectBundleUrlOverride?e.callObjectBundleUrlOverride:X("https://c.daily.co/call-machine/versioned/".concat("0.78.0","/static/call-machine-object-bundle.js"),e)}function ee(e){try{new URL(e)}catch(e){return!1}return!0}const te="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,ne="8.55.0",re=globalThis;function ie(e,t,n){const r=n||re,i=r.__SENTRY__=r.__SENTRY__||{},o=i[ne]=i[ne]||{};return o[e]||(o[e]=t())}const oe="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,se=["debug","info","warn","error","log","assert","trace"],ae={};function ce(e){if(!("console"in re))return e();const t=re.console,n={},r=Object.keys(ae);r.forEach((e=>{const r=ae[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}const le=ie("logger",(function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return oe?se.forEach((n=>{t[n]=(...t)=>{e&&ce((()=>{re.console[n](`Sentry Logger [${n}]:`,...t)}))}})):se.forEach((e=>{t[e]=()=>{}})),t})),ue="?",de=/\(error: (.*)\)/,he=/captureMessage|captureException/;function pe(e){return e[e.length-1]||{}}const fe="<anonymous>";function ve(e){try{return e&&"function"==typeof e&&e.name||fe}catch(e){return fe}}function ge(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch(e){return}}}const me={},ye={};function be(e,t){me[e]=me[e]||[],me[e].push(t)}function _e(e,t){if(!ye[e]){ye[e]=!0;try{t()}catch(t){oe&&le.error(`Error while instrumenting ${e}`,t)}}}function we(e,t){const n=e&&me[e];if(n)for(const r of n)try{r(t)}catch(t){oe&&le.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ve(r)}\nError:`,t)}}let Se=null;function ke(){Se=re.onerror,re.onerror=function(e,t,n,r,i){return we("error",{column:r,error:i,line:n,msg:e,url:t}),!!Se&&Se.apply(this,arguments)},re.onerror.__SENTRY_INSTRUMENTED__=!0}let Me=null;function Ce(){Me=re.onunhandledrejection,re.onunhandledrejection=function(e){return we("unhandledrejection",e),!Me||Me.apply(this,arguments)},re.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Ee(){return Te(re),re}function Te(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ne,t[ne]=t[ne]||{}}const Oe=Object.prototype.toString;function Pe(e){switch(Oe.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Be(e,Error)}}function Ae(e,t){return Oe.call(e)===`[object ${t}]`}function je(e){return Ae(e,"ErrorEvent")}function Ie(e){return Ae(e,"DOMError")}function xe(e){return Ae(e,"String")}function Le(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function De(e){return null===e||Le(e)||"object"!=typeof e&&"function"!=typeof e}function Ne(e){return Ae(e,"Object")}function Re(e){return"undefined"!=typeof Event&&Be(e,Event)}function Fe(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Be(e,t){try{return e instanceof t}catch(e){return!1}}function Ue(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const Ve=re;function Je(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,s=0;const a=" > ",c=a.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(l=$e(n,u),!("html"===l||o>1&&s+i.length*c+l.length>=d));)i.push(l),s+=l.length,n=n.parentNode;return i.reverse().join(a)}catch(e){return"<unknown>"}}function $e(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(Ve.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(i&&i.length)i.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&xe(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const o=["aria-label","type","name","title","alt"];for(const e of o){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function qe(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function ze(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{Ue(r)?n.push("[VueViewModel]"):n.push(String(r))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function We(e,t,n=!1){return!!xe(e)&&(Ae(t,"RegExp")?t.test(e):!!xe(t)&&(n?e===t:e.includes(t)))}function He(e,t=[],n=!1){return t.some((t=>We(e,t,n)))}function Ge(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);"function"==typeof i&&Ke(i,r);try{e[t]=i}catch(n){oe&&le.log(`Failed to replace method "${t}" in object`,e)}}function Qe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){oe&&le.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Ke(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Qe(e,"__sentry_original__",t)}catch(e){}}function Ye(e){return e.__sentry_original__}function Xe(e){if(Pe(e))return{message:e.message,name:e.name,stack:e.stack,...et(e)};if(Re(e)){const t={type:e.type,target:Ze(e.target),currentTarget:Ze(e.currentTarget),...et(e)};return"undefined"!=typeof CustomEvent&&Be(e,CustomEvent)&&(t.detail=e.detail),t}return e}function Ze(e){try{return t=e,"undefined"!=typeof Element&&Be(t,Element)?Je(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}var t}function et(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function tt(e){return nt(e,new Map)}function nt(e,t){if(function(e){if(!Ne(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.getOwnPropertyNames(e))void 0!==e[n]&&(r[n]=nt(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(nt(e,t))})),r}return e}function rt(){return Date.now()/1e3}const it=function(){const{performance:e}=re;if(!e||!e.now)return rt;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}();function ot(){const e=re,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function st(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function at(e){const{message:t,event_id:n}=e;if(t)return t;const r=st(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function ct(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function lt(e,t){const n=st(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function ut(e){if(function(e){try{return e.__sentry_captured__}catch(e){}}(e))return!0;try{Qe(e,"__sentry_captured__",!0)}catch(e){}return!1}var dt;function ht(e){return new ft((t=>{t(e)}))}function pt(e){return new ft(((t,n)=>{n(e)}))}(()=>{const{performance:e}=re;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,s=e.timing&&e.timing.navigationStart,a="number"==typeof s?Math.abs(s+n-r):t;(o||a<t)&&(i<=a&&e.timeOrigin)})(),function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(dt||(dt={}));class ft{constructor(e){ft.prototype.__init.call(this),ft.prototype.__init2.call(this),ft.prototype.__init3.call(this),ft.prototype.__init4.call(this),this._state=dt.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new ft(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new ft(((t,n)=>{let r,i;return this.then((t=>{i=!1,r=t,e&&e()}),(t=>{i=!0,r=t,e&&e()})).then((()=>{i?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(dt.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(dt.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===dt.PENDING&&(Fe(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===dt.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===dt.RESOLVED&&e[1](this._value),this._state===dt.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function vt(e){const t=it(),n={sid:ot(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return tt({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&>(n,e),n}function gt(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||it(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:ot()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function mt(){return ot()}function yt(){return ot().substring(16)}function bt(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=bt(r[e],t[e],n-1));return r}const _t="_sentrySpan";function wt(e,t){t?Qe(e,_t,t):delete e[_t]}function St(e){return e[_t]}class kt{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:mt(),spanId:yt()}}clone(){const e=new kt;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,wt(e,St(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&>(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof Mt?[t.getScopeData(),t.getRequestSession()]:Ne(t)?[e,e.requestSession]:[],{tags:i,extra:o,user:s,contexts:a,level:c,fingerprint:l=[],propagationContext:u}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},s&&Object.keys(s).length&&(this._user=s),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,wt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:mt()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:rt(),...e};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:St(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=bt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:yt(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:ot();if(!this._client)return le.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:ot();if(!this._client)return le.warn("No client configured on scope - will not capture message!"),r;const i=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:ot();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(le.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const Mt=kt;class Ct{constructor(e,t){let n,r;n=e||new Mt,r=t||new Mt,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return Fe(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Et(){const e=Te(Ee());return e.stack=e.stack||new Ct(ie("defaultCurrentScope",(()=>new Mt)),ie("defaultIsolationScope",(()=>new Mt)))}function Tt(e){return Et().withScope(e)}function Ot(e,t){const n=Et();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function Pt(e){return Et().withScope((()=>e(Et().getIsolationScope())))}function At(e){const t=Te(e);return t.acs?t.acs:{withIsolationScope:Pt,withScope:Tt,withSetScope:Ot,withSetIsolationScope:(e,t)=>Pt(t),getCurrentScope:()=>Et().getScope(),getIsolationScope:()=>Et().getIsolationScope()}}function jt(){return At(Ee()).getCurrentScope()}function It(){return At(Ee()).getIsolationScope()}function xt(){return jt().getClient()}function Lt(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:i}=t;return tt({trace_id:n,span_id:r,parent_span_id:i})}function Dt(e){const t=e._sentryMetrics;if(!t)return;const n={};for(const[,[e,r]]of t){(n[e]||(n[e]=[])).push(tt(r))}return n}const Nt=/^sentry-/;function Rt(e){const t=function(e){if(!e||!xe(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce(((e,t)=>{const n=Ft(t);return Object.entries(n).forEach((([t,n])=>{e[t]=n})),e}),{});return Ft(e)}(e);if(!t)return;const n=Object.entries(t).reduce(((e,[t,n])=>{if(t.match(Nt)){e[t.slice(7)]=n}return e}),{});return Object.keys(n).length>0?n:void 0}function Ft(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(t&&n&&(e[t]=n),e)),{})}let Bt=!1;function Ut(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return tt({parent_span_id:r?t:$t(e).parent_span_id,span_id:r?yt():t,trace_id:n})}function Vt(e){return"number"==typeof e?Jt(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Jt(e.getTime()):it()}function Jt(e){return e>9999999999?e/1e3:e}function $t(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:i,name:o,endTime:s,parentSpanId:a,status:c}=e;return tt({span_id:t,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:Vt(i),timestamp:Vt(s)||void 0,status:qt(c),op:r["sentry.op"],origin:r["sentry.origin"],_metrics_summary:Dt(e)})}return{span_id:t,trace_id:n}}catch(e){return{}}}function qt(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}function zt(e){return e._sentryRootSpan||e}function Wt(){Bt||(ce((()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")})),Bt=!0)}const Ht="production";function Gt(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=tt({environment:n.environment||Ht,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function Qt(e){const t=xt();if(!t)return{};const n=zt(e),r=n._frozenDsc;if(r)return r;const i=n.spanContext().traceState,o=i&&i.get("sentry.dsc"),s=o&&Rt(o);if(s)return s;const a=Gt(e.spanContext().traceId,t),c=$t(n),l=c.data||{},u=l["sentry.sample_rate"];null!=u&&(a.sample_rate=`${u}`);const d=l["sentry.source"],h=c.description;return"url"!==d&&h&&(a.transaction=h),function(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=xt(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}()&&(a.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(n))),t.emit("createDsc",a,n),a}const Kt=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Yt(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r?`${r}/`:r}${s}`}function Xt(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Zt(e){const t="string"==typeof e?function(e){const t=Kt.exec(e);if(!t)return void ce((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));const[n,r,i="",o="",s="",a=""]=t.slice(1);let c="",l=a;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return Xt({host:o,pass:i,path:c,projectId:l,port:s,protocol:n,publicKey:r})}(e):Xt(e);if(t&&function(e){if(!oe)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(le.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(le.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(le.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(le.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function en(e,t=100,n=1/0){try{return nn("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function tn(e,t=3,n=102400){const r=en(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?tn(e,t-1,n):r;var i}function nn(e,t,n=1/0,r=1/0,i=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[o,s]=i;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(Ue(t))return"[VueViewModel]";if(Ne(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${ve(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return nn("",l.toJSON(),c-1,r,i)}catch(e){}const u=Array.isArray(t)?[]:{};let d=0;const h=Xe(t);for(const e in h){if(!Object.prototype.hasOwnProperty.call(h,e))continue;if(d>=r){u[e]="[MaxProperties ~]";break}const t=h[e];u[e]=nn(e,t,c-1,r,i),d++}return s(t),u}function rn(e,t=[]){return[e,t]}function on(e,t){const[n,r]=e;return[n,[...r,t]]}function sn(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function an(e){return re.__SENTRY__&&re.__SENTRY__.encodePolyfill?re.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function cn(e){const[t,n]=e;let r=JSON.stringify(t);function i(e){"string"==typeof r?r="string"==typeof e?r+e:[an(r),e]:r.push("string"==typeof e?an(e):e)}for(const e of n){const[t,n]=e;if(i(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(en(n))}i(e)}}return"string"==typeof r?r:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(r)}function ln(e){const t="string"==typeof e.data?an(e.data):e.data;return[tt({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const un={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function dn(e){return un[e]}function hn(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function pn(e,t,n,r){const i=hn(n),o=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const s=function(e,t,n,r){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Yt(r)},...i&&{trace:tt({...i})}}}(e,i,r,t);delete e.sdkProcessingMetadata;return rn(s,[[{type:o},e]])}function fn(e,t,n,r=0){return new ft(((i,o)=>{const s=e[r];if(null===t||"function"!=typeof s)i(t);else{const a=s({...t},n);te&&s.id&&null===a&&le.log(`Event processor "${s.id}" dropped event`),Fe(a)?a.then((t=>fn(e,t,n,r+1).then(i))).then(null,o):fn(e,a,n,r+1).then(i).then(null,o)}}))}let vn,gn,mn;function yn(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;!function(e,t){const{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=t,c=tt(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=tt(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const u=tt(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});const d=tt(o);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts});s&&(e.level=s);a&&"transaction"!==e.type&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:Ut(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Qt(t),...e.sdkProcessingMetadata};const n=zt(t),r=$t(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,o)}function bn(e,t){const{extra:n,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:h,transactionName:p,span:f}=t;_n(e,"extra",n),_n(e,"tags",r),_n(e,"user",i),_n(e,"contexts",o),e.sdkProcessingMetadata=bt(e.sdkProcessingMetadata,a,2),s&&(e.level=s),p&&(e.transactionName=p),f&&(e.span=f),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...h}}function _n(e,t,n){e[t]=bt(e[t],n,1)}function wn(e,t,n,r,i,o){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ot(),timestamp:t.timestamp||rt()},l=n.integrations||e.integrations.map((e=>e.name));!function(e,t){const{environment:n,release:r,dist:i,maxValueLength:o=250}=t;e.environment=e.environment||n||Ht,!e.release&&r&&(e.release=r);!e.dist&&i&&(e.dist=i);e.message&&(e.message=qe(e.message,o));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=qe(s.value,o));const a=e.request;a&&a.url&&(a.url=qe(a.url,o))}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,l),i&&i.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=re._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return mn&&n.length===gn||(gn=n.length,mn=n.reduce(((n,r)=>{vn||(vn={});const i=vn[r];if(i)n[i[0]]=i[1];else{const i=e(r);for(let e=i.length-1;e>=0;e--){const o=i[e],s=o&&o.filename,a=t[r];if(s&&a){n[s]=a,vn[r]=[s,a];break}}}return n}),{})),mn}(t);try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{n&&e.filename&&(e.debug_id=n[e.filename])}))}))}catch(e){}}(c,e.stackParser);const u=function(e,t){if(!t)return e;const n=e?e.clone():new Mt;return n.update(t),n}(r,n.captureContext);n.mechanism&<(c,n.mechanism);const d=i?i.getEventProcessors():[],h=ie("globalScope",(()=>new Mt)).getScopeData();if(o){bn(h,o.getScopeData())}if(u){bn(h,u.getScopeData())}const p=[...n.attachments||[],...h.attachments];p.length&&(n.attachments=p),yn(c,h);return fn([...d,...h.eventProcessors],c,n).then((e=>(e&&function(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})}))}(e),"number"==typeof s&&s>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:en(e.data,t,n)}})))},...e.user&&{user:en(e.user,t,n)},...e.contexts&&{contexts:en(e.contexts,t,n)},...e.extra&&{extra:en(e.extra,t,n)}};e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=en(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:en(e.data,t,n)}}))));e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=en(e.contexts.flags,3,n));return r}(e,s,a):e)))}function Sn(e){if(e)return function(e){return e instanceof Mt||"function"==typeof e}(e)||function(e){return Object.keys(e).some((e=>kn.includes(e)))}(e)?{captureContext:e}:e}const kn=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Mn(e,t){return jt().captureEvent(e,t)}function Cn(e){const t=xt(),n=It(),r=jt(),{release:i,environment:o=Ht}=t&&t.getOptions()||{},{userAgent:s}=re.navigator||{},a=vt({release:i,environment:o,user:r.getUser()||n.getUser(),...s&&{userAgent:s},...e}),c=n.getSession();return c&&"ok"===c.status&>(c,{status:"exited"}),En(),n.setSession(a),r.setSession(a),a}function En(){const e=It(),t=jt(),n=t.getSession()||e.getSession();n&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),gt(e,n)}(n),Tn(),e.setSession(),t.setSession()}function Tn(){const e=It(),t=jt(),n=xt(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function On(e=!1){e?En():Tn()}function Pn(e,t,n){return t||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}const An=[];function jn(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function In(e,t,n){if(n[t.name])te&&le.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===An.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),An.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}te&&le.log(`Integration installed: ${t.name}`)}}class xn extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}const Ln="Not capturing exception because it's already been captured.";class Dn{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Zt(e.dsn):te&&le.warn("No DSN provided, client will not send events."),this._dsn){const t=Pn(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}const t=["enableTracing","tracesSampleRate","tracesSampler"].find((t=>t in e&&null==e[t]));t&&ce((()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(e,t,n){const r=ot();if(ut(e))return te&&le.log(Ln),r;const i={event_id:r,...t};return this._process(this.eventFromException(e,i).then((e=>this._captureEvent(e,i,n)))),i.event_id}captureMessage(e,t,n,r){const i={event_id:ot(),...n},o=Le(e)?e:String(e),s=De(e)?this.eventFromMessage(o,t,i):this.eventFromException(e,i);return this._process(s.then((e=>this._captureEvent(e,i,r)))),i.event_id}captureEvent(e,t,n){const r=ot();if(t&&t.originalException&&ut(t.originalException))return te&&le.log(Ln),r;const i={event_id:r,...t},o=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,o||n)),i.event_id}captureSession(e){"string"!=typeof e.release?te&&le.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),gt(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):ht(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];In(this,e,this._integrations),t||jn(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=pn(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=on(n,ln(e));const r=this.sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=function(e,t,n,r){const i=hn(n);return rn({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Yt(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const r="number"==typeof n?n:1,i=`${e}:${t}`;te&&le.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(te&&le.error("Error while sending envelope:",e),e))):(te&&le.error("Transport disabled"),ht({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach((t=>{t&&In(e,t,n)})),n}(this,e),jn(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const i=t.exception&&t.exception.values;if(i){r=!0;for(const e of i){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(gt(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new ft((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n=jt(),r=It()){const i=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),wn(i,e,t,n,this,r).then((e=>{if(null===e)return e;e.contexts={trace:Lt(n),...e.contexts};const t=function(e,t){const n=t.getPropagationContext();return n.dsc||Gt(n.traceId,e)}(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:t,...e.sdkProcessingMetadata},e}))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{te&&(e instanceof xn&&"log"===e.logLevel?le.log(e.message):le.warn(e))}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:i}=r,o=Rn(e),s=Nn(e),a=e.type||"error",c=`before send for type \`${a}\``,l=void 0===i?void 0:function(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;te&&le.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}(i);if(s&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",e),pt(new xn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const u="replay_event"===a?"replay":a,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,e),new xn("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const i=function(e,t,n,r){const{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s}=t;if(Nn(n)&&i)return i(n,r);if(Rn(n)){if(n.spans&&s){const t=[];for(const r of n.spans){const n=s(r);n?t.push(n):(Wt(),e.recordDroppedEvent("before_send","span"))}n.spans=t}if(o){if(n.spans){const e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return o(n,r)}}return n}(this,r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Fe(e))return e.then((e=>{if(!Ne(e)&&null!==e)throw new xn(n);return e}),(e=>{throw new xn(`${t} rejected with ${e}`)}));if(!Ne(e)&&null!==e)throw new xn(n);return e}(i,c)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",u,e),o){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new xn(`${c} returned \`null\`, will not send event.`,"log")}const i=n&&n.getSession();if(!o&&i&&this._updateSessionFromEvent(i,r),o){const e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const s=r.transaction_info;if(o&&s&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...s,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{if(e instanceof xn)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new xn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}}))}_flushOutcomes(){te&&le.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(te&&le.log("No outcomes to send"));if(!this._dsn)return void(te&&le.log("No dsn provided, will not send outcomes"));te&&le.log("Sending outcomes:",e);const t=(n=e,rn((r=this._options.tunnel&&Yt(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:i||rt(),discarded_events:n}]]));var n,r,i;this.sendEnvelope(t)}}function Nn(e){return void 0===e.type}function Rn(e){return"transaction"===e.type}function Fn(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return pt(new xn("Not adding Promise because buffer limit was reached."));const i=r();return-1===t.indexOf(i)&&t.push(i),i.then((()=>n(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(e){return new ft(((n,r)=>{let i=t.length;if(!i)return n(!0);const o=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{ht(e).then((()=>{--i||(clearTimeout(o),n(!0))}),r)}))}))}}}function Bn(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n,,,o]=e.split(":",5),s=parseInt(t,10),a=1e3*(isNaN(s)?60:s);if(n)for(const e of n.split(";"))"metric_bucket"===e&&o&&!o.split(";").includes("custom")||(i[e]=r+a);else i.all=r+a}else s?i.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(s,r):429===t&&(i.all=r+6e4);return i}function Un(e,t,n=Fn(e.bufferSize||64)){let r={};return{send:function(i){const o=[];if(sn(i,((t,n)=>{const i=dn(n);if(function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)){const r=Vn(t,n);e.recordDroppedEvent("ratelimit_backoff",i,r)}else o.push(t)})),0===o.length)return ht({});const s=rn(i[0],o),a=t=>{sn(s,((n,r)=>{const i=Vn(n,r);e.recordDroppedEvent(t,dn(r),i)}))};return n.add((()=>t({body:cn(s)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&te&&le.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Bn(r,e),e)),(e=>{throw a("network_error"),e})))).then((e=>e),(e=>{if(e instanceof xn)return te&&le.error("Skipped sending event because buffer is full."),a("queue_overflow"),ht({});throw e}))},flush:e=>n.drain(e)}}function Vn(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}const Jn=100;function $n(e,t){const n=xt(),r=It();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=Jn}=n.getOptions();if(o<=0)return;const s={timestamp:rt(),...e},a=i?ce((()=>i(s,t))):s;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,o))}let qn;const zn=new WeakMap,Wn=()=>({name:"FunctionToString",setupOnce(){qn=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Ye(this),n=zn.has(xt())&&void 0!==t?t:this;return qn.apply(n,e)}}catch(e){}},setup(e){zn.set(e,!0)}}),Hn=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],Gn=(e={})=>({name:"InboundFilters",processEvent(t,n,r){const i=r.getOptions(),o=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Hn],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,i);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e))return te&&le.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${at(e)}`),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return function(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch(e){}n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`));return t}(e).some((e=>He(e,t)))}(e,t.ignoreErrors))return te&&le.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${at(e)}`),!0;if(function(e){if(e.type)return!1;if(!e.exception||!e.exception.values||0===e.exception.values.length)return!1;return!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))}(e))return te&&le.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${at(e)}`),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&He(n,t)}(e,t.ignoreTransactions))return te&&le.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${at(e)}`),!0;if(function(e,t){if(!t||!t.length)return!1;const n=Qn(e);return!!n&&He(n,t)}(e,t.denyUrls))return te&&le.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${at(e)}.\nUrl: ${Qn(e)}`),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=Qn(e);return!n||He(n,t)}(e,t.allowUrls))return te&&le.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${at(e)}.\nUrl: ${Qn(e)}`),!0;return!1}(t,o)?null:t}});function Qn(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return te&&le.error(`Cannot extract url for event ${at(e)}`),null}}function Kn(e,t,n=250,r,i,o,s){if(!(o.exception&&o.exception.values&&s&&Be(s.originalException,Error)))return;const a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var c,l;a&&(o.exception.values=(c=Yn(e,t,i,s.originalException,r,o.exception.values,a,0),l=n,c.map((e=>(e.value&&(e.value=qe(e.value,l)),e)))))}function Yn(e,t,n,r,i,o,s,a){if(o.length>=n+1)return o;let c=[...o];if(Be(r[i],Error)){Xn(s,a);const o=e(t,r[i]),l=c.length;Zn(o,i,l,a),c=Yn(e,t,n,r[i],i,[o,...c],o,l)}return Array.isArray(r.errors)&&r.errors.forEach(((r,o)=>{if(Be(r,Error)){Xn(s,a);const l=e(t,r),u=c.length;Zn(l,`errors[${o}]`,u,a),c=Yn(e,t,n,r,i,[l,...c],l,u)}})),c}function Xn(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function Zn(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function er(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function tr(){"console"in re&&se.forEach((function(e){e in re.console&&Ge(re.console,e,(function(t){return ae[e]=t,function(...t){we("console",{args:t,level:e});const n=ae[e];n&&n.apply(re.console,t)}}))}))}function nr(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const rr=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!or(e,t))return!1;if(!ir(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=sr(t),r=sr(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!or(e,t))return!1;if(!ir(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return te&&le.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}};function ir(e,t){let n=ge(e),r=ge(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function or(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(e){return!1}}function sr(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ar(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const cr=re;function lr(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function ur(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in cr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}())return!1;if(lr(cr.fetch))return!0;let e=!1;const t=cr.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=lr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){oe&&le.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}function dr(e,t){const n="fetch";be(n,e),_e(n,(()=>function(e,t=!1){if(t&&!ur())return;Ge(re,"fetch",(function(t){return function(...n){const r=new Error,{method:i,url:o}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:pr(t),method:hr(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:pr(t),method:hr(t,"method")?String(t.method).toUpperCase():"GET"}}(n),s={args:n,fetchData:{method:i,url:o},startTimestamp:1e3*it(),virtualError:r};return e||we("fetch",{...s}),t.apply(re,n).then((async t=>(e?e(t):we("fetch",{...s,endTimestamp:1e3*it(),response:t}),t)),(e=>{throw we("fetch",{...s,endTimestamp:1e3*it(),error:e}),Pe(e)&&void 0===e.stack&&(e.stack=r.stack,Qe(e,"framesToPop",1)),e}))}}))}(void 0,t)))}function hr(e,t){return!!e&&"object"==typeof e&&!!e[t]}function pr(e){return"string"==typeof e?e:e?hr(e,"url")?e.url:e.toString?e.toString():"":""}const fr=re;const vr=re;let gr=0;function mr(){return gr>0}function yr(e,t={}){if(!function(e){return"function"==typeof e}(e))return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(Ye(e))return e}catch(t){return e}const n=function(...n){try{const r=n.map((e=>yr(e,t)));return e.apply(this,r)}catch(e){throw gr++,setTimeout((()=>{gr--})),function(...e){const t=At(Ee());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}((r=>{var i,o;r.addEventProcessor((e=>(t.mechanism&&(ct(e,void 0,void 0),lt(e,t.mechanism)),e.extra={...e.extra,arguments:n},e))),i=e,jt().captureException(i,Sn(o))})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch(e){}Ke(n,e),Qe(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch(e){}return n}const br="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function _r(e,t){const n=kr(e,t),r={type:Er(t),value:Tr(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function wr(e,t,n,r){const i=xt(),o=i&&i.getOptions().normalizeDepth,s=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}return}(t),a={__serialized__:tn(t,o)};if(s)return{exception:{values:[_r(e,s)]},extra:a};const c={exception:{values:[{type:Re(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Ar(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=kr(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function Sr(e,t){return{exception:{values:[_r(e,t)]}}}function kr(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&Mr.test(e.message))return 1;return 0}(t),i=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,i)}catch(e){}return[]}const Mr=/Minified React error #\d+;/i;function Cr(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function Er(e){const t=e&&e.name;if(!t&&Cr(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function Tr(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:Cr(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function Or(e,t,n,r,i){let o;if(je(t)&&t.error){return Sr(e,t.error)}if(Ie(t)||Ae(t,"DOMException")){const i=t;if("stack"in t)o=Sr(e,t);else{const t=i.name||(Ie(i)?"DOMError":"DOMException"),s=i.message?`${t}: ${i.message}`:t;o=Pr(e,s,n,r),ct(o,s)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}if(Pe(t))return Sr(e,t);if(Ne(t)||Re(t)){return o=wr(e,t,n,i),lt(o,{synthetic:!0}),o}return o=Pr(e,t,n,r),ct(o,`${t}`,void 0),lt(o,{synthetic:!0}),o}function Pr(e,t,n,r){const i={};if(r&&n){const r=kr(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),lt(i,{synthetic:!0})}if(Le(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function Ar(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(Xe(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return qe(r,t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:qe(r,t)}return""}(e),r=t?"promise rejection":"exception";if(je(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(Re(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}class jr extends Dn{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};!function(e,t,n=[t],r="npm"){const i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:ne}))),version:ne}),e._metadata=i}(t,"browser",["browser"],vr.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&vr.document&&vr.document.addEventListener("visibilitychange",(()=>{"hidden"===vr.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){const i=Or(e,t,n&&n.syntheticException||void 0,r);return lt(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),ht(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const o=Pr(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),ht(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(br&&le.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Yt(r)}},o=function(e){return[{type:"user_report"},e]}(e);return rn(i,[o])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}}const Ir="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,xr=re;let Lr,Dr,Nr,Rr;function Fr(){if(!xr.document)return;const e=we.bind(null,"dom"),t=Br(e,!0);xr.document.addEventListener("click",t,!1),xr.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=xr[t],r=n&&n.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(Ge(r,"addEventListener",(function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=r[n]=r[n]||{refCount:0};if(!o.handler){const r=Br(e);o.handler=r,t.call(this,n,r,i)}o.refCount++}catch(e){}return t.call(this,n,r,i)}})),Ge(r,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))}))}function Br(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(e){return null}}(n);if(function(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;Qe(n,"_sentryCaptured",!0),r&&!r._sentryId&&Qe(r,"_sentryId",ot());const i="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==Dr)return!1;try{if(!e.target||e.target._sentryId!==Nr)return!1}catch(e){}return!0}(n)){e({event:n,name:i,global:t}),Dr=n.type,Nr=r?r._sentryId:void 0}clearTimeout(Lr),Lr=xr.setTimeout((()=>{Nr=void 0,Dr=void 0}),1e3)}}function Ur(e){const t="history";be(t,e),_e(t,Vr)}function Vr(){if(!function(){const e=fr.chrome,t=e&&e.app&&e.app.runtime,n="history"in fr&&!!fr.history.pushState&&!!fr.history.replaceState;return!t&&n}())return;const e=xr.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=Rr,t=String(n);Rr=t;we("history",{from:e,to:t})}return e.apply(this,t)}}xr.onpopstate=function(...t){const n=xr.location.href,r=Rr;Rr=n;if(we("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},Ge(xr.history,"pushState",t),Ge(xr.history,"replaceState",t)}const Jr={};function $r(e){Jr[e]=void 0}const qr="__sentry_xhr_v3__";function zr(){if(!xr.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,i=1e3*it(),o=xe(n[0])?n[0].toUpperCase():void 0,s=function(e){if(xe(e))return e;try{return e.toString()}catch(e){}return}(n[1]);if(!o||!s)return e.apply(t,n);t[qr]={method:o,url:s,request_headers:{}},"POST"===o&&s.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[qr];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}we("xhr",{endTimestamp:1e3*it(),startTimestamp:i,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,i]=n,o=t[qr];return o&&xe(r)&&xe(i)&&(o.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[qr];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return we("xhr",{startTimestamp:1e3*it(),xhr:t}),e.apply(t,n)}})}function Wr(e,t=function(e){const t=Jr[e];if(t)return t;let n=xr[e];if(lr(n))return Jr[e]=n.bind(xr);const r=xr.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const i=t.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){Ir&&le.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?Jr[e]=n.bind(xr):n}("fetch")){let n=0,r=0;return Un(e,(function(i){const o=i.body.length;n+=o,r++;const s={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return $r("fetch"),pt("No fetch implementation available");try{return t(e.url,s).then((e=>(n-=o,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return $r("fetch"),n-=o,r--,pt(e)}}))}function Hr(e,t,n,r){const i={filename:e,function:"<anonymous>"===t?ue:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const Gr=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Qr=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Kr=/\((\S*)(?::(\d+))(?::(\d+))\)/,Yr=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Xr=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Zr=function(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0,r=0)=>{const i=[],o=e.split("\n");for(let e=n;e<o.length;e++){const n=o[e];if(n.length>1024)continue;const s=de.test(n)?n.replace(de,"$1"):n;if(!s.match(/\S*Error: /)){for(const e of t){const t=e(s);if(t){i.push(t);break}}if(i.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(pe(t).function||"")&&t.pop();t.reverse(),he.test(pe(t).function||"")&&(t.pop(),he.test(pe(t).function||"")&&t.pop());return t.slice(0,50).map((e=>({...e,filename:e.filename||pe(t).filename,function:e.function||ue})))}(i.slice(r))}}(...[[30,e=>{const t=Gr.exec(e);if(t){const[,e,n,r]=t;return Hr(e,ue,+n,+r)}const n=Qr.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=Kr.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=ei(n[1]||ue,n[2]);return Hr(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=Yr.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Xr.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||ue;return[n,e]=ei(n,e),Hr(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),ei=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:ue,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},ti=1024,ni=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){const t="console";be(t,e),_e(t,tr)}(function(e){return function(t){if(xt()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:nr(t.level),message:ze(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${ze(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}$n(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(xt()!==e)return;let r,i,o="object"==typeof t?t.serializeAttribute:void 0,s="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;s&&s>ti&&(br&&le.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${s} was configured. Sentry will use 1024 instead.`),s=ti),"string"==typeof o&&(o=[o]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=Je(t,{keyAttrs:o,maxStringLength:s}),i=function(e){if(!Ve.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}(t)}catch(e){r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};i&&(a.data={"ui.component_name":i}),$n(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),be("dom",n),_e("dom",Fr)),t.xhr&&function(e){be("xhr",e),_e("xhr",zr)}(function(e){return function(t){if(xt()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[qr];if(!n||!r||!i)return;const{method:o,url:s,status_code:a,body:c}=i,l={method:o,url:s,status_code:a},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};$n({category:"xhr",data:l,type:"http",level:ar(a)},u)}}(e)),t.fetch&&dr(function(e){return function(t){if(xt()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){$n({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r})}else{const e=t.response,i={...t.fetchData,status_code:e&&e.status},o={input:t.args,response:e,startTimestamp:n,endTimestamp:r};$n({category:"fetch",data:i,type:"http",level:ar(i.status_code)},o)}}}(e)),t.history&&Ur(function(e){return function(t){if(xt()!==e)return;let n=t.from,r=t.to;const i=er(vr.location.href);let o=n?er(n):void 0;const s=er(r);o&&o.path||(o=i),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),$n({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){xt()===e&&$n({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:at(t)},{event:t})}}(e))}}};const ri=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],ii=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&Ge(vr,"setTimeout",oi),t.setInterval&&Ge(vr,"setInterval",oi),t.requestAnimationFrame&&Ge(vr,"requestAnimationFrame",si),t.XMLHttpRequest&&"XMLHttpRequest"in vr&&Ge(XMLHttpRequest.prototype,"send",ai);const e=t.eventTarget;if(e){(Array.isArray(e)?e:ri).forEach(ci)}}}};function oi(e){return function(...t){const n=t[0];return t[0]=yr(n,{mechanism:{data:{function:ve(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function si(e){return function(t){return e.apply(this,[yr(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ve(e)},handled:!1,type:"instrument"}})])}}function ai(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&Ge(n,e,(function(t){const n={mechanism:{data:{function:e,handler:ve(t)},handled:!1,type:"instrument"}},r=Ye(t);return r&&(n.mechanism.data.handler=ve(r)),yr(t,n)}))})),e.apply(this,t)}}function ci(e){const t=vr[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Ge(n,"addEventListener",(function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=yr(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ve(r),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[n,yr(r,{mechanism:{data:{function:"addEventListener",handler:ve(r),target:e},handled:!1,type:"instrument"}}),i])}})),Ge(n,"removeEventListener",(function(e){return function(t,n,r){try{const i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch(e){}return e.call(this,t,n,r)}})))}const li=()=>({name:"BrowserSession",setupOnce(){void 0!==vr.document?(Cn({ignoreDuration:!0}),On(),Ur((({from:e,to:t})=>{void 0!==e&&e!==t&&(Cn({ignoreDuration:!0}),On())}))):br&&le.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),ui=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){!function(e){const t="error";be(t,e),_e(t,ke)}((t=>{const{stackParser:n,attachStacktrace:r}=hi();if(xt()!==e||mr())return;const{msg:i,url:o,line:s,column:a,error:c}=t,l=function(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],l=r,u=n,d=xe(t)&&t.length>0?t:function(){try{return Ve.document.location.href}catch(e){return""}}();0===c.length&&c.push({colno:l,filename:d,function:ue,in_app:!0,lineno:u});return e}(Or(n,c||i,void 0,r,!1),o,s,a);l.level="error",Mn(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})}))}(e),di("onerror")),t.onunhandledrejection&&(!function(e){!function(e){const t="unhandledrejection";be(t,e),_e(t,Ce)}((t=>{const{stackParser:n,attachStacktrace:r}=hi();if(xt()!==e||mr())return;const i=function(e){if(De(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}(t),o=De(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:Or(n,i,void 0,r,!0);o.level="error",Mn(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(e),di("onunhandledrejection"))}}};function di(e){br&&le.log(`Global Handler attached: ${e}`)}function hi(){const e=xt();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const pi=()=>({name:"HttpContext",preprocessEvent(e){if(!vr.navigator&&!vr.location&&!vr.document)return;const t=e.request&&e.request.url||vr.location&&vr.location.href,{referrer:n}=vr.document||{},{userAgent:r}=vr.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:i};e.request=o}}),fi=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,i){const o=i.getOptions();Kn(_r,o.stackParser,o.maxValueLength,n,t,e,r)}}};var vi="new",gi="loading",mi="loaded",yi="joining-meeting",bi="joined-meeting",_i="left-meeting",wi="error",Si="blocked",ki="off",Mi="sendable",Ci="loading",Ei="interrupted",Ti="playable",Oi="unknown",Pi="full",Ai="lobby",ji="none",Ii="base",xi="*",Li="ejected",Di="nbf-room",Ni="nbf-token",Ri="exp-room",Fi="exp-token",Bi="no-room",Ui="meeting-full",Vi="end-of-life",Ji="not-allowed",$i="connection-error",qi="cam-in-use",zi="mic-in-use",Wi="cam-mic-in-use",Hi="permissions",Gi="undefined-mediadevices",Qi="not-found",Ki="constraints",Yi="unknown",Xi="iframe-ready-for-launch-config",Zi="iframe-launch-config",eo="theme-updated",to="loading",no="load-attempt-failed",ro="loaded",io="started-camera",oo="camera-error",so="joining-meeting",ao="joined-meeting",co="left-meeting",lo="participant-joined",uo="participant-updated",ho="participant-left",po="participant-counts-updated",fo="access-state-updated",vo="meeting-session-summary-updated",go="meeting-session-state-updated",mo="meeting-session-data-error",yo="waiting-participant-added",bo="waiting-participant-updated",_o="waiting-participant-removed",wo="track-started",So="track-stopped",ko="transcription-started",Mo="transcription-stopped",Co="transcription-error",Eo="recording-started",To="recording-stopped",Oo="recording-stats",Po="recording-error",Ao="recording-upload-completed",jo="recording-data",Io="app-message",xo="transcription-message",Lo="remote-media-player-started",Do="remote-media-player-updated",No="remote-media-player-stopped",Ro="local-screen-share-started",Fo="local-screen-share-stopped",Bo="local-screen-share-canceled",Uo="active-speaker-change",Vo="active-speaker-mode-change",Jo="network-quality-change",$o="network-connection",qo="cpu-load-change",zo="face-counts-updated",Wo="fullscreen",Ho="exited-fullscreen",Go="live-streaming-started",Qo="live-streaming-updated",Ko="live-streaming-stopped",Yo="live-streaming-error",Xo="lang-updated",Zo="receive-settings-updated",es="input-settings-updated",ts="nonfatal-error",ns="error",rs=4096,is=102400,os="iframe-call-message",ss="local-screen-start",as="daily-method-update-live-streaming-endpoints",cs="transmit-log",ls="daily-custom-track",us={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},ds={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},hs={PLAY:"play",PAUSE:"pause"},ps=["jpg","png","jpeg"],fs="add-endpoints",vs="remove-endpoints",gs="sip-call-transfer";function ms(){return!ys()&&"undefined"!=typeof window&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function ys(){return"undefined"!=typeof navigator&&navigator.product&&"ReactNative"===navigator.product}function bs(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function _s(){return!!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)&&(function(e,t){if(!e||!t)return!0;switch(e){case"Chrome":return t.major>=75;case"Safari":return RTCRtpTransceiver.prototype.hasOwnProperty("currentDirection")&&!(13===t.major&&0===t.minor&&0===t.point);case"Firefox":return t.major>=67}return!0}(js(),Is())||ys())}function ws(){if(ys())return!1;if(!document)return!1;var e=document.createElement("iframe");return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var Ss="none",ks="software",Ms="hardware";var Cs=function(){try{var e,t=document.createElement("canvas"),n=!1;(e=t.getContext("webgl2",{failIfMajorPerformanceCaveat:!0}))||(n=!0,e=t.getContext("webgl2"));var r=null!=e;return t.remove(),r?n?ks:Ms:Ss}catch(e){return Ss}}();function Es(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!ys()&&(Cs!==Ss&&(e?function(){if(As())return!1;return["Chrome","Firefox"].includes(js())}():function(){if(As())return!1;var e=js();if("Safari"===e){var t=Ns();if(t.major<15||15===t.major&&t.minor<4)return!1}if("Chrome"===e){return xs().major>=77}if("Firefox"===e){return Rs().major>=97}return["Chrome","Firefox","Safari"].includes(e)}()))}function Ts(){if(ys())return!1;if(Ps())return!1;if("undefined"==typeof AudioWorkletNode)return!1;switch(js()){case"Chrome":case"Firefox":return!0;case"Safari":var e=Is();return e.major>17||17===e.major&&e.minor>=4}return!1}function Os(){return bs()&&!function(){var e,t=js();if(!ms())return!0;switch(t){case"Chrome":return(e=xs()).major&&e.major>0&&e.major<75;case"Firefox":return(e=Rs()).major<91;case"Safari":return(e=Ns()).major<13||13===e.major&&e.minor<1;default:return!0}}()}function Ps(){return ms().match(/Linux; Android/)}function As(){var e,t=ms(),n=t.match(/Mac/)&&(!ys()&&"undefined"!=typeof window&&null!==(e=window)&&void 0!==e&&null!==(e=e.navigator)&&void 0!==e&&e.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(t.match(/Mobi/)||t.match(/Android/)||n)||(!!ms().match(/DailyAnd\//)||void 0)}function js(){if("undefined"!=typeof window){var e=ms();return Ls()?"Safari":e.indexOf("Edge")>-1?"Edge":e.match(/Chrome\//)?"Chrome":e.indexOf("Safari")>-1||Ds()?"Safari":e.indexOf("Firefox")>-1?"Firefox":e.indexOf("MSIE")>-1||e.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function Is(){switch(js()){case"Chrome":return xs();case"Safari":return Ns();case"Firefox":return Rs();case"Edge":return function(){var e=0,t=0;if("undefined"!=typeof window){var n=ms().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}()}}function xs(){var e=0,t=0,n=0,r=0,i=!1;if("undefined"!=typeof window){var o=ms(),s=o.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(s)try{e=parseInt(s[1]),t=parseInt(s[2]),n=parseInt(s[3]),r=parseInt(s[4]),i=o.indexOf("OPR/")>-1}catch(e){}}return{major:e,minor:t,build:n,patch:r,opera:i}}function Ls(){return!!ms().match(/iPad|iPhone|iPod/i)&&bs()}function Ds(){return ms().indexOf("AppleWebKit/605.1.15")>-1}function Ns(){var e=0,t=0,n=0;if("undefined"!=typeof window){var r=ms().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch(e){}else(Ls()||Ds())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function Rs(){var e=0,t=0;if("undefined"!=typeof window){var n=ms().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}var Fs=function(){return o((function e(){t(this,e)}),[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){Y()}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){Y()}},{key:"sendMessageToCallMachine",value:function(e,t,n,r){Y()}},{key:"sendMessageToDailyJs",value:function(e,t){Y()}},{key:"removeListener",value:function(e){Y()}}])}();function Bs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Us(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bs(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Vs=function(){return!!e})()}var Js=function(){function e(){var n,r,i,o;return t(this,e),r=this,i=a(i=e),(n=s(r,Vs()?Reflect.construct(i,o||[],a(r).constructor):i.apply(r,o)))._wrappedListeners={},n._messageCallbacks={},n}return l(e,Fs),o(e,[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){var r=this,i=function(i){if(i.data&&"iframe-call-message"===i.data.what&&(!i.data.callClientId||i.data.callClientId===t)&&(!i.data.from||"module"!==i.data.from)){var o=Us({},i.data);if(delete o.from,o.callbackStamp&&r._messageCallbacks[o.callbackStamp]){var s=o.callbackStamp;r._messageCallbacks[s].call(n,o),delete r._messageCallbacks[s]}delete o.what,delete o.callbackStamp,e.call(n,o)}};this._wrappedListeners[e]=i,window.addEventListener("message",i)}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){var r=function(r){var i;if(!(!r.data||r.data.what!==os||!r.data.action||r.data.from&&"module"!==r.data.from||r.data.callClientId&&t&&r.data.callClientId!==t||null!=r&&null!==(i=r.data)&&void 0!==i&&i.callFrameId)){var o=r.data;e.call(n,o)}};this._wrappedListeners[e]=r,window.addEventListener("message",r)}},{key:"sendMessageToCallMachine",value:function(e,t,n,r){if(!n)throw new Error("undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?");var i=Us({},e);if(i.what=os,i.from="module",i.callClientId=n,t){var o=K();this._messageCallbacks[o]=t,i.callbackStamp=o}var s=r?r.contentWindow:window,a=this._callMachineTargetOrigin(r);a&&s.postMessage(i,a)}},{key:"sendMessageToDailyJs",value:function(e,t){e.what=os,e.callClientId=t,e.from="embedded",window.postMessage(e,this._targetOriginFromWindowLocation())}},{key:"removeListener",value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener("message",t),delete this._wrappedListeners[e])}},{key:"forwardPackagedMessageToCallMachine",value:function(e,t,n){var r=Us({},e);r.callClientId=n;var i=t?t.contentWindow:window,o=this._callMachineTargetOrigin(t);o&&i.postMessage(r,o)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(e,t){var n=function(n){if(n.data&&"iframe-call-message"===n.data.what&&(!n.data.callClientId||n.data.callClientId===t)&&(!n.data.from||"module"!==n.data.from)){var r=n.data;e(r)}};return this._wrappedListeners[e]=n,window.addEventListener("message",n),e}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener("message",t),delete this._wrappedListeners[e])}},{key:"_callMachineTargetOrigin",value:function(e){return e?e.src?new URL(e.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:"_targetOriginFromWindowLocation",value:function(){return"file:"===window.location.protocol?"*":window.location.origin}}])}();function $s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(qs=function(){return!!e})()}var zs=function(){function e(){var n,r,i,o;return t(this,e),r=this,i=a(i=e),n=s(r,qs()?Reflect.construct(i,o||[],a(r).constructor):i.apply(r,o)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new I.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new I.EventEmitter,n._wrappedListeners={},n._messageCallbacks={},n}return l(e,Fs),o(e,[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){this._addListener(e,global.callMachineToDailyJsEmitter,t,n,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){this._addListener(e,global.dailyJsToCallMachineEmitter,t,n,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(e,t,n){this._sendMessage(e,global.dailyJsToCallMachineEmitter,n,t,"sending message to call machine")}},{key:"sendMessageToDailyJs",value:function(e,t){this._sendMessage(e,global.callMachineToDailyJsEmitter,t,null,"sending message to daily-js")}},{key:"removeListener",value:function(e){var t=this._wrappedListeners[e];t&&(global.callMachineToDailyJsEmitter.removeListener("message",t),global.dailyJsToCallMachineEmitter.removeListener("message",t),delete this._wrappedListeners[e])}},{key:"_addListener",value:function(e,t,n,r,i){var o=this,s=function(t){if(t.callClientId===n){if(t.callbackStamp&&o._messageCallbacks[t.callbackStamp]){var i=t.callbackStamp;o._messageCallbacks[i].call(r,t),delete o._messageCallbacks[i]}e.call(r,t)}};this._wrappedListeners[e]=s,t.addListener("message",s)}},{key:"_sendMessage",value:function(e,t,n,r,i){var o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$s(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);if(o.callClientId=n,r){var s=K();this._messageCallbacks[s]=r,o.callbackStamp=s}t.emit("message",o)}}])}(),Ws="replace",Hs="shallow-merge",Gs=[Ws,Hs];var Qs=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.data,i=n.mergeStrategy,o=void 0===i?Ws:i;t(this,e),e._validateMergeStrategy(o),e._validateData(r,o),this.mergeStrategy=o,this.data=r}return o(e,[{key:"isNoOp",value:function(){return e.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:"isNoOpUpdate",value:function(e,t){return 0===Object.keys(e).length&&t===Hs}},{key:"_validateMergeStrategy",value:function(e){if(!Gs.includes(e))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(Gs,"]"))}},{key:"_validateData",value:function(e,t){if(!function(e){if(null==e||"object"!==n(e))return!1;var t=Object.getPrototypeOf(e);return null==t||t===Object.prototype}(e))throw Error("Meeting session data must be a plain (map-like) object");var r;try{if(r=JSON.stringify(e),t===Ws){var i=JSON.parse(r);N(i,e)||console.warn("The meeting session data provided will be modified when serialized.",i,e)}else if(t===Hs)for(var o in e)if(Object.hasOwnProperty.call(e,o)&&void 0!==e[o]){var s=JSON.parse(JSON.stringify(e[o]));N(e[o],s)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",s,e[o])}}catch(e){throw Error("Meeting session data must be serializable to JSON: ".concat(e))}if(r.length>is)throw Error("Meeting session data is too large (".concat(r.length," characters). Maximum size suppported is ").concat(is,"."))}}])}();function Ks(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ks=function(){return!!e})()}function Ys(e){var t="function"==typeof Map?new Map:void 0;return Ys=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(Ks())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&c(i,n.prototype),i}(e,arguments,a(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)},Ys(e)}function Xs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Xs=function(){return!!e})()}function Zs(e){var t,n=null===(t=window._daily)||void 0===t?void 0:t.pendings;if(n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}var ea=function(){return o((function e(n){t(this,e),this._currentLoad=null,this._callClientId=n}),[{key:"load",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new ta(n,(function(){r(!1)}),(function(e,n){n||Zs(t._callClientId),i(e,n)})),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),Zs(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])}(),ta=function(){return o((function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;t(this,e),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=n,this._successCallback=r,this._failureCallback=i}),[{key:"start",value:function(){var e=this;if(!this._currentAttempt){var t=function(n){e._currentAttempt.cancelled||(e._attemptsRemaining--,e._failureCallback(n,e._attemptsRemaining>0),e._attemptsRemaining<=0||setTimeout((function(){e._currentAttempt.cancelled||(e._currentAttempt=new ia(e._dailyConfig,e._successCallback,t),e._currentAttempt.start())}),3e3))};this._currentAttempt=new ia(this._dailyConfig,this._successCallback,t),this._currentAttempt.start()}}},{key:"cancel",value:function(){this._currentAttempt&&this._currentAttempt.cancel()}},{key:"cancelled",get:function(){return this._currentAttempt&&this._currentAttempt.cancelled}},{key:"succeeded",get:function(){return this._currentAttempt&&this._currentAttempt.succeeded}}])}(),na=function(){function e(){return t(this,e),n=this,i=arguments,r=a(r=e),s(n,Xs()?Reflect.construct(r,i||[],a(n).constructor):r.apply(n,i));var n,r,i}return l(e,Ys(Error)),o(e)}(),ra=2e4,ia=function(){return o((function e(n,r,i){t(this,e),this._loadAttemptImpl=ys()||!n.avoidEval?new oa(n,r,i):new sa(n,r,i)}),[{key:"start",value:(e=h((function*(){return this._loadAttemptImpl.start()})),function(){return e.apply(this,arguments)})},{key:"cancel",value:function(){this._loadAttemptImpl.cancel()}},{key:"cancelled",get:function(){return this._loadAttemptImpl.cancelled}},{key:"succeeded",get:function(){return this._loadAttemptImpl.succeeded}}]);var e}(),oa=function(){return o((function e(n,r,i){t(this,e),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache="undefined"!=typeof iOSCallObjectBundleCache&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=n,this._successCallback=r,this._failureCallback=i}),[{key:"start",value:(i=h((function*(){var e=Z(this._dailyConfig);!(yield this._tryLoadFromIOSCache(e))&&this._loadFromNetwork(e)})),function(){return i.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(r=h((function*(e){if(!this._iosCache)return!1;try{var t=yield this._iosCache.get(e);return!!this.cancelled||!!t&&(t.code?(Function('"use strict";'+t.code)(),this.succeeded=!0,this._successCallback(),!0):(this._refetchHeaders=t.refetchHeaders,!1))}catch(e){return!1}})),function(e){return r.apply(this,arguments)})},{key:"_loadFromNetwork",value:(n=h((function*(e){var t=this;this._networkTimeout=setTimeout((function(){t._networkTimedOut=!0,t._failureCallback({msg:"Timed out (>".concat(ra," ms) when loading call object bundle ").concat(e),type:"timeout"})}),ra);try{var n=this._refetchHeaders?{headers:this._refetchHeaders}:{},r=yield fetch(e,n);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new na;var i=yield this._getBundleCodeFromResponse(e,r);if(this.cancelled)throw new na;Function('"use strict";'+i)(),this._iosCache&&this._iosCache.set(e,i,r.headers),this.succeeded=!0,this._successCallback()}catch(t){if(clearTimeout(this._networkTimeout),t instanceof na||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(e,": ").concat(t),type:t.message})}})),function(e){return n.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(e=h((function*(e,t){if(t.ok)return yield t.text();if(this._iosCache&&304===t.status)return(yield this._iosCache.renew(e,t.headers)).code;throw new Error("Received ".concat(t.status," response"))})),function(t,n){return e.apply(this,arguments)})}]);var e,n,r,i}(),sa=function(){return o((function e(n,r,i){t(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=n,this._successCallback=r,this._failureCallback=i,this._attemptId=K(),this._networkTimeout=null,this._scriptElement=null}),[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=Z(this._dailyConfig);"object"===("undefined"==typeof document?"undefined":n(document))?this._startLoading(e):this._failureCallback({msg:"Call object bundle must be loaded in a DOM/web context",type:"missing context"})}},{key:"cancel",value:function(){this._stopLoading(),this.cancelled=!0}},{key:"_startLoading",value:function(e){var t=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout((function(){t._stopLoading(),t._failureCallback({msg:"Timed out (>".concat(ra," ms) when loading call object bundle ").concat(e),type:"timeout"})}),ra);var n=document.getElementsByTagName("head")[0],r=document.createElement("script");this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback()},r.onerror=function(e){t._stopLoading(),t._failureCallback({msg:"Failed to load call object bundle ".concat(e.target.src),type:e.message})},r.src=e,n.appendChild(r)}},{key:"_stopLoading",value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:"_signUpForCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:"_withdrawFromCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}])}(),aa=function(e,t,n){return!0===ua(e.local,t,n)},ca=function(e,t,n){return e.local.streams&&e.local.streams[t]&&e.local.streams[t].stream&&e.local.streams[t].stream["get".concat("video"===n?"Video":"Audio","Tracks")]()[0]},la=function(e,t,n,r){var i=da(e,t,n,r);return i&&i.pendingTrack},ua=function(e,t,n){if(!e)return!1;var r=function(e){switch(e){case"avatar":return!0;case"staged":return e;default:return!!e}},i=e.public.subscribedTracks;return i&&i[t]?-1===["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo"].indexOf(n)&&i[t].custom?[!0,"staged"].includes(i[t].custom)?r(i[t].custom):r(i[t].custom[n]):r(i[t][n]):!i||r(i.ALL)},da=function(e,t,n,r){var i=Object.values(e.streams||{}).filter((function(e){return e.participantId===t&&e.type===n&&e.pendingTrack&&e.pendingTrack.kind===r})).sort((function(e,t){return new Date(t.starttime)-new Date(e.starttime)}));return i&&i[0]},ha=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function pa(e,t){for(var n=t.getState(),r=0,i=["cam","screen"];r<i.length;r++)for(var o=i[r],s=0,a=["video","audio"];s<a.length;s++){var c=a[s],l="cam"===o?c:"screen".concat(c.charAt(0).toUpperCase()+c.slice(1)),u=e.tracks[l];if(u){var d=e.local?ca(n,o,c):la(n,e.session_id,o,c);"playable"===u.state&&(u.track=d),u.persistentTrack=d}}}function fa(e,t){try{var n=t.getState();for(var r in e.tracks)if(!va(r)){var i=e.tracks[r].kind;if(i){var o=e.tracks[r];if(o){var s=e.local?ha(n,r):la(n,e.session_id,r,i);"playable"===o.state&&(e.tracks[r].track=s),o.persistentTrack=s}}else console.error("unknown type for custom track")}}catch(e){console.error(e)}}function va(e){return["video","audio","screenVideo","screenAudio"].includes(e)}function ga(e,t,n){var r=n.getState();if(e.local){if(e.audio)try{e.audioTrack=r.local.streams.cam.stream.getAudioTracks()[0],e.audioTrack||(e.audio=!1)}catch(e){}if(e.video)try{e.videoTrack=r.local.streams.cam.stream.getVideoTracks()[0],e.videoTrack||(e.video=!1)}catch(e){}if(e.screen)try{e.screenVideoTrack=r.local.streams.screen.stream.getVideoTracks()[0],e.screenAudioTrack=r.local.streams.screen.stream.getAudioTracks()[0],e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch(e){}}else{var i=!0;try{var o=r.participants[e.session_id];o&&o.public&&o.public.rtcType&&"peer-to-peer"===o.public.rtcType.impl&&o.private&&!["connected","completed"].includes(o.private.peeringState)&&(i=!1)}catch(e){console.error(e)}if(!i)return e.audio=!1,e.audioTrack=!1,e.video=!1,e.videoTrack=!1,e.screen=!1,void(e.screenTrack=!1);try{r.streams;if(e.audio&&aa(r,e.session_id,"cam-audio")){var s=la(r,e.session_id,"cam","audio");s&&(t&&t.audioTrack&&t.audioTrack.id===s.id?e.audioTrack=s:s.muted||(e.audioTrack=s)),e.audioTrack||(e.audio=!1)}if(e.video&&aa(r,e.session_id,"cam-video")){var a=la(r,e.session_id,"cam","video");a&&(t&&t.videoTrack&&t.videoTrack.id===a.id?e.videoTrack=a:a.muted||(e.videoTrack=a)),e.videoTrack||(e.video=!1)}if(e.screen&&aa(r,e.session_id,"screen-audio")){var c=la(r,e.session_id,"screen","audio");c&&(t&&t.screenAudioTrack&&t.screenAudioTrack.id===c.id?e.screenAudioTrack=c:c.muted||(e.screenAudioTrack=c))}if(e.screen&&aa(r,e.session_id,"screen-video")){var l=la(r,e.session_id,"screen","video");l&&(t&&t.screenVideoTrack&&t.screenVideoTrack.id===l.id?e.screenVideoTrack=l:l.muted||(e.screenVideoTrack=l))}e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch(e){console.error("unexpected error matching up tracks",e)}}}function ma(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ya(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ya(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function ya(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ba=new Map,_a=null;function wa(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Sa(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sa(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Sa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ka=new Map,Ma=null;function Ca(e){Ta()?function(e){ba.has(e)||(ba.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(t){ba.has(e)&&(ba.get(e).lastDevicesString=JSON.stringify(t),_a||(_a=function(){var e=h((function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=ma(ba.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==ba.get(r).lastDevicesString&&(ba.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}}));return function(){return e.apply(this,arguments)}}(),navigator.mediaDevices.addEventListener("devicechange",_a)))})).catch((function(){})))}(e):function(e){ka.has(e)||(ka.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(t){ka.has(e)&&(ka.get(e).lastDevicesString=JSON.stringify(t),Ma||(Ma=setInterval(h((function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=wa(ka.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==ka.get(r).lastDevicesString&&(ka.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}})),3e3)))})))}(e)}function Ea(e){Ta()?function(e){ba.has(e)&&(ba.delete(e),0===ba.size&&_a&&(navigator.mediaDevices.removeEventListener("devicechange",_a),_a=null))}(e):function(e){ka.has(e)&&(ka.delete(e),0===ka.size&&Ma&&(clearInterval(Ma),Ma=null))}(e)}function Ta(){var e;return ys()||void 0!==(null===(e=navigator.mediaDevices)||void 0===e?void 0:e.ondevicechange)}var Oa=new Set;function Pa(e,t){var n=t.isLocalScreenVideo;return e&&"live"===e.readyState&&!function(e,t){return(!t.isLocalScreenVideo||"Chrome"!==js())&&e.muted&&!Oa.has(e.id)}(e,{isLocalScreenVideo:n})}function Aa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ja(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Aa(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Aa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ia=Object.freeze({VIDEO:"video",AUDIO:"audio",SCREEN_VIDEO:"screenVideo",SCREEN_AUDIO:"screenAudio",CUSTOM_VIDEO:"customVideo",CUSTOM_AUDIO:"customAudio"}),xa=Object.freeze({PARTICIPANTS:"participants",STREAMING:"streaming",TRANSCRIPTION:"transcription"}),La=Object.values(Ia),Da=["v","a","sv","sa","cv","ca"];Object.freeze(La.reduce((function(e,t,n){return e[t]=Da[n],e}),{})),Object.freeze(Da.reduce((function(e,t,n){return e[t]=La[n],e}),{}));var Na=[Ia.VIDEO,Ia.AUDIO,Ia.SCREEN_VIDEO,Ia.SCREEN_AUDIO],Ra=Object.values(xa),Fa=["p","s","t"];Object.freeze(Ra.reduce((function(e,t,n){return e[t]=Fa[n],e}),{})),Object.freeze(Fa.reduce((function(e,t,n){return e[t]=Ra[n],e}),{}));var Ba=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.base,i=n.byUserId,o=n.byParticipantId;t(this,e),this.base=r,this.byUserId=i,this.byParticipantId=o}return o(e,[{key:"clone",value:function(){var t=new e;if(this.base instanceof Ua?t.base=this.base.clone():t.base=this.base,void 0!==this.byUserId)for(var n in t.byUserId={},this.byUserId){var r=this.byUserId[n];t.byUserId[n]=r instanceof Ua?r.clone():r}if(void 0!==this.byParticipantId)for(var i in t.byParticipantId={},this.byParticipantId){var o=this.byParticipantId[i];t.byParticipantId[i]=o instanceof Ua?o.clone():o}return t}},{key:"toJSONObject",value:function(){var e={};if("boolean"==typeof this.base?e.base=this.base:this.base instanceof Ua&&(e.base=this.base.toJSONObject()),void 0!==this.byUserId)for(var t in e.byUserId={},this.byUserId){var n=this.byUserId[t];e.byUserId[t]=n instanceof Ua?n.toJSONObject():n}if(void 0!==this.byParticipantId)for(var r in e.byParticipantId={},this.byParticipantId){var i=this.byParticipantId[r];e.byParticipantId[r]=i instanceof Ua?i.toJSONObject():i}return e}},{key:"toMinifiedJSONObject",value:function(){var e={};if(void 0!==this.base&&("boolean"==typeof this.base?e.b=this.base:e.b=this.base.toMinifiedJSONObject()),void 0!==this.byUserId)for(var t in e.u={},this.byUserId){var n=this.byUserId[t];e.u[t]="boolean"==typeof n?n:n.toMinifiedJSONObject()}if(void 0!==this.byParticipantId)for(var r in e.p={},this.byParticipantId){var i=this.byParticipantId[r];e.p[r]="boolean"==typeof i?i:i.toMinifiedJSONObject()}return e}},{key:"normalize",value:function(){return this.base instanceof Ua&&(this.base=this.base.normalize()),this.byUserId&&(this.byUserId=Object.fromEntries(Object.entries(this.byUserId).map((function(e){var t=f(e,2),n=t[0],r=t[1];return[n,r instanceof Ua?r.normalize():r]})))),this.byParticipantId&&(this.byParticipantId=Object.fromEntries(Object.entries(this.byParticipantId).map((function(e){var t=f(e,2),n=t[0],r=t[1];return[n,r instanceof Ua?r.normalize():r]})))),this}}],[{key:"fromJSONObject",value:function(t){var n,r,i;if(void 0!==t.base&&(n="boolean"==typeof t.base?t.base:Ua.fromJSONObject(t.base)),void 0!==t.byUserId)for(var o in r={},t.byUserId){var s=t.byUserId[o];r[o]="boolean"==typeof s?s:Ua.fromJSONObject(s)}if(void 0!==t.byParticipantId)for(var a in i={},t.byParticipantId){var c=t.byParticipantId[a];i[a]="boolean"==typeof c?c:Ua.fromJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:"fromMinifiedJSONObject",value:function(t){var n,r,i;if(void 0!==t.b&&(n="boolean"==typeof t.b?t.b:Ua.fromMinifiedJSONObject(t.b)),void 0!==t.u)for(var o in r={},t.u){var s=t.u[o];r[o]="boolean"==typeof s?s:Ua.fromMinifiedJSONObject(s)}if(void 0!==t.p)for(var a in i={},t.p){var c=t.p[a];i[a]="boolean"==typeof c?c:Ua.fromMinifiedJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:"validateJSONObject",value:function(e){if("object"!==n(e))return[!1,"canReceive must be an object"];for(var t=["base","byUserId","byParticipantId"],r=0,i=Object.keys(e);r<i.length;r++){var o=i[r];if(!t.includes(o))return[!1,"canReceive can only contain keys (".concat(t.join(", "),")")];if("base"===o){var s=f(Ua.validateJSONObject(e.base,!0),2),a=s[0],c=s[1];if(!a)return[!1,c]}else{if("object"!==n(e[o]))return[!1,"invalid (non-object) value for field '".concat(o,"' in canReceive")];for(var l=0,u=Object.values(e[o]);l<u.length;l++){var d=u[l],h=f(Ua.validateJSONObject(d),2),p=h[0],v=h[1];if(!p)return[!1,v]}}}return[!0]}}])}(),Ua=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.video,i=n.audio,o=n.screenVideo,s=n.screenAudio,a=n.customVideo,c=n.customAudio;t(this,e),this.video=r,this.audio=i,this.screenVideo=o,this.screenAudio=s,this.customVideo=a,this.customAudio=c}return o(e,[{key:"clone",value:function(){var t=new e;return void 0!==this.video&&(t.video=this.video),void 0!==this.audio&&(t.audio=this.audio),void 0!==this.screenVideo&&(t.screenVideo=this.screenVideo),void 0!==this.screenAudio&&(t.screenAudio=this.screenAudio),void 0!==this.customVideo&&(t.customVideo=ja({},this.customVideo)),void 0!==this.customAudio&&(t.customAudio=ja({},this.customAudio)),t}},{key:"toJSONObject",value:function(){var e={};return void 0!==this.video&&(e.video=this.video),void 0!==this.audio&&(e.audio=this.audio),void 0!==this.screenVideo&&(e.screenVideo=this.screenVideo),void 0!==this.screenAudio&&(e.screenAudio=this.screenAudio),void 0!==this.customVideo&&(e.customVideo=ja({},this.customVideo)),void 0!==this.customAudio&&(e.customAudio=ja({},this.customAudio)),e}},{key:"toMinifiedJSONObject",value:function(){var e={};return void 0!==this.video&&(e.v=this.video),void 0!==this.audio&&(e.a=this.audio),void 0!==this.screenVideo&&(e.sv=this.screenVideo),void 0!==this.screenAudio&&(e.sa=this.screenAudio),void 0!==this.customVideo&&(e.cv=ja({},this.customVideo)),void 0!==this.customAudio&&(e.ca=ja({},this.customAudio)),e}},{key:"normalize",value:function(){function e(e,t){return e&&1===Object.keys(e).length&&e["*"]===t}return!(!0!==this.video||!0!==this.audio||!0!==this.screenVideo||!0!==this.screenAudio||!e(this.customVideo,!0)||!e(this.customAudio,!0))||(!1!==this.video||!1!==this.audio||!1!==this.screenVideo||!1!==this.screenAudio||!e(this.customVideo,!1)||!e(this.customAudio,!1))&&this}}],[{key:"fromBoolean",value:function(t){return new e({video:t,audio:t,screenVideo:t,screenAudio:t,customVideo:{"*":t},customAudio:{"*":t}})}},{key:"fromJSONObject",value:function(t){return new e({video:t.video,audio:t.audio,screenVideo:t.screenVideo,screenAudio:t.screenAudio,customVideo:void 0!==t.customVideo?ja({},t.customVideo):void 0,customAudio:void 0!==t.customAudio?ja({},t.customAudio):void 0})}},{key:"fromMinifiedJSONObject",value:function(t){return new e({video:t.v,audio:t.a,screenVideo:t.sv,screenAudio:t.sa,customVideo:t.cv,customAudio:t.ca})}},{key:"validateJSONObject",value:function(e,t){if("boolean"==typeof e)return[!0];if("object"!==n(e))return[!1,"invalid (non-object, non-boolean) value in canReceive"];for(var r=Object.keys(e),i=0,o=r;i<o.length;i++){var s=o[i];if(!La.includes(s))return[!1,"invalid media type '".concat(s,"' in canReceive")];if(Na.includes(s)){if("boolean"!=typeof e[s])return[!1,"invalid (non-boolean) value for media type '".concat(s,"' in canReceive")]}else{if("object"!==n(e[s]))return[!1,"invalid (non-object) value for media type '".concat(s,"' in canReceive")];for(var a=0,c=Object.values(e[s]);a<c.length;a++){if("boolean"!=typeof c[a])return[!1,"invalid (non-boolean) value for entry within '".concat(s,"' in canReceive")]}if(t&&void 0===e[s]["*"])return[!1,'canReceive "base" permission must specify "*" as an entry within \''.concat(s,"'")]}}return t&&r.length!==La.length?[!1,'canReceive "base" permission must specify all media types: '.concat(La.join(", ")," (or be set to a boolean shorthand)")]:[!0]}}])}(),Va=["result"],Ja=["preserveIframe"];function $a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$a(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function za(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(za=function(){return!!e})()}function Wa(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ha(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ha(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Ha(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ga={};var Qa="video",Ka="voice",Ya=ys()?{data:{}}:{data:{},topology:"none"},Xa={present:0,hidden:0},Za={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},ec=Object.keys(Za),tc=["state","volume","simulcastEncodings"],nc={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},rc={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string",visualState:"'default' | 'sidebar-open' | 'active'"}},ic={id:{allow:"string",controlledBy:"'*' | 'owners' | string[]",csp:"string",iconURL:"string",label:"string",loading:"'eager' | 'lazy'",location:"'main' | 'sidebar'",name:"string",referrerPolicy:"string",sandbox:"string",src:"string",srcdoc:"string",shared:"string[] | 'owners' | boolean"}},oc={customIntegrations:{validate:Pc,help:Tc()},customTrayButtons:{validate:Oc,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(rc))},url:{validate:function(e){return"string"==typeof e},help:"url should be a string"},baseUrl:{validate:function(e){return"string"==typeof e},help:"baseUrl should be a string"},token:{validate:function(e){return"string"==typeof e},help:"token should be a string",queryString:"t"},dailyConfig:{validate:function(e,t){try{return t.validateDailyConfig(e),!0}catch(e){console.error("Failed to validate dailyConfig",e)}return!1},help:"Unsupported dailyConfig. Check error logs for detailed info."},reactNativeConfig:{validate:function(e){return Ac(e,nc)},help:"reactNativeConfig should look like ".concat(JSON.stringify(nc),", all fields optional")},lang:{validate:function(e){return["da","de","en-us","en","es","fi","fr","it","jp","ka","nl","no","pl","pt","pt-BR","ru","sv","tr","user"].includes(e)},help:"language not supported. Options are: da, de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sv, tr, user"},userName:!0,userData:{validate:function(e){try{return yc(e),!0}catch(e){return console.error(e),!1}},help:"invalid userData type provided"},startVideoOff:!0,startAudioOff:!0,allowLocalVideo:!0,allowLocalAudio:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(e,t){if("boolean"==typeof e)return t._preloadCache.allowLocalVideo=e,!0;var n;if(e instanceof MediaStreamTrack)t._sharedTracks.videoTrack=e,n={customTrack:ls};else{if(delete t._sharedTracks.videoTrack,"string"!=typeof e)return console.error("videoSource must be a MediaStreamTrack, boolean, or a string"),!1;n={deviceId:e}}return t._updatePreloadCacheInputSettings({video:{settings:n}},!1),!0}},audioSource:{validate:function(e,t){if("boolean"==typeof e)return t._preloadCache.allowLocalAudio=e,!0;var n;if(e instanceof MediaStreamTrack)t._sharedTracks.audioTrack=e,n={customTrack:ls};else{if(delete t._sharedTracks.audioTrack,"string"!=typeof e)return console.error("audioSource must be a MediaStreamTrack, boolean, or a string"),!1;n={deviceId:e}}return t._updatePreloadCacheInputSettings({audio:{settings:n}},!1),!0}},subscribeToTracksAutomatically:{validate:function(e,t){return t._preloadCache.subscribeToTracksAutomatically=e,!0}},theme:{validate:function(e){var t=["accent","accentText","background","backgroundAccent","baseText","border","mainAreaBg","mainAreaBgAccent","mainAreaText","supportiveText"],r=function(e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!t.includes(i))return console.error('unsupported color "'.concat(i,'". Valid colors: ').concat(t.join(", "))),!1;if(!e[i].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error("".concat(i,' theme color should be provided in valid hex color format. Received: "').concat(e[i],'"')),!1}return!0};return"object"===n(e)&&("light"in e&&"dark"in e||"colors"in e)?"light"in e&&"dark"in e?"colors"in e.light?"colors"in e.dark?r(e.light.colors)&&r(e.dark.colors):(console.error('Dark theme is missing "colors" property.',e),!1):(console.error('Light theme is missing "colors" property.',e),!1):r(e.colors):(console.error('Theme must contain either both "light" and "dark" properties, or "colors".',e),!1)},help:"unsupported theme configuration. Check error logs for detailed info."},layoutConfig:{validate:function(e){if("grid"in e){var t=e.grid;if("maxTilesPerPage"in t){if(!Number.isInteger(t.maxTilesPerPage))return console.error("grid.maxTilesPerPage should be an integer. You passed ".concat(t.maxTilesPerPage,".")),!1;if(t.maxTilesPerPage>49)return console.error("grid.maxTilesPerPage can't be larger than 49 without sacrificing browser performance. Please contact us at https://www.daily.co/contact to talk about your use case."),!1}if("minTilesPerPage"in t){if(!Number.isInteger(t.minTilesPerPage))return console.error("grid.minTilesPerPage should be an integer. You passed ".concat(t.minTilesPerPage,".")),!1;if(t.minTilesPerPage<1)return console.error("grid.minTilesPerPage can't be lower than 1."),!1;if("maxTilesPerPage"in t&&t.minTilesPerPage>t.maxTilesPerPage)return console.error("grid.minTilesPerPage can't be higher than grid.maxTilesPerPage."),!1}}return!0},help:"unsupported layoutConfig. Check error logs for detailed info."},receiveSettings:{validate:function(e){return bc(e,{allowAllParticipantsKey:!1})},help:Ec({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!function(e,t){try{return t.validateUpdateSendSettings(e),!0}catch(e){return console.error("Failed to validate send settings",e),!1}}(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(e,t){var n;return!!_c(e)&&(t._inputSettings||(t._inputSettings={}),wc(e,null===(n=t.properties)||void 0===n?void 0:n.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:Cc()},layout:{validate:function(e){return"custom-v1"===e||"browser"===e||"none"===e},help:'layout may only be set to "custom-v1"',queryString:"layout"},emb:{queryString:"emb"},embHref:{queryString:"embHref"},dailyJsVersion:{queryString:"dailyJsVersion"},proxy:{queryString:"proxy"},strictMode:!0,allowMultipleCallInstances:!0},sc={styles:{validate:function(e){for(var t in e)if("cam"!==t&&"screen"!==t)return!1;if(e.cam)for(var n in e.cam)if("div"!==n&&"video"!==n)return!1;if(e.screen)for(var r in e.screen)if("div"!==r&&"video"!==r)return!1;return!0},help:"styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }"},setSubscribedTracks:{validate:function(e,t){if(t._preloadCache.subscribeToTracksAutomatically)return!1;var n=[!0,!1,"staged"];if(n.includes(e)||!ys()&&"avatar"===e)return!0;var r=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"],i=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var o in e)if("custom"===o){if(!n.includes(e[o])&&!i(e[o],!0))return!1}else{var s=!t&&!r.includes(o),a=!n.includes(e[o]);if(s||a)return!1}return!0};return i(e)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(ys()?"":" | 'avatar'"," | false | 'staged' | { [audio: true|false|'staged'], [video: true|false|'staged'], [screenAudio: true|false|'staged'], [screenVideo: true|false|'staged'] }")},setAudio:!0,setVideo:!0,setScreenShare:{validate:function(e){return!1===e},help:"setScreenShare must be false, as it's only meant for stopping remote participants' screen shares"},eject:!0,updatePermissions:{validate:function(e){for(var t=0,n=Object.entries(e);t<n.length;t++){var r=f(n[t],2),i=r[0],o=r[1];switch(i){case"hasPresence":if("boolean"!=typeof o)return!1;break;case"canSend":if(o instanceof Set||o instanceof Array||Array.isArray(o)){var s,a=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],c=Wa(o);try{for(c.s();!(s=c.n()).done;){var l=s.value;if(!a.includes(l))return!1}}catch(e){c.e(e)}finally{c.f()}}else if("boolean"!=typeof o)return!1;(o instanceof Array||Array.isArray(o))&&(e.canSend=new Set(o));break;case"canReceive":var u=f(Ba.validateJSONObject(o),2),d=u[0],h=u[1];if(!d)return console.error(h),!1;break;case"canAdmin":if(o instanceof Set||o instanceof Array||Array.isArray(o)){var p,v=["participants","streaming","transcription"],g=Wa(o);try{for(g.s();!(p=g.n()).done;){var m=p.value;if(!v.includes(m))return!1}}catch(e){g.e(e)}finally{g.f()}}else if("boolean"!=typeof o)return!1;(o instanceof Array||Array.isArray(o))&&(e.canAdmin=new Set(o));break;default:return!1}}return!0},help:"updatePermissions can take hasPresence, canSend, canReceive, and canAdmin permissions. hasPresence must be a boolean. canSend can be a boolean or an Array or Set of media types (video, audio, screenVideo, screenAudio, customVideo, customAudio). canReceive must be an object specifying base, byUserId, and/or byParticipantId fields (see documentation for more details). canAdmin can be a boolean or an Array or Set of admin types (participants, streaming, transcription)."}};Promise.any||(Promise.any=function(){var e=h((function*(e){return new Promise((function(t,n){var r=[];e.forEach((function(i){return Promise.resolve(i).then((function(e){t(e)})).catch((function(t){r.push(t),r.length===e.length&&n(r)}))}))}))}));return function(t){return e.apply(this,arguments)}}());var ac=function(){function r(e){var n,i,o,c,l,d,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,r),o=this,c=a(c=r),u(i=s(o,za()?Reflect.construct(c,l||[],a(o).constructor):c.apply(o,l)),"startListeningForDeviceChanges",(function(){Ca(i.handleDeviceChange)})),u(i,"stopListeningForDeviceChanges",(function(){Ea(i.handleDeviceChange)})),u(i,"handleDeviceChange",(function(e){e=e.map((function(e){return JSON.parse(JSON.stringify(e))})),i.emitDailyJSEvent({action:"available-devices-updated",availableDevices:e})})),u(i,"handleNativeAppStateChange",function(){var e=h((function*(e){if("destroyed"===e)return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield i.destroy());var t="active"===e;i.disableReactNativeAutoDeviceManagement("video")||(t?i.camUnmutedBeforeLosingNativeActiveState&&i.setLocalVideo(!0):(i.camUnmutedBeforeLosingNativeActiveState=i.localVideo(),i.camUnmutedBeforeLosingNativeActiveState&&i.setLocalVideo(!1)))}));return function(t){return e.apply(this,arguments)}}()),u(i,"handleNativeAudioFocusChange",(function(e){i.disableReactNativeAutoDeviceManagement("audio")||(i._hasNativeAudioFocus=e,i.toggleParticipantAudioBasedOnNativeAudioFocus(),i._hasNativeAudioFocus?i.micUnmutedBeforeLosingNativeAudioFocus&&i.setLocalAudio(!0):(i.micUnmutedBeforeLosingNativeAudioFocus=i.localAudio(),i.setLocalAudio(!1)))})),u(i,"handleNativeSystemScreenCaptureStop",(function(){i.stopScreenShare()})),i.strictMode=void 0===p.strictMode||p.strictMode,i.allowMultipleCallInstances=null!==(n=p.allowMultipleCallInstances)&&void 0!==n&&n,Object.keys(Ga).length&&(i._logDuplicateInstanceAttempt(),!i.allowMultipleCallInstances)){if(i.strictMode)throw new Error("Duplicate DailyIframe instances are not allowed");console.warn("Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`")}if(window._daily||(window._daily={pendings:[],instances:{}}),i.callClientId=K(),Ga[(d=i).callClientId]=d,window._daily.instances[i.callClientId]={},i._sharedTracks={},window._daily.instances[i.callClientId].tracks=i._sharedTracks,p.dailyJsVersion=r.version(),i._iframe=e,i._callObjectMode="none"===p.layout&&!i._iframe,i._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},void 0!==p.showLocalVideo?i._callObjectMode?console.error("showLocalVideo is not available in call object mode"):i._showLocalVideo=!!p.showLocalVideo:i._showLocalVideo=!0,void 0!==p.showParticipantsBar?i._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):i._showParticipantsBar=!!p.showParticipantsBar:i._showParticipantsBar=!0,void 0!==p.customIntegrations?i._callObjectMode?console.error("customIntegrations is not available in call object mode"):i._customIntegrations=p.customIntegrations:i._customIntegrations={},void 0!==p.customTrayButtons?i._callObjectMode?console.error("customTrayButtons is not available in call object mode"):i._customTrayButtons=p.customTrayButtons:i._customTrayButtons={},void 0!==p.activeSpeakerMode?i._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):i._activeSpeakerMode=!!p.activeSpeakerMode:i._activeSpeakerMode=!1,p.receiveSettings?i._callObjectMode?i._receiveSettings=p.receiveSettings:console.error("receiveSettings is only available in call object mode"):i._receiveSettings={},i.validateProperties(p),i.properties=qa({},p),i._inputSettings||(i._inputSettings={}),i._callObjectLoader=i._callObjectMode?new ea(i.callClientId):null,i._callState=vi,i._isPreparingToJoin=!1,i._accessState={access:Oi},i._meetingSessionSummary={},i._finalSummaryOfPrevSession={},i._meetingSessionState=Lc(Ya,i._callObjectMode),i._nativeInCallAudioMode=Qa,i._participants={},i._isScreenSharing=!1,i._participantCounts=Xa,i._rmpPlayerState={},i._waitingParticipants={},i._network={threshold:"good",quality:100,networkState:"unknown",stats:{}},i._activeSpeaker={},i._localAudioLevel=0,i._isLocalAudioLevelObserverRunning=!1,i._remoteParticipantsAudioLevel={},i._isRemoteParticipantsAudioLevelObserverRunning=!1,i._maxAppMessageSize=rs,i._messageChannel=ys()?new zs:new Js,i._iframe&&(i._iframe.requestFullscreen?i._iframe.addEventListener("fullscreenchange",(function(){document.fullscreenElement===i._iframe?(i.emitDailyJSEvent({action:Wo}),i.sendMessageToCallMachine({action:Wo})):(i.emitDailyJSEvent({action:Ho}),i.sendMessageToCallMachine({action:Ho}))})):i._iframe.webkitRequestFullscreen&&i._iframe.addEventListener("webkitfullscreenchange",(function(){document.webkitFullscreenElement===i._iframe?(i.emitDailyJSEvent({action:Wo}),i.sendMessageToCallMachine({action:Wo})):(i.emitDailyJSEvent({action:Ho}),i.sendMessageToCallMachine({action:Ho}))}))),ys()){var f=i.nativeUtils();f.addAudioFocusChangeListener&&f.removeAudioFocusChangeListener&&f.addAppStateChangeListener&&f.removeAppStateChangeListener&&f.addSystemScreenCaptureStopListener&&f.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),i._hasNativeAudioFocus=!0,f.addAudioFocusChangeListener(i.handleNativeAudioFocusChange),f.addAppStateChangeListener(i.handleNativeAppStateChange),f.addSystemScreenCaptureStopListener(i.handleNativeSystemScreenCaptureStop)}return i._callObjectMode&&i.startListeningForDeviceChanges(),i._messageChannel.addListenerForMessagesFromCallMachine(i.handleMessageFromCallMachine,i.callClientId,i),i}return l(r,x),o(r,[{key:"destroy",value:(ee=h((function*(){var e;try{yield this.leave()}catch(e){}var t=this._iframe;if(t){var n=t.parentElement;n&&n.removeChild(t)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),ys()){var r=this.nativeUtils();r.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),r.removeAppStateChangeListener(this.handleNativeAppStateChange),r.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete Ga[this.callClientId],(null===(e=window)||void 0===e||null===(e=e._daily)||void 0===e?void 0:e.instances)&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)})),function(){return ee.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(e){var t=e.bodyClass,n=e.cssFile,r=e.cssText;return gc(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:"iframe",value:function(){return gc(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return fc(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return fc(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(e,t){for(var n in t){if(!sc[n])throw new Error("unrecognized updateParticipant property ".concat(n));if(sc[n].validate&&!sc[n].validate(t[n],this,this._participants[e]))throw new Error(sc[n].help)}}},{key:"updateParticipant",value:function(e,t){return this._participants.local&&this._participants.local.session_id===e&&(e="local"),e&&t&&(this.validateParticipantProperties(e,t),this.sendMessageToCallMachine({action:"update-participant",id:e,properties:t})),this}},{key:"updateParticipants",value:function(e){var t=this._participants.local&&this._participants.local.session_id;for(var n in e)n===t&&(n="local"),n&&e[n]&&this.validateParticipantProperties(n,e[n]);return this.sendMessageToCallMachine({action:"update-participants",participants:e}),this}},{key:"updateWaitingParticipant",value:(Y=h((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(fc(this._callObjectMode,"updateWaitingParticipant()"),lc(this._callState,"updateWaitingParticipant()"),"string"!=typeof t||"object"!==n(r))throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise((function(n,i){e.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:t,updates:r},(function(e){e.error&&i(e.error),e.id||i(new Error("unknown error in updateWaitingParticipant()")),n({id:e.id})}))}))})),function(){return Y.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(G=h((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(fc(this._callObjectMode,"updateWaitingParticipants()"),lc(this._callState,"updateWaitingParticipants()"),"object"!==n(t))throw new Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise((function(n,r){e.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updatesById:t},(function(e){e.error&&r(e.error),e.ids||r(new Error("unknown error in updateWaitingParticipants()")),n({ids:e.ids})}))}))})),function(){return G.apply(this,arguments)})},{key:"requestAccess",value:(H=h((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.access,r=void 0===n?{level:Pi}:n,i=t.name,o=void 0===i?"":i;return fc(this._callObjectMode,"requestAccess()"),lc(this._callState,"requestAccess()"),new Promise((function(t,n){e.sendMessageToCallMachine({action:"daily-method-request-access",access:r,name:o},(function(e){e.error&&n(e.error),e.access||n(new Error("unknown error in requestAccess()")),t({access:e.access,granted:e.granted})}))}))})),function(){return H.apply(this,arguments)})},{key:"localAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.audio.state):null}},{key:"localVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.video.state):null}},{key:"setLocalAudio",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"forceDiscardTrack"in t&&(ys()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),t={}):e&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),t={})),this.sendMessageToCallMachine({action:"local-audio",state:e,options:t}),this}},{key:"localScreenAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenAudio.state):null}},{key:"localScreenVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenVideo.state):null}},{key:"updateScreenShare",value:function(e){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:e}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(e){return this.sendMessageToCallMachine({action:"local-video",state:e}),this}},{key:"_setAllowLocalAudio",value:function(e){if(this._preloadCache.allowLocalAudio=e,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-audio",state:e}),this}},{key:"_setAllowLocalVideo",value:function(e){if(this._preloadCache.allowLocalVideo=e,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-video",state:e}),this}},{key:"getReceiveSettings",value:(W=h((function*(e){var t=this,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).showInheritedValues,i=void 0!==r&&r;if(fc(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(n(e)){case"string":return new Promise((function(n){t.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:e,showInheritedValues:i},(function(e){n(e.receiveSettings)}))}));case"undefined":return this._receiveSettings;default:throw new Error('first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments')}})),function(e){return W.apply(this,arguments)})},{key:"updateReceiveSettings",value:(z=h((function*(e){var t=this;if(fc(this._callObjectMode,"updateReceiveSettings()"),!bc(e,{allowAllParticipantsKey:!0}))throw new Error(Ec({allowAllParticipantsKey:!0}));return lc(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise((function(n){t.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:e},(function(e){n({receiveSettings:e.receiveSettings})}))}))})),function(e){return z.apply(this,arguments)})},{key:"_prepInputSettingsForSharing",value:function(e,t){if(e){var n={};if(e.audio){var r,i,o;e.audio.settings&&(!Object.keys(e.audio.settings).length&&t||(n.audio={settings:qa({},e.audio.settings)})),t&&null!==(r=n.audio)&&void 0!==r&&null!==(r=r.settings)&&void 0!==r&&r.customTrack&&(n.audio.settings={customTrack:this._sharedTracks.audioTrack});var s="none"===(null===(i=e.audio.processor)||void 0===i?void 0:i.type)&&(null===(o=e.audio.processor)||void 0===o?void 0:o._isDefaultWhenNone);if(e.audio.processor&&!s){var a=qa({},e.audio.processor);delete a._isDefaultWhenNone,n.audio=qa(qa({},n.audio),{},{processor:a})}}if(e.video){var c,l,u;e.video.settings&&(!Object.keys(e.video.settings).length&&t||(n.video={settings:qa({},e.video.settings)})),t&&null!==(c=n.video)&&void 0!==c&&null!==(c=c.settings)&&void 0!==c&&c.customTrack&&(n.video.settings={customTrack:this._sharedTracks.videoTrack});var d="none"===(null===(l=e.video.processor)||void 0===l?void 0:l.type)&&(null===(u=e.video.processor)||void 0===u?void 0:u._isDefaultWhenNone);if(e.video.processor&&!d){var h=qa({},e.video.processor);delete h._isDefaultWhenNone,n.video=qa(qa({},n.video),{},{processor:h})}}return n}}},{key:"getInputSettings",value:function(){var e=this;return gc(),new Promise((function(t){t(e._getInputSettings())}))}},{key:"_getInputSettings",value:function(){var e,t,n,r,i,o,s={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(e=(null===(n=this._inputSettings)||void 0===n?void 0:n.video)||s,t=(null===(r=this._inputSettings)||void 0===r?void 0:r.audio)||s):(e=(null===(i=this._preloadCache)||void 0===i||null===(i=i.inputSettings)||void 0===i?void 0:i.video)||s,t=(null===(o=this._preloadCache)||void 0===o||null===(o=o.inputSettings)||void 0===o?void 0:o.audio)||s);var a={audio:t,video:e};return this._prepInputSettingsForSharing(a,!0)}},{key:"_updatePreloadCacheInputSettings",value:function(e,t){var n=this._inputSettings||{},r={};if(e.video){var i,o,s;if(r.video={},e.video.settings)r.video.settings={},t||e.video.settings.customTrack||null===(s=n.video)||void 0===s||!s.settings?r.video.settings=e.video.settings:r.video.settings=qa(qa({},n.video.settings),e.video.settings),Object.keys(r.video.settings).length||delete r.video.settings;else null!==(i=n.video)&&void 0!==i&&i.settings&&(r.video.settings=n.video.settings);e.video.processor?r.video.processor=e.video.processor:null!==(o=n.video)&&void 0!==o&&o.processor&&(r.video.processor=n.video.processor)}else n.video&&(r.video=n.video);if(e.audio){var a,c,l;if(r.audio={},e.audio.settings)r.audio.settings={},t||e.audio.settings.customTrack||null===(l=n.audio)||void 0===l||!l.settings?r.audio.settings=e.audio.settings:r.audio.settings=qa(qa({},n.audio.settings),e.audio.settings),Object.keys(r.audio.settings).length||delete r.audio.settings;else null!==(a=n.audio)&&void 0!==a&&a.settings&&(r.audio.settings=n.audio.settings);e.audio.processor?r.audio.processor=e.audio.processor:null!==(c=n.audio)&&void 0!==c&&c.processor&&(r.audio.processor=n.audio.processor)}else n.audio&&(r.audio=n.audio);this._maybeUpdateInputSettings(r)}},{key:"_devicesFromInputSettings",value:function(e){var t,n,r=(null==e||null===(t=e.video)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.deviceId)||null,i=(null==e||null===(n=e.audio)||void 0===n||null===(n=n.settings)||void 0===n?void 0:n.deviceId)||null,o=this._preloadCache.outputDeviceId||null;return{camera:r?{deviceId:r}:{},mic:i?{deviceId:i}:{},speaker:o?{deviceId:o}:{}}}},{key:"updateInputSettings",value:(q=h((function*(e){var t=this;return gc(),_c(e)?e.video||e.audio?(wc(e,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(e,!0),this._getInputSettings()):new Promise((function(n,r){t.sendMessageToCallMachine({action:"update-input-settings",inputSettings:e},(function(i){if(i.error)r(i.error);else{if(i.returnPreloadCache)return t._updatePreloadCacheInputSettings(e,!0),void n(t._getInputSettings());t._maybeUpdateInputSettings(i.inputSettings),n(t._prepInputSettingsForSharing(i.inputSettings,!0))}}))}))):this._getInputSettings():(console.error(Cc()),Promise.reject(Cc()))})),function(e){return q.apply(this,arguments)})},{key:"setBandwidth",value:function(e){var t=e.kbs,n=e.trackConstraints;if(gc(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:t,trackConstraints:n}),this}},{key:"getDailyLang",value:function(){var e=this;if(gc(),this._callMachineInitialized)return new Promise((function(t){e.sendMessageToCallMachine({action:"get-daily-lang"},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))}},{key:"setDailyLang",value:function(e){return gc(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:e}),this}},{key:"setProxyUrl",value:function(e){return this.sendMessageToCallMachine({action:"set-proxy-url",proxyUrl:e}),this}},{key:"setIceConfig",value:function(e){return this.sendMessageToCallMachine({action:"set-ice-config",iceConfig:e}),this}},{key:"meetingSessionSummary",value:function(){return[_i,wi].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:($=h((function*(){var e=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),lc(this._callState,"getMeetingSession()"),new Promise((function(t){e.sendMessageToCallMachine({action:"get-meeting-session"},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return $.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return lc(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"replace";fc(this._callObjectMode,"setMeetingSessionData()"),lc(this._callState,"setMeetingSessionData");try{!function(e,t){new Qs({data:e,mergeStrategy:t})}(e,t)}catch(e){throw console.error(e),e}try{this.sendMessageToCallMachine({action:"set-session-data",data:e,mergeStrategy:t})}catch(e){throw new Error("Error setting meeting session data: ".concat(e))}}},{key:"setUserName",value:function(e,t){var n=this;return this.properties.userName=e,new Promise((function(r){n.sendMessageToCallMachine({action:"set-user-name",name:null!=e?e:"",thisMeetingOnly:ys()||!!t&&!!t.thisMeetingOnly},(function(e){delete e.action,delete e.callbackStamp,r(e)}))}))}},{key:"setUserData",value:(J=h((function*(e){var t=this;try{yc(e)}catch(e){throw console.error(e),e}if(this.properties.userData=e,this._callMachineInitialized)return new Promise((function(n){try{t.sendMessageToCallMachine({action:"set-user-data",userData:e},(function(e){delete e.action,delete e.callbackStamp,n(e)}))}catch(e){throw new Error("Error setting user data: ".concat(e))}}))})),function(e){return J.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(e){if(e&&(e<100||"number"!=typeof e))throw new Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(e){var t=this;if("undefined"==typeof AudioWorkletNode&&!ys())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:e},(function(e){t._isLocalAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.localAudioLevelObserver={enabled:!0,interval:e}}},{key:"isLocalAudioLevelObserverRunning",value:function(){return this._isLocalAudioLevelObserverRunning}},{key:"stopLocalAudioLevelObserver",value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-local-audio-level-observer"})}},{key:"startRemoteParticipantsAudioLevelObserver",value:function(e){var t=this;if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:e},(function(e){t._isRemoteParticipantsAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:e}}},{key:"isRemoteParticipantsAudioLevelObserverRunning",value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:"stopRemoteParticipantsAudioLevelObserver",value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-remote-participants-audio-level-observer"})}},{key:"startCamera",value:(V=h((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(fc(this._callObjectMode,"startCamera()"),dc(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),this.needsLoad())try{yield this.load(t)}catch(e){return Promise.reject(e)}else{if(this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(t),this.properties=qa(qa({},this.properties),t)}return new Promise((function(t){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:"start-camera",properties:cc(e.properties,e.callClientId),preloadCache:cc(e._preloadCache,e.callClientId)},(function(e){t({camera:e.camera,mic:e.mic,speaker:e.speaker})}))}))})),function(){return V.apply(this,arguments)})},{key:"validateCustomTrack",value:function(e,t,n){if(n&&n.length>50)throw new Error("Custom track `trackName` must not be more than 50 characters");if(t&&"music"!==t&&"speech"!==t&&!(t instanceof Object))throw new Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(!!n&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(n))throw new Error("Custom track `trackName` must not match a track name already used by daily: cam-audio, cam-video, customVideoDefaults, screen-video, screen-audio, rmpAudio, rmpVideo");if(!(e instanceof MediaStreamTrack))throw new Error("Custom tracks provided must be instances of MediaStreamTrack")}},{key:"startCustomTrack",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{track:track,mode:mode,trackName:trackName};return gc(),lc(this._callState,"startCustomTrack()"),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise((function(n,r){e._sharedTracks.customTrack=t.track,t.track=ls,e.sendMessageToCallMachine({action:"start-custom-track",properties:t},(function(e){e.error?r({error:e.error}):n(e.mediaTag)}))}))}},{key:"stopCustomTrack",value:function(e){var t=this;return gc(),lc(this._callState,"stopCustomTrack()"),new Promise((function(n){t.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:e},(function(e){n(e.mediaTag)}))}))}},{key:"setCamera",value:function(e){var t=this;return mc(),hc(this._callMachineInitialized,"setCamera()"),new Promise((function(n){t.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:e},(function(e){n({device:e.device})}))}))}},{key:"setAudioDevice",value:(U=h((function*(e){return mc(),this.nativeUtils().setAudioDevice(e),{deviceId:yield this.nativeUtils().getAudioDevice()}})),function(e){return U.apply(this,arguments)})},{key:"cycleCamera",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(n){e.sendMessageToCallMachine({action:"cycle-camera",properties:t},(function(e){n({device:e.device})}))}))}},{key:"cycleMic",value:function(){var e=this;return gc(),new Promise((function(t){e.sendMessageToCallMachine({action:"cycle-mic"},(function(e){t({device:e.device})}))}))}},{key:"getCameraFacingMode",value:function(){var e=this;return mc(),new Promise((function(t){e.sendMessageToCallMachine({action:"get-camera-facing-mode"},(function(e){t(e.facingMode)}))}))}},{key:"setInputDevicesAsync",value:(B=h((function*(e){var t=this,n=e.audioDeviceId,r=e.videoDeviceId,i=e.audioSource,o=e.videoSource;if(gc(),void 0!==i&&(n=i),void 0!==o&&(r=o),"boolean"==typeof n&&(this._setAllowLocalAudio(n),n=void 0),"boolean"==typeof r&&(this._setAllowLocalVideo(r),r=void 0),!n&&!r)return yield this.getInputDevices();var s={};return n&&(n instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=n,n=ls,s.audio={settings:{customTrack:n}}):(delete this._sharedTracks.audioTrack,s.audio={settings:{deviceId:n}})),r&&(r instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=r,r=ls,s.video={settings:{customTrack:r}}):(delete this._sharedTracks.videoTrack,s.video={settings:{deviceId:r}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(s,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise((function(e){t.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:n,videoDeviceId:r},(function(n){if(delete n.action,delete n.callbackStamp,n.returnPreloadCache)return t._updatePreloadCacheInputSettings(s,!1),void e(t._devicesFromInputSettings(t._inputSettings));e(n)}))}))})),function(e){return B.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(F=h((function*(e){var t=this,n=e.outputDeviceId;return gc(),n&&(this._preloadCache.outputDeviceId=n),this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(e){t.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:n},(function(n){delete n.action,delete n.callbackStamp,n.returnPreloadCache?e(t._devicesFromInputSettings(t._inputSettings)):e(n)}))}))})),function(e){return F.apply(this,arguments)})},{key:"getInputDevices",value:(R=h((function*(){var e=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(t){e.sendMessageToCallMachine({action:"get-input-devices"},(function(n){n.returnPreloadCache?t(e._devicesFromInputSettings(e._inputSettings)):t({camera:n.camera,mic:n.mic,speaker:n.speaker})}))}))})),function(){return R.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return mc(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(e){if(mc(),[Qa,Ka].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement("audio")&&uc(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",e)}},{key:"preAuth",value:(D=h((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(fc(this._callObjectMode,"preAuth()"),dc(this._callState,this._isPreparingToJoin,"preAuth()"),this.needsLoad()&&(yield this.load(t)),!t.url)throw new Error("preAuth() requires at least a url to be provided");return this.validateProperties(t),this.properties=qa(qa({},this.properties),t),new Promise((function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:"daily-method-preauth",properties:cc(e.properties,e.callClientId),preloadCache:cc(e._preloadCache,e.callClientId)},(function(r){return r.error?n(r.error):r.access?(e._didPreAuth=!0,void t({access:r.access})):n(new Error("unknown error in preAuth()"))}))}))})),function(){return D.apply(this,arguments)})},{key:"load",value:(L=h((function*(e){var t=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");if(e&&(this.validateProperties(e),this.properties=qa(qa({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");return this._updateCallState(gi),this.emitDailyJSEvent({action:to}),this._callObjectMode?new Promise((function(e,n){t._callObjectLoader.cancel();var r=Date.now();t._callObjectLoader.load(t.properties.dailyConfig,(function(n){t._bundleLoadTime=n?"no-op":Date.now()-r,t._updateCallState(mi),n&&t.emitDailyJSEvent({action:ro}),e()}),(function(e,r){if(t.emitDailyJSEvent({action:no}),!r){t._updateCallState(wi),t.resetMeetingDependentVars();var i={action:ns,errorMsg:e.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:e,bundleUrl:Z(t.properties.dailyConfig)}}};t._maybeSendToSentry(i),t.emitDailyJSEvent(i),n(e.msg)}}))})):(this._iframe.src=X(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise((function(e,n){t._loadedCallback=function(r){t._callState!==wi?(t._updateCallState(mi),(t.properties.cssFile||t.properties.cssText)&&t.loadCss(t.properties),e()):n(r)}})))}})),function(e){return L.apply(this,arguments)})},{key:"join",value:(I=h((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();var n=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(t)}catch(e){return this.updateIsPreparingToJoin(!1),Promise.reject(e)}}else{if(n=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(t.url&&!this._callObjectMode&&t.url&&t.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(t.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(t),this.properties=qa(qa({},this.properties),t)}return void 0!==t.showLocalVideo&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!t.showLocalVideo),void 0!==t.showParticipantsBar&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!t.showParticipantsBar),this._callState===bi||this._callState===yi?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(yi,!1),this.emitDailyJSEvent({action:so}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:"join-meeting",properties:cc(this.properties,this.callClientId),preloadCache:cc(this._preloadCache,this.callClientId)}),new Promise((function(t,r){e._joinedCallback=function(i,o){if(e._callState!==wi){if(e._updateCallState(bi),i)for(var s in i){if(e._callObjectMode){var a=e._callMachine().store;pa(i[s],a),fa(i[s],a),ga(i[s],e._participants[s],a)}e._participants[s]=qa({},i[s]),e.toggleParticipantAudioBasedOnNativeAudioFocus()}n&&e.loadCss(e.properties),t(i)}else r(o)}})))})),function(){return I.apply(this,arguments)})},{key:"leave",value:(j=h((function*(){var e=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise((function(t){e._callState===_i||e._callState===wi?t():e._callObjectLoader&&!e._callObjectLoader.loaded?(e._callObjectLoader.cancel(),e._updateCallState(_i),e.resetMeetingDependentVars(),e.emitDailyJSEvent({action:_i}),t()):(e._resolveLeave=t,e.sendMessageToCallMachine({action:"leave-meeting"}))}))})),function(){return j.apply(this,arguments)})},{key:"startScreenShare",value:(A=h((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(hc(this._callMachineInitialized,"startScreenShare()"),t.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",t.screenVideoSendSettings),t.mediaStream&&(this._sharedTracks.screenMediaStream=t.mediaStream,t.mediaStream=ls),"undefined"!=typeof DailyNativeUtils&&void 0!==DailyNativeUtils.isIOS&&DailyNativeUtils.isIOS){var n=this.nativeUtils();if(yield n.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:ts,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});n.setSystemScreenCaptureStartCallback((function(){n.setSystemScreenCaptureStartCallback(null),e.sendMessageToCallMachine({action:ss,captureOptions:t})})),n.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:ss,captureOptions:t})})),function(){return A.apply(this,arguments)})},{key:"stopScreenShare",value:function(){hc(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.type;if(t&&"cloud"!==t&&"raw-tracks"!==t&&"local"!==t)throw new Error("invalid type: ".concat(t,", allowed values 'cloud', 'raw-tracks', or 'local'"));this.sendMessageToCallMachine(qa({action:"local-recording-start"},e))}},{key:"updateRecording",value:function(e){var t=e.layout,n=void 0===t?{preset:"default"}:t,r=e.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:n,instanceId:r})}},{key:"stopRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(qa({action:"local-recording-stop"},e))}},{key:"startLiveStreaming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(qa({action:"daily-method-start-live-streaming"},e))}},{key:"updateLiveStreaming",value:function(e){var t=e.layout,n=void 0===t?{preset:"default"}:t,r=e.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:n,instanceId:r})}},{key:"addLiveStreamingEndpoints",value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:as,endpointsOp:fs,endpoints:t,instanceId:n})}},{key:"removeLiveStreamingEndpoints",value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:as,endpointsOp:vs,endpoints:t,instanceId:n})}},{key:"stopLiveStreaming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(qa({action:"daily-method-stop-live-streaming"},e))}},{key:"validateDailyConfig",value:function(e){e.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(e.camSimulcastEncodings)),e.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),Ps()&&e.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e){if(!(e instanceof Array||Array.isArray(e)))throw new Error("encodings must be an Array");if(!xc(e.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var r=0;r<e.length;r++){var i=e[r];for(var o in this._validateEncodingLayerHasValidProperties(i),i)if(ec.includes(o)){if("number"!=typeof i[o])throw new Error("".concat(o," must be a number"));if(t){var s=t[o],a=s.min,c=s.max;if(!xc(i[o],a,c))throw new Error("".concat(o," value not in range. valid range: ").concat(a," to ").concat(c))}}else if(!["active","scalabilityMode"].includes(o))throw new Error("Invalid key ".concat(o,", valid keys are:")+Object.values(ec));if(n&&!i.hasOwnProperty("maxBitrate"))throw new Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(P=h((function*(e){var t=this,n=e.url,r=e.settings,i=void 0===r?{state:hs.PLAY}:r;try{!function(e){if("string"!=typeof e)throw new Error('url parameter must be "string" type')}(n),Ic(i),function(e){for(var t in e)if(!tc.includes(t))throw new Error("Invalid key ".concat(t,", valid keys are: ").concat(tc));e.simulcastEncodings&&this.validateSimulcastEncodings(e.simulcastEncodings,Za,!0)}(i)}catch(e){throw console.error("invalid argument Error: ".concat(e)),console.error('startRemoteMediaPlayer arguments must be of the form:\n { url: "playback url",\n settings?:\n {state: "play"|"pause", simulcastEncodings?: [{}] } }'),e}return new Promise((function(e,r){t.sendMessageToCallMachine({action:"daily-method-start-remote-media-player",url:n,settings:i},(function(t){t.error?r({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})}))}))})),function(e){return P.apply(this,arguments)})},{key:"stopRemoteMediaPlayer",value:(O=h((function*(e){var t=this;if("string"!=typeof e)throw new Error(" remotePlayerID must be of type string");return new Promise((function(n,r){t.sendMessageToCallMachine({action:"daily-method-stop-remote-media-player",session_id:e},(function(e){e.error?r({error:e.error,errorMsg:e.errorMsg}):n()}))}))})),function(e){return O.apply(this,arguments)})},{key:"updateRemoteMediaPlayer",value:(T=h((function*(e){var t=this,n=e.session_id,r=e.settings;try{Ic(r)}catch(e){throw console.error("invalid argument Error: ".concat(e)),console.error('updateRemoteMediaPlayer arguments must be of the form:\n session_id: "participant session",\n { settings?: {state: "play"|"pause"} }'),e}return new Promise((function(e,i){t.sendMessageToCallMachine({action:"daily-method-update-remote-media-player",session_id:n,settings:r},(function(t){t.error?i({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})}))}))})),function(e){return T.apply(this,arguments)})},{key:"startTranscription",value:function(e){lc(this._callState,"startTranscription()"),this.sendMessageToCallMachine(qa({action:"daily-method-start-transcription"},e))}},{key:"updateTranscription",value:function(e){if(lc(this._callState,"updateTranscription()"),!e)throw new Error("updateTranscription Error: options is mandatory");if("object"!==n(e))throw new Error("updateTranscription Error: options must be object type");if(e.participants&&!Array.isArray(e.participants))throw new Error("updateTranscription Error: participants must be an array");this.sendMessageToCallMachine(qa({action:"daily-method-update-transcription"},e))}},{key:"stopTranscription",value:function(e){if(lc(this._callState,"stopTranscription()"),e&&"object"!==n(e))throw new Error("stopTranscription Error: options must be object type");if(e&&!e.instanceId)throw new Error('"instanceId" not provided');this.sendMessageToCallMachine(qa({action:"daily-method-stop-transcription"},e))}},{key:"startDialOut",value:(E=h((function*(e){var t=this;lc(this._callState,"startDialOut()");var n=function(e){if(e){if(!Array.isArray(e))throw new Error("Error starting dial out: audio codec must be an array");if(e.length<=0)throw new Error("Error starting dial out: audio codec array specified but empty");e.forEach((function(e){if("string"!=typeof e)throw new Error("Error starting dial out: audio codec must be a string");if("OPUS"!==e&&"PCMU"!==e&&"PCMA"!==e&&"G722"!==e)throw new Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722")}))}};if(!e.sipUri&&!e.phoneNumber)throw new Error("Error starting dial out: either a sip uri or phone number must be provided");if(e.sipUri&&e.phoneNumber)throw new Error("Error starting dial out: only one of sip uri or phone number must be provided");if(e.sipUri){if("string"!=typeof e.sipUri)throw new Error("Error starting dial out: sipUri must be a string");if(!e.sipUri.startsWith("sip:"))throw new Error("Error starting dial out: Invalid SIP URI, must start with 'sip:'");if(e.video&&"boolean"!=typeof e.video)throw new Error("Error starting dial out: video must be a boolean value");!function(e){if(e&&(n(e.audio),e.video)){if(!Array.isArray(e.video))throw new Error("Error starting dial out: video codec must be an array");if(e.video.length<=0)throw new Error("Error starting dial out: video codec array specified but empty");e.video.forEach((function(e){if("string"!=typeof e)throw new Error("Error starting dial out: video codec must be a string");if("H264"!==e&&"VP8"!==e)throw new Error("Error starting dial out: video codec must be H264 or VP8")}))}}(e.codecs)}if(e.phoneNumber){if("string"!=typeof e.phoneNumber)throw new Error("Error starting dial out: phoneNumber must be a string");if(!/^\+\d{1,}$/.test(e.phoneNumber))throw new Error("Error starting dial out: Invalid phone number, must be valid phone number as per E.164");e.codecs&&n(e.codecs.audio)}if(e.callerId){if("string"!=typeof e.callerId)throw new Error("Error starting dial out: callerId must be a string");if(e.sipUri)throw new Error("Error starting dial out: callerId not allowed with sipUri")}if(e.displayName){if("string"!=typeof e.displayName)throw new Error("Error starting dial out: displayName must be a string");if(e.displayName.length>=200)throw new Error("Error starting dial out: displayName length must be less than 200")}if(e.userId){if("string"!=typeof e.userId)throw new Error("Error starting dial out: userId must be a string");if(e.userId.length>36)throw new Error("Error starting dial out: userId length must be less than or equal to 36")}return new Promise((function(n,r){t.sendMessageToCallMachine(qa({action:"dialout-start"},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return E.apply(this,arguments)})},{key:"stopDialOut",value:function(e){var t=this;return lc(this._callState,"stopDialOut()"),new Promise((function(n,r){t.sendMessageToCallMachine(qa({action:"dialout-stop"},e),(function(e){e.error?r(e.error):n(e)}))}))}},{key:"sipCallTransfer",value:(C=h((function*(e){var t=this;if(lc(this._callState,"sipCallTransfer()"),!e)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return e.useSipRefer=!1,jc(e,"sipCallTransfer"),new Promise((function(n,r){t.sendMessageToCallMachine(qa({action:gs},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return C.apply(this,arguments)})},{key:"sipRefer",value:(M=h((function*(e){var t=this;if(lc(this._callState,"sipRefer()"),!e)throw new Error("sessionId and toEndPoint are mandatory parameter");return e.useSipRefer=!0,jc(e,"sipRefer"),new Promise((function(n,r){t.sendMessageToCallMachine(qa({action:gs},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return M.apply(this,arguments)})},{key:"sendDTMF",value:(k=h((function*(e){var t=this;return lc(this._callState,"sendDTMF()"),function(e){var t=e.sessionId,n=e.tones;if(!t||!n)throw new Error("sessionId and tones are mandatory parameter");if("string"!=typeof t||"string"!=typeof n)throw new Error("sessionId and tones should be of string type");if(n.length>20)throw new Error("tones string must be upto 20 characters");var r=/[^0-9A-D*#]/g,i=n.match(r);if(i&&i[0])throw new Error("".concat(i[0]," is not valid DTMF tone"))}(e),new Promise((function(n,r){t.sendMessageToCallMachine(qa({action:"send-dtmf"},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return k.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var e=this;if(this._callState!==bi){return Promise.resolve(qa({stats:{latest:{}}},this._network))}return new Promise((function(t){e.sendMessageToCallMachine({action:"get-calc-stats"},(function(n){t(qa(qa({},e._network),{},{stats:n.stats}))}))}))}},{key:"testWebsocketConnectivity",value:(S=h((function*(){var e=this;if(pc(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}return new Promise((function(t,n){e.sendMessageToCallMachine({action:"test-websocket-connectivity"},(function(e){e.error?n(e.error):t(e.results)}))}))})),function(){return S.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(e){return e?e instanceof MediaStreamTrack?!!Pa(e,{isLocalScreenVideo:!1})||(console.error("Video track is not playable. This test needs a live video track."),!1):(console.error("Video track needs to be of type `MediaStreamTrack`."),!1):(console.error("Missing video track. You must provide a video track in order to run this test."),!1)}},{key:"testCallQuality",value:(w=h((function*(){var t=this;gc(),fc(this._callObjectMode,"testCallQuality()"),hc(this._callMachineInitialized,"testCallQuality()",null,!0),dc(this._callState,this._isPreparingToJoin,"testCallQuality()");var n=this._testCallAlreadyInProgress,r=function(e){n||(t._testCallInProgress=e)};if(r(!0),this.needsLoad())try{var i=this._callState;yield this.load(),this._callState=i}catch(e){return r(!1),Promise.reject(e)}return new Promise((function(n){t.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:t.properties.dailyJsVersion},(function(i){var o=i.results,s=o.result,a=e(o,Va);if("failed"===s){var c,l=qa({},a);null!==(c=a.error)&&void 0!==c&&c.details?(a.error.details=JSON.parse(a.error.details),l.error=qa(qa({},l.error),{},{details:qa({},l.error.details)}),l.error.details.duringTest="testCallQuality"):(l.error=l.error?qa({},l.error):{},l.error.details={duringTest:"testCallQuality"}),t._maybeSendToSentry(l)}r(!1),n(qa({result:s},a))}))}))})),function(){return w.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(_=h((function*(e){var t;ys()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),t=yield this.testPeerToPeerCallQuality(e)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),t=yield this.testCallQuality());var n={result:t.result,secondsElapsed:t.secondsElapsed};return t.data&&(n.data={maxRTT:t.data.maxRoundTripTime,packetLoss:t.data.avgRecvPacketLoss}),n})),function(e){return _.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(b=h((function*(e){var t=this;if(pc(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}var n=e.videoTrack,r=e.duration;if(!this._validateVideoTrackForNetworkTests(n))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=n,new Promise((function(e,n){t.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:r},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return b.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){ys()?(console.warn("stopTestConnectionQuality() is deprecated: use testPeerToPeerCallQuality() and stopTestPeerToPeerCallQuality() instead"),this.stopTestPeerToPeerCallQuality()):(console.warn("stopTestConnectionQuality() is deprecated: use testCallQuality() and stopTestCallQuality() instead"),this.stopTestCallQuality())}},{key:"stopTestPeerToPeerCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-p2p-call-quality"})}},{key:"testNetworkConnectivity",value:(y=h((function*(e){var t=this;if(pc(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}if(!this._validateVideoTrackForNetworkTests(e))throw new Error("Video track error");return this._sharedTracks.videoTrackForNetworkConnectivityTest=e,new Promise((function(e,n){t.sendMessageToCallMachine({action:"test-network-connectivity"},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return y.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var e=this;return new Promise((function(t){if(e._callState===bi){e.sendMessageToCallMachine({action:"get-cpu-load-stats"},(function(e){t(e.cpuStats)}))}else t({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})}))}},{key:"_validateEncodingLayerHasValidProperties",value:function(e){var t;if(!((null===(t=Object.keys(e))||void 0===t?void 0:t.length)>0))throw new Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(ec))}},{key:"_validateVideoSendSettings",value:function(e,t){var r="screenVideo"===e?["default-screen-video","detail-optimized","motion-optimized","motion-and-detail-balanced"]:["default-video","bandwidth-optimized","bandwidth-and-quality-balanced","quality-optimized","adaptive-2-layers","adaptive-3-layers"],i="Video send settings should be either an object or one of the supported presets: ".concat(r.join());if("string"==typeof t){if(!r.includes(t))throw new Error(i)}else{if("object"!==n(t))throw new Error(i);if(!t.maxQuality&&!t.encodings&&void 0===t.allowAdaptiveLayers)throw new Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(t.maxQuality&&-1===["low","medium","high"].indexOf(t.maxQuality))throw new Error("maxQuality must be either low, medium or high");if(t.encodings){var o=!1;switch(Object.keys(t.encodings).length){case 1:o=!t.encodings.low;break;case 2:o=!t.encodings.low||!t.encodings.medium;break;case 3:o=!t.encodings.low||!t.encodings.medium||!t.encodings.high;break;default:o=!0}if(o)throw new Error("Encodings must be defined as: low, low and medium, or low, medium and high.");t.encodings.low&&this._validateEncodingLayerHasValidProperties(t.encodings.low),t.encodings.medium&&this._validateEncodingLayerHasValidProperties(t.encodings.medium),t.encodings.high&&this._validateEncodingLayerHasValidProperties(t.encodings.high)}}}},{key:"validateUpdateSendSettings",value:function(e){var t=this;if(!e||0===Object.keys(e).length)throw new Error("Send settings must contain at least information for one track!");Object.entries(e).forEach((function(e){var n=f(e,2),r=n[0],i=n[1];t._validateVideoSendSettings(r,i)}))}},{key:"updateSendSettings",value:function(e){var t=this;return this.validateUpdateSendSettings(e),this.needsLoad()?(this._preloadCache.sendSettings=e,{sendSettings:this._preloadCache.sendSettings}):new Promise((function(n,r){t.sendMessageToCallMachine({action:"update-send-settings",sendSettings:e},(function(e){e.error?r(e.error):n(e.sendSettings)}))}))}},{key:"getSendSettings",value:function(){return this._sendSettings||this._preloadCache.sendSettings}},{key:"getLocalAudioLevel",value:function(){return this._localAudioLevel}},{key:"getRemoteParticipantsAudioLevel",value:function(){return this._remoteParticipantsAudioLevel}},{key:"getActiveSpeaker",value:function(){return gc(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(e){return gc(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:e}),this}},{key:"activeSpeakerMode",value:function(){return gc(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(e){return lc(this._callState,"setSubscribeToTracksAutomatically()","Use the subscribeToTracksAutomatically configuration property."),this._preloadCache.subscribeToTracksAutomatically=e,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:e}),this}},{key:"enumerateDevices",value:(m=h((function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return"Firefox"===js()&&Is().major>115&&Is().major<123&&(t=t.filter((function(e){return"audiooutput"!==e.kind}))),{devices:t.map((function(e){var t=JSON.parse(JSON.stringify(e));if(!ys()&&"videoinput"===e.kind&&e.getCapabilities){var n,r=e.getCapabilities();t.facing=(null==r||null===(n=r.facingMode)||void 0===n?void 0:n.length)>=1?r.facingMode[0]:void 0}return t}))}}return new Promise((function(t){e.sendMessageToCallMachine({action:"enumerate-devices"},(function(e){t({devices:e.devices})}))}))})),function(){return m.apply(this,arguments)})},{key:"sendAppMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*";if(lc(this._callState,"sendAppMessage()"),JSON.stringify(e).length>this._maxAppMessageSize)throw new Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:e,to:t}),this}},{key:"addFakeParticipant",value:function(e){return gc(),lc(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(qa({action:"add-fake-participant"},e)),this}},{key:"setShowNamesMode",value:function(e){return vc(this._callObjectMode,"setShowNamesMode()"),gc(),e&&"always"!==e&&"never"!==e?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:e}),this)}},{key:"setShowLocalVideo",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return vc(this._callObjectMode,"setShowLocalVideo()"),gc(),lc(this._callState,"setShowLocalVideo()"),"boolean"!=typeof e?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:e}),this._showLocalVideo=e,this)}},{key:"showLocalVideo",value:function(){return vc(this._callObjectMode,"showLocalVideo()"),gc(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return vc(this._callObjectMode,"setShowParticipantsBar()"),gc(),lc(this._callState,"setShowParticipantsBar()"),"boolean"!=typeof e?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:e}),this._showParticipantsBar=e,this)}},{key:"showParticipantsBar",value:function(){return vc(this._callObjectMode,"showParticipantsBar()"),gc(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return gc(),vc(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(e){return gc(),vc(this._callObjectMode,"setCustomIntegrations()"),lc(this._callState,"setCustomIntegrations()"),Pc(e)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:e}),this._customIntegrations=e,this):this}},{key:"startCustomIntegrations",value:function(e){var t=this;if(gc(),vc(this._callObjectMode,"startCustomIntegrations()"),lc(this._callState,"startCustomIntegrations()"),Array.isArray(e)&&e.some((function(e){return"string"!=typeof e}))||!Array.isArray(e)&&"string"!=typeof e)return console.error("startCustomIntegrations() only accepts string | string[]"),this;var n="string"==typeof e?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error("Can't find custom integration(s): \"".concat(r.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:n}),this)}},{key:"stopCustomIntegrations",value:function(e){var t=this;if(gc(),vc(this._callObjectMode,"stopCustomIntegrations()"),lc(this._callState,"stopCustomIntegrations()"),Array.isArray(e)&&e.some((function(e){return"string"!=typeof e}))||!Array.isArray(e)&&"string"!=typeof e)return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var n="string"==typeof e?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error("Can't find custom integration(s): \"".concat(r.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:n}),this)}},{key:"customTrayButtons",value:function(){return vc(this._callObjectMode,"customTrayButtons()"),gc(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(e){return vc(this._callObjectMode,"updateCustomTrayButtons()"),gc(),lc(this._callState,"updateCustomTrayButtons()"),Oc(e)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:e}),this._customTrayButtons=e,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(rc))),this)}},{key:"theme",value:function(){return vc(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(e){var t=this;return vc(this._callObjectMode,"setTheme()"),new Promise((function(n,r){try{t.validateProperties({theme:e}),t.properties.theme=qa({},e),t.sendMessageToCallMachine({action:"set-theme",theme:t.properties.theme});try{t.emitDailyJSEvent({action:eo,theme:t.properties.theme})}catch(e){console.log("could not emit 'theme-updated'",e)}n(t.properties.theme)}catch(e){r(e)}}))}},{key:"requestFullscreen",value:(g=h((function*(){if(gc(),this._iframe&&!document.fullscreenElement&&ws())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(e){console.log("could not make video call fullscreen",e)}})),function(){return g.apply(this,arguments)})},{key:"exitFullscreen",value:function(){gc(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(v=h((function*(){var e=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise((function(t){e.sendMessageToCallMachine({action:"get-sidebar-view"},(function(e){t(e.view)}))}))})),function(){return v.apply(this,arguments)})},{key:"setSidebarView",value:function(e){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:e}),this)}},{key:"room",value:(p=h((function*(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).includeRoomConfigDefaults,n=void 0===t||t;return this._accessState.access===Oi||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise((function(t){e.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:n},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return p.apply(this,arguments)})},{key:"geo",value:(d=h((function*(){try{var e=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield e.json()).geo}}catch(e){return console.error("geo lookup failed",e),{current:""}}})),function(){return d.apply(this,arguments)})},{key:"setNetworkTopology",value:(c=h((function*(e){var t=this;return gc(),lc(this._callState,"setNetworkTopology()"),new Promise((function(n,r){t.sendMessageToCallMachine({action:"set-network-topology",opts:e},(function(e){e.error?r({error:e.error}):n({workerId:e.workerId})}))}))})),function(e){return c.apply(this,arguments)})},{key:"getNetworkTopology",value:(i=h((function*(){var e=this;return new Promise((function(t,n){e.needsLoad()&&t({topology:"none"}),e.sendMessageToCallMachine({action:"get-network-topology"},(function(e){e.error?n({error:e.error}):t({topology:e.topology})}))}))})),function(){return i.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(e){if(gc(),"number"!=typeof e&&!0!==e&&!1!==e)throw new Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(e));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:e})}},{key:"on",value:function(e,t){return x.prototype.on.call(this,e,t)}},{key:"once",value:function(e,t){return x.prototype.once.call(this,e,t)}},{key:"off",value:function(e,t){return x.prototype.off.call(this,e,t)}},{key:"validateProperties",value:function(e){var t,n;if(null!=e&&null!==(t=e.dailyConfig)&&void 0!==t&&t.userMediaAudioConstraints){var r,i;ys()||console.warn("userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.");var o=e.inputSettings||{};o.audio=(null===(r=e.inputSettings)||void 0===r?void 0:r.audio)||{},o.audio.settings=(null===(i=e.inputSettings)||void 0===i||null===(i=i.audio)||void 0===i?void 0:i.settings)||{},o.audio.settings=qa(qa({},o.audio.settings),e.dailyConfig.userMediaAudioConstraints),e.inputSettings=o,delete e.dailyConfig.userMediaAudioConstraints}if(null!=e&&null!==(n=e.dailyConfig)&&void 0!==n&&n.userMediaVideoConstraints){var s,a;ys()||console.warn("userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.");var c=e.inputSettings||{};c.video=(null===(s=e.inputSettings)||void 0===s?void 0:s.video)||{},c.video.settings=(null===(a=e.inputSettings)||void 0===a||null===(a=a.video)||void 0===a?void 0:a.settings)||{},c.video.settings=qa(qa({},c.video.settings),e.dailyConfig.userMediaVideoConstraints),e.inputSettings=c,delete e.dailyConfig.userMediaVideoConstraints}for(var l in e){if(!oc[l])throw new Error("unrecognized property '".concat(l,"'"));if(oc[l].validate&&!oc[l].validate(e[l],this))throw new Error("property '".concat(l,"': ").concat(oc[l].help))}}},{key:"assembleMeetingUrl",value:function(){var e,t,n=qa(qa({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:null!==(e=this.properties.dailyConfig)&&void 0!==e&&e.proxyUrl?encodeURIComponent(null===(t=this.properties.dailyConfig)||void 0===t?void 0:t.proxyUrl):void 0}),r=n.url.match(/\?/)?"&":"?";return n.url+r+Object.keys(oc).filter((function(e){return oc[e].queryString&&void 0!==n[e]})).map((function(e){return"".concat(oc[e].queryString,"=").concat(n[e])})).join("&")}},{key:"needsLoad",value:function(){return[vi,gi,_i,wi].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(e,t){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(e,t,this.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(e){this._messageChannel.forwardPackagedMessageToCallMachine(e,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(e){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(e,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(e){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(e)}},{key:"handleMessageFromCallMachine",value:function(t){switch(t.action){case Xi:this.sendMessageToCallMachine(qa({action:Zi},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var n={action:cs,level:"log",code:1011,stats:{event:"bundle load",time:"no-op"===this._bundleLoadTime?0:this._bundleLoadTime,preLoaded:"no-op"===this._bundleLoadTime,url:Z(this.properties.dailyConfig)}};this.sendMessageToCallMachine(n),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case ro:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(t);break;case ao:var r,i=qa({},t);delete i.internal,this._maxAppMessageSize=(null===(r=t.internal)||void 0===r?void 0:r._maxAppMessageSize)||rs,this._joinedCallback&&(this._joinedCallback(t.participants),this._joinedCallback=null),this.emitDailyJSEvent(i);break;case lo:case uo:if(this._callState===_i)return;if(t.participant&&t.participant.session_id){var o=t.participant.local?"local":t.participant.session_id;if(this._callObjectMode){var s=this._callMachine().store;pa(t.participant,s),fa(t.participant,s),ga(t.participant,this._participants[o],s)}try{this.maybeParticipantTracksStopped(this._participants[o],t.participant),this.maybeParticipantTracksStarted(this._participants[o],t.participant),this.maybeEventRecordingStopped(this._participants[o],t.participant),this.maybeEventRecordingStarted(this._participants[o],t.participant)}catch(e){console.error("track events error",e)}this.compareEqualForParticipantUpdateEvent(t.participant,this._participants[o])||(this._participants[o]=qa({},t.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(t))}break;case ho:if(t.participant&&t.participant.session_id){var a=this._participants[t.participant.session_id];a&&this.maybeParticipantTracksStopped(a,null),delete this._participants[t.participant.session_id],this.emitDailyJSEvent(t)}break;case po:N(this._participantCounts,t.participantCounts)||(this._participantCounts=t.participantCounts,this.emitDailyJSEvent(t));break;case fo:var c={access:t.access};t.awaitingAccess&&(c.awaitingAccess=t.awaitingAccess),N(this._accessState,c)||(this._accessState=c,this.emitDailyJSEvent(t));break;case vo:if(t.meetingSession){this._meetingSessionSummary=t.meetingSession,this.emitDailyJSEvent(t);var l=qa(qa({},t),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(l)}break;case ns:var u;this._iframe&&!t.preserveIframe&&(this._iframe.src=""),this._updateCallState(wi),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(t.errorMsg),this._loadedCallback=null),t.preserveIframe;var d=e(t,Ja);null!=d&&null!==(u=d.error)&&void 0!==u&&u.details&&(d.error.details=JSON.parse(d.error.details)),this._maybeSendToSentry(t),this._joinedCallback&&(this._joinedCallback(null,d),this._joinedCallback=null),this.emitDailyJSEvent(d);break;case co:this._callState!==wi&&this._updateCallState(_i),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(t);break;case"selected-devices-updated":t.devices&&this.emitDailyJSEvent(t);break;case Jo:var h=t.state,p=t.threshold,f=t.quality,v=h.state,g=h.reasons;v===this._network.networkState&&N(g,this._network.networkStateReasons)&&p===this._network.threshold&&f===this._network.quality||(this._network.networkState=v,this._network.networkStateReasons=g,this._network.quality=f,this._network.threshold=p,t.networkState=v,g.length&&(t.networkStateReasons=g),delete t.state,this.emitDailyJSEvent(t));break;case qo:t&&t.cpuLoadState&&this.emitDailyJSEvent(t);break;case zo:t&&void 0!==t.faceCounts&&this.emitDailyJSEvent(t);break;case Uo:var m=t.activeSpeaker;this._activeSpeaker.peerId!==m.peerId&&(this._activeSpeaker.peerId=m.peerId,this.emitDailyJSEvent({action:t.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var y=t.show;this._showLocalVideo=y,this.emitDailyJSEvent({action:t.action,show:y});break;case Vo:var b=t.enabled;this._activeSpeakerMode!==b&&(this._activeSpeakerMode=b,this.emitDailyJSEvent({action:t.action,enabled:this._activeSpeakerMode}));break;case yo:case bo:case _o:this._waitingParticipants=t.allWaitingParticipants,this.emitDailyJSEvent({action:t.action,participant:t.participant});break;case Zo:N(this._receiveSettings,t.receiveSettings)||(this._receiveSettings=t.receiveSettings,this.emitDailyJSEvent({action:t.action,receiveSettings:t.receiveSettings}));break;case es:this._maybeUpdateInputSettings(t.inputSettings);break;case"send-settings-updated":N(this._sendSettings,t.sendSettings)||(this._sendSettings=t.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:t.action,sendSettings:t.sendSettings}));break;case"local-audio-level":this._localAudioLevel=t.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(t);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=t.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(t);break;case Lo:var _=t.session_id;this._rmpPlayerState[_]=t.playerState,this.emitDailyJSEvent(t);break;case No:delete this._rmpPlayerState[t.session_id],this.emitDailyJSEvent(t);break;case Do:var w=t.session_id,S=this._rmpPlayerState[w];S&&this.compareEqualForRMPUpdateEvent(S,t.remoteMediaPlayerState)||(this._rmpPlayerState[w]=t.remoteMediaPlayerState,this.emitDailyJSEvent(t));break;case"custom-button-click":case"sidebar-view-changed":this.emitDailyJSEvent(t);break;case go:var k=this._meetingSessionState.topology!==(t.meetingSessionState&&t.meetingSessionState.topology);this._meetingSessionState=Lc(t.meetingSessionState,this._callObjectMode),(this._callObjectMode||k)&&this.emitDailyJSEvent(t);break;case Ro:this._isScreenSharing=!0,this.emitDailyJSEvent(t);break;case Fo:case Bo:this._isScreenSharing=!1,this.emitDailyJSEvent(t);break;case Eo:case To:case Oo:case Po:case Ao:case ko:case Mo:case Co:case io:case oo:case Io:case xo:case"test-completed":case $o:case jo:case Go:case Qo:case Ko:case Yo:case ts:case Xo:case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dialout-answered":case"dialout-error":case"dialout-stopped":case"dialout-warning":this.emitDailyJSEvent(t);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(e,t){var n="record";e&&(t.local||!1!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:To}))}},{key:"maybeEventRecordingStarted",value:function(e,t){var n="record";e&&(t.local||!0!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:Eo}))}},{key:"_trackStatePlayable",value:function(e){return!(!e||e.state!==Ti)}},{key:"_trackChanged",value:function(e,t){return!((null==e?void 0:e.id)===(null==t?void 0:t.id))}},{key:"maybeEventTrackStopped",value:function(e,t,n){var r,i,o=null!==(r=null==t?void 0:t.tracks[e])&&void 0!==r?r:null,s=null!==(i=null==n?void 0:n.tracks[e])&&void 0!==i?i:null,a=null==o?void 0:o.track;if(a){var c=this._trackStatePlayable(o),l=this._trackStatePlayable(s),u=this._trackChanged(a,null==s?void 0:s.track);c&&(l&&!u||this.emitDailyJSEvent({action:So,track:a,participant:null!=n?n:t,type:e}))}}},{key:"maybeEventTrackStarted",value:function(e,t,n){var r,i,o=null!==(r=null==t?void 0:t.tracks[e])&&void 0!==r?r:null,s=null!==(i=null==n?void 0:n.tracks[e])&&void 0!==i?i:null,a=null==s?void 0:s.track;if(a){var c=this._trackStatePlayable(o),l=this._trackStatePlayable(s),u=this._trackChanged(null==o?void 0:o.track,a);l&&(c&&!u||this.emitDailyJSEvent({action:wo,track:a,participant:n,type:e}))}}},{key:"maybeParticipantTracksStopped",value:function(e,t){if(e)for(var n in e.tracks)this.maybeEventTrackStopped(n,e,t)}},{key:"maybeParticipantTracksStarted",value:function(e,t){if(t)for(var n in t.tracks)this.maybeEventTrackStarted(n,e,t)}},{key:"compareEqualForRMPUpdateEvent",value:function(e,t){var n,r;return e.state===t.state&&(null===(n=e.settings)||void 0===n?void 0:n.volume)===(null===(r=t.settings)||void 0===r?void 0:r.volume)}},{key:"emitDailyJSEvent",value:function(e){try{e.callClientId=this.callClientId,this.emit(e.action,e)}catch(t){console.log("could not emit",e,t)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(e,t){return!!N(e,t)&&((!e.videoTrack||!t.videoTrack||e.videoTrack.id===t.videoTrack.id&&e.videoTrack.muted===t.videoTrack.muted&&e.videoTrack.enabled===t.videoTrack.enabled)&&(!e.audioTrack||!t.audioTrack||e.audioTrack.id===t.audioTrack.id&&e.audioTrack.muted===t.audioTrack.muted&&e.audioTrack.enabled===t.audioTrack.enabled))}},{key:"nativeUtils",value:function(){return ys()?"undefined"==typeof DailyNativeUtils?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(e){this._updateCallState(this._callState,e)}},{key:"_updateCallState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._isPreparingToJoin;if(e!==this._callState||t!==this._isPreparingToJoin){var n=this._callState,r=this._isPreparingToJoin;this._callState=e,this._isPreparingToJoin=t;var i=this._callState===bi;this.updateShowAndroidOngoingMeetingNotification(i);var o=uc(n,r),s=uc(this._callState,this._isPreparingToJoin);o!==s&&(this.updateKeepDeviceAwake(s),this.updateDeviceAudioMode(s),this.updateNoOpRecordingEnsuringBackgroundContinuity(s))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=Xa,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:Oi},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Lc(Ya,this._callObjectMode),this._isScreenSharing=!1,this._receiveSettings={},this._inputSettings=void 0,this._sendSettings={},this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this._maxAppMessageSize=rs,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(e){ys()&&this.nativeUtils().setKeepDeviceAwake(e,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(e){if(ys()&&!this.disableReactNativeAutoDeviceManagement("audio")){var t=e?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(t)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(e){if(ys()&&this.nativeUtils().setShowOngoingMeetingNotification){var t,n,r,i;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var o=this.properties.reactNativeConfig.androidInCallNotification;t=o.title,n=o.subtitle,r=o.iconName,i=o.disableForCustomOverride}i&&(e=!1),this.nativeUtils().setShowOngoingMeetingNotification(e,t,n,r,this.callClientId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(e){ys()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var e;if(ys()){var t=null===(e=this._callMachine())||void 0===e||null===(e=e.store)||void 0===e?void 0:e.getState();for(var n in null==t?void 0:t.streams){var r=t.streams[n];r&&r.pendingTrack&&"audio"===r.pendingTrack.kind&&(r.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(e){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[e]}},{key:"absoluteUrl",value:function(e){if(void 0!==e){var t=document.createElement("a");return t.href=e,t.href}}},{key:"sayHello",value:function(){var e="hello, world.";return console.log(e),e}},{key:"_logUseAfterDestroy",value:function(){var e=Object.values(Ga)[0];if(this.needsLoad()){if(e&&!e.needsLoad()){var t={action:cs,level:"error",code:this.strictMode?9995:9997};e.sendMessageToCallMachine(t)}else if(!this.strictMode){console.error("You are are attempting to use a call instance that was previously destroyed, which is unsupported. Please remove `strictMode: false` from your constructor properties to enable strict mode to track down and fix this unsupported usage.")}}else{var n={action:cs,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(n,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var e=0,t=Object.values(Ga);e<t.length;e++){var n=t[e];n._callMachineInitialized?(n.sendMessageToCallMachine({action:cs,level:"warn",code:this.allowMultipleCallInstances?9993:9992}),n._delayDuplicateInstanceLog=!1):n._delayDuplicateInstanceLog=!0}}},{key:"_maybeSendToSentry",value:function(e){var t,n,i,o;if(null!==(t=e.error)&&void 0!==t&&t.type){if(![$i,Vi,Bi].includes(e.error.type))return;if(e.error.type===Bi&&e.error.msg.includes("deleted"))return}var s=null!==(n=this.properties)&&void 0!==n&&n.url?new URL(this.properties.url):void 0,a="production";s&&s.host.includes(".staging.daily")&&(a="staging");var c,l,u,d,h,p=function(e){const t=[Gn(),Wn(),ii(),ni(),ui(),fi(),rr(),pi()];return!1!==e.autoSessionTracking&&t.push(li()),t}({}).filter((function(e){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(e.name)})),f=new jr({dsn:"https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844",transport:Wr,stackParser:Zr,integrations:p,environment:a}),v=new Mt;if(v.setClient(f),f.init(),this.session_id&&v.setExtra("sessionId",this.session_id),this.properties){var g=qa({},this.properties);g.userName=g.userName?"[Filtered]":void 0,g.userData=g.userData?"[Filtered]":void 0,g.token=g.token?"[Filtered]":void 0,v.setExtra("properties",g)}if(s){var m=s.searchParams.get("domain");if(!m){var y=s.host.match(/(.*?)\./);m=y&&y[1]||""}m&&v.setTag("domain",m)}e.error&&(v.setTag("fatalErrorType",e.error.type),v.setExtra("errorDetails",e.error.details),(null===(c=e.error.details)||void 0===c?void 0:c.uri)&&v.setTag("serverAddress",e.error.details.uri),(null===(l=e.error.details)||void 0===l?void 0:l.workerGroup)&&v.setTag("workerGroup",e.error.details.workerGroup),(null===(u=e.error.details)||void 0===u?void 0:u.geoGroup)&&v.setTag("geoGroup",e.error.details.geoGroup),(null===(d=e.error.details)||void 0===d?void 0:d.on)&&v.setTag("connectionAttempt",e.error.details.on),null!==(h=e.error.details)&&void 0!==h&&h.bundleUrl&&(v.setTag("bundleUrl",e.error.details.bundleUrl),v.setTag("bundleError",e.error.details.sourceError.type)));v.setTags({callMode:this._callObjectMode?ys()?"reactNative":null!==(i=this.properties)&&void 0!==i&&null!==(i=i.dailyConfig)&&void 0!==i&&null!==(i=i.callMode)&&void 0!==i&&i.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:r.version()});var b=(null===(o=e.error)||void 0===o?void 0:o.msg)||e.errorMsg;v.captureException(new Error(b))}},{key:"_callMachine",value:function(){var e;return null===(e=window._daily)||void 0===e||null===(e=e.instances)||void 0===e||null===(e=e[this.callClientId])||void 0===e?void 0:e.callMachine}},{key:"_maybeUpdateInputSettings",value:function(e){if(!N(this._inputSettings,e)){var t=this._getInputSettings();this._inputSettings=e;var n=this._getInputSettings();N(t,n)||this.emitDailyJSEvent({action:es,inputSettings:n})}}}],[{key:"supportedBrowser",value:function(){if(ys())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var e=Q.getParser(ms());return{supported:!!Os(),mobile:"mobile"===e.getPlatformType(),name:e.getBrowserName(),version:e.getBrowserVersion(),supportsFullscreen:!!ws(),supportsScreenShare:!!_s(),supportsSfu:!!Os(),supportsVideoProcessing:Es(),supportsAudioProcessing:Ts()}}},{key:"version",value:function(){return"0.78.0"}},{key:"createCallObject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.layout="none",new r(null,e)}},{key:"wrap",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(gc(),!e||!e.contentWindow||"string"!=typeof e.src)throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return t.layout||(t.customLayout?t.layout="custom-v1":t.layout="browser"),new r(e,t)}},{key:"createFrame",value:function(e,t){var n,i;gc(),e&&t?(n=e,i=t):e&&e.append?(n=e,i={}):(n=document.body,i=e||{});var o=i.iframeStyle;o||(o=n===document.body?{position:"fixed",border:"1px solid black",backgroundColor:"white",width:"375px",height:"450px",right:"1em",bottom:"1em"}:{border:0,width:"100%",height:"100%"});var s=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?s.allow="microphone, camera":s.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",s.style.visibility="hidden",n.appendChild(s),s.style.visibility=null,Object.keys(o).forEach((function(e){return s.style[e]=o[e]})),i.layout||(i.customLayout?i.layout="custom-v1":i.layout="browser");try{return new r(s,i)}catch(e){throw n.removeChild(s),e}}},{key:"createTransparentFrame",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};gc();var t=document.createElement("iframe");return t.allow="microphone; camera; autoplay",t.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 0;\n pointer-events: none;\n ",document.body.appendChild(t),e.layout||(e.layout="custom-v1"),r.wrap(t,e)}},{key:"getCallInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return e?Ga[e]:Object.values(Ga)[0]}}]);var i,c,d,p,v,g,m,y,b,_,w,S,k,M,C,E,T,O,P,A,j,I,L,D,R,F,B,U,V,J,$,q,z,W,H,G,Y,ee}();function cc(e,t){var n={};for(var r in e)if(e[r]instanceof MediaStreamTrack)console.warn("MediaStreamTrack found in props or cache.",r),n[r]=ls;else if("dailyConfig"===r){if(e[r].modifyLocalSdpHook){var i=window._daily.instances[t].customCallbacks||{};i.modifyLocalSdpHook=e[r].modifyLocalSdpHook,window._daily.instances[t].customCallbacks=i,delete e[r].modifyLocalSdpHook}if(e[r].modifyRemoteSdpHook){var o=window._daily.instances[t].customCallbacks||{};o.modifyRemoteSdpHook=e[r].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=o,delete e[r].modifyRemoteSdpHook}n[r]=e[r]}else n[r]=e[r];return n}function lc(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==bi){var n="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," only supported after join.");throw t&&(n+=" ".concat(t)),console.error(n),new Error(n)}}function uc(e,t){return[yi,bi].includes(e)||t}function dc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"This daily-js method",r=arguments.length>3?arguments[3]:void 0;if(uc(e,t)){var i="".concat(n," not supported after joining a meeting.");throw r&&(i+=" ".concat(r)),console.error(i),new Error(i)}}function hc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method",n=arguments.length>2?arguments[2]:void 0;if(!e){var r="".concat(t,arguments.length>3&&void 0!==arguments[3]&&arguments[3]?" requires preAuth() or startCamera() to initialize call state.":" requires preAuth(), startCamera(), or join() to initialize call state.");throw n&&(r+=" ".concat(n)),console.error(r),new Error(r)}}function pc(e){if(e){var t="A pre-call quality test is in progress. Please try ".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," again once testing has completed. Use stopTestCallQuality() to end it early.");throw console.error(t),new Error(t)}}function fc(e){if(!e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(t),new Error(t)}}function vc(e){if(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," is only supported as part of Daily's Prebuilt");throw console.error(t),new Error(t)}}function gc(){if(ys())throw new Error("This daily-js method is not currently supported in React Native")}function mc(){if(!ys())throw new Error("This daily-js method is only supported in React Native")}function yc(e){if(void 0===e)return!0;var t;if("string"==typeof e)t=e;else try{t=JSON.stringify(e),N(JSON.parse(t),e)||console.warn("The userData provided will be modified when serialized.")}catch(e){throw Error("userData must be serializable to JSON: ".concat(e))}if(t.length>4096)throw Error("userData is too large (".concat(t.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function bc(e,t){for(var n=t.allowAllParticipantsKey,r=function(e){var t=["local"];return n||t.push("*"),e&&!t.includes(e)},i=function(e){return!!(void 0===e.layer||Number.isInteger(e.layer)&&e.layer>=0||"inherit"===e.layer)},o=function(e){return!!e&&(!(e.video&&!i(e.video))&&!(e.screenVideo&&!i(e.screenVideo)))},s=0,a=Object.entries(e);s<a.length;s++){var c=f(a[s],2),l=c[0],u=c[1];if(!r(l)||!o(u))return!1}return!0}function _c(e){if("object"!==n(e))return!1;for(var t=0,r=Object.entries(e);t<r.length;t++){var i=f(r[t],2),o=i[0],s=i[1];switch(o){case"video":if("object"!==n(s))return!1;for(var a=0,c=Object.entries(s);a<c.length;a++){var l=f(c[a],2),u=l[0],d=l[1];switch(u){case"processor":if(!kc(d))return!1;break;case"settings":if(!Mc(d))return!1;break;default:return!1}}break;case"audio":if("object"!==n(s))return!1;for(var h=0,p=Object.entries(s);h<p.length;h++){var v=f(p[h],2),g=v[0],m=v[1];switch(g){case"processor":if(!Sc(m))return!1;break;case"settings":if(!Mc(m))return!1;break;default:return!1}}break;default:return!1}}return!0}function wc(e,t,n){var r,i=[];e.video&&e.video.processor&&(Es(null!==(r=null==t?void 0:t.useLegacyVideoProcessor)&&void 0!==r&&r)||(e.video.settings?delete e.video.processor:delete e.video,i.push("video")));e.audio&&e.audio.processor&&(Ts()||(e.audio.settings?delete e.audio.processor:delete e.audio,i.push("audio"))),i.length>0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(i.join(", "))),e.audio&&e.audio.settings&&(e.audio.settings.customTrack?(n.audioTrack=e.audio.settings.customTrack,e.audio.settings={customTrack:ls}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:ls}):delete n.videoTrack)}function Sc(e){if(ys())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type"];return!!e&&("object"===n(e)&&(Object.keys(e).filter((function(e){return!t.includes(e)})).forEach((function(t){console.warn("invalid key inputSettings -> audio -> processor : ".concat(t)),delete e[t]})),!!function(e){if("string"!=typeof e)return!1;if(!Object.values(ds).includes(e))return console.error("inputSettings audio processor type invalid"),!1;return!0}(e.type)))}function kc(e){if(ys())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type","config"];if(!e)return!1;if("object"!==n(e))return!1;if(!function(e){if("string"!=typeof e)return!1;if(!Object.values(us).includes(e))return console.error("inputSettings video processor type invalid"),!1;return!0}(e.type))return!1;if(e.config){if("object"!==n(e.config))return!1;if(!function(e,t){var n=Object.keys(t);if(0===n.length)return!0;var r="invalid object in inputSettings -> video -> processor -> config";switch(e){case us.BGBLUR:return n.length>1||"strength"!==n[0]?(console.error(r),!1):!("number"!=typeof t.strength||t.strength<=0||t.strength>1||isNaN(t.strength))||(console.error("".concat(r,"; expected: {0 < strength <= 1}, got: ").concat(t.strength)),!1);case us.BGIMAGE:return!(void 0!==t.source&&!function(e){if("default"===e.source)return e.type="default",!0;if(e.source instanceof ArrayBuffer)return!0;if(ee(e.source))return e.type="url",!!function(e){var t=new URL(e),n=t.pathname;if("data:"===t.protocol)try{var r=n.substring(n.indexOf(":")+1,n.indexOf(";")).split("/")[1];return ps.includes(r)}catch(e){return console.error("failed to deduce blob content type",e),!1}var i=n.split(".").at(-1).toLowerCase().trim();return ps.includes(i)}(e.source)||(console.error("invalid image type; supported types: [".concat(ps.join(", "),"]")),!1);return t=e.source,n=Number(t),isNaN(n)||!Number.isInteger(n)||n<=0||n>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(e.type="daily-preselect",!0);var t,n}(t));default:return!0}}(e.type,e.config))return!1}return Object.keys(e).filter((function(e){return!t.includes(e)})).forEach((function(t){console.warn("invalid key inputSettings -> video -> processor : ".concat(t)),delete e[t]})),!0}function Mc(e){return"object"===n(e)&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function Cc(){var e=Object.values(us).join(" | "),t=Object.values(ds).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(e," ], config?: {} } }, audio?: { processor: {type: [ ").concat(t," ] } } }")}function Ec(e){var t=e.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(Ii).concat(t?' | "'.concat("*",'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function Tc(){return"customIntegrations should be an object of type ".concat(JSON.stringify(ic),".")}function Oc(e){if(e&&"object"!==n(e)||Array.isArray(e))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(rc),".")),!1;if(e)for(var t=0,r=Object.entries(e);t<r.length;t++)for(var i=f(r[t],1)[0],o=0,s=Object.entries(e[i]);o<s.length;o++){var a=f(s[o],2),c=a[0],l=a[1],u=rc.id[c];if(!u)return console.error("customTrayButton does not support key ".concat(c)),!1;switch(c){case"iconPath":case"iconPathDarkMode":if(!ee(l))return console.error("customTrayButton ".concat(c," should be a url.")),!1;break;case"visualState":if(!["default","sidebar-open","active"].includes(l))return console.error("customTrayButton ".concat(c," should be ").concat(u,". Got: ").concat(l)),!1;break;default:if(n(l)!==u)return console.error("customTrayButton ".concat(c," should be a ").concat(u,".")),!1}}return!0}function Pc(e){if(!e||e&&"object"!==n(e)||Array.isArray(e))return console.error(Tc()),!1;for(var t=function(e){return"".concat(e," should be ").concat(ic.id[e])},r=function(e,t){return console.error("customIntegration ".concat(e,": ").concat(t))},i=0,o=Object.entries(e);i<o.length;i++){var s=f(o[i],1)[0];if(!("label"in e[s]))return r(s,"label is required"),!1;if(!("location"in e[s]))return r(s,"location is required"),!1;if(!("src"in e[s])&&!("srcdoc"in e[s]))return r(s,"src or srcdoc is required"),!1;for(var a=0,c=Object.entries(e[s]);a<c.length;a++){var l=f(c[a],2),u=l[0],d=l[1];switch(u){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if("string"!=typeof d)return r(s,t(u)),!1;break;case"iconURL":if(!ee(d))return r(s,"".concat(u," should be a url")),!1;break;case"src":if("srcdoc"in e[s])return r(s,"cannot have both src and srcdoc"),!1;if(!ee(d))return r(s,'src "'.concat(d,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in e[s])return r(s,"cannot have both src and srcdoc"),!1;if("string"!=typeof d)return r(s,t(u)),!1;break;case"location":if(!["main","sidebar"].includes(d))return r(s,t(u)),!1;break;case"controlledBy":if("*"!==d&&"owners"!==d&&(!Array.isArray(d)||d.some((function(e){return"string"!=typeof e}))))return r(s,t(u)),!1;break;case"shared":if((!Array.isArray(d)||d.some((function(e){return"string"!=typeof e})))&&"owners"!==d&&"boolean"!=typeof d)return r(s,t(u)),!1;break;default:if(!ic.id[u])return console.error("customIntegration does not support key ".concat(u)),!1}}}return!0}function Ac(e,t){if(void 0===t)return!1;switch(n(t)){case"string":return n(e)===t;case"object":if("object"!==n(e))return!1;for(var r in e)if(!Ac(e[r],t[r]))return!1;return!0;default:return!1}}function jc(e,t){var n=e.sessionId,r=e.toEndPoint,i=e.callerId,o=e.useSipRefer;if(!n||!r)throw new Error("".concat(t,"() requires a sessionId and toEndPoint"));if("string"!=typeof n||"string"!=typeof r)throw new Error("Invalid paramater: sessionId and toEndPoint must be of type string");if(o&&!r.startsWith("sip:"))throw new Error('"toEndPoint" must be a "sip" address');if(!r.startsWith("sip:")&&!r.startsWith("+"))throw new Error("toEndPoint: ".concat(r,' must starts with either "sip:" or "+"'));if(i&&"string"!=typeof i)throw new Error("callerId must be of type string");if(i&&!r.startsWith("+"))throw new Error("callerId is only valid when transferring to a PSTN number")}function Ic(e){if("object"!==n(e))throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(e.state&&!Object.values(hs).includes(e.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(hs));if(e.volume){if("number"!=typeof e.volume)throw new Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(e.volume<0||e.volume>2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function xc(e,t,n){return!("number"!=typeof e||e<t||e>n)}function Lc(e,t){return e&&!t&&delete e.data,e}export{Pi as DAILY_ACCESS_LEVEL_FULL,Ai as DAILY_ACCESS_LEVEL_LOBBY,ji as DAILY_ACCESS_LEVEL_NONE,Oi as DAILY_ACCESS_UNKNOWN,Wi as DAILY_CAMERA_ERROR_CAM_AND_MIC_IN_USE,qi as DAILY_CAMERA_ERROR_CAM_IN_USE,Ki as DAILY_CAMERA_ERROR_CONSTRAINTS,zi as DAILY_CAMERA_ERROR_MIC_IN_USE,Qi as DAILY_CAMERA_ERROR_NOT_FOUND,Hi as DAILY_CAMERA_ERROR_PERMISSIONS,Gi as DAILY_CAMERA_ERROR_UNDEF_MEDIADEVICES,Yi as DAILY_CAMERA_ERROR_UNKNOWN,fo as DAILY_EVENT_ACCESS_STATE_UPDATED,Uo as DAILY_EVENT_ACTIVE_SPEAKER_CHANGE,Vo as DAILY_EVENT_ACTIVE_SPEAKER_MODE_CHANGE,Io as DAILY_EVENT_APP_MSG,oo as DAILY_EVENT_CAMERA_ERROR,qo as DAILY_EVENT_CPU_LOAD_CHANGE,ns as DAILY_EVENT_ERROR,Ho as DAILY_EVENT_EXIT_FULLSCREEN,zo as DAILY_EVENT_FACE_COUNTS_UPDATED,Wo as DAILY_EVENT_FULLSCREEN,Zi as DAILY_EVENT_IFRAME_LAUNCH_CONFIG,Xi as DAILY_EVENT_IFRAME_READY_FOR_LAUNCH_CONFIG,es as DAILY_EVENT_INPUT_SETTINGS_UPDATED,ao as DAILY_EVENT_JOINED_MEETING,so as DAILY_EVENT_JOINING_MEETING,Xo as DAILY_EVENT_LANG_UPDATED,co as DAILY_EVENT_LEFT_MEETING,Yo as DAILY_EVENT_LIVE_STREAMING_ERROR,Go as DAILY_EVENT_LIVE_STREAMING_STARTED,Ko as DAILY_EVENT_LIVE_STREAMING_STOPPED,Qo as DAILY_EVENT_LIVE_STREAMING_UPDATED,ro as DAILY_EVENT_LOADED,to as DAILY_EVENT_LOADING,no as DAILY_EVENT_LOAD_ATTEMPT_FAILED,Bo as DAILY_EVENT_LOCAL_SCREEN_SHARE_CANCELED,Ro as DAILY_EVENT_LOCAL_SCREEN_SHARE_STARTED,Fo as DAILY_EVENT_LOCAL_SCREEN_SHARE_STOPPED,mo as DAILY_EVENT_MEETING_SESSION_DATA_ERROR,go as DAILY_EVENT_MEETING_SESSION_STATE_UPDATED,vo as DAILY_EVENT_MEETING_SESSION_SUMMARY_UPDATED,$o as DAILY_EVENT_NETWORK_CONNECTION,Jo as DAILY_EVENT_NETWORK_QUALITY_CHANGE,ts as DAILY_EVENT_NONFATAL_ERROR,po as DAILY_EVENT_PARTICIPANT_COUNTS_UPDATED,lo as DAILY_EVENT_PARTICIPANT_JOINED,ho as DAILY_EVENT_PARTICIPANT_LEFT,uo as DAILY_EVENT_PARTICIPANT_UPDATED,Zo as DAILY_EVENT_RECEIVE_SETTINGS_UPDATED,jo as DAILY_EVENT_RECORDING_DATA,Po as DAILY_EVENT_RECORDING_ERROR,Eo as DAILY_EVENT_RECORDING_STARTED,Oo as DAILY_EVENT_RECORDING_STATS,To as DAILY_EVENT_RECORDING_STOPPED,Ao as DAILY_EVENT_RECORDING_UPLOAD_COMPLETED,Lo as DAILY_EVENT_REMOTE_MEDIA_PLAYER_STARTED,No as DAILY_EVENT_REMOTE_MEDIA_PLAYER_STOPPED,Do as DAILY_EVENT_REMOTE_MEDIA_PLAYER_UPDATED,io as DAILY_EVENT_STARTED_CAMERA,eo as DAILY_EVENT_THEME_UPDATED,wo as DAILY_EVENT_TRACK_STARTED,So as DAILY_EVENT_TRACK_STOPPED,Co as DAILY_EVENT_TRANSCRIPTION_ERROR,xo as DAILY_EVENT_TRANSCRIPTION_MSG,ko as DAILY_EVENT_TRANSCRIPTION_STARTED,Mo as DAILY_EVENT_TRANSCRIPTION_STOPPED,yo as DAILY_EVENT_WAITING_PARTICIPANT_ADDED,_o as DAILY_EVENT_WAITING_PARTICIPANT_REMOVED,bo as DAILY_EVENT_WAITING_PARTICIPANT_UPDATED,$i as DAILY_FATAL_ERROR_CONNECTION,Li as DAILY_FATAL_ERROR_EJECTED,Vi as DAILY_FATAL_ERROR_EOL,Ri as DAILY_FATAL_ERROR_EXP_ROOM,Fi as DAILY_FATAL_ERROR_EXP_TOKEN,Ui as DAILY_FATAL_ERROR_MEETING_FULL,Di as DAILY_FATAL_ERROR_NBF_ROOM,Ni as DAILY_FATAL_ERROR_NBF_TOKEN,Ji as DAILY_FATAL_ERROR_NOT_ALLOWED,Bi as DAILY_FATAL_ERROR_NO_ROOM,xi as DAILY_RECEIVE_SETTINGS_ALL_PARTICIPANTS_KEY,Ii as DAILY_RECEIVE_SETTINGS_BASE_KEY,wi as DAILY_STATE_ERROR,bi as DAILY_STATE_JOINED,yi as DAILY_STATE_JOINING,_i as DAILY_STATE_LEFT,vi as DAILY_STATE_NEW,Si as DAILY_TRACK_STATE_BLOCKED,Ei as DAILY_TRACK_STATE_INTERRUPTED,Ci as DAILY_TRACK_STATE_LOADING,ki as DAILY_TRACK_STATE_OFF,Ti as DAILY_TRACK_STATE_PLAYABLE,Mi as DAILY_TRACK_STATE_SENDABLE,ac as default};