PageSourceSearch

https://legalscout.net/assets/vendor-vapi-a7556e1d.js

js legalscout.net collected 2026-10-09 22:54:11 UTC 299,736 bytes, 42 lines download raw bytes

1var xa=Object.defineProperty;var Fa=(r,e,t)=>e in r?xa(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var R=(r,e,t)=>(Fa(r,typeof e!="symbol"?e+"":e,t),t);import{a as qa,c as Jn}from"./vendor-react-e966ce48.js";function Va(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in r)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var mn={};function Bn(r,e){if(r==null)return{};var t,n,i=function(a,l){if(a==null)return{};var d={};for(var h in a)if({}.hasOwnProperty.call(a,h)){if(l.indexOf(h)!==-1)continue;d[h]=a[h]}return d}(r,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(n=0;n<s.length;n++)t=s[n],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(r,t)&&(i[t]=r[t])}return i}function ae(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function $(r){return $=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(r)}function Ro(r){var e=function(t,n){if($(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var s=i.call(t,n||"default");if($(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(t)}(r,"string");return $(e)=="symbol"?e:e+""}function Gn(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,Ro(n.key),n)}}function ce(r,e,t){return e&&Gn(r.prototype,e),t&&Gn(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function sr(r,e){if(e&&($(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(r)}function ve(r){return ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ve(r)}function Ct(r,e){return Ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},Ct(r,e)}function ar(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&Ct(r,e)}function Se(r,e,t){return(e=Ro(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Yn(r,e,t,n,i,s,a){try{var l=r[s](a),d=l.value}catch(h){return void t(h)}l.done?e(d):Promise.resolve(d).then(n,i)}function L(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var s=r.apply(e,t);function a(d){Yn(s,n,i,a,l,"next",d)}function l(d){Yn(s,n,i,a,l,"throw",d)}a(void 0)})}}function Wn(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function ee(r,e){return function(t){if(Array.isArray(t))return t}(r)||function(t,n){var i=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var s,a,l,d,h=[],f=!0,y=!1;try{if(l=(i=i.call(t)).next,n===0){if(Object(i)!==i)return;f=!1}else for(;!(f=(s=l.call(i)).done)&&(h.push(s.value),h.length!==n);f=!0);}catch(T){y=!0,a=T}finally{try{if(!f&&i.return!=null&&(d=i.return(),Object(d)!==d))return}finally{if(y)throw a}}return h}}(r,e)||function(t,n){if(t){if(typeof t=="string")return Wn(t,n);var i={}.toString.call(t).slice(8,-1);return i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set"?Array.from(t):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Wn(t,n):void 0}}(r,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ua(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var zn,It={exports:{}},xr=function(){if(zn)return It.exports;zn=1;var r,e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(g,_,S){return Function.prototype.apply.call(g,_,S)};r=e&&typeof e.ownKeys=="function"?e.ownKeys:Object.getOwnPropertySymbols?function(g){return Object.getOwnPropertyNames(g).concat(Object.getOwnPropertySymbols(g))}:function(g){return Object.getOwnPropertyNames(g)};var n=Number.isNaN||function(g){return g!=g};function i(){i.init.call(this)}It.exports=i,It.exports.once=function(g,_){return new Promise(function(S,A){function P(D){g.removeListener(_,w),A(D)}function w(){typeof g.removeListener=="function"&&g.removeListener("error",P),S([].slice.call(arguments))}
vendor: 4,267 bytes, line 2
2v(g,_,w,{once:!0}),_!=="error"&&function(D,x,B){typeof D.on=="function"&&v(D,"error",x,B)}(g,P,{once:!0})})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function a(g){if(typeof g!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof g)}function l(g){return g._maxListeners===void 0?i.defaultMaxListeners:g._maxListeners}function d(g,_,S,A){var P,w,D,x;if(a(S),(w=g._events)===void 0?(w=g._events=Object.create(null),g._eventsCount=0):(w.newListener!==void 0&&(g.emit("newListener",_,S.listener?S.listener:S),w=g._events),D=w[_]),D===void 0)D=w[_]=S,++g._eventsCount;else if(typeof D=="function"?D=w[_]=A?[S,D]:[D,S]:A?D.unshift(S):D.push(S),(P=l(g))>0&&D.length>P&&!D.warned){D.warned=!0;var B=new Error("Possible EventEmitter memory leak detected. "+D.length+" "+String(_)+" listeners added. Use emitter.setMaxListeners() to increase limit");B.name="MaxListenersExceededWarning",B.emitter=g,B.type=_,B.count=D.length,x=B,console&&console.warn&&console.warn(x)}return g}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(g,_,S){var A={fired:!1,wrapFn:void 0,target:g,type:_,listener:S},P=h.bind(A);return P.listener=S,A.wrapFn=P,P}function y(g,_,S){var A=g._events;if(A===void 0)return[];var P=A[_];return P===void 0?[]:typeof P=="function"?S?[P.listener||P]:[P]:S?function(w){for(var D=new Array(w.length),x=0;x<D.length;++x)D[x]=w[x].listener||w[x];return D}(P):k(P,P.length)}function T(g){var _=this._events;if(_!==void 0){var S=_[g];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}function k(g,_){for(var S=new Array(_),A=0;A<_;++A)S[A]=g[A];return S}function v(g,_,S,A){if(typeof g.on=="function")A.once?g.once(_,S):g.on(_,S);else{if(typeof g.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof g);g.addEventListener(_,function P(w){A.once&&g.removeEventListener(_,P),S(w)})}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(g){if(typeof g!="number"||g<0||n(g))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+g+".");s=g}}),i.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(g){if(typeof g!="number"||g<0||n(g))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+g+".");return this._maxListeners=g,this},i.prototype.getMaxListeners=function(){return l(this)},i.prototype.emit=function(g){for(var _=[],S=1;S<arguments.length;S++)_.push(arguments[S]);var A=g==="error",P=this._events;if(P!==void 0)A=A&&P.error===void 0;else if(!A)return!1;if(A){var w;if(_.length>0&&(w=_[0]),w instanceof Error)throw w;var D=new Error("Unhandled error."+(w?" ("+w.message+")":""));throw D.context=w,D}var x=P[g];if(x===void 0)return!1;if(typeof x=="function")t(x,this,_);else{var B=x.length,ie=k(x,B);for(S=0;S<B;++S)t(ie[S],this,_)}return!0},i.prototype.addListener=function(g,_){return d(this,g,_,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(g,_){return d(this,g,_,!0)},i.prototype.once=function(g,_){return a(_),this.on(g,f(this,g,_)),this},i.prototype.prependOnceListener=function(g,_){return a(_),this.prependListener(g,f(this,g,_)),this},i.prototype.removeListener=function(g,_){var S,A,P,w,D;if(a(_),(A=this._events)===void 0)return this;if((S=A[g])===void 0)return this;if(S===_||S.listener===_)--this._eventsCount==0?this._events=Object.create(null):(delete A[g],A.removeListener&&this.emit("removeListener",g,S.listener||_));else if(typeof S!="function"){for(P=-1,w=S.length-1;w>=0;w--)if(S[w]===_||S[w].listener===_){D=S[w].listener,P=w;break}if(P<0)return this;P===0?S.shift():function(x,B){for(;B+1<x.length;B++)x[B]=x[B+1];x.pop()}(S,P),S.length===1&&(A[g]=S[0]),A.removeListener!==void 0&&this.emit
2("removeListener",g,D||_)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(g){var _,S,A;if((S=this._events)===void 0)return this;if(S.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):S[g]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete S[g]),this;if(arguments.length===0){var P,w=Object.keys(S);for(A=0;A<w.length;++A)(P=w[A])!=="removeListener"&&this.removeAllListeners(P);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(_=S[g])=="function")this.removeListener(g,_);else if(_!==void 0)for(A=_.length-1;A>=0;A--)this.removeListener(g,_[A]);return this},i.prototype.listeners=function(g){return y(this,g,!0)},i.prototype.rawListeners=function(g){return y(this,g,!1)},i.listenerCount=function(g,_){return typeof g.listenerCount=="function"?g.listenerCount(_):T.call(g,_)},i.prototype.listenerCount=T,i.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]},It.exports}(),Dt=Ua(xr),Hn=Object.prototype.hasOwnProperty;function Qn(r,e,t){for(t of r.keys())if(re(t,e))return t}function re(r,e){var t,n,i;if(r===e)return!0;if(r&&e&&(t=r.constructor)===e.constructor){if(t===Date)return r.getTime()===e.getTime();if(t===RegExp)return r.toString()===e.toString();if(t===Array){if((n=r.length)===e.length)for(;n--&&re(r[n],e[n]););return n===-1}if(t===Set){if(r.size!==e.size)return!1;for(n of r)if((i=n)&&typeof i=="object"&&!(i=Qn(e,i))||!e.has(i))return!1;return!0}if(t===Map){if(r.size!==e.size)return!1;for(n of r)if((i=n[0])&&typeof i=="object"&&!(i=Qn(e,i))||!re(n[1],e.get(i)))return!1;return!0}if(t===ArrayBuffer)r=new Uint8Array(r),e=new Uint8Array(e);else if(t===DataView){if((n=r.byteLength)===e.byteLength)for(;n--&&r.getInt8(n)===e.getInt8(n););return n===-1}if(ArrayBuffer.isView(r)){if((n=r.byteLength)===e.byteLength)for(;n--&&r[n]===e[n];);return n===-1}if(!t||typeof r=="object"){for(t in n=0,r)if(Hn.call(r,t)&&++n&&!Hn.call(e,t)||!(t in e)||!re(r[t],e[t]))return!1;return Object.keys(e).length===n}}return r!=r&&e!=e}const $a={"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"},xo={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"},H={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},te={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"},Pe={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class E{static getFirstMatch(e,t){const n=t.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,t){const n=t.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,t,n){if(e.test(t))return n}
vendor: 4,363 bytes, line 2
2static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){const t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),t[0]===10)switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){const t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),!(t[0]===1&&t[1]<5))return t[0]===1&&t[1]<6?"Cupcake":t[0]===1&&t[1]>=6?"Donut":t[0]===2&&t[1]<2?"Eclair":t[0]===2&&t[1]===2?"Froyo":t[0]===2&&t[1]>2?"Gingerbread":t[0]===3?"Honeycomb":t[0]===4&&t[1]<1?"Ice Cream Sandwich":t[0]===4&&t[1]<4?"Jelly Bean":t[0]===4&&t[1]>=4?"KitKat":t[0]===5?"Lollipop":t[0]===6?"Marshmallow":t[0]===7?"Nougat":t[0]===8?"Oreo":t[0]===9?"Pie":void 0}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,n=!1){const i=E.getVersionPrecision(e),s=E.getVersionPrecision(t);let a=Math.max(i,s),l=0;const d=E.map([e,t],h=>{const f=a-E.getVersionPrecision(h),y=h+new Array(f+1).join(".0");return E.map(y.split("."),T=>new Array(20-T.length).join("0")+T).reverse()});for(n&&(l=a-Math.min(i,s)),a-=1;a>=l;){if(d[0][a]>d[1][a])return 1;if(d[0][a]===d[1][a]){if(a===l)return 0;a-=1}else if(d[0][a]<d[1][a])return-1}}static map(e,t){const n=[];let i;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(i=0;i<e.length;i+=1)n.push(t(e[i]));return n}static find(e,t){let n,i;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,i=e.length;n<i;n+=1){const s=e[n];if(t(s,n))return s}}static assign(e,...t){const n=e;let i,s;if(Object.assign)return Object.assign(e,...t);for(i=0,s=t.length;i<s;i+=1){const a=t[i];typeof a=="object"&&a!==null&&Object.keys(a).forEach(l=>{n[l]=a[l]})}return e}static getBrowserAlias(e){return $a[e]}static getBrowserTypeByAlias(e){return xo[e]||""}}const Y=/version\/(\d+(\.?_?\d+)+)/i,Ja=[{test:[/googlebot/i],describe(r){const e={name:"Googlebot"},t=E.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,r)||E.getFirstMatch(Y,r);return t&&(e.version=t),e}},{test:[/opera/i],describe(r){const e={name:"Opera"},t=E.getFirstMatch(Y,r)||E.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/opr\/|opios/i],describe(r){const e={name:"Opera"},t=E.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,r)||E.getFirstMatch(Y,r);return t&&(e.version=t),e}},{test:[/SamsungBrowser/i],describe(r){const e={name:"Samsung Internet for Android"},t=E.getFirstMatch(Y,r)||E.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/Whale/i],describe(r){const e={name:"NAVER Whale Browser"},t=E.getFirstMatch(Y,r)||E.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/MZBrowser/i],describe(r){const e={name:"MZ Browser"},t=E.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,r)||E.getFirstMatch(Y,r);return t&&(e.version=t),e}},{test:[/focus/i],describe(r){const e={name:"Focus"},t=E.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,r)||E.getFirstMatch(Y,r);return t&&(e.version=t),e}},{test:[/swing/i],describe(r){const e={name:"Swing"},t=E.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,r)||E.getFirstMatch(Y,r);return t&&(e.version=t),e}},{test:[/coast/i],describe(r){const e={name:"Opera Coast"},t=E.getFirstMatch(Y,r)||E.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(r){const e={name:"Opera Touch"},t=E.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,r)||E.getFirstMatch(Y,r);return t&&(e.version=t),e}},{test:[/yabrowser/i],describe(r){const e={name:"Yandex Browser"},t=E.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,r)||E.getFirstMatch(Y,r);return t&&(e.version=t),e}},{test:[/ucbrowser/i],describe(r){const e={name:"UC Browser"},t=E.getFirstMatch(Y,r)||E.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/Maxthon|mxios/i],describe(r){const e={name:"Maxthon"}
vendor: 6,773 bytes, line 2
2,t=E.getFirstMatch(Y,r)||E.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/epiphany/i],describe(r){const e={name:"Epiphany"},t=E.getFirstMatch(Y,r)||E.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/puffin/i],describe(r){const e={name:"Puffin"},t=E.getFirstMatch(Y,r)||E.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/sleipnir/i],describe(r){const e={name:"Sleipnir"},t=E.getFirstMatch(Y,r)||E.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/k-meleon/i],describe(r){const e={name:"K-Meleon"},t=E.getFirstMatch(Y,r)||E.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/micromessenger/i],describe(r){const e={name:"WeChat"},t=E.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,r)||E.getFirstMatch(Y,r);return t&&(e.version=t),e}},{test:[/qqbrowser/i],describe(r){const e={name:/qqbrowserlite/i.test(r)?"QQ Browser Lite":"QQ Browser"},t=E.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,r)||E.getFirstMatch(Y,r);return t&&(e.version=t),e}},{test:[/msie|trident/i],describe(r){const e={name:"Internet Explorer"},t=E.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/\sedg\//i],describe(r){const e={name:"Microsoft Edge"},t=E.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/edg([ea]|ios)/i],describe(r){const e={name:"Microsoft Edge"},t=E.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/vivaldi/i],describe(r){const e={name:"Vivaldi"},t=E.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/seamonkey/i],describe(r){const e={name:"SeaMonkey"},t=E.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/sailfish/i],describe(r){const e={name:"Sailfish"},t=E.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,r);return t&&(e.version=t),e}},{test:[/silk/i],describe(r){const e={name:"Amazon Silk"},t=E.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/phantom/i],describe(r){const e={name:"PhantomJS"},t=E.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/slimerjs/i],describe(r){const e={name:"SlimerJS"},t=E.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(r){const e={name:"BlackBerry"},t=E.getFirstMatch(Y,r)||E.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/(web|hpw)[o0]s/i],describe(r){const e={name:"WebOS Browser"},t=E.getFirstMatch(Y,r)||E.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/bada/i],describe(r){const e={name:"Bada"},t=E.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/tizen/i],describe(r){const e={name:"Tizen"},t=E.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,r)||E.getFirstMatch(Y,r);return t&&(e.version=t),e}},{test:[/qupzilla/i],describe(r){const e={name:"QupZilla"},t=E.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,r)||E.getFirstMatch(Y,r);return t&&(e.version=t),e}},{test:[/firefox|iceweasel|fxios/i],describe(r){const e={name:"Firefox"},t=E.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/electron/i],describe(r){const e={name:"Electron"},t=E.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/MiuiBrowser/i],describe(r){const e={name:"Miui"},t=E.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/chromium/i],describe(r){const e={name:"Chromium"},t=E.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,r)||E.getFirstMatch(Y,r);return t&&(e.version=t),e}},{test:[/chrome|crios|crmo/i],describe(r){const e={name:"Chrome"},t=E.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/GSA/i],describe(r){const e={name:"Google Search"},t=E.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test(r){const e=!r.test(/like android/i),t=r.test(/android/i);return e&&t},describe(r){const e={name:"Android Browser"},t=E.getFirstMatch(Y,r);return t&&(e.version=t),e}},{test:[/playstation 4/i],describe(r){const e={name:"PlayStation 4"},t=E.getFirstMatch(Y,r);return t&&(e.version=t),e}},{test:[/safari|applewebkit/i],describe(r){const e={name:"Safari"},t=E.getFirstMatch(Y,r);return t&&(e.version=t),e}},{test:[/.*/i],describe(r){const e=r.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:E.getFirstMatch(e,r),version:E.getSecondMatch(e,r)}}}];var Ba=[{test:[/Roku\/DVP/],describe(r){const e=E.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,r);return{name:te.Roku,version:e}}},{test:[/windows phone/i],describe(r){const e=E.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,r);return{name:te.WindowsPhone,version:e}}},{test:[/windows /i],describe(r){const e=E.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,r),t=E.getWindowsVersionName(e);return{name:te.Windows,version:e,versionName:t}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(r){const e={name:te.iOS},t=E.getSecondMatch(/(Version\/)(\d[\d.]+)/,r);return t&&(e.version=t),e}},{test:[/macintosh/i],describe(r){const e=E.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,r).replace(/[_\s]/g,"."),t=E.getMacOSVersionName(e),n={name:te.MacOS,version:e};return t&&(n.versionName=t),n}},{test:[/(ipod|iphone|ipad)/i],describe(r){const e=E.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,r).replace(/[_\s]/g,".");return{name:te.iOS,version:e}}},{test(r){const e=!r.test(/like android/i),t=r.test(/android/i);return e&&t},describe(r){const e=E.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,r),t=E.getAndroidVersionName(e),n={name:te.Android,version:e};return t&&(n.versionName=t),n}},{test:[/(web|hpw)[o0]s/i],describe(r){const e=E.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,r),t={name:te.WebOS};return e&&e.length&&(t.version=e),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(r){const e=E.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,r)||E.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,r)||E.getFirstMatch(/\bbb(\d+)/i,r);return{name:te.BlackBerry,version:e}}},{test:[/bada/i],describe(r){const e=E.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,r);return{name:te.Bada,version:e}}},{test:[/tizen/i],describe(r){const e=E.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,r);return{name:te.Tizen,version:e}}},{test:[/linux/i],describe:()=>({name:te.Linux})},{test:[/CrOS/],describe:()=>({name:te.ChromeOS})},{test:[/PlayStation 4/],describe(r){const e=E.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,r);
2return{name:te.PlayStation4,version:e}}}],Ga=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(r){const e=E.getFirstMatch(/(can-l01)/i,r)&&"Nova",t={type:H.mobile,vendor:"Huawei"};return e&&(t.model=e),t}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:H.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:H.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:H.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:H.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:H.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:H.tablet})},{test(r){const e=r.test(/ipod|iphone/i),t=r.test(/like (ipod|iphone)/i);return e&&!t},describe(r){const e=E.getFirstMatch(/(ipod|iphone)/i,r);return{type:H.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:H.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:H.mobile})},{test:r=>r.getBrowserName(!0)==="blackberry",describe:()=>({type:H.mobile,vendor:"BlackBerry"})},{test:r=>r.getBrowserName(!0)==="bada",describe:()=>({type:H.mobile})},{test:r=>r.getBrowserName()==="windows phone",describe:()=>({type:H.mobile,vendor:"Microsoft"})},{test(r){const e=Number(String(r.getOSVersion()).split(".")[0]);return r.getOSName(!0)==="android"&&e>=3},describe:()=>({type:H.tablet})},{test:r=>r.getOSName(!0)==="android",describe:()=>({type:H.mobile})},{test:r=>r.getOSName(!0)==="macos",describe:()=>({type:H.desktop,vendor:"Apple"})},{test:r=>r.getOSName(!0)==="windows",describe:()=>({type:H.desktop})},{test:r=>r.getOSName(!0)==="linux",describe:()=>({type:H.desktop})},{test:r=>r.getOSName(!0)==="playstation 4",describe:()=>({type:H.tv})},{test:r=>r.getOSName(!0)==="roku",describe:()=>({type:H.tv})}],Ya=[{test:r=>r.getBrowserName(!0)==="microsoft edge",describe(r){if(/\sedg\//i.test(r))return{name:Pe.Blink};const e=E.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,r);return{name:Pe.EdgeHTML,version:e}}},{test:[/trident/i],describe(r){const e={name:Pe.Trident},t=E.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:r=>r.test(/presto/i),describe(r){const e={name:Pe.Presto},t=E.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test(r){const e=r.test(/gecko/i),t=r.test(/like gecko/i);return e&&!t},describe(r){const e={name:Pe.Gecko},t=E.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:Pe.Blink})},{test:[/(apple)?webkit/i],describe(r){const e={name:Pe.WebKit},t=E.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,r);return t&&(e.version=t),e}}];class Kn{constructor(e,t=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},t!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const e=E.find(Ja,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const e=E.find(Ba,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){const{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};const e=E.find(Ga,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));
2throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const e=E.find(Ya,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return E.assign({},this.parsedResult)}satisfies(e){const t={};let n=0;const i={};let s=0;if(Object.keys(e).forEach(a=>{const l=e[a];typeof l=="string"?(i[a]=l,s+=1):typeof l=="object"&&(t[a]=l,n+=1)}),n>0){const a=Object.keys(t),l=E.find(a,h=>this.isOS(h));if(l){const h=this.satisfies(t[l]);if(h!==void 0)return h}const d=E.find(a,h=>this.isPlatform(h));if(d){const h=this.satisfies(t[d]);if(h!==void 0)return h}}if(s>0){const a=Object.keys(i),l=E.find(a,d=>this.isBrowser(d,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(e,t=!1){const n=this.getBrowserName().toLowerCase();let i=e.toLowerCase();const s=E.getBrowserTypeByAlias(i);return t&&s&&(i=s.toLowerCase()),i===n}compareVersion(e){let t=[0],n=e,i=!1;const s=this.getBrowserVersion();if(typeof s=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(i=!0,n=e.substr(2)):t=[],e[0]===">"?t.push(1):t.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(i=!0,n=e.substr(1)),t.indexOf(E.compareVersions(s,n,i))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(t=>this.is(t))}}/*!
3 * Bowser - a browser detector
4 * https://github.com/lancedikson/bowser
5 * MIT License | (c) Dustin Diaz 2012-2015
6 * MIT License | (c) Denis Demchenko 2015-2019
7 */class Wa{static getParser(e,t=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new Kn(e,t)}static parse(e){return new Kn(e).getResult()}static get BROWSER_MAP(){return xo}static get ENGINE_MAP(){return Pe}static get OS_MAP(){return te}static get PLATFORMS_MAP(){return H}}function cr(){return Date.now()+Math.random().toString()}function vt(){throw new Error("Method must be implemented in subclass")}function Fo(r,e){return e!=null&&e.proxyUrl?e.proxyUrl+(e.proxyUrl.slice(-1)==="/"?"":"/")+r.substring(8):r}function Qt(r){return r!=null&&r.callObjectBundleUrlOverride?r.callObjectBundleUrlOverride:Fo("https://c.daily.co/call-machine/versioned/".concat("0.85.0","/static/call-machine-object-bundle.js"),r)}function Kt(r){try{new URL(r)}catch{return!1}return!0}const z=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Be="8.55.0",J=globalThis;function Xt(r,e,t){const n=t||J,i=n.__SENTRY__=n.__SENTRY__||{},s=i[Be]=i[Be]||{};return s[r]||(s[r]=e())}const Qe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Fr=["debug","info","warn","error","log","assert","trace"],Zt={};function Ot(r){if(!("console"in J))return r();const e=J.console,t={},n=Object.keys(Zt);n.forEach(i=>{const s=Zt[i];t[i]=e[i],e[i]=s});try{return r()}finally{n.forEach(i=>{e[i]=t[i]})}}const N=Xt("logger",function(){let r=!1;const e={enable:()=>{r=!0},disable:()=>{r=!1},isEnabled:()=>r};return Qe?Fr.forEach(t=>{e[t]=(...n)=>{r&&Ot(()=>{J.console[t](`Sentry Logger [${t}]:`,...n)})}}):Fr.forEach(t=>{e[t]=()=>{}}),e}),Je="?",Xn=/\(error: (.*)\)/,Zn=/captureMessage|captureException/;function jt(r){return r[r.length-1]||{}}const ei="<anonymous>";function Ne(r){try{return r&&typeof r=="function"&&r.name||ei}catch{return ei}}function ti(r){const e=r.exception;if(e){const t=[];try{return e.values.forEach(n=>{n.stacktrace.frames&&t.push(...n.stacktrace.frames)}),t}catch{return}}}const Bt={},ri={};function Ge(r,e){Bt[r]=Bt[r]||[],Bt[r].push(e)}function Ye(r,e){if(!ri[r]){ri[r]=!0;try{e()}catch(t){Qe&&N.error(`Error while instrumenting ${r}`,t)}}}function ge(r,e){const t=r&&Bt[r];if(t)for(const n of t)try{n(e)}catch(i){Qe&&N.error(`Error while triggering instrumentation handler.
8Type: ${r}
9Name: ${Ne(n)}
10Error:`,i)}}let gr=null;function za(){gr=J.onerror,J.onerror=function(r,e,t,n,i){return ge("error",{column:n,error:i,line:t,msg:r,url:e}),!!gr&&gr.apply(this,arguments)},J.onerror.__SENTRY_INSTRUMENTED__=!0}let vr=null;function Ha(){vr=J.onunhandledrejection,J.onunhandledrejection=function(r){return ge("unhandledrejection",r),!vr||vr.apply(this,arguments)},J.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function lr(){return gn(J),J}function gn(r){const e=r.__SENTRY__=r.__SENTRY__||{};return e.version=e.version||Be,e[Be]=e[Be]||{}}const qo=Object.prototype.toString;function vn(r){switch(qo.call(r)){case"[object Error]":case"[object E
10xception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return We(r,Error)}}function dt(r,e){return qo.call(r)===`[object ${e}]`}function Vo(r){return dt(r,"ErrorEvent")}function ni(r){return dt(r,"DOMError")}function Ce(r){return dt(r,"String")}function yn(r){return typeof r=="object"&&r!==null&&"__sentry_template_string__"in r&&"__sentry_template_values__"in r}function qr(r){return r===null||yn(r)||typeof r!="object"&&typeof r!="function"}function st(r){return dt(r,"Object")}function ur(r){return typeof Event<"u"&&We(r,Event)}function dr(r){return!!(r&&r.then&&typeof r.then=="function")}function We(r,e){try{return r instanceof e}catch{return!1}}function Uo(r){return!(typeof r!="object"||r===null||!r.__isVue&&!r._isVue)}const bn=J;function $o(r,e={}){if(!r)return"<unknown>";try{let t=r;const n=5,i=[];let s=0,a=0;const l=" > ",d=l.length;let h;const f=Array.isArray(e)?e:e.keyAttrs,y=!Array.isArray(e)&&e.maxStringLength||80;for(;t&&s++<n&&(h=Qa(t,f),!(h==="html"||s>1&&a+i.length*d+h.length>=y));)i.push(h),a+=h.length,t=t.parentNode;return i.reverse().join(l)}catch{return"<unknown>"}}function Qa(r,e){const t=r,n=[];if(!t||!t.tagName)return"";if(bn.HTMLElement&&t instanceof HTMLElement&&t.dataset){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}n.push(t.tagName.toLowerCase());const i=e&&e.length?e.filter(a=>t.getAttribute(a)).map(a=>[a,t.getAttribute(a)]):null;if(i&&i.length)i.forEach(a=>{n.push(`[${a[0]}="${a[1]}"]`)});else{t.id&&n.push(`#${t.id}`);const a=t.className;if(a&&Ce(a)){const l=a.split(/\s+/);for(const d of l)n.push(`.${d}`)}}const s=["aria-label","type","name","title","alt"];for(const a of s){const l=t.getAttribute(a);l&&n.push(`[${a}="${l}"]`)}return n.join("")}function nt(r,e=0){return typeof r!="string"||e===0||r.length<=e?r:`${r.slice(0,e)}...`}function ii(r,e){if(!Array.isArray(r))return"";const t=[];for(let n=0;n<r.length;n++){const i=r[n];try{Uo(i)?t.push("[VueViewModel]"):t.push(String(i))}catch{t.push("[value cannot be serialized]")}}return t.join(e)}function Ka(r,e,t=!1){return!!Ce(r)&&(dt(e,"RegExp")?e.test(r):!!Ce(e)&&(t?r===e:r.includes(e)))}function Lt(r,e=[],t=!1){return e.some(n=>Ka(r,n,t))}function se(r,e,t){if(!(e in r))return;const n=r[e],i=t(n);typeof i=="function"&&Jo(i,n);try{r[e]=i}catch{Qe&&N.log(`Failed to replace method "${e}" in object`,r)}}function ze(r,e,t){try{Object.defineProperty(r,e,{value:t,writable:!0,configurable:!0})}catch{Qe&&N.log(`Failed to add non-enumerable property "${e}" to object`,r)}}function Jo(r,e){try{const t=e.prototype||{};r.prototype=e.prototype=t,ze(r,"__sentry_original__",e)}catch{}}function _n(r){return r.__sentry_original__}function Bo(r){if(vn(r))return{message:r.message,name:r.name,stack:r.stack,...si(r)};if(ur(r)){const e={type:r.type,target:oi(r.target),currentTarget:oi(r.currentTarget),...si(r)};return typeof CustomEvent<"u"&&We(r,CustomEvent)&&(e.detail=r.detail),e}return r}function oi(r){try{return e=r,typeof Element<"u"&&We(e,Element)?$o(r):Object.prototype.toString.call(r)}catch{return"<unknown>"}var e}function si(r){if(typeof r=="object"&&r!==null){const e={};for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e}return{}}function de(r){return Vr(r,new Map)}function Vr(r,e){if(function(t){if(!st(t))return!1;try{const n=Object.getPrototypeOf(t).constructor.name;return!n||n==="Object"}catch{return!0}}(r)){const t=e.get(r);if(t!==void 0)return t;const n={};e.set(r,n);for(const i of Object.getOwnPropertyNames(r))r[i]!==void 0&&(n[i]=Vr(r[i],e));return n}if(Array.isArray(r)){const t=e.get(r);if(t!==void 0)return t;const n=[];return e.set(r,n),r.forEach(i=>{n.push(Vr(i,e))}),n}return r}function At(){return Date.now()/1e3}const Oe=function(){const{performance:r}=J;if(!r||!r.now)return At;const e=Date.now()-r.now(),t=r.timeOrigin==null?e:r.timeOrigin;return()=>(t+r.now())/1e3}();function he(){const r=J,e=r.crypto||r.msCrypto;let t=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(t=()=>{const n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,n=>(n^(15&t())>>n/4).toString(16))}function Go(r){return r.exception&&r.exception.values?r.exception.values[0]:void 0}function De(r){const{message:e,event_id:t}=r;if(e)return e;const n=Go(r);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||t||"<unknown>":t||"<unknown>"}function Ur(r,e,t){const n=r.exception=r.exception||{},i=n.values=n.values||[],s=i[0]=i[0]||{};s.value||(s.value=e||""),s.type||(s.type=t||"Error")}function at(r,e){const t=Go(r);if(!t)return;const n=t.mechanism;if(t.mechanism={type:"generic",handled:!0,...n,...e},e&&"data"in e){const i={...n&&n.data,...e.data};t.mechanism.data=i}}function ai(r){if(function(e){try{return e.__sentry_captured__}catch{}}(r))return!0;try{ze(r,"__sentry_captured__",!0)}catch{}return!1}var Ee;function He(r){return new ue(e=>{e(r)})}function er(r){return new ue((e,t)=>{t(r)})}(()=>{const{performance:r}=J;if(!r||!r.now)return;const e=36e5,t=r.now(),n=Date.now(),i=r.timeOrigin?Math.abs(r.timeOrigin+t-n):e,s=i<e,a=r.timing&&r.timing.navigationStart,l=typeof a=="number"?Math.abs(a+t-n):e;(s||l<e)&&i<=l&&r.timeOrigin}
vendor: 6,460 bytes, line 10
10)(),function(r){r[r.PENDING=0]="PENDING",r[r.RESOLVED=1]="RESOLVED",r[r.REJECTED=2]="REJECTED"}(Ee||(Ee={}));class ue{constructor(e){ue.prototype.__init.call(this),ue.prototype.__init2.call(this),ue.prototype.__init3.call(this),ue.prototype.__init4.call(this),this._state=Ee.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new ue((n,i)=>{this._handlers.push([!1,s=>{if(e)try{n(e(s))}catch(a){i(a)}else n(s)},s=>{if(t)try{n(t(s))}catch(a){i(a)}else i(s)}]),this._executeHandlers()})}catch(e){return this.then(t=>t,e)}finally(e){return new ue((t,n)=>{let i,s;return this.then(a=>{s=!1,i=a,e&&e()},a=>{s=!0,i=a,e&&e()}).then(()=>{s?n(i):t(i)})})}__init(){this._resolve=e=>{this._setResult(Ee.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Ee.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===Ee.PENDING&&(dr(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Ee.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(t=>{t[0]||(this._state===Ee.RESOLVED&&t[1](this._value),this._state===Ee.REJECTED&&t[2](this._value),t[0]=!0)})}}}function Xa(r){const e=Oe(),t={sid:he(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(n){return de({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:typeof n.did=="number"||typeof n.did=="string"?`${n.did}`:void 0,duration:n.duration,abnormal_mechanism:n.abnormal_mechanism,attrs:{release:n.release,environment:n.environment,ip_address:n.ipAddress,user_agent:n.userAgent}})}(t)};return r&&ct(t,r),t}function ct(r,e={}){if(e.user&&(!r.ipAddress&&e.user.ip_address&&(r.ipAddress=e.user.ip_address),r.did||e.did||(r.did=e.user.id||e.user.email||e.user.username)),r.timestamp=e.timestamp||Oe(),e.abnormal_mechanism&&(r.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(r.ignoreDuration=e.ignoreDuration),e.sid&&(r.sid=e.sid.length===32?e.sid:he()),e.init!==void 0&&(r.init=e.init),!r.did&&e.did&&(r.did=`${e.did}`),typeof e.started=="number"&&(r.started=e.started),r.ignoreDuration)r.duration=void 0;else if(typeof e.duration=="number")r.duration=e.duration;else{const t=r.timestamp-r.started;r.duration=t>=0?t:0}e.release&&(r.release=e.release),e.environment&&(r.environment=e.environment),!r.ipAddress&&e.ipAddress&&(r.ipAddress=e.ipAddress),!r.userAgent&&e.userAgent&&(r.userAgent=e.userAgent),typeof e.errors=="number"&&(r.errors=e.errors),e.status&&(r.status=e.status)}function ci(){return he()}function $r(){return he().substring(16)}function hr(r,e,t=2){if(!e||typeof e!="object"||t<=0)return e;if(r&&e&&Object.keys(e).length===0)return r;const n={...r};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=hr(n[i],e[i],t-1));return n}const Jr="_sentrySpan";function li(r,e){e?ze(r,Jr,e):delete r[Jr]}function ui(r){return r[Jr]}class Sn{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:ci(),spanId:$r()}}clone(){const e=new Sn;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,li(e,ui(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&ct(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t=typeof e=="function"?e(this):e,[n,i]=t instanceof Ae?[t.getScopeData(),t.getRequestSession()]:st(t)?[e,e.requestSession]:[],{tags:s,extra:a,user:l,contexts:d,level:h,fingerprint:f=[],propagationContext:y}=n||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...a},this._contexts={...this._contexts,...d},l&&Object.keys(l).length&&(this._user=l),h&&(this._level=h),f.length&&(this._fingerprint=f),y&&(this._propagationContext=y),i&&(this._requestSession=i),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,li(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ci()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n=typeof t=="number"?t:100;if(n<=0)return this;const i={timestamp:At(),...e};return this._breadcrumbs.push(i),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.re
vendor: 5,161 bytes, line 10
10cordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:ui(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=hr(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:$r(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:he();if(!this._client)return N.warn("No client configured on scope - will not capture exception!"),n;const i=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:i,...t,event_id:n},this),n}captureMessage(e,t,n){const i=n&&n.event_id?n.event_id:he();if(!this._client)return N.warn("No client configured on scope - will not capture message!"),i;const s=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:s,...n,event_id:i},this),i}captureEvent(e,t){const n=t&&t.event_id?t.event_id:he();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(N.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}const Ae=Sn;class Za{constructor(e,t){let n,i;n=e||new Ae,i=t||new Ae,this._stack=[{scope:n}],this._isolationScope=i}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(i){throw this._popScope(),i}return dr(n)?n.then(i=>(this._popScope(),i),i=>{throw this._popScope(),i}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function lt(){const r=gn(lr());return r.stack=r.stack||new Za(Xt("defaultCurrentScope",()=>new Ae),Xt("defaultIsolationScope",()=>new Ae))}function ec(r){return lt().withScope(r)}function tc(r,e){const t=lt();return t.withScope(()=>(t.getStackTop().scope=r,e(r)))}function di(r){return lt().withScope(()=>r(lt().getIsolationScope()))}function wn(r){const e=gn(r);return e.acs?e.acs:{withIsolationScope:di,withScope:ec,withSetScope:tc,withSetIsolationScope:(t,n)=>di(n),getCurrentScope:()=>lt().getScope(),getIsolationScope:()=>lt().getIsolationScope()}}function Ke(){return wn(lr()).getCurrentScope()}function Mt(){return wn(lr()).getIsolationScope()}function Z(){return Ke().getClient()}function rc(r){const e=r.getPropagationContext(),{traceId:t,spanId:n,parentSpanId:i}=e;return de({trace_id:t,span_id:n,parent_span_id:i})}function nc(r){const e=r._sentryMetrics;if(!e)return;const t={};for(const[,[n,i]]of e)(t[n]||(t[n]=[])).push(de(i));return t}const ic=/^sentry-/;function oc(r){const e=function(n){if(!(!n||!Ce(n)&&!Array.isArray(n)))return Array.isArray(n)?n.reduce((i,s)=>{const a=hi(s);return Object.entries(a).forEach(([l,d])=>{i[l]=d}),i},{}):hi(n)}(r);if(!e)return;const t=Object.entries(e).reduce((n,[i,s])=>(i.match(ic)&&(n[i.slice(7)]=s),n),{});return Object.keys(t).length>0?t:void 0}function hi(r){return r.split(",").map(e=>e.split("=").map(t=>decodeURIComponent(t.trim()))).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}let pi=!1;function sc(r){const{spanId:e,traceId:t,isRemote:n}=r.spanContext();return de({parent_span_id:n?e:En(r).parent_span_id,span_id:n?$r():e,trace_id:t})}function fi(r){return typeof r=="number"?mi(r):Array.isArray(r)?r[0]+r[1]/1e9:r instanceof Date?mi(r.getTime()):Oe()}function mi(r){return r>9999999999?r/1e3:r}function En(r){if(function(e){return typeof e.getSpanJSON=="function"}(r))return r.getSpanJSON();try{const{spanId:e,traceId:t}=r.spanContext();if(function(n){const i=n;return!!(i.attributes&&i.startTime&&i.name&&i.endTime&&i.status)}(r)){const{attributes:n,startTime:i,name:s,endTime:a,parentSpanId:l,status:d}=r;return de({span_id:e,trace_id:t,data:n,description:s,parent_span_id:l,start_timestamp:fi(i),timestamp:fi(a)||void 0,status:ac(d),op:n["sentry.op"],origin:n["sentry.origin"],_metrics_summary:nc(r)})}return{span_id:e,trace_id:t}}catch{return{}}}function ac(r){if(r&&r.code!==0)return r.code===1?"ok":r.message||"unknown_error"}function Yo(r){return r._sentryRootSpan||r}function cc(){pi||(Ot(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK ver
10sion 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),pi=!0)}const kn="production";function Wo(r,e){const t=e.getOptions(),{publicKey:n}=e.getDsn()||{},i=de({environment:t.environment||kn,release:t.release,public_key:n,trace_id:r});return e.emit("createDsc",i),i}function lc(r){const e=Z();if(!e)return{};const t=Yo(r),n=t._frozenDsc;if(n)return n;const i=t.spanContext().traceState,s=i&&i.get("sentry.dsc"),a=s&&oc(s);if(a)return a;const l=Wo(r.spanContext().traceId,e),d=En(t),h=d.data||{},f=h["sentry.sample_rate"];f!=null&&(l.sample_rate=`${f}`);const y=h["sentry.source"],T=d.description;return y!=="url"&&T&&(l.transaction=T),function(k){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const v=Z(),g=k||v&&v.getOptions();return!!g&&(g.enableTracing||"tracesSampleRate"in g||"tracesSampler"in g)}()&&(l.sampled=String(function(k){const{traceFlags:v}=k.spanContext();return v===1}(t))),e.emit("createDsc",l,t),l}const uc=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function tr(r,e=!1){const{host:t,path:n,pass:i,port:s,projectId:a,protocol:l,publicKey:d}=r;return`${l}://${d}${e&&i?`:${i}`:""}@${t}${s?`:${s}`:""}/${n&&`${n}/`}${a}
10`}function gi(r){return{protocol:r.protocol,publicKey:r.publicKey||"",pass:r.pass||"",host:r.host,port:r.port||"",path:r.path||"",projectId:r.projectId}}function dc(r){const e=typeof r=="string"?function(t){const n=uc.exec(t);if(!n)return void Ot(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});const[i,s,a="",l="",d="",h=""]=n.slice(1);let f="",y=h;const T=y.split("/");if(T.length>1&&(f=T.slice(0,-1).join("/"),y=T.pop()),y){const k=y.match(/^\d+/);k&&(y=k[0])}return gi({host:l,pass:a,path:f,projectId:y,port:d,protocol:i,publicKey:s})}(r):gi(r);if(e&&function(t){if(!Qe)return!0;const{port:n,projectId:i,protocol:s}=t;return!(["protocol","publicKey","host","projectId"].find(a=>!t[a]&&(N.error(`Invalid Sentry Dsn: ${a} missing`),!0))||(i.match(/^\d+$/)?function(a){return a==="http"||a==="https"}(s)?n&&isNaN(parseInt(n,10))&&(N.error(`Invalid Sentry Dsn: Invalid port ${n}`),1):(N.error(`Invalid Sentry Dsn: Invalid protocol ${s}`),1):(N.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),1)))}(e))return e}function ke(r,e=100,t=1/0){try{return Br("",r,e,t)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function zo(r,e=3,t=102400){const n=ke(r,e);return i=n,function(s){return~-encodeURI(s).split(/%..|./).length}(JSON.stringify(i))>t?zo(r,e-1,t):n;var i}function Br(r,e,t=1/0,n=1/0,i=function(){const s=typeof WeakSet=="function",a=s?new WeakSet:[];return[function(l){if(s)return!!a.has(l)||(a.add(l),!1);for(let d=0;d<a.length;d++)if(a[d]===l)return!0;return a.push(l),!1},function(l){if(s)a.delete(l);else for(let d=0;d<a.length;d++)if(a[d]===l){a.splice(d,1);break}}]}()){const[s,a]=i;
10if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;const l=function(k,v){try{if(k==="domain"&&v&&typeof v=="object"&&v._events)return"[Domain]";if(k==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&v===global)return"[Global]";if(typeof window<"u"&&v===window)return"[Window]";if(typeof document<"u"&&v===document)return"[Document]";if(Uo(v))return"[VueViewModel]";if(st(g=v)&&"nativeEvent"in g&&"preventDefault"in g&&"stopPropagation"in g)return"[SyntheticEvent]";if(typeof v=="number"&&!Number.isFinite(v))return`[${v}]`;if(typeof v=="function")return`[Function: ${Ne(v)}]`;if(typeof v=="symbol")return`[${String(v)}]`;if(typeof v=="bigint")return`[BigInt: ${String(v)}]`;const _=function(S){const A=Object.getPrototypeOf(S);return A?A.constructor.name:"null prototype"}(v);return/^HTML(\w*)Element$/.test(_)?`[HTMLElement: ${_}]`:`[object ${_}]`}catch(_){return`**non-serializable** (${_})`}var g}(r,e);if(!l.startsWith("[object "))return l;if(e.__sentry_skip_normalization__)return e;const d=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:t;if(d===0)return l.replace("object ","");if(s(e))return"[Circular ~]";const h=e;if(h&&typeof h.toJSON=="function")try{return Br("",h.toJSON(),d-1,n,i)}catch{}const f=Array.isArray(e)?[]:{};let y=0;const T=Bo(e);for(const k in T){if(!Object.prototype.hasOwnProperty.call(T,k))continue;if(y>=n){f[k]="[MaxProperties ~]";break}const v=T[k];f[k]=Br(k,v,d-1,n,i),y++}return a(e),f}function Tt(r,e=[]){return[r,e]}function hc(r,e){const[t,n]=r;return[t,[...n,e]]}function vi(r,e){const t=r[1];for(const n of t)if(e(n,n[0].type))return!0;return!1}function Gr(r){return J.__SENTRY__&&J.__SENTRY__.encodePolyfill?J.__SENTRY__.encodePolyfill(r):new TextEncoder().encode(r)}function pc(r){const[e,t]=r;let n=JSON.stringify(e);function i(s){typeof n=="string"?n=typeof s=="string"?n+s:[Gr(n),s]:n.push(typeof s=="string"?Gr(s):s)}for(const s of t){const[a,l]=s;if(i(`
11${JSON.stringify(a)}
12`),typeof l=="string"||l instanceof Uint8Array)i(l);else{let d;try{d=JSON.stringify(l)}catch{d=JSON.stringify(ke(l))}i(d)}}return typeof n=="string"?n:function(s){const a=s.reduce((h,f)=>h+f.length,0),l=new Uint8Array(a);let d=0;for(const h of s)l.set(h,d),d+=h.length;return l}(n)}function fc(r){const e=typeof r.data=="string"?Gr(r.data):r.data;return[de({type:"attachment",length:e.length,filename:r.filename,content_type:r.contentType,attachment_type:r.attachmentType}),e]}const mc={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function yi(r){return mc[r]}function Ho(r){if(!r||!r.sdk)return;const{name:e,version:t}=r.sdk;return{name:e,version:t}}function gc(r,e,t,n){const i=Ho(t),s=r.type&&r.type!=="replay_event"?r.type:"event";(function(l,d){d&&(l.sdk=l.sdk||{},l.sdk.name=l.sdk.name||d.name,l.sdk.version=l.sdk.version||d.version,l.sdk.integrations=[...l.sdk.integrations||[],...d.integrations||[]],l.sdk.packages=[...l.sdk.packages||[],...d.packages||[]])})(r,t&&t.sdk);const a=function(l,d,h,f){const y=l.sdkProcessingMetadata&&l.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:l.event_id,sent_at:new Date().toISOString(),...d&&{sdk:d},...!!h&&f&&{dsn:tr(f)},...y&&{trace:de({...y})}}}(r,i,n,e);return delete r.sdkProcessingMetadata,Tt(a,[[{type:s},r]])}function Yr(r,e,t,n=0){return new ue((i,s)=>{const a=r[n];if(e===null||typeof a!="function")i(e);else{const l=a({...e},t);z&&a.id&&l===null&&N.log(`Event processor "${a.id}" dropped event`),dr(l)?l.then(d=>Yr(r,d,t,n+1).then(i)).then(null,s):Yr(r,l,t,n+1).then(i).then(null,s)}})}let Nt,bi,yr;function vc(r,e){const{fingerprint:t,span:n,breadcrumbs:i,sdkProcessingMetadata:s}=e;(function(a,l){const{extra:d,tags:h,user:f,contexts:y,level:T,transactionName:k}=l,v=de(d);v&&Object.keys(v).length&&(a.extra={...v,...a.extra});const g=de(h);g&&Object.keys(g).length&&(a.tags={...g,...a.tags});const _=de(f);_&&Object.keys(_).length&&(a.user={..._,...a.user});const S=de(y);S&&Object.keys(S).length&&(a.contexts={...S,...a.contexts}
12),T&&(a.level=T),k&&a.type!=="transaction"&&(a.transaction=k)})(r,e),n&&function(a,l){a.contexts={trace:sc(l),...a.contexts},a.sdkProcessingMetadata={dynamicSamplingContext:lc(l),...a.sdkProcessingMetadata};const d=Yo(l),h=En(d).description;h&&!a.transaction&&a.type==="transaction"&&(a.transaction=h)}(r,n),function(a,l){a.fingerprint=a.fingerprint?Array.isArray(a.fingerprint)?a.fingerprint:[a.fingerprint]:[],l&&(a.fingerprint=a.fingerprint.concat(l)),a.fingerprint&&!a.fingerprint.length&&delete a.fingerprint}(r,t),function(a,l){const d=[...a.breadcrumbs||[],...l];a.breadcrumbs=d.length?d:void 0}(r,i),function(a,l){a.sdkProcessingMetadata={...a.sdkProcessingMetadata,...l}}(r,s)}function _i(r,e){const{extra:t,tags:n,user:i,contexts:s,level:a,sdkProcessingMetadata:l,breadcrumbs:d,fingerprint:h,eventProcessors:f,attachments:y,propagationContext:T,transactionName:k,span:v}=e;Rt(r,"extra",t),Rt(r,"tags",n),Rt(r,"user",i),Rt(r,"contexts",s),r.sdkProcessingMetadata=hr(r.sdkProcessingMetadata,l,2),a&&(r.level=a),k&&(r.transactionName=k),v&&(r.span=v),d.length&&(r.breadcrumbs=[...r.breadcrumbs,...d]),h.length&&(r.fingerprint=[...r.fingerprint,...h]),f.length&&(r.eventProcessors=[...r.eventProcessors,...f]),y.length&&(r.attachments=[...r.attachments,...y]),r.propagationContext={...r.propagationContext,...T}}function Rt(r,e,t){r[e]=hr(r[e],t,1)}function yc(r,e,t,n,i,s){const{normalizeDepth:a=3,normalizeMaxBreadth:l=1e3}=r,d={...e,event_id:e.event_id||t.event_id||he(),timestamp:e.timestamp||At()},h=t.integrations||r.integrations.map(v=>v.name);(function(v,g){const{environment:_,release:S,dist:A,maxValueLength:P=250}=g;v.environment=v.environment||_||kn,!v.release&&S&&(v.release=S),!v.dist&&A&&(v.dist=A),v.message&&(v.message=nt(v.message,P));const w=v.exception&&v.exception.values&&v.exception.values[0];w&&w.value&&(w.value=nt(w.value,P));const D=v.request;D&&D.url&&(D.url=nt(D.url,P))})(d,r),function(v,g){g.length>0&&(v.sdk=v.sdk||{},v.sdk.integrations=[...v.sdk.integrations||[],...g])}(d,h),i&&i.emit("applyFrameMetadata",e),e.type===void 0&&function(v,g){const _=function(S){const A=J._sentryDebugIds;if(!A)return{};const P=Object.keys(A);return yr&&P.length===bi||(bi=P.length,yr=P.reduce((w,D)=>{Nt||(Nt={});const x=Nt[D];if(x)w[x[0]]=x[1];else{const B=S(D);for(let ie=B.length-1;ie>=0;ie--){const Xe=B[ie],Ze=Xe&&Xe.filename,et=A[D];if(Ze&&et){w[Ze]=et,Nt[D]=[Ze,et];break}}}return w},{})),yr}(g);try{v.exception.values.forEach(S=>{S.stacktrace.frames.forEach(A=>{_&&A.filename&&(A.debug_id=_[A.filename])})})}catch{}}(d,r.stackParser);const f=function(v,g){if(!g)return v;const _=v?v.clone():new Ae;return _.update(g),_}(n,t.captureContext);t.mechanism&&at(d,t.mechanism);const y=i?i.getEventProcessors():[],T=Xt("globalScope",()=>new Ae).getScopeData();s&&_i(T,s.getScopeData()),f&&_i(T,f.getScopeData());const k=[...t.attachments||[],...T.attachments];return k.length&&(t.attachments=k),vc(d,T),Yr([...y,...T.eventProcessors],d,t).then(v=>(v&&function(g){const _={};try{g.exception.values.forEach(A=>{A.stacktrace.frames.forEach(P=>{P.debug_id&&(P.abs_path?_[P.abs_path]=P.debug_id:P.filename&&(_[P.filename]=P.debug_id),delete P.debug_id)})})}catch{}if(Object.keys(_).length===0)return;g.debug_meta=g.debug_meta||{},g.debug_meta.images=g.debug_meta.images||[];const S=g.debug_meta.images;Object.entries(_).forEach(([A,P])=>{S.push({type:"sourcemap",code_file:A,debug_id:P})})}(v),typeof a=="number"&&a>0?function(g,_,S){if(!g)return null;const A={...g,...g.breadcrumbs&&{breadcrumbs:g.breadcrumbs.map(P=>({...P,...P.data&&{data:ke(P.data,_,S)}}))},...g.user&&{user:ke(g.user,_,S)},...g.contexts&&{contexts:ke(g.contexts,_,S)},...g.extra&&{extra:ke(g.extra,_,S)}};return g.contexts&&g.contexts.trace&&A.contexts&&(A.contexts.trace=g.contexts.trace,g.contexts.trace.data&&(A.contexts.trace.data=ke(g.contexts.trace.data,_,S))),g.spans&&(A.spans=g.spans.map(P=>({...P,...P.data&&{data:ke(P.data,_,S)}}))),g.contexts&&g.contexts.flags&&A.contexts&&(A.contexts.flags=ke(g.contexts.flags,3,S)),A}(v,a,l):v))}function bc(r){if(r)return function(e){return e instanceof Ae||typeof e=="function"}(r)||function(e){return Object.keys(e).some(t=>_c.includes(t))}(r)?{captureContext:r}:r}const _c=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Si(r,e){return Ke().captureEvent(r,e)}function wi(r){const e=Z(),t=Mt(),n=Ke(),{release:i,environment:s=kn}=e&&e.getOptions()||{},{userAgent:a}=J.navigator||{},l=Xa({release:i,environment:s,user:n.getUser()||t.getUser(),...a&&{userAgent:a},...r}),d=t.getSession();return d&&d.status==="ok"&&ct(d,{status:"exited"}),Qo(),t.setSession(l),n.setSession(l),l}function Qo(){const r=Mt(),e=Ke(),t=e.getSession()||r.getSession();t&&function(n,i){let s={};i?s={status:i}:n.status==="ok"&&(s={status:"exited"}),ct(n,s)}(t),Ko(),r.setSession(),e.setSession()}function Ko(){const r=Mt(),e=Ke(),t=Z(),n=e.getSession()||r.getSession();n&&t&&t.captureSession(n)}function Ei(r=!1){r?Qo():Ko()}function Sc(r,e,t){return e||`${function(n){return`${function(i){const s=i.protocol?`${i.protocol}:`:"",a=i.port?`:${i.port}`:"";return`${s}//${i.host}${a}${i.path?`/${i.path}`:""}/api/`}(n)}${n.projectId}/envelope/`}(r)}?${function(n,i){const s={sentry_version:"7"};return n.publicKey&&(s.sentry_key=n.publicKey),i&&(s.sentry_client=`${i.name}/${i.version}`),new URLSearchParams(s).toString()}(r,t)}`}const ki=[];function Ci(r,e){for(const t of e)t&&t.afterAllSetup&&t.afterAllSetup(r)}function Ti(r,e,t){if(t[e.name])z&&N.log(`Integration skipped because it was already installed: ${e.name}`);else{if(t[e.name]=e,ki.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),ki.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(r),typeof e.preprocessEvent=="function"){const n=e.preprocessEvent.bind(e);r.on("preprocessEvent",(i,s)=>n(i,s,r))}if(typeof e.processEvent=="function"){const n=e.processEvent.bind(e),i=Object.assign((s,a)=>n(s,a,r),{id:e.name});r.addEventProcessor(i)}z&&N.log(`Integration installed: ${e.name}`)}}
vendor: 1,872 bytes, line 12
12class me extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}const Oi="Not capturing exception because it's already been captured.";class wc{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=dc(e.dsn):z&&N.warn("No DSN provided, client will not send events."),this._dsn){const n=Sc(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}const t=["enableTracing","tracesSampleRate","tracesSampler"].find(n=>n in e&&e[n]==null);t&&Ot(()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(e,t,n){const i=he();if(ai(e))return z&&N.log(Oi),i;const s={event_id:i,...t};return this._process(this.eventFromException(e,s).then(a=>this._captureEvent(a,s,n))),s.event_id}captureMessage(e,t,n,i){const s={event_id:he(),...n},a=yn(e)?e:String(e),l=qr(e)?this.eventFromMessage(a,t,s):this.eventFromException(e,s);return this._process(l.then(d=>this._captureEvent(d,s,i))),s.event_id}captureEvent(e,t,n){const i=he();if(t&&t.originalException&&ai(t.originalException))return z&&N.log(Oi),i;const s={event_id:i,...t},a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,s,a||n)),s.event_id}captureSession(e){typeof e.release!="string"?z&&N.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ct(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;
12return t?(this.emit("flush"),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(i=>n&&i))):He(!0)}close(e){return this.flush(e).then(t=>(this.getOptions().enabled=!1,this.emit("close"),t))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];Ti(this,e,this._integrations),t||Ci(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=gc(e,this._dsn,this._options._metadata,this._options.tunnel);for(const s of t.attachments||[])n=hc(n,fc(s));const i=this.sendEnvelope(n);i&&i.then(s=>this.emit("afterSendEvent",e,s),null)}sendSession(e){const t=function(n,i,s,a){const l=Ho(s);return Tt({sent_at:new Date().toISOString(),...l&&{sdk:l},...!!a&&i&&{dsn:tr(i)}},["aggregates"in n?[{type:"sessions"},n]:[{type:"session"},n.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const i=typeof n=="number"?n:1,s=`${e}:${t}`;z&&N.log(`Recording outcome: "${s}"${i>1?` (${i} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+i}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const i=n.indexOf(t);i>-1&&n.splice(i,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(i=>i(...t))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,t=>(z&&N.error("Error while sending envelope:",t),t)):(z&&N.error("Transport disabled"),He({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(t,n){const i={};return n.forEach(s=>{s&&Ti(t,s,i)}),i}(this,e),Ci(this,e)}_updateSessionFromEvent(e,t){let n=t.level==="fatal",i=!1;const s=t.exception&&t.exception.values;if(s){i=!0;for(const l of s){const d=l.mechanism;if(d&&d.handled===!1){n=!0;break}}}const a=e.status==="ok";(a&&e.errors===0||a&&n)&&(ct(e,{...n&&{status:"crashed"},errors:e.errors||Number(i||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new ue(t=>{let n=0;const i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),t(!0)):(n+=1,e&&n>=e&&(clearInterval(i),t(!1)))},1)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n=Ke(),i=Mt()){const s=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a.length>0&&(t.integrations=a),this.emit("preprocessEvent",e,t),e.type||i.setLastEventId(e.event_id||t.event_id),yc(s,e,t,n,this,i).then(l=>{if(l===null)return l;l.contexts={trace:rc(n),...l.contexts};const d=function(h,f){const y=f.getPropagationContext();return y.dsc||Wo(y.traceId,h)}(this,n);return l.sdkProcessingMetadata={dynamicSamplingContext:d,...l.sdkProcessingMetadata},l})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(i=>i.event_id,i=>{z&&(i instanceof me&&i.logLevel==="log"?N.log(i.message):N.warn(i))})}_processEvent(e,t,n){const i=this.getOptions(),{sampleRate:s}=i,a=Mi(e),l=Ai(e),d=e.type||"error",h=`before send for type \`${d}\``,f=s===void 0?void 0:function(k){if(typeof k=="boolean")return Number(k);const v=typeof k=="string"?parseFloat(k):k;if(!(typeof v!="number"||isNaN(v)||v<0||v>1))return v;z&&N.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(k)} of type ${JSON.stringify(typeof k)}.`)}(s);if(l&&typeof f=="number"&&Math.random()>f)return this.recordDroppedEvent("sample_rate","error",e),er(new me(`Discarding event because it's not included in the random sample (sampling rate = ${s})`,"log"));const y=d==="replay_event"?"replay":d,T=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,T).then(k=>{if(k===null)throw this.recordDroppedEvent("event_processor",y,e),new me("An event processor returned `null`, will not send event.","log");if(t.data&&t.data.__sentry__===!0)return k;const v=function(g,_,S,A){const{beforeSend:P,beforeSendTransaction:w,beforeSendSpan:D}=_;if(Ai(S)&&P)return P(S,A);if(Mi(S)){if(S.spans&&D){const x=[];for(const B of S.spans){const ie=D(B);ie?x.push(ie):(cc(),g.recordDroppedEvent("before_send","span"))}S.spans=x}if(w){if(S.spans){const x=S.spans.length;S.sdkProcessingMetadata={...S.sdkProcessingMetadata,spanCountBeforeProcessing:x}}return w(S,A)}}return S}(this,i,k,t);return function(g,_){const S=`${_} must return \`null\` or a valid event.`;if(dr(g))return g.then(A=>{if(!st(A)&&A!==null)throw new me(S);return A},A=>{throw new me(`${_} rejected with ${A}`)});if(!st(g)&&g!==null)throw new me(S);return g}(v,h)}).then(k=>{if(k===null){if(this.recordDroppedEvent("before_send",y,e),a){const _=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",_)}throw new me(`${h} returned \`null\`, will not send event.`,"log")}const v=n&&n.getSession();if(!a&&v&&this._updateSessionFromEvent(v,k),a){const _=(k.sdkProcessingMetadata&&k.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(k.spans?k.spans.length:0);_>0&&this.recordDroppedEvent("before_send","span",_)}const g=k.transaction_info;if(a&&g&&k.transaction!==e.transaction){const _="custom";k.transaction_info={...g,source:_}}
12return this.sendEvent(k,t),k}).then(null,k=>{throw k instanceof me?k:(this.captureException(k,{data:{__sentry__:!0},originalException:k}),new me(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
13Reason: ${k}`))})}_process(e){this._numProcessing++,e.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([t,n])=>{const[i,s]=t.split(":");return{reason:i,category:s,quantity:n}})}_flushOutcomes(){z&&N.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0)return void(z&&N.log("No outcomes to send"));if(!this._dsn)return void(z&&N.log("No dsn provided, will not send outcomes"));z&&N.log("Sending outcomes:",e);const t=(n=e,Tt((i=this._options.tunnel&&tr(this._dsn))?{dsn:i}:{},[[{type:"client_report"},{timestamp:s||At(),discarded_events:n}]]));var n,i,s;this.sendEnvelope(t)}}function Ai(r){return r.type===void 0}function Mi(r){return r.type==="transaction"}function Ec(r){const e=[];function t(n){return e.splice(e.indexOf(n),1)[0]||Promise.resolve(void 0)}return{$:e,add:function(n){if(!(r===void 0||e.length<r))return er(new me("Not adding Promise because buffer limit was reached."));const i=n();return e.indexOf(i)===-1&&e.push(i),i.then(()=>t(i)).then(null,()=>t(i).then(null,()=>{})),i},drain:function(n){return new ue((i,s)=>{let a=e.length;if(!a)return i(!0);const l=setTimeout(()=>{n&&n>0&&i(!1)},n);e.forEach(d=>{He(d).then(()=>{--a||(clearTimeout(l),i(!0))},s)})})}}}function kc(r,{statusCode:e,headers:t},n=Date.now()){const i={...r},s=t&&t["x-sentry-rate-limits"],a=t&&t["retry-after"];if(s)for(const l of s.trim().split(",")){const[d,h,,,f]=l.split(":",5),y=parseInt(d,10),T=1e3*(isNaN(y)?60:y);if(h)for(const k of h.split(";"))k==="metric_bucket"&&f&&!f.split(";").includes("custom")||(i[k]=n+T);else i.all=n+T}else a?i.all=n+function(l,d=Date.now()){const h=parseInt(`${l}`,10);if(!isNaN(h))return 1e3*h;const f=Date.parse(`${l}`);return isNaN(f)?6e4:f-d}(a,n):e===429&&(i.all=n+6e4);return i}function Cc(r,e,t=Ec(r.bufferSize||64)){let n={};return{send:function(i){const s=[];if(vi(i,(d,h)=>{const f=yi(h);if(function(y,T,k=Date.now()){return function(v,g){return v[g]||v.all||0}(y,T)>k}(n,f)){const y=Pi(d,h);r.recordDroppedEvent("ratelimit_backoff",f,y)}else s.push(d)}),s.length===0)return He({});const a=Tt(i[0],s),l=d=>{vi(a,(h,f)=>{const y=Pi(h,f);r.recordDroppedEvent(d,yi(f),y)})};return t.add(()=>e({body:pc(a)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&z&&N.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),n=kc(n,d),d),d=>{throw l("network_error"),d})).then(d=>d,d=>{if(d instanceof me)return z&&N.error("Skipped sending event because buffer is full."),l("queue_overflow"),He({});throw d})},flush:i=>t.drain(i)}}function Pi(r,e){if(e==="event"||e==="transaction")return Array.isArray(r)?r[1]:void 0}const Tc=100;function qe(r,e){const t=Z(),n=Mt();if(!t)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=Tc}=t.getOptions();if(s<=0)return;const a={timestamp:At(),...r},l=i?Ot(()=>i(a,e)):a;l!==null&&(t.emit&&t.emit("beforeAddBreadcrumb",l,e),n.addBreadcrumb(l,s))}let Ii;const Di=new WeakMap,Oc=()=>({name:"FunctionToString",setupOnce(){Ii=Function.prototype.toString;try{Function.prototype.toString=function(...r){const e=_n(this),t=Di.has(Z())&&e!==void 0?e:this;return Ii.apply(t,r)}}catch{}},setup(r){Di.set(r,!0)}}),Ac=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],Mc=(r={})=>({name:"InboundFilters",processEvent(e,t,n){const i=n.getOptions(),s=function(a={},l={}){return{allowUrls:[...a.allowUrls||[],...l.allowUrls||[]],denyUrls:[...a.denyUrls||[],...l.denyUrls||[]],ignoreErrors:[...a.ignoreErrors||[],...l.ignoreErrors||[],...a.disableErrorDefaults?[]:Ac],ignoreTransactions:[...a.ignoreTransactions||[],...l.ignoreTransactions||[]],ignoreInternal:a.ignoreInternal===void 0||a.ignoreInternal}}(r,i);return function(a,l){return l.ignoreInternal&&function(d){try{return d.exception.values[0].type==="SentryError"}catch{}return!1}(a)?(z&&N.warn(`Event dropped due to being internal Sentry Error.
14Event: ${De(a)}`),!0):function(d,h){return d.type||!h||!h.length?!1:function(f){const y=[];f.message&&y.push(f.message);let T;
14try{T=f.exception.values[f.exception.values.length-1]}catch{}return T&&T.value&&(y.push(T.value),T.type&&y.push(`${T.type}: ${T.value}`)),y}(d).some(f=>Lt(f,h))}(a,l.ignoreErrors)?(z&&N.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
15Event: ${De(a)}`),!0):function(d){return d.type||!d.exception||!d.exception.values||d.exception.values.length===0?!1:!d.message&&!d.exception.values.some(h=>h.stacktrace||h.type&&h.type!=="Error"||h.value)}(a)?(z&&N.warn(`Event dropped due to not having an error message, error type or stacktrace.
16Event: ${De(a)}`),!0):function(d,h){if(d.type!=="transaction"||!h||!h.length)return!1;const f=d.transaction;return!!f&&Lt(f,h)}(a,l.ignoreTransactions)?(z&&N.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
17Event: ${De(a)}`),!0):function(d,h){if(!h||!h.length)return!1;const f=xt(d);return!!f&&Lt(f,h)}(a,l.denyUrls)?(z&&N.warn(`Event dropped due to being matched by \`denyUrls\` option.
18Event: ${De(a)}.
19Url: ${xt(a)}`),!0):function(d,h){if(!h||!h.length)return!0;const f=xt(d);return!f||Lt(f,h)}(a,l.allowUrls)?!1:(z&&N.warn(`Event dropped due to not being matched by \`allowUrls\` option.
20Event: ${De(a)}.
21Url: ${xt(a)}`),!0)}(e,s)?null:e}});function xt(r){try{let e;try{e=r.exception.values[0].stacktrace.frames}catch{}return e?function(t=[]){for(let n=t.length-1;n>=0;n--){const i=t[n];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null}(e):null}catch{return z&&N.error(`Cannot extract url for event ${De(r)}`),null}}function Pc(r,e,t=250,n,i,s,a){if(!(s.exception&&s.exception.values&&a&&We(a.originalException,Error)))return;const l=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;var d,h;l&&(s.exception.values=(d=Wr(r,e,i,a.originalException,n,s.exception.values,l,0),h=t,d.map(f=>(f.value&&(f.value=nt(f.value,h)),f))))}function Wr(r,e,t,n,i,s,a,l){if(s.length>=t+1)return s;let d=[...s];if(We(n[i],Error)){ji(a,l);const h=r(e,n[i]),f=d.length;Li(h,i,f,l),d=Wr(r,e,t,n[i],i,[h,...d],h,f)}return Array.isArray(n.errors)&&n.errors.forEach((h,f)=>{if(We(h,Error)){ji(a,l);const y=r(e,h),T=d.length;Li(y,`errors[${f}]`,T,l),d=Wr(r,e,t,h,i,[y,...d],y,T)}}),d}function ji(r,e){r.mechanism=r.mechanism||{type:"generic",handled:!0},r.mechanism={...r.mechanism,...r.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function Li(r,e,t,n){r.mechanism=r.mechanism||{type:"generic",handled:!0},r.mechanism={...r.mechanism,type:"chained",source:e,exception_id:t,parent_id:n}}function br(r){if(!r)return{};const e=r.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const t=e[6]||"",n=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:t,hash:n,relative:e[5]+t+n}}function Ic(){"console"in J&&Fr.forEach(function(r){r in J.console&&se(J.console,r,function(e){return Zt[r]=e,function(...t){ge("console",{args:t,level:r});const n=Zt[r];n&&n.apply(J.console,t)}})})}function Dc(r){return r==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(r)?r:"log"}const jc=()=>{let r;return{name:"Dedupe",processEvent(e){if(e.type)return e;try{if(function(t,n){return n?!!(function(i,s){const a=i.message,l=s.message;return!(!a&&!l||a&&!l||!a&&l||a!==l||!Ri(i,s)||!Ni(i,s))}(t,n)||function(i,s){const a=xi(s),l=xi(i);return!(!a||!l||a.type!==l.type||a.value!==l.value||!Ri(i,s)||!Ni(i,s))}(t,n)):!1}(e,r))return z&&N.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return r=e}}};function Ni(r,e){let t=ti(r),n=ti(e);if(!t&&!n)return!0;if(t&&!n||!t&&n||n.length!==t.length)return!1;for(let i=0;i<n.length;i++){const s=n[i],a=t[i];if(s.filename!==a.filename||s.lineno!==a.lineno||s.colno!==a.colno||s.function!==a.function)return!1}return!0}function Ri(r,e){let t=r.fingerprint,n=e.fingerprint;if(!t&&!n)return!0;if(t&&!n||!t&&n)return!1;try{return t.join("")===n.join("")}catch{return!1}}function xi(r){return r.exception&&r.exception.values&&r.exception.values[0]}function Fi(r){return r===void 0?void 0:r>=400&&r<500?"warning":r>=500?"error":void 0}const _r=J;function zr(r){return r&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(r.toString())}function Lc(){if(typeof EdgeRuntime=="string")return!0;
21if(!function(){if(!("fetch"in _r))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}())return!1;if(zr(_r.fetch))return!0;let r=!1;const e=_r.document;if(e&&typeof e.createElement=="function")try{const t=e.createElement("iframe");t.hidden=!0,e.head.appendChild(t),t.contentWindow&&t.contentWindow.fetch&&(r=zr(t.contentWindow.fetch)),e.head.removeChild(t)}catch(t){Qe&&N.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return r}function Nc(r,e){const t="fetch";Ge(t,r),Ye(t,()=>function(n,i=!1){i&&!Lc()||se(J,"fetch",function(s){return function(...a){const l=new Error,{method:d,url:h}=function(y){if(y.length===0)return{method:"GET",url:""};if(y.length===2){const[k,v]=y;return{url:qi(k),method:Hr(v,"method")?String(v.method).toUpperCase():"GET"}}const T=y[0];return{url:qi(T),method:Hr(T,"method")?String(T.method).toUpperCase():"GET"}}(a),f={args:a,fetchData:{method:d,url:h},startTimestamp:1e3*Oe(),virtualError:l};return n||ge("fetch",{...f}),s.apply(J,a).then(async y=>(n?n(y):ge("fetch",{...f,endTimestamp:1e3*Oe(),response:y}),y),y=>{throw ge("fetch",{...f,endTimestamp:1e3*Oe(),error:y}),vn(y)&&y.stack===void 0&&(y.stack=l.stack,ze(y,"framesToPop",1)),y})}})}(void 0,e))}function Hr(r,e){return!!r&&typeof r=="object"&&!!r[e]}function qi(r){return typeof r=="string"?r:r?Hr(r,"url")?r.url:r.toString?r.toString():"":""}const Ft=J,K=J;let Qr=0;function Vi(){return Qr>0}function ut(r,e={}){if(!function(n){return typeof n=="function"}(r))return r;try{const n=r.__sentry_wrapped__;if(n)return typeof n=="function"?n:r;if(_n(r))return r}catch{return r}const t=function(...n){try{const i=n.map(s=>ut(s,e));return r.apply(this,i)}catch(i){throw Qr++,setTimeout(()=>{Qr--}),function(...s){const a=wn(lr());if(s.length===2){const[l,d]=s;return l?a.withSetScope(l,d):a.withScope(d)}a.withScope(s[0])}(s=>{var a,l;s.addEventProcessor(d=>(e.mechanism&&(Ur(d,void 0,void 0),at(d,e.mechanism)),d.extra={...d.extra,arguments:n},d)),a=i,Ke().captureException(a,bc(l))}),i}};try{for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}catch{}Jo(t,r),ze(r,"__sentry_wrapped__",t);try{Object.getOwnPropertyDescriptor(t,"name").configurable&&Object.defineProperty(t,"name",{get:()=>r.name})}catch{}return t}const pr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Cn(r,e){const t=Tn(r,e),n={type:Fc(e),value:qc(e)};return t.length&&(n.stacktrace={frames:t}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function Rc(r,e,t,n){const i=Z(),s=i&&i.getOptions().normalizeDepth,a=function(h){for(const f in h)if(Object.prototype.hasOwnProperty.call(h,f)){const y=h[f];if(y instanceof Error)return y}}(e),l={__serialized__:zo(e,s)};if(a)return{exception:{values:[Cn(r,a)]},extra:l};const d={exception:{values:[{type:ur(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:Vc(e,{isUnhandledRejection:n})}]},extra:l};if(t){const h=Tn(r,t);h.length&&(d.exception.values[0].stacktrace={frames:h})}return d}function Sr(r,e){return{exception:{values:[Cn(r,e)]}}}function Tn(r,e){const t=e.stacktrace||e.stack||"",n=function(s){return s&&xc.test(s.message)?1:0}(e),i=function(s){return typeof s.framesToPop=="number"?s.framesToPop:0}(e);try{return r(t,n,i)}catch{}return[]}const xc=/Minified React error #\d+;/i;function Xo(r){return typeof WebAssembly<"u"&&WebAssembly.Exception!==void 0&&r instanceof WebAssembly.Exception}function Fc(r){const e=r&&r.name;return!e&&Xo(r)?r.message&&Array.isArray(r.message)&&r.message.length==2?r.message[0]:"WebAssembly.Exception":e}function qc(r){const e=r&&r.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:Xo(r)&&Array.isArray(r.message)&&r.message.length==2?r.message[1]:e:"No error message"}function Kr(r,e,t,n,i){let s;if(Vo(e)&&e.error)return Sr(r,e.error);if(ni(e)||dt(e,"DOMException")){const a=e;if("stack"in e)s=Sr(r,e);else{const l=a.name||(ni(a)?"DOMError":"DOMException"),d=a.message?`${l}: ${a.message}`:l;s=Xr(r,d,t,n),Ur(s,d)}return"code"in a&&(s.tags={...s.tags,"DOMException.code":`${a.code}`}),s}return vn(e)?Sr(r,e):st(e)||ur(e)?(s=Rc(r,e,t,i),at(s,{synthetic:!0}),s):(s=Xr(r,e,t,n),Ur(s,`${e}`,void 0),at(s,{synthetic:!0}),s)}function Xr(r,e,t,n){const i={};if(n&&t){const s=Tn(r,t);s.length&&(i.exception={values:[{value:e,stacktrace:{frames:s}}]}),at(i,{synthetic:!0})}
vendor: 4,927 bytes, line 21
21if(yn(e)){const{__sentry_template_string__:s,__sentry_template_values__:a}=e;return i.logentry={message:s,params:a},i}return i.message=e,i}function Vc(r,{isUnhandledRejection:e}){const t=function(i,s=40){const a=Object.keys(Bo(i));a.sort();const l=a[0];if(!l)return"[object has no keys]";if(l.length>=s)return nt(l,s);for(let d=a.length;d>0;d--){const h=a.slice(0,d).join(", ");if(!(h.length>s))return d===a.length?h:nt(h,s)}return""}(r),n=e?"promise rejection":"exception";return Vo(r)?`Event \`ErrorEvent\` captured as ${n} with message \`${r.message}\``:ur(r)?`Event \`${function(i){try{const s=Object.getPrototypeOf(i);return s?s.constructor.name:void 0}catch{}}(r)}\` (type=${r.type}) captured as ${n}`:`Object captured as ${n} with keys: ${t}`}class Uc extends wc{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};(function(n,i,s=[i],a="npm"){const l=n._metadata||{};l.sdk||(l.sdk={name:`sentry.javascript.${i}`,packages:s.map(d=>({name:`${a}:@sentry/${d}`,version:Be})),version:Be}),n._metadata=l})(t,"browser",["browser"],K.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&K.document&&K.document.addEventListener("visibilitychange",()=>{K.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,t){return function(n,i,s,a){const l=Kr(n,i,s&&s.syntheticException||void 0,a);return at(l),l.level="error",s&&s.event_id&&(l.event_id=s.event_id),He(l)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(i,s,a="info",l,d){const h=Xr(i,s,l&&l.syntheticException||void 0,d);return h.level=a,l&&l.event_id&&(h.event_id=l.event_id),He(h)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(pr&&N.warn("SDK not enabled, will not capture user feedback."));const t=function(n,{metadata:i,tunnel:s,dsn:a}){const l={event_id:n.event_id,sent_at:new Date().toISOString(),...i&&i.sdk&&{sdk:{name:i.sdk.name,version:i.sdk.version}},...!!s&&!!a&&{dsn:tr(a)}},d=function(h){return[{type:"user_report"},h]}(n);return Tt(l,[d])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}}const $c=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ne=J;let Ui,wr,Er,qt;function Jc(){if(!ne.document)return;const r=ge.bind(null,"dom"),e=$i(r,!0);ne.document.addEventListener("click",e,!1),ne.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(t=>{const n=ne[t],i=n&&n.prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&(se(i,"addEventListener",function(s){return function(a,l,d){if(a==="click"||a=="keypress")try{const h=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=h[a]=h[a]||{refCount:0};if(!f.handler){const y=$i(r);f.handler=y,s.call(this,a,y,d)}f.refCount++}catch{}return s.call(this,a,l,d)}}),se(i,"removeEventListener",function(s){return function(a,l,d){if(a==="click"||a=="keypress")try{const h=this.__sentry_instrumentation_handlers__||{},f=h[a];f&&(f.refCount--,f.refCount<=0&&(s.call(this,a,f.handler,d),f.handler=void 0,delete h[a]),Object.keys(h).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,a,l,d)}}))})}function $i(r,e=!1){return t=>{if(!t||t._sentryCaptured)return;const n=function(s){try{return s.target}catch{return null}}(t);if(function(s,a){return s==="keypress"&&(!a||!a.tagName||a.tagName!=="INPUT"&&a.tagName!=="TEXTAREA"&&!a.isContentEditable)}(t.type,n))return;ze(t,"_sentryCaptured",!0),n&&!n._sentryId&&ze(n,"_sentryId",he());const i=t.type==="keypress"?"input":t.type;(function(s){if(s.type!==wr)return!1;try{if(!s.target||s.target._sentryId!==Er)return!1}catch{}return!0})(t)||(r({event:t,name:i,global:e}),wr=t.type,Er=n?n._sentryId:void 0),clearTimeout(Ui),Ui=ne.setTimeout(()=>{Er=void 0,wr=void 0},1e3)}}function Zo(r){const e="history";Ge(e,r),Ye(e,Bc)}function Bc(){if(!function(){const t=Ft.chrome,n=t&&t.app&&t.app.runtime,i="history"in Ft&&!!Ft.history.pushState&&!!Ft.history.replaceState;return!n&&i}())return;const r=ne.onpopstate;function e(t){return function(...n){const i=n.length>2?n[2]:void 0;if(i){const s=qt,a=String(i);qt=a,ge("history",{from:s,to:a})}return t.apply(this,n)}}ne.onpopstate=function(...t){const n=ne.location.href,i=qt;if(qt=n,ge("history",{from:i,to:n}),r)try{return r.apply(this,t)}catch{}},se(ne.history,"pushState",e),se(ne.history,"replaceState",e)}const Gt={};function Ji(r){Gt[r]=void 0}const bt="__sentry_xhr_v3__";function Gc(){if(!ne.XMLHttpRequest)return;const r=XMLHttpRequest.prototype;r.open=new Proxy(r.open,{apply(e,t,n){const i=new Error,s=1e3*Oe(),a=Ce(n[0])?n[0].toUpperCase():void 0,l=function(h){if(Ce(h))return h;try{return h.toString()}catch{}}(n[1]);if(!a||!l)return e.apply(t,n);t[bt]={method:a,url:l,request_headers:{}}
21,a==="POST"&&l.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const d=()=>{const h=t[bt];if(h&&t.readyState===4){try{h.status_code=t.status}catch{}ge("xhr",{endTimestamp:1e3*Oe(),startTimestamp:s,xhr:t,virtualError:i})}};return"onreadystatechange"in t&&typeof t.onreadystatechange=="function"?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(h,f,y)=>(d(),h.apply(f,y))}):t.addEventListener("readystatechange",d),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(h,f,y){const[T,k]=y,v=f[bt];return v&&Ce(T)&&Ce(k)&&(v.request_headers[T.toLowerCase()]=k),h.apply(f,y)}}),e.apply(t,n)}}),r.send=new Proxy(r.send,{apply(e,t,n){const i=t[bt];return i?(n[0]!==void 0&&(i.body=n[0]),ge("xhr",{startTimestamp:1e3*Oe(),xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function Yc(r,e=function(t){const n=Gt[t];if(n)return n;let i=ne[t];if(zr(i))return Gt[t]=i.bind(ne);const s=ne.document;if(s&&typeof s.createElement=="function")try{const a=s.createElement("iframe");a.hidden=!0,s.head.appendChild(a);const l=a.contentWindow;l&&l[t]&&(i=l[t]),s.head.removeChild(a)}catch(a){$c&&N.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,a)}return i&&(Gt[t]=i.bind(ne))}("fetch")){let t=0,n=0;return Cc(r,function(i){const s=i.body.length;t+=s,n++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:r.headers,keepalive:t<=6e4&&n<15,...r.fetchOptions};if(!e)return Ji("fetch"),er("No fetch implementation available");try{return e(r.url,a).then(l=>(t-=s,n--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return Ji("fetch"),t-=s,n--,er(l)}})}function kr(r,e,t,n){const i={filename:r,function:e==="<anonymous>"?Je:e,in_app:!0};return t!==void 0&&(i.lineno=t),n!==void 0&&(i.colno=n),i}const Wc=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,zc=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Hc=/\((\S*)(?::(\d+))(?::(\d+))\)/,Qc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Kc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Xc=function(...r){const e=r.sort((t,n)=>t[0]-n[0]).map(t=>t[1]);return(t,n=0,i=0)=>{const s=[],a=t.split(`
22`);for(let l=n;l<a.length;l++){const d=a[l];if(d.length>1024)continue;const h=Xn.test(d)?d.replace(Xn,"$1"):d;if(!h.match(/\S*Error: /)){for(const f of e){const y=f(h);if(y){s.push(y);break}}if(s.length>=50+i)break}}return function(l){if(!l.length)return[];const d=Array.from(l);return/sentryWrapped/.test(jt(d).function||"")&&d.pop(),d.reverse(),Zn.test(jt(d).function||"")&&(d.pop(),Zn.test(jt(d).function||"")&&d.pop()),d.slice(0,50).map(h=>({...h,filename:h.filename||jt(d).filename,function:h.function||Je}))}(s.slice(i))}}([30,r=>{const e=Wc.exec(r);if(e){const[,n,i,s]=e;return kr(n,Je,+i,+s)}const t=zc.exec(r);if(t){if(t[2]&&t[2].indexOf("eval")===0){const s=Hc.exec(t[2]);s&&(t[2]=s[1],t[3]=s[2],t[4]=s[3])}const[n,i]=Bi(t[1]||Je,t[2]);return kr(i,n,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,r=>{const e=Qc.exec(r);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const i=Kc.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let t=e[3],n=e[1]||Je;return[n,t]=Bi(n,t),kr(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}]),Bi=(r,e)=>{const t=r.indexOf("safari-extension")!==-1,n=r.indexOf("safari-web-extension")!==-1;return t||n?[r.indexOf("@")!==-1?r.split("@")[0]:Je,t?`safari-extension:${e}`:`safari-web-extension:${e}`]:[r,e]},Gi=1024,Zc=(r={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...r};return{name:"Breadcrumbs",setup(t){var n;e.console&&function(i){const s="console";Ge(s,i),Ye(s,Ic)}(function(i){return function(s){if(Z()!==i)return;const a={category:"console",data:{arguments:s.args,logger:"console"},level:Dc(s.level),message:ii(s.args," ")};if(s.level==="assert"){if(s.args[0]!==!1)return;a.message=`Assertion failed: ${ii(s.args.slice(1)," ")||"console.assert"}`,a.data.arguments=s.args.slice(1)}qe(a,{input:s.args,level:s.level})}}
vendor: 8,300 bytes, line 22
22(t)),e.dom&&(n=function(i,s){return function(a){if(Z()!==i)return;let l,d,h=typeof s=="object"?s.serializeAttribute:void 0,f=typeof s=="object"&&typeof s.maxStringLength=="number"?s.maxStringLength:void 0;f&&f>Gi&&(pr&&N.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${f} was configured. Sentry will use 1024 instead.`),f=Gi),typeof h=="string"&&(h=[h]);try{const T=a.event,k=function(v){return!!v&&!!v.target}(T)?T.target:T;l=$o(k,{keyAttrs:h,maxStringLength:f}),d=function(v){if(!bn.HTMLElement)return null;let g=v;for(let _=0;_<5;_++){if(!g)return null;if(g instanceof HTMLElement){if(g.dataset.sentryComponent)return g.dataset.sentryComponent;if(g.dataset.sentryElement)return g.dataset.sentryElement}g=g.parentNode}return null}(k)}catch{l="<unknown>"}if(l.length===0)return;const y={category:`ui.${a.name}`,message:l};d&&(y.data={"ui.component_name":d}),qe(y,{event:a.event,name:a.name,global:a.global})}}(t,e.dom),Ge("dom",n),Ye("dom",Jc)),e.xhr&&function(i){Ge("xhr",i),Ye("xhr",Gc)}(function(i){return function(s){if(Z()!==i)return;const{startTimestamp:a,endTimestamp:l}=s,d=s.xhr[bt];if(!a||!l||!d)return;const{method:h,url:f,status_code:y,body:T}=d,k={method:h,url:f,status_code:y},v={xhr:s.xhr,input:T,startTimestamp:a,endTimestamp:l};qe({category:"xhr",data:k,type:"http",level:Fi(y)},v)}}(t)),e.fetch&&Nc(function(i){return function(s){if(Z()!==i)return;const{startTimestamp:a,endTimestamp:l}=s;if(l&&(!s.fetchData.url.match(/sentry_key/)||s.fetchData.method!=="POST"))if(s.error)qe({category:"fetch",data:s.fetchData,level:"error",type:"http"},{data:s.error,input:s.args,startTimestamp:a,endTimestamp:l});else{const d=s.response,h={...s.fetchData,status_code:d&&d.status},f={input:s.args,response:d,startTimestamp:a,endTimestamp:l};qe({category:"fetch",data:h,type:"http",level:Fi(h.status_code)},f)}}}(t)),e.history&&Zo(function(i){return function(s){if(Z()!==i)return;let a=s.from,l=s.to;const d=br(K.location.href);let h=a?br(a):void 0;const f=br(l);h&&h.path||(h=d),d.protocol===f.protocol&&d.host===f.host&&(l=f.relative),d.protocol===h.protocol&&d.host===h.host&&(a=h.relative),qe({category:"navigation",data:{from:a,to:l}})}}(t)),e.sentry&&t.on("beforeSendEvent",function(i){return function(s){Z()===i&&qe({category:"sentry."+(s.type==="transaction"?"transaction":"event"),event_id:s.event_id,level:s.level,message:De(s)},{event:s})}}(t))}}},el=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],tl=(r={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...r};return{name:"BrowserApiErrors",setupOnce(){e.setTimeout&&se(K,"setTimeout",Yi),e.setInterval&&se(K,"setInterval",Yi),e.requestAnimationFrame&&se(K,"requestAnimationFrame",rl),e.XMLHttpRequest&&"XMLHttpRequest"in K&&se(XMLHttpRequest.prototype,"send",nl);const t=e.eventTarget;t&&(Array.isArray(t)?t:el).forEach(il)}}};function Yi(r){return function(...e){const t=e[0];return e[0]=ut(t,{mechanism:{data:{function:Ne(r)},handled:!1,type:"instrument"}}),r.apply(this,e)}}function rl(r){return function(e){return r.apply(this,[ut(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Ne(r)},handled:!1,type:"instrument"}})])}}function nl(r){return function(...e){const t=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(n=>{n in t&&typeof t[n]=="function"&&se(t,n,function(i){const s={mechanism:{data:{function:n,handler:Ne(i)},handled:!1,type:"instrument"}},a=_n(i);return a&&(s.mechanism.data.handler=Ne(a)),ut(i,s)})}),r.apply(this,e)}}function il(r){const e=K[r],t=e&&e.prototype;t&&t.hasOwnProperty&&t.hasOwnProperty("addEventListener")&&(se(t,"addEventListener",function(n){return function(i,s,a){try{typeof s.handleEvent=="function"&&(s.handleEvent=ut(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ne(s),target:r},handled:!1,type:"instrument"}}))}catch{}return n.apply(this,[i,ut(s,{mechanism:{data:{function:"addEventListener",handler:Ne(s),target:r},handled:!1,type:"instrument"}}),a])}}),se(t,"removeEventListener",function(n){return function(i,s,a){try{const l=s.__sentry_wrapped__;l&&n.call(this,i,l,a)}catch{}return n.call(this,i,s,a)}}))}const ol=()=>({name:"BrowserSession",setupOnce(){K.document!==void 0?(wi({ignoreDuration:!0}),Ei(),Zo(({from:r,to:e})=>{r!==void 0&&r!==e&&(wi({ignoreDuration:!0}),Ei())})):pr&&N.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),sl=(r={})=>{const e={onerror:!0,onunhandledrejection:!0,...r};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(t){e.onerror&&(function(n){(function(i){const s="error";Ge(s,i),Ye(s,za)})(i=>{const{stackParser:s,attachStacktrace:a}=zi();if(Z()!==n||Vi())return;const{msg:l,url:d,line:h,column:f,error:y}=i,T=function(k,v,g,_){const S=k.exception=k.exception||{},A=S.values=S.values||[],P=A[0]=A[0]||{},w=P.stacktrace=P.stacktrace||{},D=w.frames=w.frames||[],x=_,B=g,ie=Ce(v)&&v.length>0?v:function(){try{return bn.document.location.href}catch{return""}}();return D.length===0&&D.push({colno:x,filename:ie,function:Je,in_app:!0,lineno:B}),k}(Kr(s,y||l,void 0,a,!1),d,h,f);T.level="error",Si(T,{originalException:y,mechanism:{handled:!1,type:"onerror"}})})}(t),Wi("onerror")),e.onunhandledrejection&&(function(n){(function(i){const s="unhandledrejection";Ge(s,i),Ye(s,Ha)})(i=>{const{stackParser:s,attachStacktrace:a}=zi();if(Z()!==n||Vi())return;const l=function(h){if(qr(h))return h;try{if("reason"in h)return h.reason;if("detail"in h&&"reason"in h.detail)return h.detail.reason}catch{}return h}(i),d=qr(l)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(l)}`}]}}:Kr(s,l,void 0,a,!0);d.level="error",Si(d,{originalException:l,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(t),Wi("onunhandledrejection"))}}};function Wi(r){pr&&N.log(`Global Handler attached: ${r}`)}function zi(){const r=Z();return r&&r.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const al=()=>({name:"HttpContext",preprocessEvent(r){if(!K.navigator&&!K.location&&!K.document)return;const e=r.request&&r.request.url||K.location&&K.location.href,{referrer:t}=K.document||{},{userAgent:n}=K.navigator||{},i={...r.request&&r.request.headers,...t&&{Referer:t},...n&&{"User-Agent":n}},s={...r.request,...e&&{url:e},headers:i};r.request=s}}),cl=(r={})=>{const e=r.limit||5,t=r.key||"cause";return{name:"LinkedErrors",preprocessEvent(n,i,s){const a=s.getOptions();Pc(Cn,a.stackParser,a.maxValueLength,t,e,n,i)}}};var Zr="new",Hi="loading",Qi="loaded",rr="joining-meeting",je="joined-meeting",Ie="left-meeting",we="error",ll="blocked",ul="off",dl="sendable",hl="loading",pl="interrupted",es="playable",Yt="unknown",ts="full",fl="lobby",ml="none",rs="base",gl="*",vl="ejected",yl="nbf-room",bl="nbf-token",_l="exp-room",Sl="exp-token",en="no-room",wl="meeting-full",ns="end-of-life",El="not-allowed",is="connection-error",kl="cam-in-use",Cl="mic-in-use",Tl="cam-mic-in-use",Ol="permissions",Al="undefined-mediadevices",Ml="not-found",Pl="constraints",Il="unknown",os="iframe-ready-for-launch-config",ss="iframe-launch-config",as="theme-updated",cs="loading",ls="load-attempt-failed",tn="loaded",us="started-camera",ds="camera-error",hs="joining-meeting",ps="joined-meeting",fs="left-meeting",ms="participant-joined",gs="participant-updated",vs="participant-left",ys="participant-counts-updated",bs="access-state-updated",_s="meeting-session-summary-updated",Ss="meeting-session-state-updated",Dl="meeting-session-data-error",ws="waiting-participant-added",Es="waiting-participant-updated",ks="waiting-participant-removed",Cs="track-started",Ts="track-stopped",Os="transcription-started",As="transcription-stopped",Ms="transcription-error",rn="recording-started",nn="recording-stopped",Ps="recording-stats",Is="recording-error",Ds="recording-upload-completed",js="recording-data",
22Ls="app-message",Ns="transcription-message",Rs="remote-media-player-started",xs="remote-media-player-updated",Fs="remote-media-player-stopped",qs="local-screen-share-started",Vs="local-screen-share-stopped",Us="local-screen-share-canceled",$s="active-speaker-change",Js="active-speaker-mode-change",Bs="network-quality-change",Gs="network-connection",Ys="cpu-load-change",Ws="face-counts-updated",_t="fullscreen",St="exited-fullscreen",zs="live-streaming-started",Hs="live-streaming-updated",Qs="live-streaming-stopped",Ks="live-streaming-error",Xs="lang-updated",Zs="receive-settings-updated",on="input-settings-updated",sn="nonfatal-error",an="error",Cr=4096,Ki=102400,Tr="iframe-call-message",Xi="local-screen-start",Zi="daily-method-update-live-streaming-endpoints",Vt="transmit-log",Te="daily-custom-track",Wt={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},ea={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},cn={PLAY:"play",PAUSE:"pause"},Or=["jpg","png","jpeg"],jl="add-endpoints",Ll="remove-endpoints",eo="sip-call-transfer";function pe(){return!V()&&typeof window<"u"&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function V(){return typeof navigator<"u"&&navigator.product&&navigator.product==="ReactNative"}function ta(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function Nl(){return!!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)&&(function(r,e){if(!r||!e)return!0;switch(r){case"Chrome":return e.major>=75;case"Safari":return RTCRtpTransceiver.prototype.hasOwnProperty("currentDirection")&&!(e.major===13&&e.minor===0&&e.point===0);case"Firefox":return e.major>=67}return!0}(Re(),nr())||V())}function to(){if(V()||!document)return!1;var r=document.createElement("iframe");return!!r.requestFullscreen||!!r.webkitRequestFullscreen}var ln="none",Rl="software",xl="hardware",Fl=function(){try{var r,e=document.createElement("canvas"),t=!1;(r=e.getContext("webgl2",{failIfMajorPerformanceCaveat:!0}))||(t=!0,r=e.getContext("webgl2"));var n=r!=null;return e.remove(),n?t?Rl:xl:ln}catch{return ln}}();function ra(){var r=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!V()&&Fl!==ln&&(r?function(){return ro()?!1:["Chrome","Firefox"].includes(Re())}():function(){if(ro())return!1;var e=Re();if(e==="Safari"){var t=An();if(t.major<15||t.major===15&&t.minor<4)return!1}return e==="Chrome"?On().major>=77:e==="Firefox"?Mn().major>=97:["Chrome","Firefox","Safari"].includes(e)}())}function na(){if(V()||ia()||typeof AudioWorkletNode>"u")return!1;switch(Re()){case"Chrome":case"Firefox":return!0;case"Safari":var r=nr();return r.major>17||r.major===17&&r.minor>=4}return!1}function Ar(){return ta()&&typeof MediaStreamTrack<"u"&&!function(){var r,e=Re();if(!pe())return!0;switch(e){case"Chrome":return(r=On()).major&&r.major>0&&r.major<75;case"Firefox":return(r=Mn()).major<91;case"Safari":return(r=An()).major<13||r.major===13&&r.minor<1;default:return!0}}()}function ia(){return pe().match(/Linux; Android/)}function ro(){var r,e=pe(),t=e.match(/Mac/)&&(!V()&&typeof window<"u"&&(r=window)!==null&&r!==void 0&&(r=r.navigator)!==null&&r!==void 0&&r.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(e.match(/Mobi/)||e.match(/Android/)||t)||!!pe().match(/DailyAnd\//)||void 0}function Re(){if(typeof window<"u"){var r=pe();return oa()?"Safari":r.indexOf("Edge")>-1?"Edge":r.match(/Chrome\//)?"Chrome":r.indexOf("Safari")>-1||sa()?"Safari":r.indexOf("Firefox")>-1?"Firefox":r.indexOf("MSIE")>-1||r.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function nr(){switch(Re()){case"Chrome":return On();case"Safari":return An();case"Firefox":return Mn();case"Edge":return function(){var r=0,e=0;if(typeof window<"u"){var t=pe().match(/Edge\/(\d+).(\d+)/);if(t)try{r=parseInt(t[1]),e=parseInt(t[2])}catch{}}return{major:r,minor:e}}()}}function On(){var r=0,e=0,t=0,n=0,i=!1;if(typeof window<"u"){var s=pe(),a=s.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(a)try{r=parseInt(a[1]),e=parseInt(a[2]),t=parseInt(a[3]),n=parseInt(a[4]),i=s.indexOf("OPR/")>-1}catch{}}return{major:r,minor:e,build:t,patch:n,opera:i}}function oa(){return!!pe().match(/iPad|iPhone|iPod/i)&&ta()}function sa(){return pe().indexOf("AppleWebKit/605.1.15")>-1}function An(){var r=0,e=0,t=0;if(typeof window<"u"){var n=pe().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(n)try{r=parseInt(n[1]),e=parseInt(n[2]),t=parseInt(n[4])}catch{}else(oa()||sa())&&(r=14,e=0,t=3)}return{major:r,minor:e,point:t}}function Mn(){var r=0,e=0;if(typeof window<"u"){var t=pe().match(/Firefox\/(\d+).(\d+)/);if(t)try{r=parseInt(t[1]),e=parseInt(t[2])}catch{}}return{major:r,minor:e}}var aa=function(){return ce(function r(){ae(this,r)},[{key:"addListenerForMessagesFromCallMachine",value:function(r,e,t){vt()}},{key:"addListenerForMessagesFromDailyJs",value:function(r,e,t){vt()}},{key:"sendMessageToCallMachine",value:function(r,e,t,n){vt()}},{key:"sendMessageToDailyJs",value:function(r,e){vt()}},{key:"removeListener",value:function(r){vt()}}])}();function no(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Mr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};
vendor: 5,222 bytes, line 22
22e%2?no(Object(t),!0).forEach(function(n){Se(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):no(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function ca(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ca=function(){return!!r})()}var ql=function(){function r(){var e,t,n,i;return ae(this,r),t=this,n=ve(n=r),(e=sr(t,ca()?Reflect.construct(n,[],ve(t).constructor):n.apply(t,i)))._wrappedListeners={},e._messageCallbacks={},e}return ar(r,aa),ce(r,[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){var i=this,s=function(a){if(a.data&&a.data.what==="iframe-call-message"&&(!a.data.callClientId||a.data.callClientId===t)&&(!a.data.from||a.data.from!=="module")){var l=Mr({},a.data);if(delete l.from,l.callbackStamp&&i._messageCallbacks[l.callbackStamp]){var d=l.callbackStamp;i._messageCallbacks[d].call(n,l),delete i._messageCallbacks[d]}delete l.what,delete l.callbackStamp,e.call(n,l)}};this._wrappedListeners[e]=s,window.addEventListener("message",s)}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){var i=function(s){var a;if(!(!s.data||s.data.what!==Tr||!s.data.action||s.data.from&&s.data.from!=="module"||s.data.callClientId&&t&&s.data.callClientId!==t||s!=null&&(a=s.data)!==null&&a!==void 0&&a.callFrameId)){var l=s.data;e.call(n,l)}};this._wrappedListeners[e]=i,window.addEventListener("message",i)}},{key:"sendMessageToCallMachine",value:function(e,t,n,i){if(!n)throw new Error("undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?");var s=Mr({},e);if(s.what=Tr,s.from="module",s.callClientId=n,t){var a=cr();this._messageCallbacks[a]=t,s.callbackStamp=a}var l=i?i.contentWindow:window,d=this._callMachineTargetOrigin(i);d&&l.postMessage(s,d)}},{key:"sendMessageToDailyJs",value:function(e,t){e.what=Tr,e.callClientId=t,e.from="embedded",window.postMessage(e,this._targetOriginFromWindowLocation())}},{key:"removeListener",value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener("message",t),delete this._wrappedListeners[e])}},{key:"forwardPackagedMessageToCallMachine",value:function(e,t,n){var i=Mr({},e);i.callClientId=n;var s=t?t.contentWindow:window,a=this._callMachineTargetOrigin(t);a&&s.postMessage(i,a)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(e,t){var n=function(i){if(i.data&&i.data.what==="iframe-call-message"&&(!i.data.callClientId||i.data.callClientId===t)&&(!i.data.from||i.data.from!=="module")){var s=i.data;e(s)}};return this._wrappedListeners[e]=n,window.addEventListener("message",n),e}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener("message",t),delete this._wrappedListeners[e])}},{key:"_callMachineTargetOrigin",value:function(e){return e?e.src?new URL(e.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:"_targetOriginFromWindowLocation",value:function(){return window.location.protocol==="file:"?"*":window.location.origin}}])}();function io(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function la(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(la=function(){return!!r})()}var Vl=function(){function r(){var e,t,n,i;return ae(this,r),t=this,n=ve(n=r),e=sr(t,la()?Reflect.construct(n,[],ve(t).constructor):n.apply(t,i)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new xr.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new xr.EventEmitter,e._wrappedListeners={},e._messageCallbacks={},e}return ar(r,aa),ce(r,[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){this._addListener(e,global.callMachineToDailyJsEmitter,t,n,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){this._addListener(e,global.dailyJsToCallMachineEmitter,t,n,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(e,t,n){this._sendMessage(e,global.dailyJsToCallMachineEmitter,n,t,"sending message to call machine")}},{key:"sendMessageToDailyJs",value:function(e,t){this._sendMessage(e,global.callMachineToDailyJsEmitter,t,null,"sending message to daily-js")}},{key:"removeListener",value:function(e){var t=this._wrappedListeners[e];t&&(global.callMachineToDailyJsEmitter.removeListener("message",t),global.dailyJsToCallMachineEmitter.removeListener("message",t),delete this._wrappedListeners[e])}},{key:"_addListener",value:function(e,t,n,i,s){var a=this,l=function(d){if(d.callClientId===n){if(d.callbackStamp&&a._messageCallbacks[d.callbackStamp]){var h=d.callbackStamp;a._messageCallbacks[h].call(i,d),delete a._messageCallbacks[h]}e.call(i,d)}};this._wrappedListeners[e]=l,t.addListener("message",l)}},{key:"_sendMessage",value:function(e,t,n,i,s){var a=function(d){for(var h=1;h<arguments.length;h++){var f=arguments[h]!=null?arguments[h]:{};
22h%2?io(Object(f),!0).forEach(function(y){Se(d,y,f[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(f)):io(Object(f)).forEach(function(y){Object.defineProperty(d,y,Object.getOwnPropertyDescriptor(f,y))})}return d}({},e);if(a.callClientId=n,i){var l=cr();this._messageCallbacks[l]=i,a.callbackStamp=l}t.emit("message",a)}}])}(),un="replace",dn="shallow-merge",oo=[un,dn],Ul=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.data,n=e.mergeStrategy,i=n===void 0?un:n;ae(this,r),r._validateMergeStrategy(i),r._validateData(t,i),this.mergeStrategy=i,this.data=t}return ce(r,[{key:"isNoOp",value:function(){return r.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:"isNoOpUpdate",value:function(e,t){return Object.keys(e).length===0&&t===dn}},{key:"_validateMergeStrategy",value:function(e){if(!oo.includes(e))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(oo,"]"))}},{key:"_validateData",value:function(e,t){if(!function(l){if(l==null||$(l)!=="object")return!1;var d=Object.getPrototypeOf(l);return d==null||d===Object.prototype}(e))throw Error("Meeting session data must be a plain (map-like) object");var n;try{if(n=JSON.stringify(e),t===un){var i=JSON.parse(n);re(i,e)||console.warn("The meeting session data provided will be modified when serialized.",i,e)}else if(t===dn){for(var s in e)if(Object.hasOwnProperty.call(e,s)&&e[s]!==void 0){var a=JSON.parse(JSON.stringify(e[s]));re(e[s],a)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",a,e[s])}}}catch(l){throw Error("Meeting session data must be serializable to JSON: ".concat(l))}if(n.length>Ki)throw Error("Meeting session data is too large (".concat(n.length," characters). Maximum size suppported is ").concat(Ki,"."))}}])}();function ua(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ua=function(){return!!r})()}function hn(r){var e=typeof Map=="function"?new Map:void 0;return hn=function(t){if(t===null||!function(i){try{return Function.toString.call(i).indexOf("[native code]")!==-1}catch{return typeof i=="function"}}(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(i,s,a){if(ua())return Reflect.construct.apply(null,arguments);var l=[null];l.push.apply(l,s);var d=new(i.bind.apply(i,l));return a&&Ct(d,a.prototype),d}(t,arguments,ve(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ct(n,t)},hn(r)}function da(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(da=function(){return!!r})()}function so(r){var e,t=(e=window._daily)===null||e===void 0?void 0:e.pendings;if(t){var n=t.indexOf(r);n!==-1&&t.splice(n,1)}}var $l=function(){return ce(function r(e){ae(this,r),this._currentLoad=null,this._callClientId=e},[{key:"load",value:function(){var r,e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),void n(!0);r=this._callClientId,window._daily.pendings.push(r),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new Jl(t,function(){n(!1)},function(s,a){a||so(e._callClientId),i(s,a)}),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),so(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])}(),Jl=function(){return ce(function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;ae(this,r),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=e,this._successCallback=t,this._failureCallback=n},[{key:"start",value:function(){var r=this;if(!this._currentAttempt){var e=function(t){r._currentAttempt.cancelled||(r._attemptsRemaining--,r._failureCallback(t,r._attemptsRemaining>0),r._attemptsRemaining<=0||setTimeout(function(){r._currentAttempt.cancelled||(r._currentAttempt=new ao(r._dailyConfig,r._successCallback,e),r._currentAttempt.start())},3e3))};this._currentAttempt=new ao(this._dailyConfig,this._successCallback,e),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}}])}(),Pr=function(){function r(){return ae(this,r),e=this,n=arguments,t=ve(t=r),sr(e,da()?Reflect.construct(t,n||[],ve(e).constructor):t.apply(e,n));var e,t,n}return ar(r,hn(Error)),ce(r)}(),ir=2e4,ao=function(){return ce(function e(t,n,i){ae(this,e),this._loadAttemptImpl=V()||!t.avoidEval?new Bl(t,n,i):new Gl
vendor: 4,938 bytes, line 22
22(t,n,i)},[{key:"start",value:(r=L(function*(){return this._loadAttemptImpl.start()}),function(){return r.apply(this,arguments)})},{key:"cancel",value:function(){this._loadAttemptImpl.cancel()}},{key:"cancelled",get:function(){return this._loadAttemptImpl.cancelled}},{key:"succeeded",get:function(){return this._loadAttemptImpl.succeeded}}]);var r}(),Bl=function(){return ce(function i(s,a,l){ae(this,i),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache=typeof iOSCallObjectBundleCache<"u"&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=s,this._successCallback=a,this._failureCallback=l},[{key:"start",value:(n=L(function*(){var i=Qt(this._dailyConfig);!(yield this._tryLoadFromIOSCache(i))&&this._loadFromNetwork(i)}),function(){return n.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(t=L(function*(i){if(!this._iosCache)return!1;try{var s=yield this._iosCache.get(i);return!!this.cancelled||!!s&&(s.code?(Function('"use strict";'+s.code)(),this.succeeded=!0,this._successCallback(),!0):(this._refetchHeaders=s.refetchHeaders,!1))}catch{return!1}}),function(i){return t.apply(this,arguments)})},{key:"_loadFromNetwork",value:(e=L(function*(i){var s=this;this._networkTimeout=setTimeout(function(){s._networkTimedOut=!0,s._failureCallback({msg:"Timed out (>".concat(ir," ms) when loading call object bundle ").concat(i),type:"timeout"})},ir);try{var a=this._refetchHeaders?{headers:this._refetchHeaders}:{},l=yield fetch(i,a);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new Pr;var d=yield this._getBundleCodeFromResponse(i,l);if(this.cancelled)throw new Pr;Function('"use strict";'+d)(),this._iosCache&&this._iosCache.set(i,d,l.headers),this.succeeded=!0,this._successCallback()}catch(h){if(clearTimeout(this._networkTimeout),h instanceof Pr||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(i,": ").concat(h),type:h.message})}}),function(i){return e.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(r=L(function*(i,s){if(s.ok)return yield s.text();if(this._iosCache&&s.status===304)return(yield this._iosCache.renew(i,s.headers)).code;throw new Error("Received ".concat(s.status," response"))}),function(i,s){return r.apply(this,arguments)})}]);var r,e,t,n}(),Gl=function(){return ce(function r(e,t,n){ae(this,r),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=e,this._successCallback=t,this._failureCallback=n,this._attemptId=cr(),this._networkTimeout=null,this._scriptElement=null},[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var r=Qt(this._dailyConfig);(typeof document>"u"?"undefined":$(document))==="object"?this._startLoading(r):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(r){var e=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout(function(){e._stopLoading(),e._failureCallback({msg:"Timed out (>".concat(ir," ms) when loading call object bundle ").concat(r),type:"timeout"})},ir);var t=document.getElementsByTagName("head")[0],n=document.createElement("script");this._scriptElement=n,n.onload=function(){e._stopLoading(),e.succeeded=!0,e._successCallback()},n.onerror=function(i){e._stopLoading(),e._failureCallback({msg:"Failed to load call object bundle ".concat(i.target.src),type:i.message})},n.src=r,t.appendChild(n)}},{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)}}])}(),Ut=function(r,e,t){return Wl(r.local,e,t)===!0},Yl=function(r,e,t){return r.local.streams&&r.local.streams[e]&&r.local.streams[e].stream&&r.local.streams[e].stream["get".concat(t==="video"?"Video":"Audio","Tracks")]()[0]},rt=function(r,e,t,n){var i=zl(r,e,t,n);return i&&i.pendingTrack},Wl=function(r,e,t){if(!r)return!1;var n=function(s){switch(s){case"avatar":return!0;case"staged":return s;default:return!!s}},i=r.public.subscribedTracks;return i&&i[e]?["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo"].indexOf(t)===-1&&i[e].custom?[!0,"staged"].includes(i[e].custom)?n(i[e].custom):n(i[e].custom[t]):n(i[e][t]):!i||n(i.ALL)},zl=function(r,e,t,n){var i=Object.values(r.streams||{}).filter(function(s){return s.participantId===e&&s.type===t&&s.pe
22ndingTrack&&s.pendingTrack.kind===n}).sort(function(s,a){return new Date(a.starttime)-new Date(s.starttime)});return i&&i[0]},Hl=function(r,e){var t=r.local.public.customTracks;if(t&&t[e])return t[e].track};function co(r,e){for(var t=e.getState(),n=0,i=["cam","screen"];n<i.length;n++)for(var s=i[n],a=0,l=["video","audio"];a<l.length;a++){var d=l[a],h=s==="cam"?d:"screen".concat(d.charAt(0).toUpperCase()+d.slice(1)),f=r.tracks[h];if(f){var y=r.local?Yl(t,s,d):rt(t,r.session_id,s,d);f.state==="playable"&&(f.track=y),f.persistentTrack=y}}}function lo(r,e){try{var t=e.getState();for(var n in r.tracks)if(!Ql(n)){var i=r.tracks[n].kind;if(i){var s=r.tracks[n];if(s){var a=r.local?Hl(t,n):rt(t,r.session_id,n,i);s.state==="playable"&&(r.tracks[n].track=a),s.persistentTrack=a}}else console.error("unknown type for custom track")}}catch(l){console.error(l)}}function Ql(r){return["video","audio","screenVideo","screenAudio"].includes(r)}function uo(r,e,t){var n=t.getState();if(r.local){if(r.audio)try{r.audioTrack=n.local.streams.cam.stream.getAudioTracks()[0],r.audioTrack||(r.audio=!1)}catch{}if(r.video)try{r.videoTrack=n.local.streams.cam.stream.getVideoTracks()[0],r.videoTrack||(r.video=!1)}catch{}if(r.screen)try{r.screenVideoTrack=n.local.streams.screen.stream.getVideoTracks()[0],r.screenAudioTrack=n.local.streams.screen.stream.getAudioTracks()[0],r.screenVideoTrack||r.screenAudioTrack||(r.screen=!1)}catch{}}else{var i=!0;try{var s=n.participants[r.session_id];s&&s.public&&s.public.rtcType&&s.public.rtcType.impl==="peer-to-peer"&&s.private&&!["connected","completed"].includes(s.private.peeringState)&&(i=!1)}catch(f){console.error(f)}if(!i)return r.audio=!1,r.audioTrack=!1,r.video=!1,r.videoTrack=!1,r.screen=!1,void(r.screenTrack=!1);try{if(n.streams,r.audio&&Ut(n,r.session_id,"cam-audio")){var a=rt(n,r.session_id,"cam","audio");a&&(e&&e.audioTrack&&e.audioTrack.id===a.id?r.audioTrack=a:a.muted||(r.audioTrack=a)),r.audioTrack||(r.audio=!1)}if(r.video&&Ut(n,r.session_id,"cam-video")){var l=rt(n,r.session_id,"cam","video");l&&(e&&e.videoTrack&&e.videoTrack.id===l.id?r.videoTrack=l:l.muted||(r.videoTrack=l)),r.videoTrack||(r.video=!1)}if(r.screen&&Ut(n,r.session_id,"screen-audio")){var d=rt(n,r.session_id,"screen","audio");d&&(e&&e.screenAudioTrack&&e.screenAudioTrack.id===d.id?r.screenAudioTrack=d:d.muted||(r.screenAudioTrack=d))}if(r.screen&&Ut(n,r.session_id,"screen-video")){var h=rt(n,r.session_id,"screen","video");h&&(e&&e.screenVideoTrack&&e.screenVideoTrack.id===h.id?r.screenVideoTrack=h:h.muted||(r.screenVideoTrack=h))}r.screenVideoTrack||r.screenAudioTrack||(r.screen=!1)}catch(f){console.error("unexpected error matching up tracks",f)}}}function Kl(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=function(d,h){if(d){if(typeof d=="string")return ho(d,h);var f={}.toString.call(d).slice(8,-1);return f==="Object"&&d.constructor&&(f=d.constructor.name),f==="Map"||f==="Set"?Array.from(d):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?ho(d,h):void 0}}(r))||e&&r&&typeof r.length=="number"){t&&(r=t);var n=0,i=function(){};return{s:i,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(d){throw d},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
23In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,a=!0,l=!1;return{s:function(){t=t.call(r)},n:function(){var d=t.next();return a=d.done,d},e:function(d){l=!0,s=d},f:function(){try{a||t.return==null||t.return()}finally{if(l)throw s}}}}function ho(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}var be=new Map,it=null;function Xl(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=function(d,h){if(d){if(typeof d=="string")return po(d,h);var f={}.toString.call(d).slice(8,-1);return f==="Object"&&d.constructor&&(f=d.constructor.name),f==="Map"||f==="Set"?Array.from(d):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?po(d,h):void 0}}(r))||e&&r&&typeof r.length=="number"){t&&(r=t);var n=0,i=function(){};return{s:i,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(d){throw d},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
24In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,a=!0,l=!1;return{s:function(){t=t.call(r)},n:function(){var d=t.next();return a=d.done,d},e:function(d){l=!0,s=d},f:function(){try{a||t.return==null||t.return()}finally{if(l)throw s}}}}function po(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}var _e=new Map,Et=null;function Zl(r){ha()?function(e){be.has(e)||(be.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){be.has(e)&&(be.get(e).lastDevicesString=JSON.stringify(t),it||(it=function(){var n=L(function*(){var i,s=yield navigator.mediaDevices.enumerateDevices(),a=Kl(be.keys());try{for(a.s();!(i=a.n()).done;){var l=i.value,d=JSON.stringify(s);d!==be.get(l).lastDevicesString&&(be.get(l).lastDevicesString=d,l(s))}}catch(h){a.e(h)}finally{a.f()}});return function(){return n.apply(this,arguments)}}(),navigator.mediaDevices.addEventListener("devicechange",it)))}).catch(function(){}))}(r):function(e){_e.has(e)||(_e.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){_e.has(e)&&(_e.get(e).lastDevicesString=JSON.stringify(t),Et||(Et=setInterval(L(function*(){var n,i=yield navigator.mediaDevices.enumerateDevices(),s=Xl(_e.keys());try{for(s.s();!(n=s.n()).done;){var a=n.value,l=JSON.stringify(i);l!==_e.get(a).lastDevicesString&&(_e.get(a).lastDevicesString=l,a(i))}}catch(d){s.e(d)}finally{s.f()}}),3e3)))}))}(r)}function eu(r){ha()?function(e){be.has(e)&&(be.delete(e),be.size===0&&it&&(navigator.mediaDevices.removeEventListener("devicechange",it),it=null))}(r):function(e){_e.has(e)&&(_e.delete(e),_e.size===0&&Et&&(clearInterval(Et),Et=null))}(r)}function ha(){var r;return V()||((r=navigator.mediaDevices)===null||r===void 0?void 0:r.ondevicechange)!==void 0}var tu=new Set;function ru(r,e){var t=e.isLocalScreenVideo;return r&&r.readyState==="live"&&!function(n,i){return(!i.isLocalScreenVideo||Re()!=="Chrome")&&n.muted&&!tu.has(n.id)}(r,{isLocalScreenVideo:t})}function fo(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Me(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};
24e%2?fo(Object(t),!0).forEach(function(n){Se(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):fo(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}var wt=Object.freeze({VIDEO:"video",AUDIO:"audio",SCREEN_VIDEO:"screenVideo",SCREEN_AUDIO:"screenAudio",CUSTOM_VIDEO:"customVideo",CUSTOM_AUDIO:"customAudio"}),nu=Object.freeze({PARTICIPANTS:"participants",STREAMING:"streaming",TRANSCRIPTION:"transcription"}),kt=Object.values(wt),mo=["v","a","sv","sa","cv","ca"];Object.freeze(kt.reduce(function(r,e,t){return r[e]=mo[t],r},{})),Object.freeze(mo.reduce(function(r,e,t){return r[e]=kt[t],r},{}));var iu=[wt.VIDEO,wt.AUDIO,wt.SCREEN_VIDEO,wt.SCREEN_AUDIO],go=Object.values(nu),vo=["p","s","t"];Object.freeze(go.reduce(function(r,e,t){return r[e]=vo[t],r},{})),Object.freeze(vo.reduce(function(r,e,t){return r[e]=go[t],r},{}));var pa=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.base,n=e.byUserId,i=e.byParticipantId;ae(this,r),this.base=t,this.byUserId=n,this.byParticipantId=i}return ce(r,[{key:"clone",value:function(){var e=new r;if(this.base instanceof X?e.base=this.base.clone():e.base=this.base,this.byUserId!==void 0)for(var t in e.byUserId={},this.byUserId){var n=this.byUserId[t];e.byUserId[t]=n instanceof X?n.clone():n}if(this.byParticipantId!==void 0)for(var i in e.byParticipantId={},this.byParticipantId){var s=this.byParticipantId[i];e.byParticipantId[i]=s instanceof X?s.clone():s}return e}},{key:"toJSONObject",value:function(){var e={};if(typeof this.base=="boolean"?e.base=this.base:this.base instanceof X&&(e.base=this.base.toJSONObject()),this.byUserId!==void 0)for(var t in e.byUserId={},this.byUserId){var n=this.byUserId[t];e.byUserId[t]=n instanceof X?n.toJSONObject():n}if(this.byParticipantId!==void 0)for(var i in e.byParticipantId={},this.byParticipantId){var s=this.byParticipantId[i];e.byParticipantId[i]=s instanceof X?s.toJSONObject():s}return e}},{key:"toMinifiedJSONObject",value:function(){var e={};if(this.base!==void 0&&(typeof this.base=="boolean"?e.b=this.base:e.b=this.base.toMinifiedJSONObject()),this.byUserId!==void 0)for(var t in e.u={},this.byUserId){var n=this.byUserId[t];e.u[t]=typeof n=="boolean"?n:n.toMinifiedJSONObject()}if(this.byParticipantId!==void 0)for(var i in e.p={},this.byParticipantId){var s=this.byParticipantId[i];e.p[i]=typeof s=="boolean"?s:s.toMinifiedJSONObject()}return e}},{key:"normalize",value:function(){return this.base instanceof X&&(this.base=this.base.normalize()),this.byUserId&&(this.byUserId=Object.fromEntries(Object.entries(this.byUserId).map(function(e){var t=ee(e,2),n=t[0],i=t[1];return[n,i instanceof X?i.normalize():i]}))),this.byParticipantId&&(this.byParticipantId=Object.fromEntries(Object.entries(this.byParticipantId).map(function(e){var t=ee(e,2),n=t[0],i=t[1];return[n,i instanceof X?i.normalize():i]}))),this}}],[{key:"fromJSONObject",value:function(e){var t,n,i;if(e.base!==void 0&&(t=typeof e.base=="boolean"?e.base:X.fromJSONObject(e.base)),e.byUserId!==void 0)for(var s in n={},e.byUserId){var a=e.byUserId[s];n[s]=typeof a=="boolean"?a:X.fromJSONObject(a)}if(e.byParticipantId!==void 0)for(var l in i={},e.byParticipantId){var d=e.byParticipantId[l];i[l]=typeof d=="boolean"?d:X.fromJSONObject(d)}return new r({base:t,byUserId:n,byParticipantId:i})}},{key:"fromMinifiedJSONObject",value:function(e){var t,n,i;if(e.b!==void 0&&(t=typeof e.b=="boolean"?e.b:X.fromMinifiedJSONObject(e.b)),e.u!==void 0)for(var s in n={},e.u){var a=e.u[s];n[s]=typeof a=="boolean"?a:X.fromMinifiedJSONObject(a)}if(e.p!==void 0)for(var l in i={},e.p){var d=e.p[l];i[l]=typeof d=="boolean"?d:X.fromMinifiedJSONObject(d)}return new r({base:t,byUserId:n,byParticipantId:i})}},{key:"validateJSONObject",value:function(e){if($(e)!=="object")return[!1,"canReceive must be an object"];for(var t=["base","byUserId","byParticipantId"],n=0,i=Object.keys(e);n<i.length;n++){var s=i[n];if(!t.includes(s))return[!1,"canReceive can only contain keys (".concat(t.join(", "),")")];if(s==="base"){var a=ee(X.validateJSONObject(e.base,!0),2),l=a[0],d=a[1];if(!l)return[!1,d]}else{if($(e[s])!=="object")return[!1,"invalid (non-object) value for field '".concat(s,"' in canReceive")];for(var h=0,f=Object.values(e[s]);h<f.length;h++){var y=f[h],T=ee(X.validateJSONObject(y),2),k=T[0],v=T[1];if(!k)return[!1,v]}}}return[!0]}}])}(),X=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.video,n=e.audio,i=e.screenVideo,s=e.screenAudio,a=e.customVideo,l=e.customAudio;ae(this,r),this.video=t,this.audio=n,this.screenVideo=i,this.screenAudio=s,this.customVideo=a,this.customAudio=l}return ce(r,[{key:"clone",value:function(){var e=new r;return this.video!==void 0&&(e.video=this.video),this.audio!==void 0&&(e.audio=this.audio),this.screenVideo!==void 0&&(e.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(e.screenAudio=this.screenAudio),this.customVideo!==void 0&&(e.customVideo=Me({},this.customVideo)),this.customAudio!==void 0&&(e.customAudio=Me({},this.customAudio)),e}},{key:"toJSONObject",value:function(){var e={};return this.video!==void 0&&(e.video=this.video),this.audio!==void 0&&(e.audio=this.audio),this.screenVideo!==void 0&&(e.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(e.screenAudio=this.screenAudio),this.customVideo!==void 0&&(e.customVideo=Me({},this.customVideo)),this.customAudio!==void 0&&(e.customAudio=Me({},this.customAudio)),e}},{key:"toMinifiedJSONObject",value:function(){var e={};return this.video!==void 0&&(e.v=this.video),this.audio!==void 0&&(e.a=this.audio),this.screenVideo!==void 0&&(e.sv=this.screenVideo),this.screenAudio!==void 0&&(e.sa=this.screenAudio),this.customVideo!==void 0&&(e.cv=Me({},this.customVideo)),this.customAudio!==void 0&&(e.ca=Me({},this.customAudio)),e}},{key:"normalize",value:function(){function e(t,n){return t&&Object.keys(t).length===1&&t["*"]===n}return!(this.video!==!0||this.audio!==!0||this.screenVideo!==!0||this.screenAudio!==!0||!e(this.customVideo,!0)||!e(this.customAudio,!0))||(this.video!==!1||this.audio!==!1||this.screenVideo!==!1||this.screenAudio!==!1||!e(this.customVideo,!1)||!e(this.customAudio,!1))&&this}}],[{key:"fromBoolean",value:function(e){return new r({video:e,audio:e,screenVideo:e,screenAudio:e,customVideo:{"*":e},customAudio:{"*":e}})}},{key:"fromJSONObject",value:function(e){return new r({video:e.video,audio:e.audio,screenVideo:e.screenVideo,screenAudio:e.screenAudio,customVideo:e.customVideo!==void 0?Me({},e.customVideo):void 0,customAudio:e.customAudio!==void 0?Me({},e.customAudio):void 0})}},{key:"fromMinifiedJSONObject",value:function(e){return new r({video:e.v,audio:e.a,screenVideo:e.sv,screenAudio:e.sa,customVideo:e.cv,customAudio:e.ca})}},{key:"validateJSONObject",value:function(e,t){if(typeof e=="boolean")return[!0];if($(e)!=="object")return[!1,"invalid (non-object, non-boolean) value in canReceive"];for(var n=Object.keys(e),i=0,s=n;i<s.length;i++){var a=s[i];if(!kt.includes(a))return[!1,"invalid media type '".concat(a,"' in canReceive")];if(iu.includes(a)){if(typeof e[a]!="boolean")return[!1,"invalid (non-boolean) value for media type '".concat(a,"' in canReceive")]}else{if($(e[a])!=="object")return[!1,"invalid (non-object) value for media type '".concat(a,"' in canReceive")];for(var l=0,d=Object.values(e[a]);l<d.length;l++)if(typeof d[l]!="boolean")return[!1,"invalid (non-boolean) value for entry within '".concat(a,"' in canReceive")];if(t&&e[a]["*"]===void 0)return[!1,`canReceive "base" permission must specify "*" as an entry within '`.concat(a,"'")]}}return t&&n.length!==kt.length?[!1,'canReceive "base" permission must specify all media types: '.concat(kt.join(", ")," (or be set to a boolean shorthand)")]:[!0]}}])}(),ou=["result"],su=["preserveIframe"];function yo(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function j(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};
vendor: 14,995 bytes, lines 24-25
24e%2?yo(Object(t),!0).forEach(function(n){Se(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):yo(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function fa(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fa=function(){return!!r})()}function bo(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=function(d,h){if(d){if(typeof d=="string")return _o(d,h);var f={}.toString.call(d).slice(8,-1);return f==="Object"&&d.constructor&&(f=d.constructor.name),f==="Map"||f==="Set"?Array.from(d):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?_o(d,h):void 0}}(r))||e&&r&&typeof r.length=="number"){t&&(r=t);var n=0,i=function(){};return{s:i,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(d){throw d},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
25In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,a=!0,l=!1;return{s:function(){t=t.call(r)},n:function(){var d=t.next();return a=d.done,d},e:function(d){l=!0,s=d},f:function(){try{a||t.return==null||t.return()}finally{if(l)throw s}}}}function _o(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}var Ve={},So="video",au="voice",wo=V()?{data:{}}:{data:{},topology:"none"},Eo={present:0,hidden:0},ma={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},Ir=Object.keys(ma),ko=["state","volume","simulcastEncodings"],Co={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},or={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string",visualState:"'default' | 'sidebar-open' | 'active'"}},pn={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"}},Ue={customIntegrations:{validate:Ea,help:Sa()},customTrayButtons:{validate:wa,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(or))},url:{validate:function(r){return typeof r=="string"},help:"url should be a string"},baseUrl:{validate:function(r){return typeof r=="string"},help:"baseUrl should be a string"},token:{validate:function(r){return typeof r=="string"},help:"token should be a string",queryString:"t"},dailyConfig:{validate:function(r,e){try{return e.validateDailyConfig(r),!0}catch(t){console.error("Failed to validate dailyConfig",t)}return!1},help:"Unsupported dailyConfig. Check error logs for detailed info."},reactNativeConfig:{validate:function(r){return ka(r,Co)},help:"reactNativeConfig should look like ".concat(JSON.stringify(Co),", all fields optional")},lang:{validate:function(r){return["da","de","en-us","en","es","fi","fr","it","jp","ka","nl","no","pl","pt","pt-BR","ru","sv","tr","user"].includes(r)},help:"language not supported. Options are: da, de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sv, tr, user"},userName:!0,userData:{validate:function(r){try{return ga(r),!0}catch(e){return console.error(e),!1}},help:"invalid userData type provided"},startVideoOff:!0,startAudioOff:!0,allowLocalVideo:!0,allowLocalAudio:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(r,e){if(typeof r=="boolean")return e._preloadCache.allowLocalVideo=r,!0;var t;if(r instanceof MediaStreamTrack)e._sharedTracks.videoTrack=r,t={customTrack:Te};else{if(delete e._sharedTracks.videoTrack,typeof r!="string")return console.error("videoSource must be a MediaStreamTrack, boolean, or a string"),!1;t={deviceId:r}}return e._updatePreloadCacheInputSettings({video:{settings:t}},!1),!0}},audioSource:{validate:function(r,e){if(typeof r=="boolean")return e._preloadCache.allowLocalAudio=r,!0;var t;if(r instanceof MediaStreamTrack)e._sharedTracks.audioTrack=r,t={customTrack:Te};else{if(delete e._sharedTracks.audioTrack,typeof r!="string")return console.error("audioSource must be a MediaStreamTrack, boolean, or a string"),!1;t={deviceId:r}}return e._updatePreloadCacheInputSettings({audio:{settings:t}},!1),!0}},subscribeToTracksAutomatically:{validate:function(r,e){return e._preloadCache.subscribeToTracksAutomatically=r,!0}},theme:{validate:function(r){var e=["accent","accentText","background","backgroundAccent","baseText","border","mainAreaBg","mainAreaBgAccent","mainAreaText","supportiveText"],t=function(n){for(var i=0,s=Object.keys(n);i<s.length;i++){var a=s[i];if(!e.includes(a))return console.error('unsupported color "'.concat(a,'". Valid colors: ').concat(e.join(", "))),!1;if(!n[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(n[a],'"')),!1}return!0};return $(r)==="object"&&("light"in r&&"dark"in r||"colors"in r)?"light"in r&&"dark"in r?"colors"in r.light?"colors"in r.dark?t(r.light.colors)&&t(r.dark.colors):(console.error('Dark theme is missing "colors" property.',r),!1):(console.error('Light theme is missing "colors" property.',r),!1):t(r.colors):(console.error('Theme must contain either both "light" and "dark" properties, or "colors".',r),!1)},help:"unsupported theme configuration. Check error logs for detailed info."},layoutConfig:{validate:function(r){if("grid"in r){var e=r.grid;if("maxTilesPerPage"in e){if(!Number.isInteger(e.maxTilesPerPage))return console.error("grid.maxTilesPerPage should be an integer. You passed ".concat(e.maxTilesPerPage,".")),!1;if(e.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 e){if(!Number.isInteger(e.minTilesPerPage))return console.error("grid.minTilesPerPage should be an integer. You passed ".concat(e.minTilesPerPage,".")),!1;if(e.minTilesPerPage<1)return console.error("grid.minTilesPerPage can't be lower than 1."),!1;if("maxTilesPerPage"in e&&e.minTilesPerPage>e.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(r){return va(r,{allowAllParticipantsKey:!1})},help:_a({allowAllParticipantsKey:!1})},sendSettings:{validate:function(r,e){return!!function(t,n){try{return n.validateUpdateSendSettings(t),!0}catch(i){return console.error("Failed to validate send settings",i),!1}}(r,e)&&(e._preloadCache.sendSettings=r,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(r,e){var t;return!!ya(r)&&(e._inputSettings||(e._inputSettings={}),ba(r,(t=e.properties)===null||t===void 0?void 0:t.dailyConfig,e._sharedTracks),e._updatePreloadCacheInputSettings(r,!0),!0)},help:fn()},layout:{validate:function(r){return r==="custom-v1"||r==="browser"||r==="none"},help:'layout may only be set to "custom-v1"',queryString:"layout"},emb:{queryString:"emb"},embHref:{queryString:"embHref"},dailyJsVersion:{queryString:"dailyJsVersion"},proxy:{queryString:"proxy"},strictMode:!0,allowMultipleCallInstances:!0},$t={styles:{validate:function(r){for(var e in r)if(e!=="cam"&&e!=="screen")return!1;if(r.cam){for(var t in r.cam)if(t!=="div"&&t!=="video")return!1}if(r.screen){for(var n in r.screen)if(n!=="div"&&n!=="video")return!1}return!0},help:"styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }"},setSubscribedTracks:{validate:function(r,e){if(e._preloadCache.subscribeToTracksAutomatically)return!1;var t=[!0,!1,"staged"];if(t.includes(r)||!V()&&r==="avatar")return!0;var n=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"],i=function(s){var a=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var l in s)if(l==="custom"){if(!t.includes(s[l])&&!i(s[l],!0))return!1}else{var d=!a&&!n.includes(l),h=!t.includes(s[l]);if(d||h)return!1}return!0};return i(r)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(V()?"":" | '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(r){return r===!1},help:"setScreenShare must be false, as it's only meant for stopping remote participants' screen shares"},eject:!0,updatePermissions:{validate:function(r){for(var e=0,t=Object.entries(r);e<t.length;e++){var n=ee(t[e],2),i=n[0],s=n[1];switch(i){case"hasPresence":if(typeof s!="boolean")return!1;break;case"canSend":if(s instanceof Set||s instanceof Array||Array.isArray(s)){var a,l=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],d=bo(s);try{for(d.s();!(a=d.n()).done;){var h=a.value;if(!l.includes(h))return!1}}catch(S){d.e(S)}finally{d.f()}}else if(typeof s!="boolean")return!1;(s instanceof Array||Array.isArray(s))&&(r.canSend=new Set(s));break;case"canReceive":var f=ee(pa.validateJSONObject(s),2),y=f[0],T=f[1];if(!y)return console.error(T),!1;break;case"canAdmin":if(s instanceof Set||s instanceof Array||Array.isArray(s)){var k,v=["participants","streaming","transcription"],g=bo(s);try{for(g.s();!(k=g.n()).done;){var _=k.value;if(!v.includes(_))return!1}}catch(S){g.e(S)}finally{g.f()}}else if(typeof s!="boolean")return!1;(s instanceof Array||Array.isArray(s))&&(r.canAdmin=new Set(s));break;default:return!1}}return!0},help:"updatePermissions can take hasPresence, canSend, canReceive, and canAdmin permissions. hasPresence must be a boolean. canSend can be a boolean or an Array or Set of media types (video, audio, screenVideo, screenAudio, customVideo, customAudio). canReceive must be an object specifying base, byUserId, and/or byParticipantId fields (see documentation for more details). canAdmin can be a boolean or an Array or Set of admin types (participants, streaming, transcription)."}};Promise.any||(Promise.any=function(){var r=L(function*(e){return new Promise(function(t,n){var i=[];e.forEach(function(s){return Promise.resolve(s).then(function(a){t(a)}).catch(function(a){i.push(a),i.length===e.length&&n(i)})})})});return function(e){return r.apply(this,arguments)}}());var cu=function(){function r(o){var u,c,p,m,b,C,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(ae(this,r),p=this,m=ve(m=r),Se(c=sr(p,fa()?Reflect.construct(m,[],ve(p).constructor):m.apply(p,b)),"startListeningForDeviceChanges",function(){Zl(c.handleDeviceChange)}),Se(c,"stopListeningForDeviceChanges",function(){eu(c.handleDeviceChange)}),Se(c,"handleDeviceChange",function(F){F=F.map(function(U){return JSON.parse(JSON.stringify(U))}),c.emitDailyJSEvent({action:"available-devices-updated",availableDevices:F})}),Se(c,"handleNativeAppStateChange",function(){var F=L(function*(U){if(U==="destroyed")return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield c.destroy());var ye=U==="active";c.disableReactNativeAutoDeviceManagement("video")||(ye?c.camUnmutedBeforeLosingNativeActiveState&&c.setLocalVideo(!0):(c.camUnmutedBeforeLosingNativeActiveState=c.localVideo(),c.camUnmutedBeforeLosingNativeActiveState&&c.setLocalVideo(!1)))});return function(U){return F.apply(this,arguments)}}()),Se(c,"handleNativeAudioFocusChange",function(F){c.disableReactNativeAutoDeviceManagement("audio")||(c._hasNativeAudioFocus=F,c.toggleParticipantAudioBasedOnNativeAudioFocus(),c._hasNativeAudioFocus?c.micUnmutedBeforeLosingNativeAudioFocus&&c.setLocalAudio(!0):(c.micUnmutedBeforeLosingNativeAudioFocus=c.localAudio(),c.setLocalAudio(!1)))}),Se(c,"handleNativeSystemScreenCaptureStop",function(){c.stopScreenShare()}),!Ar()&&!V())throw new Error("WebRTC not supported or suppressed");if(c.strictMode=O.strictMode===void 0||O.strictMode,c.allowMultipleCallInstances=(u=O.allowMultipleCallInstances)!==null&&u!==void 0&&u,Object.keys(Ve).length&&(c._logDuplicateInstanceAttempt(),!c.allowMultipleCallInstances)){if(c.strictMode)throw new Error("Duplicate DailyIframe instances are not allowed");console.warn("Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`")}if(window._daily||(window._daily={pendings:[],instances:{}}),c.callClientId=cr(),Ve[(C=c).callClientId]=C,window._daily.instances[c.callClientId]={},c._sharedTracks={},window._daily.instances[c.callClientId].tracks=c._sharedTracks,O.dailyJsVersion=r.version(),c._iframe=o,c._callObjectMode=O.layout==="none"&&!c._iframe,c._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},O.showLocalVideo!==void 0?c._callObjectMode?console.error("showLocalVideo is not available in call object mode"):c._showLocalVideo=!!O.showLocalVideo:c._showLocalVideo=!0,O.showParticipantsBar!==void 0?c._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):c._showParticipantsBar=!!O.showParticipantsBar:c._showParticipantsBar=!0,O.customIntegrations!==void 0?c._callObjectMode?console.error("customIntegrations is not available in call object mode"):c._customIntegrations=O.customIntegrations:c._customIntegrations={},O.customTrayButtons!==void 0?c._callObjectMode?console.error("customTrayButtons is not available in call object mode"):c._customTrayButtons=O.customTrayButtons:c._customTrayButtons={},O.activeSpeakerMode!==void 0?c._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):c._activeSpeakerMode=!!O.activeSpeakerMode:c._activeSpeakerMode=!1,O.receiveSettings?c._callObjectMode?c._receiveSettings=O.receiveSettings:console.error("receiveSettings is only available in call object mode"):c._receiveSettings={},c.validateProperties(O),c.properties=j({},O),c._inputSettings||(c._inputSettings={}),c._callObjectLoader=c._callObjectMode?new $l(c.callClientId):null,c._callState=Zr,c._isPreparingToJoin=!1,c._accessState={access:Yt},c._meetingSessionSummary={},c._finalSummaryOfPrevSession={},c._meetingSessionState=Lr(wo,c._callObjectMode),c._nativeInCallAudioMode=So,c._participants={},c._isScreenSharing=!1,c._participantCounts=Eo,c._rmpPlayerState={},c._waitingParticipants={},c._network={threshold:"good",quality:100,networkState:"unknown",stats:{}},c._activeSpeaker={}
vendor: 5,180 bytes, line 25
25,c._localAudioLevel=0,c._isLocalAudioLevelObserverRunning=!1,c._remoteParticipantsAudioLevel={},c._isRemoteParticipantsAudioLevelObserverRunning=!1,c._maxAppMessageSize=Cr,c._messageChannel=V()?new Vl:new ql,c._iframe&&(c._iframe.requestFullscreen?c._iframe.addEventListener("fullscreenchange",function(){document.fullscreenElement===c._iframe?(c.emitDailyJSEvent({action:_t}),c.sendMessageToCallMachine({action:_t})):(c.emitDailyJSEvent({action:St}),c.sendMessageToCallMachine({action:St}))}):c._iframe.webkitRequestFullscreen&&c._iframe.addEventListener("webkitfullscreenchange",function(){document.webkitFullscreenElement===c._iframe?(c.emitDailyJSEvent({action:_t}),c.sendMessageToCallMachine({action:_t})):(c.emitDailyJSEvent({action:St}),c.sendMessageToCallMachine({action:St}))})),V()){var I=c.nativeUtils();I.addAudioFocusChangeListener&&I.removeAudioFocusChangeListener&&I.addAppStateChangeListener&&I.removeAppStateChangeListener&&I.addSystemScreenCaptureStopListener&&I.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),c._hasNativeAudioFocus=!0,I.addAudioFocusChangeListener(c.handleNativeAudioFocusChange),I.addAppStateChangeListener(c.handleNativeAppStateChange),I.addSystemScreenCaptureStopListener(c.handleNativeSystemScreenCaptureStop)}return c._callObjectMode&&c.startListeningForDeviceChanges(),c._messageChannel.addListenerForMessagesFromCallMachine(c.handleMessageFromCallMachine,c.callClientId,c),c}return ar(r,Dt),ce(r,[{key:"destroy",value:(Un=L(function*(){var o;try{yield this.leave()}catch{}var u=this._iframe;if(u){var c=u.parentElement;c&&c.removeChild(u)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),V()){var p=this.nativeUtils();p.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),p.removeAppStateChangeListener(this.handleNativeAppStateChange),p.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete Ve[this.callClientId],!((o=window)===null||o===void 0||(o=o._daily)===null||o===void 0)&&o.instances&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)}),function(){return Un.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(o){var u=o.bodyClass,c=o.cssFile,p=o.cssText;return q(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(c),bodyClass:u,cssText:p}),this}},{key:"iframe",value:function(){return q(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return fe(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return fe(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(o,u){for(var c in u){if(!$t[c])throw new Error("unrecognized updateParticipant property ".concat(c));if($t[c].validate&&!$t[c].validate(u[c],this,this._participants[o]))throw new Error($t[c].help)}}},{key:"updateParticipant",value:function(o,u){return this._participants.local&&this._participants.local.session_id===o&&(o="local"),o&&u&&(this.validateParticipantProperties(o,u),this.sendMessageToCallMachine({action:"update-participant",id:o,properties:u})),this}},{key:"updateParticipants",value:function(o){var u=this._participants.local&&this._participants.local.session_id;for(var c in o)c===u&&(c="local"),c&&o[c]&&this.validateParticipantProperties(c,o[c]);return this.sendMessageToCallMachine({action:"update-participants",participants:o}),this}},{key:"updateWaitingParticipant",value:(Vn=L(function*(){var o=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(fe(this._callObjectMode,"updateWaitingParticipant()"),W(this._callState,"updateWaitingParticipant()"),typeof u!="string"||$(c)!=="object")throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise(function(p,m){o.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:u,updates:c},function(b){b.error&&m(b.error),b.id||m(new Error("unknown error in updateWaitingParticipant()")),p({id:b.id})})})}),function(){return Vn.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(qn=L(function*(){var o=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(fe(this._callObjectMode,"updateWaitingParticipants()"),W(this._callState,"updateWaitingParticipants()"),$(u)!=="object")throw new Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise(function(c,p){o.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updates
25ById:u},function(m){m.error&&p(m.error),m.ids||p(new Error("unknown error in updateWaitingParticipants()")),c({ids:m.ids})})})}),function(){return qn.apply(this,arguments)})},{key:"requestAccess",value:(Fn=L(function*(){var o=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=u.access,p=c===void 0?{level:ts}:c,m=u.name,b=m===void 0?"":m;return fe(this._callObjectMode,"requestAccess()"),W(this._callState,"requestAccess()"),new Promise(function(C,O){o.sendMessageToCallMachine({action:"daily-method-request-access",access:p,name:b},function(I){I.error&&O(I.error),I.access||O(new Error("unknown error in requestAccess()")),C({access:I.access,granted:I.granted})})})}),function(){return Fn.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(o){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return"forceDiscardTrack"in u&&(V()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),u={}):o&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),u={})),this.sendMessageToCallMachine({action:"local-audio",state:o,options:u}),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(o){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:o}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(o){return this.sendMessageToCallMachine({action:"local-video",state:o}),this}},{key:"_setAllowLocalAudio",value:function(o){if(this._preloadCache.allowLocalAudio=o,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-audio",state:o}),this}},{key:"_setAllowLocalVideo",value:function(o){if(this._preloadCache.allowLocalVideo=o,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-video",state:o}),this}},{key:"getReceiveSettings",value:(xn=L(function*(o){var u=this,c=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,p=c!==void 0&&c;if(fe(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch($(o)){case"string":return new Promise(function(m){u.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:o,showInheritedValues:p},function(b){m(b.receiveSettings)})});case"undefined":return this._receiveSettings;default:throw new Error('first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments')}}),function(o){return xn.apply(this,arguments)})},{key:"updateReceiveSettings",value:(Rn=L(function*(o){var u=this;if(fe(this._callObjectMode,"updateReceiveSettings()"),!va(o,{allowAllParticipantsKey:!0}))throw new Error(_a({allowAllParticipantsKey:!0}));return W(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise(function(c){u.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:o},function(p){c({receiveSettings:p.receiveSettings})})})}),function(o){return Rn.apply(this,arguments)})},{key:"_prepInputSettingsForSharing",value:function(o,u){if(o){var c={};if(o.audio){var p,m,b;o.audio.settings&&(!Object.keys(o.audio.settings).length&&u||(c.audio={settings:j({},o.audio.settings)})),u&&(p=c.audio)!==null&&p!==void 0&&(p=p.settings)!==null&&p!==void 0&&p.customTrack&&(c.audio.settings={customTrack:this._sharedTracks.audioTrack});var C=((m=o.audio.processor)===null||m===void 0?void 0:m.type)==="none"&&((b=o.audio.processor)===null||b===void 0?void 0:b._isDefaultWhenNone);if(o.audio.processor&&!C){var O=j({},o.audio.processor);delete O._isDefaultWhenNone,c.audio=j(j({},c.audio),{},{processor:O})}}if(o.video){var I,F,U;o.video.settings&&(!Object.keys(o.video.settings).length&&u||(c.video={settings:j({},o.video.settings)})),u&&(I=c.video)!==null&&I!==void 0&&(I=I.settings)!==null&&I!==void 0&&I.customTrack&&(c.video.settings={customTrack:this._sharedTracks.videoTrack});var ye=((F=o.video.processor)===null||F===void 0?void 0:F.type)==="none"&&((U=o.video.processor)===null||U===void 0?void 0:U._isDefaultWhenNone);if(o.video.processor&&!ye){var xe=j({},o.video.processor);delete xe._isDefaultWhenNone,c.video=j(j({},c.video),{},{processor:xe})}}return c}}},{key:"getInputSettings",value:function(){var o=this;return q(),new Promise(function(u){u(o._getInputSettings())})}},{key:"_getInputSettings",value:function(){var o,u,c,p,m,b,C={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(o=((c=this._inputSettings)===null||c===void 0?void 0:c.video)||C,u=((p=this._inputSettings)===null||p===void 0?void 0:p.audio)||C):(o=((m=this._preloadCache)===null||m===void 0||(m=m.inputSettings)===null||m===void 0?void 0:m.video)||C,u=((b=this._preloadCache)===null||b===void 0||(b=b.inputSettings)===null||b===void 0?void 0:b.audio)||C);var O={audio:u,video:o};return this._prepInputSettingsForSharing(O,!0)}},{key:"_updatePreloadCacheInputSettings",value:function(o,u){var c=this._inputSettings||{},p={};if(o.video){var m,b,C;p.video={},o.video.settings?(p.video.settings={},u||o.video.settings.customTrack||(C=c.video)===null||C===void 0||!C.settings?p.video.settings=o.video.settings:p.video.settings=j(j({},c.video.settings),o.video.settings),Object.keys(p.video.settings).length||delete p.video.settings):(m=c.video)!==null&&m!==void 0&&m.settings&&(p.video.settings=c.video.settings),o.video.processor?p.video.processor=o.video.processor:(b=c.video)!==null&&b!==void 0&&b.processor&&(p.video.processor=c.video.processor)}else c.video&&(p.video=c.video);if(o.audio){var O,I,F;p.audio={},o.audio.settings?(p.audio.settings={},u||o.audio.settings.customTrack||(F=c.audio)===null||F===void 0||!F.settings?p.audio.settings=o.audio.settings:p.audio.settings=j(j({},c.audio.settings),o.audio.settings),Object.keys(p.audio.settings).length||delete p.audio.settings):(O=c.audio)!==null&&O!==void 0&&O.settings&&(p.audio.settings=c.audio.settings),o.audio.processor?p.audio.processor=o.audio.processor:(I=c.audio)!==null&&I!==void 0&&I.processor&&(p.audio.processor=c.audio.processor)}else c.audio&&(p.audio=c.audio);this._maybeUpdateInputSettings(p)}},{key:"_devicesFromInputSettings",value:function(o){var u,c,p=(o==null||(u=o.video)===null||u===void 0||(u=u.settings)===null||u===void 0?void 0:u.deviceId)||null,m=(o==null||(c=o.audio)===null||c===void 0||(c=c.settings)===null||c===void 0?void 0:c.deviceId)||null,b=this._preloadCache.outputDeviceId||null;return{camera:p?{deviceId:p}:{},mic:m?{deviceId:m}:{},speaker:b?{deviceId:b}:{}}}},{key:"updateInputSettings",value:(Nn=L(function*(o){var u=this;return q(),ya(o)?o.video||o.audio?(ba(o,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(o,!0),this._getInputSettings()):new Promise(function(c,p){u.sendMessageToCallMachine({action:"update-input-sett
25ings",inputSettings:o},function(m){if(m.error)p(m.error);else{if(m.returnPreloadCache)return u._updatePreloadCacheInputSettings(o,!0),void c(u._getInputSettings());u._maybeUpdateInputSettings(m.inputSettings),c(u._prepInputSettingsForSharing(m.inputSettings,!0))}})})):this._getInputSettings():(console.error(fn()),Promise.reject(fn()))}),function(o){return Nn.apply(this,arguments)})},{key:"setBandwidth",value:function(o){var u=o.kbs,c=o.trackConstraints;if(q(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:u,trackConstraints:c}),this}},{key:"getDailyLang",value:function(){var o=this;if(q(),this._callMachineInitialized)return new Promise(function(u){o.sendMessageToCallMachine({action:"get-daily-lang"},function(c){delete c.action,delete c.callbackStamp,u(c)})})}},{key:"setDailyLang",value:function(o){return q(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:o}),this}},{key:"setProxyUrl",value:function(o){return this.sendMessageToCallMachine({action:"set-proxy-url",proxyUrl:o}),this}},{key:"setIceConfig",value:function(o){return this.sendMessageToCallMachine({action:"set-ice-config",iceConfig:o}),this}},{key:"meetingSessionSummary",value:function(){return[Ie,we].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(Ln=L(function*(){var o=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),W(this._callState,"getMeetingSession()"),new Promise(function(u){o.sendMessageToCallMachine({action:"get-meeting-session"},function(c){delete c.action,delete c.callbackStamp,u(c)})})}),function(){return Ln.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return W(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(o){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"replace";fe(this._callObjectMode,"setMeetingSessionData()"),W(this._callState,"setMeetingSessionData");try{(function(c,p){new Ul({data:c,mergeStrategy:p})})(o,u)}catch(c){throw console.error(c),c}try{this.sendMessageToCallMachine({action:"set-session-data",data:o,mergeStrategy:u})}catch(c){throw new Error("Error setting meeting session data: ".concat(c))}}},{key:"setUserName",value:function(o,u){var c=this;return this.properties.userName=o,new Promise(function(p){c.sendMessageToCallMachine({action:"set-user-name",name:o??"",thisMeetingOnly:V()||!!u&&!!u.thisMeetingOnly},function(m){delete m.action,delete m.callbackStamp,p(m)})})}},{key:"setUserData",value:(jn=L(function*(o){var u=this;try{ga(o)}catch(c){throw console.error(c),c}if(this.properties.userData=o,this._callMachineInitialized)return new Promise(function(c){try{u.sendMessageToCallMachine({action:"set-user-data",userData:o},function(p){delete p.action,delete p.callbackStamp,c(p)})}catch(p){throw new Error("Error setting user data: ".concat(p))}})}),function(o){return jn.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(o){if(o&&(o<100||typeof o!="number"))throw new Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(o){var u=this;if(typeof AudioWorkletNode>"u"&&!V())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(o),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise(function(c,p){u.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:o},function(m){u._isLocalAudioLevelObserverRunning=!m.error,m.error?p({error:m.error}):c()})});this._preloadCache.localAudioLevelObserver={enabled:!0,interval:o}}},{key:"isLocalAudioLevelObserverRunning",value:function(){return this._isLocalAudioLevelObserverRunning}},{key:"stopLocalAudioLevelObserver",value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-local-audio-level-observer"})}},{key:"startRemoteParticipantsAudioLevelObserver",value:function(o){var u=this;if(this.validateAudioLevelInterval(o),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise(function(c,p){u.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:o},function(m){u._isRemoteParticipantsAudioLevelObserverRunning=!m.error,m.error?p({error:m.error}):c()})});this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:o}}},{key:"isRemoteParticipantsAudioLevelObserverRunning",value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:"stopRemoteParticipantsAudioLevelObserver",value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-remote-participants-audio-level-observer"})}},{key:"startCamera",value:(Dn=L(function*(){var o=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(fe(this._callObjectMode,"startCamera()"),Dr(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or set
25LocalVideo() instead?"),this.needsLoad())try{yield this.load(u)}catch(c){return Promise.reject(c)}else{if(this._didPreAuth){if(u.url&&u.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(u.token&&u.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(u),this.properties=j(j({},this.properties),u)}return new Promise(function(c){o._preloadCache.inputSettings=o._prepInputSettingsForSharing(o._inputSettings,!1),o.sendMessageToCallMachine({action:"start-camera",properties:tt(o.properties,o.callClientId),preloadCache:tt(o._preloadCache,o.callClientId)},function(p){c({camera:p.camera,mic:p.mic,speaker:p.speaker})})})}),function(){return Dn.apply(this,arguments)})},{key:"validateCustomTrack",value:function(o,u,c){if(c&&c.length>50)throw new Error("Custom track `trackName` must not be more than 50 characters");if(u&&u!=="music"&&u!=="speech"&&!(u instanceof Object))throw new Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(c&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(c))throw new Error("Custom track `trackName` must not match a track name already used by daily: cam-audio, cam-video, customVideoDefaults, screen-video, screen-audio, rmpAudio, rmpVideo");if(!(o instanceof MediaStreamTrack))throw new Error("Custom tracks provided must be instances of MediaStreamTrack")}},{key:"startCustomTrack",value:function(){var o=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{track,mode,trackName,ignoreAudioLevel};return q(),W(this._callState,"startCustomTrack()"),this.validateCustomTrack(u.track,u.mode,u.trackName),new Promise(function(c,p){o._sharedTracks.customTrack=u.track,u.track=Te,o.sendMessageToCallMachine({action:"start-custom-track",properties:u},function(m){m.error?p({error:m.error}):c(m.mediaTag)})})}},{key:"stopCustomTrack",value:function(o){var u=this;return q(),W(this._callState,"stopCustomTrack()"),new Promise(function(c){u.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:o},function(p){c(p.mediaTag)})})}},{key:"setCamera",value:function(o){var u=this;return yt(),Jt(this._callMachineInitialized,"setCamera()"),new Promise(function(c){u.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:o},function(p){c({device:p.device})})})}},{key:"setAudioDevice",value:(In=L(function*(o){return yt(),this.nativeUtils().setAudioDevice(o),{deviceId:yield this.nativeUtils().getAudioDevice()}}),function(o){return In.apply(this,arguments)})},{key:"cycleCamera",value:function(){var o=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise(function(c){o.sendMessageToCallMachine({action:"cycle-camera",properties:u},function(p){c({device:p.device})})})}},{key:"cycleMic",value:function(){var o=this;return q(),new Promise(function(u){o.sendMessageToCallMachine({action:"cycle-mic"},function(c){u({device:c.device})})})}},{key:"getCameraFacingMode",value:function(){var o=this;return yt(),new Promise(function(u){o.sendMessageToCallMachine({action:"get-camera-facing-mode"},function(c){u(c.facingMode)})})}},{key:"setInputDevicesAsync",value:(et=L(function*(o){var u=this,c=o.audioDeviceId,p=o.videoDeviceId,m=o.audioSource,b=o.videoSource;if(q(),m!==void 0&&(c=m),b!==void 0&&(p=b),typeof c=="boolean"&&(this._setAllowLocalAudio(c),c=void 0),typeof p=="boolean"&&(this._setAllowLocalVideo(p),p=void 0),!c&&!p)return yield this.getInputDevices();var C={};return c&&(c instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=c,c=Te,C.audio={settings:{customTrack:c}}):(delete this._sharedTracks.audioTrack,C.audio={settings:{deviceId:c}})),p&&(p instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=p,p=Te,C.video={settings:{customTrack:p}}):(delete this._sharedTracks.videoTrack,C.video={settings:{deviceId:p}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(C,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise(function(O){u.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:c,videoDeviceId:p},function(I){if(delete I.action,delete I.callbackStamp,I.returnPreloadCache)return u._updatePreloadCacheInputSettings(C,!1),void O(u._devicesFromInputSettings(u._inputSettings));O(I)})})}),function(o){return et.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(Ze=L(function*(o){var u=this,c=o.outputDeviceId;if(q(),!c||typeof c!="string")throw new Error("outputDeviceId must be provided and must be a valid device id");return this._preloadCache.outputDeviceId=c,this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(p,m){u.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:c},function(b){if(delete b.action,delete b.callbackStamp,b.error){var C=new Error(b.error.message);return C.type=b.error.type,void m(C)}b.returnPreloadCache?p(u._devicesFromInputSettings(u._inputSettings)):p(b)})})}),function(o){return Ze.apply(this,arguments)})},{key:"getInputDevices",value:(Xe=L(function*(){var o=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(u){o.sendMessageToCallMachine({action:"get-input-devices"},function(c){c.returnPreloadCache?u(o._devicesFromInputSettings(o._inputSettings)):u({camera:c.camera,mic:c.mic,speaker:c.speaker})})})}),function(){return Xe.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return yt(),this._nativeInCallAudioMode}}
vendor: 12,102 bytes, lines 25-30
25,{key:"setNativeInCallAudioMode",value:function(o){if(yt(),[So,au].includes(o)){if(o!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=o,!this.disableReactNativeAutoDeviceManagement("audio")&&zt(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",o)}},{key:"preAuth",value:(ie=L(function*(){var o=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(fe(this._callObjectMode,"preAuth()"),Dr(this._callState,this._isPreparingToJoin,"preAuth()"),this.needsLoad()&&(yield this.load(u)),!u.url)throw new Error("preAuth() requires at least a url to be provided");return this.validateProperties(u),this.properties=j(j({},this.properties),u),new Promise(function(c,p){o._preloadCache.inputSettings=o._prepInputSettingsForSharing(o._inputSettings,!1),o.sendMessageToCallMachine({action:"daily-method-preauth",properties:tt(o.properties,o.callClientId),preloadCache:tt(o._preloadCache,o.callClientId)},function(m){return m.error?p(m.error):m.access?(o._didPreAuth=!0,void c({access:m.access})):p(new Error("unknown error in preAuth()"))})})}),function(){return ie.apply(this,arguments)})},{key:"load",value:(B=L(function*(o){var u=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");if(o&&(this.validateProperties(o),this.properties=j(j({},this.properties),o)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");return this._updateCallState(Hi),this.emitDailyJSEvent({action:cs}),this._callObjectMode?new Promise(function(c,p){u._callObjectLoader.cancel();var m=Date.now();u._callObjectLoader.load(u.properties.dailyConfig,function(b){u._bundleLoadTime=b?"no-op":Date.now()-m,u._updateCallState(Qi),b&&u.emitDailyJSEvent({action:tn}),c()},function(b,C){if(u.emitDailyJSEvent({action:ls}),!C){u._updateCallState(we),u.resetMeetingDependentVars();var O={action:an,errorMsg:b.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:b,bundleUrl:Qt(u.properties.dailyConfig)}}};u._maybeSendToSentry(O),u.emitDailyJSEvent(O),p(b.msg)}})}):(this._iframe.src=Fo(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise(function(c,p){u._loadedCallback=function(m){u._callState!==we?(u._updateCallState(Qi),(u.properties.cssFile||u.properties.cssText)&&u.loadCss(u.properties),c()):p(m)}}))}}),function(o){return B.apply(this,arguments)})},{key:"join",value:(x=L(function*(){var o=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();var c=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(u)}catch(p){return this.updateIsPreparingToJoin(!1),Promise.reject(p)}}else{if(c=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(u.url&&u.url!==this.properties.url)return console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(u.token&&u.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(u.url&&!this._callObjectMode&&u.url&&u.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(u.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(u),this.properties=j(j({},this.properties),u)}return u.showLocalVideo!==void 0&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!u.showLocalVideo),u.showParticipantsBar!==void 0&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!u.showParticipantsBar),this._callState===je||this._callState===rr?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(rr,!1),this.emitDailyJSEvent({action:hs}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:"join-meeting",properties:tt(this.properties,this.callClientId),preloadCache:tt(this._preloadCache,this.callClientId)}),new Promise(function(p,m){o._joinedCallback=function(b,C){if(o._callState!==we){if(o._updateCallState(je),b)for(var O in b){if(o._callObjectMode){var I=o._callMachine().store;co(b[O],I),lo(b[O],I),uo(b[O],o._participants[O],I)}o._participants[O]=j({},b[O]),o.toggleParticipantAudioBasedOnNativeAudioFocus()}c&&o.loadCss(o.properties),p(b)}else m(C)}}))}),function(){return x.apply(this,arguments)})},{key:"leave",value:(D=L(function*(){var o=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise(function(u){o._callState===Ie||o._callState===we?u():o._callObjectLoader&&!o._callObjectLoader.loaded?(o._callObjectLoader.cancel(),o._updateCallState(Ie),o.resetMeetingDependentVars(),o.emitDailyJSEvent({action:Ie}),u()):(o._resolveLeave=u,o.sendMessageToCallMachine({action:"leave-meeting"}))})}),function(){return D.apply(this,arguments)})},{key:"startScreenShare",value:(w=L(function*(){var o=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Jt(this._callMachineInitialized,"startScreenShare()"),u.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",u.screenVideoSendSettings),u.mediaStream&&(this._sharedTracks.screenMediaStream=u.mediaStream,u.mediaStream=Te),typeof DailyNativeUtils<"u"&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var c=this.nativeUtils();if(yield c.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:sn,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});c.setSystemScreenCaptureStartCallback(function(){c.setSystemScreenCaptureStartCallback(null),o.sendMessageToCallMachine({action:Xi,captureOptions:u})}),c.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:Xi,captureOptions:u})}),function(){return w.apply(this,arguments)})},{key:"stopScreenShare",value:function(){Jt(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=o.type;if(u&&u!=="cloud"&&u!=="raw-tracks"&&u!=="local")throw new Error("invalid type: ".concat(u,", allowed values 'cloud', 'raw-tracks', or 'local'"));this.sendMessageToCallMachine(j({action:"local-recording-start"},o))}},{key:"updateRecording",value:function(o){var u=o.layout,c=u===void 0?{preset:"default"}:u,p=o.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:c,instanceId:p})}},{key:"stopRecording",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(j({action:"local-recording-stop"},o))}},{key:"startLiveStreaming",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(j({action:"daily-method-start-live-streaming"},o))}},{key:"updateLiveStreaming",value:function(o){var u=o.layout,c=u===void 0?{preset:"default"}:u,p=o.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:c,instanceId:p})}},{key:"addLiveStreamingEndpoints",value:function(o){var u=o.endpoints,c=o.instanceId;this.sendMessageToCallMachine({action:Zi,endpointsOp:jl,endpoints:u,instanceId:c})}},{key:"removeLiveStreamingEndpoints",value:function(o){var u=o.endpoints,c=o.instanceId;this.sendMessageToCallMachine({action:Zi,endpointsOp:Ll,endpoints:u,instanceId:c})}},{key:"stopLiveStreaming",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(j({action:"daily-method-stop-live-streaming"},o))}},{key:"validateDailyConfig",value:function(o){o.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(o.camSimulcastEncodings)),o.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),ia()&&o.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(o){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(o){if(!(o instanceof Array||Array.isArray(o)))throw new Error("encodings must be an Array");if(!Po(o.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var p=0;p<o.length;p++){var m=o[p];for(var b in this._validateEncodingLayerHasValidProperties(m),m)if(Ir.includes(b)){if(typeof m[b]!="number")throw new Error("".concat(b," must be a number"));if(u){var C=u[b],O=C.min,I=C.max;if(!Po(m[b],O,I))throw new Error("".concat(b," value not in range. valid range: ").concat(O," to ").concat(I))}}else if(!["active","scalabilityMode"].includes(b))throw new Error("Invalid key ".concat(b,", valid keys are:")+Object.values(Ir));if(c&&!m.hasOwnProperty("maxBitrate"))throw new Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(P=L(function*(o){var u=this,c=o.url,p=o.settings,m=p===void 0?{state:cn.PLAY}:p;try{(function(b){if(typeof b!="string")throw new Error('url parameter must be "string" type')})(c),Mo(m),function(b){for(var C in b)if(!ko.includes(C))throw new Error("Invalid key ".concat(C,", valid keys are: ").concat(ko));b.simulcastEncodings&&this.validateSimulcastEncodings(b.simulcastEncodings,ma,!0)}(m)}catch(b){throw console.error("invalid argument Error: ".concat(b)),console.error(`startRemoteMediaPlayer arguments must be of the form:
26  { url: "playback url",
27  settings?:
28  {state: "play"|"pause", simulcastEncodings?: [{}] } }`),b}return new Promise(function(b,C){u.sendMessageToCallMachine({action:"daily-method-start-remote-media-player",url:c,settings:m},function(O){O.error?C({error:O.error,errorMsg:O.errorMsg}):b({session_id:O.session_id,remoteMediaPlayerState:{state:O.state,settings:O.settings}})})})}),function(o){return P.apply(this,arguments)})},{key:"stopRemoteMediaPlayer",value:(A=L(function*(o){var u=this;if(typeof o!="string")throw new Error(" remotePlayerID must be of type string");return new Promise(function(c,p){u.sendMessageToCallMachine({action:"daily-method-stop-remote-media-player",session_id:o},function(m){m.error?p({error:m.error,errorMsg:m.errorMsg}):c()})})}),function(o){return A.apply(this,arguments)})},{key:"updateRemoteMediaPlayer",value:(S=L(function*(o){var u=this,c=o.session_id,p=o.settings;try{Mo(p)}catch(m){throw console.error("invalid argument Error: ".concat(m)),console.error(`updateRemoteMediaPlayer arguments must be of the form:
29  session_id: "participant session",
30  { settings?: {state: "play"|"pause"} }`),m}return new Promise(function(m,b){u.sendMessageToCallMachine({action:"daily-method-update-remote-media-player",session_id:c,settings:p},function(C){C.error?b({error:C.error,errorMsg:C.errorMsg}):m({session_id:C.session_id,remoteMediaPlayerState:{state:C.state,settings:C.settings}})})})}),function(o){return S.apply(this,arguments)})},{key:"startTranscription",value:function(o){W(this._callState,"startTranscription()"),this.sendMessageToCallMachine(j({action:"daily-method-start-transcription"},o))}},{key:"updateTranscription",value:function(o){if(W(this._callState,"updateTranscription()"),!o)throw new Error("updateTranscription Error: options is mandatory");if($(o)!=="object")throw new Error("updateTranscription Error: options must be object type");if(o.participants&&!Array.isArray(o.participants))throw new Error("updateTranscription 
30Error: participants must be an array");this.sendMessageToCallMachine(j({action:"daily-method-update-transcription"},o))}},{key:"stopTranscription",value:function(o){if(W(this._callState,"stopTranscription()"),o&&$(o)!=="object")throw new Error("stopTranscription Error: options must be object type");if(o&&!o.instanceId)throw new Error('"instanceId" not provided');this.sendMessageToCallMachine(j({action:"daily-method-stop-transcription"},o))}},{key:"startDialOut",value:(_=L(function*(o){var u=this;W(this._callState,"startDialOut()");var c=function(C){if(C){if(!Array.isArray(C))throw new Error("Error starting dial out: audio codec must be an array");if(C.length<=0)throw new Error("Error starting dial out: audio codec array specified but empty");C.forEach(function(O){if(typeof O!="string")throw new Error("Error starting dial out: audio codec must be a string");if(O!=="OPUS"&&O!=="PCMU"&&O!=="PCMA"&&O!=="G722")throw new Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722")})}};if(!o.sipUri&&!o.phoneNumber)throw new Error("Error starting dial out: either a sip uri or phone number must be provided");if(o.sipUri&&o.phoneNumber)throw new Error("Error starting dial out: only one of sip uri or phone number must be provided");
vendor: 6,445 bytes, line 30
30if(o.sipUri){if(typeof o.sipUri!="string")throw new Error("Error starting dial out: sipUri must be a string");if(!o.sipUri.startsWith("sip:"))throw new Error("Error starting dial out: Invalid SIP URI, must start with 'sip:'");if(o.video&&typeof o.video!="boolean")throw new Error("Error starting dial out: video must be a boolean value");(function(C){if(C&&(c(C.audio),C.video)){if(!Array.isArray(C.video))throw new Error("Error starting dial out: video codec must be an array");if(C.video.length<=0)throw new Error("Error starting dial out: video codec array specified but empty");C.video.forEach(function(O){if(typeof O!="string")throw new Error("Error starting dial out: video codec must be a string");if(O!=="H264"&&O!=="VP8")throw new Error("Error starting dial out: video codec must be H264 or VP8")})}})(o.codecs)}if(o.phoneNumber){if(typeof o.phoneNumber!="string")throw new Error("Error starting dial out: phoneNumber must be a string");if(!/^\+\d{1,}$/.test(o.phoneNumber))throw new Error("Error starting dial out: Invalid phone number, must be valid phone number as per E.164");o.codecs&&c(o.codecs.audio)}if(o.callerId){if(typeof o.callerId!="string")throw new Error("Error starting dial out: callerId must be a string");if(o.sipUri)throw new Error("Error starting dial out: callerId not allowed with sipUri")}if(o.displayName){if(typeof o.displayName!="string")throw new Error("Error starting dial out: displayName must be a string");if(o.displayName.length>=200)throw new Error("Error starting dial out: displayName length must be less than 200")}if(o.userId){if(typeof o.userId!="string")throw new Error("Error starting dial out: userId must be a string");if(o.userId.length>36)throw new Error("Error starting dial out: userId length must be less than or equal to 36")}if(To(o),o.permissions&&o.permissions.canReceive){var p=ee(pa.validateJSONObject(o.permissions.canReceive),2),m=p[0],b=p[1];if(!m)throw new Error(b)}if(o.provider){if(o.provider!=="daily")throw new Error("Error: provider can be set only to 'daily', got: ".concat(o.provider));if(o.phoneNumber)throw new Error("Error starting dial out: provider valid only for sipUri, not phoneNumber");console.warn("(pre-beta) provider=daily is currently in pre-beta, things might break!")}return new Promise(function(C,O){u.sendMessageToCallMachine(j({action:"dialout-start"},o),function(I){I.error?O(I.error):C(I)})})}),function(o){return _.apply(this,arguments)})},{key:"stopDialOut",value:function(o){var u=this;return W(this._callState,"stopDialOut()"),new Promise(function(c,p){u.sendMessageToCallMachine(j({action:"dialout-stop"},o),function(m){m.error?p(m.error):c(m)})})}},{key:"sipCallTransfer",value:(g=L(function*(o){var u=this;if(W(this._callState,"sipCallTransfer()"),!o)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return o.useSipRefer=!1,Ao(o,"sipCallTransfer"),To(o),new Promise(function(c,p){u.sendMessageToCallMachine(j({action:eo},o),function(m){m.error?p(m.error):c(m)})})}),function(o){return g.apply(this,arguments)})},{key:"sipRefer",value:(v=L(function*(o){var u=this;if(W(this._callState,"sipRefer()"),!o)throw new Error("sessionId and toEndPoint are mandatory parameter");return o.useSipRefer=!0,Ao(o,"sipRefer"),new Promise(function(c,p){u.sendMessageToCallMachine(j({action:eo},o),function(m){m.error?p(m.error):c(m)})})}),function(o){return v.apply(this,arguments)})},{key:"sendDTMF",value:(k=L(function*(o){var u=this;return W(this._callState,"sendDTMF()"),function(c){var p=c.sessionId,m=c.tones;if(!p||!m)throw new Error("sessionId and tones are mandatory parameter");if(typeof p!="string"||typeof m!="string")throw new Error("sessionId and tones should be of string type");if(m.length>20)throw new Error("tones string must be upto 20 characters");var b=/[^0-9A-D*#]/g,C=m.match(b);if(C&&C[0])throw new Error("".concat(C[0]," is not valid DTMF tone"))}(o),new Promise(function(c,p){u.sendMessageToCallMachine(j({action:"send-dtmf"},o),function(m){m.error?p(m.error):c(m)})})}),function(o){return k.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var o=this;return this._callState!==je?Promise.resolve(j({stats:{latest:{}}},this._network)):new Promise(function(u){o.sendMessageToCallMachine({action:"get-calc-stats"},function(c){u(j(j({},o._network),{},{stats:c.stats}))})})}},{key:"testWebsocketConnectivity",value:(T=L(function*(){var o=this;if(jr(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(u){return Promise.reject(u)}return new Promise(function(u,c){o.sendMessageToCallMachine({action:"test-websocket-connectivity"},function(p){p.error?c(p.error):u(p.results)})})}),function(){return T.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(o){return o?o instanceof MediaStreamTrack?!!ru(o,{isLocalScreenVideo:!1})||(console.error("Video track is not playable. This test needs a live video track."),!1):(console.error("Video track needs to be of type `MediaStreamTrack`."),!1):(console.error("Missing video track. You must provide a video track in order to run this test."),!1)}},{key:"testCallQuality",value:(y=L(function*(){var o=this;q(),fe(this._callObjectMode,"testCallQuality()"),Jt(this._callMachineInitialized,"testCallQuality()",null,!0),Dr(this._callState,this._isPreparingToJoin,"testCallQuality()");var u=this._testCallAlreadyInProgress,c=function(m){u||(o._testCallInProgress=m)};if(c(!0),this.needsLoad())try{var p=this._callState;yield this.load(),this._callState=p}catch(m){return c(!1),Promise.reject(m)}return new Promise(function(m){o.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:o.properties.dailyJsVersion},function(b){var C=b.results,O=C.result,I=Bn(C,ou);if(O==="failed"){var F,U=j({},I);(F=I.error)!==null&&F!==void 0&&F.details?(I.error.details=JSON.parse(I.error.details),U.error=j(j({},U.error),{},{details:j({},U.error.details)}),U.error.details.duringTest="testCallQuality"):(U.error=U.error?j({},U.error):{},U.error.details={duringTest:"testCallQuality"}),o._maybeSendToSentry(U)}c(!1),m(j({result:O},I))})})}),function(){return y.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(f=L(function*(o){var u;
30V()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),u=yield this.testPeerToPeerCallQuality(o)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),u=yield this.testCallQuality());var c={result:u.result,secondsElapsed:u.secondsElapsed};return u.data&&(c.data={maxRTT:u.data.maxRoundTripTime,packetLoss:u.data.avgRecvPacketLoss}),c}),function(o){return f.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(h=L(function*(o){var u=this;if(jr(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(m){return Promise.reject(m)}var c=o.videoTrack,p=o.duration;if(!this._validateVideoTrackForNetworkTests(c))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=c,new Promise(function(m,b){u.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:p},function(C){C.error?b(C.error):m(C.results)})})}),function(o){return h.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){V()?(console.warn("stopTestConnectionQuality() is deprecated: use testPeerToPeerCallQuality() and stopTestPeerToPeerCallQuality() instead"),this.stopTestPeerToPeerCallQuality()):(console.warn("stopTestConnectionQuality() is deprecated: use testCallQuality() and stopTestCallQuality() instead"),this.stopTestCallQuality())}},{key:"stopTestPeerToPeerCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-p2p-call-quality"})}},{key:"testNetworkConnectivity",value:(d=L(function*(o){var u=this;if(jr(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(c){return Promise.reject(c)}if(!this._validateVideoTrackForNetworkTests(o))throw new Error("Video track error");return this._sharedTracks.videoTrackForNetworkConnectivityTest=o,new Promise(function(c,p){u.sendMessageToCallMachine({action:"test-network-connectivity"},function(m){m.error?p(m.error):c(m.results)})})}),function(o){return d.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var o=this;return new Promise(function(u){o._callState===je?o.sendMessageToCallMachine({action:"get-cpu-load-stats"},function(c){u(c.cpuStats)}):u({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})})}},{key:"_validateEncodingLayerHasValidProperties",value:function(o){var u;if(!(((u=Object.keys(o))===null||u===void 0?void 0:u.length)>0))throw new Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(Ir))}},{key:"_validateVideoSendSettings",value:function(o,u){var c=o==="screenVideo"?["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"],p="Video send settings should be either an object or one of the supported presets: ".concat(c.join());if(typeof u=="string"){if(!c.includes(u))throw new Error(p)}else{if($(u)!=="object")throw new Error(p);if(!u.maxQuality&&!u.encodings&&u.allowAdaptiveLayers===void 0)throw new Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(u.maxQuality&&["low","medium","high"].indexOf(u.maxQuality)===-1)throw new Error("maxQuality must be either low, medium or high");if(u.encodings){var m=!1;switch(Object.keys(u.encodings).length){case 1:m=!u.encodings.low;break;case 2:m=!u.encodings.low||!u.encodings.medium;break;case 3:m=!u.encodings.low||!u.encodings.medium||!u.encodings.high;break;default:m=!0}if(m)throw new Error("Encodings must be defined as: low, low and medium, or low, medium and high.");u.encodings.low&&this._validateEncodingLayerHasValidProperties(u.encodings.low),u.encodings.medium&&this._validateEncodingLayerHasValidProperties(u.encodings.medium),u.encodings.high&&this._validateEncodingLayerHasValidProperties(u.encodings.high)}}}},{key:"validateUpdateSendSettings",value:function(o){var u=this;if(!o||Object.keys(o).length===0)throw new Error("Send settings must contain at least information for one track!");
30Object.entries(o).forEach(function(c){var p=ee(c,2),m=p[0],b=p[1];u._validateVideoSendSettings(m,b)})}},{key:"updateSendSettings",value:function(o){var u=this;return this.validateUpdateSendSettings(o),this.needsLoad()?(this._preloadCache.sendSettings=o,{sendSettings:this._preloadCache.sendSettings}):new Promise(function(c,p){u.sendMessageToCallMachine({action:"update-send-settings",sendSettings:o},function(m){m.error?p(m.error):c(m.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 q(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(o){return q(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:o}),this}},{key:"activeSpeakerMode",value:function(){return q(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(o){return W(this._callState,"setSubscribeToTracksAutomatically()","Use the subscribeToTracksAutomatically configuration property."),this._preloadCache.subscribeToTracksAutomatically=o,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:o}),this}},{key:"enumerateDevices",value:(l=L(function*(){var o=this;if(this._callObjectMode){var u=yield navigator.mediaDevices.enumerateDevices();return Re()==="Firefox"&&nr().major>115&&nr().major<123&&(u=u.filter(function(c){return c.kind!=="audiooutput"})),{devices:u.map(function(c){var p=JSON.parse(JSON.stringify(c));if(!V()&&c.kind==="videoinput"&&c.getCapabilities){var m,b=c.getCapabilities();p.facing=(b==null||(m=b.facingMode)===null||m===void 0?void 0:m.length)>=1?b.facingMode[0]:void 0}return p})}}return new Promise(function(c){o.sendMessageToCallMachine({action:"enumerate-devices"},function(p){c({devices:p.devices})})})}),function(){return l.apply(this,arguments)})},{key:"sendAppMessage",value:function(o){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"*";if(W(this._callState,"sendAppMessage()"),JSON.stringify(o).length>this._maxAppMessageSize)throw new Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:o,to:u}),this}},{key:"addFakeParticipant",value:function(o){return q(),W(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(j({action:"add-fake-participant"},o)),this}},{key:"setShowNamesMode",value:function(o){return oe(this._callObjectMode,"setShowNamesMode()"),q(),o&&o!=="always"&&o!=="never"?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:o}),this)}},{key:"setShowLocalVideo",value:function(){var o=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return oe(this._callObjectMode,"setShowLocalVideo()"),q(),W(this._callState,"setShowLocalVideo()"),typeof o!="boolean"?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:o}),this._showLocalVideo=o,this)}},{key:"showLocalVideo",value:function(){return oe(this._callObjectMode,"showLocalVideo()"),q(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var o=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return oe(this._callObjectMode,"setShowParticipantsBar()"),q(),W(this._callState,"setShowParticipantsBar()"),typeof o!="boolean"?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:o}),this._showParticipantsBar=o,this)}},{key:"showParticipantsBar",value:function(){return oe(this._callObjectMode,"showParticipantsBar()"),q(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return q(),oe(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(o){return q(),oe(this._callObjectMode,"setCustomIntegrations()"),W(this._callState,"setCustomIntegrations()"),Ea(o)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:o}),this._customIntegrations=o,this):this}},{key:"startCustomIntegrations",value:function(o){var u=this;if(q(),oe(this._callObjectMode,"startCustomIntegrations()"),W(this._callState,"startCustomIntegrations()"),Array.isArray(o)&&o.some(function(m){return typeof m!="string"})||!Array.isArray(o)&&typeof o!="string")return console.error("startCustomIntegrations() only accepts string | string[]"),this;
vendor: 15,819 bytes, line 30
30var c=typeof o=="string"?[o]:o,p=c.filter(function(m){return!(m in u._customIntegrations)});return p.length?(console.error(`Can't find custom integration(s): "`.concat(p.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:c}),this)}},{key:"stopCustomIntegrations",value:function(o){var u=this;if(q(),oe(this._callObjectMode,"stopCustomIntegrations()"),W(this._callState,"stopCustomIntegrations()"),Array.isArray(o)&&o.some(function(m){return typeof m!="string"})||!Array.isArray(o)&&typeof o!="string")return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var c=typeof o=="string"?[o]:o,p=c.filter(function(m){return!(m in u._customIntegrations)});return p.length?(console.error(`Can't find custom integration(s): "`.concat(p.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:c}),this)}},{key:"customTrayButtons",value:function(){return oe(this._callObjectMode,"customTrayButtons()"),q(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(o){return oe(this._callObjectMode,"updateCustomTrayButtons()"),q(),W(this._callState,"updateCustomTrayButtons()"),wa(o)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:o}),this._customTrayButtons=o,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(or))),this)}},{key:"theme",value:function(){return oe(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(o){var u=this;return oe(this._callObjectMode,"setTheme()"),new Promise(function(c,p){try{u.validateProperties({theme:o}),u.properties.theme=j({},o),u.sendMessageToCallMachine({action:"set-theme",theme:u.properties.theme});try{u.emitDailyJSEvent({action:as,theme:u.properties.theme})}catch(m){console.log("could not emit 'theme-updated'",m)}c(u.properties.theme)}catch(m){p(m)}})}},{key:"requestFullscreen",value:(a=L(function*(){if(q(),this._iframe&&!document.fullscreenElement&&to())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(o){console.log("could not make video call fullscreen",o)}}),function(){return a.apply(this,arguments)})},{key:"exitFullscreen",value:function(){q(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(s=L(function*(){var o=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise(function(u){o.sendMessageToCallMachine({action:"get-sidebar-view"},function(c){u(c.view)})})}),function(){return s.apply(this,arguments)})},{key:"setSidebarView",value:function(o){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:o}),this)}},{key:"room",value:(i=L(function*(){var o=this,u=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeRoomConfigDefaults,c=u===void 0||u;return this._accessState.access===Yt||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise(function(p){o.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:c},function(m){delete m.action,delete m.callbackStamp,p(m)})})}),function(){return i.apply(this,arguments)})},{key:"geo",value:(n=L(function*(){try{var o=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield o.json()).geo}}catch(u){return console.error("geo lookup failed",u),{current:""}}}),function(){return n.apply(this,arguments)})},{key:"setNetworkTopology",value:(t=L(function*(o){var u=this;return q(),W(this._callState,"setNetworkTopology()"),new Promise(function(c,p){u.sendMessageToCallMachine({action:"set-network-topology",opts:o},function(m){m.error?p({error:m.error}):c({workerId:m.workerId})})})}),function(o){return t.apply(this,arguments)})},{key:"getNetworkTopology",value:(e=L(function*(){var o=this;return new Promise(function(u,c){o.needsLoad()&&u({topology:"none"}),o.sendMessageToCallMachine({action:"get-network-topology"},function(p){p.error?c({error:p.error}):u({topology:p.topology})})})}),function(){return e.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(o){if(q(),typeof o!="number"&&o!==!0&&o!==!1)throw new Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(o));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:o})}},{key:"on",value:function(o,u){return Dt.prototype.on.call(this,o,u)}},{key:"once",value:function(o,u){return Dt.prototype.once.call(this,o,u)}},{key:"off",value:function(o,u){return Dt.prototype.off.call(this,o,u)}},{key:"validateProperties",value:function(o){var u,c;if(o!=null&&(u=o.dailyConfig)!==null&&u!==void 0&&u.userMediaAudioConstraints){var p,m;V()||console.warn("userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.");var b=o.inputSettings||{};b.audio=((p=o.inputSettings)===null||p===void 0?void 0:p.audio)||{},b.audio.settings=((m=o.inputSettings)===null||m===void 0||(m=m.audio)===null||m===void 0?void 0:m.settings)||{},b.audio.settings=j(j({},b.audio.settings),o.dailyConfig.userMediaAudioConstraints),o.inputSettings=b,delete o.dailyConfig.userMediaAudioConstraints}if(o!=null&&(c=o.dailyConfig)!==null&&c!==void 0&&c.userMediaVideoConstraints){var C,O;V()||console.warn("userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.");var I=o.inputSettings||{};I.video=((C=o.inputSettings)===null||C===void 0?void 0:C.video)||{},I.video.settings=((O=o.inputSettings)===null||O===void 0||(O=O.video)===null||O===void 0?void 0:O.settings)||{},I.video.settings=j(j({},I.video.settings),o.dailyConfig.userMediaVideoConstraints),o.inputSettings=I,delete o.dailyConfig.userMediaVideoConstraints}for(var F in o)if(Ue[F]){if(Ue[F].validate&&!Ue[F].validate(o[F],this))throw new Error("property '".concat(F,"': ").concat(Ue[F].help))}else console.warn("Ignoring unrecognized property '".concat(F,"'")),delete o[F]}},{key:"assembleMeetingUrl",value:function(){var o,u,c=j(j({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:(o=this.properties.dailyConfig)!==null&&o!==void 0&&o.proxyUrl?encodeURIComponent((u=this.properties.dailyConfig)===null||u===void 0?void 0:u.proxyUrl):void 0}),p=c.url.match(/\?/)?"&":"?";return c.url+p+Object.keys(Ue).filter(function(m){return Ue[m].queryString&&c[m]!==void 0}).map(function(m){return"".concat(Ue[m].queryString,"=").concat(c[m])}).join("&")}},{key:"needsLoad",value:function(){return[Zr,Hi,Ie,we].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(o,u){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(o,u,this.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(o){this._messageChannel.forwardPackagedMessageToCallMachine(o,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(o){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(o,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(o){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(o)}},{key:"handleMessageFromCallMachine",value:function(o){switch(o.action){case os:this.sendMessageToCallMachine(j({action:ss},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var u={action:Vt,level:"log",code:1011,stats:{event:"bundle load",time:this._bundleLoadTime==="no-op"?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime==="no-op",url:Qt(this.properties.dailyConfig)}};this.sendMessageToCallMachine(u),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case tn:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(o);break;case ps:var c,p=j({},o);delete p.internal,this._maxAppMessageSize=((c=o.internal)===null||c===void 0?void 0:c._maxAppMessageSize)||Cr,this._joinedCallback&&(this._joinedCallback(o.participants),this._joinedCallback=null),this.emitDailyJSEvent(p);break;case ms:case gs:if(this._callState===Ie)return;if(o.participant&&o.participant.session_id){var m=o.participant.local?"local":o.participant.session_id;if(this._callObjectMode){var b=this._callMachine().store;co(o.participant,b),lo(o.participant,b),uo(o.participant,this._participants[m],b)}try{this.maybeParticipantTracksStopped(this._participants[m],o.participant),this.maybeParticipantTracksStarted(this._participants[m],o.participant),this.maybeEventRecordingStopped(this._participants[m],o.participant),this.maybeEventRecordingStarted(this._participants[m],o.participant)}catch(Ra){console.error("track events error",Ra)}this.compareEqualForParticipantUpdateEvent(o.participant,this._participants[m])||(this._participants[m]=j({},o.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(o))}break;case vs:if(o.participant&&o.participant.session_id){var C=this._participants[o.participant.session_id];C&&this.maybeParticipantTracksStopped(C,null),delete this._participants[o.participant.session_id],this.emitDailyJSEvent(o)}break;case ys:re(this._participantCounts,o.participantCounts)||(this._participantCounts=o.participantCounts,this.emitDailyJSEvent(o));break;case bs:var O={access:o.access};o.awaitingAccess&&(O.awaitingAccess=o.awaitingAccess),re(this._accessState,O)||(this._accessState=O,this.emitDailyJSEvent(o));break;case _s:if(o.meetingSession){this._meetingSessionSummary=o.meetingSession,this.emitDailyJSEvent(o);var I=j(j({},o),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(I)}break;case an:var F;this._iframe&&!o.preserveIframe&&(this._iframe.src=""),this._updateCallState(we),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(o.errorMsg),this._loadedCallback=null),o.preserveIframe;var U=Bn(o,su);U!=null&&(F=U.error)!==null&&F!==void 0&&F.details&&(U.error.details=JSON.parse(U.error.details)),this._maybeSendToSentry(o),this._joinedCallback&&(this._joinedCallback(null,U),this._joinedCallback=null),this.emitDailyJSEvent(U);break;case fs:this._callState!==we&&this._updateCallState(Ie),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(o);break;case"selected-devices-updated":o.devices&&this.emitDailyJSEvent(o);break;case Bs:var ye=o.state,xe=o.threshold,pt=o.quality,Q=ye.state,le=ye.reasons;Q===this._network.networkState&&re(le,this._network.networkStateReasons)&&xe===this._network.threshold&&pt===this._network.quality||(this._network.networkState=Q,this._network.networkStateReasons=le,this._network.quality=pt,this._network.threshold=xe,o.networkState=Q,le.length&&(o.networkStateReasons=le),delete o.state,this.emitDailyJSEvent(o));break;case Ys:o&&o.cpuLoadState&&this.emitDailyJSEvent(o);break;case Ws:o&&o.faceCounts!==void 0&&this.emitDailyJSEvent(o);break;case $s:var Fe=o.activeSpeaker;this._activeSpeaker.peerId!==Fe.peerId&&(this._activeSpeaker.peerId=Fe.peerId,this.emitDailyJSEvent({action:o.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var ft=o.show;this._showLocalVideo=ft,this.emitDailyJSEvent({action:o.action,show:ft});break;case Js:var Pt=o.enabled;this._activeSpeakerMode!==Pt&&(this._activeSpeakerMode=Pt,this.emitDailyJSEvent({action:o.action,enabled:this._activeSpeakerMode}));break;case ws:case Es:case ks:this._waitingParticipants=o.allWaitingParticipants,this.emitDailyJSEvent({action:o.action,participant:o.participant});break;case Zs:re(this._receiveSettings,o.receiveSettings)||(this._receiveSettings=o.receiveSettings,this.emitDailyJSEvent({action:o.action,receiveSettings:o.receiveSettings}));break;case on:this._maybeUpdateInputSettings(o.inputSettings);break;case"send-settings-updated":re(this._sendSettings,o.sendSettings)||(this._sendSettings=o.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:o.action,sendSettings:o.sendSettings}));break;case"local-audio-level":this._localAudioLevel=o.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(o);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=o.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(o);break;case Rs:var mt=o.session_id;this._rmpPlayerState[mt]=o.playerState,this.emitDailyJSEvent(o);break;case Fs:delete this._rmpPlayerState[o.session_id],this.emitDailyJSEvent(o);break;case xs:var gt=o.session_id,$n=this._rmpPlayerState[gt];$n&&this.compareEqualForRMPUpdateEvent($n,o.remoteMediaPlayerState)||(this._rmpPlayerState[gt]=o.remoteMediaPlayerState,this.emitDailyJSEvent(o));break;case"custom-button-click":case"sidebar-view-changed":case"pip-started":case"pip-stopped":this.emitDailyJSEvent(o);break;case Ss:var Na=this._meetingSessionState.topology!==(o.meetingSessionState&&o.meetingSessionState.topology);this._meetingSessionState=Lr(o.meetingSessionState,this._callObjectMode),(this._callObjectMode||Na)&&this.emitDailyJSEvent(o);break;case qs:this._isScreenSharing=!0,this.emitDailyJSEvent(o);break;case Vs:case Us:this._isScreenSharing=!1,this.emitDailyJSEvent(o);break;case rn:case nn:case Ps:case Is:case Ds:case Os:case As:case Ms:case us:case ds:case Ls:case Ns:case"test-completed":case Gs:case js:case zs:case Hs:case Qs:case Ks:case sn:case Xs:case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dialout-answered":case"dialout-error":case"dialout-stopped":case"dialout-warning":this.emitDailyJSEvent(o);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(o,u){var c="record";o&&(u.local||u[c]!==!1||o[c]===u[c]||this.emitDailyJSEvent({action:nn}))}},{key:"maybeEventRecordingStarted",value:function(o,u){var c="record";o&&(u.local||u[c]!==!0||o[c]===u[c]||this.emitDailyJSEvent({action:rn}))}},{key:"_trackStatePlayable",value:function(o){return!(!o||o.state!==es)}},{key:"_trackChanged",value:function(o,u){return o?.id!==u?.id}},{key:"maybeEventTrackStopped",value:function(o,u,c){var p,m,b=(p=u?.tracks[o])!==null&&p!==void 0?p:null,C=(m=c?.tracks[o])!==null&&m!==void 0?m:null,O=b?.track;if(O){var I=this._trackStatePlayable(b),F=this._trackStatePlayable(C),U=this._trackChanged(O,C?.track);I&&(F&&!U||this.emitDailyJSEvent({action:Ts,track:O,participant:c??u,type:o}))}}},{key:"maybeEventTrackStarted",value:function(o,u,c){var p,m,b=(p=u?.tracks[o])!==null&&p!==void 0?p:null,C=(m=c?.tracks[o])!==null&&m!==void 0?m:null,O=C?.track;if(O){var I=this._trackStatePlayable(b),F=this._trackStatePlayable(C),U=this._trackChanged(b?.track,O);F&&(I&&!U||this.emitDailyJSEvent({action:Cs,track:O,participant:c,type:o}))}}},{key:"maybeParticipantTracksStopped",value:function(o,u){if(o)for(var c in o.tracks)this.maybeEventTrackStopped(c,o,u)}},{key:"maybeParticipantTracksStarted",value:function(o,u){if(u)for(var c in u.tracks)this.maybeEventTrackStarted(c,o,u)}},{key:"compareEqualForRMPUpdateEvent",value:function(o,u){var c,p;return o.state===u.state&&((c=o.settings)===null||c===void 0?void 0:c.volume)===((p=u.settings)===null||p===void 0?void 0:p.volume)}},{key:"emitDailyJSEvent",value:function(o){try{o.callClientId=this.callClientId,this.emit
30(o.action,o)}catch(u){console.log("could not emit",o,u)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(o,u){return!!re(o,u)&&(!o.videoTrack||!u.videoTrack||o.videoTrack.id===u.videoTrack.id&&o.videoTrack.muted===u.videoTrack.muted&&o.videoTrack.enabled===u.videoTrack.enabled)&&(!o.audioTrack||!u.audioTrack||o.audioTrack.id===u.audioTrack.id&&o.audioTrack.muted===u.audioTrack.muted&&o.audioTrack.enabled===u.audioTrack.enabled)}},{key:"nativeUtils",value:function(){return V()?typeof DailyNativeUtils>"u"?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(o){this._updateCallState(this._callState,o)}},{key:"_updateCallState",value:function(o){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._isPreparingToJoin;if(o!==this._callState||u!==this._isPreparingToJoin){var c=this._callState,p=this._isPreparingToJoin;this._callState=o,this._isPreparingToJoin=u;var m=this._callState===je;this.updateShowAndroidOngoingMeetingNotification(m);var b=zt(c,p),C=zt(this._callState,this._isPreparingToJoin);b!==C&&(this.updateKeepDeviceAwake(C),this.updateDeviceAudioMode(C),this.updateNoOpRecordingEnsuringBackgroun
vendor: 1,527 bytes, line 30
30dContinuity(C))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=Eo,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:Yt},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Lr(wo,this._callObjectMode),this._isScreenSharing=!1,this._receiveSettings={},this._inputSettings=void 0,this._sendSettings={},this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this._maxAppMessageSize=Cr,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(o){V()&&this.nativeUtils().setKeepDeviceAwake(o,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(o){if(V()&&!this.disableReactNativeAutoDeviceManagement("audio")){var u=o?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(u)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(o){if(V()&&this.nativeUtils().setShowOngoingMeetingNotification){var u,c,p,m;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var b=this.properties.reactNativeConfig.androidInCallNotification;u=b.title,c=b.subtitle,p=b.iconName,m=b.disableForCustomOverride}m&&(o=!1),this.nativeUtils().setShowOngoingMeetingNotification(o,u,c,p,this.callClientId)}}}
30,{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(o){V()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(o)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var o;if(V()){var u=(o=this._callMachine())===null||o===void 0||(o=o.store)===null||o===void 0?void 0:o.getState();for(var c in u?.streams){var p=u.streams[c];p&&p.pendingTrack&&p.pendingTrack.kind==="audio"&&(p.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(o){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[o]}},{key:"absoluteUrl",value:function(o){if(o!==void 0){var u=document.createElement("a");return u.href=o,u.href}}},{key:"sayHello",value:function(){var o="hello, world.";return console.log(o),o}},{key:"_logUseAfterDestroy",value:function(){var o=Object.values(Ve)[0];if(this.needsLoad())if(o&&!o.needsLoad()){var u={action:Vt,level:"error",code:this.strictMode?9995:9997};o.sendMessageToCallMachine(u)}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 c={action:Vt,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(c,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var o=0,u=Object.values(Ve);o<u.length;o++){var c=u[o];c._callMachineInitialized?(c.sendMessageToCallMachine({action:Vt,level:"warn",code:this.allowMultipleCallInstances?9993:9992}),c._delayDuplicateInstanceLog=!1):c._delayDuplicateInstanceLog=!0}}},{key:"_maybeSendToSentry",value:function(o){var u,c,p,m;if(!((u=o.error)!==null&&u!==void 0&&u.type&&(![is,ns,en].includes(o.error.type)||o.error.type===en&&o.error.msg.includes("deleted")))){var b=(c=this.properties)!==null&&c!==void 0&&c.url?new URL(this.properties.url):void 0,C="production";b&&b.host.includes(".staging.daily")&&(C="staging");var O,I,F,U,ye,xe=function(mt){const gt=[Mc(),Oc(),tl(),Zc(),sl(),cl(),jc(),al()];return mt.autoSessionTracking!==!1&&gt.push(ol()),gt}({}).filter(function(mt){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(mt.name)}),pt=new Uc({dsn:"https://[email protected]/168844",transport:Yc,stackParser:Xc,integrations:xe,environment:C}),Q=new Ae;if(Q.setClient(pt),pt.init(),this.session_id&&Q.setExtra("sessionId",this.session_id),this.properties){var le=j({},this.properties);le.userName=le.userName?"[Filtered]":void 0,le.userData=le.userData?"[Filtered]":void 0,le.token=le.token?"[Filtered]":void 0,Q.setExtra("properties",le)}if(b){var Fe=b.searchParams.get("domain");if(!Fe){var ft=b.host.match(/(.*?)\./);Fe=ft&&ft[1]||""}Fe&&Q.setTag("domain",Fe)}o.error&&(Q.setTag("fatalErrorType",o.error.type),Q.setExtra("errorDetails",o.error.details),!((O=o.error.details)===null||O===void 0)&&O.uri&&Q.setTag("serverAddress",o.error.details.uri),!((I=o.error.details)===null||I===void 0)&&I.workerGroup&&Q.setTag("workerGroup",o.error.details.workerGroup),!((F=o.error.details)===null||F===void 0)&&F.geoGroup&&Q.setTag("geoGroup",o.error.details.geoGroup),!((U=o.error.details)===null||U===void 0)&&U.on&&Q.setTag("connectionAttempt",o.error.details.on),(ye=o.error.details)!==null&&ye!==void 0&&ye.bundleUrl&&(Q.setTag("bundleUrl",o.error.details.bundleUrl),Q.setTag("bundleError",o.error.details.sourceError.type))),Q.setTags({callMode:this._callObjectMode?V()?"reactNative":(p=this.properties)!==null&&p!==void 0&&(p=p.dailyConfig)!==null&&p!==void 0&&(p=p.callMode)!==null&&p!==void 0&&p.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:r.version()});var Pt=((m=o.error)===null||m===void 0?void 0:m.msg)||o.errorMsg;Q.captureException(new Error(Pt))}}},{key:"_callMachine",value:function(){var o;return(o=window._daily)===null||o===void 0||(o=o.instances)===null||o===void 0||(o=o[this.callClientId])===null||o===void 0?void 0:o.callMachine}}
vendor: 8,257 bytes, lines 30-38
30,{key:"_maybeUpdateInputSettings",value:function(o){if(!re(this._inputSettings,o)){var u=this._getInputSettings();this._inputSettings=o;var c=this._getInputSettings();re(u,c)||this.emitDailyJSEvent({action:on,inputSettings:c})}}}],[{key:"supportedBrowser",value:function(){if(V())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var o=Wa.getParser(pe());return{supported:!!Ar(),mobile:o.getPlatformType()==="mobile",name:o.getBrowserName(),version:o.getBrowserVersion(),supportsFullscreen:!!to(),supportsScreenShare:!!Nl(),supportsSfu:!!Ar(),supportsVideoProcessing:ra(),supportsAudioProcessing:na()}}},{key:"version",value:function(){return"0.85.0"}},{key:"createCallObject",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return o.layout="none",new r(null,o)}},{key:"wrap",value:function(o){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(q(),!o||!o.contentWindow||typeof o.src!="string")throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return u.layout||(u.customLayout?u.layout="custom-v1":u.layout="browser"),new r(o,u)}},{key:"createFrame",value:function(o,u){var c,p;q(),o&&u?(c=o,p=u):o&&o.append?(c=o,p={}):(c=document.body,p=o||{});var m=p.iframeStyle;m||(m=c===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 b=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?b.allow="microphone, camera":b.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",b.style.visibility="hidden",c.appendChild(b),b.style.visibility=null,Object.keys(m).forEach(function(C){return b.style[C]=m[C]}),p.layout||(p.customLayout?p.layout="custom-v1":p.layout="browser");try{return new r(b,p)}catch(C){throw c.removeChild(b),C}}},{key:"createTransparentFrame",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};q();var u=document.createElement("iframe");return u.allow="microphone; camera; autoplay",u.style.cssText=`
31      position: fixed;
32      top: 0;
33      left: 0;
34      width: 100%;
35      height: 100%;
36      border: 0;
37      pointer-events: none;
38    `,document.body.appendChild(u),o.layout||(o.layout="custom-v1"),r.wrap(u,o)}},{key:"getCallInstance",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return o?Ve[o]:Object.values(Ve)[0]}}]);var e,t,n,i,s,a,l,d,h,f,y,T,k,v,g,_,S,A,P,w,D,x,B,ie,Xe,Ze,et,In,Dn,jn,Ln,Nn,Rn,xn,Fn,qn,Vn,Un}();function To(r){if(r.extension){if(typeof r.extension!="string")throw new Error("Error starting dial out: extension must be a string");if(r.extension.length>20)throw new Error("Error starting dial out: extension length must be less than or equal to 20")}if(r.waitBeforeExtensionDialSec){if(typeof r.waitBeforeExtensionDialSec!="number")throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be a number");if(r.waitBeforeExtensionDialSec>60)throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be less than or equal to 60");if(!r.extension)throw new Error("Error starting dial out: waitBeforeExtensionDialSec requires a phoneNumber and extension")}}function tt(r,e){var t={};for(var n in r)if(r[n]instanceof MediaStreamTrack)console.warn("MediaStreamTrack found in props or cache.",n),t[n]=Te;else if(n==="dailyConfig"){if(r[n].modifyLocalSdpHook){var i=window._daily.instances[e].customCallbacks||{};i.modifyLocalSdpHook=r[n].modifyLocalSdpHook,window._daily.instances[e].customCallbacks=i,delete r[n].modifyLocalSdpHook}if(r[n].modifyRemoteSdpHook){var s=window._daily.instances[e].customCallbacks||{};s.modifyRemoteSdpHook=r[n].modifyRemoteSdpHook,window._daily.instances[e].customCallbacks=s,delete r[n].modifyRemoteSdpHook}t[n]=r[n]}else t[n]=r[n];return t}function W(r){var e=arguments.length>2?arguments[2]:void 0;if(r!==je){var t="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," only supported after join.");throw e&&(t+=" ".concat(e)),console.error(t),new Error(t)}}function zt(r,e){return[rr,je].includes(r)||e}function Dr(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"This daily-js method",n=arguments.length>3?arguments[3]:void 0;if(zt(r,e)){var i="".concat(t," not supported after joining a meeting.");throw n&&(i+=" ".concat(n)),console.error(i),new Error(i)}}function Jt(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method",t=arguments.length>2?arguments[2]:void 0;if(!r){var n="".concat(e,arguments.length>3&&arguments[3]!==void 0&&arguments[3]?" requires preAuth() or startCamera() to initialize call state.":" requires preAuth(), startCamera(), or join() to initialize call state.");throw t&&(n+=" ".concat(t)),console.error(n),new Error(n)}}function jr(r){if(r){var e="A pre-call quality test is in progress. Please try ".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," again once testing has completed. Use stopTestCallQuality() to end it early.");throw console.error(e),new Error(e)}}function fe(r){if(!r){var e="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(e),new Error(e)}}function oe(r){if(r){var e="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported as part of Daily's Prebuilt");throw console.error(e),new Error(e)}}function q(){if(V())throw new Error("This daily-js method is not currently supported in React Native")}function yt(){if(!V())throw new Error("This daily-js method is only supported in React Native")}function ga(r){if(r===void 0)return!0;var e;if(typeof r=="string")e=r;else try{e=JSON.stringify(r),re(JSON.parse(e),r)||console.warn("The userData provided will be modified when serialized.")}catch(t){throw Error("userData must be serializable to JSON: ".concat(t))}if(e.length>4096)throw Error("userData is too large (".concat(e.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function va(r,e){for(var t=e.allowAllParticipantsKey,n=function(y){var T=["local"];return t||T.push("*"),y&&!T.includes(y)},i=function(y){return!!(y.layer===void 0||Number.isInteger(y.layer)&&y.layer>=0||y.layer==="inherit")},s=function(y){return!!y&&!(y.video&&!i(y.video))&&!(y.screenVideo&&!i(y.screenVideo))},a=0,l=Object.entries(r);a<l.length;a++){var d=ee(l[a],2),h=d[0],f=d[1];if(!n(h)||!s(f))return!1}return!0}function ya(r){if($(r)!=="object")return!1;for(var e=0,t=Object.entries(r);e<t.length;e++){var n=ee(t[e],2),i=n[0],s=n[1];switch(i){case"video":if($(s)!=="object")return!1;for(var a=0,l=Object.entries(s);a<l.length;a++){var d=ee(l[a],2),h=d[0],f=d[1];switch(h){case"processor":if(!uu(f))return!1;break;case"settings":if(!Oo(f))return!1;break;default:return!1}}break;case"audio":if($(s)!=="object")return!1;for(var y=0,T=Object.entries(s);y<T.length;y++){var k=ee(T[y],2),v=k[0],g=k[1];switch(v){case"processor":if(!lu(g))return!1;break;case"settings":if(!Oo(g))return!1;break;default:return!1}}break;default:return!1}}return!0}function ba(r,e,t){var n,i=[];r.video&&r.video.processor&&(ra((n=e?.useLegacyVideoProcessor)!==null&&n!==void 0&&n)||(r.video.settings?delete r.video.processor:delete r.video,i.push("video"))),r.audio&&r.audio.processor&&(na()||(r.audio.settings?delete r.audio.processor:delete r.audio,i.push("audio"))),i.length>0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(i.join(", "))),r.audio&&r.audio.settings&&(r.audio.settings.customTrack?(t.audioTrack=r.audio.settings.customTrack,r.audio.settings={customTrack:Te}):delete t.audioTrack),r.video&&r.video.settings&&(r.video.settings.customTrack?(t.videoTrack=r.video.settings.customTrack,r.video.settings={customTrack:Te}):delete t.videoTrack)}function lu(r){if(V())return console.warn("Video processing is not yet supported in React Native"),!1;var e=["type"];return!!r&&$(r)==="object"&&(Object.keys(r).filter(function(t){return!e.includes(t)}
38).forEach(function(t){console.warn("invalid key inputSettings -> audio -> processor : ".concat(t)),delete r[t]}),!!function(t){return typeof t!="string"?!1:Object.values(ea).includes(t)?!0:(console.error("inputSettings audio processor type invalid"),!1)}(r.type))}function uu(r){if(V())return console.warn("Video processing is not yet supported in React Native"),!1;var e=["type","config"];return!r||$(r)!=="object"||!function(t){return typeof t!="string"?!1:Object.values(Wt).includes(t)?!0:(console.error("inputSettings video processor type invalid"),!1)}(r.type)||r.config&&($(r.config)!=="object"||!function(t,n){var i=Object.keys(n);if(i.length===0)return!0;var s="invalid object in inputSettings -> video -> processor -> config";switch(t){case Wt.BGBLUR:return i.length>1||i[0]!=="strength"?(console.error(s),!1):!(typeof n.strength!="number"||n.strength<=0||n.strength>1||isNaN(n.strength))||(console.error("".concat(s,"; expected: {0 < strength <= 1}, got: ").concat(n.strength)),!1);case Wt.BGIMAGE:return!(n.source!==void 0&&!function(a){if(a.source==="default")return a.type="default",!0;if(a.source instanceof ArrayBuffer)return!0;if(Kt(a.source))return a.type="url",!!function(h){var f=new URL(h),y=f.pathname;if(f.protocol==="data:")try{var T=y.substring(y.indexOf(":")+1,y.indexOf(";")).split("/")[1];return Or.includes(T)}catch(v){return console.error("failed to deduce blob content type",v),!1}var k=y.split(".").at(-1).toLowerCase().trim();return Or.includes(k)}(a.source)||(console.error("invalid image type; supported types: [".concat(Or.join(", "),"]")),!1);return l=a.source,d=Number(l),isNaN(d)||!Number.isInteger(d)||d<=0||d>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(a.type="daily-preselect",!0);var l,d}(n));default:return!0}}(r.type,r.config))?!1:(Object.keys(r).filter(function(t){return!e.includes(t)}).forEach(function(t){console.warn("invalid key inputSettings -> video -> processor : ".concat(t)),delete r[t]}),!0)}function Oo(r){return $(r)==="object"&&(!r.customTrack||r.customTrack instanceof MediaStreamTrack)}function fn(){var r=Object.values(Wt).join(" | "),e=Object.values(ea).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(r," ], config?: {} } }, audio?: { processor: {type: [ ").concat(e," ] } } }")}function _a(r){var e=r.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(rs).concat(e?' | "'.concat("*",'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function Sa(){return"customIntegrations should be an object of type ".concat(JSON.stringify(pn),".")}function wa(r){if(r&&$(r)!=="object"||Array.isArray(r))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(or),".")),!1;if(r)for(var e=0,t=Object.entries(r);e<t.length;e++)for(var n=ee(t[e],1)[0],i=0,s=Object.entries(r[n]);i<s.length;i++){var a=ee(s[i],2),l=a[0],d=a[1],h=or.id[l];if(!h)return console.error("customTrayButton does not support key ".concat(l)),!1;switch(l){case"iconPath":case"iconPathDarkMode":if(!Kt(d))return console.error("customTrayButton ".concat(l," should be a url.")),!1;break;case"visualState":if(!["default","sidebar-open","active"].includes(d))return console.error("customTrayButton ".concat(l," should be ").concat(h,". Got: ").concat(d)),!1;break;default:if($(d)!==h)return console.error("customTrayButton ".concat(l," should be a ").concat(h,".")),!1}}return!0}function Ea(r){if(!r||r&&$(r)!=="object"||Array.isArray(r))return console.error(Sa()),!1;for(var e=function(y){return"".concat(y," should be ").concat(pn.id[y])},t=function(y,T){return console.error("customIntegration ".concat(y,": ").concat(T))},n=0,i=Object.entries(r);n<i.length;n++){var s=ee(i[n],1)[0];if(!("label"in r[s]))return t(s,"label is required"),!1;if(!("location"in r[s]))return t(s,"location is required"),!1;if(!("src"in r[s])&&!("srcdoc"in r[s]))return t(s,"src or srcdoc is required"),!1;for(var a=0,l=Object.entries(r[s]);a<l.length;a++){var d=ee(l[a],2),h=d[0],f=d[1];switch(h){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if(typeof f!="string")return t(s,e(h)),!1;break;case"iconURL":if(!Kt(f))return t(s,"".concat(h," should be a url")),!1;break;case"src":if("srcdoc"in r[s])return t(s,"cannot have both src and srcdoc"),!1;if(!Kt(f))return t(s,'src "'.concat(f,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in r[s])return t(s,"cannot have both src and srcdoc"),!1;if(typeof f!="string")return t(s,e(h)),!1;break;case"location":if(!["main","sidebar"].includes(f))return t(s,e(h)),!1;break;case"controlledBy":if(f!=="*"&&f!=="owners"&&(!Array.isArray(f)||f.some(function(y){return typeof y!="str
38ing"})))return t(s,e(h)),!1;break;case"shared":if((!Array.isArray(f)||f.some(function(y){return typeof y!="string"}))&&f!=="owners"&&typeof f!="boolean")return t(s,e(h)),!1;break;default:if(!pn.id[h])return console.error("customIntegration does not support key ".concat(h)),!1}}}return!0}function ka(r,e){if(e===void 0)return!1;switch($(e)){case"string":return $(r)===e;case"object":if($(r)!=="object")return!1;for(var t in r)if(!ka(r[t],e[t]))return!1;return!0;default:return!1}}function Ao(r,e){var t=r.sessionId,n=r.toEndPoint,i=r.callerId,s=r.useSipRefer;if(!t||!n)throw new Error("".concat(e,"() requires a sessionId and toEndPoint"));if(typeof t!="string"||typeof n!="string")throw new Error("Invalid paramater: sessionId and toEndPoint must be of type string");if(s&&!n.startsWith("sip:"))throw new Error('"toEndPoint" must be a "sip" address');if(!n.startsWith("sip:")&&!n.startsWith("+"))throw new Error("toEndPoint: ".concat(n,' must starts with either "sip:" or "+"'));if(i&&typeof i!="string")throw new Error("callerId must be of type string");if(i&&!n.startsWith("+"))throw new Error("callerId is only valid when transferring to a PSTN number")}function Mo(r){if($(r)!=="object")throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(r.state&&!Object.values(cn).includes(r.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(cn));if(r.volume){if(typeof r.volume!="number")throw new Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(r.volume<0||r.volume>2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function Po(r,e,t){return!(typeof r!="number"||r<e||r>t)}function Lr(r,e){return r&&!e&&delete r.data,r}const du=Object.freeze(Object.defineProperty({__proto__:null,DAILY_ACCESS_LEVEL_FULL:ts,DAILY_ACCESS_LEVEL_LOBBY:fl,DAILY_ACCESS_LEVEL_NONE:ml,DAILY_ACCESS_UNKNOWN:Yt,DAILY_CAMERA_ERROR_CAM_AND_MIC_IN_USE:Tl,DAILY_CAMERA_ERROR_CAM_IN_USE:kl,DAILY_CAMERA_ERROR_CONSTRAINTS:Pl,DAILY_CAMERA_ERROR_MIC_IN_USE:Cl,DAILY_CAMERA_ERROR_NOT_FOUND:Ml,DAILY_CAMERA_ERROR_PERMISSIONS:Ol,DAILY_CAMERA_ERROR_UNDEF_MEDIADEVICES:Al,DAILY_CAMERA_ERROR_UNKNOWN:Il,DAILY_EVENT_ACCESS_STATE_UPDATED:bs,DAILY_EVENT_ACTIVE_SPEAKER_CHANGE:$s,DAILY_EVENT_ACTIVE_SPEAKER_MODE_CHANGE:Js,DAILY_EVENT_APP_MSG:Ls,DAILY_EVENT_CAMERA_ERROR:ds,DAILY_EVENT_CPU_LOAD_CHANGE:Ys,DAILY_EVENT_ERROR:an,DAILY_EVENT_EXIT_FULLSCREEN:St,DAILY_EVENT_FACE_COUNTS_UPDATED:Ws,DAILY_EVENT_FULLSCREEN:_t,DAILY_EVENT_IFRAME_LAUNCH_CONFIG:ss,DAILY_EVENT_IFRAME_READY_FOR_LAUNCH_CONFIG:os,DAILY_EVENT_INPUT_SETTINGS_UPDATED:on,DAILY_EVENT_JOINED_MEETING:ps,DAILY_EVENT_JOINING_MEETING:hs,DAILY_EVENT_LANG_UPDATED:Xs,DAILY_EVENT_LEFT_MEETING:fs,DAILY_EVENT_LIVE_STREAMING_ERROR:Ks,DAILY_EVENT_LIVE_STREAMING_STARTED:zs,DAILY_EVENT_LIVE_STREAMING_STOPPED:Qs,DAILY_EVENT_LIVE_STREAMING_UPDATED:Hs,DAILY_EVENT_LOADED:tn,DAILY_EVENT_LOADING:cs,DAILY_EVENT_LOAD_ATTEMPT_FAILED:ls,DAILY_EVENT_LOCAL_SCREEN_SHARE_CANCELED:Us,DAILY_EVENT_LOCAL_SCREEN_SHARE_STARTED:qs,DAILY_EVENT_LOCAL_SCREEN_SHARE_STOPPED:Vs,DAILY_EVENT_MEETING_SESSION_DATA_ERROR:Dl,DAILY_EVENT_MEETING_SESSION_STATE_UPDATED:Ss,DAILY_EVENT_MEETING_SESSION_SUMMARY_UPDATED:_s,DAILY_EVENT_NETWORK_CONNECTION:Gs,DAILY_EVENT_NETWORK_QUALITY_CHANGE:Bs,DAILY_EVENT_NONFATAL_ERROR:sn,DAILY_EVENT_PARTICIPANT_COUNTS_UPDATED:ys,DAILY_EVENT_PARTICIPANT_JOINED:ms,DAILY_EVENT_PARTICIPANT_LEFT:vs,DAILY_EVENT_PARTICIPANT_UPDATED:gs,DAILY_EVENT_RECEIVE_SETTINGS_UPDATED:Zs,DAILY_EVENT_RECORDING_DATA:js,DAILY_EVENT_RECORDING_ERROR:Is,DAILY_EVENT_RECORDING_STARTED:rn,DAILY_EVENT_RECORDING_STATS:Ps,DAILY_EVENT_RECORDING_STOPPED:nn,DAILY_EVENT_RECORDING_UPLOAD_COMPLETED:Ds,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STARTED:Rs,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STOPPED:Fs,DAILY_EVENT_REMOTE_MEDIA_PLAYER_UPDATED:xs,DAILY_EVENT_STARTED_CAMERA:us,DAILY_EVENT_THEME_UPDATED:as,DAILY_EVENT_TRACK_STARTED:Cs,DAILY_EVENT_TRACK_STOPPED:Ts,DAILY_EVENT_TRANSCRIPTION_ERROR:Ms,DAILY_EVENT_TRANSCRIPTION_MSG:Ns,DAILY_EVENT_TRANSCRIPTION_STARTED:Os,DAILY_EVENT_TRANSCRIPTION_STOPPED:As,DAILY_EVENT_WAITING_PARTICIPANT_ADDED:ws,DAILY_EVENT_WAITING_PARTICIPANT_REMOVED:ks,DAILY_EVENT_WAITING_PARTICIPANT_UPDATED:Es,DAILY_FATAL_ERROR_CONNECTION:is,DAILY_FATAL_ERROR_EJECTED:vl,DAILY_FATAL_ERROR_EOL:ns,DAILY_FATAL_ERROR_EXP_ROOM:_l,DAILY_FATAL_ERROR_EXP_TOKEN:Sl,DAILY_FATAL_ERROR_MEETING_FULL:wl,DAILY_FATAL_ERROR_NBF_ROOM:yl,DAILY_FATAL_ERROR_NBF_TOKEN:bl,DAILY_FATAL_ERROR_NOT_ALLOWED:El,DAILY_FATAL_ERROR_NO_ROOM:en,DAILY_RECEIVE_SETTINGS_ALL_PARTICIPANTS_KEY:gl,DAILY_RECEIVE_SETTINGS_BASE_KEY:rs,DAILY_STATE_ERROR:we,DAILY_STATE_JOINED:je,DAILY_STATE_JOINING:rr,DAILY_STATE_LEFT:Ie,DAILY_STATE_NEW:Zr,DAILY_TRACK_STATE_BLOCKED:ll,DAILY_TRACK_STATE_INTERRUPTED:pl,DAILY_TRACK_STATE_LOADING:hl,DAILY_TRACK_STATE_OFF:ul,DAILY_TRACK_STATE_PLAYABLE:e
vendor: 6,202 bytes, line 38
38s,DAILY_TRACK_STATE_SENDABLE:dl,default:cu},Symbol.toStringTag,{value:"Module"})),hu=qa(du);var Pn={exports:{}},ot=typeof Reflect=="object"?Reflect:null,Io=ot&&typeof ot.apply=="function"?ot.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},Ht;ot&&typeof ot.ownKeys=="function"?Ht=ot.ownKeys:Object.getOwnPropertySymbols?Ht=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Ht=function(e){return Object.getOwnPropertyNames(e)};function pu(r){console&&console.warn&&console.warn(r)}var Ca=Number.isNaN||function(e){return e!==e};function G(){G.init.call(this)}Pn.exports=G;Pn.exports.once=vu;G.EventEmitter=G;G.prototype._events=void 0;G.prototype._eventsCount=0;G.prototype._maxListeners=void 0;var Do=10;function fr(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}Object.defineProperty(G,"defaultMaxListeners",{enumerable:!0,get:function(){return Do},set:function(r){if(typeof r!="number"||r<0||Ca(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");Do=r}});G.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};G.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Ca(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Ta(r){return r._maxListeners===void 0?G.defaultMaxListeners:r._maxListeners}G.prototype.getMaxListeners=function(){return Ta(this)};G.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e==="error",s=this._events;if(s!==void 0)i=i&&s.error===void 0;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var l=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw l.context=a,l}var d=s[e];if(d===void 0)return!1;if(typeof d=="function")Io(d,this,t);else for(var h=d.length,f=Ia(d,h),n=0;n<h;++n)Io(f[n],this,t);return!0};function Oa(r,e,t,n){var i,s,a;if(fr(t),s=r._events,s===void 0?(s=r._events=Object.create(null),r._eventsCount=0):(s.newListener!==void 0&&(r.emit("newListener",e,t.listener?t.listener:t),s=r._events),a=s[e]),a===void 0)a=s[e]=t,++r._eventsCount;else if(typeof a=="function"?a=s[e]=n?[t,a]:[a,t]:n?a.unshift(t):a.push(t),i=Ta(r),i>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=r,l.type=e,l.count=a.length,pu(l)}return r}G.prototype.addListener=function(e,t){return Oa(this,e,t,!1)};G.prototype.on=G.prototype.addListener;G.prototype.prependListener=function(e,t){return Oa(this,e,t,!0)};function fu(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Aa(r,e,t){var n={fired:!1,wrapFn:void 0,target:r,type:e,listener:t},i=fu.bind(n);return i.listener=t,n.wrapFn=i,i}G.prototype.once=function(e,t){return fr(t),this.on(e,Aa(this,e,t)),this};G.prototype.prependOnceListener=function(e,t){return fr(t),this.prependListener(e,Aa(this,e,t)),this};G.prototype.removeListener=function(e,t){var n,i,s,a,l;if(fr(t),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if(typeof n!="function"){for(s=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){l=n[a].listener,s=a;break}if(s<0)return this;s===0?n.shift():mu(n,s),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,l||t)}return this};G.prototype.off=G.prototype.removeListener;G.prototype.removeAllListeners=function(e){var t,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),a;for(i=0;i<s.length;++i)a=s[i],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this};function Ma(r,e,t){var n=r._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?t?[i.listener||i]:[i]:t?gu(i):Ia(i,i.length)}G.prototype.listeners=function(e){return Ma(this,e,!0)};G.prototype.rawListeners=function(e){return Ma(this,e,!1)};G.listenerCount=function(r,e){return typeof r.listenerCount=="function"?r.listenerCount(e):Pa.call(r,e)};G.prototype.listenerCount=Pa;function Pa(r){var e=this._events;if(e!==void 0){var t=e[r];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}G.prototype.eventNames=function(){return this._eventsCount>0?Ht(this._events):[]};function Ia(r,e){for(var t=new Array(e),n=0;n<e;++n)t[n]=r[n];return t}function mu(r,e){for(;e+1<r.length;e++)r[e]=r[e+1];r.pop()}function gu(r){for(var e=new Array(r.length),t=0;t<e.length;++t)e[t]=r[t].listener||r[t];return e}function vu(r,e){return new Promise(function(t,n){function i(a){r.removeListener(e,s),n(a)}function s(){typeof r.removeListener=="function"&&r.removeListener("error",i),t([].slice.call(arguments))}Da(r,e,s,{once:!0}),e!=="error"&&yu(r,i,{once:!0})})}function yu(r,e,t){typeof r.on=="function"&&Da(r,"error",e,t)}function Da(r,e,t,n){if(typeof r.on=="function")n.once?r.once(e,t):r.on(e,t);else if(typeof r.addEventListener=="function")r.addEventListener(e,function i(s){n.once&&r.removeEventListener(e,i),t(s)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof r)}
38var bu=Pn.exports,mr={},Le={};Object.defineProperty(Le,"__esModule",{value:!0});Le.Api=Le.HttpClient=Le.ContentType=void 0;var M;(function(r){r.Json="application/json",r.JsonApi="application/vnd.api+json",r.FormData="multipart/form-data",r.UrlEncoded="application/x-www-form-urlencoded",r.Text="text/plain"})(M||(Le.ContentType=M={}));class ja{constructor(e={}){R(this,"baseUrl","https://api.vapi.ai");R(this,"securityData",null);R(this,"securityWorker");R(this,"abortControllers",new Map);R(this,"customFetch",(...e)=>fetch(...e));R(this,"baseApiParams",{credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"});R(this,"setSecurityData",e=>{this.securityData=e});R(this,"contentFormatters",{[M.Json]:e=>e!==null&&(typeof e=="object"||typeof e=="string")?JSON.stringify(e):e,[M.JsonApi]:e=>e!==null&&(typeof e=="object"||typeof e=="string")?JSON.stringify(e):e,[M.Text]:e=>e!==null&&typeof e!="string"?JSON.stringify(e):e,[M.FormData]:e=>Object.keys(e||{}).reduce((t,n)=>{const i=e[n];return t.append(n,i instanceof Blob?i:typeof i=="object"&&i!==null?JSON.stringify(i):`${i}`),t},new FormData),[M.UrlEncoded]:e=>this.toQueryString(e)});R(this,"createAbortSignal",e=>{if(this.abortControllers.has(e)){const n=this.abortControllers.get(e);return n?n.signal:void 0}const t=new AbortController;return this.abortControllers.set(e,t),t.signal});R(this,"abortRequest",e=>{const t=this.abortControllers.get(e);t&&(t.abort(),this.abortControllers.delete(e))});R(this,"request",async({body:e,secure:t,path:n,type:i,query:s,format:a,baseUrl:l,cancelToken:d,...h})=>{const f=(typeof t=="boolean"?t:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{}
38,y=this.mergeRequestParams(h,f),T=s&&this.toQueryString(s),k=this.contentFormatters[i||M.Json],v=a||y.format;return this.customFetch(`${l||this.baseUrl||""}${n}${T?`?${T}`:""}`,{...y,headers:{...y.headers||{},...i&&i!==M.FormData?{"Content-Type":i}:{}},signal:(d?this.createAbortSignal(d):y.signal)||null,body:typeof e>"u"||e===null?null:k(e)}).then(async g=>{const _=g.clone();_.data=null,_.error=null;const S=v?await g[v]().then(A=>(_.ok?_.data=A:_.error=A,_)).catch(A=>(_.error=A,_)):_;if(d&&this.abortControllers.delete(d),!g.ok)throw S;return S})});Object.assign(this,e)}encodeQueryParam(e,t){return`${encodeURIComponent(e)}=${encodeURIComponent(typeof t=="number"?t:`${t}`)}`}addQueryParam(e,t){return this.encodeQueryParam(t,e[t])}addArrayQueryParam(e,t){return e[t].map(i=>this.encodeQueryParam(t,i)).join("&")}toQueryString(e){const t=e||{};return Object.keys(t).filter(i=>typeof t[i]<"u").map(i=>Array.isArray(t[i])?this.addArrayQueryParam(t,i):this.addQueryParam(t,i)).join("&")}addQueryParams(e){const t=this.toQueryString(e);return t?`?${t}`:""}
38mergeRequestParams(e,t){return{...this.baseApiParams,...e,...t||{},headers:{...this.baseApiParams.headers||{},...e.headers||{},...t&&t.headers||{}}}}}Le.HttpClient=ja;class _u extends ja{constructor(){super(...arguments);R(this,"assistant",{assistantControllerCreate:(t,n={})=>this.request({path:"/assistant",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),assistantControllerFindAll:(t,n={})=>this.request({path:"/assistant",method:"GET",query:t,secure:!0,format:"json",...n}),assistantControllerFindOne:(t,n={})=>this.request({path:`/assistant/${t}`,method:"GET",secure:!0,format:"json",...n}),assistantControllerUpdate:(t,n,i={})=>this.request({path:`/assistant/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),assistantControllerReplace:(t,n,i={})=>this.request({path:`/assistant/${t}`,method:"PUT",body:n,secure:!0,type:M.Json,format:"json",...i}),assistantControllerRemove:(t,n={})=>this.request({path:`/assistant/${t}`,method:"DELETE",secure:!0,format:"json",...n}),assistantControllerFindVersions:(t,n,i={})=>this.request({path:`/assistant/${t}/version`,method:"GET",query:n,secure:!0,format:"json",...i})});R(this,"v2",{assistantControllerFindAllPaginated:(t,n={})=>this.request({path:"/v2/assistant",method:"GET",query:t,secure:!0,format:"json",...n}),callControllerCallsExport:(t,n={})=>this.request({path:"/v2/call/export",method:"GET",query:t,secure:!0,...n}),callControllerFindAllPaginated:(t,n={})=>this.request({path:"/v2/call",method:"GET",query:t,secure:!0,format:"json",...n}),callControllerFindAllMetadataPaginated:(t,n={})=>this.request({path:"/v2/call/metadata",method:"GET",query:t,secure:!0,format:"json",...n}),phoneNumberControllerFindAllPaginated:(t,n={})=>this.request({path:"/v2/phone-number",method:"GET",query:t,secure:!0,format:"json",...n})});R(this,"squad",{squadControllerCreate:(t,n={})=>this.request({path:"/squad",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),squadControllerFindAll:(t,n={})=>this.request({path:"/squad",method:"GET",query:t,secure:!0,format:"json",...n}),squadControllerFindOne:(t,n={})=>this.request({path:`/squad/${t}`,method:"GET",secure:!0,format:"json",...n}),squadControllerUpdate:(t,n,i={})=>this.request({path:`/squad/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),squadControllerRemove:(t,n={})=>this.request({path:`/squad/${t}`,method:"DELETE",secure:!0,format:"json",...n})});R(this,"workflow",{workflowControllerFindAll:(t={})=>this.request({path:"/workflow",method:"GET",secure:!0,format:"json",...t}),workflowControllerCreate:(t,n={})=>this.request({path:"/workflow",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),workflowControllerFindOne:(t,n={})=>this.request({path:`/workflow/${t}`,method:"GET",secure:!0,format:"json",...n}),workflowControllerDelete:(t,n={})=>this.request({path:`/workflow/${t}`,method:"DELETE",secure:!0,format:"json",...n}),workflowControllerUpdate:(t,n,i={})=>this.request({path:`/workflow/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i})});R(this,"call",{callControllerCreate:(t,n={})=>this.request({path:"/call",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),callControllerFindAll:(t,n={})=>this.request({path:"/call",method:"GET",query:t,secure:!0,format:"json",...n}),callControllerFindOne:(t,n={})=>this.request({path:`/call/${t}`,method:"GET",secure:!0,format:"json",...n}),callControllerUpdate:(t,n,i={})=>this.request({path:`/call/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),callControllerDeleteCallData:(t,n,i={})=>this.request({path:`/call/${t}`,method:"DELETE",body:n,secure:!0,type:M.Json,format:"json",...i}),callControllerCreatePhoneCall:(t,n={})=>this.request({path:"/call/phone",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),callControllerCreateWebCall:(t,n={})=>this.request({path:"/call/web",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n})});R(this,"chat",{chatControllerListChats:(t,n={})=>this.request({path:"/chat",method:"GET",query:t,secure:!0,format:"json",...n}),chatControllerCreateChat:(t,n={})=>this.request({path:"/chat",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),chatControllerGetChat:(t,n={})=>this.request({path:`/chat/${t}`,method:"GET",secure:!0,format:"json",...n}),chatControllerDeleteChat:(t,n={})=>this.request({path:`/chat/${t}`,method:"DELETE",secure:!0,format:"json",...n}),chatControllerCreateOpenAiChat:(t,n={})=>this.request({path:"/chat/responses",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),chatControllerCreateWebChat:(t,n={})=>this.request({path:"/chat/web",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),chatControllerCreateOpenAiWebChat:(t,n={})=>this.request({path:"/chat/web/responses",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n})});R(this,"campaign",{campaignControllerCreate:(t,n={})=>this.request({path:"/campaign",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}
38),campaignControllerFindAll:(t,n={})=>this.request({path:"/campaign",method:"GET",query:t,secure:!0,format:"json",...n}),campaignControllerFindOne:(t,n={})=>this.request({path:`/campaign/${t}`,method:"GET",secure:!0,format:"json",...n}),campaignControllerUpdate:(t,n,i={})=>this.request({path:`/campaign/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),campaignControllerRemove:(t,n={})=>this.request({path:`/campaign/${t}`,method:"DELETE",secure:!0,format:"json",...n})});R(this,"session",{sessionControllerCreate:(t,n={})=>this.request({path:"/session",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),sessionControllerFindAllPaginated:(t,n={})=>this.request({path:"/session",method:"GET",query:t,secure:!0,format:"json",...n}),sessionControllerFindOne:(t,n={})=>this.request({path:`/session/${t}`,method:"GET",secure:!0,format:"json",...n}),sessionControllerUpdate:(t,n,i={})=>this.request({path:`/session/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),sessionControllerRemove:(t,n={})=>this.request({path:`/session/${t}`,method:"DELETE",secure:!0,format:"json",...n})});R(this,"phoneNumber",{phoneNumberControllerImportTwilio:(t,n={})=>this.request({path:"/phone-number/import/twilio",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),phoneNumberControllerImportVonage:(t,n={})=>this.request({path:"/phone-number/import/vonage",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),phoneNumberControllerCreate:(t,n={})=>this.request({path:"/phone-number",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),phoneNumberControllerFindAll:(t,n={})=>this.request({path:"/phone-number",method:"GET",query:t,secure:!0,format:"json",...n}),phoneNumberControllerFindOne:(t,n={})=>this.request({path:`/phone-number/${t}`,method:"GET",secure:!0,format:"json",...n}),phoneNumberControllerUpdate:(t,n,i={})=>this.request({path:`/phone-number/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),phoneNumberControllerRemove:(t,n={})=>this.request({path:`/phone-number/${t}`,method:"DELETE",secure:!0,format:"json",...n})});R(this,"tool",{toolControllerCreate:(t,n={})=>this.request({path:"/tool",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),toolControllerFindAll:(t,n={})=>this.request({path:"/tool",method:"GET",query:t,secure:!0,format:"json",...n}),toolControllerFindOne:(t,n={})=>this.request({path:`/tool/${t}`,method:"GET",secure:!0,format:"json",...n}),toolControllerUpdate:(t,n,i={})=>this.request({path:`/tool/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),toolControllerRemove:(t,n={})=>this.request({path:`/tool/${t}`,method:"DELETE",secure:!0,format:"json",...n})});R(this,"file",{fileControllerCreateDeprecated:(t,n={})=>this.request({path:"/file/upload",method:"POST",body:t,secure:!0,type:M.FormData,format:"json",...n}),fileControllerCreate:(t,n={})=>this.request({path:"/file",method:"POST",body:t,secure:!0,type:M.FormData,format:"json",...n}),fileControllerFindAll:(t={})=>this.request({path:"/file",method:"GET",secure:!0,format:"json",...t}),fileControllerFindOne:(t,n={})=>this.request({path:`/file/${t}`,method:"GET",secure:!0,format:"json",...n}),fileControllerUpdate:(t,n,i={})=>this.request({path:`/file/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),fileControllerRemove:(t,n={})=>this.request({path:`/file/${t}`,method:"DELETE",secure:!0,format:"json",...n})});R(this,"knowledgeBase",{knowledgeBaseControllerCreate:(t,n={})=>this.request({path:"/knowledge-base",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),knowledgeBaseControllerFindAll:(t,n={})=>this.request({path:"/knowledge-base",method:"GET",query:t,secure:!0,format:"json",...n}),knowledgeBaseControllerFindOne:(t,n={})=>this.request({path:`/knowledge-base/${t}`,method:"GET",secure:!0,format:"json",...n}),knowledgeBaseControllerUpdate:(t,n,i={})=>this.request({path:`/knowledge-base/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),knowledgeBaseControllerRemove:(t,n={})=>this.request({path:`/knowledge-base/${t}`,method:"DELETE",secure:!0,format:"json",...n})});R(this,"structuredOutput",{structuredOutputControllerFindAll:(t,
38n={})=>this.request({path:"/structured-output",method:"GET",query:t,secure:!0,format:"json",...n}),structuredOutputControllerCreate:(t,n={})=>this.request({path:"/structured-output",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),structuredOutputControllerFindOne:(t,n={})=>this.request({path:`/structured-output/${t}`,method:"GET",secure:!0,format:"json",...n}),structuredOutputControllerUpdate:(t,n,i,s={})=>this.request({path:`/structured-output/${t}`,method:"PATCH",query:n,body:i,secure:!0,type:M.Json,format:"json",...s}),structuredOutputControllerRemove:(t,n={})=>this.request({path:`/structured-output/${t}`,method:"DELETE",secure:!0,format:"json",...n}),structuredOutputControllerRun:(t,n={})=>this.request({path:"/structured-output/run",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),structuredOutputControllerSuggest:(t,n={})=>this.request({path:"/structured-output/suggest",method:"POST",body:t,secure:!0,type:M.Json,...n})});R(this,"testSuite",{testSuiteControllerFindAllPaginated:(t,n={})=>this.request({path:"/test-suite",method:"GET",query:t,secure:!0,format:"json",...n}),testSuiteControllerCreate:(t,n={})=>this.request({path:"/test-suite",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),testSuiteControllerFindOne:(t,n={})=>this.request({path:`/test-suite/${t}`,method:"GET",secure:!0,format:"json",...n}),testSuiteControllerUpdate:(t,n,i={})=>this.request({path:`/test-suite/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),testSuiteControllerRemove:(t,n={})=>this.request({path:`/test-suite/${t}`,method:"DELETE",secure:!0,format:"json",...n}),testSuiteTestControllerFindAllPaginated:(t,n,i={})=>this.request({path:`/test-suite/${t}/test`,method:"GET",query:n,secure:!0,format:"json",...i}),testSuiteTestControllerCreate:(t,n,i={})=>this.request({path:`/test-suite/${t}/test`,method:"POST",body:n,secure:!0,type:M.Json,format:"json",...i}),testSuiteTestControllerFindOne:(t,n,i={})=>this.request({path:`/test-suite/${t}/test/${n}`,method:"GET",secure:!0,format:"json",...i}),testSuiteTestControllerUpdate:(t,n,i,s={})=>this.request({path:`/test-suite/${t}/test/${n}`,method:"PATCH",body:i,secure:!0,type:M.Json,format:"json",...s}),testSuiteTestControllerRemove:(t,n,i={})=>this.request({path:`/test-suite/${t}/test/${n}`,method:"DELETE",secure:!0,format:"json",...i}),testSuiteRunControllerFindAllPaginated:(t,n,i={})=>this.request({path:`/test-suite/${t}/run`,method:"GET",query:n,secure:!0,format:"json",...i}),testSuiteRunControllerCreate:(t,n,i={})=>this.request({path:`/test-suite/${t}/run`,method:"POST",body:n,secure:!0,type:M.Json,format:"json",...i}),testSuiteRunControllerFindOne:(t,n,i={})=>this.request({path:`/test-suite/${t}/run/${n}`,method:"GET",secure:!0,format:"json",...i}),testSuiteRunControllerUpdate:(t,n,i,s={})=>this.request({path:`/test-suite/${t}/run/${n}`,method:"PATCH",body:i,secure:!0,type:M.Json,format:"json",...s}),testSuiteRunControllerRemove:(t,n,i={})=>this.request({path:`/test-suite/${t}/run/${n}`,method:"DELETE",secure:!0,format:"json",...i})});R(this,"reporting",{insightControllerCreate:(t,n={})=>this.request({path:"/reporting/insight",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),insightControllerFindAll:(t,n={})=>this.request({path:"/reporting/insight",method:"GET",query:t,secure:!0,format:"json",...n}),insightControllerUpdate:(t,n,i={})=>this.request({path:`/reporting/insight/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),insightControllerFindOne:(t,n={})=>this.request({path:`/reporting/insight/${t}`,method:"GET",secure:!0,format:"json",...n}),insightControllerRemove:(t,n={})=>this.request({path:`/reporting/insight/${t}`,method:"DELETE",secure:!0,format:"json",...n}),insightControllerRun:(t,n,i={})=>this.request({path:`/reporting/insight/${t}/run`,method:"POST",body:n,secure:!0,type:M.Json,format:"json",...i}),insightControllerPreview:(t,n={})=>this.request({path:"/reporting/insight/preview",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n})});R(this,"eval",{evalControllerCreate:(t,n={})=>this.request({path:"/eval",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),evalControllerGetPaginated:(t,n={})=>this.request({path:"/eval",method:"GET",query:t,secure:!0,format:"json",...n}
38),evalControllerUpdate:(t,n,i={})=>this.request({path:`/eval/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),evalControllerRemove:(t,n={})=>this.request({path:`/eval/${t}`,method:"DELETE",secure:!0,format:"json",...n}),evalControllerGet:(t,n={})=>this.request({path:`/eval/${t}`,method:"GET",secure:!0,format:"json",...n}),evalControllerRemoveRun:(t,n={})=>this.request({path:`/eval/run/${t}`,method:"DELETE",secure:!0,format:"json",...n}),evalControllerGetRun:(t,n={})=>this.request({path:`/eval/run/${t}`,method:"GET",secure:!0,format:"json",...n}),evalControllerRun:(t,n={})=>this.request({path:"/eval/run",method:"POST",body:t,secure:!0,type:M.Json,...n}),evalControllerGetRunsPaginated:(t,n={})=>this.request({path:"/eval/run",method:"GET",query:t,secure:!0,format:"json",...n})});R(this,"observability",{scorecardControllerGet:(t,n={})=>this.request({path:`/observability/scorecard/${t}`,method:"GET",secure:!0,format:"json",...n}),scorecardControllerUpdate:(t,n,i={})=>this.request({path:`/observability/scorecard/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),scorecardControllerRemove:(t,n={})=>this.request({path:`/observability/scorecard/${t}`,method:"DELETE",secure:!0,format:"json",...n}),scorecardControllerGetPaginated:(t,n={})=>this.request({path:"/observability/scorecard",method:"GET",query:t,secure:!0,format:"json",...n}),scorecardControllerCreate:(t,n={})=>this.request({path:"/observability/scorecard",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n})});R(this,"org",{orgControllerCreate:(t,n={})=>this.request({path:"/org",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),orgControllerFindAll:(t={})=>this.request({path:"/org",method:"GET",secure:!0,format:"json",...t}),orgControllerFeatureFlagEnabled:(t,n={})=>this.request({path:"/org/feature-flag",method:"GET",query:t,secure:!0,format:"json",...n}),orgControllerFindOne:(t,n={})=>this.request({path:`/org/${t}`,method:"GET",secure:!0,format:"json",...n}),orgControllerUpdate:(t,n,i={})=>this.request({path:`/org/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),orgControllerDeleteOrg:(t,n={})=>this.request({path:`/org/${t}`,method:"DELETE",secure:!0,...n}),orgControllerFindAllUsers:(t,n={})=>this.request({path:`/org/${t}/user`,method:"GET",secure:!0,format:"json",...n}),orgControllerOrgLeave:(t,n={})=>this.request({path:`/org/${t}/leave`,method:"DELETE",secure:!0,...n}),orgControllerOrgRemoveUser:(t,n,i={})=>this.request({path:`/org/${t}/member/${n}/leave`,method:"DELETE",secure:!0,...i}),orgControllerUsersInvite:(t,n,i={})=>this.request({path:`/org/${t}/invite`,method:"POST",body:n,secure:!0,type:M.Json,...i}),orgControllerUserUpdate:(t,n,i={})=>this.request({path:`/org/${t}/role`,method:"PATCH",body:n,secure:!0,type:M.Json,...i}),orgControllerOrgToken:(t,n={})=>this.request({path:`/org/${t}/auth`,method:"GET",secure:!0,format:"json",...n})});R(this,"token",{tokenControllerCreate:(t,n={})=>this.request({path:"/token",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),tokenControllerFindAll:(t,n={})=>this.request({path:"/token",method:"GET",query:t,secure:!0,format:"json",...n}),tokenControllerFindOne:(t,n={})=>this.request({path:`/token/${t}`,method:"GET",secure:!0,format:"json",...n}),tokenControllerUpdate:(t,n,i={})=>this.request({path:`/token/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),tokenControllerRemove:(t,n={})=>this.request({path:`/token/${t}`,method:"DELETE",secure:!0,format:"json",...n})});R(this,"credential",{credentialControllerCreate:(t,n={})=>this.request({path:"/credential",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),credentialControllerFindAll:(t,n={})=>this.request({path:"/credential",method:"GET",query:t,secure:!0,format:"json",...n}),credentialControllerFindOne:(t,n={})=>this.request({path:`/credential/${t}`,method:"GET",secure:!0,format:"json",...n}),credentialControllerUpdate:(t,n,i={})=>this.request({path:`/credential/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),credentialControllerRemove:(t,n={})=>this.request({path:`/credential/${t}`,method:"DELETE",secure:!0,format:"json",...n})});R(this,"template",{templateControllerCreate:(t,n={})=>this.request({path:"/template",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}
38),templateControllerFindAll:(t,n={})=>this.request({path:"/template",method:"GET",query:t,secure:!0,format:"json",...n}),templateControllerFindAllPinned:(t={})=>this.request({path:"/template/pinned",method:"GET",secure:!0,format:"json",...t}),templateControllerFindOne:(t,n={})=>this.request({path:`/template/${t}`,method:"GET",secure:!0,format:"json",...n}),templateControllerUpdate:(t,n,i={})=>this.request({path:`/template/${t}`,method:"PATCH",body:n,secure:!0,type:M.Json,format:"json",...i}),templateControllerRemove:(t,n={})=>this.request({path:`/template/${t}`,method:"DELETE",secure:!0,format:"json",...n})});R(this,"voiceLibrary",{voiceLibraryControllerVoiceGetByProvider:(t,n,i={})=>this.request({path:`/voice-library/${t}`,method:"GET",query:n,secure:!0,format:"json",...i}),voiceLibraryControllerVoiceGetAccentsByProvider:(t,n={})=>this.request({path:`/voice-library/${t}/accents`,method:"GET",secure:!0,format:"json",...n}),voiceLibraryControllerVoiceLibrarySyncByProvider:(t,n={})=>this.request({path:`/voice-library/sync/${t}`,method:"POST",secure:!0,format:"json",...n}),voiceLibraryControllerVoiceLibrarySyncDefaultVoices:(t,n={})=>this.request({path:"/voice-library/sync",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n}),voiceLibraryControllerVoiceLibraryCreateSesameVoice:(t,n={})=>this.request({path:"/voice-library/create-sesame-voice",method:"POST",body:t,secure:!0,type:M.Json,...n})});R(this,"provider",{providerResourceControllerCreateProviderResource:(t,n,i={})=>this.request({path:`/provider/${t}/${n}`,method:"POST",secure:!0,format:"json",...i}),providerResourceControllerGetProviderResourcesPaginated:(t,n,i,s={})=>this.request({path:`/provider/${t}/${n}`,method:"GET",query:i,secure:!0,format:"json",...s}),providerResourceControllerGetProviderResource:(t,n,i,s={})=>this.request({path:`/provider/${t}/${n}/${i}`,method:"GET",secure:!0,format:"json",...s}),providerResourceControllerDeleteProviderResource:(t,n,i,s={})=>this.request({path:`/provider/${t}/${n}/${i}`,method:"DELETE",secure:!0,format:"json",...s}),providerResourceControllerUpdateProviderResource:(t,n,i,s={})=>this.request({path:`/provider/${t}/${n}/${i}`,method:"PATCH",secure:!0,format:"json",...s}),providerControllerGetWorkflows:(t,n,i={})=>this.request({path:`/${t}/workflows`,method:"GET",query:n,secure:!0,format:"json",...i}),providerControllerGetWorkflowTriggerHook:(t,n,i={})=>this.request({path:`/${t}/workflows/${n}/hooks`,method:"GET",secure:!0,format:"json",...i}),providerControllerGetLocations:(t,n={})=>this.request({path:`/${t}/locations`,method:"GET",secure:!0,format:"json",...n}),voiceProviderControllerSearchVoices:(t,n,i={})=>this.request({path:`/${t}/voices/search`,method:"GET",query:n,secure:!0,format:"json",...i}),voiceProviderControllerSearchVoice:(t,n,i={})=>this.request({path:`/${t}/voice/search`,method:"GET",query:n,secure:!0,format:"json",...i}),voiceProviderControllerAddVoices:(t,n,i={})=>this.request({path:`/${t}/voices/add`,method:"POST",body:n,secure:!0,type:M.Json,format:"json",...i}),voiceProviderControllerAddVoice:(t,n,i={})=>this.request({path:`/${t}/voice/add`,method:"POST",body:n,secure:!0,type:M.Json,format:"json",...i})});R(this,"v11Labs",{voiceProviderControllerCloneVoices:(t,n={})=>this.request({path:"/11labs/voice/clone",method:"POST",body:t,secure:!0,type:M.FormData,...n})});R(this,"analytics",{analyticsControllerQuery:(t,n={})=>this.request({path:"/analytics",method:"POST",body:t,secure:!0,type:M.Json,format:"json",...n})})}}Le.Api=_u;Object.defineProperty(mr,"__esModule",{value:!0});mr.client=void 0;const Su=Le,wu=new Su.Api({baseUrl:"https://api.vapi.ai",baseApiParams:{secure:!0},securityWorker:async r=>{if(r)return{headers:{Authorization:`Bearer ${r}`}}}});mr.client=wu;var ht={};Object.defineProperty(ht,"__esModule",{value:!0});ht.createSafeDailyConfig=Eu;ht.safeSetLocalAudio=ku;ht.safeSetInputDevicesAsync=Cu;ht.createSafeDailyFactoryOptions=Tu;function Eu(r){if(!r)return{};const{alwaysIncludeMicInPermissionPrompt:e,...t}=r;return e===!1?(console.warn("[Vapi] alwaysIncludeMicInPermissionPrompt:false detected. This can cause Chrome 140+ issues. Removing the property."),t):r}function ku(r,e){if(!r)throw new Error("Call object is not available.");r.setLocalAudio(e)}async function Cu(r,e){if(!r)throw new Error("Call object is not available.");if("audioSource"in e&&e.audioSource===!1){console.warn("[Vapi] setInputDevicesAsync with audioSource:false detected. This can cause Chrome 140+ issues. Using default device instead.");const{audioSource:t,...n}=e;await r.setInputDevicesAsync(n);return}await r.setInputDevicesAsync(e)}function Tu(r){return r?r.audioSource===!1?(console.warn("[Vapi] audioSource:false detected in factory options. This can cause Chrome 140+ issues. Defaulting to true."),{...r,audioSource:!0}):r:{}}var La=Jn&&Jn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mn,"__esModule",{value:!0});const Nr=La(hu),Ou=La(bu),Rr=mr,$e=ht;async function Au(r,e){r.muted=!1,r.autoplay=!0,e!=null&&(r.srcObject=ne
38w MediaStream([e]),await r.play())}async function jo(r,e){const t=document.createElement("audio");return t.dataset.participantId=e,document.body.appendChild(t),await Au(t,r),t}function Lo(r){document.querySelector(`audio[data-participant-id="${r}"]`)?.remove()}function No(r,e,t,n){r.participant.local||e.updateParticipant(r.participant.session_id,{setSubscribedTracks:{audio:!0,video:t||n}})}class Mu extends Ou.default{on(e,t){return super.on(e,t),this}once(e,t){return super.once(e,t),this}emit(e,...t){return super.emit(e,...t)}removeListener(e,t){return super.removeListener(e,t),this}removeAllListeners(e){return super.removeAllListeners(e),this}}class Pu extends Mu{constructor(t,n,i,s){super();R(this,"started",!1);R(this,"call",null);R(this,"speakingTimeout",null);R(this,"dailyCallConfig",{});R(this,"dailyCallObject",{});R(this,"hasEmittedCallEndedStatus",!1);Rr.client.baseUrl=n??"https://api.vapi.ai",Rr.client.setSecurityData(t),this.dailyCallConfig=(0,$e.createSafeDailyConfig)(i),this.dailyCallObject=(0,$e.createSafeDailyFactoryOptions)(s)}async cleanup(){this.started=!1,this.hasEmittedCallEndedStatus=!1,this.call&&(await this.call.destroy(),this.call=null),this.speakingTimeout=null}isMobileDevice(){if(typeof navigator>"u")return!1;const t=navigator.userAgent;return/android|iphone|ipad|ipod|iemobile|blackberry|bada/i.test(t.toLowerCase())}async sleep(t){return new Promise(n=>setTimeout(n,t))}async start(t,n,i,s,a,l){const d=Date.now();if(!t&&!i&&!s){const h=new Error("Assistant or Squad or Workflow must be provided.");throw this.emit("error",{type:"validation-error",stage:"input-validation",message:h.message,timestamp:new Date().toISOString()}),h}if(this.started)return this.emit("call-start-progress",{stage:"validation",status:"failed",timestamp:new Date().toISOString(),metadata:{reason:"already-started"}}),null;this.emit("call-start-progress",{stage:"initialization",status:"started",timestamp:new Date().toISOString(),metadata:{hasAssistant:!!t,hasSquad:!!i,hasWorkflow:!!s}}),this.started=!0;try{this.emit("call-start-progress",{stage:"web-call-creation",status:"started",timestamp:new Date().toISOString()});const h=Date.now(),f=(await Rr.client.call.callControllerCreateWebCall({assistant:typeof t=="string"?void 0:t,assistantId:typeof t=="string"?t:void 0,assistantOverrides:n,squad:typeof i=="string"?void 0:i,squadId:typeof i=="string"?i:void 0,workflow:typeof s=="string"?void 0:s,workflowId:typeof s=="string"?s:void 0,workflowOverrides:a,roomDeleteOnUserLeaveEnabled:l?.roomDeleteOnUserLeaveEnabled})).data,y=Date.now()-h;this.emit("call-start-progress",{stage:"web-call-creation",status:"completed",duration:y,timestamp:new Date().toISOString(),metadata:{callId:f?.id||"unknown",videoRecordingEnabled:f?.artifactPlan?.videoRecordingEnabled??!1,voiceProvider:f?.assistant?.voice?.provider||"unknown"}}
38),this.call&&(this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"started",timestamp:new Date().toISOString(),metadata:{action:"cleanup-existing"}}),await this.cleanup());const T=f?.artifactPlan?.videoRecordingEnabled??!1,k=f?.assistant?.voice?.provider==="tavus";this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"started",timestamp:new Date().toISOString(),metadata:{audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??T,isVideoRecordingEnabled:T,isVideoEnabled:k}});const v=Date.now();try{this.call=Nr.default.createCallObject({audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??T,dailyConfig:this.dailyCallConfig});const w=Date.now()-v;this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"completed",duration:w,timestamp:new Date().toISOString()})}catch(w){const D=Date.now()-v;throw this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"failed",duration:D,timestamp:new Date().toISOString(),metadata:{error:w?.toString()}}),this.emit("error",{type:"daily-call-object-creation-error",stage:"daily-call-object-creation",error:w,timestamp:new Date().toISOString()}),w}this.call.iframe()?.style.setProperty("display","none"),this.call.on("left-meeting",()=>{this.emit("call-end"),this.hasEmittedCallEndedStatus||(this.emit("message",{type:"status-update",status:"ended",endedReason:"customer-ended-call"}),this.hasEmittedCallEndedStatus=!0),T&&this.call?.stopRecording(),this.cleanup().catch(console.error)}),this.call.on("error",w=>{this.emit("error",w),T&&this.call?.stopRecording()}),this.call.on("camera-error",w=>{this.emit("camera-error",w)}),this.call.on("network-quality-change",w=>{this.emit("network-quality-change",w)}),this.call.on("network-connection",w=>{this.emit("network-connection",w)}),this.call.on("track-started",async w=>{!w||!w.participant||w.participant?.local||w.participant?.user_name==="Vapi Speaker"&&(w.track.kind==="video"&&this.emit("video",w.track),w.track.kind==="audio"&&await jo(w.track,w.participant.session_id),this.call?.sendAppMessage("playable"))}),this.call.on("participant-joined",w=>{!w||!this.call||No(w,this.call,T,k)}),this.call.on("participant-updated",w=>{w&&this.emit("daily-participant-updated",w.participant)}),this.call.on("participant-left",w=>{w&&Lo(w.participant.session_id)});const g=this.isMobileDevice();if(this.emit("call-start-progress",{stage:"mobile-permissions",status:"started",timestamp:new Date().toISOString(),metadata:{isMobile:g}}),g){const w=Date.now();await this.sleep(1e3);const D=Date.now()-w;this.emit("call-start-progress",{stage:"mobile-permissions",status:"completed",duration:D,timestamp:new Date().toISOString(),metadata:{action:"permissions-wait"}})}else this.emit("call-start-progress",{stage:"mobile-permissions",status:"completed",timestamp:new Date().toISOString(),metadata:{action:"skipped-not-mobile"}});this.emit("call-start-progress",{stage:"daily-call-join",status:"started",timestamp:new Date().toISOString()});const _=Date.now();try{await this.call.join({url:f.webCallUrl,subscribeToTracksAutomatically:!1});const w=Date.now()-_;this.emit("call-start-progress",{stage:"daily-call-join",status:"completed",duration:w,timestamp:new Date().toISOString()})}catch(w){const D=Date.now()-_;throw this.emit("call-start-progress",{stage:"daily-call-join",status:"failed",duration:D,timestamp:new Date().toISOString(),metadata:{error:w?.toString()}}),this.emit("error",{type:"daily-call-join-error",stage:"daily-call-join",error:w,duration:D,timestamp:new Date().toISOString()}),w}if(T){this.emit("call-start-progress",{stage:"video-recording-setup",status:"started",timestamp:new Date().toISOString()});const w=new Date().getTime(),D=Date.now();try{this.call.startRecording({width:1280,height:720,backgroundColor:"#FF1F2D3D",layout:{preset:"default"}});const x=Date.now()-D;this.emit("call-start-progress",{stage:"video-recording-setup",status:"completed",duration:x,timestamp:new Date().toISOString()}),this.call.on("recording-started",()=>{const B=(new Date().getTime()-w)/1e3;
38this.emit("call-start-progress",{stage:"video-recording-started",status:"completed",timestamp:new Date().toISOString(),metadata:{delaySeconds:B}}),this.send({type:"control",control:"say-first-message",videoRecordingStartDelaySeconds:B})})}catch(x){const B=Date.now()-D;this.emit("call-start-progress",{stage:"video-recording-setup",status:"failed",duration:B,timestamp:new Date().toISOString(),metadata:{error:x?.toString()}}),this.emit("error",{type:"video-recording-setup-error",stage:"video-recording-setup",error:x,timestamp:new Date().toISOString()})}}else this.emit("call-start-progress",{stage:"video-recording-setup",status:"completed",timestamp:new Date().toISOString(),metadata:{action:"skipped-not-enabled"}});this.emit("call-start-progress",{stage:"audio-observer-setup",status:"started",timestamp:new Date().toISOString()});const S=Date.now();try{this.call.startRemoteParticipantsAudioLevelObserver(100);const w=Date.now()-S;this.emit("call-start-progress",{stage:"audio-observer-setup",status:"completed",duration:w,timestamp:new Date().toISOString()})}catch(w){const D=Date.now()-S;this.emit("call-start-progress",{stage:"audio-observer-setup",status:"failed",duration:D,timestamp:new Date().toISOString(),metadata:{error:w?.toString()}}),this.emit("error",{type:"audio-observer-setup-error",stage:"audio-observer-setup",error:w,timestamp:new Date().toISOString()})}this.call.on("remote-participants-audio-level",w=>{w&&this.handleRemoteParticipantsAudioLevel(w)}),this.call.on("app-message",w=>this.onAppMessage(w)),this.call.on("nonfatal-error",w=>{w?.type==="audio-processor-error"&&this.call?.updateInputSettings({audio:{processor:{type:"none"}}}).then(()=>{(0,$e.safeSetLocalAudio)(this.call,!0)})}),this.emit("call-start-progress",{stage:"audio-processing-setup",status:"started",timestamp:new Date().toISOString()});const A=Date.now();try{this.call.updateInputSettings({audio:{processor:{type:"noise-cancellation"}}});const w=Date.now()-A;this.emit("call-start-progress",{stage:"audio-processing-setup",status:"completed",duration:w,timestamp:new Date().toISOString()})}catch(w){const D=Date.now()-A;this.emit("call-start-progress",{stage:"audio-processing-setup",status:"failed",duration:D,timestamp:new Date().toISOString(),metadata:{error:w?.toString()}}),this.emit("error",{type:"audio-processing-setup-error",stage:"audio-processing-setup",error:w,timestamp:new Date().toISOString()})}const P=Date.now()-d;return this.emit("call-start-success",{totalDuration:P,callId:f?.id||"unknown",timestamp:new Date().toISOString()}),f}catch(h){const f=Date.now()-d;return this.emit("call-start-failed",{stage:"unknown",totalDuration:f,error:h?.toString()||"Unknown error occurred",errorStack:h instanceof Error?h.stack:"No stack trace available",timestamp:new Date().toISOString(),context:{hasAssistant:!!t,hasSquad:!!i,hasWorkflow:!!s,isMobile:this.isMobileDevice()}}),this.emit("error",{type:"start-method-error",stage:"unknown",error:h,totalDuration:f,timestamp:new Date().toISOString(),context:{hasAssistant:!!t,hasSquad:!!i,hasWorkflow:!!s,isMobile:this.isMobileDevice()}}),await this.cleanup(),null}}onAppMessage(t){if(t)try{if(t.data==="listening")return this.emit("call-start");try{const n=JSON.parse(t.data);this.emit("message",n),n&&"type"in n&&"status"in n&&n.type==="status-update"&&n.status==="ended"&&(this.hasEmittedCallEndedStatus=!0)}catch(n){console.log("Error parsing message data: ",n)}}catch(n){console.error(n)}}handleRemoteParticipantsAudioLevel(t){const n=Object.values(t.participantsAudioLevel).reduce((s,a)=>s+a,0);this.emit("volume-level",Math.min(1,n/.15)),n>.01&&(this.speakingTimeout?(clearTimeout(this.speakingTimeout),this.speakingTimeout=null):this.emit("speech-start"),this.speakingTimeout=setTimeout(()=>{this.emit("speech-end"),this.speakingTimeout=null},1e3))}async stop(){this.started=!1,this.call&&(await this.call.destroy(),this.call=null),this.speakingTimeout=null}send(t){this.call?.sendAppMessage(JSON.stringify(t))}setMuted(t){(0,$e.safeSetLocalAudio)(this.call,!t)}isMuted(){return this.call?this.call.localAudio()===!1:!1}say(t,n,i,s){this.send({type:"say",message:t,endCallAfterSpoken:n,interruptionsEnabled:i??!1,interruptAssistantEnabled:s??!1})}end(){this.send({type:"end-call"}),this.stop()}setInputDevicesAsync(t){return(0,$e.safeSetInputDevicesAsync)(this.call,t)}async increaseMicLevel(t){if(!this.call)throw new Error("Call object is not available.");try{const n=await navigator.mediaDevices.getUserMedia({audio:!0}),i=new AudioContext,s=i.createMediaStreamSource(n),a=i.createGain();a.gain.value=t,s.connect(a);const l=i.createMediaStreamDestination();a.connect(l);const[d]=l.stream.getAudioTracks();await(0,$e.safeSetInputDevicesAsync)(this.call,{audioSource:d})}
38catch(n){console.error("Error adjusting microphone level:",n)}}setOutputDeviceAsync(t){this.call?.setOutputDeviceAsync(t)}getDailyCallObject(){return this.call}startScreenSharing(t,n){this.call?.startScreenShare({displayMediaOptions:t,screenVideoSendSettings:n})}stopScreenSharing(){this.call?.stopScreenShare()}async reconnect(t){const n=Date.now();if(this.started)throw new Error("Cannot reconnect while a call is already in progress. Call stop() first.");if(!t.webCallUrl)throw new Error("webCallUrl is required for reconnection.");this.emit("call-start-progress",{stage:"reconnect-initialization",status:"started",timestamp:new Date().toISOString(),metadata:{callId:t.id||"unknown",hasVideoRecording:!!t?.artifactPlan?.videoRecordingEnabled,voiceProvider:t?.assistant?.voice?.provider||"unknown"}}),this.started=!0;try{this.call&&(this.emit("call-start-progress",{stage:"cleanup-existing-call",status:"started",timestamp:new Date().toISOString()}),await this.cleanup(),this.emit("call-start-progress",{stage:"cleanup-existing-call",status:"completed",timestamp:new Date().toISOString()}));const i=t?.artifactPlan?.videoRecordingEnabled??!1,s=t?.assistant?.voice?.provider==="tavus";this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"started",timestamp:new Date().toISOString(),metadata:{audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??i,isVideoRecordingEnabled:i,isVideoEnabled:s}});const a=Date.now();this.call=Nr.default.createCallObject({audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??i,dailyConfig:this.dailyCallConfig});const l=Date.now()-a;this.emit("call-start-progress",{stage:"daily-call-object-creation",status:"completed",duration:l,timestamp:new Date().toISOString()}),this.call.iframe()?.style.setProperty("display","none"),this.call.on("left-meeting",()=>{this.emit("call-end"),this.hasEmittedCallEndedStatus||(this.emit("message",{type:"status-update",status:"ended",endedReason:"customer-ended-call"}),this.hasEmittedCallEndedStatus=!0),i&&this.call?.stopRecording(),this.cleanup().catch(console.error)}),this.call.on("error",v=>{this.emit("error",v),i&&this.call?.stopRecording()}),this.call.on("camera-error",v=>{this.emit("camera-error",v)}),this.call.on("network-quality-change",v=>{this.emit("network-quality-change",v)}),this.call.on("network-connection",v=>{this.emit("network-connection",v)}),this.call.on("track-started",async v=>{!v||!v.participant||v.participant?.local||v.participant?.user_name==="Vapi Speaker"&&(v.track.kind==="video"&&this.emit("video",v.track),v.track.kind==="audio"&&await jo(v.track,v.participant.session_id),this.call?.sendAppMessage("playable"))}),this.call.on("participant-joined",v=>{!v||!this.call||No(v,this.call,i,s)}),this.call.on("participant-updated",v=>{v&&this.emit("daily-participant-updated",v.participant)}),this.call.on("participant-left",v=>{v&&Lo(v.participant.session_id)}),this.call.on("remote-participants-audio-level",v=>{v&&this.handleRemoteParticipantsAudioLevel(v)}),this.call.on("app-message",v=>this.onAppMessage(v)),this.call.on("nonfatal-error",v=>{v?.type==="audio-processor-error"&&this.call?.updateInputSettings({audio:{processor:{type:"none"}}}).then(()=>{(0,$e.safeSetLocalAudio)(this.call,!0)})});const d=this.isMobileDevice();if(this.emit("call-start-progress",{stage:"mobile-permissions",status:"started",timestamp:new Date().toISOString(),metadata:{isMobile:d}}),d){const v=Date.now();await this.sleep(1e3);const g=Date.now()-v;this.emit("call-start-progress",{stage:"mobile-permissions",status:"completed",duration:g,timestamp:new Date().toISOString(),metadata:{action:"permissions-wait"}})}else this.emit("call-start-progress",{stage:"mobile-permissions",status:"completed",timestamp:new Date().toISOString(),metadata:{action:"skipped-not-mobile"}});this.emit("call-start-progress",{stage:"daily-call-join",status:"started",timestamp:new Date().toISOString()});const h=Date.now();await this.call.join({url:t.webCallUrl,subscribeToTracksAutomatically:!1});const f=Date.now()-h;
38if(this.emit("call-start-progress",{stage:"daily-call-join",status:"completed",duration:f,timestamp:new Date().toISOString()}),i){this.emit("call-start-progress",{stage:"video-recording-setup",status:"started",timestamp:new Date().toISOString()});const v=Date.now(),g=new Date().getTime();try{this.call.startRecording({width:1280,height:720,backgroundColor:"#FF1F2D3D",layout:{preset:"default"}});const _=Date.now()-v;this.emit("call-start-progress",{stage:"video-recording-setup",status:"completed",duration:_,timestamp:new Date().toISOString()}),this.call.on("recording-started",()=>{const S=(new Date().getTime()-g)/1e3;this.emit("call-start-progress",{stage:"video-recording-started",status:"completed",timestamp:new Date().toISOString(),metadata:{delaySeconds:S}}),this.send({type:"control",control:"say-first-message",videoRecordingStartDelaySeconds:S})})}catch(_){const S=Date.now()-v;this.emit("call-start-progress",{stage:"video-recording-setup",status:"failed",duration:S,timestamp:new Date().toISOString(),metadata:{error:_?.toString()}})}}else this.emit("call-start-progress",{stage:"video-recording-setup",status:"completed",timestamp:new Date().toISOString(),metadata:{action:"skipped-not-enabled"}});this.emit("call-start-progress",{stage:"audio-observer-setup",status:"started",timestamp:new Date().toISOString()});const y=Date.now();try{this.call.startRemoteParticipantsAudioLevelObserver(100);const v=Date.now()-y;this.emit("call-start-progress",{stage:"audio-observer-setup",status:"completed",duration:v,timestamp:new Date().toISOString()})}catch(v){const g=Date.now()-y;this.emit("call-start-progress",{stage:"audio-observer-setup",status:"failed",duration:g,timestamp:new Date().toISOString(),metadata:{error:v?.toString()}})}this.emit("call-start-progress",{stage:"audio-processing-setup",status:"started",timestamp:new Date().toISOString()});const T=Date.now();try{this.call.updateInputSettings({audio:{processor:{type:"noise-cancellation"}}});const v=Date.now()-T;this.emit("call-start-progress",{stage:"audio-processing-setup",status:"completed",duration:v,timestamp:new Date().toISOString()})}catch(v){const g=Date.now()-T;this.emit("call-start-progress",{stage:"audio-processing-setup",status:"failed",duration:g,timestamp:new Date().toISOString(),metadata:{error:v?.toString()}})}const k=Date.now()-n;this.emit("call-start-success",{totalDuration:k,callId:t?.id||"unknown",timestamp:new Date().toISOString()}),this.emit("call-start")}catch(i){const s=Date.now()-n;throw this.emit("call-start-failed",{stage:"reconnect",totalDuration:s,error:i?.toString()||"Unknown error occurred",errorStack:i instanceof Error?i.stack:"No stack trace available",timestamp:new Date().toISOString(),context:{isReconnect:!0,callId:t?.id||"unknown",hasVideoRecording:!!t?.artifactPlan?.videoRecordingEnabled,voiceProvider:t?.assistant?.voice?.provider||"unknown",isMobile:this.isMobileDevice()}}),this.emit("error",{type:"reconnect-error",error:i,totalDuration:s,timestamp:new Date().toISOString(),context:{isReconnect:!0,callId:t?.id||"unknown",hasVideoRecording:!!t?.artifactPlan?.videoRecordingEnabled,voiceProvider:t?.assistant?.voice?.provider||"unknown",isMobile:this.isMobileDevice()}}),await this.cleanup(),i}}static async runNetworkTestsStandalone(){console.log("Starting standalone network connectivity tests...");const t={};let n=null;try{console.log("Creating temporary call object for testing..."),n=Nr.default.createCallObject({audioSource:!0,videoSource:!0}),console.log(`
391. Testing network connectivity (TURN server)...`);let i=null;try{i=(await navigator.mediaDevices.getUserMedia({video:!0})).getVideoTracks()[0];const a=await n.testNetworkConnectivity(i);t.networkConnectivity=a,console.log("Network connectivity test result:",a)}catch(s){t.networkConnectivity={result:"error",error:s?.toString()},console.error("Network connectivity test error:",s)}finally{i&&i.stop()}console.log(`
402. Testing websocket connectivity...`);try{const s=await n.testWebsocketConnectivity();t.websocketConnectivity=s,console.log("Websocket connectivity test result:",s)}catch(s){t.websocketConnectivity={result:"error",error:s?.toString()},console.error("Websocket connectivity test error:",s)}console.log(`
413. Testing call quality...`);try{if(typeof n.testCallQuality=="function")try{console.log("Initializing call state with startCamera..."),await n.startCamera();const s=await n.testCallQuality();t.callQuality=s,console.log("Call quality test result:",s)}catch(s){console.error("Failed to start camera for call quality test:",s),t.callQuality={result:"error",error:s?.toString(),message:"Failed to initialize camera for call quality test. Check camera permissions."}}else t.callQuality={result:"not-available",message:"testCallQuality method not available"},console.log("Call quality test not available in current Daily.co version")}catch(s){t.callQuality={result:"error",error:s?.toString()},console.error("Call quality test error:",s)}}catch(i){console.error("Failed to create temporary call object:",i),t.error=i?.toString()}finally{if(n)try{console.log("Cleaning up temporary call object..."),await n.destroy()}catch(i){console.error("Error destroying temporary call object:",i)}}return console.log(`
42=== Network Test Summary ===`),console.log("Results:",JSON.stringify(t,null,2)),t}}var Iu=mn.default=Pu;const Lu=Va({__proto__:null,default:Iu},[mn]);export{Iu as _,bu as e,Lu as v};

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.