PageSourceSearch

https://static.campuswire.com/js/daily.65ef3e8a.js

js campuswire.com collected 2026-10-01 14:05:14 UTC 318,459 bytes, 3 lines download raw bytes

vendor: 5,805 bytes, lines 1-2
1/*! For license information please see daily.65ef3e8a.js.LICENSE.txt */
2"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[9802],{24473(e,t,n){function r(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 i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){return o="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},o(e)}function a(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function c(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t){if(t&&("object"==o(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 u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function p(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&&d(e,t)}function f(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function v(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){h(o,r,i,a,s,"next",e)}function s(e){h(o,r,i,a,s,"throw",e)}a(void 0)})}}function g(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 m(e,t){if(e){if("string"==typeof e)return g(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)?g(e,t):void 0}}function y(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,a,s=[],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)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||m(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.")}()}n.d(t,{Ay:()=>ha});var b,_={exports:{}},w=function(){if(b)return _.exports;b=1;var e,t="object"==typeof Reflect?Reflect:null,n=t&&"function"==typeof t.apply?t.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}_.exports=i,_.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))}h(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&h(e,"error",t,{once:!0})}(e,i)})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,o,c,l;if(a(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),c=o[t]),void 0===c)c=o[t]=n,++e._eventsCount;else if("function"==typeof c?c=o[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),(i=s(e))>0&&c.length>i&&!c.warned){c.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=c.length,l=u,console&&console.warn&&console.warn(l)}return e}function l(){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 u(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n}
vendor: 50,879 bytes, line 2
2,i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(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):f(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 f(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h(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)})}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),i.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},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(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},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,u=f(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,u(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,u(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,i,o,s;if(a(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},i.prototype.off=i.prototype.removeListener,i.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},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},i.prototype.listenerCount=p,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},_.exports}(),k=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(w),S=Object.prototype.hasOwnProperty;function M(e,t,n){for(n of e.keys())if(C(n,t))return n}function C(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--&&C(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=M(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=M(t,i)))return!1;if(!C(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(S.call(e,n)&&++r&&!S.call(t,n))return!1;if(!(n in t)||!C(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}const E={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",Brave:"brave",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",DuckDuckGo:"duckduckgo",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Linespider:"linespider",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SlackBot:"slackbot",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},T={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",brave:"Brave",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",duckduckgo:"DuckDuckGo",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",linespider:"Linespider",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",slackbot:"SlackBot",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},O={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},P={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},A={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"};class I{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);t.push(0);const n=t[0],r=t[1];if(10===n)switch(r){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}switch(n){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";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=I.getVersionPrecision(e),i=I.getVersionPrecision(t);let o=Math.max(r,i),a=0;const s=I.map([e,t],e=>{const t=o-I.getVersionPrecision(e),n=e+new Array(t+1).join(".0");return I.map(n.split("."),e=>new Array(20-e.length).join("0")+e).reverse()});for(n&&(a=o-Math.min(r,i)),o-=1;o>=a;){if(s[0][o]>s[1][o])return 1;if(s[0][o]===s[1][o]){if(o===a)return 0;o-=1}else if(s[0][o]<s[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];"object"==typeof e&&null!==e&&Object.keys(e).forEach(t=>{n[t]=e[t]})}return e}static getBrowserAlias(e){return E[e]}static getBrowserTypeByAlias(e){return T[e]||""}}const j=/version\/(\d+(\.?_?\d+)+)/i,x=[{test:[/gptbot/i],describe(e){const t={name:"GPTBot"},n=I.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/chatgpt-user/i],describe(e){const t={name:"ChatGPT-User"},n=I.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/oai-searchbot/i],describe(e){const t={name:"OAI-SearchBot"},n=I.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe(e){const t={name:"ClaudeBot"},n=I.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/omgilibot/i,/webzio-extended/i],describe(e){const t={name:"Omgilibot"},n=I.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/diffbot/i],describe(e){const t={name:"Diffbot"},n=I.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/perplexitybot/i],describe(e){const t={name:"PerplexityBot"},n=I.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/perplexity-user/i],describe(e){const t={name:"Perplexity-User"},n=I.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/youbot/i],describe(e){const t={name:"YouBot"},n=I.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/meta-webindexer/i],describe(e){const t={name:"Meta-WebIndexer"},n=I.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/meta-externalads/i],describe(e){const t={name:"Meta-ExternalAds"},n=I.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/meta-externalagent/i],describe(e){const t={name:"Meta-ExternalAgent"},n=I.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/meta-externalfetcher/i],describe(e){const t={name:"Meta-ExternalFetcher"},n=I.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=I.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/linespider/i],describe(e){const t={name:"Linespider"},n=I.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/amazonbot/i],describe(e){const t={name:"AmazonBot"},n=I.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/bingbot/i],describe(e){const t={name:"BingCrawler"},n=I.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/baiduspider/i],describe(e){const t={name:"BaiduSpider"},n=I.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/duckduckbot/i],describe(e){const t={name:"DuckDuckBot"},n=I.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/ia_archiver/i],describe(e){const t={name:"InternetArchiveCrawler"},n=I.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:()=>({name:"FacebookExternalHit"})},{test:[/slackbot/i,/slack-imgProxy/i],describe(e){const t={name:"SlackBot"},n=I.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:()=>({name:"YahooSlurp"})},{test:[/yandexbot/i,/yandexmobilebot/i],describe:()=>({name:"YandexBot"})},{test:[/pingdom/i],describe:()=>({name:"PingdomBot"})},{test:[/opera/i],describe(e){const t={name:"Opera"},n=I.getFirstMatch(j,e)||I.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=I.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=I.getFirstMatch(j,e)||I.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=I.getFirstMatch(j,e)||I.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){const t={name:"Pale Moon"},n=I.getFirstMatch(j,e)||I.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=I.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=I.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=I.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=I.getFirstMatch(j,e)||I.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=I.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=I.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=I.getFirstMatch(j,e)||I.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=I.getFirstMatch(j,e)||I.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=I.getFirstMatch(j,e)||I.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=I.getFirstMatch(j,e)||I.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=I.getFirstMatch(j,e)||I.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=I.getFirstMatch(j,e)||I.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=I.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(j,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=I.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=I.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=I.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=I.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=I.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=I.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=I.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=I.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=I.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=I.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=I.getFirstMatch(j,e)||I.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=I.getFirstMatch(j,e)||I.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=I.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=I.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=I.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/librewolf/i],describe(e){const t={name:"LibreWolf"},n=I.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=I.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=I.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe(e){const t={name:"Sogou Browser"},n=I.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),r=I.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),i=I.getFirstMatch(/se ([\d.]+)x/i,e),o=n||r||i;return o&&(t.version=o),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=I.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>!!e.hasBrand("DuckDuckGo")||e.test(/\sDdg\/[\d.]+$/i),describe(e,t){const n={name:"DuckDuckGo"};if(t){const e=t.getBrandVersion("DuckDuckGo");if(e)return n.version=e,n}const r=I.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return r&&(n.version=r),n}},{test:e=>e.hasBrand("Brave"),describe(e,t){const n={name:"Brave"};if(t){const e=t.getBrandVersion("Brave");if(e)return n.version=e,n}return n}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=I.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=I.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=I.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=I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=I.getFirstMatch(j,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:I.getFirstMatch(t,e),version:I.getSecondMatch(t,e)}}}];var L=[{test:[/Roku\/DVP/],describe(e){const t=I.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:P.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=I.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:P.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=I.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=I.getWindowsVersionName(t);return{name:P.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:P.iOS},n=I.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=I.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=I.getMacOSVersionName(t),r={name:P.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=I.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:P.iOS,version:t}}},{test:[/OpenHarmony/i],describe(e){const t=I.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:P.HarmonyOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=I.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=I.getAndroidVersionName(t),r={name:P.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=I.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:P.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=I.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||I.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||I.getFirstMatch(/\bbb(\d+)/i,e);return{name:P.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=I.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:P.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=I.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:P.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:P.Linux})},{test:[/CrOS/],describe:()=>({name:P.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=I.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:P.PlayStation4,version:t}}}],D=[{test:[/googlebot/i],describe:()=>({type:O.bot,vendor:"Google"})},{test:[/linespider/i],describe:()=>({type:O.bot,vendor:"Line"})},{test:[/amazonbot/i],describe:()=>({type:O.bot,vendor:"Amazon"})},{test:[/gptbot/i],describe:()=>({type:O.bot,vendor:"OpenAI"})},{test:[/chatgpt-user/i],describe:()=>({type:O.bot,vendor:"OpenAI"})},{test:[/oai-searchbot/i],describe:()=>({type:O.bot,vendor:"OpenAI"})},{test:[/baiduspider/i],describe:()=>({type:O.bot,vendor:"Baidu"})},{test:[/bingbot/i],describe:()=>({type:O.bot,vendor:"Bing"})},{test:[/duckduckbot/i],describe:()=>({type:O.bot,vendor:"DuckDuckGo"})},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:()=>({type:O.bot,vendor:"Anthropic"})},{test:[/omgilibot/i,/webzio-extended/i],describe:()=>({type:O.bot,vendor:"Webz.io"})},{test:[/diffbot/i],describe:()=>({type:O.bot,vendor:"Diffbot"})},{test:[/perplexitybot/i],describe:()=>({type:O.bot,vendor:"Perplexity AI"})},{test:[/perplexity-user/i],describe:()=>({type:O.bot,vendor:"Perplexity AI"})},{test:[/youbot/i],describe:()=>({type:O.bot,vendor:"You.com"})},{test:[/ia_archiver/i],describe:()=>({type:O.bot,vendor:"Internet Archive"})},{test:[/meta-webindexer/i],describe:()=>({type:O.bot,vendor:"Meta"})},{test:[/meta-externalads/i],describe:()=>({type:O.bot,vendor:"Meta"})},{test:[/meta-externalagent/i],describe:()=>({type:O.bot,vendor:"Meta"})},{test:[/meta-externalfetcher/i],describe:()=>({type:O.bot,vendor:"Meta"})},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:()=>({type:O.bot,vendor:"Meta"})},{test:[/slackbot/i,/slack-imgProxy/i],describe:()=>({type:O.bot,vendor:"Slack"})},{test:[/yahoo/i],describe:()=>({type:O.bot,vendor:"Yahoo"})},{test:[/yandexbot/i,/yandexmobilebot/i],describe:()=>({type:O.bot,vendor:"Yandex"})},{test:[/pingdom/i],describe:()=>({type:O.bot,vendor:"Pingdom"})},{test:[/huawei/i],describe(e){const t=I.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:O.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:O.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:O.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:O.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:O.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:O.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:O.tablet})},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=I.getFirstMatch(/(ipod|iphone)/i,e);return{type:O.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:O.mobile,vendor:"Nexus"})},{test:[/Nokia/i],describe(e){const t=I.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:O.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:()=>({type:O.mobile})},{test:e=>"blackberry"===e.getBrowserName(!0),describe:()=>({type:O.mobile,vendor:"BlackBerry"})},{test:e=>"bada"===e.getBrowserName(!0),describe:()=>({type:O.mobile})},{test:e=>"windows phone"===e.getBrowserName(),describe:()=>({type:O.mobile,vendor:"Microsoft"})},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:()=>({type:O.tablet})},{test:e=>"android"===e.getOSName(!0),describe:()=>({type:O.mobile})},{test:[/smart-?tv|smarttv/i],describe:()=>({type:O.tv})},{test:[/netcast/i],describe:()=>({type:O.tv})},{test:e=>"macos"===e.getOSName(!0),describe:()=>({type:O.desktop,vendor:"Apple"})},{test:e=>"windows"===e.getOSName(!0),describe:()=>({type:O.desktop})},{test:e=>"linux"===e.getOSName(!0),describe:()=>({type:O.desktop})},{test:e=>"playstation 4"===e.getOSName(!0),describe:()=>({type:O.tv})},{test:e=>"roku"===e.getOSName(!0),describe:()=>({type:O.tv})}],F=[{test:e=>"microsoft edge"===e.getBrowserName(!0),describe(e){if(/\sedg\//i.test(e))return{name:A.Blink};const t=I.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:A.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:A.Trident},n=I.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:A.Presto},n=I.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:A.Gecko},n=I.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:A.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:A.WebKit},n=I.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class N{constructor(e,t=!1,n=null){if(null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e;let r=!1;"boolean"==typeof t?(r=t,this._hints=n):this._hints=null!=t&&"object"==typeof t?t:null,this.parsedResult={},!0!==r&&this.parse()}getHints(){return this._hints}hasBrand(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;const t=e.toLowerCase();return this._hints.brands.some(e=>e.brand&&e.brand.toLowerCase()===t)}getBrandVersion(e){if(!this._hints||!Array.isArray(this._hints.brands))return;const t=e.toLowerCase(),n=this._hints.brands.find(e=>e.brand&&e.brand.toLowerCase()===t);return n?n.version:void 0}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=I.find(x,e=>{if("function"==typeof e.test)return e.test(this);if(Array.isArray(e.test))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)),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=I.find(L,e=>{if("function"==typeof e.test)return e.test(this);if(Array.isArray(e.test))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=I.find(D,e=>{if("function"==typeof e.test)return e.test(this);if(Array.isArray(e.test))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=I.find(F,e=>{if("function"==typeof e.test)return e.test(this);if(Array.isArray(e.test))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 I.assign({},this.parsedResult)}satisfies(e){const t={};let n=0;const r={};let i=0;if(Object.keys(e).forEach(o=>{const a=e[o];"string"==typeof a?(r[o]=a,i+=1):"object"==typeof a&&(t[o]=a,n+=1)}),n>0){const e=Object.keys(t),n=I.find(e,e=>this.isOS(e));if(n){const e=this.satisfies(t[n]);if(void 0!==e)return e}const r=I.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=I.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=I.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(I.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))}}class R{static getParser(e,t=!1,n=null){if("string"!=typeof e)throw new Error("UserAgent should be a string");return new N(e,t,n)}static parse(e,t=null){return new N(e,t).getResult()}static get BROWSER_MAP(){return T}static get ENGINE_MAP(){return A}static get OS_MAP(){return P}static get PLATFORMS_MAP(){return O}}function B(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(){return Date.now()+Math.random().toString()}function V(){throw new Error("Method must be implemented in subclass")}var J=["daily.co","dailywebrtc.com","dailywebrtc.net"],q=null;function $(){return q}function z(e){(null===e||J.includes(e))&&(q=e)}function W(e){try{var t=new URL(e).hostname;return J.find(function(e){return t===e||t.endsWith(".".concat(e))})||null}catch(e){return null}}function G(e,t){return null!=t&&t.proxyUrl?t.proxyUrl+("/"===t.proxyUrl.slice(-1)?"":"/")+e.substring(8):e}function H(e,t){var n=J.find(function(t){return e.includes(t)});return n?e.replace(n,t):e}function Q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null!=q?q:J[0];if(null!=e&&e.callObjectBundleUrlOverride)return console.warn("The callObjectBundleUrlOverride property is deprecated and will be removed. Please use bundlePathOverride instead. When providing a bundlePathOverride, the URL should point to the directory containing all Daily bundles (call-machine-object-bundle.js and audio-processor-bundle.js)."),H(e.callObjectBundleUrlOverride,t);var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null!=q?q:J[0];if(t&&""!==t.trim()||(t=null!=q?q:J[0]),null!=e&&e.bundlePathOverride){var n=H(e.bundlePathOverride,t);return n.endsWith("/")?n.slice(0,-1):n}if(null!=e&&e.callObjectBundleUrlOverride){var r=H(e.callObjectBundleUrlOverride,t),i=r.substring(0,r.lastIndexOf("/"));return i.endsWith("/")?i.slice(0,-1):i}var o=G("https://c.".concat(t,"/call-machine/versioned/","0.92.2","/static"),e);return o.endsWith("/")?o.slice(0,-1):o}(e,t)+"/call-machine-object-bundle.js";return n}function Y(e){var t=(null==e?void 0:e.bundlePathOverride)||(null==e?void 0:e.callObjectBundleUrlOverride);return!(!t||J.some(function(e){return t.includes(e)}))||Boolean((null==e?void 0:e.proxyUrl)||function(){try{return"undefined"!=typeof localStorage&&"1"===localStorage.getItem("daily:disable-base-domain-fallback")}catch(e){return!1}}())}function K(e){try{var t,n=null!=e?e:window.location.hostname;return null!==(t=J.find(function(e){return n===e||n.endsWith(".".concat(e))}))&&void 0!==t?t:null}catch(e){return null}}function X(e,t){var n,r=W(e);if(!r||Y(t))return[e];var i=null!==(n=null!=q?q:K())&&void 0!==n?n:J[0];return(i===J[0]?J:[i].concat(B(J.filter(function(e){return e!==i})))).map(function(t){return t===r?e:function(e,t,n){try{var r=new URL(e);return r.hostname.endsWith(".".concat(t))?r.hostname=r.hostname.slice(0,-t.length)+n:r.hostname===t&&(r.hostname=n),r.toString()}catch(t){return e}}(e,r,t)})}function Z(e){try{new URL(e)}catch(e){return!1}return!0}const ee="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,te="8.55.2",ne=globalThis;function re(e,t,n){const r=n||ne,i=r.__SENTRY__=r.__SENTRY__||{},o=i[te]=i[te]||{};return o[e]||(o[e]=t())}const ie="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,oe=["debug","info","warn","error","log","assert","trace"],ae={};function se(e){if(!("console"in ne))return e();const t=ne.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 ce=re("logger",function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ie?oe.forEach(n=>{t[n]=(...t)=>{e&&se(()=>{ne.console[n](`Sentry Logger [${n}]:`,...t)})}}):oe.forEach(e=>{t[e]=()=>{}}),t}),le="?",ue=/\(error: (.*)\)/,de=/captureMessage|captureException/;function pe(e){return e[e.length-1]||{}}const fe="<anonymous>";function he(e){try{return e&&"function"==typeof e&&e.name||fe}catch(e){return fe}}function ve(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(e=>{e.stacktrace.frames&&n.push(...e.stacktrace.frames)}),n}catch(e){return}}}const ge={},me={};function ye(e,t){ge[e]=ge[e]||[],ge[e].push(t)}function be(e,t){if(!me[e]){me[e]=!0;try{t()}catch(t){ie&&ce.error(`Error while instrumenting ${e}`,t)}}}function _e(e,t){const n=e&&ge[e];if(n)for(const r of n)try{r(t)}catch(t){ie&&ce.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${he(r)}\nError:`,t)}}let we=null;function ke(){we=ne.onerror,ne.onerror=function(e,t,n,r,i){return _e("error",{column:r,error:i,line:n,msg:e,url:t}),!!we&&we.apply(this,arguments)},ne.onerror.__SENTRY_INSTRUMENTED__=!0}let Se=null;function Me(){Se=ne.onunhandledrejection,ne.onunhandledrejection=function(e){return _e("unhandledrejection",e),!Se||Se.apply(this,arguments)},ne.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Ce(){return Ee(ne),ne}function Ee(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||te,t[te]=t[te]||{}}const Te=Object.prototype.toString;function Oe(e){switch(Te.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Re(e,Error)}}function Pe(e,t){return Te.call(e)===`[object ${t}]`}function Ae(e){return Pe(e,"ErrorEvent")}function Ie(e){return Pe(e,"DOMError")}function je(e){return Pe(e,"String")}function xe(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Le(e){return null===e||xe(e)||"object"!=typeof e&&"function"!=typeof e}function De(e){return Pe(e,"Object")}function Fe(e){return"undefined"!=typeof Event&&Re(e,Event)}function Ne(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Re(e,t){try{return e instanceof t}catch(e){return!1}}function Be(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const Ue=ne;function Ve(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,a=0;const s=" > ",c=s.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(l=Je(n,u),!("html"===l||o>1&&a+i.length*c+l.length>=d));)i.push(l),a+=l.length,n=n.parentNode;return i.reverse().join(s)}catch(e){return"<unknown>"}}function Je(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(Ue.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&&je(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 $e(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{Be(r)?n.push("[VueViewModel]"):n.push(String(r))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function ze(e,t=[],n=!1){return t.some(t=>function(e,t,n=!1){return!!je(e)&&(Pe(t,"RegExp")?t.test(e):!!je(t)&&(n?e===t:e.includes(t)))}(e,t,n))}function We(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);"function"==typeof i&&He(i,r);try{e[t]=i}catch(n){ie&&ce.log(`Failed to replace method "${t}" in object`,e)}}function Ge(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){ie&&ce.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function He(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Ge(e,"__sentry_original__",t)}catch(e){}}function Qe(e){return e.__sentry_original__}function Ye(e){if(Oe(e))return{message:e.message,name:e.name,stack:e.stack,...Xe(e)};if(Fe(e)){const t={type:e.type,target:Ke(e.target),currentTarget:Ke(e.currentTarget),...Xe(e)};return"undefined"!=typeof CustomEvent&&Re(e,CustomEvent)&&(t.detail=e.detail),t}return e}function Ke(e){try{return"undefined"!=typeof Element&&Re(e,Element)?Ve(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}}function Xe(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 Ze(e){return et(e,new Map)}function et(e,t){if(function(e){if(!De(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]=et(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(et(e,t))}),r}return e}function tt(){return Date.now()/1e3}const nt=function(){const{performance:e}=ne;if(!e||!e.now)return tt;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}();function rt(){const e=ne,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 it(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ot(e){const{message:t,event_id:n}=e;if(t)return t;const r=it(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function at(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 st(e,t){const n=it(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 ct(e){if(function(e){try{return e.__sentry_captured__}catch(e){}}(e))return!0;try{Ge(e,"__sentry_captured__",!0)}catch(e){}return!1}var lt;function ut(e){return new pt(t=>{t(e)})}function dt(e){return new pt((t,n)=>{n(e)})}(()=>{const{performance:e}=ne;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,a=e.timing&&e.timing.navigationStart,s="number"==typeof a?Math.abs(a+n-r):t;(o||s<t)&&i<=s&&e.timeOrigin})(),function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"}(lt||(lt={}));class pt{constructor(e){pt.prototype.__init.call(this),pt.prototype.__init2.call(this),pt.prototype.__init3.call(this),pt.prototype.__init4.call(this),this._state=lt.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new pt((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 pt((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(lt.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(lt.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===lt.PENDING&&(Ne(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===lt.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===lt.RESOLVED&&e[1](this._value),this._state===lt.REJECTED&&e[2](this._value),e[0]=!0)})}}}function ft(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||nt(),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:rt()),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 ht(){return rt()}function vt(){return rt().substring(16)}function gt(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]=gt(r[e],t[e],n-1));return r}const mt="_sentrySpan";function yt(e,t){t?Ge(e,mt,t):delete e[mt]}function bt(e){return e[mt]}class _t{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:ht(),spanId:vt()}}clone(){const e=new _t;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,yt(e,bt(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&&ft(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 wt?[t.getScopeData(),t.getRequestSession()]:De(t)?[e,e.requestSession]:[],{tags:i,extra:o,user:a,contexts:s,level:c,fingerprint:l=[],propagationContext:u}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...s},a&&Object.keys(a).length&&(this._user=a),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,yt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ht()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:tt(),...e};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.re
vendor: 4,834 bytes, line 2
2cordDroppedEvent("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:bt(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=gt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:vt(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:rt();if(!this._client)return ce.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:rt();if(!this._client)return ce.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:rt();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(ce.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 wt=_t;class kt{constructor(e,t){let n,r;n=e||new wt,r=t||new wt,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 Ne(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 St(){const e=Ee(Ce());return e.stack=e.stack||new kt(re("defaultCurrentScope",()=>new wt),re("defaultIsolationScope",()=>new wt))}function Mt(e){return St().withScope(e)}function Ct(e,t){const n=St();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Et(e){return St().withScope(()=>e(St().getIsolationScope()))}function Tt(e){const t=Ee(e);return t.acs?t.acs:{withIsolationScope:Et,withScope:Mt,withSetScope:Ct,withSetIsolationScope:(e,t)=>Et(t),getCurrentScope:()=>St().getScope(),getIsolationScope:()=>St().getIsolationScope()}}function Ot(){return Tt(Ce()).getCurrentScope()}function Pt(){return Tt(Ce()).getIsolationScope()}function At(){return Ot().getClient()}function It(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:i}=t;return Ze({trace_id:n,span_id:r,parent_span_id:i})}function jt(e){const t=e._sentryMetrics;if(!t)return;const n={};for(const[,[e,r]]of t)(n[e]||(n[e]=[])).push(Ze(r));return n}const xt=/^sentry-/;function Lt(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}let Dt=!1;function Ft(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return Ze({parent_span_id:r?t:Bt(e).parent_span_id,span_id:r?vt():t,trace_id:n})}function Nt(e){return"number"==typeof e?Rt(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Rt(e.getTime()):nt()}function Rt(e){return e>9999999999?e/1e3:e}function Bt(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:a,parentSpanId:s,status:c}=e;return Ze({span_id:t,trace_id:n,data:r,description:o,parent_span_id:s,start_timestamp:Nt(i),timestamp:Nt(a)||void 0,status:Ut(c),op:r["sentry.op"],origin:r["sentry.origin"],_metrics_summary:jt(e)})}return{span_id:t,trace_id:n}}catch(e){return{}}}function Ut(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}function Vt(e){return e._sentryRootSpan||e}function Jt(){Dt||(se(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK ver
2sion 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),Dt=!0)}const qt="production";function $t(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=Ze({environment:n.environment||qt,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function zt(e){const t=At();if(!t)return{};const n=Vt(e),r=n._frozenDsc;if(r)return r;const i=n.spanContext().traceState,o=i&&i.get("sentry.dsc"),a=o&&function(e){const t=function(e){if(e&&(je(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{const n=Lt(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Lt(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>(t.match(xt)&&(e[t.slice(7)]=n),e),{});return Object.keys(n).length>0?n:void 0}(o);if(a)return a;const s=$t(e.spanContext().traceId,t),c=Bt(n),l=c.data||{},u=l["sentry.sample_rate"];null!=u&&(s.sample_rate=`${u}`);const d=l["sentry.source"],p=c.description;return"url"!==d&&p&&(s.transaction=p),function(){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=At(),t=e&&e.getOptions();return!!t&&(t.enableTracing||"tracesSampleRate"in t||"tracesSampler"in t)}()&&(s.sampled=String(function(e){const{traceFlags:t}=e.spanContext();return 1===t}(n))),t.emit("createDsc",s,n),s}const Wt=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Gt(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r?`${r}/`:r}${a}`}function Ht(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Qt(e,t=100,n=1/0){try{return Kt("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Yt(e,t=3,n=102400){const r=Qt(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?Yt(e,t-1,n):r;var i}function Kt(e,t,r=1/0,i=1/0,o=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[a,s]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const c=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(void 0!==n.g&&t===n.g)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(Be(t))return"[VueViewModel]";if(De(r=t)&&"nativeEvent"in r&&"preventDefault"in r&&"stopPropagation"in r)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${he(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const i=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(i)?`[HTMLElement: ${i}]`:`[object ${i}]`}catch(e){return`**non-serializable** (${e})`}var r}(e,t);if(!c.startsWith("[object "))return c;if(t.__sentry_skip_normalization__)return t;const l="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:r;if(0===l)return c.replace("object ","");if(a(t))return"[Circular ~]";const u=t;if(u&&"function"==typeof u.toJSON)try{return Kt("",u.toJSON(),l-1,i,o)}catch(e){}const d=Array.isArray(t)?[]:{};let p=0;const f=Ye(t);for(const e in f){if(!Object.prototype.hasOwnProperty.call(f,e))continue;if(p>=i){d[e]="[MaxProperties ~]";break}const t=f[e];d[e]=Kt(e,t,l-1,i,o),p++}return s(t),d}function Xt(e,t=[]){return[e,t]}function Zt(e,t){const[n,r]=e;return[n,[...r,t]]}function en(e,t){const n=e[1];for(const e of n)if(t(e,e[0].type))return!0;return!1}function tn(e){return ne.__SENTRY__&&ne.__SENTRY__.encodePolyfill?ne.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function nn(e){const[t,n]=e;let r=JSON.stringify(t);function i(e){"string"==typeof r?r="string"==typeof e?r+e:[tn(r),e]:r.push("string"==typeof e?tn(e):e)}for(const e of n){const[n,r]=e;if(i(`\n${JSON.stringify(n)}\n`),"string"==typeof r||r instanceof Uint8Array)i(r);else{let e;try{e=JSON.stringify(r)}catch(t){e=JSON.stringify(Qt(r))}i(e)}}return"string"==typeof r?r:function(e){const t=e.reduce((e,t)=>
vendor: 21,491 bytes, line 2
2e+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 rn(e){const t="string"==typeof e.data?tn(e.data):e.data;return[Ze({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const on={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 an(e){return on[e]}function sn(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function cn(e,t,n,r=0){return new pt((i,o)=>{const a=e[r];if(null===t||"function"!=typeof a)i(t);else{const s=a({...t},n);ee&&a.id&&null===s&&ce.log(`Event processor "${a.id}" dropped event`),Ne(s)?s.then(t=>cn(e,t,n,r+1).then(i)).then(null,o):cn(e,s,n,r+1).then(i).then(null,o)}})}let ln,un,dn;function pn(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:p,transactionName:f,span:h}=t;fn(e,"extra",n),fn(e,"tags",r),fn(e,"user",i),fn(e,"contexts",o),e.sdkProcessingMetadata=gt(e.sdkProcessingMetadata,s,2),a&&(e.level=a),f&&(e.transactionName=f),h&&(e.span=h),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,...p}}function fn(e,t,n){e[t]=gt(e[t],n,1)}function hn(e,t,n,r,i,o){const{normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||rt(),timestamp:t.timestamp||tt()},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||qt,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i),e.message&&(e.message=qe(e.message,o));const a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=qe(a.value,o));const s=e.request;s&&s.url&&(s.url=qe(s.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=ne._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return dn&&n.length===un||(un=n.length,dn=n.reduce((n,r)=>{ln||(ln={});const i=ln[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],a=o&&o.filename,s=t[r];if(a&&s){n[a]=s,ln[r]=[a,s];break}}}return n},{})),dn}(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 wt;return n.update(t),n}(r,n.captureContext);n.mechanism&&st(c,n.mechanism);const d=i?i.getEventProcessors():[],p=re("globalScope",()=>new wt).getScopeData();o&&pn(p,o.getScopeData()),u&&pn(p,u.getScopeData());const f=[...n.attachments||[],...p.attachments];return f.length&&(n.attachments=f),function(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:a,transactionName:s}=t,c=Ze(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=Ze(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const u=Ze(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});const d=Ze(o);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),a&&(e.level=a),s&&"transaction"!==e.type&&(e.transaction=s)}(e,t),r&&function(e,t){e.contexts={trace:Ft(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:zt(t),...e.sdkProcessingMetadata};const n=Bt(Vt(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}(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)}(c,p),cn([...d,...p.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 a&&a>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Qt(e.data,t,n)}}))},...e.user&&{user:Qt(e.user,t,n)},...e.contexts&&{contexts:Qt(e.contexts,t,n)},...e.extra&&{extra:Qt(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Qt(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Qt(e.data,t,n)}}))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=Qt(e.contexts.flags,3,n)),r}(e,a,s):e))}function vn(e,t){return Ot().captureEvent(e,t)}function gn(e){const t=At(),n=Pt(),r=Ot(),{release:i,environment:o=qt}=t&&t.getOptions()||{},{userAgent:a}=ne.navigator||{},s=function(e){const t=nt(),n={sid:rt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Ze({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&&ft(n,e),n}({release:i,environment:o,user:r.getUser()||n.getUser(),...a&&{userAgent:a},...e}),c=n.getSession();return c&&"ok"===c.status&&ft(c,{status:"exited"}),mn(),n.setSession(s),r.setSession(s),s}function mn(){const e=Pt(),t=Ot(),n=t.getSession()||e.getSession();n&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),ft(e,t)}(n),yn(),e.setSession(),t.setSession()}function yn(){const e=Pt(),t=Ot(),n=At(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function bn(e=!1){e?mn():yn()}const _n=[];function wn(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function kn(e,t,n){if(n[t.name])ee&&ce.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===_n.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),_n.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)}ee&&ce.log(`Integration installed: ${t.name}`)}}class Sn extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}const Mn="Not capturing exception because it's already been captured.";class Cn{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=function(e){const t="string"==typeof e?function(e){const t=Wt.exec(e);if(!t)return void se(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,i="",o="",a="",s=""]=t.slice(1);let c="",l=s;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 Ht({host:o,pass:i,path:c,projectId:l,port:a,protocol:n,publicKey:r})}(e):Ht(e);if(t&&function(e){if(!ie)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(ce.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(ce.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(ce.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(ce.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}(e.dsn):ee&&ce.warn("No DSN provided, client will not send events."),this._dsn){const t=function(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)}`}(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&&se(()=>{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=rt();if(ct(e))return ee&&ce.log(Mn),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:rt(),...n},o=xe(e)?e:String(e),a=Le(e)?this.eventFromMessage(o,t,i):this.eventFromException(e,i);return this._process(a.then(e=>this._captureEvent(e,i,r))),i.event_id}captureEvent(e,t,n){const r=rt();if(t&&t.originalException&&ct(t.originalException))return ee&&ce.log(Mn),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?ee&&ce.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ft(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))):ut(!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];kn(this,e,this._integrations),t||wn(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){const i=sn(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 a=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:Gt(r)},...i&&{trace:Ze({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,Xt(a,[[{type:o},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Zt(n,rn(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=sn(n);return Xt({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Gt(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}`;ee&&ce.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=>(ee&&ce.error("Error while sending envelope:",e),e)):(ee&&ce.error("Transport disabled"),ut({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t&&kn(e,t,n)}),n}(this,e),wn(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)&&(ft(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new pt(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=Ot(),r=Pt()){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),hn(i,e,t,n,this,r).then(e=>{if(null===e)return e;e.contexts={trace:It(n),...e.contexts};const t=function(e,t){const n=t.getPropagationContext();return n.dsc||$t(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=>{ee&&(e instanceof Sn&&"log"===e.logLevel?ce.log(e.message):ce.warn(e))})}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:i}=r,o=Tn(e),a=En(e),s=e.type||"error",c=`before send for type \`${s}\``,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;ee&&ce.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(a&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",e),dt(new Sn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const u="replay_event"===s?"replay":s,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,e),new Sn("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:a}=t;if(En(n)&&i)return i(n,r);if(Tn(n)){if(n.spans&&a){const t=[];for(const r of n.spans){const n=a(r);n?t.push(n):(Jt(),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(Ne(e))return e.then(e=>{if(!De(e)&&null!==e)throw new Sn(n);return e},e=>{throw new Sn(`${t} rejected with ${e}`)});if(!De(e)&&null!==e)throw new Sn(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 Sn(`${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 a=r.transaction_info;if(o&&a&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...a,source:e}}return this.sendEvent(r,t),r}).then(null,e=>{if(e instanceof Sn)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Sn(`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(){ee&&ce.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(ee&&ce.log("No outcomes to send"));if(!this._dsn)return void(ee&&ce.log("No dsn provided, will not send outcomes"));ee&&ce.log("Sending outcomes:",e);const t=(n=e,Xt((r=this._options.tunnel&&Gt(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:tt(),discarded_events:n}]]));var n,r;this.sendEnvelope(t)}}function En(e){return void 0===e.type}function Tn(e){return"transaction"===e.type}function On(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}const Pn=100;function An(e,t){const n=At(),r=Pt();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=Pn}=n.getOptions();if(o<=0)return;const a={timestamp:tt(),...e},s=i?se(()=>i(a,t)):a;null!==s&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,o))}let In;const jn=new WeakMap,xn=()=>({name:"FunctionToString",setupOnce(){In=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Qe(this),n=jn.has(At())&&void 0!==t?t:this;return In.apply(n,e)}}catch(e){}},setup(e){jn.set(e,!0)}}),Ln=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,"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+$/,/^Java exception was raised during method invocation$/],Dn=(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?[]:Ln],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,i);return function(e,t){return t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e)?(ee&&ce.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${ot(e)}`),!0):function(e,t){return!(e.type||!t||!t.length)&&function(e){const t=[];let n;e.message&&t.push(e.message);try{n=e.exception.values[e.exception.values.length-1]}catch(e){}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}(e).some(e=>ze(e,t))}(e,t.ignoreErrors)?(ee&&ce.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${ot(e)}`),!0):function(e){return!(e.type||!e.exception||!e.exception.values||0===e.exception.values.length||e.message||e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))}(e)?(ee&&ce.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${ot(e)}`),!0):function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&ze(n,t)}(e,t.ignoreTransactions)?(ee&&ce.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${ot(e)}`),!0):function(e,t){if(!t||!t.length)return!1;const n=Fn(e);return!!n&&ze(n,t)}(e,t.denyUrls)?(ee&&ce.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${ot(e)}.\nUrl: ${Fn(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;const n=Fn(e);return!n||ze(n,t)}(e,t.allowUrls)&&(ee&&ce.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${ot(e)}.\nUrl: ${Fn(e)}`),!0)}(t,o)?null:t}});function Fn(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 ee&&ce.error(`Cannot extract url for event ${ot(e)}`),null}}function Nn(e,t,n=250,r,i,o,a){if(!(o.exception&&o.exception.values&&a&&Re(a.originalException,Error)))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var c,l;s&&(o.exception.values=(c=Rn(e,t,i,a.originalException,r,o.exception.values,s,0),l=n,c.map(e=>(e.value&&(e.value=qe(e.value,l)),e))))}
2function Rn(e,t,n,r,i,o,a,s){if(o.length>=n+1)return o;let c=[...o];if(Re(r[i],Error)){Bn(a,s);const o=e(t,r[i]),l=c.length;Un(o,i,l,s),c=Rn(e,t,n,r[i],i,[o,...c],o,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,o)=>{if(Re(r,Error)){Bn(a,s);const l=e(t,r),u=c.length;Un(l,`errors[${o}]`,u,s),c=Rn(e,t,n,r,i,[l,...c],l,u)}}),c}function Bn(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 Un(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 Vn(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 Jn(){"console"in ne&&oe.forEach(function(e){e in ne.console&&We(ne.console,e,function(t){return ae[e]=t,function(...t){_e("console",{args:t,level:e});const n=ae[e];n&&n.apply(ne.console,t)}})})}function qn(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const $n=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){return!(!t||!function(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Wn(e,t)||!zn(e,t))}(e,t)&&!function(e,t){const n=Gn(t),r=Gn(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&Wn(e,t)&&zn(e,t))}(e,t))}(t,e))return ee&&ce.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}};function zn(e,t){let n=ve(e),r=ve(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 Wn(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 Gn(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Hn(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const Qn=ne;function Yn(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Kn(e,t){return!!e&&"object"==typeof e&&!!e[t]}function Xn(e){return"string"==typeof e?e:e?Kn(e,"url")?e.url:e.toString?e.toString():"":""}const Zn=ne,er=ne;let tr=0;function nr(){return tr>0}function rr(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(Qe(e))return e}catch(t){return e}const n=function(...n){try{const r=n.map(e=>rr(e,t));return e.apply(this,r)}catch(e){throw tr++,setTimeout(()=>{tr--}),function(...e){const t=Tt(Ce());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}(r=>{var i;r.addEventProcessor(e=>(t.mechanism&&(at(e,void 0,void 0),st(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),i=e,Ot().captureException(i,function(e){e}(void 0))}),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch(e){}He(n,e),Ge(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch(e){}return n}const ir="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function or(e,t){const n=sr(e,t),r={type:ur(t),value:dr(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ar(e,t){return{exception:{values:[or(e,t)]}}}function sr(e,t){const n=t.stacktrace||t.stack||"",r=function(e){return e&&cr.test(e.message)?1:0}(t),i=function(e){return"number"==typeof e.framesToPop?e.framesToPop:0}(t);try{return e(n,r,i)}catch(e){}return[]}const cr=/Minified React error #\d+;/i;function lr(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function ur(e){const t=e&&e.name;return!t&&lr(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function dr(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:lr(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function pr(e,t,n,r,i){let o;if(Ae(t)&&t.error)return ar(e,t.error);if(Ie(t)||Pe(t,"DOMException")){const i=t;if("stack"in t)o=ar(e,t);else{const t=i.name||(Ie(i)?"DOMError":"DOMException"),a=i.message?`${t}: ${i.message}`:t;o=fr(e,a,n,r),at(o,a)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return Oe(t)?ar(e,t):De(t)||Fe(t)?(o=function(e,t,n,r){const i=At(),o=i&&i.getOptions().normalizeDepth,a=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}(t),s={__serialized__:Yt(t,o)};if(a)return{exception:{values:[or(e,a)]},extra:s};const c={exception:{values:[{type:Fe(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:hr(t,{isUnhandledRejection:r})}]},extra:s};if(n){const t=sr(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}(e,t,n,i),st(o,{synthetic:!0}),o):(o=fr(e,t,n,r),at(o,`${t}`,void 0),st(o,{synthetic:!0}),o)}function fr(e,t,n,r){const i={};if(r&&n){const r=sr(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),st(i,{synthetic:!0})}
vendor: 18,874 bytes, line 2
2if(xe(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 hr(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(Ye(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";return Ae(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Fe(e)?`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}`:`Object captured as ${r} with keys: ${n}`}class vr extends Cn{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:te})),version:te}),e._metadata=i}(t,"browser",["browser"],er.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&er.document&&er.document.addEventListener("visibilitychange",()=>{"hidden"===er.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){const i=pr(e,t,n&&n.syntheticException||void 0,r);return st(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),ut(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const o=fr(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),ut(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(ir&&ce.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:Gt(r)}},o=function(e){return[{type:"user_report"},e]}(e);return Xt(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 gr="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,mr=ne;let yr,br,_r,wr;function kr(){if(!mr.document)return;const e=_e.bind(null,"dom"),t=Sr(e,!0);mr.document.addEventListener("click",t,!1),mr.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=mr[t],r=n&&n.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(We(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=Sr(e);o.handler=r,t.call(this,n,r,i)}o.refCount++}catch(e){}return t.call(this,n,r,i)}}),We(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 Sr(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;Ge(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ge(r,"_sentryId",rt());const i="keypress"===n.type?"input":n.type;(function(e){if(e.type!==br)return!1;try{if(!e.target||e.target._sentryId!==_r)return!1}catch(e){}return!0})(n)||(e({event:n,name:i,global:t}),br=n.type,_r=r?r._sentryId:void 0),clearTimeout(yr),yr=mr.setTimeout(()=>{_r=void 0,br=void 0},1e3)}}function Mr(e){const t="history";ye(t,e),be(t,Cr)}function Cr(){if(!function(){const e=Zn.chrome,t=e&&e.app&&e.app.runtime,n="history"in Zn&&!!Zn.history.pushState&&!!Zn.history.replaceState;return!t&&n}())return;const e=mr.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=wr,t=String(n);wr=t,_e("history",{from:e,to:t})}return e.apply(this,t)}}mr.onpopstate=function(...t){const n=mr.location.href,r=wr;if(wr=n,_e("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},We(mr.history,"pushState",t),We(mr.history,"replaceState",t)}const Er={};function Tr(e){Er[e]=void 0}const Or="__sentry_xhr_v3__";function Pr(){if(!mr.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,i=1e3*nt(),o=je(n[0])?n[0].toUpperCase():void 0,a=function(e){if(je(e))return e;try{return e.toString()}catch(e){}}(n[1]);if(!o||!a)return e.apply(t,n);t[Or]={method:o,url:a,request_headers:{}},"POST"===o&&a.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const s=()=>{const e=t[Or];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}_e("xhr",{endTimestamp:1e3*nt(),startTimestamp:i,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(s(),e.apply(t,n))}):t.addEventListener("readystatechange",s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,i]=n,o=t[Or];return o&&je(r)&&je(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[Or];return r?(void 0!==n[0]&&(r.body=n[0]),_e("xhr",{startTimestamp:1e3*nt(),xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function Ar(e,t=function(e){const t=Er[e];if(t)return t;let n=mr[e];if(Yn(n))return Er[e]=n.bind(mr);const r=mr.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){gr&&ce.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?Er[e]=n.bind(mr):n}("fetch")){let n=0,r=0;return function(e,t,n=function(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 dt(new Sn("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 pt((n,r)=>{let i=t.length;if(!i)return n(!0);const o=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{ut(e).then(()=>{--i||(clearTimeout(o),n(!0))},r)})})}}}(e.bufferSize||64)){let r={};return{send:function(i){const o=[];if(en(i,(t,n)=>{const i=an(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=On(t,n);e.recordDroppedEvent("ratelimit_backoff",i,r)}else o.push(t)}),0===o.length)return ut({});const a=Xt(i[0],o),s=t=>{en(a,(n,r)=>{const i=On(n,r);e.recordDroppedEvent(t,an(r),i)})};return n.add(()=>t({body:nn(a)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&ee&&ce.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=function(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n,,,o]=e.split(":",5),a=parseInt(t,10),s=1e3*(isNaN(a)?60:a);if(n)for(const e of n.split(";"))"metric_bucket"===e&&o&&!o.split(";").includes("custom")||(i[e]=r+s);else i.all=r+s}else a?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}(a,r):429===t&&(i.all=r+6e4);return i}(r,e),e),e=>{throw s("network_error"),e})).then(e=>e,e=>{if(e instanceof Sn)return ee&&ce.error("Skipped sending event because buffer is full."),s("queue_overflow"),ut({});throw e})},flush:e=>n.drain(e)}}(e,function(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Tr("fetch"),dt("No fetch implementation available");try{return t(e.url,a).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 Tr("fetch"),n-=o,r--,dt(e)}})}function Ir(e,t,n,r){const i={filename:e,function:"<anonymous>"===t?le:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const jr=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,xr=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Lr=/\((\S*)(?::(\d+))(?::(\d+))\)/,Dr=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Fr=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Nr=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 a=ue.test(n)?n.replace(ue,"$1"):n;if(!a.match(/\S*Error: /)){for(const e of t){const t=e(a);if(t){i.push(t);break}}if(i.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(pe(t).function||"")&&t.pop(),t.reverse(),de.test(pe(t).function||"")&&(t.pop(),de.test(pe(t).function||"")&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||pe(t).filename,function:e.function||le}))}(i.slice(r))}}([30,e=>{const t=jr.exec(e);if(t){const[,e,n,r]=t;return Ir(e,le,+n,+r)}const n=xr.exec(e);if(n){if(n[2]&&0===n[2].indexOf("eval")){const e=Lr.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}const[e,t]=Rr(n[1]||le,n[2]);return Ir(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=Dr.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Fr.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]||le;return[n,e]=Rr(n,e),Ir(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Rr=(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]:le,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Br=(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";ye(t,e),be(t,Jn)}(function(e){return function(t){if(At()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:qn(t.level),message:$e(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${$e(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}An(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(At()!==e)return;let r,i,o="object"==typeof t?t.serializeAttribute:void 0,a="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;a&&a>1024&&(ir&&ce.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=1024),"string"==typeof o&&(o=[o]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=Ve(t,{keyAttrs:o,maxStringLength:a}),i=function(e){if(!Ue.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 s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),An(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),ye("dom",n),be("dom",kr)),t.xhr&&function(e){ye("xhr",e),be("xhr",Pr)}(function(e){return function(t){if(At()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Or];if(!n||!r||!i)return;const{method:o,url:a,status_code:s,body:c}=i,l={method:o,url:a,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};An({category:"xhr",data:l,type:"http",level:Hn(s)},u)}}(e)),t.fetch&&function(e,t){const n="fetch";ye(n,e),be(n,()=>function(e,t=!1){t&&!function(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in Qn))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}())return!1;if(Yn(Qn.fetch))return!0;let e=!1;const t=Qn.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=Yn(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){ie&&ce.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}()||We(ne,"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:Xn(t),method:Kn(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Xn(t),method:Kn(t,"method")?String(t.method).toUpperCase():"GET"}}(n),a={args:n,fetchData:{method:i,url:o},startTimestamp:1e3*nt(),virtualError:r};return e||_e("fetch",{...a}),t.apply(ne,n).then(async t=>(e?e(t):_e("fetch",{...a,endTimestamp:1e3*nt(),response:t}),t),e=>{throw _e("fetch",{...a,endTimestamp:1e3*nt(),error:e}),Oe(e)&&void 0===e.stack&&(e.stack=r.stack,Ge(e,"framesToPop",1)),e})}})}(void 0,t))}(function(e){return function(t){if(At()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error)An({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};An({category:"fetch",data:i,type:"http",level:Hn(i.status_code)},o)}}}(e)),t.history&&Mr(function(e){return function(t){if(At()!==e)return;let n=t.from,r=t.to;const i=Vn(er.location.href);let o=n?Vn(n):void 0;const a=Vn(r);o&&o.path||(o=i),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),An({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){At()===e&&An({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:ot(t)},{event:t})}}(e))}}},Ur=["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"],Vr=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&We(er,"setTimeout",Jr),t.setInterval&&We(er,"setInterval",Jr),t.requestAnimationFrame&&We(er,"requestAnimationFrame",qr),t.XMLHttpRequest&&"XMLHttpRequest"in er&&We(XMLHttpRequest.prototype,"send",$r);const e=t.eventTarget;e&&(Array.isArray(e)?e:Ur).forEach(zr)}}};function Jr(e){return function(...t){const n=t[0];return t[0]=rr(n,{mechanism:{data:{function:he(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function qr(e){return function(t){return e.apply(this,[rr(t,{mechanism:{data:{function:"requestAnimationFrame",handler:he(e)},handled:!1,type:"instrument"}})])}}function $r(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&We(n,e,function(t){const n={mechanism:{data:{function:e,handler:he(t)},handled:!1,type:"instrument"}},r=Qe(t);return r&&(n.mechanism.data.handler=he(r)),rr(t,n)})}),e.apply(this,t)}}function zr(e){const t=er[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(We(n,"addEventListener",function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=rr(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:he(r),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[n,rr(r,{mechanism:{data:{function:"addEventListener",handler:he(r),target:e},handled:!1,type:"instrument"}}),i])}}),We(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 Wr=(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";ye(t,e),be(t,ke)}(t=>{const{stackParser:n,attachStacktrace:r}=Hr();if(At()!==e||nr())return;const{msg:i,url:o,line:a,column:s,error:c}=t,l=function(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],a=o[0]=o[0]||{},s=a.stacktrace=a.stacktrace||{},c=s.frames=s.frames||[],l=r,u=n,d=je(t)&&t.length>0?t:function(){try{return Ue.document.location.href}catch(e){return""}}();return 0===c.length&&c.push({colno:l,filename:d,function:le,in_app:!0,lineno:u}),e}(pr(n,c||i,void 0,r,!1),o,a,s);l.level="error",vn(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}(e),Gr("onerror")),t.onunhandledrejection&&(function(e){!function(e){const t="unhandledrejection";ye(t,e),be(t,Me)}(t=>{const{stackParser:n,attachStacktrace:r}=Hr();if(At()!==e||nr())return;const i=function(e){if(Le(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=Le(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:pr(n,i,void 0,r,!0);o.level="error",vn(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(e),Gr("onunhandledrejection"))}}};function Gr(e){ir&&ce.log(`Global Handler attached: ${e}`)}function Hr(){const e=At();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Qr=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,i){const o=i.getOptions();Nn(or,o.stackParser,o.maxValueLength,n,t,e,r)}}};var Yr="new",Kr="loading",Xr="loaded",Zr="joining-meeting",ei="joined-meeting",ti="left-meeting",ni="error",ri="unknown",ii="no-room",oi="end-of-life",ai="connection-error",si="loaded",ci="recording-started",li="recording-stopped",ui="fullscreen",di="exited-fullscreen",pi="input-sett
2ings-updated",fi="nonfatal-error",hi="error",vi=4096,gi=102400,mi="iframe-call-message",yi="local-screen-start",bi="daily-method-update-live-streaming-endpoints",_i="transmit-log",wi="daily-custom-track",ki={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},Si={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},Mi={PLAY:"play",PAUSE:"pause"},Ci="daily",Ei="signalwire",Ti=["jpg","png","jpeg"],Oi="sip-call-transfer";function Pi(){return!Ai()&&"undefined"!=typeof window&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function Ai(){return"undefined"!=typeof navigator&&navigator.product&&"ReactNative"===navigator.product}function Ii(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function ji(){if(Ai())return!1;if(!document)return!1;var e=document.createElement("iframe");return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var xi="none",Li=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?"software":"hardware":xi}catch(e){return xi}}();function Di(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!Ai()&&Li!==xi&&(e?!Bi()&&["Chrome","Firefox"].includes(Ui()):function(){if(Bi())return!1;var e=Ui();if("Safari"===e){var t=zi();if(t.major<15||15===t.major&&t.minor<4)return!1}return"Chrome"===e?Ji().major>=77:"Firefox"===e?Wi().major>=97:["Chrome","Firefox","Safari"].includes(e)}())}function Fi(){if(Ai())return!1;if(Ri())return!1;if("undefined"==typeof AudioWorkletNode)return!1;switch(Ui()){case"Chrome":case"Firefox":return!0;case"Safari":var e=Vi();return e.major>17||17===e.major&&e.minor>=4}return!1}function Ni(){return Ii()&&"undefined"!=typeof MediaStreamTrack&&!function(){var e,t=Ui();if(!Pi())return!0;switch(t){case"Chrome":return(e=Ji()).major&&e.major>0&&e.major<75;case"Firefox":return(e=Wi()).major<91;case"Safari":return(e=zi()).major<13||13===e.major&&e.minor<1;default:return!0}}()}function Ri(){return Pi().match(/Linux; Android/)}function Bi(){var e,t=Pi(),n=t.match(/Mac/)&&(!Ai()&&"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)||!!Pi().match(/DailyAnd\//)||void 0}function Ui(){if("undefined"!=typeof window){var e=Pi();return qi()?"Safari":e.indexOf("Edge")>-1?"Edge":e.match(/Chrome\//)?"Chrome":e.indexOf("Safari")>-1||$i()?"Safari":e.indexOf("Firefox")>-1?"Firefox":e.indexOf("MSIE")>-1||e.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function Vi(){switch(Ui()){case"Chrome":return Ji();case"Safari":return zi();case"Firefox":return Wi();case"Edge":return function(){var e=0,t=0;if("undefined"!=typeof window){var n=Pi().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}()}}function Ji(){var e=0,t=0,n=0,r=0,i=!1;if("undefined"!=typeof window){var o=Pi(),a=o.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(a)try{e=parseInt(a[1]),t=parseInt(a[2]),n=parseInt(a[3]),r=parseInt(a[4]),i=o.indexOf("OPR/")>-1}catch(e){}}return{major:e,minor:t,build:n,patch:r,opera:i}}function qi(){return!!Pi().match(/\((iPad|iPhone|iPod)/i)&&Ii()}function $i(){return Pi().indexOf("AppleWebKit/605.1.15")>-1}function zi(){var e=0,t=0,n=0;if("undefined"!=typeof window){var r=Pi().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch(e){}else(qi()||$i())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function Wi(){var e=0,t=0;if("undefined"!=typeof window){var n=Pi().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}var Gi=c(function e(){i(this,e)},[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){V()}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){V()}},{key:"sendMessageToCallMachine",value:function(e,t,n,r){V()}},{key:"sendMessageToDailyJs",value:function(e,t){V()}},{key:"removeListener",value:function(e){V()}}]);function Hi(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 Qi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
2t%2?Hi(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Yi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yi=function(){return!!e})()}var Ki=function(){function e(){var t,n,r;return i(this,e),n=this,r=u(r=e),(t=l(n,Yi()?Reflect.construct(r,[],u(n).constructor):r.apply(n,void 0)))._wrappedListeners={},t._messageCallbacks={},t}return p(e,Gi),c(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=Qi({},i.data);if(delete o.from,o.callbackStamp&&r._messageCallbacks[o.callbackStamp]){var a=o.callbackStamp;r._messageCallbacks[a].call(n,o),delete r._messageCallbacks[a]}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!==mi||!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=Qi({},e);if(i.what=mi,i.from="module",i.callClientId=n,t){var o=U();this._messageCallbacks[o]=t,i.callbackStamp=o}var a=r?r.contentWindow:window,s=this._callMachineTargetOrigin(r);s&&a.postMessage(i,s)}},{key:"sendMessageToDailyJs",value:function(e,t){e.what=mi,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=Qi({},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 Xi(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 Zi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zi=function(){return!!e})()}var eo=function(){function e(){var t,r,o;return i(this,e),r=this,o=u(o=e),t=l(r,Zi()?Reflect.construct(o,[],u(r).constructor):o.apply(r,void 0)),n.g.callMachineToDailyJsEmitter=n.g.callMachineToDailyJsEmitter||new w.EventEmitter,n.g.dailyJsToCallMachineEmitter=n.g.dailyJsToCallMachineEmitter||new w.EventEmitter,t._wrappedListeners={},t._messageCallbacks={},t}return p(e,Gi),c(e,[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,r){this._addListener(e,n.g.callMachineToDailyJsEmitter,t,r,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,r){this._addListener(e,n.g.dailyJsToCallMachineEmitter,t,r,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(e,t,r){this._sendMessage(e,n.g.dailyJsToCallMachineEmitter,r,t,"sending message to call machine")}},{key:"sendMessageToDailyJs",value:function(e,t){this._sendMessage(e,n.g.callMachineToDailyJsEmitter,t,null,"sending message to daily-js")}},{key:"removeListener",value:function(e){var t=this._wrappedListeners[e];t&&(n.g.callMachineToDailyJsEmitter.removeListener("message",t),n.g.dailyJsToCallMachineEmitter.removeListener("message",t),delete this._wrappedListeners[e])}},{key:"_addListener",value:function(e,t,n,r,i){var o=this,a=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]=a,t.addListener("message",a)}},{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]:{};
vendor: 9,233 bytes, line 2
2t%2?Xi(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);if(o.callClientId=n,r){var a=U();this._messageCallbacks[a]=r,o.callbackStamp=a}t.emit("message",o)}}])}(),to="replace",no="shallow-merge",ro=[to,no],io=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.data,r=t.mergeStrategy,o=void 0===r?to:r;i(this,e),e._validateMergeStrategy(o),e._validateData(n,o),this.mergeStrategy=o,this.data=n}return c(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===no}},{key:"_validateMergeStrategy",value:function(e){if(!ro.includes(e))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(ro,"]"))}},{key:"_validateData",value:function(e,t){if(!function(e){if(null==e||"object"!==o(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 n;try{if(n=JSON.stringify(e),t===to){var r=JSON.parse(n);C(r,e)||console.warn("The meeting session data provided will be modified when serialized.",r,e)}else if(t===no)for(var i in e)if(Object.hasOwnProperty.call(e,i)&&void 0!==e[i]){var a=JSON.parse(JSON.stringify(e[i]));C(e[i],a)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",a,e[i])}}catch(e){throw Error("Meeting session data must be serializable to JSON: ".concat(e))}if(n.length>gi)throw Error("Meeting session data is too large (".concat(n.length," characters). Maximum size suppported is ").concat(gi,"."))}}])}();function oo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oo=function(){return!!e})()}function ao(e){var t="function"==typeof Map?new Map:void 0;return ao=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(oo())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&d(i,n.prototype),i}(e,arguments,u(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),d(n,e)},ao(e)}function so(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(so=function(){return!!e})()}function co(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 lo=c(function e(t){i(this,e),this._currentLoad=null,this._callClientId=t,this._publicPath=null},[{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(),window._daily.instances[this._callClientId].publicPath=this._publicPath,void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new uo(n,function(e){var n=e.substring(0,e.lastIndexOf("/"));n.length&&"/"!==n.slice(-1)&&(n+="/"),t._publicPath=n,window._daily.instances[t._callClientId].publicPath=n,z(W(e)),r(!1)},function(e,n){n||co(t._callClientId),i(e,n)}),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),co(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}]),uo=c(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;i(this,e),this._dailyConfig=t,this._successCallback=n,this._failureCallback=r,this._urls=function(e){var t;if(Y(e))return[Q(e)];var n=null!==(t=null!=q?q:K())&&void 0!==t?t:J[0];return(n===J[0]?J:[n].concat(B(J.filter(function(e){return e!==n})))).map(function(t){return Q(e,t)})}(t),this._networkTimeoutMs=fo,this._passesRemaining=3,this._urlIndex=0,this._currentAttempt=null},[{key:"start",value:function(){this._currentAttempt||this._startAttempt()}},{key:"_startAttempt",value:function(){this._currentAttempt=new ho(this._dailyConfig,this._urls[this._urlIndex],this._networkTimeoutMs,this._successCallback,this._retryOrFailureCallback.bind(this)),this._currentAttempt.start()}},{key:"_retryOrFailureCallback",value:function(e){var t=this;if(!this._currentAttempt.cancelled){this._urlIndex++;var n=this._urlIndex<this._urls.length,r=this._passesRemaining>1,i=n||r;this._failureCallback(e,i),i&&(n?this._startAttempt():(this._passesRemaining--,this._urlIndex=0,setTimeout(function(){t._currentAttempt.cancelled||t._startAttempt()},3e3)))}}},{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}}]),po=function(){function e(){return i(this,e),t=this,r=arguments,n=u(n=e),l(t,so()?Reflect.construct(n,r||[],u(t).constructor):n.apply(t,r));var t,n,r}return p(e,ao(Error)),c(e)}(),fo=2e4,ho=function(){return c(function e(t,n,r,o,a){i(this,e),this._loadAttemptImpl=Ai()||!t.avoidEval?new vo(t,n,r,o,a):new go(t,n,r,o,a)},[{key:"start",value:(e=v(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}(),vo=function(){return c(function e(t,n,r,o,a){i(this,e),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._networkTimeoutMs=r,this._iosCache="undefined"!=typeof iOSCallObjectBundleCache&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=t,this._url=n,this._successCallback=o,this._failureCallback=a},[{key:"start",value:(r=v(function*(){var e=this._url;!(yield this._tryLoadFromIOSCache(e))&&this._loadFromNetwork(e)}),function(){return r.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(n=v(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(e),!0):(this._refetchHeaders=t.refetchHeaders,!1))}catch(e){return!1}}),function(e){return n.apply(this,arguments)})},{key:"_loadFromNetwork",value:(t=v(function*(e){var t=this;this._networkTimeout=setTimeout(function(){t._networkTimedOut=!0,t._failureCallback({msg:"Timed out (>".concat(t._networkTimeoutMs," ms) when loading call object bundle ").concat(e),type:"timeout"})},this._networkTimeoutMs);try{var n=this._refetchHeaders?{headers:this._refetchHeaders}:{},r=yield fetch(e,n);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new po;var i=yield this._getBundleCodeFromResponse(e,r);if(this.cancelled)throw new po;Function('"use strict";'+i)(),this._iosCache&&this._iosCache.set(e,i,r.headers),this.succeeded=!0,this._successCallback(e)}catch(t){if(clearTimeout(this._networkTimeout),t instanceof po||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(e,": ").concat(t),type:t.message})}}),function(e){return t.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(e=v(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,t,n,r}(),go=c(function e(t,n,r,o,a){i(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=t,this._url=n,this._networkTimeoutMs=r,this._successCallback=o,this._failureCallback=a,this._attemptId=U(),this._networkTimeout=null,this._scriptElement=null},[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=this._url;"object"===("undefined"==typeof document?"undefined":o(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(t._networkTimeoutMs," ms) when loading call object bundle ").
vendor: 5,003 bytes, line 2
2concat(e),type:"timeout"})},this._networkTimeoutMs);var n=document.getElementsByTagName("head")[0],r=document.createElement("script");this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback(e)},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)}}]),mo=function(e,t,n){return!0===_o(e.local,t,n)},yo=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]},bo=function(e,t,n,r){var i=wo(e,t,n,r);return i&&i.pendingTrack},_o=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)},wo=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]},ko=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function So(e,t){for(var n=t.getState(),r=0,i=["cam","screen"];r<i.length;r++)for(var o=i[r],a=0,s=["video","audio"];a<s.length;a++){var c=s[a],l="cam"===o?c:"screen".concat(c.charAt(0).toUpperCase()+c.slice(1)),u=e.tracks[l];if(u){var d=e.local?yo(n,o,c):bo(n,e.session_id,o,c);"playable"===u.state&&(u.track=d),u.persistentTrack=d}}}function Mo(e,t){try{var n=t.getState();for(var r in e.tracks)if(!Co(r)){var i=e.tracks[r].kind;if(i){var o=e.tracks[r];if(o){var a=e.local?ko(n,r):bo(n,e.session_id,r,i);"playable"===o.state&&(e.tracks[r].track=a),o.persistentTrack=a}}else console.error("unknown type for custom track")}}catch(e){console.error(e)}}function Co(e){return["video","audio","screenVideo","screenAudio"].includes(e)}function Eo(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{if(r.streams,e.audio&&mo(r,e.session_id,"cam-audio")){var a=bo(r,e.session_id,"cam","audio");a&&(t&&t.audioTrack&&t.audioTrack.id===a.id?e.audioTrack=a:a.muted||(e.audioTrack=a)),e.audioTrack||(e.audio=!1)}if(e.video&&mo(r,e.session_id,"cam-video")){var s=bo(r,e.session_id,"cam","video");s&&(t&&t.videoTrack&&t.videoTrack.id===s.id?e.videoTrack=s:s.muted||(e.videoTrack=s)),e.videoTrack||(e.video=!1)}if(e.screen&&mo(r,e.session_id,"screen-audio")){var c=bo(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&&mo(r,e.session_id,"screen-video")){var l=bo(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 To(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 Oo=new Map,Po=null;function Ao(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 Io=new Map,jo=null;function xo(){var e;return Ai()||void 0!==(null===(e=navigator.mediaDevices)||void 0===e?void 0:e.ondevicechange)}var Lo=new Set;function Do(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 Fo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
vendor: 5,145 bytes, line 2
2t%2?Do(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Do(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var No=Object.freeze({VIDEO:"video",AUDIO:"audio",SCREEN_VIDEO:"screenVideo",SCREEN_AUDIO:"screenAudio",CUSTOM_VIDEO:"customVideo",CUSTOM_AUDIO:"customAudio"}),Ro=Object.freeze({PARTICIPANTS:"participants",STREAMING:"streaming",TRANSCRIPTION:"transcription"}),Bo=Object.values(No),Uo=["v","a","sv","sa","cv","ca"];Object.freeze(Bo.reduce(function(e,t,n){return e[t]=Uo[n],e},{})),Object.freeze(Uo.reduce(function(e,t,n){return e[t]=Bo[n],e},{}));var Vo=[No.VIDEO,No.AUDIO,No.SCREEN_VIDEO,No.SCREEN_AUDIO],Jo=Object.values(Ro),qo=["p","s","t"];Object.freeze(Jo.reduce(function(e,t,n){return e[t]=qo[n],e},{})),Object.freeze(qo.reduce(function(e,t,n){return e[t]=Jo[n],e},{}));var $o=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.base,r=t.byUserId,o=t.byParticipantId;i(this,e),this.base=n,this.byUserId=r,this.byParticipantId=o}return c(e,[{key:"clone",value:function(){var t=new e;if(this.base instanceof zo?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 zo?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 zo?o.clone():o}return t}},{key:"toJSONObject",value:function(){var e={};if("boolean"==typeof this.base?e.base=this.base:this.base instanceof zo&&(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 zo?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 zo?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 zo&&(this.base=this.base.normalize()),this.byUserId&&(this.byUserId=Object.fromEntries(Object.entries(this.byUserId).map(function(e){var t=y(e,2),n=t[0],r=t[1];return[n,r instanceof zo?r.normalize():r]}))),this.byParticipantId&&(this.byParticipantId=Object.fromEntries(Object.entries(this.byParticipantId).map(function(e){var t=y(e,2),n=t[0],r=t[1];return[n,r instanceof zo?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:zo.fromJSONObject(t.base)),void 0!==t.byUserId)for(var o in r={},t.byUserId){var a=t.byUserId[o];r[o]="boolean"==typeof a?a:zo.fromJSONObject(a)}if(void 0!==t.byParticipantId)for(var s in i={},t.byParticipantId){var c=t.byParticipantId[s];i[s]="boolean"==typeof c?c:zo.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:zo.fromMinifiedJSONObject(t.b)),void 0!==t.u)for(var o in r={},t.u){var a=t.u[o];r[o]="boolean"==typeof a?a:zo.fromMinifiedJSONObject(a)}if(void 0!==t.p)for(var s in i={},t.p){var c=t.p[s];i[s]="boolean"==typeof c?c:zo.fromMinifiedJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:"validateJSONObject",value:function(e){if("object"!==o(e))return[!1,"canReceive must be an object"];for(var t=["base","byUserId","byParticipantId"],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!t.includes(i))return[!1,"canReceive can only contain keys (".concat(t.join(", "),")")];if("base"===i){var a=y(zo.validateJSONObject(e.base,!0),2),s=a[0],c=a[1];if(!s)return[!1,c]}else{if("object"!==o(e[i]))return[!1,"invalid (non-object) value for field '".concat(i,"' in canReceive")];for(var l=0,u=Object.values(e[i]);l<u.length;l++){var d=u[l],p=y(zo.validateJSONObject(d),2),f=p[0],h=p[1];if(!f)return[!1,h]}}}return[!0]}}])}(),zo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.video,r=t.audio,o=t.screenVideo,a=t.screenAudio,s=t.customVideo,c=t.customAudio;i(this,e),this.video=n,this.audio=r,this.screenVideo=o,this.screenAudio=a,this.customVideo=s,this.customAudio=c}return c(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=Fo({},this.customVideo)),void 0!==this.customAudio&&(t.customAudio=Fo({},this.customAudio)),t}}
vendor: 4,776 bytes, line 2
2,{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=Fo({},this.customVideo)),void 0!==this.customAudio&&(e.customAudio=Fo({},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=Fo({},this.customVideo)),void 0!==this.customAudio&&(e.ca=Fo({},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?Fo({},t.customVideo):void 0,customAudio:void 0!==t.customAudio?Fo({},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"!==o(e))return[!1,"invalid (non-object, non-boolean) value in canReceive"];for(var n=Object.keys(e),r=0,i=n;r<i.length;r++){var a=i[r];if(!Bo.includes(a))return[!1,"invalid media type '".concat(a,"' in canReceive")];if(Vo.includes(a)){if("boolean"!=typeof e[a])return[!1,"invalid (non-boolean) value for media type '".concat(a,"' in canReceive")]}else{if("object"!==o(e[a]))return[!1,"invalid (non-object) value for media type '".concat(a,"' in canReceive")];for(var s=0,c=Object.values(e[a]);s<c.length;s++)if("boolean"!=typeof c[s])return[!1,"invalid (non-boolean) value for entry within '".concat(a,"' in canReceive")];if(t&&void 0===e[a]["*"])return[!1,'canReceive "base" permission must specify "*" as an entry within \''.concat(a,"'")]}}return t&&n.length!==Bo.length?[!1,'canReceive "base" permission must specify all media types: '.concat(Bo.join(", ")," (or be set to a boolean shorthand)")]:[!0]}}])}(),Wo=["result"],Go=["preserveIframe"];function Ho(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 Qo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ho(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ho(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Yo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yo=function(){return!!e})()}function Ko(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 Xo(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)?Xo(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,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Xo(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 Zo={},ea="video",ta="voice",na=Ai()?{data:{}}:{data:{},topology:"none"},ra={present:0,hidden:0},ia={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},oa=Object.keys(ia),aa=["state","volume","simulcastEncodings"],sa={androidInCallNotification:{title:"string",subt
vendor: 6,398 bytes, line 2
2itle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},ca={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string",visualState:"'default' | 'sidebar-open' | 'active'"}},la={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"}},ua=/^[a-zA-Z0-9_-]+$/;function da(e){if(null!=e&&"object"===o(e)&&!Array.isArray(e)){var t,n={},r=Ko(Object.entries(e).slice(0,10));try{for(r.s();!(t=r.n()).done;){var i=y(t.value,2),a=i[0],s=i[1];"string"!=typeof a||a.length>64||ua.test(a)&&"string"==typeof s&&(n[a]=s.slice(0,256))}}catch(e){r.e(e)}finally{r.f()}return Object.keys(n).length?n:void 0}}var pa={customIntegrations:{validate:Na,help:Da()},customTrayButtons:{validate:Fa,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(ca))},url:{validate:function(e){return"string"==typeof e},help:"url should be a string"},baseUrl:{validate:function(e){return console.warn("baseUrl is deprecated and has no effect"),"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 Ra(e,sa)},help:"reactNativeConfig should look like ".concat(JSON.stringify(sa),", all fields optional")},lang:{validate:function(e){return["cs","da","de","en-us","en","es","fi","fr","it","jp","ka","nl","no","pl","pt","pt-BR","ru","sk","sv","tr","user"].includes(e)},help:"language not supported. Options are: cs, da, de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sk, sv, tr, user"},userName:!0,userData:{validate:function(e){try{return Ea(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:wi};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:wi};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"],n=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"===o(e)&&("light"in e&&"dark"in e||"colors"in e)?"light"in e&&"dark"in e?"colors"in e.light?"colors"in e.dark?n(e.light.colors)&&n(e.dark.colors):(console.error('Dark theme is missing "colors" property.',e),!1):(console.error('Light theme is missing "colors" property.',e),!1):n(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 Ta(e,{allowAllParticipantsKey:!1})},help:La({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!!Oa(e)&&(t._inputSettings||(t._inputSettings={}),Pa(e,null===(n=t.properties)||void 0===n?void 0:n.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:xa()},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"},aboutClient:{validate:function(e){if(null==e)return!0;
vendor: 8,577 bytes, line 2
2if("object"!==o(e)||Array.isArray(e))return!1;var t=Object.entries(e);if(t.length>10)return!1;for(var n=0,r=t;n<r.length;n++){var i=y(r[n],2),a=i[0],s=i[1];if("string"!=typeof a||a.length>64)return!1;if(!ua.test(a))return!1;if("string"!=typeof s||s.length>256)return!1}return!0},help:"aboutClient must be an object with up to ".concat(10," entries; keys must be strings made up of characters (a-z, 0-9, _, -) and a max length of ").concat(64,"; values must be strings with a max length of ").concat(256)},proxy:{queryString:"proxy"},strictMode:!0,allowMultipleCallInstances:!0},fa={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)||!Ai()&&"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 a=!t&&!r.includes(o),s=!n.includes(e[o]);if(a||s)return!1}return!0};return i(e)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(Ai()?"":" | '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=y(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 a,s=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],c=Ko(o);try{for(c.s();!(a=c.n()).done;){var l=a.value;if(!s.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=y($o.validateJSONObject(o),2),d=u[0],p=u[1];if(!d)return console.error(p),!1;break;case"canAdmin":if(o instanceof Set||o instanceof Array||Array.isArray(o)){var f,h=["participants","streaming","transcription"],v=Ko(o);try{for(v.s();!(f=v.n()).done;){var g=f.value;if(!h.includes(g))return!1}}catch(e){v.e(e)}finally{v.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=v(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 ha=function(){function e(t){var n,r,o,a,s,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i(this,e),o=this,a=u(a=e),f(r=l(o,Yo()?Reflect.construct(a,[],u(o).constructor):a.apply(o,void 0)),"startListeningForDeviceChanges",function(){!function(e){xo()?function(e){Oo.has(e)||(Oo.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){Oo.has(e)&&(Oo.get(e).lastDevicesString=JSON.stringify(t),Po||(Po=function(){var e=v(function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return To(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)?To(e,t):void 0}}(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(Oo.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==Oo.get(r).lastDevicesString&&(Oo.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",Po)))}).catch(function(){}))}(e):function(e){Io.has(e)||(Io.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){Io.has(e)&&(Io.get(e).lastDevicesString=JSON.stringify(t),jo||(jo=setInterval(v(function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return Ao(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)?Ao(e,t):void 0}}(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(Io.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==Io.get(r).lastDevicesString&&(Io.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}}),3e3)))}))}(e)}(r.handleDeviceChange)}),f(r,"stopListeningForDeviceChanges",function(){!function(e){xo()?function(e){Oo.has(e)&&(Oo.delete(e),0===Oo.size&&Po&&(navigator.mediaDevices.removeEventListener("devicechange",Po),Po=null))}(e):function(e){Io.has(e)&&(Io.delete(e),0===Io.size&&jo&&(clearInterval(jo),jo=null))}(e)}(r.handleDeviceChange)}),f(r,"handleDeviceChange",function(e){e=e.map(function(e){return JSON.parse(JSON.stringify(e))}),r.emitDailyJSEvent({action:"available-devices-updated",availableDevices:e})}),f(r,"handleNativeAppStateChange",function(){var e=v(function*(e){if("destroyed"===e)return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield r.destroy());var t="active"===e;r.disableReactNativeAutoDeviceManagement("video")||(t?r.camUnmutedBeforeLosingNativeActiveState&&r.setLocalVideo(!0):(r.camUnmutedBeforeLosingNativeActiveState=r.localVideo(),r.camUnmutedBeforeLosingNativeActiveState&&r.setLocalVideo(!1)))});return function(t){return e.apply(this,arguments)}}()),f(r,"handleNativeAudioFocusChange",function(e){r.disableReactNativeAutoDeviceManagement("audio")||(r._hasNativeAudioFocus=e,r.toggleParticipantAudioBasedOnNativeAudioFocus(),r._hasNativeAudioFocus?r.micUnmutedBeforeLosingNativeAudioFocus&&r.setLocalAudio(!0):(r.micUnmutedBeforeLosingNativeAudioFocus=r.localAudio(),r.setLocalAudio(!1)))}),f(r,"handleNativeSystemScreenCaptureStop",function(){r.stopScreenShare()}),!Ni()&&!Ai())throw new Error("WebRTC not supported or suppressed");if(r.strictMode=void 0===c.strictMode||c.strictMode,r.allowMultipleCallInstances=null!==(n=c.allowMultipleCallInstances)&&void 0!==n&&n,Object.keys(Zo).length&&(r._logDuplicateInstanceAttempt(),!r.allowMultipleCallInstances)){if(r.strictMode)throw new Error("Duplicate DailyIframe instances are not allowed");
vendor: 12,506 bytes, line 2
2console.warn("Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`")}if(window._daily||(window._daily={pendings:[],instances:{}}),r.callClientId=U(),Zo[(s=r).callClientId]=s,window._daily.instances[r.callClientId]={},r._sharedTracks={},window._daily.instances[r.callClientId].tracks=r._sharedTracks,c.dailyJsVersion=e.version(),void 0!==c.aboutClient&&(c.aboutClient=da(c.aboutClient)),r._iframe=t,r._callObjectMode="none"===c.layout&&!r._iframe,r._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},void 0!==c.showLocalVideo?r._callObjectMode?console.error("showLocalVideo is not available in call object mode"):r._showLocalVideo=!!c.showLocalVideo:r._showLocalVideo=!0,void 0!==c.showParticipantsBar?r._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):r._showParticipantsBar=!!c.showParticipantsBar:r._showParticipantsBar=!0,void 0!==c.customIntegrations?r._callObjectMode?console.error("customIntegrations is not available in call object mode"):r._customIntegrations=c.customIntegrations:r._customIntegrations={},void 0!==c.customTrayButtons?r._callObjectMode?console.error("customTrayButtons is not available in call object mode"):r._customTrayButtons=c.customTrayButtons:r._customTrayButtons={},void 0!==c.activeSpeakerMode?r._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):r._activeSpeakerMode=!!c.activeSpeakerMode:r._activeSpeakerMode=!1,c.receiveSettings?r._callObjectMode?r._receiveSettings=c.receiveSettings:console.error("receiveSettings is only available in call object mode"):r._receiveSettings={},r.validateProperties(c),r.properties=Qo({},c),void 0!==r.properties.aboutClient&&(r.properties.aboutClient=da(r.properties.aboutClient)),r._inputSettings||(r._inputSettings={}),r._callObjectLoader=r._callObjectMode?new lo(r.callClientId):null,r._callState=Yr,r._isPreparingToJoin=!1,r._accessState={access:ri},r._meetingSessionSummary={},r._finalSummaryOfPrevSession={},r._meetingSessionState=Ja(na,r._callObjectMode),r._nativeInCallAudioMode=ea,r._participants={},r._isScreenSharing=!1,r._participantCounts=ra,r._rmpPlayerState={},r._waitingParticipants={},r._network={threshold:"good",quality:100,networkState:"unknown",stats:{}},r._activeSpeaker={},r._localAudioLevel=0,r._isLocalAudioLevelObserverRunning=!1,r._remoteParticipantsAudioLevel={},r._isRemoteParticipantsAudioLevelObserverRunning=!1,r._maxAppMessageSize=vi,r._messageChannel=Ai()?new eo:new Ki,r._iframe&&(r._iframe.requestFullscreen?r._iframe.addEventListener("fullscreenchange",function(){document.fullscreenElement===r._iframe?(r.emitDailyJSEvent({action:ui}),r.sendMessageToCallMachine({action:ui})):(r.emitDailyJSEvent({action:di}),r.sendMessageToCallMachine({action:di}))}):r._iframe.webkitRequestFullscreen&&r._iframe.addEventListener("webkitfullscreenchange",function(){document.webkitFullscreenElement===r._iframe?(r.emitDailyJSEvent({action:ui}),r.sendMessageToCallMachine({action:ui})):(r.emitDailyJSEvent({action:di}),r.sendMessageToCallMachine({action:di}))})),Ai()){var d=r.nativeUtils();d.addAudioFocusChangeListener&&d.removeAudioFocusChangeListener&&d.addAppStateChangeListener&&d.removeAppStateChangeListener&&d.addSystemScreenCaptureStopListener&&d.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),r._hasNativeAudioFocus=!0,d.addAudioFocusChangeListener(r.handleNativeAudioFocusChange),d.addAppStateChangeListener(r.handleNativeAppStateChange),d.addSystemScreenCaptureStopListener(r.handleNativeSystemScreenCaptureStop)}return r._callObjectMode&&r.startListeningForDeviceChanges(),r._messageChannel.addListenerForMessagesFromCallMachine(r.handleMessageFromCallMachine,r.callClientId,r),r}return p(e,k),c(e,[{key:"destroy",value:(oe=v(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),Ai()){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 Zo[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 oe.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 Ma(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:"iframe",value:function(){return Ma(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return ka(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return ka(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(e,t){for(var n in t){if(!fa[n])throw new Error("unrecognized updateParticipant property ".concat(n));if(fa[n].validate&&!fa[n].validate(t[n],this,this._participants[e]))throw new Error(fa[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:(ie=v(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ka(this._callObjectMode,"updateWaitingParticipant()"),ma(this._callState,"updateWaitingParticipant()"),"string"!=typeof t||"object"!==o(n))throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise(function(r,i){e.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:t,updates:n},function(e){e.error&&i(e.error),e.id||i(new Error("unknown error in updateWaitingParticipant()")),r({id:e.id})})})}),function(){return ie.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(re=v(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(ka(this._callObjectMode,"updateWaitingParticipants()"),ma(this._callState,"updateWaitingParticipants()"),"object"!==o(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 re.apply(this,arguments)})},{key:"requestAccess",value:(ne=v(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.access,r=void 0===n?{level:"full"}:n,i=t.name,o=void 0===i?"":i;return ka(this._callObjectMode,"requestAccess()"),ma(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 ne.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&&(Ai()?(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:(te=v(function*(e){var t=this,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).showInheritedValues,r=void 0!==n&&n;if(ka(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(o(e)){case"string":return new Promise(function(n){t.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:e,showInheritedValues:r},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 te.apply(this,arguments)})},{key:"updateReceiveSettings",value:(ee=v(function*(e){var t=this;if(ka(this._callObjectMode,"updateReceiveSettings()"),!Ta(e,{allowAllParticipantsKey:!0}))throw new Error(La({allowAllParticipantsKey:!0}));return ma(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 ee.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:Qo({},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 a="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&&!a){var s=Qo({},e.audio.processor);delete s._isDefaultWhenNone,n.audio=Qo(Qo({},n.audio),{},{processor:s})}}if(e.video){var c,l,u;e.video.settings&&(!Object.keys(e.video.settings).length&&t||(n.video={settings:Qo({},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 p=Qo({},e.video.processor);
vendor: 8,074 bytes, line 2
2delete p._isDefaultWhenNone,n.video=Qo(Qo({},n.video),{},{processor:p})}}return n}}},{key:"getInputSettings",value:function(){var e=this;return Ma(),new Promise(function(t){t(e._getInputSettings())})}},{key:"_getInputSettings",value:function(){var e,t,n,r,i,o,a={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(e=(null===(n=this._inputSettings)||void 0===n?void 0:n.video)||a,t=(null===(r=this._inputSettings)||void 0===r?void 0:r.audio)||a):(e=(null===(i=this._preloadCache)||void 0===i||null===(i=i.inputSettings)||void 0===i?void 0:i.video)||a,t=(null===(o=this._preloadCache)||void 0===o||null===(o=o.inputSettings)||void 0===o?void 0:o.audio)||a);var s={audio:t,video:e};return this._prepInputSettingsForSharing(s,!0)}},{key:"_updatePreloadCacheInputSettings",value:function(e,t){var n,r,i,o,a,s,c=this._inputSettings||{},l={};e.video?(l.video={},e.video.settings?(l.video.settings={},t||e.video.settings.customTrack||null===(i=c.video)||void 0===i||!i.settings?l.video.settings=e.video.settings:l.video.settings=Qo(Qo({},c.video.settings),e.video.settings),Object.keys(l.video.settings).length||delete l.video.settings):null!==(n=c.video)&&void 0!==n&&n.settings&&(l.video.settings=c.video.settings),e.video.processor?l.video.processor=e.video.processor:null!==(r=c.video)&&void 0!==r&&r.processor&&(l.video.processor=c.video.processor)):c.video&&(l.video=c.video),e.audio?(l.audio={},e.audio.settings?(l.audio.settings={},t||e.audio.settings.customTrack||null===(s=c.audio)||void 0===s||!s.settings?l.audio.settings=e.audio.settings:l.audio.settings=Qo(Qo({},c.audio.settings),e.audio.settings),Object.keys(l.audio.settings).length||delete l.audio.settings):null!==(o=c.audio)&&void 0!==o&&o.settings&&(l.audio.settings=c.audio.settings),e.audio.processor?l.audio.processor=e.audio.processor:null!==(a=c.audio)&&void 0!==a&&a.processor&&(l.audio.processor=c.audio.processor)):c.audio&&(l.audio=c.audio),this._maybeUpdateInputSettings(l)}},{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:(Z=v(function*(e){var t=this;return Ma(),Oa(e)?e.video||e.audio?(Pa(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(xa()),Promise.reject(xa()))}),function(e){return Z.apply(this,arguments)})},{key:"setBandwidth",value:function(e){var t=e.kbs,n=e.trackConstraints;if(Ma(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:t,trackConstraints:n}),this}},{key:"getDailyLang",value:function(){var e=this;if(Ma(),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 Ma(),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[ti,ni].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(K=v(function*(){var e=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),ma(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 K.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return ma(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"replace";ka(this._callObjectMode,"setMeetingSessionData()"),ma(this._callState,"setMeetingSessionData");try{!function(e,t){new io({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:Ai()||!!t&&!!t.thisMeetingOnly},function(e){delete e.action,delete e.callbackStamp,r(e)})})}},{key:"setUserData",value:(Y=v(function*(e){var t=this;try{Ea(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 Y.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&&!Ai())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:(H=v(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(ka(this._callObjectMode,"startCamera()"),ba(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or set
2LocalVideo() 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=Qo(Qo({},this.properties),t)}return new Promise(function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:"start-camera",properties:ga(e.properties,e.callClientId),preloadCache:ga(e._preloadCache,e.callClientId)},function(e){e.error?n(e.error):t({camera:e.camera,mic:e.mic,speaker:e.speaker})})})}),function(){return H.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&&["audio","video","cam-audio","cam-video","screenVideo","screenAudio","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: audio, video, cam-audio, cam-video, screenVideo, screenAudio, screen-video, screen-audio, rmpAudio, rmpVideo, customVideoDefaults");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,mode,trackName,ignoreAudioLevel};return Ma(),ma(this._callState,"startCustomTrack()"),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise(function(n,r){e._sharedTracks.customTrack=t.track,t.track=wi,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 Ma(),ma(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 Ca(),_a(this._callMachineInitialized,"setCamera()"),new Promise(function(n){t.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:e},function(e){n({device:e.device})})})}},{key:"setAudioDevice",value:(q=v(function*(e){return Ca(),this.nativeUtils().setAudioDevice(e),{deviceId:yield this.nativeUtils().getAudioDevice()}}),function(e){return q.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 Ma(),new Promise(function(t){e.sendMessageToCallMachine({action:"cycle-mic"},function(e){t({device:e.device})})})}},{key:"getCameraFacingMode",value:function(){var e=this;return Ca(),new Promise(function(t){e.sendMessageToCallMachine({action:"get-camera-facing-mode"},function(e){t(e.facingMode)})})}},{key:"setInputDevicesAsync",value:(J=v(function*(e){var t=this,n=e.audioDeviceId,r=e.videoDeviceId,i=e.audioSource,o=e.videoSource;if(Ma(),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 a={};return n&&(n instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=n,n=wi,a.audio={settings:{customTrack:n}}):(delete this._sharedTracks.audioTrack,a.audio={settings:{deviceId:n}})),r&&(r instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=r,r=wi,a.video={settings:{customTrack:r}}):(delete this._sharedTracks.videoTrack,a.video={settings:{deviceId:r}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(a,!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(a,!1),void e(t._devicesFromInputSettings(t._inputSettings));e(n)})})}),function(e){return J.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(V=v(function*(e){var t=this,n=e.outputDeviceId;
vendor: 4,441 bytes, line 2
2if(Ma(),!n||"string"!=typeof n)throw new Error("outputDeviceId must be provided and must be a valid device id");return this._preloadCache.outputDeviceId=n,this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(e,r){t.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:n},function(n){if(delete n.action,delete n.callbackStamp,n.error){var i=new Error(n.error.message);return i.type=n.error.type,void r(i)}n.returnPreloadCache?e(t._devicesFromInputSettings(t._inputSettings)):e(n)})})}),function(e){return V.apply(this,arguments)})},{key:"getInputDevices",value:(B=v(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 B.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return Ca(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(e){if(Ca(),[ea,ta].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement("audio")&&ya(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",e)}},{key:"preAuth",value:(N=v(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(ka(this._callObjectMode,"preAuth()"),ba(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=Qo(Qo({},this.properties),t),new Promise(function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:"daily-method-preauth",properties:ga(e.properties,e.callClientId),preloadCache:ga(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 N.apply(this,arguments)})},{key:"load",value:(F=v(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=Qo(Qo({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");if(this._updateCallState(Kr),this.emitDailyJSEvent({action:"loading"}),this._callObjectMode)return 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(Xr),n&&t.emitDailyJSEvent({action:si}),e()},function(e,r){t.emitDailyJSEvent({action:"load-attempt-failed"}),r||(t._handleFatalError({action:hi,errorMsg:e.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:e,bundleUrl:Q(t.properties.dailyConfig)}}}),n(e.msg))})});var n=X(this.assembleMeetingUrl(),this.properties.dailyConfig);return new Promise(function(e,r){var i=0,o=function(){if(i>=n.length){var a="Timed out attempting to load the call. Please check your network connection and try again.";return t._iframe.srcdoc=(s=a,'<!DOCTYPE html>\n<html>\n<head>\n<meta charset="utf-8">\n<style>\n  html { font-size: 12px; }\n  * { box-sizing: border-box; margin: 0; padding: 0; }\n  body {\n    background: #1f2d3d;\n    color: #fff;\n    font-family: GraphikRegular, "Helvetica Neue", Helvetica, Arial, sans-serif;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    height: 100vh;\n  }\n  .card {\n    background: #121a24;\n    border: 1px solid #2b3f56;\n    border-radius: 4px;\n    padding: 32px 40px;\n    width: 100%;\n    max-width: 65ch;\n    text-align: center;\n  }\n  h1 { color: #f63135; font-size: 1.333rem; font-weight: 600; margin-bottom: 12px; }\n  p { font-size: 1rem; line-height: 1.5; color: rgba(255,255,255,0.9); }\n</style>\n</head>\n<body>\n<div class="card"><h1>'.concat("Failed to load","</h1><p>").concat(s,"</p></div>\n</body>\n</html>
2")),t._handleFatalError({action:hi,errorMsg:a,error:{type:"connection-error",msg:a,details:{on:"load",sourceError:{msg:"Timed out (>".concat(25e3," ms) when loading call frame"),type:"timeout"},candidateCount:n.length}},preserveIframe:!0}),void r(a)}var s,c=n[i++];t._iframe.src=G(c,t.properties.dailyConfig);var l=setTimeout(function(){t._loadedCallback&&(t._loadedCallback=null,o())},25e3);t._loadedCallback=function(n){clearTimeout(l),t._callState!==ni?(z(W(c)),t._updateCallState(Xr),(t.properties.cssFile||t.properties.cssText)&&t.loadCss(t.properties),e()):r(n)}};o()})}}),function(e){return F.apply(this,arguments)})},{key:"join",value:(D=v(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._testCallInProgress&&this.stopTestCallQuality(),!t.url&&!this.properties.url){var n="No room URL has been provided";return console.error(n),Promise.reject(new Error(n))}var r=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(t)}catch(e){return this.updateIsPreparingToJoin(!1),Promise.reject(e)}}else{if(r=!(!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=Qo(Qo({},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===ei||this._callState===Zr?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(Zr,!1),this.emitDailyJSEvent({action:"joining-meeting"}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:"join-meeting",properties:ga(this.properties,this.callClientId),preloadCache:ga(this._preloadCache,this.callClientId)},function(t){t.error&&e._joinedCallback&&(e._joinedCallback(null,t.error),e._joinedCallback=null)}),new Promise(function(t,n){e._joinedCallback=function(i,o){if(e._callState!==ni){if(o)return e._updateCallState(ti),void n(o);if(e._updateCallState(ei),i)for(var a in i){if(e._callObjectMode){var s=e._callMachine().store;So(i[a],s),Mo(i[a],s),Eo(i[a],e._participants[a],s)}e._participants[a]=Qo({},i[a]),e.toggleParticipantAudioBasedOnNativeAudioFocus()}r&&e.loadCss(e.properties),t(i)}else n(o)}}))}),function(){return D.apply(this,arguments)})},{key:"leave",value:(L=v(function*(){var e=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise(function(t){e._callState===ti||e._callState===ni?t():e._callObjectLoader&&!e._callObjectLoader.loaded?(e._callObjectLoader.cancel(),e._updateCallState(ti),e.resetMeetingDependentVars(),e.emitDailyJSEvent({action:ti}),t()):(e._resolveLeave=t,e.sendMessageToCallMachine({action:"leave-meeting"}))})}),function(){return L.apply(this,arguments)})},{key:"startScreenShare",value:(x=v(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(_a(this._callMachineInitialized,"startScreenShare()"),t.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",t.screenVideoSendSettings),t.mediaStream&&(this._sharedTracks.screenMediaStream=t.mediaStream,t.mediaStream=wi),"undefined"!=typeof DailyNativeUtils&&void 0!==DailyNativeUtils.isIOS&&DailyNativeUtils.isIOS){var n=this.nativeUtils();if(yield n.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:fi,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:yi,captureOptions:t})}),n.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:yi,captureOptions:t})}),function(){return x.apply(this,arguments)})},{key:"stopScreenShare",value:function(){_a(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&&"cloud-audio-only"!==t&&"raw-tracks"!==t&&"local"!==t)throw new Error("invalid type: ".concat(t,", allowed values 'cloud', 'cloud-audio-only', 'raw-tracks', or 'local'"));this.sendMessageToCallMachine(Qo({action:"local-recording-start"},e))}},{key:"updateRecording",value:function(e){var t=e.layout,n=void 0===t?{preset
2:"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(Qo({action:"local-recording-stop"},e))}},{key:"startLiveStreaming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(Qo({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:bi,endpointsOp:"add-endpoints",endpoints:t,instanceId:n})}},{key:"removeLiveStreamingEndpoints",value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:bi,endpointsOp:"remove-endpoints",endpoints:t,instanceId:n})}},{key:"stopLiveStreaming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};
vendor: 4,124 bytes, line 2
2this.sendMessageToCallMachine(Qo({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."),Ri()&&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(!Va(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(oa.includes(o)){if("number"!=typeof i[o])throw new Error("".concat(o," must be a number"));if(t){var a=t[o],s=a.min,c=a.max;if(!Va(i[o],s,c))throw new Error("".concat(o," value not in range. valid range: ").concat(s," to ").concat(c))}}else if(!["active","scalabilityMode"].includes(o))throw new Error("Invalid key ".concat(o,", valid keys are:")+Object.values(oa));if(n&&!i.hasOwnProperty("maxBitrate"))throw new Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(j=v(function*(e){var t=this,n=e.url,r=e.settings,i=void 0===r?{state:Mi.PLAY}:r;try{!function(e){if("string"!=typeof e)throw new Error('url parameter must be "string" type')}(n),Ua(i),function(e){for(var t in e)if(!aa.includes(t))throw new Error("Invalid key ".concat(t,", valid keys are: ").concat(aa));e.simulcastEncodings&&this.validateSimulcastEncodings(e.simulcastEncodings,ia,!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 j.apply(this,arguments)})},{key:"stopRemoteMediaPlayer",value:(I=v(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 I.apply(this,arguments)})},{key:"updateRemoteMediaPlayer",value:(A=v(function*(e){var t=this,n=e.session_id,r=e.settings;try{Ua(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 A.apply(this,arguments)})},{key:"startTranscription",value:function(e){ma(this._callState,"startTranscription()"),this.sendMessageToCallMachine(Qo({action:"daily-method-start-transcription"},e))}},{key:"updateTranscription",value:function(e){if(ma(this._callState,"updateTranscription()"),!e)throw new Error("updateTranscription Error: options is mandatory");if("object"!==o(e))throw new Error("updateTranscription Error: options must be object type");if(e.participants&&!Array.isArray(e.participants))throw new Error("updateTranscription 
2Error: participants must be an array");this.sendMessageToCallMachine(Qo({action:"daily-method-update-transcription"},e))}},{key:"stopTranscription",value:function(e){if(ma(this._callState,"stopTranscription()"),e&&"object"!==o(e))throw new Error("stopTranscription Error: options must be object type");if(e&&!e.instanceId)throw new Error('"instanceId" not provided');this.sendMessageToCallMachine(Qo({action:"daily-method-stop-transcription"},e))}},{key:"startDialOut",value:(P=v(function*(e){var t=this;ma(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");if(void 0!==e.videoSettings){if("object"!==o(e.videoSettings)||null===e.videoSettings)throw new Error("Error starting dial out: videoSettings must be an object");if(!e.video)throw new Error("Error starting dial out: videoSettings provided but video is not enabled");var r=e.videoSettings;if(void 0!==r.width){if(!Number.isInteger(r.width)||r.width<=0)throw new Error("Error starting dial out: videoSettings.width must be a positive integer");if(r.width>1280)throw new Error("Error starting dial out: videoSettings.width must be less than or equal to 1280")}if(void 0!==r.height){if(!Number.isInteger(r.height)||r.height<=0)throw new Error("Error starting dial out: videoSettings.height must be a positive integer");if(r.height>720)throw new Error("Error starting dial out: videoSettings.height must be less than or equal to 720")}if(void 0!==r.fps){if(!Number.isInteger(r.fps)||r.fps<=0)throw new Error("Error starting dial out: videoSettings.fps must be a positive integer");if(r.fps>30)throw new Error("Error starting dial out: videoSettings.fps must be less than or equal to 30")}if(void 0!==r.videoBitrate){if(!Number.isInteger(r.videoBitrate)||r.videoBitrate<=0)throw new Error("Error starting dial out: videoSettings.videoBitrate must be a positive integer");if(r.videoBitrate>1e3)throw new Error("Error starting dial out: videoSettings.videoBitrate must be less than or equal to 1000 kbps")}}!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>
vendor: 20,786 bytes, line 2
2=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")}if(va(e),e.permissions&&e.permissions.canReceive){var i=y($o.validateJSONObject(e.permissions.canReceive),2),a=i[0],s=i[1];if(!a)throw new Error(s)}if(e.provider){if(e.provider!==Ci&&e.provider!==Ei)throw new Error("Error: provider can be set only to '".concat(Ci,"' or '").concat(Ei,"', got: ").concat(e.provider));if(e.phoneNumber)throw new Error("Error starting dial out: provider valid only for sipUri, not phoneNumber");e.provider===Ci&&console.warn("(pre-beta) provider=".concat(Ci," is currently in pre-beta, things might break!"))}else e.provider=Ei;return new Promise(function(n,r){t.sendMessageToCallMachine(Qo({action:"dialout-start"},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return P.apply(this,arguments)})},{key:"startDialIn",value:(O=v(function*(e){var t=this;if(ma(this._callState,"startDialIn()"),!e||"object"!==o(e))throw new Error("Error starting dial in: args must be an object");if("string"!=typeof e.displayName||0===e.displayName.length)throw new Error("Error starting dial in: displayName is required and must be a non-empty string");if(e.displayName.length>=200)throw new Error("Error starting dial in: displayName length must be less than 200");if(void 0!==e.userId&&"string"!=typeof e.userId)throw new Error("Error starting dial in: userId must be a string");if(void 0!==e.userId&&e.userId.length>36)throw new Error("Error starting dial in: userId length must be less than or equal to 36");if(void 0!==e.video&&"boolean"!=typeof e.video)throw new Error("Error starting dial in: video must be a boolean");if(void 0!==e.sipEndpoint&&"string"!=typeof e.sipEndpoint)throw new Error("Error starting dial in: sipEndpoint must be a string");if(void 0!==e.codecs&&("object"!==o(e.codecs)||null===e.codecs))throw new Error("Error starting dial in: codecs must be an object");if(void 0!==e.permissions&&("object"!==o(e.permissions)||null===e.permissions))throw new Error("Error starting dial in: permissions must be an object");if(e.provider){if(e.provider!==Ci&&e.provider!==Ei)throw new Error("Error starting dial in: provider must be '".concat(Ci,"' or '").concat(Ei,"'"))}else e=Qo(Qo({},e),{},{provider:Ei});return new Promise(function(n,r){t.sendMessageToCallMachine(Qo({action:"dialin-start",sipMode:"dial-in"},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return O.apply(this,arguments)})},{key:"stopDialOut",value:function(e){var t=this;return ma(this._callState,"stopDialOut()"),new Promise(function(n,r){t.sendMessageToCallMachine(Qo({action:"dialout-stop"},e),function(e){e.error?r(e.error):n(e)})})}},{key:"sipCallTransfer",value:(T=v(function*(e){var t=this;if(ma(this._callState,"sipCallTransfer()"),!e)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return e.useSipRefer=!1,Ba(e,"sipCallTransfer"),va(e),new Promise(function(n,r){t.sendMessageToCallMachine(Qo({action:Oi},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return T.apply(this,arguments)})},{key:"sipRefer",value:(E=v(function*(e){var t=this;if(ma(this._callState,"sipRefer()"),!e)throw new Error("sessionId and toEndPoint are mandatory parameter");return e.useSipRefer=!0,Ba(e,"sipRefer"),new Promise(function(n,r){t.sendMessageToCallMachine(Qo({action:Oi},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return E.apply(this,arguments)})},{key:"sendDTMF",value:(M=v(function*(e){var t=this;return ma(this._callState,"sendDTMF()"),function(e){var t=e.sessionId,n=e.tones,r=e.method,i=e.digitDurationMs;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 o=n.match(/[^0-9A-D*#]/g);if(o&&o[0])throw new Error("".concat(o[0]," is not valid DTMF tone"));if(r&&!["sip-info","telephone-event","auto"].includes(r))throw new Error("method must be one of 'sip-info', 'telephone-event', or 'auto'");if(void 0!==i){if("number"!=typeof i)throw new Error("digitDurationMs must be a number");if(!Number.isFinite(i)||!Number.isInteger(i))throw new Error("digitDurationMs must be a finite integer number");if(i<50||i>2e3)throw new Error("digitDurationMs must be between 50ms and 2000ms")}}(e),e.method=e.method||"auto",e.digitDurationMs=e.digitDurationMs||500,new Promise(function(n,r){t.sendMessageToCallMachine(Qo({action:"send-dtmf"},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return M.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var e=this;return this._callState!==ei?Promise.resolve(Qo({stats:{latest:{}}},this._network)):new Promise(function(t){e.sendMessageToCallMachine({action:"get-calc-stats"},function(n){t(Qo(Qo({},e._network),{},{stats:n.stats}))})})}},{key:"testWebsocketConnectivity",value:(S=v(function*(){var e=this;if(wa(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?!!function(e){return e&&"live"===e.readyState&&!function(e,t){return(!t.isLocalScreenVideo||"Chrome"!==Ui())&&e.muted&&!Lo.has(e.id)}(e,{isLocalScreenVideo:false})}(e)||(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=v(function*(){var e=this;Ma(),ka(this._callObjectMode,"testCallQuality()"),_a(this._callMachineInitialized,"testCallQuality()",null,!0),ba(this._callState,this._isPreparingToJoin,"testCallQuality()");var t=this._testCallAlreadyInProgress,n=function(n){t||(e._testCallInProgress=n)};if(n(!0),this.needsLoad())try{var i=this._callState;yield this.load(),this._callState=i}catch(e){return n(!1),Promise.reject(e)}return new Promise(function(t){e.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:e.properties.dailyJsVersion},function(i){var o=i.results,a=o.result,s=r(o,Wo);if("failed"===a){var c,l=Qo({},s);null!==(c=s.error)&&void 0!==c&&c.details?(s.error.details=JSON.parse(s.error.details),l.error=Qo(Qo({},l.error),{},{details:Qo({},l.error.details)}),l.error.details.duringTest="testCallQuality"):(l.error=l.error?Qo({},l.error):{},l.error.details={duringTest:"testCallQuality"}),e._maybeSendToSentry(l)}n(!1),t(Qo({result:a},s))})})}),function(){return w.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(_=v(function*(e){var t;Ai()?(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=v(function*(e){var t=this;if(wa(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(){Ai()?(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:(m=v(function*(e){var t=this;if(wa(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 m.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){e._callState===ei?e.sendMessageToCallMachine({action:"get-cpu-load-stats"},function(e){t(e.cpuStats)}):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(oa))}},{key:"_validateVideoSendSettings",value:function(e,t){var n="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"],r="Video send settings should be either an object or one of the supported presets: ".concat(n.join());if("string"==typeof t){if(!n.includes(t))throw new Error(r)}else{if("object"!==o(t))throw new Error(r);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 i=!1;switch(Object.keys(t.encodings).length){case 1:i=!t.encodings.low;break;case 2:i=!t.encodings.low||!t.encodings.medium;break;case 3:i=!t.encodings.low||!t.encodings.medium||!t.encodings.high;break;default:i=!0}if(i)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=y(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 Ma(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(e){return Ma(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:e}),this}},{key:"activeSpeakerMode",value:function(){return Ma(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(e){return ma(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:(g=v(function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return"Firefox"===Ui()&&Vi().major>115&&Vi().major<123&&(t=t.filter(function(e){return"audiooutput"!==e.kind})),{devices:t.map(function(e){var t=JSON.parse(JSON.stringify(e));if(!Ai()&&"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 g.apply(this,arguments)})},{key:"sendAppMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*";if(ma(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 Ma(),ma(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(Qo({action:"add-fake-participant"},e)),this}},{key:"setShowNamesMode",value:function(e){return Sa(this._callObjectMode,"setShowNamesMode()"),Ma(),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 Sa(this._callObjectMode,"setShowLocalVideo()"),Ma(),ma(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 Sa(this._callObjectMode,"showLocalVideo()"),Ma(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return Sa(this._callObjectMode,"setShowParticipantsBar()"),Ma(),ma(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 Sa(this._callObjectMode,"showParticipantsBar()"),Ma(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return Ma(),Sa(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(e){return Ma(),Sa(this._callObjectMode,"setCustomIntegrations()"),ma(this._callState,"setCustomIntegrations()"),Na(e)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:e}),this._customIntegrations=e,this):this}},{key:"startCustomIntegrations",value:function(e){var t=this;if(Ma(),Sa(this._callObjectMode,"startCustomIntegrations()"),ma(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(Ma(),Sa(this._callObjectMode,"stopCustomIntegrations()"),ma(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 Sa(this._callObjectMode,"customTrayButtons()"),Ma(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(e){return Sa(this._callObjectMode,"updateCustomTrayButtons()"),Ma(),ma(this._callState,"updateCustomTrayButtons()"),Fa(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(ca))),this)}},{key:"theme",value:function(){return Sa(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(e){var t=this;return Sa(this._callObjectMode,"setTheme()"),new Promise(function(n,r){try{t.validateProperties({theme:e}),t.properties.theme=Qo({},e),t.sendMessageToCallMachine({action:"set-theme",theme:t.properties.theme});try{t.emitDailyJSEvent({action:"theme-updated",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:(h=v(function*(){if(Ma(),this._iframe&&!document.fullscreenElement&&ji())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(e){console.log("could not make video call fullscreen",e)}}),function(){return h.apply(this,arguments)})},{key:"exitFullscreen",value:function(){Ma(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(d=v(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 d.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:(s=v(function*(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).includeRoomConfigDefaults,n=void 0===t||t;return this._accessState.access===ri||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 s.apply(this,arguments)})},{key:"geo",value:(a=v(function*(){return console.error("The geo() function is no longer supported. Geographical decisions now depend upon domain and room settings."),{current:""}}),function(){return a.apply(this,arguments)})},{key:"setNetworkTopology",value:(n=v(function*(e){var t=this;return Ma(),ma(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 n.apply(this,arguments)})},{key:"getNetworkTopology",value:(t=v(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 t.apply(this,arguments)})}
vendor: 1,750 bytes, line 2
2,{key:"setPlayNewParticipantSound",value:function(e){if(Ma(),"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 k.prototype.on.call(this,e,t)}},{key:"once",value:function(e,t){return k.prototype.once.call(this,e,t)}},{key:"off",value:function(e,t){return k.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;Ai()||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=Qo(Qo({},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 a,s;Ai()||console.warn("userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.");var c=e.inputSettings||{};c.video=(null===(a=e.inputSettings)||void 0===a?void 0:a.video)||{},c.video.settings=(null===(s=e.inputSettings)||void 0===s||null===(s=s.video)||void 0===s?void 0:s.settings)||{},c.video.settings=Qo(Qo({},c.video.settings),e.dailyConfig.userMediaVideoConstraints),e.inputSettings=c,delete e.dailyConfig.userMediaVideoConstraints}
2for(var l in e)if(pa[l]){if(pa[l].validate&&!pa[l].validate(e[l],this))throw new Error("property '".concat(l,"': ").concat(pa[l].help))}else console.warn("Ignoring unrecognized property '".concat(l,"'")),delete e[l]}},{key:"assembleMeetingUrl",value:function(){var e,t,n=Qo(Qo({},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(pa).filter(function(e){return pa[e].queryString&&void 0!==n[e]}).map(function(e){return"".concat(pa[e].queryString,"=").concat(n[e])}).join("&")}},{key:"needsLoad",value:function(){return[Yr,Kr,ti,ni].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(e){switch(e.action){case"iframe-ready-for-launch-config":this.sendMessageToCallMachine(Qo({action:"iframe-launch-config"},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var t=$(),n={action:_i,level:"log",code:1011,stats:{event:"bundle load",time:"no-op"===this._bundleLoadTime?0:this._bundleLoadTime,preLoaded:"no-op"===this._bundleLoadTime,url:Q(this.properties.dailyConfig),resolvedBaseDomain:t,failedOver:null!=t&&"daily.co"!==t}};this.sendMessageToCallMachine(n),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case si:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(e);break;case"joined-meeting":var r,i=Qo({},e);delete i.internal,this._maxAppMessageSize=(null===(r=e.internal)||void 0===r?void 0:r._maxAppMessageSize)||vi,this._joinedCallback&&(this._joinedCallback(e.participants),this._joinedCallback=null),this.emitDailyJSEvent(i);break;case"participant-joined":case"participant-updated":if(this._callState===ti)return;if(e.participant&&e.participant.session_id){var o=e.participant.local?"local":e.participant.session_id;if(this._callObjectMode){var a=this._callMachine().store;So(e.participant,a),Mo(e.participant,a),Eo(e.participant,this._participants[o],a)}try{this.maybeParticipantTracksStopped(this._participants[o],e.participant),this.maybeParticipantTracksStarted(this._participants[o],e.participant),this.maybeEventRecordingStopped(this._participants[o],e.participant),this.maybeEventRecordingStarted(this._participants[o],e.participant)}catch(e){console.error("track events error",e)}this.compareEqualForParticipantUpdateEvent(e.participant,this._participants[o])||(this._participants[o]=Qo({},e.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(e))}break;case"participant-left":if(e.participant&&e.participant.session_id){var s=this._participants[e.participant.session_id];s&&this.maybeParticipantTracksStopped(s,null),delete this._participants[e.participant.session_id],this.emitDailyJSEvent(e)}break;case"participant-counts-updated":C(this._participantCounts,e.participantCounts)||(this._participantCounts=e.participantCounts,this.emitDailyJSEvent(e));break;case"access-state-updated":var c={access:e.access};e.awaitingAccess&&(c.awaitingAccess=e.awaitingAccess),C(this._accessState,c)||(this._accessState=c,this.emitDailyJSEvent(e));break;case"meeting-session-summary-updated":if(e.meetingSession){this._meetingSessionSummary=e.meetingSession,this.emitDailyJSEvent(e);
2var l=Qo(Qo({},e),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(l)}break;case hi:this._handleFatalError(e);break;case"left-meeting":this._callState!==ni&&this._updateCallState(ti),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(e);break;case"selected-devices-updated":e.devices&&this.emitDailyJSEvent(e);break;case"network-quality-change":var u=e.state,d=e.threshold,p=e.quality,f=u.state,h=u.reasons;f===this._network.networkState&&C(h,this._network.networkStateReasons)&&d===this._network.threshold&&p===this._network.quality||(this._network.networkState=f,this._network.networkStateReasons=h,this._network.quality=p,this._network.threshold=d,e.networkState=f,h.length&&(e.networkStateReasons=h),delete e.state,this.emitDailyJSEvent(e));break;case"cpu-load-change":e&&e.cpuLoadState&&this.emitDailyJSEvent(e);break;case"face-counts-updated":e&&void 0!==e.faceCounts&&this.emitDailyJSEvent(e);break;case"active-speaker-change":var v=e.activeSpeaker;this._activeSpeaker.peerId!==v.peerId&&(this._activeSpeaker.peerId=v.peerId,this.emitDailyJSEvent({action:e.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var g=e.show;this._showLocalVideo=g,this.emitDailyJSEvent({action:e.action,show:g});break;case"active-speaker-mode-change":var m=e.enabled;this._activeSpeakerMode!==m&&(this._activeSpeakerMode=m,this.emitDailyJSEvent({action:e.action,enabled:this._activeSpeakerMode}));break;case"waiting-participant-added":case"waiting-participant-updated":case"waiting-participant-removed":this._waitingParticipants=e.allWaitingParticipants,this.emitDailyJSEvent({action:e.action,participant:e.participant});break;case"receive-settings-updated":C(this._receiveSettings,e.receiveSettings)||(this._receiveSettings=e.receiveSettings,this.emitDailyJSEvent({action:e.action,receiveSettings:e.receiveSettings}));break;case pi:this._maybeUpdateInputSettings(e.inputSettings);break;case"send-settings-updated":C(this._sendSettings,e.sendSettings)||(this._sendSettings=e.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:e.action,sendSettings:e.sendSettings}));break;case"local-audio-level":this._localAudioLevel=e.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=e.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case"remote-media-player-started":var y=e.session_id;this._rmpPlayerState[y]=e.playerState,this.emitDailyJSEvent(e);break;case"remote-media-player-stopped":delete this._rmpPlayerState[e.session_id],this.emitDailyJSEvent(e);break;case"remote-media-player-updated":var b=e.session_id,_=this._rmpPlayerState[b];_&&this.compareEqualForRMPUpdateEvent(_,e.remoteMediaPlayerState)||(this._rmpPlayerState[b]=e.remoteMediaPlayerState,this.emitDailyJSEvent(e));break;case"custom-button-click":case"sidebar-view-changed":case"pip-started":case"pip-stopped":this.emitDailyJSEvent(e);break;case"meeting-session-state-updated":var w=this._meetingSessionState.topology!==(e.meetingSessionState&&e.meetingSessionState.topology);this._meetingSessionState=Ja(e.meetingSessionState,this._callObjectMode),(this._callObjectMode||w)&&this.emitDailyJSEvent(e);break;case"local-screen-share-started":this._isScreenSharing=!0,this.emitDailyJSEvent(e);break;case"local-screen-share-stopped":case"local-screen-share-canceled":this._isScreenSharing=!1,this.emitDailyJSEvent(e);break;case ci:case li:case"recording-stats":case"recording-error":case"recording-upload-completed":case"transcription-started":case"transcription-stopped":case"transcription-error":case"started-camera":case"camera-error":case"app-message":case"transcription-message":case"test-completed":case"network-connection":case"recording-data":case"live-streaming-started":case"live-streaming-updated":case"live-streaming-stopped":case"live-streaming-error":case fi:case"lang-updated":case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dtmf-event":case"dialout-answered":case"dialout-error":case"dialout-stopped":case"dialout-warning":this.emitDailyJSEvent(e);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:li}))}},{key:"maybeEventRecordingStarted",value:function(e,t){var n="record";e&&(t.local||!0!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:ci}))}},{key:"_trackStatePlayable",value:function(e){return!(!e||"playable"!==e.state)}},{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,a=null!==(i=null==n?void 0:n.tracks[e])&&void 0!==i?i:null,
vendor: 2,436 bytes, line 2
2s=null==o?void 0:o.track;if(s){var c=this._trackStatePlayable(o),l=this._trackStatePlayable(a),u=this._trackChanged(s,null==a?void 0:a.track);c&&(l&&!u||this.emitDailyJSEvent({action:"track-stopped",track:s,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,a=null!==(i=null==n?void 0:n.tracks[e])&&void 0!==i?i:null,s=null==a?void 0:a.track;if(s){var c=this._trackStatePlayable(o),l=this._trackStatePlayable(a),u=this._trackChanged(null==o?void 0:o.track,s);l&&(c&&!u||this.emitDailyJSEvent({action:"track-started",track:s,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!(!C(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 Ai()?"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===ei;this.updateShowAndroidOngoingMeetingNotification(i);var o=ya(n,r),a=ya(this._callState,this._isPreparingToJoin);o!==a&&(this.updateKeepDeviceAwake(a),this.updateDeviceAudioMode(a),this.updateNoOpRecordingEnsuringBackgroun
vendor: 2,062 bytes, line 2
2dContinuity(a))}}},{key:"_handleFatalError",value:function(e){var t;this._iframe&&!e.preserveIframe&&(this._iframe.src=""),this._updateCallState(ni),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(e.errorMsg),this._loadedCallback=null),e.preserveIframe;var n=r(e,Go);"string"==typeof(null==n||null===(t=n.error)||void 0===t?void 0:t.details)&&(n.error.details=JSON.parse(n.error.details)),this._maybeSendToSentry(e),this._joinedCallback&&(this._joinedCallback(null,n),this._joinedCallback=null),this.emitDailyJSEvent(n)}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=ra,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:ri},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Ja(na,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=vi,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(e){Ai()&&this.nativeUtils().setKeepDeviceAwake(e,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(e){if(Ai()&&!this.disableReactNativeAutoDeviceManagement("audio")){var t=e?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(t)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(e){if(Ai()&&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)}}}
vendor: 5,968 bytes, line 2
2,{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(e){Ai()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var e;if(Ai()){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(Zo)[0];if(this.needsLoad())if(e&&!e.needsLoad()){var t={action:_i,level:"error",code:this.strictMode?9995:9997};e.sendMessageToCallMachine(t)}else 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:_i,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(Zo);e<t.length;e++){var n=t[e];n._callMachineInitialized?(n.sendMessageToCallMachine({action:_i,level:"warn",code:this.allowMultipleCallInstances?9993:9992}),n._delayDuplicateInstanceLog=!1):n._delayDuplicateInstanceLog=!0}}},{key:"_maybeSendToSentry",value:function(t){var n,r,i,o,a;if(null!==(n=t.error)&&void 0!==n&&n.type){if(![ai,oi,ii].includes(t.error.type))return;if(t.error.type===ii&&t.error.msg.includes("deleted"))return}var s=null!==(r=this.properties)&&void 0!==r&&r.url?new URL(this.properties.url):void 0,c="production";s&&s.host.includes(".staging.daily")&&(c="staging");var l,u,d,p,f,h=function(){const e=[Dn(),xn(),Vr(),Br(),Wr(),Qr(),$n(),{name:"HttpContext",preprocessEvent(e){if(!er.navigator&&!er.location&&!er.document)return;const t=e.request&&e.request.url||er.location&&er.location.href,{referrer:n}=er.document||{},{userAgent:r}=er.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}}];return!1!=={}.autoSessionTracking&&e.push({name:"BrowserSession",setupOnce(){void 0!==er.document?(gn({ignoreDuration:!0}),bn(),Mr(({from:e,to:t})=>{void 0!==e&&e!==t&&(gn({ignoreDuration:!0}),bn())})):ir&&ce.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),e}().filter(function(e){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(e.name)}),v=new vr({dsn:"https://[email protected]/168844",transport:Ar,stackParser:Nr,integrations:h,environment:c}),g=new wt;if(g.setClient(v),v.init(),(null===(i=this._participants)||void 0===i||null===(i=i.local)||void 0===i?void 0:i.session_id)&&g.setExtra("sessionId",this._participants.local.session_id),this.properties){var m=Qo({},this.properties);m.userName=m.userName?"[Filtered]":void 0,m.userData=m.userData?"[Filtered]":void 0,m.token=m.token?"[Filtered]":void 0,g.setExtra("properties",m)}if(s){var y=s.searchParams.get("domain");if(!y){var b=s.host.match(/(.*?)\./);y=b&&b[1]||""}y&&g.setTag("domain",y)}t.error&&(g.setTag("fatalErrorType",t.error.type),g.setExtra("errorDetails",t.error.details),(null===(l=t.error.details)||void 0===l?void 0:l.uri)&&g.setTag("serverAddress",t.error.details.uri),(null===(u=t.error.details)||void 0===u?void 0:u.workerGroup)&&g.setTag("workerGroup",t.error.details.workerGroup),(null===(d=t.error.details)||void 0===d?void 0:d.geoGroup)&&g.setTag("geoGroup",t.error.details.geoGroup),(null===(p=t.error.details)||void 0===p?void 0:p.on)&&g.setTag("connectionAttempt",t.error.details.on),null!==(f=t.error.details)&&void 0!==f&&f.bundleUrl&&(g.setTag("bundleUrl",t.error.details.bundleUrl),g.setTag("bundleError",t.error.details.sourceError.type))),g.setTags({callMode:this._callObjectMode?Ai()?"reactNative":null!==(o=this.properties)&&void 0!==o&&null!==(o=o.dailyConfig)&&void 0!==o&&null!==(o=o.callMode)&&void 0!==o&&o.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:e.version()});var _=(null===(a=t.error)||void 0===a?void 0:a.msg)||t.errorMsg;g.captureException(new Error(_))}},{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(!C(this._inputSettings,e)){var t=this._getInputSettings();this._inputSettings=e;var n=this._getInputSettings();C(t,n)||this.emitDailyJSEvent({action:pi,inputSettings:n})}}}],[{key:"supportedBrowser",value:function(){if(Ai())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var e=R.getParser(Pi());return{supported:!!Ni(),mobile:"mobile"===e.getPlatformType(),name:e.getBrowserName(),version:e.getBrowserVersion(),supportsFullscreen:!!ji(),supportsScreenShare:!!(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}
vendor: 5,681 bytes, line 2
2(Ui(),Vi())||Ai())),supportsSfu:!!Ni(),supportsVideoProcessing:Di(),supportsAudioProcessing:Fi()}}},{key:"version",value:function(){return"0.92.2"}},{key:"createCallObject",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.layout="none",new e(null,t)}},{key:"wrap",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ma(),!t||!t.contentWindow||"string"!=typeof t.src)throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return n.layout||(n.customLayout?n.layout="custom-v1":n.layout="browser"),new e(t,n)}},{key:"createFrame",value:function(t,n){var r,i;Ma(),t&&n?(r=t,i=n):t&&t.append?(r=t,i={}):(r=document.body,i=t||{});var o=i.iframeStyle;o||(o=r===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 a=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?a.allow="microphone, camera":a.allow="microphone; camera; autoplay; display-capture; screen-wake-lock; compute-pressure;",a.style.visibility="hidden",r.appendChild(a),a.style.visibility=null,Object.keys(o).forEach(function(e){return a.style[e]=o[e]}),i.layout||(i.customLayout?i.layout="custom-v1":i.layout="browser");try{return new e(a,i)}catch(t){throw r.removeChild(a),t}}},{key:"createTransparentFrame",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ma();var n=document.createElement("iframe");return n.allow="microphone; camera; autoplay",n.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(n),t.layout||(t.layout="custom-v1"),e.wrap(n,t)}},{key:"getCallInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return e?Zo[e]:Object.values(Zo)[0]}}]);var t,n,a,s,d,h,g,m,b,_,w,S,M,E,T,O,P,A,I,j,x,L,D,F,N,B,V,J,q,H,Y,K,Z,ee,te,ne,re,ie,oe}();function va(e){if(e.extension){if("string"!=typeof e.extension)throw new Error("Error starting dial out: extension must be a string");if(e.extension.length>20)throw new Error("Error starting dial out: extension length must be less than or equal to 20")}if(e.waitBeforeExtensionDialSec){if("number"!=typeof e.waitBeforeExtensionDialSec)throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be a number");if(e.waitBeforeExtensionDialSec>60)throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be less than or equal to 60");if(!e.extension)throw new Error("Error starting dial out: waitBeforeExtensionDialSec requires a phoneNumber and extension")}}function ga(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]=wi;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 ma(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==ei){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 ya(e,t){return[Zr,ei].includes(e)||t}function ba(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(ya(e,t)){var i="".concat(n," not supported after joining a meeting.");throw r&&(i+=" ".concat(r)),console.error(i),new Error(i)}}function _a(e){var t=arguments.length>2?arguments[2]:void 0;if(!e){var n="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method",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 t&&(n+=" ".concat(t)),console.error(n),new Error(n)}}function wa(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 ka(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 Sa(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 Ma(){if(Ai())throw new Error("This daily-js method is not currently supported in React Native")}function Ca(){if(!Ai())throw new Error("This daily-js method is only supported in React Native")}function Ea(e){if(void 0===e)return!0;var t;if("string"==typeof e)t=e;else try{t=JSON.stringify(e),C(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}
vendor: 6,336 bytes, line 2
2function Ta(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))},a=0,s=Object.entries(e);a<s.length;a++){var c=y(s[a],2),l=c[0],u=c[1];if(!r(l)||!o(u))return!1}return!0}function Oa(e){if("object"!==o(e))return!1;for(var t=0,n=Object.entries(e);t<n.length;t++){var r=y(n[t],2),i=r[0],a=r[1];switch(i){case"video":if("object"!==o(a))return!1;for(var s=0,c=Object.entries(a);s<c.length;s++){var l=y(c[s],2),u=l[0],d=l[1];switch(u){case"processor":if(!Ia(d))return!1;break;case"settings":if(!ja(d))return!1;break;default:return!1}}break;case"audio":if("object"!==o(a))return!1;for(var p=0,f=Object.entries(a);p<f.length;p++){var h=y(f[p],2),v=h[0],g=h[1];switch(v){case"processor":if(!Aa(g))return!1;break;case"settings":if(!ja(g))return!1;break;default:return!1}}break;default:return!1}}return!0}function Pa(e,t,n){var r,i=[];e.video&&e.video.processor&&(Di(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&&(Fi()||(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:wi}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:wi}):delete n.videoTrack)}function Aa(e){if(Ai())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type"];return!!e&&"object"===o(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){return!("string"!=typeof e||!Object.values(Si).includes(e)&&(console.error("inputSettings audio processor type invalid"),1))}(e.type))}function Ia(e){if(Ai())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type","config"];if(!e)return!1;if("object"!==o(e))return!1;if(!function(e){return!("string"!=typeof e||!Object.values(ki).includes(e)&&(console.error("inputSettings video processor type invalid"),1))}(e.type))return!1;if(e.config){if("object"!==o(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 ki.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 ki.BGIMAGE:return!(void 0!==t.source&&!function(e){return"default"===e.source?(e.type="default",!0):e.source instanceof ArrayBuffer||(Z(e.source)?(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 Ti.includes(r)}catch(e){return console.error("failed to deduce blob content type",e),!1}var i=n.split(".").at(-1).toLowerCase().trim();return Ti.includes(i)}(e.source)||(console.error("invalid image type; supported types: [".concat(Ti.join(", "),"]")),!1)):(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 ja(e){return"object"===o(e)&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function xa(){var e=Object.values(ki).join(" | "),t=Object.values(Si).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(e," ], config?: {} } }, audio?: { processor: {type: [ ").concat(t," ] } } }")}function La(e){var t=e.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat("base").concat(t?' | "'.concat("*",'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function Da(){return"customIntegrations should be an object of type ".concat(JSON.stringify(la),".")}function Fa(e){if(e&&"object"!==o(e)||Array.isArray(e))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(ca),".")),!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=y(n[t],1)[0],i=0,a=Object.entries(e[r]);i<a.length;i++){var s=y(a[i],2),c=s[0],l=s[1],u=ca.id[c];if(!u)return console.error("customTrayButton does not support key ".concat(c)),!1;switch(c){case"iconPath":case"iconPathDarkMode":if(!Z(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(o(l)!==u)return console.error("customTrayButton ".concat(c," should be a ").concat(u,".")),!1}}return!0}function Na(e){if(!e||e&&"object"!==o(e)||Array.isArray(e))return console.error(Da()),!1;for(var t=function(e){return"".concat(e," should be ").concat(la.id[e])},n=function(e,t){return console.error("customIntegration ".concat(e,": ").concat(t))},r=0,i=Object.entries(e);r<i.length;r++){var a=y(i[r],1)[0];if(!("label"in e[a]))return n(a,"label is required"),!1;if(!("location"in e[a]))return n(a,"location is required"),!1;if(!("src"in e[a])&&!("srcdoc"in e[a]))return n(a,"src or srcdoc is required"),!1;for(var s=0,c=Object.entries(e[a]);s<c.length;s++){var l=y(c[s],2),u=l[0],d=l[1];switch(u){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if("string"!=typeof d)return n(a,t(u)),!1;break;
2case"iconURL":if(!Z(d))return n(a,"".concat(u," should be a url")),!1;break;case"src":if("srcdoc"in e[a])return n(a,"cannot have both src and srcdoc"),!1;if(!Z(d))return n(a,'src "'.concat(d,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in e[a])return n(a,"cannot have both src and srcdoc"),!1;if("string"!=typeof d)return n(a,t(u)),!1;break;case"location":if(!["main","sidebar"].includes(d))return n(a,t(u)),!1;break;case"controlledBy":if("*"!==d&&"owners"!==d&&(!Array.isArray(d)||d.some(function(e){return"string"!=typeof e})))return n(a,t(u)),!1;break;case"shared":if((!Array.isArray(d)||d.some(function(e){return"string"!=typeof e}))&&"owners"!==d&&"boolean"!=typeof d)return n(a,t(u)),!1;break;default:if(!la.id[u])return console.error("customIntegration does not support key ".concat(u)),!1}}}return!0}function Ra(e,t){if(void 0===t)return!1;switch(o(t)){case"string":return o(e)===t;case"object":if("object"!==o(e))return!1;for(var n in e)if(!Ra(e[n],t[n]))return!1;return!0;default:return!1}}function Ba(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 Ua(e){if("object"!==o(e))throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(e.state&&!Object.values(Mi).includes(e.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(Mi));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 Va(e,t,n){return!("number"!=typeof e||e<t||e>n)}function Ja(e,t){return e&&!t&&delete e.data,e}},60999(e,t,n){n.d(t,{AE:()=>ct,Ay:()=>at,Bm:()=>ut,Gq:()=>vt,Kz:()=>We,N5:()=>de,Nh:()=>ce,OW:()=>pe,PH:()=>ae,P_:()=>le,Sk:()=>dt,V0:()=>N,Z7:()=>M,_v:()=>rt,l7:()=>ht,lj:()=>nt,rj:()=>y,tR:()=>st,wS:()=>ne,yA:()=>ee});var r=n(30569),i=n(96540),o=n(52035),a=n(34843),s=n(18790),c=n(24473);function l(e){return l="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},l(e)}var u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u.apply(this,arguments)};function d(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function p(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function g(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var m=(0,i.createContext)(null),y=function(){var e=(0,i.useContext)(m);return(0,i.useDebugValue)(e),e},b=(0,i.createContext)({on:function(){},off:function(){}}),_=-1,w=function(){return _--},k=1,S=function(){return k++},M=function(e,t,n){void 0===n&&(n=!1);var r=(0,i.useContext)(b),o=r.off,a=r.on,s=v((0,i.useState)(!1),2),c=s[0],l=s[1],u=(0,i.useRef)(0),d=(0,i.useMemo)(function(){return n?w():S()},[n]);(0,i.useEffect)(function(){if(e&&!c){if(u.current>1e5)return console.error("useDailyEvent called with potentially non-memoized event callback or due to too many re-renders.\n        Memoize using useCallback to avoid re-render loop or reduce the amount of state transitions the callback depends on.\n        Passed callback for '".concat(e,"' event is NOT registered."),t),void l(!0);u.current++;var n=setTimeout(function(){u.current=0},50);return a(e,t,d),function(){clearTimeout(n),o(e,d)}}},[t,e,d,c,o,a]),(0,i.useDebugValue)({event:e,eventId:d,isBlocked:c,callback:t})};function C(e,t){var n,r;if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!C(e[i],t[i]))return!1;return!0}if(MediaStream&&e instanceof MediaStream&&t instanceof MediaStream)return e.id===t.id&&e.active===t.active&&e.getTracks().length===t.getTracks().length&&e.getTracks().every(function(e,n){return C(e,t.getTracks()[n])});if(MediaStreamTrack&&e instanceof MediaStreamTrack&&t instanceof MediaStreamTrack)return e.id===t.id&&e.kind===t.kind&&e.readyState===t.readyState;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;var o=Array.from(e).sort(),a=Array.from(t).sort();return o.every(function(e,t){return C(e,a[t])})}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;try{for(var s=h(e.entries()),c=s.next();!c.done;c=s.next()){var u=v(c.value,2),d=u[0],p=u[1];if(!t.has(d)||!C(p,t.get(d)))return!1}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return!0}if("object"!==l(e)||null===e||"object"!==l(t)||null===t)return!1;var f=Object.keys(e),g=Object.keys(t);if(f.length!==g.length)return!1;for(i=0;i<f.length;i++)if(d=f[i],!Object.prototype.hasOwnProperty.call(t,d)||!C(e[d],t[d]))return!1;return!0}function E(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],i=t[n],o=null!==r&&"object"===l(r),a=null!==i&&"object"===l(i);if(o||a){if(!C(r,i))return!1}else if(r!==i)return!1}return!0}function T(e){return"daily-react-"+e}function O(e){var t=new Map,n=new Map;return function(r){if(!t.has(r)){var i=(0,o.eU)(function(t){var i=e.get(r)(t),o=n.get(r);return null!=o&&e.equals(i,o)?o:(n.set(r,i),i)});t.set(r,i)}return t.get(r)}}var P,A,I="::",j=function(e,t){return e+I+t},x=function(e,t){return D(j(e,t))},L=(0,s.I)(function(e){var t=(0,o.eU)([]);return t.debugLabel=T("participant-property-paths-".concat(e)),t}),D=(0,s.I)(function(e){var t=(0,o.eU)(null);return t.debugLabel=T("participant-property-".concat(e)),t}),F=O({equals:E,get:function(e){return function(t){var n=v(e.split(I),2),r=n[0];return n[1].split(";").map(function(e){return t(x(r,e))})}}}),N=function(e,t){var n,r=(0,a.md)(Array.isArray(t)?F(function(e,t){return e+I+t.join(";")}(e,t)):D(j(e,t)));return(0,i.useDebugValue)(Array.isArray(t)?t.reduce(function(e,t,n){return e[t]=r[n],e},{}):((n={})[t]=r,n)),r},R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};
2function B(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U=function(){if(A)return P;A=1;var e="Expected a function",t=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,i=/^0o[0-7]+$/i,o=parseInt,a="object"==l(R)&&R&&R.Object===Object&&R,s="object"==("undefined"==typeof self?"undefined":l(self))&&self&&self.Object===Object&&self,c=a||s||Function("return this")(),u=Object.prototype.toString,d=Math.max,p=Math.min,f=function(){return c.Date.now()};function h(e){var t=l(e);return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==l(e)||function(e){return!!e&&"object"==l(e)}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(h(e)){var a="function"==typeof e.valueOf?e.valueOf():e;e=h(a)?a+"":a}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(t,"");var s=r.test(e);return s||i.test(e)?o(e.slice(2),s?2:8):n.test(e)?NaN:+e}return P=function(t,n,r){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError(e);return h(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),function(t,n,r){var i,o,a,s,c,l,u=0,g=!1,m=!1,y=!0;if("function"!=typeof t)throw new TypeError(e);function b(e){var n=i,r=o;return i=o=void 0,u=e,s=t.apply(r,n)}function _(e){var t=e-l;return void 0===l||t>=n||t<0||m&&e-u>=a}function w(){var e=f();if(_(e))return k(e);c=setTimeout(w,function(e){var t=n-(e-l);return m?p(t,a-(e-u)):t}(e))}function k(e){return c=void 0,y&&i?b(e):(i=o=void 0,s)}function S(){var e=f(),t=_(e);if(i=arguments,o=this,l=e,t){if(void 0===c)return function(e){return u=e,c=setTimeout(w,n),g?b(e):s}(l);if(m)return c=setTimeout(w,n),b(l)}return void 0===c&&(c=setTimeout(w,n)),s}return n=v(n)||0,h(r)&&(g=!!r.leading,a=(m="maxWait"in r)?d(v(r.maxWait)||0,n):a,y="trailing"in r?!!r.trailing:y),S.cancel=function(){void 0!==c&&clearTimeout(c),u=0,i=l=o=c=void 0},S.flush=function(){return void 0===c?s:k(f())},S}(t,n,{leading:i,maxWait:n,trailing:o})}}(),V=B(U),J=function(e,t,n,r){void 0===n&&(n=500),void 0===r&&(r=!1);var o=(0,i.useContext)(b),a=o.off,s=o.on,c=(0,i.useMemo)(function(){var t;return Array.isArray(e)?e.reduce(function(e,t){return e[t]=r?w():S(),e},{}):((t={})[e]=r?w():S(),t)},[e,r]),l=(0,i.useRef)([]);M("call-instance-destroyed",(0,i.useCallback)(function(){l.current.length=0},[]));var u=(0,i.useMemo)(function(){return V(function(){0!==l.current.length&&(t(l.current),l.current.length=0)},n,{trailing:!0})},[t,n]);(0,i.useEffect)(function(){if(e){var t=function(e){l.current.push(e),u()};return Array.isArray(e)?e.forEach(function(e){return s(e,t,c[e])}):s(e,t,c[e]),function(){Array.isArray(e)?e.forEach(function(e){return a(e,c[e])}):a(e,c[e])}}},[u,e,c,a,s]),(0,i.useDebugValue)({event:e,eventId:c})},q=function(e,t,n){if(void 0===t&&(t=""),void 0===n&&(n=new Set),"object"!==l(e)||null===e||n.has(e))return[t];n.add(e);var r=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=t?"".concat(t,".").concat(i):i;r.push.apply(r,g([o],v(q(e[i],o,n)),!1))}return n.delete(e),r},$=function(e){return q(e)},z=function(e,t){return t.map(function(t){return function(e,t){return String(t).split(".").filter(function(e){return e.length}).reduce(function(e,t){return e&&e[t]},e)}(e,t)})},W=(0,o.eU)(null);W.debugLabel=T("active-id");var G=(0,o.eU)("");G.debugLabel=T("local-id");var H=(0,o.eU)(null);H.debugLabel=T("local-join-date");var Q=(0,o.eU)([]);Q.debugLabel=T("participant-ids");var Y=(0,s.I)(function(e){var t=(0,o.eU)(null);return t.debugLabel=T("participant-".concat(e)),t}),K=(0,o.eU)([]);K.debugLabel=T("waiting-participants");var X=(0,s.I)(function(e){var t=(0,o.eU)({awaitingAccess:{level:"full"},id:e,name:""});return t.debugLabel=T("waiting-participant-".concat(e)),t}),Z=(O({equals:E,get:function(){return function(e){return e(K).map(function(t){return e(X(t))})}}}),function(e){var t=e.children,n=y(),o=v((0,i.useState)(!1),2),a=o[0],s=o[1],c=(0,r.yF)((0,i.useCallback)(function(e,t,n){t(G,n.local.session_id);var r=Object.values(n),i=r.map(function(e){return e.session_id});t(Q,i),r.forEach(function(e){t(Y(e.session_id),e);var n=$(e);
2t(L(e.session_id),n),n.forEach(function(n){var r=v(z(e,[n]),1)[0];t(x(e.session_id,n),r)})}),s(!0)},[]));(0,i.useEffect)(function(){if(n&&!a){var e=setInterval(function(){var t=n.participants();"local"in t&&(c(t),clearInterval(e))},100);return function(){clearInterval(e)}}},[n,a,c]);var l=(0,i.useCallback)(function(){if(n){var e=null==n?void 0:n.participants();e.local&&c(e)}},[n,c]);M("started-camera",l,!0),M("access-state-updated",l,!0),M("joining-meeting",(0,r.yF)((0,i.useCallback)(function(e,t){t(H,new Date),l()},[l])),!0),M("joined-meeting",(0,i.useCallback)(function(e){c(e.participants)},[c]),!0);var d=(0,r.yF)((0,i.useCallback)(function(e,t){t(G,""),t(W,null),e(Q).forEach(function(e){return Y.remove(e)}),t(Q,[])},[]));return M("call-instance-destroyed",d,!0),M("left-meeting",d,!0),J(["active-speaker-change","participant-joined","participant-updated","participant-left"],(0,r.yF)((0,i.useCallback)(function(e,t,n){n.length&&n.forEach(function(n){switch(n.action){case"active-speaker-change":t(W,n.activeSpeaker.peerId),t(Y(n.activeSpeaker.peerId),function(e){return e?u(u({},e),{last_active:new Date}):null});break;case"participant-joined":t(Q,function(e){return e.includes(n.participant.session_id)?e:g(g([],v(e),!1),[n.participant.session_id],!1)}),t(Y(n.participant.session_id),n.participant);var r=$(n.participant);t(L(n.participant.session_id),r),r.forEach(function(e){var r=v(z(n.participant,[e]),1)[0];t(x(n.participant.session_id,e),r)});break;case"participant-updated":t(Y(n.participant.session_id),n.participant),n.participant.local&&t(G,n.participant.session_id),r=$(n.participant);var i=e(L(n.participant.session_id));(r.length!==i.length||r.some(function(e){return!i.includes(e)}))&&t(L(n.participant.session_id),r);var o=new Set(i),a=z(n.participant,r);r.forEach(function(e,r){var i=a[r];o.delete(e),t(x(n.participant.session_id,e),function(e){return C(e,i)?e:i})}),o.forEach(function(e){t(x(n.participant.session_id,e),null)});break;case"participant-left":t(Q,function(e){return e.includes(n.participant.session_id)?e.filter(function(e){return e!==n.participant.session_id}):e}),Y.remove(n.participant.session_id),e(L(n.participant.session_id)).forEach(function(e){D.remove(j(n.participant.session_id,e))}),L.remove(n.participant.session_id)}})},[])),100,!0),J(["waiting-participant-added","waiting-participant-updated","waiting-participant-removed"],(0,r.yF)((0,i.useCallback)(function(e,t,n){n.forEach(function(e){switch(e.action){case"waiting-participant-added":t(K,function(t){return t.includes(e.participant.id)?t:g(g([],v(t),!1),[e.participant.id],!1)}),t(X(e.participant.id),e.participant);break;case"waiting-participant-updated":t(X(e.participant.id),e.participant);break;case"waiting-participant-removed":t(K,function(t){return t.filter(function(t){return t!==e.participant.id})}),X.remove(e.participant.id)}})},[])),100,!0),i.createElement(i.Fragment,null,t)}),ee=function(){var e=(0,a.md)(G);return(0,i.useDebugValue)(e),e},te=function(){return!0},ne=function(e){var t=void 0===e?{}:e,n=t.filter,r=void 0===n?te:n,o=t.ignoreLocal,s=void 0!==o&&o,c=ee(),l=(0,a.md)(W),u=s&&l===c,d=!(null==r?void 0:r(l)),p=!u&&!d,f=v((0,i.useState)(p?l:null),2),h=f[0],g=f[1];return(0,i.useEffect)(function(){u||d||g(l)},[d,u,l]),(0,i.useDebugValue)(h),h},re=function(e){return["blocked","off"].includes(e)},ie=function(e,t){return"".concat(e).concat(";").concat(t)},oe=O({equals:C,get:function(e){return function(t){var n=v(e.split(";"),2),r=n[0],i=n[1];return t(Q).filter(function(e){switch(r){case"local":case"owner":case"record":return t(x(e,r));case"remote":return!t(x(e,"local"));case"screen":var n=t(x(e,"tracks.screenAudio.state")),i=t(x(e,"tracks.screenVideo.state"));return!re(n)||!re(i);default:return!0}}).sort(function(e,n){switch(i){case"joined_at":case"session_id":case"user_id":case"user_name":var r=t(x(e,i)),o=t(x(n,i));if(void 0!==r||void 0!==o){if(void 0===r)return-1;if(void 0===o)return 1;if(r>o)return 1;if(r<o)return-1}return 0;default:return 0}})}}}),ae=function(e){var t=void 0===e?{}:e,n=t.filter,o=t.onActiveSpeakerChange,s=t.onParticipantJoined,c=t.onParticipantLeft,l=t.onParticipantUpdated,u=t.sort,d=(0,a.md)(oe(ie("string"==typeof n?n:null,"
2string"==typeof u?u:null))),p="function"==typeof n||"function"==typeof u,f=(0,i.useCallback)(function(e){return"function"!=typeof n&&"function"!=typeof u?[]:d.map(function(t){return e(Y(t))}).filter(function(e){return Boolean(e)}).filter("function"==typeof n?n:function(){return!0}).sort("function"==typeof u?u:function(){return 0}).map(function(e){return e.session_id}).filter(Boolean)},[n,d,u]),h=v((0,i.useState)([]),2),g=h[0],m=h[1],y=(0,r.yF)((0,i.useCallback)(function(e){if(p){var t=f(e);C(t,g)||m(t)}},[g,f,p]));(0,i.useEffect)(function(){y()},[y]),J(["participant-joined","participant-updated","active-speaker-change","participant-left"],(0,i.useCallback)(function(e){e.length&&(e.forEach(function(e){switch(e.action){case"participant-joined":null==s||s(e);break;case"participant-updated":null==l||l(e);break;case"active-speaker-change":null==o||o(e);break;case"participant-left":null==c||c(e)}}),y())},[y,o,s,c,l]));var b="function"==typeof n||"function"==typeof u?g:d;return(0,i.useDebugValue)(b),b},se=O({equals:E,get:function(){return function(e){return e(oe(ie("screen",null))).map(function(t){return{local:e(x(t,"local")),screenAudio:e(x(t,"tracks.screenAudio")),screenVideo:e(x(t,"tracks.screenVideo")),screenId:"".concat(t,"-screen"),session_id:t}})}}}),ce=function(e){var t=void 0===e?{}:e,n=t.onError,r=t.onLocalScreenShareStarted,o=t.onLocalScreenShareStopped,s=y(),c=(0,i.useCallback)(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null==s||s.startScreenShare.apply(s,g([],v(e),!1))},[s]),l=(0,i.useCallback)(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];null==s||s.stopScreenShare.apply(s,g([],v(e),!1))},[s]);M("local-screen-share-started",(0,i.useCallback)(function(){return null==r?void 0:r()},[r])),M("local-screen-share-stopped",(0,i.useCallback)(function(){return null==o?void 0:o()},[o])),M("nonfatal-error",(0,i.useCallback)(function(e){"screen-share-error"===e.type&&(null==n||n(e))},[n]));var u=(0,a.md)(se(void 0)),d={isSharingScreen:u.some(function(e){return e.local}),screens:u,startScreenShare:c,stopScreenShare:l};return(0,i.useDebugValue)(d),d},le=function(e,t){void 0===t&&(t="video");var n=N(e,"tracks.".concat(t)),r=n?u(u({},n),{isOff:re(n.state)}):{isOff:!0,persistentTrack:void 0,state:"off",subscribed:!1};return(0,i.useDebugValue)(r),r};function ue(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,i.useCallback)(function(t){for(var n=0;n<e.length;n++){var r=e[n];"function"==typeof r?r(t):r&&"object"===l(r)&&(r.current=t)}},e)}var de=(0,i.memo)((0,i.forwardRef)(function(e,t){var n=e.onPlayFailed,r=e.sessionId,o=e.type,a=void 0===o?"audio":o,s=d(e,["onPlayFailed","sessionId","type"]),c=(0,i.useRef)(null),l=le(r,a),p=ue(c,t),f=null==l?void 0:l.subscribed;return(0,i.useEffect)(function(){var e=c.current;if(e&&(null==l?void 0:l.persistentTrack)){if(!MediaStream)return console.warn("MediaStream API not available. Can't setup ".concat(a," for ").concat(r)),void(null==n||n({sessionId:r,target:e,type:a,message:"MediaStream API not available",name:"MediaStream API not available"}));var t=function(){e.play().catch(function(t){null==n||n({sessionId:r,target:e,type:a,message:t.message,name:t.name})})};return e.addEventListener("loadedmetadata",t),e.srcObject=new MediaStream([l.persistentTrack]),e.load(),function(){e.removeEventListener("loadedmetadata",t)}}},[null==l?void 0:l.persistentTrack,n,r,a]),M("participant-left",(0,i.useCallback)(function(e){var t=c.current;e.participant.session_id===r&&t&&(t.srcObject=null)},[r])),M("left-meeting",(0,i.useCallback)(function(){var e=c.current;e&&(e.pause(),e.srcObject=null)},[])),i.createElement("audio",u({autoPlay:!0,ref:p},s,{"data-session-id":r,"data-audio-type":a,"data-subscribed":f}))}));de.displayName="DailyAudioTrack";var pe=(0,i.memo)((0,i.forwardRef)(function(e,t){var n=e.autoSubscribeActiveSpeaker,o=void 0!==n&&n,a=e.maxSpeakers,s=void 0===a?5:a,c=e.onPlayFailed,l=e.playLocalScreenAudio,u=void 0!==l&&l,d=y(),h=v((0,i.useState)(new Array(s).fill("")),2),m=h[0],b=h[1],_=ce().screens,w=ee(),k=ne({ignoreLocal:!0}),S=(0,i.useRef)(null);(0,i.useImperativeHandle)(t,function(){return{getActiveSpeakerAudio:function(){var e,t;return null!==(t=null===(e=S.current)||void 0===e?void 0:e.querySelector('audio[data-se
2ssion-id="'.concat(k,'"][data-audio-type="audio"]')))&&void 0!==t?t:null},getAllAudio:function(){var e,t;return Array.from(null!==(t=null===(e=S.current)||void 0===e?void 0:e.querySelectorAll("audio"))&&void 0!==t?t:[])},getAudioBySessionId:function(e){var t,n;return null!==(n=null===(t=S.current)||void 0===t?void 0:t.querySelector('audio[data-session-id="'.concat(e,'"][data-audio-type="audio"]')))&&void 0!==n?n:null},getRmpAudio:function(){var e,t;return Array.from(null!==(t=null===(e=S.current)||void 0===e?void 0:e.querySelectorAll('audio[data-audio-type="rmpAudio"]'))&&void 0!==t?t:[])},getScreenAudio:function(){var e,t;return Array.from(null!==(t=null===(e=S.current)||void 0===e?void 0:e.querySelectorAll('audio[data-audio-type="screenAudio"]'))&&void 0!==t?t:[])},getRmpAudioBySessionId:function(e){var t,n;return null!==(n=null===(t=S.current)||void 0===t?void 0:t.querySelector('audio[data-session-id="'.concat(e,'"][data-audio-type="rmpAudio"]')))&&void 0!==n?n:null},getScreenAudioBySessionId:function(e){var t,n;return null!==(n=null===(t=S.current)||void 0===t?void 0:t.querySelector('audio[data-session-id="'.concat(e,'"][data-audio-type="screenAudio"]')))&&void 0!==n?n:null}}},[k]);var M=(0,r.yF)((0,i.useCallback)(function(e,t,n){return p(void 0,void 0,void 0,function(){var t,r,i;return f(this,function(a){if(t=Object.values(null!==(i=null==d?void 0:d.participants())&&void 0!==i?i:{}).filter(function(e){return!e.local&&Boolean(e.tracks.audio.subscribed)}),!(r=function(e){return t.some(function(t){return t.session_id===e})})(n)){if(!d||d.isDestroyed()||!o||d.subscribeToTracksAutomatically())return[2];d.updateParticipant(n,{setSubscribedTracks:{audio:!0}})}return b(function(i){var o;if(i.includes(n))return i;var a=function(e){return!e||!r(e)};if(i.some(a)){var s=i.findIndex(a);return i[s]=n,g([],v(i),!1)}var c=i.findIndex(function(e){return t.some(function(t){return t.session_id===e&&re(t.tracks.audio.state)})});if(c>=0)return i[c]=n,g([],v(i),!1);var l=t.filter(function(e){return i.includes(e.session_id)&&e.session_id!==k}).sort(function(t,n){var r,i,o=null!==(r=e(x(t.session_id,"last_active")))&&void 0!==r?r:new Date("1970-01-01"),a=null!==(i=e(x(n.session_id,"last_active")))&&void 0!==i?i:new Date("1970-01-01");return o>a?1:o<a?-1:0});if(!l.length){var u=i.findIndex(function(e){return e!==k});return i[u]=n,g([],v(i),!1)}var d=i.indexOf(null===(o=l[0])||void 0===o?void 0:o.session_id);return i[d]=n,g([],v(i),!1)}),[2]})})},[k,o,d])),C=(0,i.useCallback)(function(e){b(function(t){if(!t.includes(e))return t;var n=g([],v(t),!1),r=n.indexOf(e);return n[r]="",n})},[]);J(["active-speaker-change","track-started","participant-left"],(0,i.useCallback)(function(e){e.forEach(function(e){switch(e.action){case"active-speaker-change":if(e.activeSpeaker.peerId===w)return;M(e.activeSpeaker.peerId);break;case"track-started":"audio"===e.track.kind&&e.participant&&!e.participant.local&&M(e.participant.session_id);break;case"participant-left":C(e.participant.session_id)}})},[M,w,C]),200);var E=ae({filter:(0,i.useCallback)(function(e){var t;return Boolean(null===(t=null==e?void 0:e.tracks)||void 0===t?void 0:t.rmpAudio)},[])});return i.createElement("div",{ref:S},m.map(function(e,t){return i.createElement(de,{key:"speaker-slot-".concat(t),onPlayFailed:c,sessionId:e,type:"audio"})}),_.filter(function(e){return!!u||!e.local}).map(function(e){return i.createElement(de,{key:e.screenId,onPlayFailed:c,sessionId:e.session_id,type:"screenAudio"})}),E.map(function(e){return i.createElement(de,{key:"".concat(e,"-rmp"),onPlayFailed:c,sessionId:e,type:"rmpAudio"})}))}));pe.displayName="DailyAudio",(0,i.forwardRef)(function(e,t){var n=e.automirror,r=e.fit,o=void 0===r?"contain":r,a=e.mirror,s=e.onResize,c=e.playableStyle,l=void 0===c?{}:c,p=e.sessionId,f=e.style,h=void 0===f?{}:f,v=e.type,g=void 0===v?"video":v,m=d(e,["automirror","fit","mirror","onResize","playableStyle","sessionId","style","type"]),y=ee()===p,b="screenVideo"===g,_=y&&"video"===g,w=(0,i.useRef)(null),k=ue(w,t),S=(0,i.useRef)(!1),M=le(p,g),C=M.persistentTrack,E=_||b||!M.isOff,T=N(p,"tracks.".concat(g)),O
2=null==T?void 0:T.subscribed,P=(0,i.useMemo)(function(){if("boolean"==typeof a)return a;if(!n)return!1;if(!C)return _;var e=C.getSettings();return"facingMode"in e?_&&"user"===e.facingMode:_},[n,_,a,C]);return(0,i.useEffect)(function(){S.current=P},[P]),(0,i.useEffect)(function(){var e=w.current;if(e){var t=function(){var t=e.play();void 0!==t&&t.then(function(){e.controls=!1}).catch(function(t){e.controls=!0,console.warn("Failed to play video",t)})},n=function(){e.paused&&t()},r=function(){e.style.transform="scale(1)"},i=function(){e.style.transform=S.current?"scale(-1, 1)":"",setTimeout(function(){e.paused&&t()},100)},o=function(){"hidden"!==document.visibilityState&&e.paused&&t()};return e.addEventListener("canplay",n),e.addEventListener("enterpictureinpicture",r),e.addEventListener("leavepictureinpicture",i),document.addEventListener("visibilitychange",o),function(){e.removeEventListener("canplay",n),e.removeEventListener("enterpictureinpicture",r),e.removeEventListener("leavepictureinpicture",i),document.removeEventListener("visibilitychange",o)}}},[]),(0,i.useEffect)(function(){var e=w.current;if(e&&C){if(MediaStream)return e.srcObject=new MediaStream([C]),e.load(),function(){e.srcObject=null,e.load()};console.warn("MediaStream API not available. Can't setup ".concat(g," for ").concat(p))}},[p,g,C,null==C?void 0:C.id]),(0,i.useEffect)(function(){var e,t=w.current;if(s&&t)return n(),t.addEventListener("loadedmetadata",n),t.addEventListener("resize",n),function(){e&&cancelAnimationFrame(e),t.removeEventListener("loadedmetadata",n),t.removeEventListener("resize",n)};function n(){e&&cancelAnimationFrame(e),e=requestAnimationFrame(function(){var e=w.current;if(e&&!document.hidden){var t=e.videoWidth,n=e.videoHeight;t&&n&&(null==s||s({aspectRatio:t/n,height:n,width:t}))}})}},[s]),i.createElement("video",u({autoPlay:!0,muted:!0,playsInline:!0,ref:k,"data-local":y,"data-mirrored":P||void 0,"data-playable":E||void 0,"data-session-id":p,"data-subscribed":O,"data-video-type":g,style:u(u({objectFit:o,transform:P?"scale(-1, 1)":""},h),E?l:{})},m))}).displayName="DailyVideo";var fe=(0,i.createContext)({refreshDevices:function(){return Promise.resolve()}}),he=(0,o.eU)("idle");he.debugLabel=T("camera-state");var ve=(0,o.eU)("idle");ve.debugLabel=T("microphone-state");var ge=(0,o.eU)([]);ge.debugLabel=T("camera-devices");var me=(0,o.eU)([]);me.debugLabel=T("microphone-devices");var ye=(0,o.eU)([]);ye.debugLabel=T("speaker-devices");var be=(0,o.eU)(null);be.debugLabel=T("last-camera-error");var _e=function(e){var t=e.children,n=y(),o=(0,r.yF)((0,i.useCallback)(function(e,t){return p(void 0,void 0,void 0,function(){var e,r,i,o,a,s,c,l,u,d,p,h;return f(this,function(f){switch(f.label){case 0:if(void 0===(null===(p=null===navigator||void 0===navigator?void 0:navigator.mediaDevices)||void 0===p?void 0:p.getUserMedia)||void 0===(null===(h=null===navigator||void 0===navigator?void 0:navigator.mediaDevices)||void 0===h?void 0:h.enumerateDevices))return t(he,"not-supported"),t(ve,"not-supported"),[2];if(!n)return[2];f.label=1;case 1:return f.trys.push([1,4,,5]),[4,n.enumerateDevices()];case 2:return e=f.sent().devices,r=e.filter(function(e){return"videoinput"===e.kind&&""!==e.deviceId}),i=e.filter(function(e){return"audioinput"===e.kind&&""!==e.deviceId}),o=e.filter(function(e){return"audiooutput"===e.kind&&""!==e.deviceId}),[4,n.getInputDevices()];case 3:return a=f.sent(),s=a.camera,c=a.mic,l=a.speaker,u=function(e,t,n){var r,i=n.find(function(e){return e.device.deviceId===t.deviceId}),o="deviceId"in e&&t.deviceId===e.deviceId,a=!("deviceId"in e)&&(null==i?void 0:i.selected);return{device:t,selected:o||Boolean(a),state:null!==(r=null==i?void 0:i.state)&&void 0!==r?r:"granted"}},d=function(e,t){return"default"===e.device.deviceId?-1:"default"===t.device.deviceId?1:e.device.label<t.device.label?-1:e.device.label>t.device.label?1:0},t(ge,function(e){return r.filter(Boolean).map(function(t){return u(s,t,e)}).sort(d)}),t(me,function(e){return i.filter(Boolean).map(function(t){return u(c,t,e)}).sort(d)}
2),t(ye,function(e){return o.filter(Boolean).map(function(t){return u(l,t,e)}).sort(d)}),[3,5];case 4:return f.sent(),t(he,"not-supported"),t(ve,"not-supported"),[3,5];case 5:return[2]}})})},[n])),a=(0,r.yF)((0,i.useCallback)(function(e,t){return p(void 0,void 0,void 0,function(){var r,i,a,s,c,l,d,p,h,v,g,m,y,b,_,w,k,S,M,C,E,T,O,P,A,I;return f(this,function(f){switch(f.label){case 0:if(!n)return[2];if(r=e(he),i=e(ve),!(a=n.participants()).local)return[2];if(s=a.local.tracks,c="prompt",l="prompt",!navigator.permissions)return[3,5];f.label=1;case 1:return f.trys.push([1,4,,5]),[4,navigator.permissions.query({name:"camera"})];case 2:return d=f.sent(),c=d.state,[4,navigator.permissions.query({name:"microphone"})];case 3:return p=f.sent(),l=p.state,[3,5];case 4:return f.sent(),[3,5];case 5:return h="prompt"===c&&["idle","pending"].includes(r)&&"interrupted"===s.video.state&&!s.video.persistentTrack,v=["idle","pending"].includes(r)&&!s.video.persistentTrack&&Boolean(null===(y=s.video.off)||void 0===y?void 0:y.byUser),g="prompt"===l&&["idle","pending"].includes(i)&&"interrupted"===s.audio.state&&!s.audio.persistentTrack,m=["idle","pending"].includes(i)&&!s.audio.persistentTrack&&Boolean(null===(b=s.audio.off)||void 0===b?void 0:b.byUser),(null===(w=null===(_=s.audio)||void 0===_?void 0:_.blocked)||void 0===w?void 0:w.byDeviceInUse)?(t(ve,"in-use"),t(me,function(e){return e.map(function(e){return e.selected?u(u({},e),{state:"in-use"}):e})})):(null===(S=null===(k=s.audio)||void 0===k?void 0:k.blocked)||void 0===S?void 0:S.byDeviceMissing)?t(ve,"not-found"):(null===(C=null===(M=s.audio)||void 0===M?void 0:M.blocked)||void 0===C?void 0:C.byPermissions)||"denied"===l?t(ve,"blocked"):g?t(ve,"pending"):m?t(ve,"idle"):(t(ve,"granted"),t(me,function(e){return e.map(function(e){return e.selected?u(u({},e),{state:"granted"}):e})})),(null===(T=null===(E=s.video)||void 0===E?void 0:E.blocked)||void 0===T?void 0:T.byDeviceInUse)?(t(he,"in-use"),t(ge,function(e){return e.map(function(e){return e.selected?u(u({},e),{state:"in-use"}):e})})):(null===(P=null===(O=s.video)||void 0===O?void 0:O.blocked)||void 0===P?void 0:P.byDeviceMissing)?t(he,"not-found"):(null===(I=null===(A=s.video)||void 0===A?void 0:A.blocked)||void 0===I?void 0:I.byPermissions)||"denied"===c?t(he,"blocked"):h?t(he,"pending"):v?t(he,"idle"):(t(he,"granted"),t(ge,function(e){return e.map(function(e){return e.selected?u(u({},e),{state:"granted"}):e})})),o(),[2]}})})},[n,o]));return M("participant-updated",(0,i.useCallback)(function(e){e.participant.local&&a()},[a])),M("available-devices-updated",o),M("selected-devices-updated",o),M("camera-error",(0,r.yF)((0,i.useCallback)(function(e,t,n){var r,i,o,a,s,c,l;switch(t(be,n.error),null===(r=n.error)||void 0===r?void 0:r.type){case"cam-in-use":t(he,"in-use");break;case"mic-in-use":t(ve,"in-use");break;case"cam-mic-in-use":t(he,"in-use"),t(ve,"in-use");break;case"not-found":(null===(i=n.error)||void 0===i?void 0:i.missingMedia.includes("video"))&&t(he,"not-found"),(null===(o=n.error)||void 0===o?void 0:o.missingMedia.includes("audio"))&&t(ve,"not-found");break;case"permissions":(null===(a=n.error)||void 0===a?void 0:a.blockedMedia.includes("video"))&&t(he,"blocked"),(null===(s=n.error)||void 0===s?void 0:s.blockedMedia.includes("audio"))&&t(ve,"blocked");break;case"constraints":"invalid"===(null===(c=n.error)||void 0===c?void 0:c.reason)?(t(he,"constraints-invalid"),t(ve,"constraints-invalid")):"none-specified"===(null===(l=n.error)||void 0===l?void 0:l.reason)&&(t(he,"constraints-none-specified"),t(ve,"constraints-none-specified"));break;case"undefined-mediadevices":t(he,"undefined-mediadevices"),t(ve,"undefined-mediadevices");break;default:t(he,"unknown"),t(ve,"unknown")}},[]))),M("started-camera",(0,r.yF)((0,i.useCallback)(function(e,t){t(he,"granted"),t(ve,"granted"),a()},[a]))),i.createElement(fe.Provider,{value:{refreshDevices:o}},t)},we={isReady:!1,sessions:{}},ke=(0,o.eU)(we);ke.debugLabel=T("dial-in");var Se=function(e){var t=e.children;M("dialin-ready",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(ke,function(e){return u(u({},e),{isReady:!0,sipEndpoint:n.sipEndpoint,provider:n.provider})})},[]))),M("dialin-connected",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(ke,function(e){var t,r,i,o,a;return u(u({},e),{sessions:u(u({},e.sessions),(t={},t[n.sessionId]=u(u({},e.sessions[n.sessionId]),{sessionId:n.sessionId,status:"connected",provider:null!==(r=n.provider)&&void 0!==r?r:null===(i=e.sessions[n.sessionId])||void 0===i?void 0:i.provider,sipCallId:null!==(o=n.sipCallId)&&void 0!==o?o:null===(a=e.sessions[n.sessionId])||void 0===a?void 0:a.sipCallId}),t))})})},[]))),M("dialin-stopped",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(ke,function(e){var t;return e.sessions[n.sessionId]?u(u({},e),{sessions:u(u({},e.sessions),(t={},t[n.sessionId]=u(u({},e.sessions[n.sessionId]),{status:"stopped"}),t))}):e})},[]))),M("dialin-error",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(ke,function(e){var t,r,i,o,a;return u(u({},e),{sessions:u(u({},e.sessions),(t={},t[n.sessionId]=u(u({},e.sessions[n.sessionId]),{sessionId:n.sessionId,status:"error",provider:null!==(r=n.provider)&&void 0!==r?r:null===(i=e.sessions[n.sessionId])||void 0===i?void 0:i.provider,sipCallId:null!==(o=n.sipCallId)&&void 0!==o?o:null===(a=e.sessions[n.sessionId])||void 0===a?void 0:a.sipCallId,errorMsg:n.errorMsg}),t))})})},[]))),M("dialin-warning",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(ke,function(e){var t,r,i,o,a;return u(u({},e),{sessions:u(u({},e.sessions),(t={},t[n.sessionId]=u(u({},e.sessions[n.sessionId]),{sessionId:n.sessionId,status:"warning",provider:null!==(r=n.provider)&&void 0!==r?r:null===(i=e.sessions[n.sessionId])||void 0===i?void 0:i.provider,sipCallId:null!==(o=n.sipCallId)&&void 0!==o?o:null===(a=e.sessions[n.sessionId])||void 0===a?void 0:a.sipCallId,errorMsg:n.errorMsg}),t))})})},[])));var n=(0,r.yF)((0,i.useCallback)(function(e,t){t(ke,we)},[]));return M("left-meeting",n),M("call-instance-destroyed",n),i.createElement(i.Fragment,null,t)},Me=(0,o.eU)({});Me.debugLabel=T("dial-out-sessions");var Ce=function(e){var t=e.children;M("dialout-connected",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(Me,function(e){var t;return u(u({},e),((t={})[n.sessionId]=u(u({},e[n.sessionId]),{sessionId:n.sessionId,status:"connected",provider:n.provider,sipCallId:n.sipCallId}),t))})},[]))),M("dialout-answered",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(Me,function(e){var t;return u(u({},e),((t={})[n.sessionId]=u(u({},e[n.sessionId]),{sessionId:n.sessionId,status:"answered",provider:n.provider,sipCallId:n.sipCallId}),t))})},[]))),M("dialout-stopped",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(Me,function(e){var t;return e[n.sessionId]?u(u({},e),((t={})[n.sessionId]=u(u({},e[n.sessionId]),{status:"stopped"}),t)):e})},[]))),M("dialout-error",(0,r.yF)((0,i.useCallback)(function(e,t,n){var r=n.sessionId;r&&t(Me,function(e){var t,i,o,a,s;return u(u({},e),((t={})[r]=u(u({},e[r]),{sessionId:r,status:"error",provider:null!==(i=n.provider)&&void 0!==i?i:null===(o=e[r])||void 0===o?void 0:o.provider,sipCallId:null!==(a=n.sipCallId)&&void 0!==a?a:null===(s=e[r])||void 0===s?void 0:s.sipCallId,errorMsg:n.errorMsg}),t))})},[]))),M("dialout-warning",(0,r.yF)((0,i.useCallback)(function(e,t,n){var r=n.sessionId;r&&t(Me,function(e){var t,i,o,a,s;return u(u({},e),((t={})[r]=u(u({},e[r]),{sessionId:r,status:"warning",provider:null!==(i=n.provider)&&void 0!==i?i:null===(o=e[r])||void 0===o?void 0:o.provider,sipCallId:null!==(a=n.sipCallId)&&void 0!==a?a:null===(s=e[r])||void 0===s?void 0:s.sipCallId,errorMsg:n.errorMsg}),t))})},[])));var n=(0,r.yF)((0,i.useCallback)(function(e,t){t(Me,{})},[]));return M("left-meeting",n),M("call-instance-destroyed",n),i.createElement(i.Fragment,null,t)};function Ee(e){var t;return null!==(t=e.instanceId)&&void 0!==t?t:"__default__"}var Te=(0,o.eU)({});
2Te.debugLabel=T("live-streaming-instances"),(0,o.eU)(function(e){var t,n=e(Te),r=Object.values(n),i=r.filter(function(e){return e.isLiveStreaming}),o=null!==(t=i[0])&&void 0!==t?t:r[r.length-1],a=r.find(function(e){return e.errorMsg});return{errorMsg:null==a?void 0:a.errorMsg,isLiveStreaming:i.length>0,layout:null==o?void 0:o.layout}}).debugLabel=T("live-streaming");var Oe=function(e){var t=e.children;return M("live-streaming-started",(0,r.yF)((0,i.useCallback)(function(e,t,n){var r=Ee(n);t(Te,function(e){var t;return u(u({},e),((t={})[r]={instanceId:r,isLiveStreaming:!0,layout:null==n?void 0:n.layout},t))})},[]))),M("live-streaming-stopped",(0,r.yF)((0,i.useCallback)(function(e,t,n){var r=Ee(n);t(Te,function(e){var t;return e[r]?u(u({},e),((t={})[r]=u(u({},e[r]),{isLiveStreaming:!1,layout:void 0}),t)):e})},[]))),M("live-streaming-error",(0,r.yF)((0,i.useCallback)(function(e,t,n){var r=Ee(n);t(Te,function(e){var t,i;return u(u({},e),((t={})[r]=u(u({},null!==(i=e[r])&&void 0!==i?i:{instanceId:r,isLiveStreaming:!1}),{errorMsg:n.errorMsg}),t))})},[]))),M("left-meeting",(0,r.yF)((0,i.useCallback)(function(e,t){t(Te,{})},[]))),i.createElement(i.Fragment,null,t)},Pe=(0,o.eU)("new");Pe.debugLabel=T("meeting-state");var Ae=(0,o.eU)(null);
2Ae.debugLabel=T("meeting-error");var Ie=(0,o.eU)(null);Ie.debugLabel=T("non-fatal-error");var je=(0,o.eU)({data:void 0,topology:"none"});je.debugLabel=T("meeting-session-data");var xe=(0,o.eU)(null);xe.debugLabel=T("meeting-session-summary");var Le=function(e){var t=e.children,n=y(),o=(0,r.yF)((0,i.useCallback)(function(e,t){if(n){var r=n.meetingState();return t(Pe,r),r}},[n]));M("loading",o),M("loaded",o),M("joining-meeting",o),M("joined-meeting",o),M("left-meeting",o),M("error",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(Ae,n),o()},[o]))),M("nonfatal-error",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(Ie,n)},[])));var a=(0,r.yF)((0,i.useCallback)(function(e,t){n&&t(je,n.meetingSessionState())},[n]));M("joined-meeting",a),M("meeting-session-state-updated",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(je,n.meetingSessionState)},[])));var s=(0,r.yF)((0,i.useCallback)(function(e,t){n&&t(xe,n.meetingSessionSummary())},[n]));return M("joined-meeting",s),M("meeting-session-summary-updated",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(xe,n.meetingSession)},[]))),M("left-meeting",(0,r.yF)((0,i.useCallback)(function(e,t){t(je,{data:void 0,topology:"none"}),t(xe,null)},[]))),M("call-instance-destroyed",(0,r.yF)((0,i.useCallback)(function(e,t){t(Pe,"new"),t(Ae,null),t(Ie,null),t(je,{data:void 0,topology:"none"}),t(xe,null)},[]))),i.createElement(i.Fragment,null,t)},De=(0,o.eU)("none");De.debugLabel=T("topology");var Fe=(0,o.eU)("unknown"),Ne=(0,o.eU)([]),Re=(0,o.eU)("interrupted"),Be=(0,o.eU)(100);Be.debugLabel=T("network-quality");var Ue=(0,o.eU)("good");Ue.debugLabel=T("network-threshold");var Ve=function(e){var t=e.children,n=y(),o=(0,a.md)(De),s=(0,r.yF)((0,i.useCallback)(function(e,t){return p(void 0,void 0,void 0,function(){var e;return f(this,function(r){switch(r.label){case 0:return n?[4,n.getNetworkTopology()]:[2];case 1:return(e=r.sent())&&"none"!==(null==e?void 0:e.topology)?(t(De,e.topology),[2]):[2]}})})},[n]));return M("joined-meeting",s),M("network-connection",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(Re,n.event),"connected"===n.event&&("peer-to-peer"===n.type&&t(De,"peer"),"sfu"===n.type&&t(De,"sfu"))},[]))),M("network-quality-change",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(Fe,function(e){return e!==n.networkState?n.networkState:e}),t(Ne,function(e){var t,r=null!==(t=n.networkStateReasons)&&void 0!==t?t:[];return E(e,r)?e:r}),t(Be,function(e){return e!==n.quality?n.quality:e}),t(Ue,function(e){return e!==n.threshold?n.threshold:e})},[]))),M("left-meeting",(0,r.yF)((0,i.useCallback)(function(e,t){t(De,"none"),t(Fe,"unknown"),t(Ne,[]),t(Re,"interrupted"),t(Be,100),t(Ue,"good")},[]))),(0,i.useEffect)(function(){n&&"none"===o&&s()}
2,[n,s,o]),i.createElement(i.Fragment,null,t)};function Je(e){return e.instanceId?e.instanceId:"local"===e.type||e.local?"__local__":"__default__"}var qe=(0,o.eU)({});qe.debugLabel=T("recording-instances");var $e=(0,o.eU)(function(e){var t,n=e(qe),r=Object.values(n),i=r.filter(function(e){return e.isRecording}),o=null!==(t=i[0])&&void 0!==t?t:r[r.length-1];return{error:r.some(function(e){return e.error}),isLocalParticipantRecorded:r.some(function(e){return e.isLocalParticipantRecorded}),isRecording:i.length>0,layout:null==o?void 0:o.layout,local:null==o?void 0:o.local,recordingId:null==o?void 0:o.recordingId,recordingStartedDate:null==o?void 0:o.recordingStartedDate,startedBy:null==o?void 0:o.startedBy,type:null==o?void 0:o.type}});$e.debugLabel=T("recording-state");var ze=function(e){var t=e.children,n=ee(),o=ae({filter:"record"}),a=(0,r.yF)((0,i.useCallback)(function(e,t,n,r){var i=e(qe).__local__,o=u(u({},i),{instanceId:"__local__",isLocalParticipantRecorded:n,isRecording:n,local:n?r:null==i?void 0:i.local,type:n?"local":null==i?void 0:i.type});i&&C(i,o)||(n||i)&&(n?t(qe,function(e){return u(u({},e),{__local__:o})}):i&&t(qe,function(e){return u(u({},e),{__local__:u(u({},i),{isLocalParticipantRecorded:!1,isRecording:!1})})}))},[]));return(0,i.useEffect)(function(){var e=o.length>0,t=o.includes(n||"local");a(e,t)},[n,a,o]),M("recording-started",(0,r.yF)((0,i.useCallback)(function(e,t,r){var i,o=Je(r),a=!0;switch(r.type){case"cloud-audio-only":case"cloud-beta":case"cloud":n&&"single-participant"===(null===(i=r.layout)||void 0===i?void 0:i.preset)&&r.layout.session_id!==n&&(a=!1)}t(qe,function(e){var t;return u(u({},e),((t={})[o]={error:!1,instanceId:o,isLocalParticipantRecorded:a,isRecording:!0,layout:null==r?void 0:r.layout,local:null==r?void 0:r.local,recordingId:null==r?void 0:r.recordingId,recordingStartedDate:new Date,startedBy:null==r?void 0:r.startedBy,type:null==r?void 0:r.type},t))})},[n]))),M("recording-stopped",(0,r.yF)((0,i.useCallback)(function(e,t,n){var r=Je(n);t(qe,function(e){var t;return e[r]?u(u({},e),((t={})[r]=u(u({},e[r]),{isLocalParticipantRecorded:!1,isRecording:!1}),t)):e})},[]))),M("recording-error",(0,r.yF)((0,i.useCallback)(function(e,t,n){var r=Je(n);t(qe,function(e){var t,i=e[r];return u(u({},e),((t={})[r]=u(u({},null!=i?i:{instanceId:r}),{error:!0,errorMsg:n.errorMsg,isLocalParticipantRecorded:!1,isRecording:!1}),t))})},[]))),M("left-meeting",(0,r.yF)((0,i.useCallback)(function(e,t){t(qe,{})},[]))),i.createElement(i.Fragment,null,t)},We=function(){var e=(0,a.md)(Pe);return(0,i.useDebugValue)(e),e},Ge=(0,o.eU)(null);Ge.debugLabel=T("room-state");var He=function(e){var t=e.children,n=y(),o=We(),a=(0,r.yF)((0,i.useCallback)(function(e,t){return p(void 0,void 0,void 0,function(){var e;return f(this,function(r){switch(r.label){case 0:return n&&"left-meeting"!==o?[4,n.room()]:[2];case 1:return(e=r.sent())&&"id"in e&&t(Ge,e),[2,e]}})})},[n,o]));return M("access-state-updated",a),M("left-meeting",(0,r.yF)((0,i.useCallback)(function(e,t){return function(){t(Ge,null)}},[]))),i.createElement(i.Fragment,null,t)},Qe=(0,o.eU)({isTranscribing:!1,model:"general",language:"en",transcriptions:[]});Qe.debugLabel=T("transcription-state");var Ye,Ke,Xe=function(e){var t=e.children;return M("transcription-started",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(Qe,{error:!1,transcriptionStartDate:new Date,isTranscribing:!0,transcriptions:[],endpointing:n.endpointing,extra:n.extra,includeRawResponse:n.includeRawResponse,instanceId:n.instanceId,language:n.language,model:n.model,profanity_filter:n.profanity_filter,punctuate:n.punctuate,redact:n.redact,startedBy:n.startedBy,tier:n.tier})},[]))),M("transcription-stopped",(0,r.yF)((0,i.useCallback)(function(e,t,n){t(Qe,function(e){return u(u({},e),{updatedBy:n.updatedBy,isTranscribing:!1})})},[]))),M("transcription-error",(0,r.yF)((0,i.useCallback)(function(e,t){t(Qe,function(e){return u(u({},e),{error:!0,isTranscribing:!1})})},[]))),M("left-meeting",(0,r.yF)((0,i.useCallback)(function(e,t){t(Qe,function(e){return u(u({},e),{isTranscribing:!1})})},[]))),M("app-message",(0,r.yF)((0,i.useCallback)(function(e,t,n){"transcription"===(null==n?void 0:n.fromId)&&t(Qe,function(e){return u(u({},e),{isTranscribing:!0,transcriptions:g(g([],v(e.transcriptions),!1),[n.data],!1)})})},[]))),i.createElement(i.Fragment,null,t)},Ze={strictMode:!0},et=function(){return!0},tt={options:Ze,shouldCreateInstance:et},nt=function(e){var t=e.children,n=e.jotaiStore,r=d(e,["children","jotaiStore"]),o=(0,i.useRef)({}),s=(0,i.useCallback)(function(e){var t,n,r,i;if("action"in e){var a=e.action,s=Array.from(null!==(i=null===(r=o.current)||void 0===r?void 0:r[a])&&void 0!==i?i:[]),c=s.filter(function(e){return v(e,1)[0]<0}),l=s.filter(function(e){return v(e,1)[0]>0}),u=g(g([],v(c),!1),v(l),!1);try{for(var d=h(u),p=d.next();!p.done;p=d.next())(0,v(p.value,2)[1])(e)}catch(e){t={error:e}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}}},[]),l=(0,i.useCallback)(function(e){e&&Object.keys(o.current).forEach(function(t){e.off(t,s),e.isDestroyed()||e.on(t,s)})},[s]),y="callObject"in r?r.callObject:null,_=function(e){return function(e,t){var n=void 0===t?tt:t,r=n.parentElRef,o=n.options,a=void 0===o?Ze:o,s=n.shouldCreateInstance,l=void 0===s?et:s,d=v((0,i.useState)(null),2),h=d[0],g=d[1],m=(0,i.useRef)();return(0,i.useEffect)(function(){var t;if(("callFrame"!==e||null!==(null==r?void 0:r.current))&&l()){var n=function(){setTimeout(function(){return g(null)},0)},i=c.Ay.getCallInstance();if(!h&&i&&!i.isDestroyed())return i.once("call-instance-destroyed",n),void g(i);if(h)C(m.current,a)||function(e){p(this,void 0,void 0,function(){return f(this,function(t){switch(t.label){case 0:return[4,e.destroy()];case 1:return t.sent(),[2]}})})}(h);else if(!i||i.isDestroyed())try{var o=u(u({},a),{aboutClient:u(u({},null!==(t=a.aboutClient)&&void 0!==t?t:{}),{"daily-react":"0.26.0"})});switch(e){case"callFrame":i=(null==r?void 0:r.current)?c.Ay.createFrame(r.current,o):c.Ay.createFrame(o);break;case"callObject":i=c.Ay.createCallObject(o)}m.current=a,g(i),i.once("call-instance-destroyed",n)}catch(e){if(console.error("Error creating call instance:",e),a.strictMode)throw e}}},[h,a,r,l,e]),h}("callObject",e)}({options:(0,i.useMemo)(function(){return"callObject"in r?{}:r},[r]),shouldCreateInstance:(0,i.useCallback)(function(){return!("callObject"in r)},[r])}),w=null!=y?y:_;(0,i.useEffect)(function(){w&&l(w)},[w,l]);var k=(0,i.useCallback)(function(e,t,n){var r,i;o.current[e]||(o.current[e]=new Map,w&&(w.off(e,s),w.isDestroyed()||w.on(e,s))),(null===(r=o.current[e])||void 0===r?void 0:r.has(n))||null===(i=o.current[e])||void 0===i||i.set(n,t)},[w,s]),S=(0,i.useCallback)(function(e,t){var n,r;null===(n=o.current[e])||void 0===n||n.delete(t),0===(null===(r=o.current[e])||void 0===r?void 0:r.size)&&(null==w||w.off(e,s),delete o.current[e])},[w,s]);return i.createElement(a.Kq,{store:n},i.createElement(m.Provider,{value:w},i.createElement(b.Provider,{value:{on:k,off:S}},i.createElement(He,null,i.createElement(Le,null,i.createElement(Ve,null,i.createElement(Z,null,i.createElement(ze,null,i.createElement(Oe,null,i.createElement(Xe,null,i.createElement(Ce,null,i.createElement(Se,null,i.createElement(_e,null,t)))))))))))))},rt=("data:application/javascript;charset=utf8,".concat(encodeURIComponent("\n    class AudioLevelProcessor extends AudioWorkletProcessor {\n    volume;\n    interval;\n    nextFrame;\n    \n    constructor() {\n      super();\n      this.volume = 0;\n      this.interval = 25;\n      this.nextFrame = this.interval;\n    }\n    \n    get intervalInFrames() {\n      // sampleRate is globally defined in AudioWorklets.\n      // See https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletGlobalScope\n      // eslint-disable-next-line no-undef\n      return (this.interval / 1000) * sampleRate;\n    }\n    \n    process(inputList) {\n      const firstInput = inputList[0];\n    \n      if (firstInput.length > 0) {\n        const inputData = firstInput[0];\n        let total = 0;\n    \n        for (let i = 0; i < inputData.length; ++i) {\n          total += Math.abs(inputData[i]);\n        }\n    \n        const rms = Math.sqrt(total / inputData.length);\n        this.volume = Math.max(0, Math.min(1, rms));\n    \n        this.nextFrame -= inputData.length;\n        if (this.nextFrame < 0) {\n          this.nextFrame += this.intervalInFrames;\n          this.port.postMessage({ volume: this.volume });\n        }\n      }\n    \n      return true;\n    }\n    }\n    \n    registerProcessor('audiolevel', AudioLevelProcessor);              \n")),function(e,t,n,r){var o=y(),a=ee(),s=e===a;M("local-audio-level",(0,i.useCallback)(function(e){s&&t(e.audioLevel)},[t,s])),M("remote-participants-audio-level",(0,i.useCallback)(function(n){s||t(n.participantsAudioLevel[e])},[t,e,s])),(0,i.useEffect)(function(){if(o&&!o.isDestroyed()&&s&&!o.isLocalAudioLevelObserverRunning())try{o.startLocalAudioLevelObserver(r)}catch(e){null==n||n("Local audio level observer not supported in this browser")}},[o,n,r,s]),(0,i.useEffect)(function(){!o||o.isDestroyed()||s||o.isRemoteParticipantsAudioLevelObserverRunning()||o.startRemoteParticipantsAudioLevelObserver(r)},[o,r,s])}),it=B(Ke?Ye:(Ke=1,Ye=function e(t,n){if(t===n)return!0;
2if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!==i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!==i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!==i--;){var a=o[i];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n})),ot=(0,o.eU)({state:"low",reason:"none"});ot.debugLabel=T("cpu-load");var at=function(e){var t=(void 0===e?{}:e).onCPULoadChange,n=(0,a.md)(ot),o=y(),s=We(),c=(0,r.yF)((0,i.useCallback)(function(e,t,n){var r=e(ot);it(r,n)||t(ot,n)},[]));return(0,i.useEffect)(function(){var e=!0;if(o&&!o.isDestroyed()&&"joined-meeting"===s)return o.getCpuLoadStats().then(function(t){e&&c({state:t.cpuLoadState,reason:t.cpuLoadStateReason})}),function(){e=!1}},[o,s,c]),M("cpu-load-change",(0,i.useCallback)(function(e){c({state:e.cpuLoadState,reason:e.cpuLoadStateReason}),null==t||t(e)},[t,c])),(0,i.useDebugValue)(n),n},st=function(){var e=y(),t=(0,a.md)(he),n=(0,a.md)(ve),r=(0,a.md)(ge),o=(0,a.md)(me),s=(0,a.md)(ye),c=(0,a.md)(be),l=(0,i.useContext)(fe).refreshDevices,u=(0,i.useCallback)(function(t){return p(void 0,void 0,void 0,function(){return f(this,function(n){switch(n.label){case 0:return[4,null==e?void 0:e.setInputDevicesAsync({audioDeviceId:null,videoDeviceId:t})];case 1:return n.sent(),[2]}})})},[e]),d=(0,i.useCallback)(function(t){return p(void 0,void 0,void 0,function(){return f(this,function(n){switch(n.label){case 0:return[4,null==e?void 0:e.setInputDevicesAsync({audioDeviceId:t,videoDeviceId:null})];case 1:return n.sent(),[2]}})})},[e]),h=(0,i.useCallback)(function(t){return p(void 0,void 0,void 0,function(){return f(this,function(n){switch(n.label){case 0:return[4,null==e?void 0:e.setOutputDeviceAsync({outputDeviceId:t})];case 1:return n.sent(),[2]}})})},[e]),v=["blocked","in-use","not-found","constraints-invalid","constraints-none-specified","undefined-mediadevices","unknown"],g={cameraError:c,cameras:r,camState:t,currentCam:r.find(function(e){return e.selected}),currentMic:o.find(function(e){return e.selected}),currentSpeaker:s.find(function(e){return e.selected}),hasCamError:v.includes(t),hasMicError:v.includes(n),microphones:o,micState:n,refreshDevices:l,setCamera:u,setMicrophone:d,setSpeaker:h,speakers:s};return(0,i.useDebugValue)(g),g};
2(0,o.eU)(null).debugLabel=T("input-settings");var ct=function(e){var t=void 0===e?{}:e,n=t.onNetworkConnection,r=t.onNetworkQualityChange,o=y(),s=(0,a.md)(De),c=(0,a.md)(Fe),l=(0,a.md)(Ne),u=(0,a.md)(Re),d=(0,a.md)(Be),h=(0,a.md)(Ue);M("network-connection",(0,i.useCallback)(function(e){null==n||n(e)},[n])),M("network-quality-change",(0,i.useCallback)(function(e){null==r||r(e)},[r]));var v=(0,i.useCallback)(function(){return p(void 0,void 0,void 0,function(){var e;return f(this,function(t){switch(t.label){case 0:return[4,null==o?void 0:o.getNetworkStats()];case 1:return[2,null==(e=t.sent())?void 0:e.stats]}})})},[o]),g={getStats:v,networkState:c,networkStateReasons:l,networkStatus:u,quality:d,threshold:h,topology:s};return(0,i.useDebugValue)(g),g},lt=(0,o.eU)({hidden:0,present:0});lt.debugLabel=T("participant-counts");var ut=function(e){var t=(void 0===e?{}:e).onParticipantCountsUpdated,n=y(),o=(0,a.md)(lt),s=(0,r.yF)((0,i.useCallback)(function(e,t,n){t(lt,n)},[]));return M("participant-counts-updated",(0,i.useCallback)(function(e){s(e.participantCounts),null==t||t(e)},[t,s])),(0,i.useEffect)(function(){n&&!n.isDestroyed()&&s(n.participantCounts())},[n,s]),(0,i.useDebugValue)(o),o},dt=function(e){var t,n,r,o,a,s,c,l,u,d=ee(),p=N(null!=e?e:d,"permissions"),f="boolean"==typeof(null==p?void 0:p.canSend)?null==p?void 0:p.canSend:Boolean(null===(t=null==p?void 0:p.canSend)||void 0===t?void 0:t.has("audio")),h="boolean"==typeof(null==p?void 0:p.canSend)?null==p?void 0:p.canSend:Boolean(null===(n=null==p?void 0:p.canSend)||void 0===n?void 0:n.has("video")),v="boolean"==typeof(null==p?void 0:p.canSend)?null==p?void 0:p.canSend:Boolean(null===(r=null==p?void 0:p.canSend)||void 0===r?void 0:r.has("customAudio")),g="boolean"==typeof(null==p?void 0:p.canSend)?null==p?void 0:p.canSend:Boolean(null===(o=null==p?void 0:p.canSend)||void 0===o?void 0:o.has("customVideo")),m="boolean"==typeof(null==p?void 0:p.canSend)?null==p?void 0:p.canSend:Boolean(null===(a=null==p?void 0:p.canSend)||void 0===a?void 0:a.has("screenAudio")),y="boolean"==typeof(null==p?void 0:p.canSend)?null==p?void 0:p.canSend:Boolean(null===(s=null==p?void 0:p.canSend)||void 0===s?void 0:s.has("screenVideo")),b={canAdminParticipants:"boolean"==typeof(null==p?void 0:p.canAdmin)?null==p?void 0:p.canAdmin:Boolean(null===(c=null==p?void 0:p.canAdmin)||void 0===c?void 0:c.has("participants")),canAdminStreaming:"boolean"==typeof(null==p?void 0:p.canAdmin)?null==p?void 0:p.canAdmin:Boolean(null===(l=null==p?void 0:p.canAdmin)||void 0===l?void 0:l.has("streaming")),canAdminTranscription:"boolean"==typeof(null==p?void 0:p.canAdmin)?null==p?void 0:p.canAdmin:Boolean(null===(u=null==p?void 0:p.canAdmin)||void 0===u?void 0:u.has("transcription")),canSendAudio:f,canSendCustomAudio:v,canSendCustomVideo:g,canSendScreenAudio:m,canSendScreenVideo:y,canSendVideo:h,hasPresence:null==p?void 0:p.hasPresence,permissions:p};return(0,i.useDebugValue)(b),b},pt=(0,s.I)(function(e){var t=(0,o.eU)({},function(t,n,r){n(pt(e),r)});return t.debugLabel=T("participant-receive-settings-".concat(e)),t}),ft={isLocalParticipantRecorded:!1,isRecording:!1},ht=function(e){var t=void 0===e?{}:e,n=t.instanceId,r=t.onRecordingData,o=t.onRecordingError,s=t.onRecordingStarted,c=t.onRecordingStopped,l=y(),d=(0,a.md)($e),p=(0,a.md)(qe),f=(0,i.useMemo)(function(){var e;return n?null!==(e=p[n])&&void 0!==e?e:u(u({},ft),{instanceId:n}):d},[n,d,p]);M("recording-started",(0,i.useCallback)(function(e){n&&e.instanceId!==n||null==s||s(e)},[n,s])),M("recording-stopped",(0,i.useCallback)(function(e){n&&e.instanceId!==n||null==c||c(e)},[n,c])),M("recording-error",(0,i.useCallback)(function(e){n&&e.instanceId!==n||null==o||o(e)},[n,o])),M("recording-data",(0,i.useCallback)(function(e){null==r||r(e)},[r]));var h=(0,i.useCallback)(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];l&&l.startRecording.apply(l,g([],v(e),!1))},[l]),m=(0,i.useCallback)(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];l&&l.stopRecording.apply(l,g([],v(e),!1))},[l]),b=(0,i.useCallback)(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];l&&l.updateRecording.apply(l,g([],v(e),!1))},[l]),_=u(u({},f),{startRecording:h,stopRecording:m,updateRecording:b});return(0,i.useDebugValue)(_),_};(0,o.eU)(null).debugLabel=T("send-settings");var vt=function(e){var t=void 0===e?{}:e,n=t.onTranscriptionAppData,r=t.onTranscriptionError,o=t.onTranscriptionMessage,s=t.onTranscriptionStarted,c=t.onTranscriptionStopped,l=y(),d=(0,a.md)(Qe);M("transcription-started",(0,i.useCallback)(function(e){null==s||s(e)},[s])),M("transcription-stopped",(0,i.useCallback)(function(e){null==c||c(e)},[c])),M("transcription-error",(0,i.useCallback)(function(e){null==r||r(e)},[r])),M("transcription-message",(0,i.useCallback)(function(e){null==o||o(e)},[o])),M("app-message",(0,i.useCallback)(function(e){"transcription"===(null==e?void 0:e.fromId)&&(null==n||n(e))},[n]));var p=(0,i.useCallback)(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];l&&l.startTranscription.apply(l,g([],v(e),!1))},[l]),f=(0,i.useCallback)(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];l&&l.stopTranscription.apply(l,g([],v(e),!1))},[l]),h=u(u({},d),{startTranscription:p,stopTranscription:f});return(0,i.useDebugValue)(h),h}},16654(e){e.exports={rE:"0.92.2"}}}]);
3//# sourceMappingURL=daily.65ef3e8a.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.