PageSourceSearch

https://syrenn.co/_next/static/chunks/d50e61c5-9c5a68e1603199a0.js

js syrenn.co collected 2026-09-24 08:59:29 UTC 218,957 bytes, 19 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9778],{45208:(t,r,n)=>{let i,a,o,s,c,l;n.r(r),n.d(r,{DAILY_ACCESS_LEVEL_FULL:()=>rD,DAILY_ACCESS_LEVEL_LOBBY:()=>rP,DAILY_ACCESS_LEVEL_NONE:()=>rN,DAILY_ACCESS_UNKNOWN:()=>rI,DAILY_CAMERA_ERROR_CAM_AND_MIC_IN_USE:()=>rz,DAILY_CAMERA_ERROR_CAM_IN_USE:()=>rJ,DAILY_CAMERA_ERROR_CONSTRAINTS:()=>rX,DAILY_CAMERA_ERROR_MIC_IN_USE:()=>rW,DAILY_CAMERA_ERROR_NOT_FOUND:()=>rQ,DAILY_CAMERA_ERROR_PERMISSIONS:()=>rH,DAILY_CAMERA_ERROR_UNDEF_MEDIADEVICES:()=>rK,DAILY_CAMERA_ERROR_UNKNOWN:()=>rZ,DAILY_EVENT_ACCESS_STATE_UPDATED:()=>no,DAILY_EVENT_ACTIVE_SPEAKER_CHANGE:()=>nP,DAILY_EVENT_ACTIVE_SPEAKER_MODE_CHANGE:()=>nN,DAILY_EVENT_APP_MSG:()=>nw,DAILY_EVENT_CAMERA_ERROR:()=>r8,DAILY_EVENT_CPU_LOAD_CHANGE:()=>nx,DAILY_EVENT_ERROR:()=>nz,DAILY_EVENT_EXIT_FULLSCREEN:()=>nB,DAILY_EVENT_FACE_COUNTS_UPDATED:()=>nj,DAILY_EVENT_FULLSCREEN:()=>nF,DAILY_EVENT_IFRAME_LAUNCH_CONFIG:()=>r1,DAILY_EVENT_IFRAME_READY_FOR_LAUNCH_CONFIG:()=>r0,DAILY_EVENT_INPUT_SETTINGS_UPDATED:()=>nJ,DAILY_EVENT_JOINED_MEETING:()=>r7,DAILY_EVENT_JOINING_MEETING:()=>r9,DAILY_EVENT_LANG_UPDATED:()=>n$,DAILY_EVENT_LEFT_MEETING:()=>ne,DAILY_EVENT_LIVE_STREAMING_ERROR:()=>nG,DAILY_EVENT_LIVE_STREAMING_STARTED:()=>nU,DAILY_EVENT_LIVE_STREAMING_STOPPED:()=>nY,DAILY_EVENT_LIVE_STREAMING_UPDATED:()=>nV,DAILY_EVENT_LOADED:()=>r6,DAILY_EVENT_LOADING:()=>r4,DAILY_EVENT_LOAD_ATTEMPT_FAILED:()=>r3,DAILY_EVENT_LOCAL_SCREEN_SHARE_CANCELED:()=>nD,DAILY_EVENT_LOCAL_SCREEN_SHARE_STARTED:()=>nO,DAILY_EVENT_LOCAL_SCREEN_SHARE_STOPPED:()=>nI,DAILY_EVENT_MEETING_SESSION_DATA_ERROR:()=>nl,DAILY_EVENT_MEETING_SESSION_STATE_UPDATED:()=>nc,DAILY_EVENT_MEETING_SESSION_SUMMARY_UPDATED:()=>ns,DAILY_EVENT_NETWORK_CONNECTION:()=>nR,DAILY_EVENT_NETWORK_QUALITY_CHANGE:()=>nL,DAILY_EVENT_NONFATAL_ERROR:()=>nW,DAILY_EVENT_PARTICIPANT_COUNTS_UPDATED:()=>na,DAILY_EVENT_PARTICIPANT_JOINED:()=>nr,DAILY_EVENT_PARTICIPANT_LEFT:()=>ni,DAILY_EVENT_PARTICIPANT_UPDATED:()=>nn,DAILY_EVENT_RECEIVE_SETTINGS_UPDATED:()=>nq,DAILY_EVENT_RECORDING_DATA:()=>nk,DAILY_EVENT_RECORDING_ERROR:()=>nS,DAILY_EVENT_RECORDING_STARTED:()=>nv,DAILY_EVENT_RECORDING_STATS:()=>nb,DAILY_EVENT_RECORDING_STOPPED:()=>ny,DAILY_EVENT_RECORDING_UPLOAD_COMPLETED:()=>nE,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STARTED:()=>nM,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STOPPED:()=>nA,DAILY_EVENT_REMOTE_MEDIA_PLAYER_UPDATED:()=>nC,DAILY_EVENT_STARTED_CAMERA:()=>r5,DAILY_EVENT_THEME_UPDATED:()=>r2,DAILY_EVENT_TRACK_STARTED:()=>np,DAILY_EVENT_TRACK_STOPPED:()=>nf,DAILY_EVENT_TRANSCRIPTION_ERROR:()=>n_,DAILY_EVENT_TRANSCRIPTION_MSG:()=>nT,DAILY_EVENT_TRANSCRIPTION_STARTED:()=>ng,DAILY_EVENT_TRANSCRIPTION_STOPPED:()=>nm,DAILY_EVENT_WAITING_PARTICIPANT_ADDED:()=>nu,DAILY_EVENT_WAITING_PARTICIPANT_REMOVED:()=>nh,DAILY_EVENT_WAITING_PARTICIPANT_UPDATED:()=>nd,DAILY_FATAL_ERROR_CONNECTION:()=>rq,DAILY_FATAL_ERROR_EJECTED:()=>rx,DAILY_FATAL_ERROR_EOL:()=>rG,DAILY_FATAL_ERROR_EXP_ROOM:()=>rB,DAILY_FATAL_ERROR_EXP_TOKEN:()=>rU,DAILY_FATAL_ERROR_MEETING_FULL:()=>rY,DAILY_FATAL_ERROR_NBF_ROOM:()=>rj,DAILY_FATAL_ERROR_NBF_TOKEN:()=>rF,DAILY_FATAL_ERROR_NOT_ALLOWED:()=>r$,DAILY_FATAL_ERROR_NO_ROOM:()=>rV,DAILY_RECEIVE_SETTINGS_ALL_PARTICIPANTS_KEY:()=>rR,DAILY_RECEIVE_SETTINGS_BASE_KEY:()=>rL,DAILY_STATE_ERROR:()=>rk,DAILY_STATE_JOINED:()=>rS,DAILY_STATE_JOINING:()=>rb,DAILY_STATE_LEFT:()=>rE,DAILY_STATE_NEW:()=>r_,DAILY_TRACK_STATE_BLOCKED:()=>rw,DAILY_TRACK_STATE_INTERRUPTED:()=>rA,DAILY_TRACK_STATE_LOADING:()=>rC,DAILY_TRACK_STATE_OFF:()=>rT,DAILY_TRACK_STATE_PLAYABLE:()=>rO,DAILY_TRACK_STATE_SENDABLE:()=>rM,default:()=>ar}),t=n.hmd(t);var u=n(88023);function d(t,r){if(null==t)return{};var n,i,a=function(t,r){if(null==t)return{};var n,i,a={},o=Object.keys(t);for(i=0;i<o.length;i++)n=o[i],r.indexOf(n)>=0||(a[n]=t[n]);return a}(t,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],r.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}function h(t,r){if(!(t instanceof r))throw TypeError("Cannot call a class as a function")}function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t){var r=function(t,r){if("object"!==p(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,r||"default");if("object"!==p(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}
1(t,"string");return"symbol"===p(r)?r:String(r)}function g(t,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,f(i.key),i)}}function m(t,r,n){return r&&g(t.prototype,r),n&&g(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function _(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t,r){return(v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t})(t,r)}function y(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&v(t,r)}function b(t,r){if(r&&("object"===p(r)||"function"==typeof r))return r;if(void 0!==r)throw TypeError("Derived constructors may only return object or undefined");return _(t)}function S(t){return(S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function E(t,r,n){return(r=f(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function k(t,r,n,i,a,o,s){try{var c=t[o](s),l=c.value}catch(t){return void n(t)}c.done?r(l):Promise.resolve(l).then(i,a)}function w(t){return function(){var r=this,n=arguments;return new Promise(function(i,a){var o=t.apply(r,n);function s(t){k(o,i,a,s,c,"next",t)}function c(t){k(o,i,a,s,c,"throw",t)}s(void 0)})}}function T(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,i=Array(r);n<r;n++)i[n]=t[n];return i}function M(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,a,o,s,c=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===r){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(c.push(i.value),c.length!==r);l=!0);}catch(t){u=!0,a=t}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}(t,r)||function(t,r){if(t){if("string"==typeof t)return T(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(t,r):void 0}}(t,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var C,A={},O="object"==typeof Reflect?Reflect:null,I=O&&"function"==typeof O.apply?O.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)};C=O&&"function"==typeof O.ownKeys?O.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var D=Number.isNaN||function(t){return t!=t};function P(){P.init.call(this)}({get exports(){return A},set exports(e){A=e}}).exports=P,A.once=function(t,r){return new Promise(function(n,i){var a;function o(n){t.removeListener(r,s),i(n)}function s(){"function"==typeof t.removeListener&&t.removeListener("error",o),n([].slice.call(arguments))}Y(t,r,s,{once:!0}),"error"!==r&&(a={once:!0},"function"==typeof t.on&&Y(t,"error",o,a))})},P.EventEmitter=P,P.prototype._events=void 0,P.prototype._eventsCount=0,P.prototype._maxListeners=void 0;var N=10;function L(t){if("function"!=typeof t)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function R(t){return void 0===t._maxListeners?P.defaultMaxListeners:t._maxListeners}function x(t,r,n,i){var a,o,s;if(L(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",r,n.listener?n.listener:n),o=t._events),s=o[r]),void 0===s)s=o[r]=n,++t._eventsCount;else if("function"==typeof s?s=o[r]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(a=R(t))>0&&s.length>a&&!s.warned){s.warned=!0;var c=Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=r,c.count=s.length,console&&console.warn&&console.warn(c)}return t}function j(){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 F(t,r,n){var i={fired:!1,wrapFn:void 0,target:t,type:r,listener:n},a=j.bind(i);return a.listener=n,i.wrapFn=a,a}function B(t,r,n){var i=t._events;if(void 0===i)return[];var a=i[r];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(t){for(var r=Array(t.length),n=0;n<r.length;++n)r[n]=t[n].listener||t[n];return r}(a):V(a,a.length)}function U(t){var r=this._events;if(void 0!==r){var n=r[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function V(t,r){for(var n=Array(r),i=0;i<r;++i)n[i]=t[i];return n}function Y(t,r,n,i){if("function"==typeof t.on)i.once?t.once(r,n):t.on(r,n);else{if("function"!=typeof t.addEventListener)throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(r,function a(o){i.once&&t.removeEventListener(r,a),n(o)})}}Object.defineProperty(P,"defaultMaxListeners",{enumerable:!0,get:function(){return N},set:function(t){if("number"!=typeof t||t<0||D(t))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");N=t}}
1),P.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},P.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||D(t))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},P.prototype.getMaxListeners=function(){return R(this)},P.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i="error"===t,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){if(r.length>0&&(o=r[0]),o instanceof Error)throw o;var o,s=Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=a[t];if(void 0===c)return!1;if("function"==typeof c)I(c,this,r);else{var l=c.length,u=V(c,l);for(n=0;n<l;++n)I(u[n],this,r)}return!0},P.prototype.addListener=function(t,r){return x(this,t,r,!1)},P.prototype.on=P.prototype.addListener,P.prototype.prependListener=function(t,r){return x(this,t,r,!0)},P.prototype.once=function(t,r){return L(r),this.on(t,F(this,t,r)),this},P.prototype.prependOnceListener=function(t,r){return L(r),this.prependListener(t,F(this,t,r)),this},P.prototype.removeListener=function(t,r){var n,i,a,o,s;if(L(r),void 0===(i=this._events)||void 0===(n=i[t]))return this;if(n===r||n.listener===r)0==--this._eventsCount?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||r));else if("function"!=typeof n){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(t,r){for(;r+1<t.length;r++)t[r]=t[r+1];t.pop()}(n,a),1===n.length&&(i[t]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",t,s||r)}return this},P.prototype.off=P.prototype.removeListener,P.prototype.removeAllListeners=function(t){var r,n,i;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[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0==arguments.length){var a,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(a=o[i])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(r=n[t]))this.removeListener(t,r);else if(void 0!==r)for(i=r.length-1;i>=0;i--)this.removeListener(t,r[i]);return this},P.prototype.listeners=function(t){return B(this,t,!0)},P.prototype.rawListeners=function(t){return B(this,t,!1)},P.listenerCount=function(t,r){return"function"==typeof t.listenerCount?t.listenerCount(r):U.call(t,r)},P.prototype.listenerCount=U,P.prototype.eventNames=function(){return this._eventsCount>0?C(this._events):[]};var G=Object.prototype.hasOwnProperty;function $(t,r,n){for(n of t.keys())if(q(n,r))return n}function q(t,r){var n,i,a;if(t===r)return!0;if(t&&r&&(n=t.constructor)===r.constructor){if(n===Date)return t.getTime()===r.getTime();if(n===RegExp)return t.toString()===r.toString();if(n===Array){if((i=t.length)===r.length)for(;i--&&q(t[i],r[i]););return -1===i}if(n===Set){if(t.size!==r.size)return!1;for(i of t)if((a=i)&&"object"==typeof a&&!(a=$(r,a))||!r.has(a))return!1;return!0}if(n===Map){if(t.size!==r.size)return!1;for(i of t)if((a=i[0])&&"object"==typeof a&&!(a=$(r,a))||!q(i[1],r.get(a)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),r=new Uint8Array(r);else if(n===DataView){if((i=t.byteLength)===r.byteLength)for(;i--&&t.getInt8(i)===r.getInt8(i););return -1===i}if(ArrayBuffer.isView(t)){if((i=t.byteLength)===r.byteLength)for(;i--&&t[i]===r[i];);return -1===i}if(!n||"object"==typeof t){for(n in i=0,t)if(G.call(t,n)&&++i&&!G.call(r,n)||!(n in r)||!q(t[n],r[n]))return!1;return Object.keys(r).length===i}}return t!=t&&r!=r}let J={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},W={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},z={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},H={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},K={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class Q{static getFirstMatch(t,r){let n=r.match(t);return n&&n.length>0&&n[1]||""}static getSecondMatch(t,r){let n=r.match(t);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(t,r,n){if(t.test(r))return n}
1static getWindowsVersionName(t){switch(t){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(t){let r=t.split(".").splice(0,2).map(t=>parseInt(t,10)||0);if(r.push(0),10===r[0])switch(r[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){let r=t.split(".").splice(0,2).map(t=>parseInt(t,10)||0);if(r.push(0),!(1===r[0]&&r[1]<5))return 1===r[0]&&r[1]<6?"Cupcake":1===r[0]&&r[1]>=6?"Donut":2===r[0]&&r[1]<2?"Eclair":2===r[0]&&2===r[1]?"Froyo":2===r[0]&&r[1]>2?"Gingerbread":3===r[0]?"Honeycomb":4===r[0]&&r[1]<1?"Ice Cream Sandwich":4===r[0]&&r[1]<4?"Jelly Bean":4===r[0]&&r[1]>=4?"KitKat":5===r[0]?"Lollipop":6===r[0]?"Marshmallow":7===r[0]?"Nougat":8===r[0]?"Oreo":9===r[0]?"Pie":void 0}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,r,n=!1){let i=Q.getVersionPrecision(t),a=Q.getVersionPrecision(r),o=Math.max(i,a),s=0,c=Q.map([t,r],t=>{let r=o-Q.getVersionPrecision(t),n=t+Array(r+1).join(".0");return Q.map(n.split("."),t=>Array(20-t.length).join("0")+t).reverse()});for(n&&(s=o-Math.min(i,a)),o-=1;o>=s;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===s)return 0;o-=1}else if(c[0][o]<c[1][o])return -1}}static map(t,r){let n;let i=[];if(Array.prototype.map)return Array.prototype.map.call(t,r);for(n=0;n<t.length;n+=1)i.push(r(t[n]));return i}static find(t,r){let n,i;if(Array.prototype.find)return Array.prototype.find.call(t,r);for(n=0,i=t.length;n<i;n+=1){let i=t[n];if(r(i,n))return i}}static assign(t,...r){let n,i;if(Object.assign)return Object.assign(t,...r);for(n=0,i=r.length;n<i;n+=1){let i=r[n];
1"object"==typeof i&&null!==i&&Object.keys(i).forEach(r=>{t[r]=i[r]})}return t}static getBrowserAlias(t){return J[t]}static getBrowserTypeByAlias(t){return W[t]||""}}let X=/version\/(\d+(\.?_?\d+)+)/i,Z=[{test:[/googlebot/i],describe(t){let r={name:"Googlebot"},n=Q.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||Q.getFirstMatch(X,t);return n&&(r.version=n),r}},{test:[/opera/i],describe(t){let r={name:"Opera"},n=Q.getFirstMatch(X,t)||Q.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/opr\/|opios/i],describe(t){let r={name:"Opera"},n=Q.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||Q.getFirstMatch(X,t);return n&&(r.version=n),r}},{test:[/SamsungBrowser/i],describe(t){let r={name:"Samsung Internet for Android"},n=Q.getFirstMatch(X,t)||Q.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/Whale/i],describe(t){let r={name:"NAVER Whale Browser"},n=Q.getFirstMatch(X,t)||Q.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/MZBrowser/i],describe(t){let r={name:"MZ Browser"},n=Q.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||Q.getFirstMatch(X,t);return n&&(r.version=n),r}},{test:[/focus/i],describe(t){let r={name:"Focus"},n=Q.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||Q.getFirstMatch(X,t);return n&&(r.version=n),r}},{test:[/swing/i],describe(t){let r={name:"Swing"},n=Q.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||Q.getFirstMatch(X,t);return n&&(r.version=n),r}},{test:[/coast/i],describe(t){let r={name:"Opera Coast"},n=Q.getFirstMatch(X,t)||Q.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){let r={name:"Opera Touch"},n=Q.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||Q.getFirstMatch(X,t);return n&&(r.version=n),r}},{test:[/yabrowser/i],describe(t){let r={name:"Yandex Browser"},n=Q.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||Q.getFirstMatch(X,t);return n&&(r.version=n),r}},{test:[/ucbrowser/i],describe(t){let r={name:"UC Browser"},n=Q.getFirstMatch(X,t)||Q.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/Maxthon|mxios/i],describe(t){let r={name:"Maxthon"},n=Q.getFirstMatch(X,t)||Q.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/epiphany/i],describe(t){let r={name:"Epiphany"},n=Q.getFirstMatch(X,t)||Q.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/puffin/i],describe(t){let r={name:"Puffin"},n=Q.getFirstMatch(X,t)||Q.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/sleipnir/i],describe(t){let r={name:"Sleipnir"},n=Q.getFirstMatch(X,t)||Q.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/k-meleon/i],describe(t){let r={name:"K-Meleon"},n=Q.getFirstMatch(X,t)||Q.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/micromessenger/i],describe(t){let r={name:"WeChat"},n=Q.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||Q.getFirstMatch(X,t);return n&&(r.version=n),r}},{test:[/qqbrowser/i],describe(t){let r={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=Q.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||Q.getFirstMatch(X,t);return n&&(r.version=n),r}},{test:[/msie|trident/i],describe(t){let r={name:"Internet Explorer"},n=Q.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/\sedg\//i],describe(t){let r={name:"Microsoft Edge"},n=Q.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/edg([ea]|ios)/i],describe(t){let r={name:"Microsoft Edge"},n=Q.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/vivaldi/i],describe(t){let r={name:"Vivaldi"},n=Q.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/seamonkey/i],describe(t){let r={name:"SeaMonkey"},n=Q.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/sailfish/i],describe(t){let r={name:"Sailfish"},n=Q.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(r.version=n),r}},{test:[/silk/i],describe(t){let r={name:"Amazon Silk"},n=Q.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/phantom/i],describe(t){let r={name:"PhantomJS"},n=Q.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/slimerjs/i],describe(t){let r={name:"SlimerJS"},n=Q.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let r={name:"BlackBerry"},n=Q.getFirstMatch(X,t)||Q.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/(web|hpw)[o0]s/i],describe(t){let r={name:"WebOS Browser"},n=Q.getFirstMatch(X,t)||Q.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/bada/i],describe(t){let r={name:"Bada"},n=Q.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/tizen/i],describe(t){let r={name:"Tizen"},n=Q.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||Q.getFirstMatch(X,t);return n&&(r.version=n),r}},{test:[/qupzilla/i],describe(t){let r={name:"QupZilla"},n=Q.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||Q.getFirstMatch(X,t);return n&&(r.version=n),r}},{test:[/firefox|iceweasel|fxios/i],describe(t){let r={name:"Firefox"},n=Q.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/electron/i],describe(t){let r={name:"Electron"},n=Q.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/MiuiBrowser/i],describe(t){let r={name:"Miui"},n=Q.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/chromium/i],describe(t){let r={name:"Chromium"},n=Q.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||Q.getFirstMatch(X,t);return n&&(r.version=n),r}},{test:[/chrome|crios|crmo/i],describe(t){let r={name:"Chrome"},n=Q.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/GSA/i],describe(t){let r={name:"Google Search"},n=Q.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test(t){let r=!t.test(/like android/i),n=t.test(/android/i);return r&&n},describe(t){let r={name:"Android Browser"},n=Q.getFirstMatch(X,t);return n&&(r.version=n),r}},{test:[/playstation 4/i],describe(t){let r={name:"PlayStation 4"},n=Q.getFirstMatch(X,t);return n&&(r.version=n),r}},{test:[/safari|applewebkit/i],describe(t){let r={name:"Safari"},n=Q.getFirstMatch(X,t);return n&&(r.version=n),r}},{test:[/.*/i],describe(t){let r=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:Q.getFirstMatch(r,t),version:Q.getSecondMatch(r,t)}}}];var ee=[{test:[/Roku\/DVP/],describe(t){let r=Q.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:H.Roku,version:r}}},{test:[/windows phone/i],describe(t){let r=Q.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:H.WindowsPhone,version:r}}},{test:[/windows /i],describe(t){let r=Q.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=Q.getWindowsVersionName(r);return{name:H.Windows,version:r,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){let r={name:H.iOS},n=Q.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(r.version=n),r}},{test:[/macintosh/i],describe(t){let r=Q.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=Q.getMacOSVersionName(r),i={n
1ame:H.MacOS,version:r};return n&&(i.versionName=n),i}},{test:[/(ipod|iphone|ipad)/i],describe(t){let r=Q.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:H.iOS,version:r}}},{test(t){let r=!t.test(/like android/i),n=t.test(/android/i);return r&&n},describe(t){let r=Q.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=Q.getAndroidVersionName(r),i={name:H.Android,version:r};return n&&(i.versionName=n),i}},{test:[/(web|hpw)[o0]s/i],describe(t){let r=Q.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:H.WebOS};return r&&r.length&&(n.version=r),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let r=Q.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||Q.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||Q.getFirstMatch(/\bbb(\d+)/i,t);return{name:H.BlackBerry,version:r}}},{test:[/bada/i],describe(t){let r=Q.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:H.Bada,version:r}}},{test:[/tizen/i],describe(t){let r=Q.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:H.Tizen,version:r}}},{test:[/linux/i],describe:()=>({name:H.Linux})},{test:[/CrOS/],describe:()=>({name:H.ChromeOS})},{test:[/PlayStation 4/],describe(t){let r=Q.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:H.PlayStation4,version:r}}}],et=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(t){let r=Q.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:z.mobile,vendor:"Huawei"};return r&&(n.model=r),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:z.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:z.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:z.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:z.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:z.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:z.tablet})},{test(t){let r=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return r&&!n},describe(t){let r=Q.getFirstMatch(/(ipod|iphone)/i,t);return{type:z.mobile,vendor:"Apple",model:r}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:z.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:z.mobile})},{test:t=>"blackberry"===t.getBrowserName(!0),describe:()=>({type:z.mobile,vendor:"BlackBerry"})},{test:t=>"bada"===t.getBrowserName(!0),describe:()=>({type:z.mobile})},{test:t=>"windows phone"===t.getBrowserName(),describe:()=>({type:z.mobile,vendor:"Microsoft"})}
1,{test(t){let r=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&r>=3},describe:()=>({type:z.tablet})},{test:t=>"android"===t.getOSName(!0),describe:()=>({type:z.mobile})},{test:t=>"macos"===t.getOSName(!0),describe:()=>({type:z.desktop,vendor:"Apple"})},{test:t=>"windows"===t.getOSName(!0),describe:()=>({type:z.desktop})},{test:t=>"linux"===t.getOSName(!0),describe:()=>({type:z.desktop})},{test:t=>"playstation 4"===t.getOSName(!0),describe:()=>({type:z.tv})},{test:t=>"roku"===t.getOSName(!0),describe:()=>({type:z.tv})}],er=[{test:t=>"microsoft edge"===t.getBrowserName(!0),describe(t){if(/\sedg\//i.test(t))return{name:K.Blink};let r=Q.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:K.EdgeHTML,version:r}}},{test:[/trident/i],describe(t){let r={name:K.Trident},n=Q.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:t=>t.test(/presto/i),describe(t){let r={name:K.Presto},n=Q.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test(t){let r=t.test(/gecko/i),n=t.test(/like gecko/i);return r&&!n},describe(t){let r={name:K.Gecko},n=Q.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:K.Blink})},{test:[/(apple)?webkit/i],describe(t){let r={name:K.WebKit},n=Q.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(r.version=n),r}}];class en{constructor(t,r=!1){if(null==t||""===t)throw Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},!0!==r&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let t=Q.find(Z,t=>{if("function"==typeof t.test)return t.test(this);if(t.test instanceof Array)return t.test.some(t=>this.test(t));throw Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?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={};let t=Q.find(ee,t=>{if("function"==typeof t.test)return t.test(this);if(t.test instanceof Array)return t.test.some(t=>this.test(t));throw Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){let{name:r}=this.getOS();return t?String(r).toLowerCase()||"":r||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){let{type:r}=this.getPlatform();return t?String(r).toLowerCase()||"":r||""}parsePlatform(){this.parsedResult.platform={};let t=Q.find(et,t=>{if("function"==typeof t.test)return t.test(this);if(t.test instanceof Array)return t.test.some(t=>this.test(t));throw Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let t=Q.find(er,t=>{if("function"==typeof t.test)return t.test(this);if(t.test instanceof Array)return t.test.some(t=>this.test(t));throw Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return Q.assign({},this.parsedResult)}satisfies(t){let r={},n=0,i={},a=0;if(Object.keys(t).forEach(o=>{let s=t[o];"string"==typeof s?(i[o]=s,a+=1):"object"==typeof s&&(r[o]=s,n+=1)}),n>0){let t=Object.keys(r),n=Q.find(t,t=>this.isOS(t));if(n){let t=this.satisfies(r[n]);if(void 0!==t)return t}let i=Q.find(t,t=>this.isPlatform(t));if(i){let t=this.satisfies(r[i]);if(void 0!==t)return t}}if(a>0){let t=Object.keys(i),r=Q.find(t,t=>this.isBrowser(t,!0));if(void 0!==r)return this.compareVersion(i[r])}}isBrowser(t,r=!1){let n=this.getBrowserName().toLowerCase(),i=t.toLowerCase(),a=Q.getBrowserTypeByAlias(i);return r&&a&&(i=a.toLowerCase()),i===n}
1compareVersion(t){let r=[0],n=t,i=!1,a=this.getBrowserVersion();if("string"==typeof a)return">"===t[0]||"<"===t[0]?(n=t.substr(1),"="===t[1]?(i=!0,n=t.substr(2)):r=[],">"===t[0]?r.push(1):r.push(-1)):"="===t[0]?n=t.substr(1):"~"===t[0]&&(i=!0,n=t.substr(1)),r.indexOf(Q.compareVersions(a,n,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,r=!1){return this.isBrowser(t,r)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(t=>this.is(t))}}/*!
2 * Bowser - a browser detector
3 * https://github.com/lancedikson/bowser
4 * MIT License | (c) Dustin Diaz 2012-2015
5 * MIT License | (c) Denis Demchenko 2015-2019
6 */class ei{static getParser(t,r=!1){if("string"!=typeof t)throw Error("UserAgent should be a string");return new en(t,r)}static parse(t){return new en(t).getResult()}static get BROWSER_MAP(){return W}static get ENGINE_MAP(){return K}static get OS_MAP(){return H}static get PLATFORMS_MAP(){return z}}function ea(){return Date.now()+Math.random().toString()}function eo(){throw Error("Method must be implemented in subclass")}function es(t,r){return null!=r&&r.proxyUrl?r.proxyUrl+("/"===r.proxyUrl.slice(-1)?"":"/")+t.substring(8):t}function ec(t){return null!=t&&t.callObjectBundleUrlOverride?t.callObjectBundleUrlOverride:es("https://c.daily.co/call-machine/versioned/".concat("0.66.0","/static/call-machine-object-bundle.js"),t)}function el(t){try{new URL(t)}catch(t){return!1}return!0}let eu=Object.prototype.toString;function ed(t){switch(eu.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return eb(t,Error)}}function eh(t,r){return eu.call(t)===`[object ${r}]`}function ep(t){return eh(t,"ErrorEvent")}function ef(t){return eh(t,"DOMError")}function eg(t){return eh(t,"String")}function em(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function e_(t){return eh(t,"Object")}function ev(t){return"undefined"!=typeof Event&&eb(t,Event)}function ey(t){return!!(t&&t.then&&"function"==typeof t.then)}function eb(t,r){try{return t instanceof r}catch(t){return!1}}function eS(t,r=0){return"string"!=typeof t||0===r||t.length<=r?t:`${t.slice(0,r)}...`}function eE(t,r){if(!Array.isArray(t))return"";let n=[];for(let r=0;r<t.length;r++){let i=t[r];try{n.push(String(i))}catch(t){n.push("[value cannot be serialized]")}}return n.join(r)}function ek(t,r=[],n=!1){return r.some(r=>(function(t,r,n=!1){return!!eg(t)&&(eh(r,"RegExp")?r.test(t):!!eg(r)&&(n?t===r:t.includes(r)))})(t,r,n))}function ew(t,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,is_exception_group:!0,exception_id:r}}function eT(t,r,n,i){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:r,exception_id:n,parent_id:i}}function eM(t){return t&&t.Math==Math?t:void 0}let eC="object"==typeof globalThis&&eM(globalThis)||"object"==typeof window&&eM(window)||"object"==typeof self&&eM(self)||"object"==typeof n.g&&eM(n.g)||function(){return this}()||{};function eA(t,r,n){let i=n||eC,a=i.__SENTRY__=i.__SENTRY__||{};return a[t]||(a[t]=r())}function eO(t,r={}){try{let n,i=t,a=[],o=0,s=0,c=Array.isArray(r)?r:r.keyAttrs,l=!Array.isArray(r)&&r.maxStringLength||80;for(;i&&o++<5&&(n=function(t,r){let n,i,a,o,s;let c=[];if(!t||!t.tagName)return"";c.push(t.tagName.toLowerCase());let l=r&&r.length?r.filter(r=>t.getAttribute(r)).map(r=>[r,t.getAttribute(r)]):null;if(l&&l.length)l.forEach(t=>{c.push(`[${t[0]}="${t[1]}"]`)});else if(t.id&&c.push(`#${t.id}`),(n=t.className)&&eg(n))for(i=n.split(/\s+/),s=0;s<i.length;s++)c.push(`.${i[s]}`);let u=["aria-label","type","name","title","alt"];for(s=0;s<u.length;s++)a=u[s],(o=t.getAttribute(a))&&c.push(`[${a}="${o}"]`);return c.join("")}(i,c),!("html"===n||o>1&&s+3*a.length+n.length>=l));)a.push(n),s+=n.length,i=i.parentNode;return a.reverse().join(" > ")}catch(t){return"<unknown>"}}let eI=["debug","info","warn","error","log","assert","trace"];function eD(t){if(!("console"in eC))return t();let r=eC.console,n={};eI.forEach(t=>{let i=r[t]&&r[t].__sentry_original__;t in r&&i&&(n[t]=r[t],r[t]=i)});try{return t()}
6finally{Object.keys(n).forEach(t=>{r[t]=n[t]})}}function eP(){let t=!1,r={enable:()=>{t=!0},disable:()=>{t=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?eI.forEach(n=>{r[n]=(...r)=>{t&&eD(()=>{eC.console[n](`Sentry Logger [${n}]:`,...r)})}}):eI.forEach(t=>{r[t]=()=>{}}),r}i="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?eA("logger",eP):eP();let eN=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function eL(t,r=!1){let{host:n,path:i,pass:a,port:o,projectId:s,protocol:c,publicKey:l}=t;return`${c}://${l}${r&&a?`:${a}`:""}@${n}${o?`:${o}`:""}/${i?`${i}/`:i}${s}`}function eR(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}class ex extends Error{constructor(t,r="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}}function ej(t,r,n){if(!(r in t))return;let i=t[r],a=n(i);if("function"==typeof a)try{eB(a,i)}catch(t){}t[r]=a}function eF(t,r,n){Object.defineProperty(t,r,{value:n,writable:!0,configurable:!0})}function eB(t,r){let n=r.prototype||{};t.prototype=r.prototype=n,eF(t,"__sentry_original__",r)}function eU(t){return t.__sentry_original__}function eV(t){if(ed(t))return{message:t.message,name:t.name,stack:t.stack,...eG(t)};if(ev(t)){let r={type:t.type,target:eY(t.target),currentTarget:eY(t.currentTarget),...eG(t)};return"undefined"!=typeof CustomEvent&&eb(t,CustomEvent)&&(r.detail=t.detail),r}return t}function eY(t){try{return"undefined"!=typeof Element&&eb(t,Element)?eO(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}}function eG(t){if("object"==typeof t&&null!==t){let r={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}return{}}function e$(t){return function t(r,n){if(e_(r)){let i=n.get(r);if(void 0!==i)return i;let a={};for(let i of(n.set(r,a),Object.keys(r)))void 0!==r[i]&&(a[i]=t(r[i],n));return a}if(Array.isArray(r)){let i=n.get(r);if(void 0!==i)return i;let a=[];return n.set(r,a),r.forEach(r=>{a.push(t(r,n))}),a}return r}(t,new Map)}let eq="<anonymous>";function eJ(t){try{return t&&"function"==typeof t&&t.name||eq}catch(t){return eq}}function eW(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}let ez="__sentry_xhr_v2__",eH={},eK={};function eQ(t,r){eH[t]=eH[t]||[],eH[t].push(r),function(t){if(!eK[t])switch(eK[t]=!0,t){case"console":"console"in eC&&eI.forEach(function(t){t in eC.console&&ej(eC.console,t,function(r){return function(...n){eX("console",{args:n,level:t}),r&&r.apply(eC.console,n)}})});break;case"dom":!function(){if(!("document"in eC))return;let t=eX.bind(null,"dom"),r=e1(t,!0);eC.document.addEventListener("click",r,!1),eC.document.addEventListener("keypress",r,!1),["EventTarget","Node"].forEach(r=>{let n=eC[r]&&eC[r].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(ej(n,"addEventListener",function(r){return function(n,i,a){if("click"===n||"keypress"==n)try{let i=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=i[n]=i[n]||{refCount:0};if(!o.handler){let i=e1(t);o.handler=i,r.call(this,n,i,a)}o.refCount++}catch(t){}return r.call(this,n,i,a)}}),ej(n,"removeEventListener",function(t){return function(r,n,i){if("click"===r||"keypress"==r)try{let n=this.__sentry_instrumentation_handlers__||{},a=n[r];a&&(a.refCount--,a.refCount<=0&&(t.call(this,r,a.handler,i),a.handler=void 0,delete n[r]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,r,n,i)}}))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in eC))return;let t=XMLHttpRequest.prototype;ej(t,"open",function(t){return function(...r){let n=r[1],i=this[ez]={method:eg(r[0])?r[0].toUpperCase():r[0],url:r[1],request_headers:{}};eg(n)&&"POST"===i.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let a=()=>{let t=this[ez];if(t&&4===this.readyState){try{t.status_code=this.status}catch(t){}eX("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?ej(this,"onreadystatechange",function(t){return function(...r){return a(),t.apply(this,r)}}):this.addEventListener("readystatechange",a),ej(this,"setRequestHeader",function(t){return function(...r){let[n,i]=r,a=this[ez];return a&&(a.request_headers[n.toLowerCase()]=i),t.apply(this,r)}}),t.apply(this,r)}}),ej(t,"send",function(t){return function(...r){let n=this[ez];return n&&void 0!==r[0]&&(n.body=r[0]),eX("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),t.apply(this,r)}})}();break;case"fetch":!function(){if(!function(){if(!("fetch"in eC))return!1;
6try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}())return!1;if(eW(eC.fetch))return!0;let t=!1,r=eC.document;if(r&&"function"==typeof r.createElement)try{let n=r.createElement("iframe");n.hidden=!0,r.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=eW(n.contentWindow.fetch)),r.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return t}()||ej(eC,"fetch",function(t){return function(...r){let{method:n,url:i}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){let[r,n]=t;return{url:e0(r),method:eZ(n,"method")?String(n.method).toUpperCase():"GET"}}let r=t[0];return{url:e0(r),method:eZ(r,"method")?String(r.method).toUpperCase():"GET"}}(r),a={args:r,fetchData:{method:n,url:i},startTimestamp:Date.now()};return eX("fetch",{...a}),t.apply(eC,r).then(t=>(eX("fetch",{...a,endTimestamp:Date.now(),response:t}),t),t=>{throw eX("fetch",{...a,endTimestamp:Date.now(),error:t}),t})}});break;case"history":!function(){if(!function(){let t=eC.chrome,r=t&&t.app&&t.app.runtime,n="history"in eC&&!!eC.history.pushState&&!!eC.history.replaceState;return!r&&n}())return;let t=eC.onpopstate;function r(t){return function(...r){let n=r.length>2?r[2]:void 0;if(n){let t=a,r=String(n);a=r,eX("history",{from:t,to:r})}return t.apply(this,r)}}eC.onpopstate=function(...r){let n=eC.location.href,i=a;if(a=n,eX("history",{from:i,to:n}),t)try{return t.apply(this,r)}catch(t){}},ej(eC.history,"pushState",r),ej(eC.history,"replaceState",r)}();break;case"error":e2=eC.onerror,eC.onerror=function(t,r,n,i,a){return eX("error",{column:i,error:a,line:n,msg:t,url:r}),!(!e2||e2.__SENTRY_LOADER__)&&e2.apply(this,arguments)},eC.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":e4=eC.onunhandledrejection,eC.onunhandledrejection=function(t){return eX("unhandledrejection",t),!(e4&&!e4.__SENTRY_LOADER__)||e4.apply(this,arguments)},eC.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn("unknown instrumentation type:",t))}}(t)}function eX(t,r){if(t&&eH[t])for(let n of eH[t]||[])try{n(r)}catch(r){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.error(`Error while triggering instrumentation handler.
7Type: ${t}
8Name: ${eJ(n)}
9Error:`,r)}}function eZ(t,r){return!!t&&"object"==typeof t&&!!t[r]}function e0(t){return"string"==typeof t?t:t?eZ(t,"url")?t.url:t.toString?t.toString():"":""}function e1(t,r=!1){return n=>{if(!n||s===n||function(t){if("keypress"!==t.type)return!1;try{let r=t.target;if(!r||!r.tagName)return!0;if("INPUT"===r.tagName||"TEXTAREA"===r.tagName||r.isContentEditable)return!1}catch(t){}return!0}(n))return;let i="keypress"===n.type?"input":n.type;(void 0===o||function(t,r){if(!t||t.type!==r.type)return!0;try{if(t.target!==r.target)return!0}catch(t){}return!1}(s,n))&&(t({event:n,name:i,global:r}),s=n),clearTimeout(o),o=eC.setTimeout(()=>{o=void 0},1e3)}}let e2=null,e4=null;function e3(){let t=eC.crypto||eC.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");let r=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return"10000000100040008000100000000000".replace(/[018]/g,t=>(t^(15&r())>>t/4).toString(16))}function e6(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function e5(t){let{message:r,event_id:n}=t;if(r)return r;let i=e6(t);return i?i.type&&i.value?`${i.type}: ${i.value}`:i.type||i.value||n||"<unknown>":n||"<unknown>"}function e8(t,r,n){let i=t.exception=t.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{};o.value||(o.value=r||""),o.type||(o.type=n||"Error")}function e9(t,r){let n=e6(t);if(!n)return;let i=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...i,...r},r&&"data"in r){let t={...i&&i.data,...r.data};n.mechanism.data=t}}function e7(t){if(t&&t.__sentry_captured__)return!0;try{eF(t,"__sentry_captured__",!0)}catch(t){}return!1}function te(t,r=100,i=1/0){try{return function t(r,i,a=1/0,o=1/0,s=function(){let t="function"==typeof WeakSet,r=t?new WeakSet:[];return[function(n){if(t)return!!r.has(n)||(r.add(n),!1);for(let t=0;t<r.length;t++)if(r[t]===n)return!0;return r.push(n),!1},function(n){if(t)r.delete(n);else for(let t=0;t<r.length;t++)if(r[t]===n){r.splice(t,1);break}}]}()){let[c,l]=s;if(null==i||["number","boolean","string"].includes(typeof i)&&("number"!=typeof i||i==i))return i;let u=function(t,r){try{if("domain"===t&&r&&"object"==typeof r&&r._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if(void 0!==n.g&&r===n.g)return"[Global]";if("undefined"!=typeof window&&r===window)return"[Window]";if("undefined"!=typeof document&&r===document)return"[Document]";if(e_(r)&&"nativeEvent"in r&&"preventDefault"in r&&"stopPropagation"in r)return"[SyntheticEvent]";if("number"==typeof r&&r!=r)return"[NaN]";if("function"==typeof r)return`[Function: ${eJ(r)}]`;if("symbol"==typeof r)return`[${String(r)}]`;if("bigint"==typeof r)return`[BigInt: ${String(r)}]`;let i=function(t){let r=Object.getPrototypeOf(t);return r?r.constructor.name:"null prototype"}(r);return/^HTML(\w*)Element$/.test(i)?`[HTMLElement: ${i}]`:`[object ${i}]`}catch(t){return`**non-serializable** (${t})`}}(r,i);if(!u.startsWith("[object "))return u;if(i.__sentry_skip_normalization__)return i;let d="number"==typeof i.__sentry_override_normalization_depth__?i.__sentry_override_normalization_depth__:a;if(0===d)return u.replace("object ","");if(c(i))return"[Circular ~]";if(i&&"function"==typeof i.toJSON)try{return t("",i.toJSON(),d-1,o,s)}catch(t){}let h=Array.isArray(i)?[]:{},p=0,f=eV(i);for(let r in f){if(!Object.prototype.hasOwnProperty.call(f,r))continue;if(p>=o){h[r]="[MaxProperties ~]";break}let n=f[r];h[r]=t(r,n,d-1,o,s),p++}return l(i),h}
9("",t,r,i)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function tt(t){return new tn(r=>{r(t)})}function tr(t){return new tn((r,n)=>{n(t)})}!function(t){t[t.PENDING=0]="PENDING",t[t.RESOLVED=1]="RESOLVED",t[t.REJECTED=2]="REJECTED"}(iq||(iq={}));class tn{__init(){this._state=iq.PENDING}__init2(){this._handlers=[]}constructor(t){tn.prototype.__init.call(this),tn.prototype.__init2.call(this),tn.prototype.__init3.call(this),tn.prototype.__init4.call(this),tn.prototype.__init5.call(this),tn.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}then(t,r){return new tn((n,i)=>{this._handlers.push([!1,r=>{if(t)try{n(t(r))}catch(t){i(t)}else n(r)},t=>{if(r)try{n(r(t))}catch(t){i(t)}else i(t)}]),this._executeHandlers()})}catch(t){return this.then(t=>t,t)}finally(t){return new tn((r,n)=>{let i,a;return this.then(r=>{a=!1,i=r,t&&t()},r=>{a=!0,i=r,t&&t()}).then(()=>{a?n(i):r(i)})})}__init3(){this._resolve=t=>{this._setResult(iq.RESOLVED,t)}}__init4(){this._reject=t=>{this._setResult(iq.REJECTED,t)}}__init5(){this._setResult=(t,r)=>{this._state===iq.PENDING&&(ey(r)?r.then(this._resolve,this._reject):(this._state=t,this._value=r,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===iq.PENDING)return;let t=this._handlers.slice();this._handlers=[],t.forEach(t=>{t[0]||(this._state===iq.RESOLVED&&t[1](this._value),this._state===iq.REJECTED&&t[2](this._value),t[0]=!0)})}}}function ti(t){if(!t)return{};let r=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!r)return{};let n=r[6]||"",i=r[8]||"";return{host:r[4],path:r[5],protocol:r[2],search:n,hash:i,relative:r[5]+n+i}}
9let ta=["fatal","error","warning","log","info","debug"],to={nowSeconds:()=>Date.now()/1e3},ts="undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__||"[object process]"!==Object.prototype.toString.call(void 0!==u?u:0)?function(){let{performance:t}=eC;if(t&&t.now)return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}():function(){var r,n;try{return(r=t,n="perf_hooks",r.require(n)).performance}catch(t){return}}(),tc=void 0===ts?to:{nowSeconds:()=>(ts.timeOrigin+ts.now())/1e3},tl=to.nowSeconds.bind(to),tu=tc.nowSeconds.bind(tc);function td(t,r=[]){return[t,r]}function th(t,r){for(let n of t[1])if(r(n,n[0].type))return!0;return!1}function tp(t,r){return(r||new TextEncoder).encode(t)}(()=>{let{performance:t}=eC;if(!t||!t.now)return;let r=t.now(),n=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+r-n):36e5,a=t.timing&&t.timing.navigationStart,o="number"==typeof a?Math.abs(a+r-n):36e5;(i<36e5||o<36e5)&&i<=o&&t.timeOrigin})();let tf={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function tg(t){if(!t||!t.sdk)return;let{name:r,version:n}=t.sdk;return{name:r,version:n}}let tm="production";function t_(t,r={}){if(r.user&&(!t.ipAddress&&r.user.ip_address&&(t.ipAddress=r.user.ip_address),t.did||r.did||(t.did=r.user.id||r.user.email||r.user.username)),t.timestamp=r.timestamp||tu(),r.ignoreDuration&&(t.ignoreDuration=r.ignoreDuration),r.sid&&(t.sid=32===r.sid.length?r.sid:e3()),void 0!==r.init&&(t.init=r.init),!t.did&&r.did&&(t.did=`${r.did}`),"number"==typeof r.started&&(t.started=r.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof r.duration)t.duration=r.duration;else{let r=t.timestamp-t.started;t.duration=r>=0?r:0}r.release&&(t.release=r.release),r.environment&&(t.environment=r.environment),!t.ipAddress&&r.ipAddress&&(t.ipAddress=r.ipAddress),!t.userAgent&&r.userAgent&&(t.userAgent=r.userAgent),"number"==typeof r.errors&&(t.errors=r.errors),r.status&&(t.status=r.status)}class tv{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=tS()}static clone(t){let r=new tv;return t&&(r._breadcrumbs=[...t._breadcrumbs],r._tags={...t._tags},r._extra={...t._extra},r._contexts={...t._contexts},r._user=t._user,r._level=t._level,r._span=t._span,r._session=t._session,r._transactionName=t._transactionName,r._fingerprint=t._fingerprint,r._eventProcessors=[...t._eventProcessors],r._requestSession=t._requestSession,r._attachments=[...t._attachments],r._sdkProcessingMetadata={...t._sdkProcessingMetadata}
9,r._propagationContext={...t._propagationContext}),r}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&t_(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this._tags={...this._tags,[t]:r},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return null===r?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if("function"==typeof t){let r=t(this);return r instanceof tv?r:this}return t instanceof tv?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession),t._propagationContext&&(this._propagationContext=t._propagationContext)):e_(t)&&(this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)),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._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=tS(),this}addBreadcrumb(t,r){let n="number"==typeof r?r:100;if(n<=0)return this;let i={timestamp:tl(),...t};return this._breadcrumbs=[...this._breadcrumbs,i].slice(-n),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,r={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};let r=this._span.transaction;if(r){t.sdkProcessingMetadata={dynamicSamplingContext:r.getDynamicSamplingContext(),...t.sdkProcessingMetadata};let n=r.name;n&&(t.tags={transaction:n,...t.tags})}}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata,prop
9agationContext:this._propagationContext},this._notifyEventProcessors([...ty(),...this._eventProcessors],t,r)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}_notifyEventProcessors(t,r,n,a=0){return new tn((o,s)=>{let c=t[a];if(null===r||"function"!=typeof c)o(r);else{let l=c({...r},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&c.id&&null===l&&i.log(`Event processor "${c.id}" dropped event`),ey(l)?l.then(r=>this._notifyEventProcessors(t,r,n,a+1).then(o)).then(null,s):this._notifyEventProcessors(t,l,n,a+1).then(o).then(null,s)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){var r;t.fingerprint=t.fingerprint?Array.isArray(r=t.fingerprint)?r:[r]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function ty(){return eA("globalEventProcessors",()=>[])}function tb(t){ty().push(t)}function tS(){return{traceId:e3(),spanId:e3().substring(16),sampled:!1}}class tE{constructor(t,r=new tv,n=4){this._version=n,this._stack=[{scope:r}],t&&this.bindClient(t)}isOlderThan(t){return this._version<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){let t=tv.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(t){let r=this.pushScope();try{t(r)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,r){let n=this._lastEventId=r&&r.event_id?r.event_id:e3(),i=Error("Sentry syntheticException");return this._withClient((a,o)=>{a.captureException(t,{originalException:t,syntheticException:i,...r,event_id:n},o)}),n}captureMessage(t,r,n){let i=this._lastEventId=n&&n.event_id?n.event_id:e3(),a=Error(t);return this._withClient((o,s)=>{o.captureMessage(t,r,{originalException:t,syntheticException:a,...n,event_id:i},s)}),i}captureEvent(t,r){let n=r&&r.event_id?r.event_id:e3();return t.type||(this._lastEventId=n),this._withClient((i,a)=>{i.captureEvent(t,{...r,event_id:n},a)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,r){let{scope:n,client:i}=this.getStackTop();if(!i)return;let{beforeBreadcrumb:a=null,maxBreadcrumbs:o=100}=i.getOptions&&i.getOptions()||{};if(o<=0)return;let s={timestamp:tl(),...t},c=a?eD(()=>a(s,r)):s;null!==c&&(i.emit&&i.emit("beforeAddBreadcrumb",c,r),n.addBreadcrumb(c,o))}setUser(t){this.getScope().setUser(t)}setTags(t){this.getScope().setTags(t)}setExtras(t){this.getScope().setExtras(t)}setTag(t,r){this.getScope().setTag(t,r)}setExtra(t,r){this.getScope().setExtra(t,r)}setContext(t,r){this.getScope().setContext(t,r)}configureScope(t){let{scope:r,client:n}=this.getStackTop();n&&t(r)}run(t){let r=tw(this);try{t(this)}finally{tw(r)}}getIntegration(t){let r=this.getClient();if(!r)return null;try{return r.getIntegration(t)}catch(r){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,r){let n=this._callExtensionMethod("startTransaction",t,r);return"undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||n||console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){let t;let r=this.getStackTop().scope,n=r.getSession();n&&(t={},"ok"===n.status&&(t={status:"exited"}),t_(n,t)),this._sendSessionUpdate(),r.setSession()}startSession(t){let{scope:r,client:n}=this.getStackTop(),{release:i,environment:a=tm}=n&&n.getOptions()||{},{userAgent:o}=eC.navigator||{},s=function(t){let r=tu(),n={sid:e3(),init:!0,timestamp:r,started:r,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>e$({sid:`${n.sid}`,init:n.init,started:new Date(1e3*n.started).toISOString(),timestamp:new Date(1e3*n.timestamp).toISOString(),status:n.status,errors:n.errors,did:"number"==typeof n.did||"string"==typeof n.did?`${n.did}`:void 0,duration:n.duration,attrs:{release:n.release,environment:n.environment,ip_address:n.ipAddress,user_agent:n.userAgent}})};return t&&t_(n,t),n}({release:i,environment:a,user:r.getUser(),...o&&{userAgent:o},...t}),c=r.getSession&&r.getSession();return c&&"ok"===c.status&&t_(c,{status:"exited"}),this.endSession(),r.setSession(s),s}shouldSendDefaultPii(){let t=this.getClient(),r=t&&t.getOptions();return!!(r&&r.sendDefaultPii)}_sendSessionUpdate(){let{scope:t,client:r}=this.getStackTop(),n=t.getSession();n&&r&&r.captureSession&&r.captureSession(n)}_withClient(t){let{scope:r,client:n}=this.getStackTop();n&&t(n,r)}_callExtensionMethod(t,...r){let n=tk().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,r);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function tk(){return eC.__SENTRY__=eC.__SENTRY__||{extensions:{},hub:void 0},eC}function tw(t){let r=tk(),n=tM(r);return tC(r,t),n}function tT(){let t=tk();if(t.__SENTRY__&&t.__SENTRY__.acs){let r=t.__SENTRY__.acs.getCurrentHub();if(r)return r}return function(t=tk()){return t&&t.__SENTRY__&&t.__SENTRY__.hub&&!tM(t).isOlderThan(4)||tC(t,new tE),tM(t)}(t)}function tM(t){return eA("hub",()=>new tE,t)}function tC(t,r){return!!t&&((t.__SENTRY__=t.__SENTRY__||{}).hub=r,!0)}let tA=[];function tO(t,r){r[t.name]=t,-1===tA.indexOf(t.name)&&(t.setupOnce(tb,tT),tA.push(t.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.log(`Integration installed: ${t.name}`))}let tI=new WeakMap,tD="Not capturing exception because it's already been captured.";class tP{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(t){if(tP.prototype.__init.call(this),tP.prototype.__init2.call(this),tP.prototype.__init3.call(this),tP.prototype.__init4.call(this),tP.prototype.__init5.call(this),this._options=t,t.dsn?this._dsn=function(t){let r="string"==typeof t?function(t){let r=eN.exec(t);if(!r)return void console.error(`Invalid Sentry Dsn: ${t}`);
9let[n,i,a="",o,s="",c]=r.slice(1),l="",u=c,d=u.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),u=d.pop()),u){let t=u.match(/^\d+/);t&&(u=t[0])}return eR({host:o,pass:a,path:l,projectId:u,port:s,protocol:n,publicKey:i})}(t):eR(t);if(r&&function(t){if("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__)return!0;let{port:r,projectId:n,protocol:a}=t;return!(["protocol","publicKey","host","projectId"].find(r=>!t[r]&&(i.error(`Invalid Sentry Dsn: ${r} missing`),!0))||(n.match(/^\d+$/)?"http"===a||"https"===a?r&&isNaN(parseInt(r,10))&&(i.error(`Invalid Sentry Dsn: Invalid port ${r}`),1):(i.error(`Invalid Sentry Dsn: Invalid protocol ${a}`),1):(i.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(r))return r}(t.dsn):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn("No DSN provided, client will not do anything."),this._dsn){let r=function(t,r={}){var n;let i="string"==typeof r?r:r.tunnel,a="string"!=typeof r&&r._metadata?r._metadata.sdk:void 0;return i||`${function(t){let r=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${r}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}(t)}${t.projectId}/envelope/?${Object.keys(n={sentry_key:t.publicKey,sentry_version:"7",...a&&{sentry_client:`${a.name}/${a.version}`}}).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`).join("&")}`}(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}}captureException(t,r,n){if(e7(t))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.log(tD));let a=r&&r.event_id;return this._process(this.eventFromException(t,r).then(t=>this._captureEvent(t,r,n)).then(t=>{a=t})),a}captureMessage(t,r,n,i){let a=n&&n.event_id,o=em(t)?this.eventFromMessage(String(t),r,n):this.eventFromException(t,n);return this._process(o.then(t=>this._captureEvent(t,n,i)).then(t=>{a=t})),a}captureEvent(t,r,n){if(r&&r.originalException&&e7(r.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.log(tD));let a=r&&r.event_id;return this._process(this._captureEvent(t,r,n).then(t=>{a=t})),a}captureSession(t){this._isEnabled()?"string"!=typeof t.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),t_(t,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){let r=this._transport;
9return r?this._isClientDoneProcessing(t).then(n=>r.flush(t).then(t=>n&&t)):tt(!0)}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,t))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(t){let r={};return t.forEach(t=>{t&&tO(t,r)}),r}(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch(r){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){tO(t,this._integrations)}sendEvent(t,r={}){if(this._dsn){let n=function(t,r,n,i){var a;let o=tg(n),s=t.type&&"replay_event"!==t.type?t.type:"event";(a=n&&n.sdk)&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||a.name,t.sdk.version=t.sdk.version||a.version,t.sdk.integrations=[...t.sdk.integrations||[],...a.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...a.packages||[]]);let c=function(t,r,n,i){let a=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...r&&{sdk:r},...!!n&&{dsn:eL(i)},...a&&{trace:e$({...a})}}}(t,o,i,r);return delete t.sdkProcessingMetadata,td(c,[[{type:s},t]])}(t,this._dsn,this._options._metadata,this._options.tunnel);for(let t of r.attachments||[])n=function(t,r){let[n,i]=t;return[n,[...i,r]]}(n,function(t,r){let n="string"==typeof t.data?tp(t.data,r):t.data;return[e$({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}(t,this._options.transportOptions&&this._options.transportOptions.textEncoder));let i=this._sendEnvelope(n);i&&i.then(r=>this.emit("afterSendEvent",t,r),null)}}sendSession(t){if(this._dsn){let r=function(t,r,n,i){let a=tg(n);return td({sent_at:(new Date).toISOString(),...a&&{sdk:a},...!!i&&{dsn:eL(r)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(r)}}recordDroppedEvent(t,r,n){if(this._options.sendClientReports){let n=`${t}:${r}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}on(t,r){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(r)}emit(t,...r){this._hooks[t]&&this._hooks[t].forEach(t=>t(...r))}_updateSessionFromEvent(t,r){let n=!1,i=!1,a=r.exception&&r.exception.values;if(a)for(let t of(i=!0,a)){let r=t.mechanism;if(r&&!1===r.handled){n=!0;break}}let o="ok"===t.status;(o&&0===t.errors||o&&n)&&(t_(t,{...n&&{status:"crashed"},errors:t.errors||Number(i||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new tn(r=>{let n=0,i=setInterval(()=>{0==this._numProcessing?(clearInterval(i),r(!0)):(n+=1,t&&n>=t&&(clearInterval(i),r(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(t,r,n){let i=this.getOptions(),a=Object.keys(this._integrations);return!r.integrations&&a.length>0&&(r.integrations=a),(function(t,r,n,i){let{normalizeDepth:a=3,normalizeMaxBreadth:o=1e3}=t,s={...r,event_id:r.event_id||n.event_id||e3(),timestamp:r.timestamp||tl()},c=n.integrations||t.integrations.map(t=>t.name);(function(t,r){let{environment:n,release:i,dist:a,maxValueLength:o=250}=r;"environment"in t||(t.environment="environment"in r?n:tm),void 0===t.release&&void 0!==i&&(t.release=i),void 0===t.dist&&void 0!==a&&(t.dist=a),t.message&&(t.message=eS(t.message,o));let s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=eS(s.value,o));let c=t.request;c&&c.url&&(c.url=eS(c.url,o))})(s,t),c.length>0&&(s.sdk=s.sdk||{},s.sdk.integrations=[...s.sdk.integrations||[],...c]),void 0===r.type&&function(t,r){let n;let i=eC._sentryDebugIds;if(!i)return;let a=tI.get(r);a?n=a:(n=new Map,tI.set(r,n));let o=Object.keys(i).reduce((t,a)=>{let o;let s=n.get(a);s?o=s:(o=r(a),n.set(a,o));for(let r=o.length-1;r>=0;r--){let n=o[r];if(n.filename){t[n.filename]=i[a];break}}return t},{});
9try{t.exception.values.forEach(t=>{t.stacktrace.frames.forEach(t=>{t.filename&&(t.debug_id=o[t.filename])})})}catch(t){}}(s,t.stackParser);let l=i;n.captureContext&&(l=tv.clone(l).update(n.captureContext));let u=tt(s);if(l){if(l.getAttachments){let t=[...n.attachments||[],...l.getAttachments()];t.length&&(n.attachments=t)}u=l.applyToEvent(s,n)}return u.then(t=>(t&&function(t){let r={};try{t.exception.values.forEach(t=>{t.stacktrace.frames.forEach(t=>{t.debug_id&&(t.abs_path?r[t.abs_path]=t.debug_id:t.filename&&(r[t.filename]=t.debug_id),delete t.debug_id)})})}catch(t){}if(0===Object.keys(r).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let n=t.debug_meta.images;Object.keys(r).forEach(t=>{n.push({type:"sourcemap",code_file:t,debug_id:r[t]})})}(t),"number"==typeof a&&a>0?function(t,r,n){if(!t)return null;let i={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>({...t,...t.data&&{data:te(t.data,r,n)}}))},...t.user&&{user:te(t.user,r,n)},...t.contexts&&{contexts:te(t.contexts,r,n)},...t.extra&&{extra:te(t.extra,r,n)}};return t.contexts&&t.contexts.trace&&i.contexts&&(i.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(i.contexts.trace.data=te(t.contexts.trace.data,r,n))),t.spans&&(i.spans=t.spans.map(t=>(t.data&&(t.data=te(t.data,r,n)),t))),i}(t,a,o):t))})(i,t,r,n).then(t=>{if(null===t)return t;let{propagationContext:r}=t.sdkProcessingMetadata||{};if(!(t.contexts&&t.contexts.trace)&&r){let{traceId:i,spanId:a,parentSpanId:o,dsc:s}=r;t.contexts={trace:{trace_id:i,span_id:a,parent_span_id:o},...t.contexts};let c=s||function(t,r,n){let i=r.getOptions(),{publicKey:a}=r.getDsn()||{},{segment:o}=n&&n.getUser()||{},s=e$({environment:i.environment||tm,release:i.release,user_segment:o,public_key:a,trace_id:t});return r.emit&&r.emit("createDsc",s),s}(i,this,n);t.sdkProcessingMetadata={dynamicSamplingContext:c,...t.sdkProcessingMetadata}}return t})}_captureEvent(t,r={},n){return this._processEvent(t,r,n).then(t=>t.event_id,t=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&("log"===t.logLevel?i.log(t.message):i.warn(t))})}_processEvent(t,r,n){let i=this.getOptions(),{sampleRate:a}=i;if(!this._isEnabled())return tr(new ex("SDK not enabled, will not capture event.","log"));let o=tL(t),s=tN(t),c=t.type||"error",l=`before send for type \`${c}\``;if(s&&"number"==typeof a&&Math.random()>a)return this.recordDroppedEvent("sample_rate","error",t),tr(new ex(`Discarding event because it's not included in the random sample (sampling rate = ${a})`,"log"));let u="replay_event"===c?"replay":c;return this._prepareEvent(t,r,n).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,t),new ex("An event processor returned `null`, will not send event.","log");return r.data&&!0===r.data.__sentry__?n:function(t,r){let n=`${r} must return \`null\` or a valid event.`;if(ey(t))return t.then(t=>{if(!e_(t)&&null!==t)throw new ex(n);return t},t=>{throw new ex(`${r} rejected with ${t}`)});if(!e_(t)&&null!==t)throw new ex(n);return t}(function(t,r,n){let{beforeSend:i,beforeSendTransaction:a}=t;return tN(r)&&i?i(r,n):tL(r)&&a?a(r,n):r}(i,n,r),l)}).then(i=>{if(null===i)throw this.recordDroppedEvent("before_send",u,t),new ex(`${l} returned \`null\`, will not send event.`,"log");let a=n&&n.getSession();!o&&a&&this._updateSessionFromEvent(a,i);let s=i.transaction_info;return o&&s&&i.transaction!==t.transaction&&(i.transaction_info={...s,source:"custom"}),this.sendEvent(i,r),i}).then(null,t=>{if(t instanceof ex)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new ex(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
10Reason: ${t}`)})}_process(t){this._numProcessing++,t.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_sendEnvelope(t){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",t),this._transport.send(t).then(null,t=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.error("Error while sending event:",t)});("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.error("Transport disabled")}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.keys(t).map(r=>{let[n,i]=r.split(":");return{reason:n,category:i,quantity:t[r]}})}}function tN(t){return void 0===t.type}function tL(t){return"transaction"===t.type}function tR(t,r){if("event"===r||"transaction"===r)return Array.isArray(t)?t[1]:void 0}let tx="7.60.1";class tj{constructor(){tj.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=tj.id}setupOnce(){c=Function.prototype.toString;try{Function.prototype.toString=function(...t){let r=eU(this)||this;return c.apply(r,t)}}catch(t){}}}tj.__initStatic();let tF=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],tB=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/];class tU{static __initStatic(){this.id="InboundFilters"}__init(){this.name=tU.id}constructor(t={}){this._options=t,tU.prototype.__init.call(this)}setupOnce(t,r){let n=t=>{let n=r();if(n){let r=n.getIntegration(tU);if(r){var a,o,s;let c=n.getClient(),l=c?c.getOptions():{};return(a=t,(o=function(t={},r={}){return{allowUrls:[...t.allowUrls||[],...r.allowUrls||[]],denyUrls:[...t.denyUrls||[],...r.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...r.ignoreErrors||[],...t.disableErrorDefaults?[]:tF],ignoreTransactions:[...t.ignoreTransactions||[],...r.ignoreTransactions||[],...t.disableTransactionDefaults?[]:tB],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(r._options,l)).ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}(a)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn(`Event dropped due to being internal Sentry Error.
11Event: ${e5(a)}`),0):(s=o.ignoreErrors,!a.type&&s&&s.length&&(function(t){if(t.message)return[t.message];if(t.exception){let{values:r}=t.exception;try{let{type:t="",value:n=""}=r&&r[r.length-1]||{};return[`${n}`,`${t}: ${n}`]}catch(r){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.error(`Cannot extract message for event ${e5(t)}`),[]}}return[]})(a).some(t=>ek(t,s)))?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
12Event: ${e5(a)}`),0):!function(t,r){if("transaction"!==t.type||!r||!r.length)return!1;let n=t.transaction;return!!n&&ek(n,r)}(a,o.ignoreTransactions)?!function(t,r){if(!r||!r.length)return!1;let n=tV(t);return!!n&&ek(n,r)}(a,o.denyUrls)?function(t,r){if(!r||!r.length)return!0;let n=tV(t);return!n||ek(n,r)}(a,o.allowUrls)||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn(`Event dropped due to not being matched by \`allowUrls\` option.
13Event: ${e5(a)}.
14Url: ${tV(a)}`),0):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn(`Event dropped due to being matched by \`denyUrls\` option.
15Event: ${e5(a)}.
16Url: ${tV(a)}`),0):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
17Event: ${e5(a)}`),0))?t:null}}return t};n.id=this.name,t(n)}}function tV(t){try{let r;try{r=t.exception.values[0].stacktrace.frames}catch(t){}return r?function(t=[]){for(let r=t.length-1;r>=0;r--){let n=t[r];
17if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(r):null}catch(r){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.error(`Cannot extract url for event ${e5(t)}`),null}}tU.__initStatic();var tY=Object.freeze({__proto__:null,FunctionToString:tj,InboundFilters:tU});let tG=0;function t$(t,r={},n){if("function"!=typeof t)return t;try{let r=t.__sentry_wrapped__;if(r)return r;if(eU(t))return t}catch(r){return t}let i=function(){var i;let a=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);let i=a.map(t=>t$(t,r));return t.apply(this,i)}catch(t){throw tG++,setTimeout(()=>{tG--}),i=n=>{var i;n.addEventProcessor(t=>(r.mechanism&&(e8(t,void 0,void 0),e9(t,r.mechanism)),t.extra={...t.extra,arguments:a},t)),tT().captureException(t,{captureContext:i})},tT().withScope(i),t}};try{for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}catch(t){}eB(i,t),eF(t,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get:()=>t.name})}catch(t){}return i}function tq(t,r){let n=tW(t,r),i={type:r&&r.name,value:function(t){let r=t&&t.message;return r?r.error&&"string"==typeof r.error.message?r.error.message:r:"No error message"}(r)};return n.length&&(i.stacktrace={frames:n}),void 0===i.type&&""===i.value&&(i.value="Unrecoverable error caught"),i}function tJ(t,r){return{exception:{values:[tq(t,r)]}}}function tW(t,r){let n=r.stacktrace||r.stack||"",i=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(tz.test(t.message))return 1}return 0}(r);try{return t(n,i)}catch(t){}return[]}let tz=/Minified React error #\d+;/i;function tH(t,r,n,i,a){let o;if(ep(r)&&r.error)return tJ(t,r.error);if(ef(r)||eh(r,"DOMException")){if("stack"in r)o=tJ(t,r);else{let a=r.name||(ef(r)?"DOMError":"DOMException"),s=r.message?`${a}: ${r.message}`:a;e8(o=tK(t,s,n,i),s)}return"code"in r&&(o.tags={...o.tags,"DOMException.code":`${r.code}`}),o}return ed(r)?tJ(t,r):(e_(r)||ev(r)?e9(o=function(t,r,n,i){let a=tT().getClient(),o=a&&a.getOptions().normalizeDepth,s={exception:{values:[{type:ev(r)?r.constructor.name:i?"UnhandledRejection":"Error",value:function(t,{isUnhandledRejection:r}){let n=function(t,r=40){let n=Object.keys(eV(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=r)return eS(n[0],r);for(let t=n.length;t>0;t--){let i=n.slice(0,t).join(", ");if(!(i.length>r))return t===n.length?i:eS(i,r)}return""}(t),i=r?"promise rejection":"exception";return ep(t)?`Event \`ErrorEvent\` captured as ${i} with message \`${t.message}\``:ev(t)?`Event \`${function(t){try{let r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch(t){}}(t)}\` (type=${t.type}) captured as ${i}`:`Object captured as ${i} with keys: ${n}`}(r,{isUnhandledRejection:i})}]},extra:{__serialized__:function t(r,n=3,i=102400){let a=te(r,n);return~-encodeURI(JSON.stringify(a)).split(/%..|./).length>i?t(r,n-1,i):a}(r,o)}};if(n){let r=tW(t,n);r.length&&(s.exception.values[0].stacktrace={frames:r})}return s}(t,r,n,a),{synthetic:!0}):(e8(o=tK(t,r,n,i),`${r}`,void 0),e9(o,{synthetic:!0})),o)}function tK(t,r,n,i){let a={message:r};if(i&&n){let i=tW(t,n);i.length&&(a.exception={values:[{value:r,stacktrace:{frames:i}}]})}return a}let tQ="Breadcrumbs";class tX{static __initStatic(){this.id=tQ}__init(){this.name=tX.id}constructor(t){tX.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){var t;this.options.console&&eQ("console",tZ),this.options.dom&&eQ("dom",(t=this.options.dom,function(r){let n,a="object"==typeof t?t.serializeAttribute:void 0,o="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;o&&o>1024&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${o} was configured. Sentry will use 1024 instead.`),o=1024),"string"==typeof a&&(a=[a]);try{let t=r.event;n=t&&t.target?eO(t.target,{keyAttrs:a,maxStringLength:o}):eO(t,{keyAttrs:a,maxStringLength:o})}catch(t){n="<unknown>"}0!==n.length&&tT().addBreadcrumb({category:`ui.${r.name}`,message:n},{event:r.event,name:r.name,global:r.global})})),this.options.xhr&&eQ("xhr",t0),this.options.fetch&&eQ("fetch",t1),this.options.history&&eQ("history",t2)}
17addSentryBreadcrumb(t){this.options.sentry&&tT().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:e5(t)},{event:t})}}function tZ(t){var r;for(let r=0;r<t.args.length;r++)if("ref=Ref<"===t.args[r]){t.args[r+1]="viewRef";break}let n={category:"console",data:{arguments:t.args,logger:"console"},level:"warn"===(r=t.level)?"warning":ta.includes(r)?r:"log",message:eE(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${eE(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}tT().addBreadcrumb(n,{input:t.args,level:t.level})}function t0(t){let{startTimestamp:r,endTimestamp:n}=t,i=t.xhr[ez];if(!r||!n||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={xhr:t.xhr,input:c,startTimestamp:r,endTimestamp:n};tT().addBreadcrumb({category:"xhr",data:{method:a,url:o,status_code:s},type:"http"},l)}function t1(t){let{startTimestamp:r,endTimestamp:n}=t;if(n&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method)){if(t.error){let i=t.fetchData,a={data:t.error,input:t.args,startTimestamp:r,endTimestamp:n};tT().addBreadcrumb({category:"fetch",data:i,level:"error",type:"http"},a)}else{let i={...t.fetchData,status_code:t.response&&t.response.status},a={input:t.args,response:t.response,startTimestamp:r,endTimestamp:n};tT().addBreadcrumb({category:"fetch",data:i,type:"http"},a)}}}function t2(t){let r=t.from,n=t.to,i=ti(eC.location.href),a=ti(r),o=ti(n);a.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),tT().addBreadcrumb({category:"navigation",data:{from:r,to:n}})}tX.__initStatic();class t4 extends tP{constructor(t){let r=eC.SENTRY_SDK_SOURCE||"npm";t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${r}:@sentry/browser`,version:tx}],version:tx},super(t),t.sendClientReports&&eC.document&&eC.document.addEventListener("visibilitychange",()=>{"hidden"===eC.document.visibilityState&&this._flushOutcomes()})}eventFromException(t,r){return function(t,r,n,i){let a=tH(t,r,n&&n.syntheticException||void 0,i);return e9(a),a.level="error",n&&n.event_id&&(a.event_id=n.event_id),tt(a)}(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return function(t,r,n="info",i,a){let o=tK(t,r,i&&i.syntheticException||void 0,a);return o.level=n,i&&i.event_id&&(o.event_id=i.event_id),tt(o)}(this._options.stackParser,t,r,n,this._options.attachStacktrace)}sendEvent(t,r){let n=this.getIntegrationById(tQ);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(t),super.sendEvent(t,r)}captureUserFeedback(t){if(!this._isEnabled())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn("SDK not enabled, will not capture user feedback."));let r=function(t,{metadata:r,tunnel:n,dsn:i}){return td({event_id:t.event_id,sent_at:(new Date).toISOString(),...r&&r.sdk&&{sdk:{name:r.sdk.name,version:r.sdk.version}},...!!n&&!!i&&{dsn:eL(i)}},[[{type:"user_report"},t]])}(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(r)}_prepareEvent(t,r,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,n)}_flushOutcomes(){var t,r;let n=this._clearOutcomes();if(0===n.length)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.log("Sending outcomes:",n);let a=td((t=this._options.tunnel&&eL(this._dsn))?{dsn:t}:{},[[{type:"client_report"},{timestamp:r||tl(),discarded_events:n}]]);this._sendEnvelope(a)}}function t3(t,r=function(){if(l)return l;if(eW(eC.fetch))return l=eC.fetch.bind(eC);let t=eC.document,r=eC.fetch;if(t&&"function"==typeof t.createElement)try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);let i=n.contentWindow;i&&i.fetch&&(r=i.fetch),t.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return l=r.bind(eC)}()){let n=0,a=0;return function(t,r,n=function(t){let r=[];function n(t){return r.splice(r.indexOf(t),1)[0]}return{$:r,add:function(i){if(!(void 0===t||r.length<t))return tr(new ex("Not adding Promise because buffer limit was reached."));let a=i();return -1===r.indexOf(a)&&r.push(a),a.then(()=>n(a)).then(null,()=>n(a).then(null,()=>{})),a},drain:function(t){return new tn((n,i)=>{let a=r.length;if(!a)return n(!0);let o=setTimeout(()=>{t&&t>0&&n(!1)},t);r.forEach(t=>{tt(t).then(()=>{--a||(clearTimeout(o),n(!0))},i)})})}}}(t.bufferSize||30)){let a={};function o(o){let s=[];if(th(o,(r,n)=>{let i=tf[n];if(function(t,r,n=Date.now()){return(t[r]||t.all||0)>n}(a,i)){let a=tR(r,n);t.recordDroppedEvent("ratelimit_backoff",i,a)}else s.push(r)}),0===s.length)return tt();let c=td(o[0],s),l=r=>{th(c,(n,i)=>{let a=tR(n,i);t.recordDroppedEvent(r,tf[i],a)})};return n.add(()=>r({body:function(t,r){let[n,i]=t,a=JSON.stringify(n);function o(t){"string"==typeof a?a="string"==typeof t?a+t:[tp(a,r),t]:a.push("string"==typeof t?tp(t,r):t)}for(let t of i){let[r,n]=t;if(o(`
18${JSON.stringify(r)}
19`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let t;try{t=JSON.stringify(n)}catch(r){t=JSON.stringify(te(n))}o(t)}}return"string"==typeof a?a:function(t){let r=new Uint8Array(t.reduce((t,r)=>t+r.length,0)),n=0;for(let i of t)r.set(i,n),n+=i.length;return r}(a)}(c,t.textEncoder)}).then(t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),a=function(t,{statusCode:r,headers:n},i=Date.now()){let a={...t},o=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(o)for(let t of o.trim().split(",")){let[r,n]=t.split(":",2),o=parseInt(r,10),s=1e3*(isNaN(o)?60:o);if(n)for(let t of n.split(";"))a[t]=i+s;else a.all=i+s}else s?a.all=i+function(t,r=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;let i=Date.parse(`${t}`);return isNaN(i)?6e4:i-r}(s,i):429===r&&(a.all=i+6e4);return a}(a,t),t),t=>{throw l("network_error"),t})).then(t=>t,t=>{if(t instanceof ex)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.error("Skipped sending event because buffer is full."),l("queue_overflow"),tt();throw t})}return o.__sentry__baseTransport__=!0,{send:o,flush:t=>n.drain(t)}}(t,function(i){let o=i.body.length;n+=o,a++;let s={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&a<15,...t.fetchOptions};try{return r(t.url,s).then(t=>(n-=o,a--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}}))}catch(t){return l=void 0,n-=o,a--,tr(t)}})}class t6{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=t6.id}__init2(){this._installFunc={onerror:t5,onunhandledrejection:t8}}constructor(t){t6.prototype.__init.call(this),t6.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){Error.stackTraceLimit=50;let t=this._options;for(let r in t){let n=this._installFunc[r];n&&t[r]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.log(`Global Handler attached: ${r}`),n(),this._installFunc[r]=void 0)}}}function t5(){eQ("error",t=>{let[r,n,i]=re();if(!r.getIntegration(t6))return;let{msg:a,url:o,line:s,column:c,error:l}=t;if(tG>0||l&&l.__sentry_own_request__)return;let u=void 0===l&&eg(a)?function(t,r,n,i){let a=ep(t)?t.message:t,o="Error",s=a.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);return s&&(o=s[1],a=s[2]),t9({exception:{values:[{type:o,value:a}]}},r,n,i)}
19(a,o,s,c):t9(tH(n,l||a,void 0,i,!1),o,s,c);u.level="error",t7(r,l,u,"onerror")})}function t8(){eQ("unhandledrejection",t=>{let[r,n,i]=re();if(!r.getIntegration(t6))return;let a=t;try{"reason"in t?a=t.reason:"detail"in t&&"reason"in t.detail&&(a=t.detail.reason)}catch(t){}if(tG>0||a&&a.__sentry_own_request__)return!0;let o=em(a)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(a)}`}]}}:tH(n,a,void 0,i,!0);o.level="error",t7(r,a,o,"onunhandledrejection")})}function t9(t,r,n,i){let a=t.exception=t.exception||{},o=a.values=a.values||[],s=o[0]=o[0]||{},c=s.stacktrace=s.stacktrace||{},l=c.frames=c.frames||[],u=isNaN(parseInt(i,10))?void 0:i,d=isNaN(parseInt(n,10))?void 0:n,h=eg(r)&&r.length>0?r:function(){try{return eC.document.location.href}catch(t){return""}}();return 0===l.length&&l.push({colno:u,filename:h,function:"?",in_app:!0,lineno:d}),t}function t7(t,r,n,i){e9(n,{handled:!1,type:i}),t.captureEvent(n,{originalException:r})}function re(){let t=tT(),r=t.getClient(),n=r&&r.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}t6.__initStatic();let rt=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class rr{static __initStatic(){this.id="TryCatch"}__init(){this.name=rr.id}constructor(t){rr.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){this._options.setTimeout&&ej(eC,"setTimeout",rn),this._options.setInterval&&ej(eC,"setInterval",rn),this._options.requestAnimationFrame&&ej(eC,"requestAnimationFrame",ri),this._options.XMLHttpRequest&&"XMLHttpRequest"in eC&&ej(XMLHttpRequest.prototype,"send",ra);let t=this._options.eventTarget;t&&(Array.isArray(t)?t:rt).forEach(ro)}}function rn(t){return function(...r){let n=r[0];return r[0]=t$(n,{mechanism:{data:{function:eJ(t)},handled:!0,type:"instrument"}}),t.apply(this,r)}}function ri(t){return function(r){return t.apply(this,[t$(r,{mechanism:{data:{function:"requestAnimationFrame",handler:eJ(t)},handled:!0,type:"instrument"}})])}}function ra(t){return function(...r){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&ej(n,t,function(r){let n={mechanism:{data:{function:t,handler:eJ(r)},handled:!0,type:"instrument"}},i=eU(r);return i&&(n.mechanism.data.handler=eJ(i)),t$(r,n)})}),t.apply(this,r)}}function ro(t){let r=eC[t]&&eC[t].prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(ej(r,"addEventListener",function(r){return function(n,i,a){try{"function"==typeof i.handleEvent&&(i.handleEvent=t$(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:eJ(i),target:t},handled:!0,type:"instrument"}}))}catch(t){}return r.apply(this,[n,t$(i,{mechanism:{data:{function:"addEventListener",handler:eJ(i),target:t},handled:!0,type:"instrument"}}),a])}}),ej(r,"removeEventListener",function(t){return function(r,n,i){try{let a=n&&n.__sentry_wrapped__;a&&t.call(this,r,a,i)}catch(t){}return t.call(this,r,n,i)}}))}rr.__initStatic();class rs{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=rs.id}constructor(t={}){rs.prototype.__init.call(this),this._key=t.key||"cause",this._limit=t.limit||5}setupOnce(t,r){t((t,n)=>{let i=r(),a=i.getClient(),o=i.getIntegration(rs);if(!a||!o)return t;let s=a.getOptions();return function(t,r,n=250,i,a,o,s){if(!(o.exception&&o.exception.values&&s&&eb(s.originalException,Error)))return;let c=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;c&&(o.exception.values=(function t(r,n,i,a,o,s,c,l){if(s.length>=i+1)return s;let u=[...s];if(eb(a[o],Error)){ew(c,l);let s=r(n,a[o]),d=u.length;
19eT(s,o,d,l),u=t(r,n,i,a[o],o,[s,...u],s,d)}return Array.isArray(a.errors)&&a.errors.forEach((a,s)=>{if(eb(a,Error)){ew(c,l);let d=r(n,a),h=u.length;eT(d,`errors[${s}]`,h,l),u=t(r,n,i,a,o,[d,...u],d,h)}}),u})(t,r,a,s.originalException,i,o.exception.values,c,0).map(t=>(t.value&&(t.value=eS(t.value,n)),t)))}(tq,s.stackParser,s.maxValueLength,o._key,o._limit,t,n),t})}}rs.__initStatic();class rc{constructor(){rc.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=rc.id}setupOnce(){tb(t=>{if(tT().getIntegration(rc)){if(!eC.navigator&&!eC.location&&!eC.document)return t;let r=t.request&&t.request.url||eC.location&&eC.location.href,{referrer:n}=eC.document||{},{userAgent:i}=eC.navigator||{},a={...t.request&&t.request.headers,...n&&{Referer:n},...i&&{"User-Agent":i}},o={...t.request,...r&&{url:r},headers:a};return{...t,request:o}}return t})}}rc.__initStatic();class rl{constructor(){rl.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=rl.id}setupOnce(t,r){let n=t=>{if(t.type)return t;let n=r().getIntegration(rl);if(n){try{var a;if((a=n._previousEvent)&&(function(t,r){let n=t.message,i=r.message;return!!((n||i)&&(!n||i)&&(n||!i)&&n===i&&rd(t,r)&&ru(t,r))}(t,a)||function(t,r){let n=rh(r),i=rh(t);return!!(n&&i&&n.type===i.type&&n.value===i.value&&rd(t,r)&&ru(t,r))}(t,a)))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(t){}return n._previousEvent=t}return t};n.id=this.name,t(n)}}function ru(t,r){let n=rp(t),i=rp(r);if(!n&&!i)return!0;if(n&&!i||!n&&i||i.length!==n.length)return!1;for(let t=0;t<i.length;t++){let r=i[t],a=n[t];if(r.filename!==a.filename||r.lineno!==a.lineno||r.colno!==a.colno||r.function!==a.function)return!1}return!0}function rd(t,r){let n=t.fingerprint,i=r.fingerprint;if(!n&&!i)return!0;if(n&&!i||!n&&i)return!1;try{return!(n.join("")!==i.join(""))}catch(t){return!1}}function rh(t){return t.exception&&t.exception.values&&t.exception.values[0]}function rp(t){let r=t.exception;if(r)try{return r.values[0].stacktrace.frames}catch(t){return}}rl.__initStatic();var rf=Object.freeze({__proto__:null,Breadcrumbs:tX,Dedupe:rl,GlobalHandlers:t6,HttpContext:rc,LinkedErrors:rs,TryCatch:rr});let rg={};eC.Sentry&&eC.Sentry.Integrations&&(rg=eC.Sentry.Integrations);let rm={...rg,...tY,...rf};var r_="new",rv="loading",ry="loaded",rb="joining-meeting",rS="joined-meeting",rE="left-meeting",rk="error",rw="blocked",rT="off",rM="sendable",rC="loading",rA="interrupted",rO="playable",rI="unknown",rD="full",rP="lobby",rN="none",rL="base",rR="*",rx="ejected",rj="nbf-room",rF="nbf-token",rB="exp-room",rU="exp-token",rV="no-room",rY="meeting-full",rG="end-of-life",r$="not-allowed",rq="connection-error",rJ="cam-in-use",rW="mic-in-use",rz="cam-mic-in-use",rH="permissions",rK="undefined-mediadevices",rQ="not-found",rX="constraints",rZ="unknown",r0="iframe-ready-for-launch-config",r1="iframe-launch-config",r2="theme-updated",r4="loading",r3="load-attempt-failed",r6="loaded",r5="started-camera",r8="camera-error",r9="joining-meeting",r7="joined-meeting",ne="left-meeting",nt="available-devices-updated",nr="participant-joined",nn="participant-updated",ni="participant-left",na="participant-counts-updated",no="access-state-updated",ns="meeting-session-summary-updated",nc="meeting-session-state-updated",nl="meeting-session-data-error",nu="waiting-participant-added",nd="waiting-participant-updated",nh="waiting-participant-removed",np="track-started",nf="track-stopped",ng="transcription-started",nm="transcription-stopped",n_="transcription-error",nv="recording-started",ny="recording-stopped",nb="recording-stats",nS="recording-error",nE="recording-upload-completed",nk="recording-data",nw="app-message",nT="transcription-message",nM="remote-media-player-started",nC="remote-media-player-updated",nA="remote-media-player-stopped",nO="local-screen-share-started",nI="local-screen-share-stopped",nD="local-screen-share-canceled",nP="active-speaker-change",nN="active-speaker-mode-change",nL="network-quality-change",nR="network-connection",nx="cpu-load-change",nj="face-counts-updated",nF="fullscreen",nB="exited-fullscreen",nU="live-streaming-started",nV="live-streaming-updated",nY="live-streaming-stopped",nG="live-streaming-error",n$="lang-updated",nq
19="receive-settings-updated",nJ="input-settings-updated",nW="nonfatal-error",nz="error",nH="iframe-call-message",nK="local-screen-start",nQ="daily-method-update-live-streaming-endpoints",nX="transmit-log",nZ="daily-custom-track",n0={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},n1={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},n2={PLAY:"play",PAUSE:"pause"},n4=["jpg","png","jpeg"];function n3(){return!n6()&&"undefined"!=typeof window&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function n6(){return"undefined"!=typeof navigator&&navigator.product&&"ReactNative"===navigator.product}function n5(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function n8(){if(n6()||!document)return!1;var t=document.createElement("iframe");return!!t.requestFullscreen||!!t.webkitRequestFullscreen}var n9=function(){try{var t=document.createElement("canvas"),r=null!=t.getContext("webgl2");return t.remove(),r}catch(t){return!1}}();function n7(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!n6()&&!!n9&&(t?!ii()&&["Chrome","Firefox"].includes(ia()):function(){if(ii())return!1;var t=ia();if("Safari"===t){var r=il();if(r.major<15||15===r.major&&r.minor<4)return!1}return"Chrome"===t?is().major>=77:"Firefox"===t?iu().major>=97:["Chrome","Firefox","Safari"].includes(t)}())}var ie=["Chrome","Firefox"];function it(){return!n6()&&!ii()&&"undefined"!=typeof AudioWorkletNode&&ie.includes(ia())}function ir(){return n5()&&!function(){var t,r=ia();if(!n3())return!0;switch(r){case"Chrome":return(t=is()).major&&t.major>0&&t.major<75;case"Firefox":return(t=iu()).major<91;case"Safari":return(t=il()).major<13||13===t.major&&t.minor<1;default:return!0}}()}function ii(){var t,r,n=n3(),i=n.match(/Mac/)&&(!n6()&&"undefined"!=typeof window&&null!==(t=window)&&void 0!==t&&null!==(r=t.navigator)&&void 0!==r&&r.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(n.match(/Mobi/)||n.match(/Android/)||i)||!!n3().match(/DailyAnd\//)||void 0}function ia(){if("undefined"!=typeof window){var t=n3();return ic()?"Safari":t.indexOf("Edge")>-1?"Edge":t.match(/Chrome\//)?"Chrome":t.indexOf("Safari")>-1?"Safari":t.indexOf("Firefox")>-1?"Firefox":t.indexOf("MSIE")>-1||t.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function io(){switch(ia()){case"Chrome":return is();case"Safari":return il();case"Firefox":return iu();case"Edge":return function(){var t=0,r=0;if("undefined"!=typeof window){var n=n3().match(/Edge\/(\d+).(\d+)/);if(n)try{t=parseInt(n[1]),r=parseInt(n[2])}catch(t){}}return{major:t,minor:r}}()}}function is(){var t=0,r=0,n=0,i=0,a=!1;if("undefined"!=typeof window){var o=n3(),s=o.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(s)try{t=parseInt(s[1]),r=parseInt(s[2]),n=parseInt(s[3]),i=parseInt(s[4]),a=o.indexOf("OPR/")>-1}catch(t){}}return{major:t,minor:r,build:n,patch:i,opera:a}}function ic(){return!!n3().match(/iPad|iPhone|iPod/i)&&n5()}function il(){var t=0,r=0,n=0;if("undefined"!=typeof window){var i=n3().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(i)try{t=parseInt(i[1]),r=parseInt(i[2]),n=parseInt(i[4])}catch(t){}else ic()&&(t=14,r=0,n=3)}return{major:t,minor:r,point:n}}function iu(){var t=0,r=0;if("undefined"!=typeof window){var n=n3().match(/Firefox\/(\d+).(\d+)/);if(n)try{t=parseInt(n[1]),r=parseInt(n[2])}catch(t){}}return{major:t,minor:r}}var id=function(){function t(){h(this,t)}return m(t,[{key:"addListenerForMessagesFromCallMachine",value:function(t,r,n){eo()}},{key:"addListenerForMessagesFromDailyJs",value:function(t,r,n){eo()}},{key:"sendMessageToCallMachine",value:function(t,r,n,i){eo()}},{key:"sendMessageToDailyJs",value:function(t,r){eo()}},{key:"removeListener",value:function(t){eo()}}]),t}();function ih(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function ip(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};
19r%2?ih(Object(n),!0).forEach(function(r){E(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ih(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ig=function(t){y(i,id);var r,n=(r=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=S(i);return t=r?Reflect.construct(n,arguments,S(this).constructor):n.apply(this,arguments),b(this,t)});function i(){var t;return h(this,i),(t=n.call(this))._wrappedListeners={},t._messageCallbacks={},t}return m(i,[{key:"addListenerForMessagesFromCallMachine",value:function(t,r,n){var i=this,a=function(a){if(a.data&&"iframe-call-message"===a.data.what&&(!a.data.callFrameId||a.data.callFrameId===r)&&(!a.data.from||"module"!==a.data.from)){var o=ip({},a.data);if(delete o.from,o.callbackStamp&&i._messageCallbacks[o.callbackStamp]){var s=o.callbackStamp;i._messageCallbacks[s].call(n,o),delete i._messageCallbacks[s]}delete o.what,delete o.callbackStamp,t.call(n,o)}};this._wrappedListeners[t]=a,window.addEventListener("message",a)}},{key:"addListenerForMessagesFromDailyJs",value:function(t,r,n){var i=function(i){if(!(!i.data||i.data.what!==nH||!i.data.action||i.data.from&&"module"!==i.data.from||i.data.callFrameId&&r&&i.data.callFrameId!==r)){var a=i.data;t.call(n,a)}};this._wrappedListeners[t]=i,window.addEventListener("message",i)}},{key:"sendMessageToCallMachine",value:function(t,r,n,i){if(!i)throw Error("undefined callFrameId. Are you trying to use a DailyCall instance previously destroyed?");var a=ip({},t);if(a.what=nH,a.from="module",a.callFrameId=i,r){var o=ea();this._messageCallbacks[o]=r,a.callbackStamp=o}var s=n?n.contentWindow:window,c=this._callMachineTargetOrigin(n);c&&s.postMessage(a,c)}},{key:"sendMessageToDailyJs",value:function(t,r){t.what=nH,t.callFrameId=r,t.from="embedded",window.postMessage(t,this._targetOriginFromWindowLocation())}},{key:"removeListener",value:function(t){var r=this._wrappedListeners[t];r&&(window.removeEventListener("message",r),delete this._wrappedListeners[t])}},{key:"forwardPackagedMessageToCallMachine",value:function(t,r,n){var i=ip({},t);i.callFrameId=n;var a=r?r.contentWindow:window,o=this._callMachineTargetOrigin(r);o&&a.postMessage(i,o)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(t,r){var n=function(n){!n.data||"iframe-call-message"!==n.data.what||n.data.callFrameId&&n.data.callFrameId!==r||n.data.from&&"module"===n.data.from||t(n.data)};return this._wrappedListeners[t]=n,window.addEventListener("message",n),t}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(t){var r=this._wrappedListeners[t];r&&(window.removeEventListener("message",r),delete this._wrappedListeners[t])}},{key:"_callMachineTargetOrigin",value:function(t){return t?t.src?new URL(t.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:"_targetOriginFromWindowLocation",value:function(){return"file:"===window.location.protocol?"*":window.location.origin}}]),i}(),im=function(t){y(a,id);var r,i=(r=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=S(a);return t=r?Reflect.construct(n,arguments,S(this).constructor):n.apply(this,arguments),b(this,t)});function a(){var t;return h(this,a),t=i.call(this),n.g.callMachineToDailyJsEmitter=n.g.callMachineToDailyJsEmitter||new A.EventEmitter,n.g.dailyJsToCallMachineEmitter=n.g.dailyJsToCallMachineEmitter||new A.EventEmitter,t._wrappedListeners={},t._messageCallbacks={},t}return m(a,[{key:"addListenerForMessagesFromCallMachine",value:function(t,r,i){this._addListener(t,n.g.callMachineToDailyJsEmitter,i,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(t,r,i){this._addListener(t,n.g.dailyJsToCallMachineEmitter,i,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(t,r){this._sendMessage(t,n.g.dailyJsToCallMachineEmitter,"sending message to call machine",r)}},{key:"sendMessageToDailyJs",value:function(t){this._sendMessage(t,n.g.callMachineToDailyJsEmitter,"sending message to daily-js")}},{key:"removeListener",value:function(t){var r=this._wrappedListeners[t];r&&(n.g.callMachineToDailyJsEmitter.removeListener("message",r),n.g.dailyJsToCallMachineEmitter.removeListener("message",r),delete this._wrappedListeners[t])}},{key:"_addListener",value:function(t,r,n,i){var a=this,o=function(r){if(r.callbackStamp&&a._messageCallbacks[r.callbackStamp]){var i=r.callbackStamp;a._messageCallbacks[i].call(n,r),delete a._messageCallbacks[i]}t.call(n,r)};this._wrappedListeners[t]=o,r.addListener("message",o)}},{key:"_sendMessage",value:function(t,r,n,i){if(i){var a=ea();this._messageCallbacks[a]=i,t.callbackStamp=a}r.emit("message",t)}}]),a}(),i_="replace",iv="shallow-merge",iy=[i_,iv],ib=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.data,i=r.mergeStrategy,a=void 0===i?i_:i;h(this,t),t._validateMergeStrategy(a),t._validateData(n,a),this.mergeStrategy=a,this.data=n}return m(t,[{key:"isNoOp",value:function(){return t.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:"isNoOpUpdate",value:function(t,r){return 0===Object.keys(t).length&&r===iv}},{key:"_validateMergeStrategy",value:function(t){if(!iy.includes(t))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(iy,"]"))}},{key:"_validateData",value:function(t,r){if(!function(t){if(null==t||"object"!==p(t))return!1;var r=Object.getPrototypeOf(t);return null==r||r===Object.prototype}(t))throw Error("Meeting session data must be a plain (map-like) object");try{if(n=JSON.stringify(t),r===i_){var n,i=JSON.parse(n);q(i,t)||console.warn("The meeting session data provided will be modified when serialized.",i,t)}else if(r===iv){for(var a in t)if(Object.hasOwnProperty.call(t,a)&&void 0!==t[a]){var o=JSON.parse(JSON.stringify(t[a]));q(t[a],o)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",o,t[a])}}}catch(t){throw Error("Meeting session data must be serializable to JSON: ".concat(t))}if(n.length>102400)throw Error("Meeting session data is too large (".concat(n.length," characters). Maximum size suppported is ").concat(102400,"."))}}]),t}();function iS(t,r,n){return(iS=!function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}()?function(t,r,n){var i=[null];i.push.apply(i,r);var a=new(Function.bind.apply(t,i));return n&&v(a,n.prototype),a}:Reflect.construct.bind()).apply(null,arguments)}function iE(t){var r="function"==typeof Map?new Map:void 0;return(iE=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,n)}function n(){return iS(t,arguments,S(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),v(n,t)})(t)}function ik(t){var r,n=null===(r=window._daily)||void 0===r?void 0:r.pendings;if(n){var i=n.indexOf(t);-1!==i&&n.splice(i,1)}}var iw=function(){function t(r){h(this,t),this._currentLoad=null,this._callFrameId=r}return m(t,[{key:"load",value:function(){var t,r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callFrameId].callMachine.reset(),void i(!0);t=this._callFrameId,window._daily.pendings.push(t),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new iT(n,function(){i(!1)},function(t,n){n||ik(r._callFrameId),a(t,n)}),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),ik(this._callFrameId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}]),t}(),iT=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;h(this,t),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=r,this._successCallback=n,this._failureCallback=i}return m(t,[{key:"start",value:function(){var t=this;this._currentAttempt||(this._currentAttempt=new iC(this._dailyConfig,this._successCallback,function r(n){t._currentAttempt.cancelled||(t._attemptsRemaining--,t._failureCallback(n,t._attemptsRemaining>0),t._attemptsRemaining<=0||setTimeout(function(){t._currentAttempt.cancelled||(t._currentAttempt=new iC(t._dailyConfig,t._successCallback,r),t._currentAttempt.start())},3e3))}),this._currentAttempt.start())}},{key:"cancel",value:function(){this._currentAttempt&&this._currentAttempt.cancel()}},{key:"cancelled",get:function(){return this._currentAttempt&&this._currentAttempt.cancelled}},{key:"succeeded",get:function(){return this._currentAttempt&&this._currentAttempt.succeeded}}]),t}(),iM=function(t){y(i,iE(Error));var r,n=(r=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=S(i);return t=r?Reflect.construct(n,arguments,S(this).constructor):n.apply(this,arguments),b(this,t)});function i(){return h(this,i),n.apply(this,arguments)}return m(i)}(),iC=function(){var t;function r(t,n,i){h(this,r),this._loadAttemptImpl=n6()||!t.avoidEval?new iA(t,n,i):new iO(t,n,i)}return m(r,[{key:"start",value:(t=w(function*(){return this._loadAttemptImpl.start()}),function(){return t.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}}]),r}(),iA=function(){var t,r,n,i;function a(t,r,n){h(this,a),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache="undefined"!=typeof iOSCallObjectBundleCache&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=t,this._successCallback=r,this._failureCallback=n}return m(a,[{key:"start",value:(i=w(function*(){var t=ec(this._dailyConfig);(yield this._tryLoadFromIOSCache(t))||this._loadFromNetwork(t)}),function(){return i.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(n=w(function*(t){if(!this._iosCache)return!1;try{var r=yield this._iosCache.get(t);return!!this.cancelled||!!r&&(r.code?(Function('"use strict";'+r.code)(),this.succeeded=!0,this._successCallback(),!0):(this._refetchHeaders=r.refetchHeaders,!1))}catch(t){return!1}}),function(t){return n.apply(this,arguments)})},{key:"_loadFromNetwork",value:(r=w(function*(t){var r=this;this._networkTimeout=setTimeout(function(){r._networkTimedOut=!0,r._failureCallback({msg:"Timed out (>
19".concat(2e4," ms) when loading call object bundle ").concat(t),type:"timeout"})},2e4);try{var n=this._refetchHeaders?{headers:this._refetchHeaders}:{},i=yield fetch(t,n);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new iM;var a=yield this._getBundleCodeFromResponse(t,i);if(this.cancelled)throw new iM;Function('"use strict";'+a)(),this._iosCache&&this._iosCache.set(t,a,i.headers),this.succeeded=!0,this._successCallback()}catch(r){if(clearTimeout(this._networkTimeout),r instanceof iM||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(t,": ").concat(r),type:r.message})}}),function(t){return r.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(t=w(function*(t,r){if(r.ok)return yield r.text();if(this._iosCache&&304===r.status)return(yield this._iosCache.renew(t,r.headers)).code;throw Error("Received ".concat(r.status," response"))}),function(r,n){return t.apply(this,arguments)})}]),a}(),iO=function(){function t(r,n,i){h(this,t),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=r,this._successCallback=n,this._failureCallback=i,this._attemptId=ea(),this._networkTimeout=null,this._scriptElement=null}return m(t,[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var t=ec(this._dailyConfig);"object"===("undefined"==typeof document?"undefined":p(document))?this._startLoading(t):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(t){var r=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout(function(){r._stopLoading(),r._failureCallback({msg:"Timed out (>".concat(2e4," ms) when loading call object bundle ").concat(t),type:"timeout"})},2e4);var n=document.getElementsByTagName("head")[0],i=document.createElement("script");this._scriptElement=i,i.onload=function(){r._stopLoading(),r.succeeded=!0,r._successCallback()},i.onerror=function(t){r._stopLoading(),r._failureCallback({msg:"Failed to load call object bundle ".concat(t.target.src),type:t.message})},i.src=t,n.appendChild(i)}},{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)}}]),t}(),iI=function(t,r,n){return!0===iP(t.local,r,n)},iD=function(t,r,n,i){var a=iN(t,r,n,i);return a&&a.pendingTrack},iP=function(t,r,n){if(!t)return!1;var i=function(t){switch(t){case"avatar":return!0;case"staged":return t;default:return!!t}},a=t.public.subscribedTracks;return a&&a[r]?i(-1===["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo"].indexOf(n)&&a[r].custom?[!0,"staged"].includes(a[r].custom)?a[r].custom:a[r].custom[n]:a[r][n]):!a||i(a.ALL)},iN=function(t,r,n,i){var a=Object.values(t.streams||{}).filter(function(t){return t.participantId===r&&t.type===n&&t.pendingTrack&&t.pendingTrack.kind===i}).sort(function(t,r){return new Date(r.starttime)-new Date(t.starttime)});return a&&a[0]},iL=function(t,r){var n=t.local.public.customTracks;if(n&&n[r])return n[r].track};function iR(t,r){for(var n=r.getState(),i=0,a=["cam","screen"];i<a.length;i++)for(var o=a[i],s=0,c=["video","audio"];s<c.length;s++){var l=c[s],u="cam"===o?l:"screen".concat(l.charAt(0).toUpperCase()+l.slice(1)),d=t.tracks[u];if(d){var h=t.local?n.local.streams&&n.local.streams[o]&&n.local.streams[o].stream&&n.local.streams[o].stream["get".concat("video"===l?"Video":"Audio","Tracks")]()[0]:iD(n,t.session_id,o,l);"playable"===d.state&&(d.track=h),d.persistentTrack=h}}}function ix(t,r){try{var n=r.getState();for(var i in t.tracks)if(!["video","audio","screenVideo","screenAudio"].includes(i)){var a=t.tracks[i].kind;if(a){var o=t.tracks[i];if(o){var s=t.local?iL(n,i):iD(n,t.session_id,i,a);"playable"===o.state&&(t.tracks[i].track=s),o.persistentTrack=s}}else console.error("unknown type for custom track")}}catch(t){console.error(t)}}function ij(t,r,n){var i=n.getState();if(t.local){if(t.audio)try{t.audioTrack=i.local.streams.cam.stream.getAudioTracks()[0],t.audioTrack||(t.audio=!1)}catch(t){}if(t.video)try{t.videoTrack=i.local.streams.cam.stream.getVideoTracks()[0],t.videoTrack||(t.video=!1)}catch(t){}if(t.screen)try{t.screenVideoTrack=i.local.streams.screen.stream.getVideoTracks()[0],t.screenAudioTrack=i.local.streams.screen.stream.getAudioTracks()[0],t.screenVideoTrack||t.screenAudioTrack||(t.screen=!1)}catch(t){}}else{var a=!0;try{var o=i.participants[t.session_id];o&&o.public&&o.public.rtcType&&"peer-to-peer"===o.public.rtcType.impl&&o.private&&!["connected","completed"].includes(o.private.peeringState)&&(a=!1)}catch(t){console.error(t)}if(!a)return t.audio=!1,t.audioTrack=!1,t.video=!1,t.videoTrack=!1,t.screen=!1,void(t.screenTrack=!1);try{if(i.streams,t.audio&&iI(i,t.session_id,"cam-audio")){var s=iD(i,t.session_id,"cam","audio");s&&(r&&r.audioTrack&&r.audioTrack.id===s.id?t.audioTrack=s:s.muted||(t.audioTrack=s)),t.audioTrack||(t.audio=!1)}if(t.video&&iI(i,t.session_id,"cam-video")){var c=iD(i,t.session_id,"cam","video");c&&(r&&r.videoTrack&&r.videoTrack.id===c.id?t.videoTrack=c:c.muted||(t.videoTrack=c)),t.videoTrack||(t.video=!1)}if(t.screen&&iI(i,t.session_id,"screen-audio")){var l=iD(i,t.session_id,"screen","audio");l&&(r&&r.screenAudioTrack&&r.screenAudioTrack.id===l.id?t.screenAudioTrack=l:l.muted||(t.screenAudioTrack=l))}if(t.screen&&iI(i,t.session_id,"screen-video")){var u=iD(i,t.session_id,"screen","video");u&&(r&&r.screenVideoTrack&&r.screenVideoTrack.id===u.id?t.screenVideoTrack=u:u.muted||(t.screenVideoTrack=u))}t.screenVideoTrack||t.screenAudioTrack||(t.screen=!1)}catch(t){console.error("unexpected error matching up tracks",t)}}}function iF(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,i=Array(r);n<r;n++)i[n]=t[n];return i}var iB=new Map,iU=null;function iV(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,i=Array(r);n<r;n++)i[n]=t[n];return i}var iY=new Map,iG=null;function i$(){return n6()||void 0!==navigator.mediaDevices.ondevicechange}
19var iq,iJ,iW=new Set,iz=["videoTrack"],iH=["result"],iK=["preserveIframe"];function iQ(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function iX(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?iQ(Object(n),!0).forEach(function(r){E(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):iQ(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function iZ(t,r){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,r){if(t){if("string"==typeof t)return i0(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i0(t,void 0)}}(t))||r&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){c=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw o}}}}function i0(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,i=Array(r);n<r;n++)i[n]=t[n];return i}var i1="video",i2=n6()?{data:{}}:{data:{},topology:"none"},i4={present:0,hidden:0},i3={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},i6=Object.keys(i3),i5=["state","volume","simulcastEncodings"],i8={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},i9={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string"}},i7={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"}},ae={customIntegrations:{validate:aS,help:ay()},customTrayButtons:{validate:ab,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(i9))},url:{validate:function(t){return"string"==typeof t},help:"url should be a string"},baseUrl:{validate:function(t){return"string"==typeof t},help:"baseUrl should be a string"},token:{validate:function(t){return"string"==typeof t},help:"token should be a string",queryString:"t"},dailyConfig:{validate:function(t,r){try{return r.validateDailyConfig(t),!0}catch(t){console.error("Failed to validate dailyConfig",t)}return!1},help:"Unsupported dailyConfig. Check error logs for detailed info."},reactNativeConfig:{validate:function(t){return function t(r,n){if(void 0===n)return!1;switch(p(n)){case"string":return p(r)===n;case"object":if("object"!==p(r))return!1;for(var i in r)if(!t(r[i],n[i]))return!1;return!0;default:return!1}}(t,i8)},help:"reactNativeConfig should look like ".concat(JSON.stringify(i8),", all fields optional")},lang:{validate:function(t){return["de","en-us","en","es","fi","fr","it","jp","ka","nl","no","pl","pt","pt-BR","ru","sv","tr","user"].includes(t)},help:"language not supported. Options are: de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sv, tr, user"},userName:!0,userData:{validate:function(t){try{return ap(t),!0}catch(t){return console.error(t),!1}},help:"invalid userData type provided"},startVideoOff:!0,startAudioOff:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,
19cssText:!0,bodyClass:!0,videoSource:{validate:function(t,r){return t instanceof MediaStreamTrack&&(r._sharedTracks.videoDeviceId=t),r._preloadCache.videoDeviceId=t,!0}},audioSource:{validate:function(t,r){return t instanceof MediaStreamTrack&&(r._sharedTracks.audioDeviceId=t),r._preloadCache.audioDeviceId=t,!0}},subscribeToTracksAutomatically:{validate:function(t,r){return r._preloadCache.subscribeToTracksAutomatically=t,!0}},theme:{validate:function(t){var r=["accent","accentText","background","backgroundAccent","baseText","border","mainAreaBg","mainAreaBgAccent","mainAreaText","supportiveText"],n=function(t){for(var n=0,i=Object.keys(t);n<i.length;n++){var a=i[n];if(!r.includes(a))return console.error('unsupported color "'.concat(a,'". Valid colors: ').concat(r.join(", "))),!1;if(!t[a].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error("".concat(a,' theme color should be provided in valid hex color format. Received: "').concat(t[a],'"')),!1}return!0};return"object"===p(t)&&("light"in t&&"dark"in t||"colors"in t)?"light"in t&&"dark"in t?"colors"in t.light?"colors"in t.dark?n(t.light.colors)&&n(t.dark.colors):(console.error('Dark theme is missing "colors" property.',t),!1):(console.error('Light theme is missing "colors" property.',t),!1):n(t.colors):(console.error('Theme must contain either both "light" and "dark" properties, or "colors".',t),!1)},help:"unsupported theme configuration. Check error logs for detailed info."},layoutConfig:{validate:function(t){if("grid"in t){var r=t.grid;if("maxTilesPerPage"in r){if(!Number.isInteger(r.maxTilesPerPage))return console.error("grid.maxTilesPerPage should be an integer. You passed ".concat(r.maxTilesPerPage,".")),!1;if(r.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 r){if(!Number.isInteger(r.minTilesPerPage))return console.error("grid.minTilesPerPage should be an integer. You passed ".concat(r.minTilesPerPage,".")),!1;if(r.minTilesPerPage<1)return console.error("grid.minTilesPerPage can't be lower than 1."),!1;if("maxTilesPerPage"in r&&r.minTilesPerPage>r.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(t){return af(t,{allowAllParticipantsKey:!1})},help:av({allowAllParticipantsKey:!1})},sendSettings:{validate:function(t,r){return!!function(t,r){try{return r.validateUpdateSendSettings(t),!0}catch(t){return console.error("Failed to validate send settings",t),!1}}(t,r)&&(r._preloadCache.sendSettings=t,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(t,r){var n;return!!ag(t)&&(r._preloadCache.inputSettings||(r._preloadCache.inputSettings={}),am(t,null===(n=r.properties)||void 0===n?void 0:n.dailyConfig),t.audio&&(r._preloadCache.inputSettings.audio=t.audio),t.video&&(r._preloadCache.inputSettings.video=t.video),!0)},help:a_()},layout:{validate:function(t){return"custom-v1"===t||"browser"===t||"none"===t},help:'layout may only be set to "custom-v1"',queryString:"layout"},emb:{queryString:"emb"},embHref:{queryString:"embHref"},dailyJsVersion:{queryString:"dailyJsVersion"},proxy:{queryString:"proxy"},strictMode:!0},at={styles:{validate:function(t){for(var r in t)if("cam"!==r&&"screen"!==r)return!1;if(t.cam){for(var n in t.cam)if("div"!==n&&"video"!==n)return!1}if(t.screen){for(var i in t.screen)if("div"!==i&&"video"!==i)return!1}return!0},help:"styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }"},setSubscribedTracks:{validate:function(t,r){if(r._preloadCache.subscribeToTracksAutomatically)return!1;var n=[!0,!1,"staged"];if(n.includes(t)||!n6()&&"avatar"===t)return!0;var i=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"];return function t(r){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var o in r)if("custom"===o){if(!n.includes(r[o])&&!t(r[o],!0))return!1}else{var s=!a&&!i.includes(o),c=!n.includes(r[o]);if(s||c)return!1}return!0}(t)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(n6()?"":" | '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(t){return!1===t},help:"setScreenShare must be false, as it's only meant for stopping remote participants' screen shares"},eject:!0,updatePermissions:{validate:function(t){for(var r=0,n=Object.entries(t);r<n.length;r++){var i=M(n[r],2),a=i[0],o=i[1];switch(a){case"hasPresence":if("boolean"!=typeof o)return!1;break;case"canSend":if(o instanceof Set||o instanceof Array){var s,c=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],l=iZ(o);try{for(l.s();!(s=l.n()).done;){var u=s.value;if(!c.includes(u))return!1}}catch(t){l.e(t)}finally{l.f()}}else if("boolean"!=typeof o)return!1;o instanceof Array&&(t.canSend=new Set(o));break;case"canAdmin":if(o instanceof Set||o instanceof Array){var d,h=["participants","streaming","transcription"],p=iZ(o);try{for(p.s();!(d=p.n()).done;){var f=d.value;if(!h.includes(f))return!1}}catch(t){p.e(t)}finally{p.f()}}else if("boolean"!=typeof o)return!1;o instanceof Array&&(t.canAdmin=new Set(o));break;default:return!1}}return!0},help:"updatePermissions can take hasPresence, canSend, 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). canAdmin can be a boolean or an Array or Set of admin types (participants, streaming, transcription)."}};Promise.any||(Promise.any=function(){var t=w(function*(t){return new Promise(function(r,n){var i=[];t.forEach(function(a){return Promise.resolve(a).then(function(t){r(t)}).catch(function(r){i.push(r),i.length===t.length&&n(i)})})})});return function(r){return t.apply(this,arguments)}}());
19var ar=function(t){y(Z,A);var r,n,i,a,o,s,c,l,u,f,g,v,k,T,C,O,I,D,P,N,L,R,x,j,F,B,U,V,Y,G,$,J,W,z,H,K,Q,X=(r=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=S(Z);return t=r?Reflect.construct(n,arguments,S(this).constructor):n.apply(this,arguments),b(this,t)});function Z(t){var r,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(h(this,Z),E(_(n=X.call(this)),"startListeningForDeviceChanges",function(){var t;t=n.handleDeviceChange,i$()?iB.has(t)||(iB.set(t,{}),navigator.mediaDevices.enumerateDevices().then(function(r){var n;iB.has(t)&&(iB.get(t).lastDevicesString=JSON.stringify(r),iU||(n=w(function*(){var t,r=yield navigator.mediaDevices.enumerateDevices(),n=function(t,r){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,r){if(t){if("string"==typeof t)return iF(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iF(t,void 0)}}(t))){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){c=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw o}}}}(iB.keys());try{for(n.s();!(t=n.n()).done;){var i=t.value,a=JSON.stringify(r);a!==iB.get(i).lastDevicesString&&(iB.get(i).lastDevicesString=a,i(r))}}catch(t){n.e(t)}finally{n.f()}}),iU=function(){return n.apply(this,arguments)},navigator.mediaDevices.addEventListener("devicechange",iU)))}).catch(function(){})):iY.has(t)||(iY.set(t,{}),navigator.mediaDevices.enumerateDevices().then(function(r){iY.has(t)&&(iY.get(t).lastDevicesString=JSON.stringify(r),iG||(iG=setInterval(w(function*(){var t,r=yield navigator.mediaDevices.enumerateDevices(),n=function(t,r){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,r){if(t){if("string"==typeof t)return iV(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iV(t,void 0)}}(t))){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){c=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw o}}}}(iY.keys());try{for(n.s();!(t=n.n()).done;){var i=t.value,a=JSON.stringify(r);a!==iY.get(i).lastDevicesString&&(iY.get(i).lastDevicesString=a,i(r))}}catch(t){n.e(t)}finally{n.f()}}),3e3)))}))}),E(_(n),"stopListeningForDeviceChanges",function(){var t;t=n.handleDeviceChange,i$()?iB.has(t)&&(iB.delete(t),0===iB.size&&iU&&(navigator.mediaDevices.removeEventListener("devicechange",iU),iU=null)):iY.has(t)&&(iY.delete(t),0===iY.size&&iG&&(clearInterval(iG),iG=null))}),E(_(n),"handleDeviceChange",function(t){t=t.map(function(t){return JSON.parse(JSON.stringify(t))}),n.emit(nt,{action:nt,availableDevices:t})}),E(_(n),"handleNativeAppStateChange",(r=w(function*(t){if("destroyed"===t)return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield n.destroy());n.disableReactNativeAutoDeviceManagement("video")||("active"===t?n.camUnmutedBeforeLosingNativeActiveState&&n.setLocalVideo(!0):(n.camUnmutedBeforeLosingNativeActiveState=n.localVideo(),n.camUnmutedBeforeLosingNativeActiveState&&n.setLocalVideo(!1)))}),function(t){return r.apply(this,arguments)})),E(_(n),"handleNativeAudioFocusChange",function(t){n.disableReactNativeAutoDeviceManagement("audio")||(n._hasNativeAudioFocus=t,n.toggleParticipantAudioBasedOnNativeAudioFocus(),n._hasNativeAudioFocus?n.micUnmutedBeforeLosingNativeAudioFocus&&n.setLocalAudio(!0):(n.micUnmutedBeforeLosingNativeAudioFocus=n.localAudio(),n.setLocalAudio(!1)))}),E(_(n),"handleNativeSystemScreenCaptureStop",function(){n.stopScreenShare()}),n.strictMode=void 0===i.strictMode||i.strictMode,iJ){if(n._logDuplicateInstanceAttempt(),n.strictMode)throw Error("Duplicate DailyIframe instances are not allowed")}else iJ=_(n);if(window._daily||(window._daily={pendings:[],instances:{}}),n._callFrameId=ea(),window._daily.instances[n._callFrameId]={},n._sharedTracks={},window._daily.instances[n._callFrameId].tracks=n._sharedTracks,i.dailyJsVersion=Z.version(),n._iframe=t,n._c
19allObjectMode="none"===i.layout&&!n._iframe,n._preloadCache={subscribeToTracksAutomatically:!0,audioDeviceId:null,videoDeviceId:null,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},void 0!==i.showLocalVideo?n._callObjectMode?console.error("showLocalVideo is not available in call object mode"):n._showLocalVideo=!!i.showLocalVideo:n._showLocalVideo=!0,void 0!==i.showParticipantsBar?n._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):n._showParticipantsBar=!!i.showParticipantsBar:n._showParticipantsBar=!0,void 0!==i.customIntegrations?n._callObjectMode?console.error("customIntegrations is not available in call object mode"):n._customIntegrations=i.customIntegrations:n._customIntegrations={},void 0!==i.customTrayButtons?n._callObjectMode?console.error("customTrayButtons is not available in call object mode"):n._customTrayButtons=i.customTrayButtons:n._customTrayButtons={},void 0!==i.activeSpeakerMode?n._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):n._activeSpeakerMode=!!i.activeSpeakerMode:n._activeSpeakerMode=!1,i.receiveSettings?n._callObjectMode?n._receiveSettings=i.receiveSettings:console.error("receiveSettings is only available in call object mode"):n._receiveSettings={},n.validateProperties(i),n.properties=iX({},i),n._preloadCache.inputSettings||(n._preloadCache.inputSettings={}),i.inputSettings&&i.inputSettings.audio&&(n._preloadCache.inputSettings.audio=i.inputSettings.audio),i.inputSettings&&i.inputSettings.video&&(n._preloadCache.inputSettings.video=i.inputSettings.video),n._callObjectLoader=n._callObjectMode?new iw(n._callFrameId):null,n._callState=r_,n._isPreparingToJoin=!1,n._accessState={access:rI},n._meetingSessionSummary={},n._finalSummaryOfPrevSession={},n._meetingSessionState=aw(i2,n._callObjectMode),n._nativeInCallAudioMode=i1,n._participants={},n._isScreenSharing=!1,n._participantCounts=i4,n._rmpPlayerState={},n._waitingParticipants={},n._network={threshold:"good",quality:100},n._activeSpeaker={},n._localAudioLevel=0,n._remoteParticipantsAudioLevel={},n._messageChannel=n6()?new im:new ig,n._iframe&&(n._iframe.requestFullscreen?n._iframe.addEventListener("fullscreenchange",function(){document.fullscreenElement===n._iframe?(n.emit(nF,{action:nF}),n.sendMessageToCallMachine({action:nF})):(n.emit(nB,{action:nB}),n.sendMessageToCallMachine({action:nB}))}):n._iframe.webkitRequestFullscreen&&n._iframe.addEventListener("webkitfullscreenchange",function(){document.webkitFullscreenElement===n._iframe?(n.emit(nF,{action:nF}),n.sendMessageToCallMachine({action:nF})):(n.emit(nB,{action:nB}),n.sendMessageToCallMachine({action:nB}))})),n6()){var a=n.nativeUtils();a.addAudioFocusChangeListener&&a.removeAudioFocusChangeListener&&a.addAppStateChangeListener&&a.removeAppStateChangeListener&&a.addSystemScreenCaptureStopListener&&a.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),n._hasNativeAudioFocus=!0,a.addAudioFocusChangeListener(n.handleNativeAudioFocusChange),a.addAppStateChangeListener(n.handleNativeAppStateChange),a.addSystemScreenCaptureStopListener(n.handleNativeSystemScreenCaptureStop)}return n._callObjectMode&&n.startListeningForDeviceChanges(),n._messageChannel.addListenerForMessagesFromCallMachine(n.handleMessageFromCallMachine,n._callFrameId,_(n)),n}return m(Z,[{key:"destroy",value:(Q=w(function*(){try{yield this.leave()}catch(t){}var t,r,n=this._iframe;if(n){var i=n.parentElement;i&&i.removeChild(n)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),n6()){var a=this.nativeUtils();a.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),a.removeAppStateChangeListener(this.handleNativeAppStateChange),a.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0;
19try{this.emit("call-instance-destroyed",{action:"call-instance-destroyed"})}catch(t){console.log("could not emit call-instance-destroyed")}iJ=void 0,(null===(t=window)||void 0===t||null===(r=t._daily)||void 0===r?void 0:r.instances)&&delete window._daily.instances[this._callFrameId],this.strictMode&&(this._callFrameId=void 0)}),function(){return Q.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(t){var r=t.bodyClass,n=t.cssFile,i=t.cssText;return ad(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(n),bodyClass:r,cssText:i}),this}},{key:"iframe",value:function(){return ad(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return al(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return al(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(t,r){for(var n in r){if(!at[n])throw Error("unrecognized updateParticipant property ".concat(n));if(at[n].validate&&!at[n].validate(r[n],this,this._participants[t]))throw Error(at[n].help)}}},{key:"updateParticipant",value:function(t,r){return this._participants.local&&this._participants.local.session_id===t&&(t="local"),t&&r&&(this.validateParticipantProperties(t,r),this.sendMessageToCallMachine({action:"update-participant",id:t,properties:r})),this}},{key:"updateParticipants",value:function(t){var r=this._participants.local&&this._participants.local.session_id;for(var n in t)n===r&&(n="local"),n&&t[n]&&this.validateParticipantProperties(n,t[n]);return this.sendMessageToCallMachine({action:"update-participants",participants:t}),this}},{key:"updateWaitingParticipant",value:(K=w(function*(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(al(this._callObjectMode,"updateWaitingParticipant()"),ai(this._callState,"updateWaitingParticipant()"),"string"!=typeof r||"object"!==p(n))throw Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise(function(i,a){t.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:r,updates:n},function(t){t.error&&a(t.error),t.id||a(Error("unknown error in updateWaitingParticipant()")),i({id:t.id})})})}),function(){return K.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(H=w(function*(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(al(this._callObjectMode,"updateWaitingParticipants()"),ai(this._callState,"updateWaitingParticipants()"),"object"!==p(r))throw Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise(function(n,i){t.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updatesById:r},function(t){t.error&&i(t.error),t.ids||i(Error("unknown error in updateWaitingParticipants()")),n({ids:t.ids})})})}),function(){return H.apply(this,arguments)})},{key:"requestAccess",value:(z=w(function*(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.access,i=void 0===n?{level:rD}:n,a=r.name,o=void 0===a?"":a;return al(this._callObjectMode,"requestAccess()"),ai(this._callState,"requestAccess()"),new Promise(function(r,n){t.sendMessageToCallMachine({action:"daily-method-request-access",access:i,name:o},function(t){t.error&&n(t.error),t.access||n(Error("unknown error in requestAccess()")),r({access:t.access,granted:t.granted})})})}),function(){return z.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(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"forceDiscardTrack"in r&&(n6()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),r={}):t&&(console.warn("forceDiscardTrack option only supported when calling set
19LocalAudio(false); ignoring"),r={})),this.sendMessageToCallMachine({action:"local-audio",state:t,options:r}),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(t){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:t}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(t){return this.sendMessageToCallMachine({action:"local-video",state:t}),this}},{key:"getReceiveSettings",value:(W=w(function*(t){var r=this,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).showInheritedValues,i=void 0!==n&&n;if(al(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(p(t)){case"string":return new Promise(function(n){r.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:t,showInheritedValues:i},function(t){n(t.receiveSettings)})});case"undefined":return this._receiveSettings;default:throw Error('first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments')}}),function(t){return W.apply(this,arguments)})},{key:"updateReceiveSettings",value:(J=w(function*(t){var r=this;if(al(this._callObjectMode,"updateReceiveSettings()"),!af(t,{allowAllParticipantsKey:!0}))throw Error(av({allowAllParticipantsKey:!0}));return ai(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise(function(n){r.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:t},function(t){n({receiveSettings:t.receiveSettings})})})}),function(t){return J.apply(this,arguments)})},{key:"_prepInputSettingsToPresentToUser",value:function(t){var r,n,i,a,o,s,c,l;if(t){var u={},d="none"===(null===(r=t.audio)||void 0===r||null===(n=r.processor)||void 0===n?void 0:n.type)&&(null===(i=t.audio)||void 0===i||null===(a=i.processor)||void 0===a?void 0:a._isDefaultWhenNone);if(t.audio&&!d){var h=iX({},t.audio.processor);delete h._isDefaultWhenNone,u.audio=iX(iX({},t.audio),{},{processor:h})}var p="none"===(null===(o=t.video)||void 0===o||null===(s=o.processor)||void 0===s?void 0:s.type)&&(null===(c=t.video)||void 0===c||null===(l=c.processor)||void 0===l?void 0:l._isDefaultWhenNone);if(t.video&&!p){var f=iX({},t.video.processor);delete f._isDefaultWhenNone,u.video=iX(iX({},t.video),{},{processor:f})}return u}}},{key:"getInputSettings",value:function(){var t=this;return ad(),new Promise(function(r){r(t._getInputSettings())})}},{key:"_getInputSettings",value:function(){var t,r,n,i,a,o,s,c,l={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(t=(null===(n=this._inputSettings)||void 0===n?void 0:n.video)||l,r=(null===(i=this._inputSettings)||void 0===i?void 0:i.audio)||l):(t=(null===(a=this._preloadCache)||void 0===a||null===(o=a.inputSettings)||void 0===o?void 0:o.video)||l,r=(null===(s=this._preloadCache)||void 0===s||null===(c=s.inputSettings)||void 0===c?void 0:c.audio)||l);var u={audio:r,video:t};return this._prepInputSettingsToPresentToUser(u)}},{key:"updateInputSettings",value:($=w(function*(t){var r=this;return ad(),ag(t)?(t&&(this._preloadCache.inputSettings||(this._preloadCache.inputSettings={}),am(t,this.properties.dailyConfig),t.audio&&(this._preloadCache.inputSettings.audio=t.audio),t.video&&(this._preloadCache.inputSettings.video=t.video)),t.video||t.audio?this._callObjectMode&&!this._callMachineInitialized?this._getInputSettings():new Promise(function(n,i){r.sendMessageToCallMachine({action:"update-input-settings",inputSettings:t},function(t){t.error?i(t.error):n({inputSettings:r._prepInputSettingsToPresentToUser(t.inputSettings)})})}):this._getInputSettings()):(console.error(a_()),Promise.reject(a_()))}),function(t){return $.apply(this,arguments)})},{key:"setBandwidth",value:function(t){var r=t.kbs,n=t.trackConstraints;if(ad(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:r,trackConstraints:n}),this}},{key:"getDailyLang",value:function(){var t=this;if(ad(),this._callMachineInitialized)return new Promise(function(r){t.sendMessageToCallMachine({action:"get-
19daily-lang"},function(t){delete t.action,delete t.callbackStamp,r(t)})})}},{key:"setDailyLang",value:function(t){return ad(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:t}),this}},{key:"setProxyUrl",value:function(t){return this.sendMessageToCallMachine({action:"set-proxy-url",proxyUrl:t}),this}},{key:"setIceConfig",value:function(t){return this.sendMessageToCallMachine({action:"set-ice-config",iceConfig:t}),this}},{key:"meetingSessionSummary",value:function(){return[rE,rk].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(G=w(function*(){var t=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),ai(this._callState,"getMeetingSession()"),new Promise(function(r){t.sendMessageToCallMachine({action:"get-meeting-session"},function(t){delete t.action,delete t.callbackStamp,delete t.callFrameId,r(t)})})}),function(){return G.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return ai(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"replace";al(this._callObjectMode,"setMeetingSessionData()"),ai(this._callState,"setMeetingSessionData");try{new ib({data:t,mergeStrategy:r})}catch(t){throw console.error(t),t}try{this.sendMessageToCallMachine({action:"set-session-data",data:t,mergeStrategy:r})}catch(t){throw Error("Error setting meeting session data: ".concat(t))}}},{key:"setUserName",value:function(t,r){var n=this;return this.properties.userName=t,new Promise(function(i){n.sendMessageToCallMachine({action:"set-user-name",name:null!=t?t:"",thisMeetingOnly:n6()||!!r&&!!r.thisMeetingOnly},function(t){delete t.action,delete t.callbackStamp,i(t)})})}},{key:"setUserData",value:(Y=w(function*(t){var r=this;try{ap(t)}catch(t){throw console.error(t),t}if(this.properties.userData=t,this._callMachineInitialized)return new Promise(function(n){try{r.sendMessageToCallMachine({action:"set-user-data",userData:t},function(t){delete t.action,delete t.callbackStamp,delete t.callFrameId,n(t)})}catch(t){throw Error("Error setting user data: ".concat(t))}})}),function(t){return Y.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(t){if(t&&(t<100||"number"!=typeof t))throw Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(t){var r=this;if("undefined"==typeof AudioWorkletNode&&!n6())throw Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(t),this._callMachineInitialized)return new Promise(function(n,i){r.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:t},function(t){t.error?i({error:t.error}):n()})});this._preloadCache.localAudioLevelObserver={enabled:!0,interval:t}}},{key:"stopLocalAudioLevelObserver",value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this.sendMessageToCallMachine({action:"stop-local-audio-level-observer"})}},{key:"startRemoteParticipantsAudioLevelObserver",value:function(t){var r=this;if(this.validateAudioLevelInterval(t),this._callMachineInitialized)return new Promise(function(n,i){r.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:t},function(t){t.error?i({error:t.error}):n()})});this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:t}}},{key:"stopRemoteParticipantsAudioLevelObserver",value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this.sendMessageToCallMachine({action:"stop-remote-participants-audio-level-observer"})}},{key:"startCamera",value:(V=w(function*(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(al(this._callObjectMode,"startCamera()"),ao(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),ac(this._testCallInProgress,"startCamera()"),this.needsLoad())try{yield this.load(r)}catch(t){return Promise.reject(t)}else{if(this._didPreAuth){if(r.url&&r.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(r.token&&r.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(r),this.properties=iX(iX({},this.properties),r)}return new Promise(function(r){t.sendMessageToCallMachine({action:"start-camera",properties:an(t.properties,t._callFrameId),preloadCache:an(t._preloadCache,t._callFrameId)},function(t){delete t.action,delete t.callbackStamp,r(t)})})}),function(){return V.apply(this,arguments)})},{key:"validateCustomTrack",value:function(t,r,n){if(n&&n.length>50)throw Error("Custom track `trackName` must not be more than 50 characters");if(r&&"music"!==r&&"speech"!==r&&!(r instanceof Object))throw Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(n&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(n))throw Error("Custom track `trackName` must not match a track name already used by daily: cam-audio, c
19am-video, customVideoDefaults, screen-video, screen-audio, rmpAudio, rmpVideo");if(!(t instanceof MediaStreamTrack))throw Error("Custom tracks provided must be instances of MediaStreamTrack")}},{key:"startCustomTrack",value:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{track:track,mode:mode,trackName:trackName};return ad(),ai(this._callState,"startCustomTrack()"),this.validateCustomTrack(r.track,r.mode,r.trackName),new Promise(function(n,i){t._sharedTracks.customTrack=r.track,r.track=nZ,t.sendMessageToCallMachine({action:"start-custom-track",properties:r},function(t){t.error?i({error:t.error}):n(t.mediaTag)})})}},{key:"stopCustomTrack",value:function(t){var r=this;return ad(),ai(this._callState,"stopCustomTrack()"),new Promise(function(n){r.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:t},function(t){n(t.mediaTag)})})}},{key:"setCamera",value:function(t){var r=this;return ah(),as(this._callMachineInitialized,"setCamera()"),new Promise(function(n){r.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:t},function(t){n({device:t.device})})})}},{key:"setAudioDevice",value:(U=w(function*(t){return ah(),this.nativeUtils().setAudioDevice(t),{deviceId:yield this.nativeUtils().getAudioDevice()}}),function(t){return U.apply(this,arguments)})},{key:"cycleCamera",value:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(function(n){t.sendMessageToCallMachine({action:"cycle-camera",properties:r},function(t){n({device:t.device})})})}},{key:"cycleMic",value:function(){var t=this;return ad(),new Promise(function(r){t.sendMessageToCallMachine({action:"cycle-mic"},function(t){r({device:t.device})})})}},{key:"getCameraFacingMode",value:function(){var t=this;return ah(),new Promise(function(r){t.sendMessageToCallMachine({action:"get-camera-facing-mode"},function(t){r(t.facingMode)})})}},{key:"setInputDevicesAsync",value:(B=w(function*(t){var r=this,n=t.audioDeviceId,i=t.videoDeviceId,a=t.audioSource,o=t.videoSource;return ad(),void 0!==a&&(n=a),void 0!==o&&(i=o),n&&(this._preloadCache.audioDeviceId=n,this._sharedTracks.audioDeviceId=n),i&&(this._preloadCache.videoDeviceId=i,this._sharedTracks.videoDeviceId=i),this._callObjectMode&&this.needsLoad()?{camera:{deviceId:this._preloadCache.videoDeviceId},mic:{deviceId:this._preloadCache.audioDeviceId},speaker:{deviceId:this._preloadCache.outputDeviceId}}:(n instanceof MediaStreamTrack&&(n=nZ),i instanceof MediaStreamTrack&&(i=nZ),new Promise(function(t){r.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:n,videoDeviceId:i},function(n){delete n.action,delete n.callbackStamp,n.returnPreloadCache?t({camera:{deviceId:r._preloadCache.videoDeviceId},mic:{deviceId:r._preloadCache.audioDeviceId},speaker:{deviceId:r._preloadCache.outputDeviceId}}):t(n)})}))}),function(t){return B.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(F=w(function*(t){var r=this,n=t.outputDeviceId;return ad(),n&&(this._preloadCache.outputDeviceId=n),this._callObjectMode&&this.needsLoad()?{camera:{deviceId:this._preloadCache.videoDeviceId},mic:{deviceId:this._preloadCache.audioDeviceId},speaker:{deviceId:this._preloadCache.outputDeviceId}}:new Promise(function(t){r.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:n},function(n){delete n.action,delete n.callbackStamp,n.returnPreloadCache?t({camera:{deviceId:r._preloadCache.videoDeviceId},mic:{deviceId:r._preloadCache.audioDeviceId},speaker:{deviceId:r._preloadCache.outputDeviceId}}):t(n)})})}),function(t){return F.apply(this,arguments)})},{key:"getInputDevices",value:(j=w(function*(){var t=this;return this._callObjectMode&&this.needsLoad()?{camera:{deviceId:this._preloadCache.videoDeviceId},mic:{deviceId:this._preloadCache.audioDeviceId},speaker:{deviceId:this._preloadCache.outputDeviceId}}:new Promise(function(r){t.sendMessageToCallMachine({action:"get-input-devices"},function(n){delete n.action,delete n.callbackStamp,n.returnPreloadCache?r({camera:{deviceId:t._preloadCache.videoDeviceId},mic:{deviceId:t._preloadCache.audioDeviceId},speaker:{deviceId:t._preloadCache.outputDeviceId}}):r(n)})})}),function(){return j.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return ah(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(t){if(ah(),[i1,"voice"].includes(t)){if(t!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=t,!this.disableReactNativeAutoDeviceManagement("audio")&&aa(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMo
19de(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",t)}},{key:"preAuth",value:(x=w(function*(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(al(this._callObjectMode,"preAuth()"),ao(this._callState,this._isPreparingToJoin,"preAuth()"),ac(this._testCallInProgress,"preAuth()"),this.needsLoad()&&(yield this.load(r)),!r.url)throw Error("preAuth() requires at least a url to be provided");return this.validateProperties(r),this.properties=iX(iX({},this.properties),r),new Promise(function(r,n){t.sendMessageToCallMachine({action:"daily-method-preauth",properties:an(t.properties,t._callFrameId),preloadCache:an(t._preloadCache,t._callFrameId)},function(i){return i.error?n(i.error):i.access?(t._didPreAuth=!0,void r({access:i.access})):n(Error("unknown error in preAuth()"))})})}),function(){return x.apply(this,arguments)})},{key:"load",value:(R=w(function*(t){var r=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw Error("Use after destroy");if(t&&(this.validateProperties(t),this.properties=iX(iX({},this.properties),t)),!this._callObjectMode&&!this.properties.url)throw Error("can't load iframe meeting because url property isn't set");this._updateCallState(rv);try{this.emit(r4,{action:r4})}catch(t){console.log("could not emit 'loading'",t)}return this._callObjectMode?new Promise(function(t,n){r._callObjectLoader.cancel();var i=Date.now();r._callObjectLoader.load(r.properties.dailyConfig,function(n){r._bundleLoadTime=n?"no-op":Date.now()-i,r._updateCallState(ry),n&&r.emit(r6,{action:r6}),t()},function(t,i){if(r.emit(r3,{action:r3,error:t}),!i){r._updateCallState(rk),r.resetMeetingDependentVars();var a={action:nz,errorMsg:t.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:t,bundleUrl:ec(r.properties.dailyConfig)}}};r._maybeSendToSentry(a),r.emit(nz,a),n(t.msg)}})}):(this._iframe.src=es(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise(function(t,n){r._loadedCallback=function(i){r._callState!==rk?(r._updateCallState(ry),(r.properties.cssFile||r.properties.cssText)&&r.loadCss(r.properties),t()):n(i)}}))}}),function(t){return R.apply(this,arguments)})},{key:"join",value:(L=w(function*(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ac(this._testCallInProgress,"join()");var n=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(r)}catch(t){return this.updateIsPreparingToJoin(!1),Promise.reject(t)}}else{if(n=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(r.url&&r.url!==this.properties.url)return console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(r.token&&r.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(r.url&&!this._callObjectMode&&r.url&&r.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(r.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(r),this.properties=iX(iX({},this.properties),r)}if(void 0!==r.showLocalVideo&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!r.showLocalVideo),void 0!==r.showParticipantsBar&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!r.showParticipantsBar),this._callState===rS||this._callState===rb)return console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1);this._updateCallState(rb,!1);try{this.emit(r9,{action:r9})}catch(t){console.log("could not emit 'joining-meeting'",t)}return this._preloadCache.inputSettings||(this._preloadCache.inputSettings={}),r.inputSettings&&r.inputSettings.audio&&(this._preloadCache.inputSettings.audio=r.inputSettings.audio),r.inputSettings&&r.inputSettings.video&&(this._preloadCache.inputSettings.video=r.inputSettings.video),this.sendMessageToCallMachine({action:"join-meeting",properties:an(this.properties,this._callFrameId),preloadCache:an(this._preloadCache,this._callFrameId)}),new Promise(function(r,i){t._joinedCallback=function(a,o){if(t._callState!==rk){if(t._updateCallState(rS),a)for(var s in a){if(t._callObjectMode){var c=t._callMachine().store;
19iR(a[s],c),ix(a[s],c),ij(a[s],t._participants[s],c)}t._participants[s]=iX({},a[s]),t.toggleParticipantAudioBasedOnNativeAudioFocus()}n&&t.loadCss(t.properties),r(a)}else i(o)}})}),function(){return L.apply(this,arguments)})},{key:"leave",value:(N=w(function*(){var t=this;return ac(this._testCallInProgress,"leave()"),new Promise(function(r){if(t._callState===rE||t._callState===rk)r();else if(t._callObjectLoader&&!t._callObjectLoader.loaded){t._callObjectLoader.cancel(),t._updateCallState(rE),t.resetMeetingDependentVars();try{t.emit(rE,{action:rE})}catch(t){console.log("could not emit 'left-meeting'",t)}r()}else t._resolveLeave=r,t.sendMessageToCallMachine({action:"leave-meeting"})})}),function(){return N.apply(this,arguments)})},{key:"startScreenShare",value:(P=w(function*(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(as(this._callMachineInitialized,"startScreenShare()"),r.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",r.screenVideoSendSettings),r.mediaStream&&(this._sharedTracks.screenMediaStream=r.mediaStream,r.mediaStream=nZ),"undefined"!=typeof DailyNativeUtils&&void 0!==DailyNativeUtils.isIOS&&DailyNativeUtils.isIOS){var n=this.nativeUtils();if(yield n.isScreenBeingCaptured())return void this.emit(nW,{action:nW,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});n.setSystemScreenCaptureStartCallback(function(){n.setSystemScreenCaptureStartCallback(null),t.sendMessageToCallMachine({action:nK,captureOptions:r})}),n.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:nK,captureOptions:r})}),function(){return P.apply(this,arguments)})},{key:"stopScreenShare",value:function(){as(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(iX({action:"local-recording-start"},t))}},{key:"updateRecording",value:function(t){var r=t.layout,n=t.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:void 0===r?{preset:"default"}:r,instanceId:n})}},{key:"stopRecording",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(iX({action:"local-recording-stop"},t))}},{key:"startLiveStreaming",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(iX({action:"daily-method-start-live-streaming"},t))}},{key:"updateLiveStreaming",value:function(t){var r=t.layout,n=t.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:void 0===r?{preset:"default"}:r,instanceId:n})}},{key:"addLiveStreamingEndpoints",value:function(t){var r=t.endpoints,n=t.instanceId;this.sendMessageToCallMachine({action:nQ,endpointsOp:"add-endpoints",endpoints:r,instanceId:n})}},{key:"removeLiveStreamingEndpoints",value:function(t){var r=t.endpoints,n=t.instanceId;this.sendMessageToCallMachine({action:nQ,endpointsOp:"remove-endpoints",endpoints:r,instanceId:n})}},{key:"stopLiveStreaming",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};
19this.sendMessageToCallMachine(iX({action:"daily-method-stop-live-streaming"},t))}},{key:"validateDailyConfig",value:function(t){t.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(t.camSimulcastEncodings)),t.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),n3().match(/Linux; Android/)&&t.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t){if(!(t instanceof Array))throw Error("encodings must be an Array");if(!ak(t.length,1,3))throw Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var i=0;i<t.length;i++){var a=t[i];for(var o in this._validateEncodingLayerHasValidProperties(a),a)if(i6.includes(o)){if("number"!=typeof a[o])throw Error("".concat(o," must be a number"));if(r){var s=r[o],c=s.min,l=s.max;if(!ak(a[o],c,l))throw Error("".concat(o," value not in range. valid range: ").concat(c," to ").concat(l))}}else if(!["active","scalabilityMode"].includes(o))throw Error("Invalid key ".concat(o,", valid keys are:")+Object.values(i6));if(n&&!a.hasOwnProperty("maxBitrate"))throw Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(D=w(function*(t){var r=this,n=t.url,i=t.settings,a=void 0===i?{state:n2.PLAY}:i;try{(function(t){if("string"!=typeof t)throw Error('url parameter must be "string" type')})(n),aE(a),function(t){for(var r in t)if(!i5.includes(r))throw Error("Invalid key ".concat(r,", valid keys are: ").concat(i5));t.simulcastEncodings&&this.validateSimulcastEncodings(t.simulcastEncodings,i3,!0)}(a)}catch(t){throw console.error("invalid argument Error: ".concat(t)),console.error('startRemoteMediaPlayer arguments must be of the form:\n  { url: "playback url",\n  settings?:\n  {state: "play"|"pause", simulcastEncodings?: [{}] } }'),t}return new Promise(function(t,i){r.sendMessageToCallMachine({action:"daily-method-start-remote-media-player",url:n,settings:a},function(r){r.error?i({error:r.error,errorMsg:r.errorMsg}):t({session_id:r.session_id,remoteMediaPlayerState:{state:r.state,settings:r.settings}})})})}),function(t){return D.apply(this,arguments)})},{key:"stopRemoteMediaPlayer",value:(I=w(function*(t){var r=this;if("string"!=typeof t)throw Error(" remotePlayerID must be of type string");return new Promise(function(n,i){r.sendMessageToCallMachine({action:"daily-method-stop-remote-media-player",session_id:t},function(t){t.error?i({error:t.error,errorMsg:t.errorMsg}):n()})})}),function(t){return I.apply(this,arguments)})},{key:"updateRemoteMediaPlayer",value:(O=w(function*(t){var r=this,n=t.session_id,i=t.settings;try{aE(i)}catch(t){throw console.error("invalid argument Error: ".concat(t)),console.error('updateRemoteMediaPlayer arguments must be of the form:\n  session_id: "participant session",\n  { settings?: {state: "play"|"pause"} }'),t}return new Promise(function(t,a){r.sendMessageToCallMachine({action:"daily-method-update-remote-media-player",session_id:n,settings:i},function(r){r.error?a({error:r.error,errorMsg:r.errorMsg}):t({session_id:r.session_id,remoteMediaPlayerState:{state:r.state,settings:r.settings}})})})}),function(t){return O.apply(this,arguments)})},{key:"startTranscription",value:function(t){this.sendMessageToCallMachine(iX({action:"daily-method-start-transcription"},t))}},{key:"stopTranscription",value:function(){this.sendMessageToCallMachine({action:"daily-method-stop-transcription"})}},{key:"startDialOut",value:(C=w(function*(t){var r=this;ai(this._callState,"startDialOut()");var n=function(t){if(t){if(!Array.isArray(t))throw Error("Error starting dial out: audio codec must be an array");if(t.length<=0)throw Error("Error starting dial out: audio codec array specified but empty");t.forEach(function(t){if("string"!=typeof t)throw Error("Error starting dial out: audio codec must be a string");if("OPUS"!==t&&"PCMU"!==t&&"PCMA"!==t&&"G722"!==t)throw Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722")})}};if(!t.sipUri&&!t.phoneNumber)throw Error("Error starting dial out: either a sip uri or phone number must be provided");
19if(t.sipUri&&t.phoneNumber)throw Error("Error starting dial out: only one of sip uri or phone number must be provided");if(t.sipUri){if("string"!=typeof t.sipUri)throw Error("Error starting dial out: sipUri must be a string");if(!t.sipUri.startsWith("sip:"))throw Error("Error starting dial out: Invalid SIP URI, must start with 'sip:'");if(t.video&&"boolean"!=typeof t.video)throw Error("Error starting dial out: video must be a boolean value");!function(t){if(t&&(n(t.audio),t.video)){if(!Array.isArray(t.video))throw Error("Error starting dial out: video codec must be an array");if(t.video.length<=0)throw Error("Error starting dial out: video codec array specified but empty");t.video.forEach(function(t){if("string"!=typeof t)throw Error("Error starting dial out: video codec must be a string");if("H264"!==t&&"VP8"!==t)throw Error("Error starting dial out: video codec must be H264 or VP8")})}}(t.codecs)}if(t.phoneNumber){if("string"!=typeof t.phoneNumber)throw Error("Error starting dial out: phoneNumber must be a string");if(!/^\+\d{1,}$/.test(t.phoneNumber))throw Error("Error starting dial out: Invalid phone number, must be valid phone number as per E.164");t.codecs&&n(t.codecs.audio)}if(t.callerId){if("string"!=typeof t.callerId)throw Error("Error starting dial out: callerId must be a string");if(t.sipUri)throw Error("Error starting dial out: callerId not allowed with sipUri")}if(t.displayName){if("string"!=typeof t.displayName)throw Error("Error starting dial out: displayName must be a string");if(t.displayName.length>=200)throw Error("Error starting dial out: displayName length must be less than 200")}return new Promise(function(n,i){r.sendMessageToCallMachine(iX({action:"dialout-start"},t),function(t){t.error?i(t.error):n(t)})})}),function(t){return C.apply(this,arguments)})},{key:"stopDialOut",value:function(t){var r=this;return ai(this._callState,"stopDialOut()"),new Promise(function(n,i){r.sendMessageToCallMachine(iX({action:"dialout-stop"},t),function(t){t.error?i(t.error):n(t)})})}},{key:"sendDTMF",value:(T=w(function*(t){var r=this;return ai(this._callState,"sendDTMF()"),function(t){var r=t.sessionId,n=t.tones;if(!r||!n)throw Error("sessionId and tones are mandatory parameter");if("string"!=typeof r||"string"!=typeof n)throw Error("sessionId and tones should be of string type");if(n.length>20)throw Error("tones string must be upto 20 characters");var i=n.match(/[^0-9A-D*#]/g);if(i&&i[0])throw Error("".concat(i[0]," is not valid DTMF tone"))}(t),new Promise(function(n,i){r.sendMessageToCallMachine(iX({action:"send-dtmf"},t),function(t){t.error?i(t.error):n(t)})})}),function(t){return T.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var t=this;return this._callState!==rS?{stats:{latest:{}}}:new Promise(function(r){t.sendMessageToCallMachine({action:"get-calc-stats"},function(n){r(iX({stats:n.stats},t._network))})})}},{key:"testWebsocketConnectivity",value:(k=w(function*(){var t=this;if(ac(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(t){return Promise.reject(t)}return new Promise(function(r,n){t.sendMessageToCallMachine({action:"test-websocket-connectivity"},function(t){t.error?n(t.error):r(t.results)})})}),function(){return k.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(t){return t?t instanceof MediaStreamTrack?!!(t&&"live"===t.readyState&&(!t.muted||iW.has(t.id)))||(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:(v=w(function*(t){var r=this;if(function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method",n=arguments.length>2?arguments[2]:void 0;if(t){var i="".concat(r," can not be called after preAuth(), startCamera(), or join() and call state has been initialized.");throw n&&(i+=" ".concat(n)),console.error(i),Error(i)}}(this._callMachineInitialized,"testCallQuality()"),t.videoTrack&&!this._val
19idateVideoTrackForNetworkTests(t.videoTrack))throw Error("Video track error");var n=this._testCallAlreadyInProgress,i=function(t){n||(r._testCallInProgress=t)};i(!0);var a=t.videoTrack,o=d(t,iz);if(this._sharedTracks.videoTrackForConnectionQualityTest=a,this.needsLoad())try{var s=this._callState;yield this.load(),this._callState=s}catch(t){return i(!1),Promise.reject(t)}return new Promise(function(t){r.sendMessageToCallMachine(iX(iX({action:"test-call-quality"},o),{},{dailyJsVersion:r.properties.dailyJsVersion}),function(n){var a=n.results,o=a.result,s=d(a,iH);if("failed"===o){var c,l=iX({},s);null!==(c=s.error)&&void 0!==c&&c.details?(s.error.details=JSON.parse(s.error.details),l.error=iX(iX({},l.error),{},{details:iX({},l.error.details)}),l.error.details.duringTest="testCallQuality"):(l.error=l.error?iX({},l.error):{},l.error.details={duringTest:"testCallQuality"}),r._maybeSendToSentry(l)}i(!1),t(iX({result:o},s))})})}),function(t){return v.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(g=w(function*(t){console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead");var r=yield this.testPeerToPeerCallQuality(t),n={result:r.result,secondsElapsed:r.secondsElapsed};return r.data&&(n.data={maxRTT:r.data.maxRoundTripTime,packetLoss:r.data.avgRecvPacketLoss}),n}),function(t){return g.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(f=w(function*(t){var r=this;if(ac(this._testCallInProgress,"testConnectionQuality()"),this.needsLoad())try{yield this.load()}catch(t){return Promise.reject(t)}var n=t.videoTrack,i=t.duration;if(!this._validateVideoTrackForNetworkTests(n))throw Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=n,new Promise(function(t,n){r.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:i},function(r){r.error?n(r.error):t(r.results)})})}),function(t){return f.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){console.warn("stopTestConnectionQuality() is deprecated: use stopTestPeerToPeerCallQuality() instead"),this.stopTestPeerToPeerCallQuality()}},{key:"stopTestPeerToPeerCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-p2p-call-quality"})}},{key:"testNetworkConnectivity",value:(u=w(function*(t){var r=this;if(ac(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(t){return Promise.reject(t)}if(!this._validateVideoTrackForNetworkTests(t))throw Error("Video track error");return this._sharedTracks.videoTrackForNetworkConnectivityTest=t,new Promise(function(t,n){r.sendMessageToCallMachine({action:"test-network-connectivity"},function(r){r.error?n(r.error):t(r.results)})})}),function(t){return u.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var t=this;return new Promise(function(r,n){t._callState===rS?t.sendMessageToCallMachine({action:"get-cpu-load-stats"},function(t){r(t.cpuStats)}):r({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})})}},{key:"_validateEncodingLayerHasValidProperties",value:function(t){var r;if(!((null===(r=Object.keys(t))||void 0===r?void 0:r.length)>0))throw Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(i6))}},{key:"_validateVideoSendSettings",value:function(t,r){var n="screenVideo"===t?["default-screen-video","detail-optimized","motion-optimized","motion-and-detail-balanced"]:["default-video","bandwidth-optimized","bandwidth-and-quality-balanced","quality-optimized","adaptive-2-layers","adaptive-3-layers"],i="Video send settings should be either an object or one of the supported presets: ".concat(n.join());if("string"==typeof r){if(!n.includes(r))throw Error(i)}else{if("object"!==p(r))throw Error(i);if(!r.maxQuality&&!r.encodings&&void 0===r.allowAdaptiveLayers)throw Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(r.maxQuality&&-1===["low","medium","high"].indexOf(r.maxQuality))throw Error("maxQuality must be either low, medium or high");if(r.encodings){var a=!1;switch(Object.keys(r.encodings).length){case 1:a=!r.encodings.low;break;case 2:a=!r.encodings.low||!r.encodings.medium;break;case 3:a=!r.encodings.low||!r.encodings.medium||!r.encodings.high;break;default:a=!0}if(a)throw Error("Encodings must be defined as: low, low and medium, or low, medium and high.");
19r.encodings.low&&this._validateEncodingLayerHasValidProperties(r.encodings.low),r.encodings.medium&&this._validateEncodingLayerHasValidProperties(r.encodings.medium),r.encodings.high&&this._validateEncodingLayerHasValidProperties(r.encodings.high)}}}},{key:"validateUpdateSendSettings",value:function(t){var r=this;if(!t||0===Object.keys(t).length)throw Error("Send settings must contain at least information for one track!");Object.entries(t).forEach(function(t){var n=M(t,2),i=n[0],a=n[1];r._validateVideoSendSettings(i,a)})}},{key:"updateSendSettings",value:function(t){var r=this;return this.validateUpdateSendSettings(t),this.needsLoad()?(this._preloadCache.sendSettings=t,{sendSettings:this._preloadCache.sendSettings}):new Promise(function(n,i){r.sendMessageToCallMachine({action:"update-send-settings",sendSettings:t},function(t){t.error?i(t.error):n(t.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 ad(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(t){return ad(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:t}),this}},{key:"activeSpeakerMode",value:function(){return ad(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(t){return ai(this._callState,"setSubscribeToTracksAutomatically()","Use the subscribeToTracksAutomatically configuration property."),this._preloadCache.subscribeToTracksAutomatically=t,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:t}),this}},{key:"enumerateDevices",value:(l=w(function*(){var t=this;if(this._callObjectMode){var r=yield navigator.mediaDevices.enumerateDevices();return"Firefox"===ia()&&io().major>115&&io().major<123&&(r=r.filter(function(t){return"audiooutput"!==t.kind})),{devices:r.map(function(t){var r=JSON.parse(JSON.stringify(t));if(!n6()&&"videoinput"===t.kind&&t.getCapabilities){var n,i=t.getCapabilities();r.facing=(null==i||null===(n=i.facingMode)||void 0===n?void 0:n.length)>=1?i.facingMode[0]:void 0}return r})}}return new Promise(function(r){t.sendMessageToCallMachine({action:"enumerate-devices"},function(t){r({devices:t.devices})})})}),function(){return l.apply(this,arguments)})},{key:"sendAppMessage",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*";if(ai(this._callState,"sendAppMessage()"),JSON.stringify(t).length>4096)throw Error("Message data too large. Max size is 4096");return this.sendMessageToCallMachine({action:"app-msg",data:t,to:r}),this}},{key:"addFakeParticipant",value:function(t){return ad(),ai(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(iX({action:"add-fake-participant"},t)),this}},{key:"setShowNamesMode",value:function(t){return au(this._callObjectMode,"setShowNamesMode()"),ad(),t&&"always"!==t&&"never"!==t?console.error('setShowNamesMode argument should be "always", "never", or false'):this.sendMessageToCallMachine({action:"set-show-names",mode:t}),this}},{key:"setShowLocalVideo",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return au(this._callObjectMode,"setShowLocalVideo()"),ad(),ai(this._callState,"setShowLocalVideo()"),"boolean"!=typeof t?console.error("setShowLocalVideo only accepts a boolean value"):(this.sendMessageToCallMachine({action:"set-show-local-video",show:t}),this._showLocalVideo=t),this}},{key:"showLocalVideo",value:function(){return au(this._callObjectMode,"showLocalVideo()"),ad(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return au(this._callObjectMode,"setShowParticipantsBar()"),ad(),ai(this._callState,"setShowParticipantsBar()"),"boolean"!=typeof t?console.error("setShowParticipantsBar only accepts a boolean value"):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:t}),this._showParticipantsBar=t),this}},{key:"showParticipantsBar",value:function(){return au(this._callObjectMode,"showParticipantsBar()"),ad(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return ad(),au(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(t){return ad(),au(this._callObjectMode,"setCustomIntegrations()"),ai(this._callState,"setCustomIntegrations()"),aS(t)&&(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:t}),this._customIntegrations=t),this}},{key:"startCustomIntegrations",value:function(t){var r=this;if(ad(),au(this._callObjectMode,"startCustomIntegrations()"),ai(this._callState,"startCustomIntegrations()"),Array.isArray(t)&&t.some(function(t){return"string"!=typeof t})||!Array.isArray(t)&&"string"!=typeof t)return console.error("startCustomIntegrations() only accepts string | string[]"),this;var n="string"==typeof t?[t]:t,i=n.filter(function(t){return!(t in r._customIntegrations)});return i.length?console.error("Can't find custom integration(s): \"".concat(i.join(", "),'"')):this.sendMessageToCallMachine({action:"start-custom-integrations",ids:n}),this}},{key:"stopCustomIntegrations",value:function(t){var r=this;if(ad(),au(this._callObjectMode,"stopCustomIntegrations()"),ai(this._callState,"stopCustomIntegrations()"),Array.isArray(t)&&t.some(function(t){return"string"!=typeof t})||!Array.isArray(t)&&"string"!=typeof t)return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var n="string"==typeof t?[t]:t,i=n.filter(function(t){return!(t in r._customIntegrations)});return i.length?console.error("Can't find custom integration(s): \"".concat(i.join(", "),'"')):this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:n}),this}},{key:"customTrayButtons",value:function(){return au(this._callObjectMode,"customTrayButtons()"),ad(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(t){return au(this._callObjectMode,"updateCustomTrayButtons()"),ad(),ai(this._callState,"updateCustomTrayButtons()"),ab(t)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:t}),this._customTrayButtons=t):console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(i9))),this}},{key:"theme",value:function(){return au(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(t){var r=this;return au(this._callObjectMode,"setTheme()"),new Promise(function(n,i){try{r.validateProperties({theme:t}),r.properties.theme=iX({},t),r.sendMessageToCallMachine({action:"set-theme",theme:r.properties.theme});try{r.emit(r2,{action:r2,theme:r.properties.theme})}catch(t){console.log("could not emit 'theme-updated'",t)}n(r.properties.theme)}catch(t){i(t)}})}},{key:"requestFullscreen",value:(c=w(function*(){if(ad(),this._iframe&&!document.fullscreenElement&&n8())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(t){console.log("could not make video call fullscreen",t)}}),function(){return c.apply(this,arguments)})},{key:"exitFullscreen",value:function(){ad(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(s=w(function*(){var t=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise(function(r){t.sendMessageToCallMachine({action:"get-sidebar-view"},function(t){r(t.view)})})}),function(){return s.apply(this,arguments)})},{key:"setSidebarView",value:function(t){return this._callObjectMode?console.error("setSidebarView is not available in callObject mode"):this.sendMessageToCallMachine({action:"set-sidebar-view",view:t}),this}},{key:"room",value:(o=w(function*(){var t=this,r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).includeRoomConfigDefaults,n=void 0===r||r;return this._accessState.access===rI||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise(function(r){t.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:n},function(t){delete t.action,delete t.callbackStamp,r(t)})})}),function(){return o.apply(this,arguments)})},{key:"geo",value:(a=w(function*(){try{var t=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield t.json()).geo}}catch(t){return console.error("geo lookup failed",t),{current:""}}}),function(){return a.apply(this,arguments)})},{key:"setNetworkTopology",value:(i=w(function*(t){var r=this;return ad(),ai(this._callState,"setNetworkTopology()"),new Promise(function(n,i){r.sendMessageToCallMachine({action:"set-network-topology",opts:t},function(t){t.error?i({error:t.error}):n({workerId:t.workerId})})})}),function(t){return i.apply(this,arguments)})},{key:"getNetworkTopology",value:(n=w(function*(){var t=this;return new Promise(function(r,n){t.needsLoad()&&r({topology:"none"}),t.sendMessageToCallMachine({action:"get-network-topology"},function(t){t.error?n({error:t.error}):r({topology:t.topology})})})}),function(){return n.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(t){if(ad(),"number"!=typeof t&&!0!==t&&!1!==t)throw Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(t));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:t})}},{key:"on",value:function(t,r){return A.prototype.on.call(this,t,r)}},{key:"once",value:function(t,r){return A.prototype.once.call(this,t,r)}},{key:"off",value:function(t,r){return A.prototype.off.call(this,t,r)}},{key:"validateProperties",value:function(t){for(var r in t){if(!ae[r])throw Error("unrecognized property '".concat(r,"'"));if(ae[r].validate&&!ae[r].validate(t[r],this))throw Error("property '".concat(r,"': ").concat(ae[r].help))}}},{key:"assembleMeetingUrl",value:function(){var t,r,n=iX(iX({},this.properties),{},{emb:this._callFrameId,embHref:encodeURIComponent(window.location.href),proxy:null!==(t=this.properties.dailyConfig)&&void 0!==t&&t.proxyUrl?encodeURIComponent(null===(r=this.properties.dailyConfig)||void 0===r?void 0:r.proxyUrl):void 0}),i=n.url.match(/\?/)?"&":"?";return n.url+i+Object.keys(ae).filter(function(t){return ae[t].queryString&&void 0!==n[t]}
19).map(function(t){return"".concat(ae[t].queryString,"=").concat(n[t])}).join("&")}},{key:"needsLoad",value:function(){return[r_,rv,rE,rk].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(t,r){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(t,r,this._iframe,this._callFrameId)}},{key:"forwardPackagedMessageToCallMachine",value:function(t){this._messageChannel.forwardPackagedMessageToCallMachine(t,this._iframe,this._callFrameId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(t){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(t,this._callFrameId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(t){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(t)}},{key:"handleMessageFromCallMachine",value:function(t){switch(t.action){case r0:this.sendMessageToCallMachine(iX({action:r1},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var r={action:nX,level:"log",code:1011,stats:{event:"bundle load",time:"no-op"===this._bundleLoadTime?0:this._bundleLoadTime,preLoaded:"no-op"===this._bundleLoadTime,url:ec(this.properties.dailyConfig)}};this.sendMessageToCallMachine(r),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case r6:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null);try{this.emit(t.action,t)}catch(r){console.log("could not emit",t,r)}break;case r7:this._joinedCallback&&(this._joinedCallback(t.participants),this._joinedCallback=null);try{this.emit(t.action,t)}catch(r){console.log("could not emit",t,r)}break;case nr:case nn:if(this._callState===rE)return;if(t.participant&&t.participant.session_id){var n=t.participant.local?"local":t.participant.session_id;if(this._callObjectMode){var i=this._callMachine().store;iR(t.participant,i),ix(t.participant,i),ij(t.participant,this._participants[n],i)}try{this.maybeParticipantTracksStopped(this._participants[n],t.participant),this.maybeParticipantTracksStarted(this._participants[n],t.participant),this.maybeEventRecordingStopped(this._participants[n],t.participant),this.maybeEventRecordingStarted(this._participants[n],t.participant)}catch(t){console.error("track events error",t)}if(!this.compareEqualForParticipantUpdateEvent(t.participant,this._participants[n])){this._participants[n]=iX({},t.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus();try{this.emit(t.action,t)}catch(r){console.log("could not emit",t,r)}}}break;case ni:if(t.participant&&t.participant.session_id){var a=this._participants[t.participant.session_id];a&&this.maybeParticipantTracksStopped(a,null),delete this._participants[t.participant.session_id];try{this.emit(t.action,t)}catch(r){console.log("could not emit",t,r)}}break;case na:if(!q(this._participantCounts,t.participantCounts)){this._participantCounts=t.participantCounts;try{this.emit(t.action,t)}catch(r){console.log("could not emit",t,r)}}break;case no:var o={access:t.access};if(t.awaitingAccess&&(o.awaitingAccess=t.awaitingAccess),!q(this._accessState,o)){this._accessState=o;try{this.emit(t.action,t)}catch(r){console.log("could not emit",t,r)}}break;case ns:if(t.meetingSession){this._meetingSessionSummary=t.meetingSession;try{delete t.callFrameId,this.emit(t.action,t);var s=iX(iX({},t),{},{action:"meeting-session-updated"});this.emit(s.action,s)}catch(r){console.log("could not emit",t,r)}}break;case nz:this._iframe&&!t.preserveIframe&&(this._iframe.src=""),this._updateCallState(rk),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(t.errorMsg),this._loadedCallback=null),t.preserveIframe;var c,l=d(t,iK);null!=l&&null!==(c=l.error)&&void 0!==c&&c.details&&(l.error.details=JSON.parse(l.error.details)),this._maybeSendToSentry(t),this._joinedCallback&&(this._joinedCallback(null,l),this._joinedCallback=null);try{this.emit(t.action,l)}catch(r){console.log("could not emit",t,r)}break;case ne:this._callState!==rk&&this._updateCallState(rE),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null);
19try{this.emit(t.action,t)}catch(r){console.log("could not emit",t,r)}break;case"selected-devices-updated":if(t.devices)try{this.emit(t.action,t)}catch(r){console.log("could not emit",t,r)}break;case nL:var u=t.threshold,h=t.quality;if(u!==this._network.threshold||h!==this._network.quality){this._network.quality=h,this._network.threshold=u;try{this.emit(t.action,t)}catch(r){console.log("could not emit",t,r)}}break;case nx:if(t&&t.cpuLoadState)try{this.emit(t.action,t)}catch(r){console.log("could not emit",t,r)}break;case nj:if(t&&void 0!==t.faceCounts)try{this.emit(t.action,t)}catch(r){console.log("could not emit",t,r)}break;case nP:var p=t.activeSpeaker;if(this._activeSpeaker.peerId!==p.peerId){this._activeSpeaker.peerId=p.peerId;try{this.emit(t.action,{action:t.action,activeSpeaker:this._activeSpeaker})}catch(r){console.log("could not emit",t,r)}}break;case"show-local-video-changed":if(this._callObjectMode)return;var f=t.show;this._showLocalVideo=f;try{this.emit(t.action,{action:t.action,show:f})}catch(r){console.log("could not emit",t,r)}break;case nN:var g=t.enabled;if(this._activeSpeakerMode!==g){this._activeSpeakerMode=g;try{this.emit(t.action,{action:t.action,enabled:this._activeSpeakerMode})}catch(r){console.log("could not emit",t,r)}}break;case nu:case nd:case nh:this._waitingParticipants=t.allWaitingParticipants;try{this.emit(t.action,{action:t.action,participant:t.participant})}catch(r){console.log("could not emit",t,r)}break;case nq:if(!q(this._receiveSettings,t.receiveSettings)){this._receiveSettings=t.receiveSettings;try{this.emit(t.action,{action:t.action,receiveSettings:t.receiveSettings})}catch(r){console.log("could not emit",t,r)}}break;case nJ:if(!q(this._inputSettings,t.inputSettings)){var m=this._getInputSettings();if(this._inputSettings=t.inputSettings,this._preloadCache.inputSettings={},!q(m,this._getInputSettings()))try{this.emit(t.action,{action:t.action,inputSettings:this._getInputSettings()})}catch(r){console.log("could not emit",t,r)}}break;case"send-settings-updated":if(!q(this._sendSettings,t.sendSettings)){this._sendSettings=t.sendSettings,this._preloadCache.sendSettings=null;try{this.emit(t.action,{action:t.action,sendSettings:t.sendSettings})}catch(r){console.log("could not emit",t,r)}}break;case"local-audio-level":this._localAudioLevel=t.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(t);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=t.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(t);break;case nM:var _=t.session_id;this._rmpPlayerState[_]=t.playerState,this.emitDailyJSEvent(t);break;case nA:delete this._rmpPlayerState[t.session_id],this.emitDailyJSEvent(t);break;case nC:var v=t.session_id,y=this._rmpPlayerState[v];y&&this.compareEqualForRMPUpdateEvent(y,t.remoteMediaPlayerState)||(this._rmpPlayerState[v]=t.remoteMediaPlayerState,this.emitDailyJSEvent(t));break;case"custom-button-click":case"sidebar-view-changed":this.emitDailyJSEvent(t);break;case nc:var b=this._meetingSessionState.topology!==(t.meetingSessionState&&t.meetingSessionState.topology);this._meetingSessionState=aw(t.meetingSessionState,this._callObjectMode),(this._callObjectMode||b)&&this.emitDailyJSEvent(t);break;case nO:this._isScreenSharing=!0,this.emitDailyJSEvent(t);break;case nI:case nD:this._isScreenSharing=!1,this.emitDailyJSEvent(t);break;case nv:case ny:case nb:case nS:case nE:case ng:case nm:case n_:case r5:case r8:case nw:case nT:case nR:case nk:case nU:case nV:case nY:case nG:case nW:case n$:case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dialout-error":case"dialout-stopped":case"dialout-warning":try{this.emit(t.action,t)}catch(r){console.log("could not emit",t,r)}break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(t,r){var n="record";if(t&&!r.local&&!1===r[n]&&t[n]!==r[n])try{this.emit(ny,{action:ny})}catch(t){console.log("could not emit",t)}}},{key:"maybeEventRecordingStarted",value:function(t,r){var n="record";
19if(t&&!r.local&&!0===r[n]&&t[n]!==r[n])try{this.emit(nv,{action:nv})}catch(t){console.log("could not emit",t)}}},{key:"maybeEventTrackStopped",value:function(t,r,n,i){if(t&&("ended"===t.readyState||!r||t.id!==r.id))try{this.emit(nf,{action:nf,track:t,participant:n,type:i})}catch(t){console.log("maybeEventTrackStopped: could not emit",t)}}},{key:"maybeEventTrackStarted",value:function(t,r,n,i){if(r&&(!t||"ended"===t.readyState||r.id!==t.id))try{this.emit(np,{action:np,track:r,participant:n,type:i})}catch(t){console.log("maybeEventTrackStarted: could not emit",t)}}},{key:"maybeParticipantTracksStopped",value:function(t,r){if(t)for(var n in t.tracks)this.maybeEventTrackStopped(t.tracks[n].track,r&&r.tracks[n]?r.tracks[n].track:null,r,n)}},{key:"maybeParticipantTracksStarted",value:function(t,r){if(r)for(var n in r.tracks)this.maybeEventTrackStarted(t&&t.tracks[n]?t.tracks[n].track:null,r.tracks[n].track,r,n)}},{key:"compareEqualForRMPUpdateEvent",value:function(t,r){var n,i;return t.state===r.state&&(null===(n=t.settings)||void 0===n?void 0:n.volume)===(null===(i=r.settings)||void 0===i?void 0:i.volume)}},{key:"emitDailyJSEvent",value:function(t){try{this.emit(t.action,t)}catch(r){console.log("could not emit",t,r)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(t,r){return!!q(t,r)&&(!t.videoTrack||!r.videoTrack||t.videoTrack.id===r.videoTrack.id&&t.videoTrack.muted===r.videoTrack.muted&&t.videoTrack.enabled===r.videoTrack.enabled)&&(!t.audioTrack||!r.audioTrack||t.audioTrack.id===r.audioTrack.id&&t.audioTrack.muted===r.audioTrack.muted&&t.audioTrack.enabled===r.audioTrack.enabled)}},{key:"nativeUtils",value:function(){return n6()?"undefined"==typeof DailyNativeUtils?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(t){this._updateCallState(this._callState,t)}},{key:"_updateCallState",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._isPreparingToJoin;if(t!==this._callState||r!==this._isPreparingToJoin){var n=this._callState,i=this._isPreparingToJoin;this._callState=t,this._isPreparingToJoin=r;var a=aa(n,i),o=aa(this._callState,this._isPreparingToJoin);a!==o&&(this.updateKeepDeviceAwake(o),this.updateDeviceAudioMode(o),this.updateShowAndroidOngoingMeetingNotification(o),this.updateNoOpRecordingEnsuringBackgroun
19dContinuity(o))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=i4,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:rI},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=aw(i2,this._callObjectMode),this._isScreenSharing=!1,this._receiveSettings={},this._inputSettings=void 0,this._sendSettings={},this._localAudioLevel=0,this._remoteParticipantsAudioLevel={},this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(t){n6()&&this.nativeUtils().setKeepDeviceAwake(t,this._callFrameId)}},{key:"updateDeviceAudioMode",value:function(t){if(n6()&&!this.disableReactNativeAutoDeviceManagement("audio")){var r=t?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(r)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(t){if(n6()&&this.nativeUtils().setShowOngoingMeetingNotification){var r,n,i,a;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var o=this.properties.reactNativeConfig.androidInCallNotification;r=o.title,n=o.subtitle,i=o.iconName,a=o.disableForCustomOverride}a&&(t=!1),this.nativeUtils().setShowOngoingMeetingNotification(t,r,n,i,this._callFrameId)}}}
19,{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(t){n6()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(t)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var t,r;if(n6()){var n=null===(t=this._callMachine())||void 0===t||null===(r=t.store)||void 0===r?void 0:r.getState();for(var i in null==n?void 0:n.streams){var a=n.streams[i];a&&a.pendingTrack&&"audio"===a.pendingTrack.kind&&(a.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(t){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[t]}},{key:"absoluteUrl",value:function(t){if(void 0!==t){var r=document.createElement("a");return r.href=t,r.href}}},{key:"sayHello",value:function(){var t="hello, world.";return console.log(t),t}},{key:"_logCallQualityTestResults",value:function(t){this._callMachineInitialized?this.sendMessageToCallMachine({action:nX,level:"info",code:1012,results:t}):console.warn("_logCallQualityTestResults() must be called after daily initialization")}},{key:"_logUseAfterDestroy",value:function(){if(this.needsLoad()){if(iJ&&!iJ.needsLoad()){var t={action:nX,level:"error",code:this.strictMode?9995:9997};iJ.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 r={action:nX,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(r,null,this._iframe,this._callFrameId)}}},{key:"_logDuplicateInstanceAttempt",value:function(){var t=iJ._callMachineInitialized?iJ:this._callMachineInitialized?this:void 0;t?(t.sendMessageToCallMachine({action:nX,level:"warn",code:this.strictMode?9990:9992}),this._delayDuplicateInstanceLog=!1):(this._delayDuplicateInstanceLog=!0,iJ._delayDuplicateInstanceLog=!0)}},{key:"_maybeSendToSentry",value:function(t){if(null===(i=t.error)||void 0===i||!i.type||["connection-error","end-of-life","no-room"].includes(t.error.type)){var r=null!==(a=this.properties)&&void 0!==a&&a.url?new URL(this.properties.url):void 0,n="production";r&&r.host.includes(".staging.daily")&&(n="staging");var i,a,o,s,c,l,u,d,h,p,f,g=new tE(new t4({dsn:"https://[email protected]/168844",transport:t3,integrations:[new rm.GlobalHandlers({onunhandledrejection:!1}),new rm.HttpContext],environment:n}),void 0,Z.version());if(this.session_id&&g.setExtra("sessionId",this.session_id),this.properties){var m=iX({},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(r){var _=r.searchParams.get("domain");if(!_){var v=r.host.match(/(.*?)\./);_=v&&v[1]||""}_&&g.setTag("domain",_)}t.error&&(g.setTag("fatalErrorType",t.error.type),g.setExtra("errorDetails",t.error.details),(null===(u=t.error.details)||void 0===u?void 0:u.uri)&&g.setTag("serverAddress",t.error.details.uri),(null===(d=t.error.details)||void 0===d?void 0:d.workerGroup)&&g.setTag("workerGroup",t.error.details.workerGroup),(null===(h=t.error.details)||void 0===h?void 0:h.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?n6()?"reactNative":null!==(o=this.properties)&&void 0!==o&&null!==(s=o.dailyConfig)&&void 0!==s&&null!==(c=s.callMode)&&void 0!==c&&c.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:Z.version()});var y=(null===(l=t.error)||void 0===l?void 0:l.msg)||t.errorMsg;g.run(function(t){t.captureException(Error(y))})}}},{key:"_callMachine",value:function(){var t,r,n;return null===(t=window._daily)||void 0===t||null===(r=t.instances)||void 0===r||null===(n=r[this._callFrameId])||void 0===n?void 0:n.callMachine}}],[{key:"supportedBrowser",value:function(){if(n6())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var t=ei.getParser(n3());return{supported:!!ir(),mobile:"mobile"===t.getPlatformType(),name:t.getBrowserName(),version:t.getBrowserVersion(),supportsFullscreen:!!n8(),supportsScreenShare:!!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia&&(function(t,r){if(!t||!r)return!0;switch(t){case"Chrome":return r.major>=75;case"Safari":return RTCRtpTransceiver.prototype.hasOwnProperty("currentDirection")&&!(13===r.major&&0===r.minor&&0===r.point);case"Firefox":return r.major>=67}return!0}(ia(),io())||n6())),supportsSfu:!!ir(),supportsVideoProcessing:n7(),supportsAudioProcessing:it()}}},{key:"version",value:function(){return"0.66.0"}},{key:"createCallObject",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.layout="none",new Z(null,t)}},{key:"wrap",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ad(),!t||!t.contentWindow||"string"!=typeof t.src)throw Error("DailyIframe::Wrap needs an iframe-like first argument");return r.layout||(r.customLayout?r.layout="custom-v1":r.layout="browser"),new Z(t,r)}},{key:"createFrame",value:function(t,r){ad(),t&&r?(n=t,i=r):t&&t.append?(n=t,i={}):(n=document.body,i=t||{});var n,i,a=i.iframeStyle;a||(a=n===document.body?{position:"fixed",border:"1px solid black",backgroundColor:"white",width:"375px",height:"450px",right:"1em",bottom:"1em"}:{border:0,width:"100%",height:"100%"});var o=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?o.allow="microphone, camera":o.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",o.style.visibility="hidden",n.appendChild(o),o.style.visibility=null,Object.keys(a).forEac
19h(function(t){return o.style[t]=a[t]}),i.layout||(i.customLayout?i.layout="custom-v1":i.layout="browser");try{return new Z(o,i)}catch(t){throw n.removeChild(o),t}}},{key:"createTransparentFrame",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ad();var r=document.createElement("iframe");return r.allow="microphone; camera; autoplay",r.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(r),t.layout||(t.layout="custom-v1"),Z.wrap(r,t)}},{key:"getCallInstance",value:function(){return iJ}}]),Z}();function an(t,r){var n={};for(var i in t)if(t[i]instanceof MediaStreamTrack)n[i]=nZ;else if("dailyConfig"===i){if(t[i].modifyLocalSdpHook){var a=window._daily.instances[r].customCallbacks||{};a.modifyLocalSdpHook=t[i].modifyLocalSdpHook,window._daily.instances[r].customCallbacks=a,delete t[i].modifyLocalSdpHook}if(t[i].modifyRemoteSdpHook){var o=window._daily.instances[r].customCallbacks||{};o.modifyRemoteSdpHook=t[i].modifyRemoteSdpHook,window._daily.instances[r].customCallbacks=o,delete t[i].modifyRemoteSdpHook}n[i]=t[i]}else n[i]=t[i];return n}function ai(t){var r=arguments.length>2?arguments[2]:void 0;if(t!==rS){var n="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," only supported after join.");throw r&&(n+=" ".concat(r)),console.error(n),Error(n)}}function aa(t,r){return[rb,rS].includes(t)||r}function ao(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"This daily-js method",i=arguments.length>3?arguments[3]:void 0;if(aa(t,r)){var a="".concat(n," not supported after joining a meeting.");throw i&&(a+=" ".concat(i)),console.error(a),Error(a)}}function as(t){var r=arguments.length>2?arguments[2]:void 0;if(!t){var n="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," requires preAuth(), startCamera(), or join() to initialize call state.");throw r&&(n+=" ".concat(r)),console.error(n),Error(n)}}function ac(t){if(t){var r="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(r),Error(r)}}function al(t){if(!t){var r="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(r),Error(r)}}function au(t){if(t){var r="".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(r),Error(r)}}function ad(){if(n6())throw Error("This daily-js method is not currently supported in React Native")}function ah(){if(!n6())throw Error("This daily-js method is only supported in React Native")}function ap(t){var r;if(void 0===t)return!0;if("string"==typeof t)r=t;else try{r=JSON.stringify(t),q(JSON.parse(r),t)||console.warn("The userData provided will be modified when serialized.")}catch(t){throw Error("userData must be serializable to JSON: ".concat(t))}if(r.length>4096)throw Error("userData is too large (".concat(r.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function af(t,r){for(var n=r.allowAllParticipantsKey,i=function(t){return!!(void 0===t.layer||Number.isInteger(t.layer)&&t.layer>=0||"inherit"===t.layer)},a=0,o=Object.entries(t);a<o.length;a++){var s=M(o[a],2),c=s[0],l=s[1];if(!function(t){var r=["local"];return n||r.push("*"),t&&!r.includes(t)}(c)||!(l&&!(l.video&&!i(l.video))&&!(l.screenVideo&&!i(l.screenVideo))))return!1}return!0}function ag(t){var r,n,i,a,o,s;return"object"===p(t)&&!(t.video&&("object"!==p(t.video)||(a=t.video.processor,s=["type","config"],!(a&&"object"===p(a)&&"string"==typeof(o=a.type)&&(Object.values(n0).includes(o)||(console.error("inputSettings video processor type invalid"),0))&&(!a.config||"object"===p(a.config)&&function(t,r){var n,i=Object.keys(r);if(0===i.length)return!0;var a="invalid object in inputSettings -> video -> processor -> config";switch(t){case n0.BGBLUR:return i.length>1||"strength"!==i[0]?(console.error(a),!1):!("number"!=typeof r.strength||r.strength<=0||r.strength>1||isNaN(r.strength))||(console.error("".concat(a,"; expected: {0 < strength <= 1}, got: ").concat(r.strength)),!1);case n0.BGIMAGE:return!(void 0!==r.source&&!("default"===r.source?(r.type="default",!0):r.source instanceof ArrayBuffer||(el(r.source)?(r.type="url",!!function(t){var r=new 
19URL(t),n=r.pathname;if("data:"===r.protocol)try{var i=n.substring(n.indexOf(":")+1,n.indexOf(";")).split("/")[1];return n4.includes(i)}catch(t){return console.error("failed to deduce blob content type",t),!1}var a=n.split(".").at(-1).toLowerCase().trim();return n4.includes(a)}(r.source)||(console.error("invalid image type; supported types: [".concat(n4.join(", "),"]")),!1)):isNaN(n=Number(r.source))||!Number.isInteger(n)||n<=0||n>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(r.type="daily-preselect",!0))));default:return!0}}(a.type,a.config))&&(Object.keys(a).filter(function(t){return!s.includes(t)}).forEach(function(t){console.warn("invalid key inputSettings -> video -> processor : ".concat(t)),delete a[t]}),1)))))&&!(t.audio&&("object"!==p(t.audio)||(n=t.audio.processor,i=["type"],!n||"object"!==p(n)||(Object.keys(n).filter(function(t){return!i.includes(t)}).forEach(function(t){console.warn("invalid key inputSettings -> audio -> processor : ".concat(t)),delete n[t]}),"string"!=typeof(r=n.type)||!Object.values(n1).includes(r)&&(console.error("inputSettings audio processor type invalid"),1)))))}function am(t,r){var n,i=[];t.video&&!n7(null!==(n=null==r?void 0:r.useLegacyVideoProcessor)&&void 0!==n&&n)&&(delete t.video,i.push("video")),t.audio&&!it()&&(delete t.audio,i.push("audio")),i.length>0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(i.join(", ")))}function a_(){var t=Object.values(n0).join(" | "),r=Object.values(n1).join(" | ");return"inputSettings must be of the form: { video?: { processor: { type: [ ".concat(t," ], config?: {} } }, audio?: { processor: {type: [ ").concat(r," ] } } }")}function av(t){var r=t.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(rL).concat(r?' | "'.concat(rR,'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function ay(){return"customIntegrations should be an object of type ".concat(JSON.stringify(i7),".")}function ab(t){if(t&&"object"!==p(t)||Array.isArray(t))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(i9),".")),!1;if(t)for(var r=0,n=Object.entries(t);r<n.length;r++)for(var i=M(n[r],1)[0],a=0,o=Object.entries(t[i]);a<o.length;a++){var s=M(o[a],2),c=s[0],l=s[1];if("iconPath"===c&&!el(l)||"iconPathDarkMode"===c&&!el(l))return console.error("customTrayButton ".concat(c," should be a url.")),!1;var u=i9.id[c];if(!u)return console.error("customTrayButton does not support key ".concat(c)),!1;if(p(l)!==u)return console.error("customTrayButton ".concat(c," should be a ").concat(u,".")),!1}return!0}function aS(t){if(!t||t&&"object"!==p(t)||Array.isArray(t))return console.error(ay()),!1;for(var r=function(t){return"".concat(t," should be ").concat(i7.id[t])},n=function(t,r){return console.error("customIntegration ".concat(t,": ").concat(r))},i=0,a=Object.entries(t);i<a.length;i++){var o=M(a[i],1)[0];if(!("label"in t[o]))return n(o,"label is required"),!1;if(!("location"in t[o]))return n(o,"location is required"),!1;if(!("src"in t[o])&&!("srcdoc"in t[o]))return n(o,"src or srcdoc is required"),!1;for(var s=0,c=Object.entries(t[o]);s<c.length;s++){var l=M(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(o,r(u)),!1;break;case"iconURL":if(!el(d))return n(o,"".concat(u," should be a url")),!1;break;case"src":if("srcdoc"in t[o])return n(o,"cannot have both src and srcdoc"),!1;if(!el(d))return n(o,'src "'.concat(d,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in t[o])return n(o,"cannot have both src and srcdoc"),!1;if("string"!=typeof d)return n(o,r(u)),!1;break;case"location":if(!["main","sidebar"].includes(d))return n(o,r(u)),!1;break;case"controlledBy":if("*"!==d&&"owners"!==d&&(!Array.isArray(d)||d.some(function(t){return"string"!=typeof t})))return n(o,r(u)),!1;break;case"shared":if((!Array.isArray(d)||d.some(function(t){return"string"!=typeof t}))&&"owners"!==d&&"boolean"!=typeof d)return n(o,r(u)),!1;break;default:if(!i7.id[u])return console.error("customIntegration does not support key ".concat(u)),!1}}}return!0}function aE(t){if("object"!==p(t))throw Error('RemoteMediaPlayerSettings: must be "object" type');if(t.state&&!Object.values(n2).includes(t.state))throw Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(n2));if(t.volume){if("number"!=typeof t.volume)throw Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(t.volume<0||t.volume>2)throw Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function ak(t,r,n){return!("number"!=typeof t||t<r||t>n)}function aw(t,r){return t&&!r&&delete t.data,t}}}]);

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.