@lemonsliceai/lemon-slice-widget 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +38 -0
  2. package/dist/index.js +42 -42
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,28 +1,28 @@
1
- var LemonSliceWidget=(function(ya){"use strict";var or,Q,Dc,Qt,Lc,jc,Rc,Vc,ba,_a,wa,Nc,sr={},Fc=[],Jm=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,cr=Array.isArray;function St(e,t){for(var n in t)e[n]=t[n];return e}function ka(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ae(e,t,n){var r,i,a,o={};for(a in t)a=="key"?r=t[a]:a=="ref"?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?or.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return lr(e,o,r,i,null)}function lr(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Dc,__i:-1,__u:0};return i==null&&Q.vnode!=null&&Q.vnode(a),a}function qm(){return{current:null}}function Ke(e){return e.children}function mt(e,t){this.props=e,this.context=t}function En(e,t){if(t==null)return e.__?En(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?En(e):null}function Bc(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Bc(e)}}function Sa(e){(!e.__d&&(e.__d=!0)&&Qt.push(e)&&!Xr.__r++||Lc!=Q.debounceRendering)&&((Lc=Q.debounceRendering)||jc)(Xr)}function Xr(){for(var e,t,n,r,i,a,o,s=1;Qt.length;)Qt.length>s&&Qt.sort(Rc),e=Qt.shift(),s=Qt.length,e.__d&&(n=void 0,r=void 0,i=(r=(t=e).__v).__e,a=[],o=[],t.__P&&((n=St({},r)).__v=r.__v+1,Q.vnode&&Q.vnode(n),xa(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[i]:null,a,i??En(r),!!(32&r.__u),o),n.__v=r.__v,n.__.__k[n.__i]=n,Jc(a,n,o),r.__e=r.__=null,n.__e!=i&&Bc(n)));Xr.__r=0}function $c(e,t,n,r,i,a,o,s,c,l,d){var f,p,g,y,v,b,_,k=r&&r.__k||Fc,T=t.length;for(c=Hm(n,t,k,c,T),f=0;f<T;f++)(g=n.__k[f])!=null&&(p=g.__i==-1?sr:k[g.__i]||sr,g.__i=f,b=xa(e,g,p,i,a,o,s,c,l,d),y=g.__e,g.ref&&p.ref!=g.ref&&(p.ref&&Ma(p.ref,null,g),d.push(g.ref,g.__c||y,g)),v==null&&y!=null&&(v=y),(_=!!(4&g.__u))||p.__k===g.__k?c=Uc(g,c,e,_):typeof g.type=="function"&&b!==void 0?c=b:y&&(c=y.nextSibling),g.__u&=-7);return n.__e=v,c}function Hm(e,t,n,r,i){var a,o,s,c,l,d=n.length,f=d,p=0;for(e.__k=new Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!="boolean"&&typeof o!="function"?(c=a+p,(o=e.__k[a]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?lr(null,o,null,null,null):cr(o)?lr(Ke,{children:o},null,null,null):o.constructor==null&&o.__b>0?lr(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,(l=o.__i=Gm(o,n,c,f))!=-1&&(f--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>d?p--:i<d&&p++),typeof o.type!="function"&&(o.__u|=4)):l!=c&&(l==c-1?p--:l==c+1?p++:(l>c?p--:p++,o.__u|=4))):e.__k[a]=null;if(f)for(a=0;a<d;a++)(s=n[a])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=En(s)),Hc(s,s));return r}function Uc(e,t,n,r){var i,a;if(typeof e.type=="function"){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=Uc(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=En(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function At(e,t){return t=t||[],e==null||typeof e=="boolean"||(cr(e)?e.some(function(n){At(n,t)}):t.push(e)),t}function Gm(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],d=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||d&&s==l.key&&c==l.type)return n;if(r>(d?1:0)){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&(2&l.__u)==0&&s==l.key&&c==l.type)return o}return-1}function zc(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Jm.test(t)?n:n+"px"}function Qr(e,t,n,r,i){var a,o;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||zc(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||zc(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(Vc,"$1")),o=t.toLowerCase(),t=o in e||t=="onFocusOut"||t=="onFocusIn"?o.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n.u=r.u:(n.u=ba,e.addEventListener(t,a?wa:_a,a)):e.removeEventListener(t,a?wa:_a,a);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Wc(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=ba++;else if(t.t<n.u)return;return n(Q.event?Q.event(t):t)}}}function xa(e,t,n,r,i,a,o,s,c,l){var d,f,p,g,y,v,b,_,k,T,M,x,C,A,E,R,F,j=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(d=Q.__b)&&d(t);e:if(typeof j=="function")try{if(_=t.props,k="prototype"in j&&j.prototype.render,T=(d=j.contextType)&&r[d.__c],M=d?T?T.props.value:d.__:r,n.__c?b=(f=t.__c=n.__c).__=f.__E:(k?t.__c=f=new j(_,M):(t.__c=f=new mt(_,M),f.constructor=j,f.render=Ym),T&&T.sub(f),f.props=_,f.state||(f.state={}),f.context=M,f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),k&&f.__s==null&&(f.__s=f.state),k&&j.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=St({},f.__s)),St(f.__s,j.getDerivedStateFromProps(_,f.__s))),g=f.props,y=f.state,f.__v=t,p)k&&j.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),k&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(k&&j.getDerivedStateFromProps==null&&_!==g&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(_,M),!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(_,f.__s,M)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=_,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(z){z&&(z.__=t)}),x=0;x<f._sb.length;x++)f.__h.push(f._sb[x]);f._sb=[],f.__h.length&&o.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(_,f.__s,M),k&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(g,y,v)})}if(f.context=M,f.props=_,f.__P=e,f.__e=!1,C=Q.__r,A=0,k){for(f.state=f.__s,f.__d=!1,C&&C(t),d=f.render(f.props,f.state,f.context),E=0;E<f._sb.length;E++)f.__h.push(f._sb[E]);f._sb=[]}else do f.__d=!1,C&&C(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++A<25);f.state=f.__s,f.getChildContext!=null&&(r=St(St({},r),f.getChildContext())),k&&!p&&f.getSnapshotBeforeUpdate!=null&&(v=f.getSnapshotBeforeUpdate(g,y)),R=d,d!=null&&d.type===Ke&&d.key==null&&(R=qc(d.props.children)),s=$c(e,cr(R)?R:[R],t,n,r,i,a,o,s,c,l),f.base=t.__e,t.__u&=-161,f.__h.length&&o.push(f),b&&(f.__E=f.__=null)}catch(z){if(t.__v=null,c||a!=null)if(z.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else{for(F=a.length;F--;)ka(a[F]);Ta(t)}else t.__e=n.__e,t.__k=n.__k,z.then||Ta(t);Q.__e(z,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=Km(n.__e,t,n,r,i,a,o,c,l);return(d=Q.diffed)&&d(t),128&t.__u?void 0:s}function Ta(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(Ta)}function Jc(e,t,n){for(var r=0;r<n.length;r++)Ma(n[r],n[++r],n[++r]);Q.__c&&Q.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(a){a.call(i)})}catch(a){Q.__e(a,i.__v)}})}function qc(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:cr(e)?e.map(qc):St({},e)}function Km(e,t,n,r,i,a,o,s,c){var l,d,f,p,g,y,v,b=n.props,_=t.props,k=t.type;if(k=="svg"?i="http://www.w3.org/2000/svg":k=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),a!=null){for(l=0;l<a.length;l++)if((g=a[l])&&"setAttribute"in g==!!k&&(k?g.localName==k:g.nodeType==3)){e=g,a[l]=null;break}}if(e==null){if(k==null)return document.createTextNode(_);e=document.createElementNS(i,k,_.is&&_),s&&(Q.__m&&Q.__m(t,a),s=!1),a=null}if(k==null)b===_||s&&e.data==_||(e.data=_);else{if(a=a&&or.call(e.childNodes),b=n.props||sr,!s&&a!=null)for(b={},l=0;l<e.attributes.length;l++)b[(g=e.attributes[l]).name]=g.value;for(l in b)if(g=b[l],l!="children"){if(l=="dangerouslySetInnerHTML")f=g;else if(!(l in _)){if(l=="value"&&"defaultValue"in _||l=="checked"&&"defaultChecked"in _)continue;Qr(e,l,null,g,i)}}for(l in _)g=_[l],l=="children"?p=g:l=="dangerouslySetInnerHTML"?d=g:l=="value"?y=g:l=="checked"?v=g:s&&typeof g!="function"||b[l]===g||Qr(e,l,g,b[l],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=""),$c(t.type=="template"?e.content:e,cr(p)?p:[p],t,n,r,k=="foreignObject"?"http://www.w3.org/1999/xhtml":i,a,o,a?a[0]:n.__k&&En(n,0),s,c),a!=null)for(l=a.length;l--;)ka(a[l]);s||(l="value",k=="progress"&&y==null?e.removeAttribute("value"):y!=null&&(y!==e[l]||k=="progress"&&!y||k=="option"&&y!=b[l])&&Qr(e,l,y,b[l],i),l="checked",v!=null&&v!=e[l]&&Qr(e,l,v,b[l],i))}return e}function Ma(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){Q.__e(i,n)}}function Hc(e,t,n){var r,i;if(Q.unmount&&Q.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Ma(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){Q.__e(a,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Hc(r[i],t,n||typeof e.type!="function");n||ka(e.__e),e.__c=e.__=e.__e=void 0}function Ym(e,t,n){return this.constructor(e,n)}function Ft(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),Q.__&&Q.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,a=[],o=[],xa(t,e=(!r&&n||t).__k=ae(Ke,null,[e]),i||sr,sr,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?or.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,o),Jc(a,e,o)}function Ca(e,t){Ft(e,t,Ca)}function Pa(e,t,n){var r,i,a,o,s=St({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?r=t[a]:a=="ref"?i=t[a]:s[a]=t[a]===void 0&&o!=null?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?or.call(arguments,2):n),lr(e.type,s,r||e.key,i||e.ref,null)}function Ie(e){function t(n){var r,i;return this.getChildContext||(r=new Set,(i={})[t.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(a){this.props.value!=a.value&&r.forEach(function(o){o.__e=!0,Sa(o)})},this.sub=function(a){r.add(a);var o=a.componentWillUnmount;a.componentWillUnmount=function(){r&&r.delete(a),o&&o.call(a)}}),n.children}return t.__c="__cC"+Nc++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}or=Fc.slice,Q={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(s){e=s}throw e}},Dc=0,mt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=St({},this.state),typeof e=="function"&&(e=e(St({},n),this.props)),e&&St(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Sa(this))},mt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Sa(this))},mt.prototype.render=Ke,Qt=[],jc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Rc=function(e,t){return e.__v.__b-t.__v.__b},Xr.__r=0,Vc=/(PointerCapture)$|Capture$/i,ba=0,_a=Wc(!1),wa=Wc(!0),Nc=0;function Zr(){return Zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zr.apply(this,arguments)}function Gc(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}var Xm=["context","children"],Qm=["useFragment"];function Zm(e,t,n,r){function i(){var a,o=Reflect.construct(HTMLElement,[],i);return o._vdomComponent=e,r&&r.shadow?(o._root=o.attachShadow({mode:r.mode||"open",serializable:(a=r.serializable)!=null&&a}),r.adoptedStyleSheets&&(o._root.adoptedStyleSheets=r.adoptedStyleSheets)):o._root=o,o}return(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=function(){tg.call(this,r)},i.prototype.attributeChangedCallback=ng,i.prototype.disconnectedCallback=rg,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,e.formAssociated&&(i.formAssociated=!0),n.forEach(function(a){Object.defineProperty(i.prototype,a,{get:function(){return this._vdom?this._vdom.props[a]:this._props[a]},set:function(o){this._vdom?this.attributeChangedCallback(a,null,o):(this._props||(this._props={}),this._props[a]=o);var s=typeof o;o!=null&&s!=="string"&&s!=="boolean"&&s!=="number"||this.setAttribute(a,o)}})}),customElements.define(t||e.tagName||e.displayName||e.name,i),i}function eg(e){this.getChildContext=function(){return e.context};var t=e.children,n=Gc(e,Xm);return Pa(t,n)}function tg(e){var t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=ae(eg,Zr({},this._props,{context:t.detail.context}),Xc(this,this._vdomComponent,e)),(this.hasAttribute("hydrate")?Ca:Ft)(this._vdom,this._root)}function Kc(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function ng(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Kc(e)]=n,this._vdom=Pa(this._vdom,r),Ft(this._vdom,this._root)}}function rg(){Ft(this._vdom=null,this._root)}function Yc(e,t){var n=this,r=e.useFragment,i=Gc(e,Qm);return ae(r?Ke:"slot",Zr({},i,{ref:function(a){a?(n.ref=a,n._listener||(n._listener=function(o){o.stopPropagation(),o.detail.context=t},a.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function Xc(e,t,n){if(e.nodeType===3)return e.data;if(e.nodeType!==1)return null;var r=[],i={},a=0,o=e.attributes,s=e.childNodes;for(a=o.length;a--;)o[a].name!=="slot"&&(i[o[a].name]=o[a].value,i[Kc(o[a].name)]=o[a].value);for(a=s.length;a--;){var c=Xc(s[a],null,n),l=s[a].slot;l?i[l]=ae(Yc,{name:l},c):r[a]=c}var d=!(!n||!n.shadow),f=t?ae(Yc,{useFragment:!d},r):r;return!d&&t&&(e.innerHTML=""),ae(t||e.nodeName.toLowerCase(),i,f)}var ig=0;function O(e,t,n,r,i,a){t||(t={});var o,s,c=t;if("ref"in c)for(s in c={},t)s=="ref"?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ig,__i:-1,__u:0,__source:i,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return Q.vnode&&Q.vnode(l),l}var Bt,we,Ea,Qc,An=0,Zc=[],Se=Q,el=Se.__b,tl=Se.__r,nl=Se.diffed,rl=Se.__c,il=Se.unmount,al=Se.__;function On(e,t){Se.__h&&Se.__h(we,e,An||t),An=0;var n=we.__H||(we.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Z(e){return An=1,ei(sl,e)}function ei(e,t,n){var r=On(Bt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):sl(void 0,t),function(s){var c=r.__N?r.__N[0]:r.__[0],l=r.t(c,s);c!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=we,!we.__f)){var i=function(s,c,l){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(p){return!!p.__c});if(d.every(function(p){return!p.__N}))return!a||a.call(this,s,c,l);var f=r.__c.props!==s;return d.forEach(function(p){if(p.__N){var g=p.__[0];p.__=p.__N,p.__N=void 0,g!==p.__[0]&&(f=!0)}}),a&&a.call(this,s,c,l)||f};we.__f=!0;var a=we.shouldComponentUpdate,o=we.componentWillUpdate;we.componentWillUpdate=function(s,c,l){if(this.__e){var d=a;a=void 0,i(s,c,l),a=d}o&&o.call(this,s,c,l)},we.shouldComponentUpdate=i}return r.__N||r.__}function X(e,t){var n=On(Bt++,3);!Se.__s&&Da(n.__H,t)&&(n.__=e,n.u=t,we.__H.__h.push(n))}function In(e,t){var n=On(Bt++,4);!Se.__s&&Da(n.__H,t)&&(n.__=e,n.u=t,we.__h.push(n))}function de(e){return An=5,Ve(function(){return{current:e}},[])}function Aa(e,t,n){An=6,In(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function Ve(e,t){var n=On(Bt++,7);return Da(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function N(e,t){return An=8,Ve(function(){return e},t)}function ge(e){var t=we.context[e.__c],n=On(Bt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(we)),t.props.value):e.__}function Xe(e,t){Se.useDebugValue&&Se.useDebugValue(t?t(e):e)}function Oa(){var e=On(Bt++,11);if(!e.__){for(var t=we.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ag(){for(var e;e=Zc.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ti),e.__H.__h.forEach(Ia),e.__H.__h=[]}catch(t){e.__H.__h=[],Se.__e(t,e.__v)}}Se.__b=function(e){we=null,el&&el(e)},Se.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),al&&al(e,t)},Se.__r=function(e){tl&&tl(e),Bt=0;var t=(we=e.__c).__H;t&&(Ea===we?(t.__h=[],we.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(ti),t.__h.forEach(Ia),t.__h=[],Bt=0)),Ea=we},Se.diffed=function(e){nl&&nl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Zc.push(t)!==1&&Qc===Se.requestAnimationFrame||((Qc=Se.requestAnimationFrame)||og)(ag)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ea=we=null},Se.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ti),n.__h=n.__h.filter(function(r){return!r.__||Ia(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],Se.__e(r,n.__v)}}),rl&&rl(e,t)},Se.unmount=function(e){il&&il(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ti(r)}catch(i){t=i}}),n.__H=void 0,t&&Se.__e(t,n.__v))};var ol=typeof requestAnimationFrame=="function";function og(e){var t,n=function(){clearTimeout(r),ol&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);ol&&(t=requestAnimationFrame(n))}function ti(e){var t=we,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),we=t}function Ia(e){var t=we;e.__c=e.__(),we=t}function Da(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function sl(e,t){return typeof t=="function"?t(e):t}const Dn={};function cl(e){return"init"in e}function La(e){return!!e.write}function ll(e){return"v"in e||"e"in e}function ni(e){if("e"in e)throw e.e;if((Dn?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}const ri=new WeakMap;function ul(e){var t;return ii(e)&&!!((t=ri.get(e))!=null&&t[0])}function sg(e){const t=ri.get(e);t?.[0]&&(t[0]=!1,t[1].forEach(n=>n()))}function ja(e,t){let n=ri.get(e);if(!n){n=[!0,new Set],ri.set(e,n);const r=()=>{n[0]=!1};e.then(r,r)}n[1].add(t)}function ii(e){return typeof e?.then=="function"}function dl(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function fl(e,t,n){var r;const i=new Set;for(const a of((r=n.get(e))==null?void 0:r.t)||[])n.has(a)&&i.add(a);for(const a of t.p)i.add(a);return i}const cg=(e,t,...n)=>t.read(...n),lg=(e,t,...n)=>t.write(...n),ug=(e,t)=>{var n;return(n=t.unstable_onInit)==null?void 0:n.call(t,e)},dg=(e,t,n)=>{var r;return(r=t.onMount)==null?void 0:r.call(t,n)},fg=(e,t)=>{const n=Ne(e),r=n[0],i=n[9];if((Dn?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let a=r.get(t);return a||(a={d:new Map,p:new Set,n:0},r.set(t,a),i?.(e,t)),a},hg=e=>{const t=Ne(e),n=t[1],r=t[3],i=t[4],a=t[5],o=t[6],s=t[13],c=[],l=d=>{try{d()}catch(f){c.push(f)}};do{o.f&&l(o.f);const d=new Set,f=d.add.bind(d);r.forEach(p=>{var g;return(g=n.get(p))==null?void 0:g.l.forEach(f)}),r.clear(),a.forEach(f),a.clear(),i.forEach(f),i.clear(),d.forEach(l),r.size&&s(e)}while(r.size||a.size||i.size);if(c.length)throw new AggregateError(c)},pg=e=>{const t=Ne(e),n=t[1],r=t[2],i=t[3],a=t[11],o=t[14],s=t[17],c=[],l=new WeakSet,d=new WeakSet,f=Array.from(i);for(;f.length;){const p=f[f.length-1],g=a(e,p);if(d.has(p)){f.pop();continue}if(l.has(p)){if(r.get(p)===g.n)c.push([p,g]);else if((Dn?"production":void 0)!=="production"&&r.has(p))throw new Error("[Bug] invalidated atom exists");d.add(p),f.pop();continue}l.add(p);for(const y of fl(p,g,n))l.has(y)||f.push(y)}for(let p=c.length-1;p>=0;--p){const[g,y]=c[p];let v=!1;for(const b of y.d.keys())if(b!==g&&i.has(b)){v=!0;break}v&&(o(e,g),s(e,g)),r.delete(g)}},mg=(e,t)=>{var n,r;const i=Ne(e),a=i[1],o=i[2],s=i[3],c=i[6],l=i[7],d=i[11],f=i[12],p=i[13],g=i[14],y=i[16],v=i[17],b=d(e,t);if(ll(b)&&(a.has(t)&&o.get(t)!==b.n||Array.from(b.d).every(([E,R])=>g(e,E).n===R)))return b;b.d.clear();let _=!0;function k(){a.has(t)&&(v(e,t),p(e),f(e))}function T(E){var R;if(E===t){const j=d(e,E);if(!ll(j))if(cl(E))ai(e,E,E.init);else throw new Error("no atom init");return ni(j)}const F=g(e,E);try{return ni(F)}finally{b.d.set(E,F.n),ul(b.v)&&dl(t,b.v,F),(R=a.get(E))==null||R.t.add(t),_||k()}}let M,x;const C={get signal(){return M||(M=new AbortController),M.signal},get setSelf(){return(Dn?"production":void 0)!=="production"&&!La(t)&&console.warn("setSelf function cannot be used with read-only atom"),!x&&La(t)&&(x=(...E)=>{if((Dn?"production":void 0)!=="production"&&_&&console.warn("setSelf function cannot be called in sync"),!_)try{return y(e,t,...E)}finally{p(e),f(e)}}),x}},A=b.n;try{const E=l(e,t,T,C);return ai(e,t,E),ii(E)&&(ja(E,()=>M?.abort()),E.then(k,k)),(n=c.r)==null||n.call(c,t),b}catch(E){return delete b.v,b.e=E,++b.n,b}finally{_=!1,A!==b.n&&o.get(t)===A&&(o.set(t,b.n),s.add(t),(r=c.c)==null||r.call(c,t))}},gg=(e,t)=>{const n=Ne(e),r=n[1],i=n[2],a=n[11],o=[t];for(;o.length;){const s=o.pop(),c=a(e,s);for(const l of fl(s,c,r)){const d=a(e,l);i.set(l,d.n),o.push(l)}}},hl=(e,t,...n)=>{const r=Ne(e),i=r[3],a=r[6],o=r[8],s=r[11],c=r[12],l=r[13],d=r[14],f=r[15],p=r[17];let g=!0;const y=b=>ni(d(e,b)),v=(b,..._)=>{var k;const T=s(e,b);try{if(b===t){if(!cl(b))throw new Error("atom not writable");const M=T.n,x=_[0];ai(e,b,x),p(e,b),M!==T.n&&(i.add(b),(k=a.c)==null||k.call(a,b),f(e,b));return}else return hl(e,b,..._)}finally{g||(l(e),c(e))}};try{return o(e,t,y,v,...n)}finally{g=!1}},vg=(e,t)=>{var n;const r=Ne(e),i=r[1],a=r[3],o=r[6],s=r[11],c=r[15],l=r[18],d=r[19],f=s(e,t),p=i.get(t);if(p&&!ul(f.v)){for(const[g,y]of f.d)if(!p.d.has(g)){const v=s(e,g);l(e,g).t.add(t),p.d.add(g),y!==v.n&&(a.add(g),(n=o.c)==null||n.call(o,g),c(e,g))}for(const g of p.d||[])if(!f.d.has(g)){p.d.delete(g);const y=d(e,g);y?.t.delete(t)}}},pl=(e,t)=>{var n;const r=Ne(e),i=r[1],a=r[4],o=r[6],s=r[10],c=r[11],l=r[12],d=r[13],f=r[14],p=r[16],g=c(e,t);let y=i.get(t);if(!y){f(e,t);for(const v of g.d.keys())pl(e,v).t.add(t);if(y={l:new Set,d:new Set(g.d.keys()),t:new Set},i.set(t,y),(n=o.m)==null||n.call(o,t),La(t)){const v=()=>{let b=!0;const _=(...k)=>{try{return p(e,t,...k)}finally{b||(d(e),l(e))}};try{const k=s(e,t,_);k&&(y.u=()=>{b=!0;try{k()}finally{b=!1}})}finally{b=!1}};a.add(v)}}return y},yg=(e,t)=>{var n;const r=Ne(e),i=r[1],a=r[5],o=r[6],s=r[11],c=r[19],l=s(e,t);let d=i.get(t);if(d&&!d.l.size&&!Array.from(d.t).some(f=>{var p;return(p=i.get(f))==null?void 0:p.d.has(t)})){d.u&&a.add(d.u),d=void 0,i.delete(t),(n=o.u)==null||n.call(o,t);for(const f of l.d.keys()){const p=c(e,f);p?.t.delete(t)}return}return d},ai=(e,t,n)=>{const r=Ne(e)[11],i=r(e,t),a="v"in i,o=i.v;if(ii(n))for(const s of i.d.keys())dl(t,n,r(e,s));i.v=n,delete i.e,(!a||!Object.is(o,i.v))&&(++i.n,ii(o)&&sg(o))},bg=(e,t)=>{const n=Ne(e)[14];return ni(n(e,t))},_g=(e,t,...n)=>{const r=Ne(e),i=r[12],a=r[13],o=r[16];try{return o(e,t,...n)}finally{a(e),i(e)}},wg=(e,t,n)=>{const r=Ne(e),i=r[12],a=r[18],o=r[19],c=a(e,t).l;return c.add(n),i(e),()=>{c.delete(n),o(e,t),i(e)}},ml=new WeakMap,Ne=e=>{const t=ml.get(e);if((Dn?"production":void 0)!=="production"&&!t)throw new Error("Store must be created by buildStore to read its building blocks");return t};function kg(...e){const t={get(r){const i=Ne(t)[21];return i(t,r)},set(r,...i){const a=Ne(t)[22];return a(t,r,...i)},sub(r,i){const a=Ne(t)[23];return a(t,r,i)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},cg,lg,ug,dg,fg,hg,pg,mg,gg,hl,vg,pl,yg,ai,bg,_g,wg,void 0].map((r,i)=>e[i]||r);return ml.set(t,Object.freeze(n)),t}const gl={};let Sg=0;function oe(e,t){const n=`atom${++Sg}`,r={toString(){return(gl?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=xg,r.write=Tg),t&&(r.write=t),r}function xg(e){return e(this)}function Tg(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}function vl(){return kg()}let ur;function Mg(){return ur||(ur=vl(),(gl?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=ur),globalThis.__JOTAI_DEFAULT_STORE__!==ur&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),ur}const Cg={};function dr(e,t){let n=null;const r=new Map,i=new Set,a=s=>{let c;if(c=r.get(s),c!==void 0)if(n?.(c[1],s))a.remove(s);else return c[0];const l=e(s);return r.set(s,[l,Date.now()]),o("CREATE",s,l),l},o=(s,c,l)=>{for(const d of i)d({type:s,param:c,atom:l})};return a.unstable_listen=s=>(i.add(s),()=>{i.delete(s)}),a.getParams=()=>r.keys(),a.remove=s=>{{if(!r.has(s))return;const[c]=r.get(s);r.delete(s),o("REMOVE",s,c)}},a.setShouldRemove=s=>{if(n=s,!!n)for(const[c,[l,d]]of r)n(d,c)&&(r.delete(c),o("REMOVE",c,l))},a}const Pg=e=>typeof e?.then=="function";function Eg(e=()=>{try{return window.localStorage}catch(n){(Cg?"production":void 0)!=="production"&&typeof window<"u"&&console.warn(n);return}},t){var n;let r,i;const a={getItem:(c,l)=>{var d,f;const p=y=>{if(y=y||"",r!==y){try{i=JSON.parse(y,t?.reviver)}catch{return l}r=y}return i},g=(f=(d=e())==null?void 0:d.getItem(c))!=null?f:null;return Pg(g)?g.then(p):p(g)},setItem:(c,l)=>{var d;return(d=e())==null?void 0:d.setItem(c,JSON.stringify(l,void 0))},removeItem:c=>{var l;return(l=e())==null?void 0:l.removeItem(c)}},o=c=>(l,d,f)=>c(l,p=>{let g;try{g=JSON.parse(p||"")}catch{g=f}d(g)});let s;try{s=(n=e())==null?void 0:n.subscribe}catch{}return!s&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(s=(c,l)=>{if(!(e()instanceof window.Storage))return()=>{};const d=f=>{f.storageArea===e()&&f.key===c&&l(f.newValue)};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}}),s&&(a.subscribe=o(s)),a}Eg();function yl(e,t){for(var n in t)e[n]=t[n];return e}function Ra(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function bl(e,t){var n=t(),r=Z({t:{__:n,u:t}}),i=r[0].t,a=r[1];return In(function(){i.__=n,i.u=t,Va(i)&&a({t:i})},[e,n,t]),X(function(){return Va(i)&&a({t:i}),e(function(){Va(i)&&a({t:i})})},[e]),n}function Va(e){var t,n,r=e.u,i=e.__;try{var a=r();return!((t=i)===(n=a)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}function _l(e){e()}function wl(e){return e}function kl(){return[!1,_l]}var Na=In;function Fa(e,t){this.props=e,this.context=t}function Ba(e,t){function n(i){var a=this.props.ref,o=a==i.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,i)||!o:Ra(this.props,i)}function r(i){return this.shouldComponentUpdate=n,ae(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}(Fa.prototype=new mt).isPureReactComponent=!0,Fa.prototype.shouldComponentUpdate=function(e,t){return Ra(this.props,e)||Ra(this.state,t)};var Sl=Q.__b;Q.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Sl&&Sl(e)};var Ag=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Qe(e){function t(n){var r=yl({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Ag,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var xl=function(e,t){return e==null?null:At(At(e).map(t))},Og={map:xl,forEach:xl,count:function(e){return e?At(e).length:0},only:function(e){var t=At(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:At},Ig=Q.__e;Q.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Ig(e,t,n,r)};var Tl=Q.unmount;function Ml(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=yl({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Ml(r,t,n)})),e}function Cl(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Cl(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function oi(){this.__u=0,this.o=null,this.__b=null}function Pl(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Dg(e){var t,n,r;function i(a){if(t||(t=e()).then(function(o){n=o.default||o},function(o){r=o}),r)throw r;if(!n)throw t;return ae(n,a)}return i.displayName="Lazy",i.__f=!0,i}function fr(){this.i=null,this.l=null}Q.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Tl&&Tl(e)},(oi.prototype=new mt).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=Pl(r.__v),a=!1,o=function(){a||(a=!0,n.__R=null,i?i(s):s())};n.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=Cl(c,c.__c.__P,c.__c.__O)}var l;for(r.setState({__a:r.__b=null});l=r.o.pop();)l.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},oi.prototype.componentWillUnmount=function(){this.o=[]},oi.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ml(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&ae(Ke,null,e.fallback);return i&&(i.__u&=-33),[ae(Ke,null,t.__a?null:e.children),i]};var El=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function Lg(e){return this.getChildContext=function(){return e.context},e.children}function jg(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){Ft(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(i,a){this.childNodes.push(i),t.h.insertBefore(i,a)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),t.h.removeChild(i)}}}Ft(ae(Lg,{context:t.context},e.__v),t.v)}function Rg(e,t){var n=ae(jg,{__v:e,h:t});return n.containerInfo=t,n}(fr.prototype=new mt).__a=function(e){var t=this,n=Pl(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),El(t,e,r)):i()};n?n(a):a()}},fr.prototype.render=function(e){this.i=null,this.l=new Map;var t=At(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},fr.prototype.componentDidUpdate=fr.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){El(e,n,t)})};var Al=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Vg=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ng=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Fg=/[A-Z0-9]/g,Bg=typeof document<"u",$g=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Ug(e,t,n){return t.__k==null&&(t.textContent=""),Ft(e,t),typeof n=="function"&&n(),e?e.__c:null}function zg(e,t,n){return Ca(e,t),typeof n=="function"&&n(),e?e.__c:null}mt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(mt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ol=Q.event;function Wg(){}function Jg(){return this.cancelBubble}function qg(){return this.defaultPrevented}Q.event=function(e){return Ol&&(e=Ol(e)),e.persist=Wg,e.isPropagationStopped=Jg,e.isDefaultPrevented=qg,e.nativeEvent=e};var $a,Hg={enumerable:!1,configurable:!0,get:function(){return this.class}},Il=Q.vnode;Q.vnode=function(e){typeof e.type=="string"&&(function(t){var n=t.props,r=t.type,i={},a=r.indexOf("-")===-1;for(var o in n){var s=n[o];if(!(o==="value"&&"defaultValue"in n&&s==null||Bg&&o==="children"&&r==="noscript"||o==="class"||o==="className")){var c=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&s===!0?s="":c==="translate"&&s==="no"?s=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?o="ondblclick":c!=="onchange"||r!=="input"&&r!=="textarea"||$g(n.type)?c==="onfocus"?o="onfocusin":c==="onblur"?o="onfocusout":Ng.test(o)&&(o=c):c=o="oninput":a&&Vg.test(o)?o=o.replace(Fg,"-$&").toLowerCase():s===null&&(s=void 0),c==="oninput"&&i[o=c]&&(o="oninputCapture"),i[o]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=At(n.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=At(n.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",Hg)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i})(e),e.$$typeof=Al,Il&&Il(e)};var Dl=Q.__r;Q.__r=function(e){Dl&&Dl(e),$a=e.__c};var Ll=Q.diffed;Q.diffed=function(e){Ll&&Ll(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),$a=null};var Gg={ReactCurrentDispatcher:{current:{readContext:function(e){return $a.__n[e.__c].props.value},useCallback:N,useContext:ge,useDebugValue:Xe,useDeferredValue:wl,useEffect:X,useId:Oa,useImperativeHandle:Aa,useInsertionEffect:Na,useLayoutEffect:In,useMemo:Ve,useReducer:ei,useRef:de,useState:Z,useSyncExternalStore:bl,useTransition:kl}}};function Kg(e){return ae.bind(null,e)}function si(e){return!!e&&e.$$typeof===Al}function Yg(e){return si(e)&&e.type===Ke}function Xg(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Qg(e){return si(e)?Pa.apply(null,arguments):e}function Zg(e){return!!e.__k&&(Ft(null,e),!0)}function ev(e){return e&&(e.base||e.nodeType===1&&e)||null}var tv=function(e,t){return e(t)},nv=function(e,t){return e(t)},rv=Ke,iv=si,le={useState:Z,useId:Oa,useReducer:ei,useEffect:X,useLayoutEffect:In,useInsertionEffect:Na,useTransition:kl,useDeferredValue:wl,useSyncExternalStore:bl,startTransition:_l,useRef:de,useImperativeHandle:Aa,useMemo:Ve,useCallback:N,useContext:ge,useDebugValue:Xe,version:"18.3.1",Children:Og,render:Ug,hydrate:zg,unmountComponentAtNode:Zg,createPortal:Rg,createElement:ae,createContext:Ie,createFactory:Kg,cloneElement:Qg,createRef:qm,Fragment:Ke,isValidElement:si,isElement:iv,isFragment:Yg,isMemo:Xg,findDOMNode:ev,Component:mt,PureComponent:Fa,memo:Ba,forwardRef:Qe,flushSync:nv,unstable_batchedUpdates:tv,StrictMode:rv,Suspense:oi,SuspenseList:fr,lazy:Dg,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Gg};const av={},Ua=Ie(void 0);function jl(e){return ge(Ua)||Mg()}function ov({children:e,store:t}){const n=de(null);return t?ae(Ua.Provider,{value:t},e):(n.current===null&&(n.current=vl()),ae(Ua.Provider,{value:n.current},e))}const za=e=>typeof e?.then=="function",Wa=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},sv=le.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(Wa(e),e)}),Ja=new WeakMap,Rl=(e,t)=>{let n=Ja.get(e);return n||(n=new Promise((r,i)=>{let a=e;const o=l=>d=>{a===l&&r(d)},s=l=>d=>{a===l&&i(d)},c=()=>{try{const l=t();za(l)?(Ja.set(l,n),a=l,l.then(o(l),s(l)),ja(l,c)):r(l)}catch(l){i(l)}};e.then(o(e),s(e)),ja(e,c)}),Ja.set(e,n)),n};function Zt(e,t){const{delay:n,unstable_promiseStatus:r=!le.use}={},i=jl(),[[a,o,s],c]=ei(d=>{const f=i.get(e);return Object.is(d[0],f)&&d[1]===i&&d[2]===e?d:[f,i,e]},void 0,()=>[i.get(e),i,e]);let l=a;if((o!==i||s!==e)&&(c(),l=i.get(e)),X(()=>{const d=i.sub(e,()=>{if(r)try{const f=i.get(e);za(f)&&Wa(Rl(f,()=>i.get(e)))}catch{}if(typeof n=="number"){setTimeout(c,n);return}c()});return c(),d},[i,e,n,r]),Xe(l),za(l)){const d=Rl(l,()=>i.get(e));return r&&Wa(d),sv(d)}return l}function cv(e,t){const n=jl();return N((...i)=>{if((av?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return n.set(e,...i)},[n,e])}function re(e,t){const n=Ve(()=>oe(null,(r,i,...a)=>e(r,i,...a)),[e]);return cv(n)}function Vl(e,t){if(e==null)return{};var n,r,i=(function(o,s){if(o==null)return{};var c={};for(var l in o)if({}.hasOwnProperty.call(o,l)){if(s.indexOf(l)!==-1)continue;c[l]=o[l]}return c})(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(e){return fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fe(e)}function Nl(e){var t=(function(n,r){if(fe(n)!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var a=i.call(n,r);if(fe(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(e,"string");return fe(t)=="symbol"?t:t+""}function Fl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nl(r.key),r)}}function et(e,t,n){return t&&Fl(e.prototype,t),n&&Fl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ci(e,t){if(t&&(fe(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n})(e)}function gt(e){return gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gt(e)}function hr(e,t){return hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},hr(e,t)}function li(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hr(e,t)}function xt(e,t,n){return(t=Nl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bl(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}function H(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(c){Bl(a,r,i,o,s,"next",c)}function s(c){Bl(a,r,i,o,s,"throw",c)}o(void 0)}))}}function $l(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Fe(e,t){return(function(n){if(Array.isArray(n))return n})(e)||(function(n,r){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var a,o,s,c,l=[],d=!0,f=!1;try{if(s=(i=i.call(n)).next,r===0){if(Object(i)!==i)return;d=!1}else for(;!(d=(a=s.call(i)).done)&&(l.push(a.value),l.length!==r);d=!0);}catch(p){f=!0,o=p}finally{try{if(!d&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(f)throw o}}return l}})(e,t)||(function(n,r){if(n){if(typeof n=="string")return $l(n,r);var i={}.toString.call(n).slice(8,-1);return i==="Object"&&n.constructor&&(i=n.constructor.name),i==="Map"||i==="Set"?Array.from(n):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?$l(n,r):void 0}})(e,t)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function lv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ul,ui={exports:{}},qa=(function(){if(Ul)return ui.exports;Ul=1;var e,t=typeof Reflect=="object"?Reflect:null,n=t&&typeof t.apply=="function"?t.apply:function(v,b,_){return Function.prototype.apply.call(v,b,_)};e=t&&typeof t.ownKeys=="function"?t.ownKeys:Object.getOwnPropertySymbols?function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:function(v){return Object.getOwnPropertyNames(v)};var r=Number.isNaN||function(v){return v!=v};function i(){i.init.call(this)}ui.exports=i,ui.exports.once=function(v,b){return new Promise((function(_,k){function T(x){v.removeListener(b,M),k(x)}function M(){typeof v.removeListener=="function"&&v.removeListener("error",T),_([].slice.call(arguments))}y(v,b,M,{once:!0}),b!=="error"&&(function(x,C,A){typeof x.on=="function"&&y(x,"error",C,A)})(v,T,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function o(v){if(typeof v!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof v)}function s(v){return v._maxListeners===void 0?i.defaultMaxListeners:v._maxListeners}function c(v,b,_,k){var T,M,x,C;if(o(_),(M=v._events)===void 0?(M=v._events=Object.create(null),v._eventsCount=0):(M.newListener!==void 0&&(v.emit("newListener",b,_.listener?_.listener:_),M=v._events),x=M[b]),x===void 0)x=M[b]=_,++v._eventsCount;else if(typeof x=="function"?x=M[b]=k?[_,x]:[x,_]:k?x.unshift(_):x.push(_),(T=s(v))>0&&x.length>T&&!x.warned){x.warned=!0;var A=new Error("Possible EventEmitter memory leak detected. "+x.length+" "+String(b)+" listeners added. Use emitter.setMaxListeners() to increase limit");A.name="MaxListenersExceededWarning",A.emitter=v,A.type=b,A.count=x.length,C=A,console&&console.warn&&console.warn(C)}return v}function l(){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 d(v,b,_){var k={fired:!1,wrapFn:void 0,target:v,type:b,listener:_},T=l.bind(k);return T.listener=_,k.wrapFn=T,T}function f(v,b,_){var k=v._events;if(k===void 0)return[];var T=k[b];return T===void 0?[]:typeof T=="function"?_?[T.listener||T]:[T]:_?(function(M){for(var x=new Array(M.length),C=0;C<x.length;++C)x[C]=M[C].listener||M[C];return x})(T):g(T,T.length)}function p(v){var b=this._events;if(b!==void 0){var _=b[v];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}function g(v,b){for(var _=new Array(b),k=0;k<b;++k)_[k]=v[k];return _}function y(v,b,_,k){if(typeof v.on=="function")k.once?v.once(b,_):v.on(b,_);else{if(typeof v.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof v);v.addEventListener(b,(function T(M){k.once&&v.removeEventListener(b,T),_(M)}))}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(v){if(typeof v!="number"||v<0||r(v))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+v+".");a=v}}),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(v){if(typeof v!="number"||v<0||r(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(v){for(var b=[],_=1;_<arguments.length;_++)b.push(arguments[_]);var k=v==="error",T=this._events;if(T!==void 0)k=k&&T.error===void 0;else if(!k)return!1;if(k){var M;if(b.length>0&&(M=b[0]),M instanceof Error)throw M;var x=new Error("Unhandled error."+(M?" ("+M.message+")":""));throw x.context=M,x}var C=T[v];if(C===void 0)return!1;if(typeof C=="function")n(C,this,b);else{var A=C.length,E=g(C,A);for(_=0;_<A;++_)n(E[_],this,b)}return!0},i.prototype.addListener=function(v,b){return c(this,v,b,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(v,b){return c(this,v,b,!0)},i.prototype.once=function(v,b){return o(b),this.on(v,d(this,v,b)),this},i.prototype.prependOnceListener=function(v,b){return o(b),this.prependListener(v,d(this,v,b)),this},i.prototype.removeListener=function(v,b){var _,k,T,M,x;if(o(b),(k=this._events)===void 0)return this;if((_=k[v])===void 0)return this;if(_===b||_.listener===b)--this._eventsCount==0?this._events=Object.create(null):(delete k[v],k.removeListener&&this.emit("removeListener",v,_.listener||b));else if(typeof _!="function"){for(T=-1,M=_.length-1;M>=0;M--)if(_[M]===b||_[M].listener===b){x=_[M].listener,T=M;break}if(T<0)return this;T===0?_.shift():(function(C,A){for(;A+1<C.length;A++)C[A]=C[A+1];C.pop()})(_,T),_.length===1&&(k[v]=_[0]),k.removeListener!==void 0&&this.emit("removeListener",v,x||b)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(v){var b,_,k;if((_=this._events)===void 0)return this;if(_.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):_[v]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete _[v]),this;if(arguments.length===0){var T,M=Object.keys(_);for(k=0;k<M.length;++k)(T=M[k])!=="removeListener"&&this.removeAllListeners(T);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(b=_[v])=="function")this.removeListener(v,b);else if(b!==void 0)for(k=b.length-1;k>=0;k--)this.removeListener(v,b[k]);return this},i.prototype.listeners=function(v){return f(this,v,!0)},i.prototype.rawListeners=function(v){return f(this,v,!1)},i.listenerCount=function(v,b){return typeof v.listenerCount=="function"?v.listenerCount(b):p.call(v,b)},i.prototype.listenerCount=p,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},ui.exports})(),di=lv(qa),zl=Object.prototype.hasOwnProperty;function Wl(e,t,n){for(n of e.keys())if(We(n,t))return n}function We(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&We(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if((i=r)&&typeof i=="object"&&!(i=Wl(t,i))||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if((i=r[0])&&typeof i=="object"&&!(i=Wl(t,i))||!We(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){for(n in r=0,e)if(zl.call(e,n)&&++r&&!zl.call(t,n)||!(n in t)||!We(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}const uv={"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"},Jl={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"},Me={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Je={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"},$t={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class I{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map((r=>parseInt(r,10)||0));if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map((r=>parseInt(r,10)||0));if(n.push(0),!(n[0]===1&&n[1]<5))return n[0]===1&&n[1]<6?"Cupcake":n[0]===1&&n[1]>=6?"Donut":n[0]===2&&n[1]<2?"Eclair":n[0]===2&&n[1]===2?"Froyo":n[0]===2&&n[1]>2?"Gingerbread":n[0]===3?"Honeycomb":n[0]===4&&n[1]<1?"Ice Cream Sandwich":n[0]===4&&n[1]<4?"Jelly Bean":n[0]===4&&n[1]>=4?"KitKat":n[0]===5?"Lollipop":n[0]===6?"Marshmallow":n[0]===7?"Nougat":n[0]===8?"Oreo":n[0]===9?"Pie":void 0}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=I.getVersionPrecision(t),a=I.getVersionPrecision(n);let o=Math.max(i,a),s=0;const c=I.map([t,n],(l=>{const d=o-I.getVersionPrecision(l),f=l+new Array(d+1).join(".0");return I.map(f.split("."),(p=>new Array(20-p.length).join("0")+p)).reverse()}));for(r&&(s=o-Math.min(i,a)),o-=1;o>=s;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===s)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}}static map(t,n){const r=[];let i;if(Array.prototype.map)return Array.prototype.map.call(t,n);for(i=0;i<t.length;i+=1)r.push(n(t[i]));return r}static find(t,n){let r,i;if(Array.prototype.find)return Array.prototype.find.call(t,n);for(r=0,i=t.length;r<i;r+=1){const a=t[r];if(n(a,r))return a}}static assign(t,...n){const r=t;let i,a;if(Object.assign)return Object.assign(t,...n);for(i=0,a=n.length;i<a;i+=1){const o=n[i];typeof o=="object"&&o!==null&&Object.keys(o).forEach((s=>{r[s]=o[s]}))}return t}static getBrowserAlias(t){return uv[t]}static getBrowserTypeByAlias(t){return Jl[t]||""}}const ve=/version\/(\d+(\.?_?\d+)+)/i,dv=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=I.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=I.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=I.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=I.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=I.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=I.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=I.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=I.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=I.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=I.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=I.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=I.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=I.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=I.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=I.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=I.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=I.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=I.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=I.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=I.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=I.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=I.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=I.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=I.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=I.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=I.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=I.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=e.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:I.getFirstMatch(t,e),version:I.getSecondMatch(t,e)}}}];var fv=[{test:[/Roku\/DVP/],describe(e){const t=I.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Je.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=I.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Je.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=I.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=I.getWindowsVersionName(t);return{name:Je.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:Je.iOS},n=I.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=I.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=I.getMacOSVersionName(t),r={name:Je.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=I.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Je.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=I.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=I.getAndroidVersionName(t),r={name:Je.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=I.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Je.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=I.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||I.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||I.getFirstMatch(/\bbb(\d+)/i,e);return{name:Je.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=I.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Je.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=I.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Je.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:Je.Linux})},{test:[/CrOS/],describe:()=>({name:Je.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=I.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Je.PlayStation4,version:t}}}],hv=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(e){const t=I.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Me.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:Me.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:Me.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:Me.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:Me.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:Me.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:Me.tablet})},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=I.getFirstMatch(/(ipod|iphone)/i,e);return{type:Me.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:Me.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:Me.mobile})},{test:e=>e.getBrowserName(!0)==="blackberry",describe:()=>({type:Me.mobile,vendor:"BlackBerry"})},{test:e=>e.getBrowserName(!0)==="bada",describe:()=>({type:Me.mobile})},{test:e=>e.getBrowserName()==="windows phone",describe:()=>({type:Me.mobile,vendor:"Microsoft"})},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe:()=>({type:Me.tablet})},{test:e=>e.getOSName(!0)==="android",describe:()=>({type:Me.mobile})},{test:e=>e.getOSName(!0)==="macos",describe:()=>({type:Me.desktop,vendor:"Apple"})},{test:e=>e.getOSName(!0)==="windows",describe:()=>({type:Me.desktop})},{test:e=>e.getOSName(!0)==="linux",describe:()=>({type:Me.desktop})},{test:e=>e.getOSName(!0)==="playstation 4",describe:()=>({type:Me.tv})},{test:e=>e.getOSName(!0)==="roku",describe:()=>({type:Me.tv})}],pv=[{test:e=>e.getBrowserName(!0)==="microsoft edge",describe(e){if(/\sedg\//i.test(e))return{name:$t.Blink};const t=I.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:$t.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:$t.Trident},n=I.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:$t.Presto},n=I.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:$t.Gecko},n=I.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:$t.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:$t.WebKit},n=I.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class ql{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=I.find(dv,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=I.find(fv,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=I.find(hv,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=I.find(pv,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return I.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let a=0;if(Object.keys(t).forEach((o=>{const s=t[o];typeof s=="string"?(i[o]=s,a+=1):typeof s=="object"&&(n[o]=s,r+=1)})),r>0){const o=Object.keys(n),s=I.find(o,(l=>this.isOS(l)));if(s){const l=this.satisfies(n[s]);if(l!==void 0)return l}const c=I.find(o,(l=>this.isPlatform(l)));if(c){const l=this.satisfies(n[c]);if(l!==void 0)return l}}if(a>0){const o=Object.keys(i),s=I.find(o,(c=>this.isBrowser(c,!0)));if(s!==void 0)return this.compareVersion(i[s])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const a=I.getBrowserTypeByAlias(i);return n&&a&&(i=a.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const a=this.getBrowserVersion();if(typeof a=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(I.compareVersions(a,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some((n=>this.is(n)))}}class mv{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new ql(t,n)}static parse(t){return new ql(t).getResult()}static get BROWSER_MAP(){return Jl}static get ENGINE_MAP(){return $t}static get OS_MAP(){return Je}static get PLATFORMS_MAP(){return Me}}function fi(){return Date.now()+Math.random().toString()}function pr(){throw new Error("Method must be implemented in subclass")}function Hl(e,t){return t!=null&&t.proxyUrl?t.proxyUrl+(t.proxyUrl.slice(-1)==="/"?"":"/")+e.substring(8):e}function hi(e){return e!=null&&e.callObjectBundleUrlOverride?e.callObjectBundleUrlOverride:Hl("https://c.daily.co/call-machine/versioned/".concat("0.85.0","/static/call-machine-object-bundle.js"),e)}function pi(e){try{new URL(e)}catch{return!1}return!0}const _e=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,en="8.55.0",he=globalThis;function mi(e,t,n){const r=he,i=r.__SENTRY__=r.__SENTRY__||{},a=i[en]=i[en]||{};return a[e]||(a[e]=t())}const tn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ha=["debug","info","warn","error","log","assert","trace"],gi={};function mr(e){if(!("console"in he))return e();const t=he.console,n={},r=Object.keys(gi);r.forEach((i=>{const a=gi[i];n[i]=t[i],t[i]=a}));try{return e()}finally{r.forEach((i=>{t[i]=n[i]}))}}const Y=mi("logger",(function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return tn?Ha.forEach((n=>{t[n]=(...r)=>{e&&mr((()=>{he.console[n](`Sentry Logger [${n}]:`,...r)}))}})):Ha.forEach((n=>{t[n]=()=>{}})),t})),nn="?",Gl=/\(error: (.*)\)/,Kl=/captureMessage|captureException/;function vi(e){return e[e.length-1]||{}}const Yl="<anonymous>";function Ut(e){try{return e&&typeof e=="function"&&e.name||Yl}catch{return Yl}}function Xl(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach((r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)})),n}catch{return}}}const yi={},Ql={};function rn(e,t){yi[e]=yi[e]||[],yi[e].push(t)}function an(e,t){if(!Ql[e]){Ql[e]=!0;try{t()}catch(n){tn&&Y.error(`Error while instrumenting ${e}`,n)}}}function vt(e,t){const n=e&&yi[e];if(n)for(const r of n)try{r(t)}catch(i){tn&&Y.error(`Error while triggering instrumentation handler.
1
+ var LemonSliceWidget=(function(_o){"use strict";var sr,te,Lc,tn,jc,Rc,Vc,Nc,wo,ko,So,Fc,cr={},Bc=[],Hm=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,lr=Array.isArray;function xt(e,t){for(var n in t)e[n]=t[n];return e}function xo(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ae(e,t,n){var r,i,o,a={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?sr.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return ur(e,a,r,i,null)}function ur(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Lc,__i:-1,__u:0};return i==null&&te.vnode!=null&&te.vnode(o),o}function qm(){return{current:null}}function Ke(e){return e.children}function gt(e,t){this.props=e,this.context=t}function An(e,t){if(t==null)return e.__?An(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?An(e):null}function $c(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return $c(e)}}function To(e){(!e.__d&&(e.__d=!0)&&tn.push(e)&&!Xr.__r++||jc!=te.debounceRendering)&&((jc=te.debounceRendering)||Rc)(Xr)}function Xr(){for(var e,t,n,r,i,o,a,s=1;tn.length;)tn.length>s&&tn.sort(Vc),e=tn.shift(),s=tn.length,e.__d&&(n=void 0,r=void 0,i=(r=(t=e).__v).__e,o=[],a=[],t.__P&&((n=xt({},r)).__v=r.__v+1,te.vnode&&te.vnode(n),Mo(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[i]:null,o,i??An(r),!!(32&r.__u),a),n.__v=r.__v,n.__.__k[n.__i]=n,Hc(o,n,a),r.__e=r.__=null,n.__e!=i&&$c(n)));Xr.__r=0}function Uc(e,t,n,r,i,o,a,s,c,l,d){var f,p,g,y,v,b,_,k=r&&r.__k||Bc,x=t.length;for(c=Gm(n,t,k,c,x),f=0;f<x;f++)(g=n.__k[f])!=null&&(p=g.__i==-1?cr:k[g.__i]||cr,g.__i=f,b=Mo(e,g,p,i,o,a,s,c,l,d),y=g.__e,g.ref&&p.ref!=g.ref&&(p.ref&&Po(p.ref,null,g),d.push(g.ref,g.__c||y,g)),v==null&&y!=null&&(v=y),(_=!!(4&g.__u))||p.__k===g.__k?c=zc(g,c,e,_):typeof g.type=="function"&&b!==void 0?c=b:y&&(c=y.nextSibling),g.__u&=-7);return n.__e=v,c}function Gm(e,t,n,r,i){var o,a,s,c,l,d=n.length,f=d,p=0;for(e.__k=new Array(i),o=0;o<i;o++)(a=t[o])!=null&&typeof a!="boolean"&&typeof a!="function"?(c=o+p,(a=e.__k[o]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?ur(null,a,null,null,null):lr(a)?ur(Ke,{children:a},null,null,null):a.constructor==null&&a.__b>0?ur(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,s=null,(l=a.__i=Km(a,n,c,f))!=-1&&(f--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>d?p--:i<d&&p++),typeof a.type!="function"&&(a.__u|=4)):l!=c&&(l==c-1?p--:l==c+1?p++:(l>c?p--:p++,a.__u|=4))):e.__k[o]=null;if(f)for(o=0;o<d;o++)(s=n[o])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=An(s)),Gc(s,s));return r}function zc(e,t,n,r){var i,o;if(typeof e.type=="function"){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,t=zc(i[o],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=An(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Dt(e,t){return t=t||[],e==null||typeof e=="boolean"||(lr(e)?e.some(function(n){Dt(n,t)}):t.push(e)),t}function Km(e,t,n,r){var i,o,a,s=e.key,c=e.type,l=t[n],d=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||d&&s==l.key&&c==l.type)return n;if(r>(d?1:0)){for(i=n-1,o=n+1;i>=0||o<t.length;)if((l=t[a=i>=0?i--:o++])!=null&&(2&l.__u)==0&&s==l.key&&c==l.type)return a}return-1}function Wc(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Hm.test(t)?n:n+"px"}function Qr(e,t,n,r,i){var o,a;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Wc(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Wc(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(Nc,"$1")),a=t.toLowerCase(),t=a in e||t=="onFocusOut"||t=="onFocusIn"?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=wo,e.addEventListener(t,o?So:ko,o)):e.removeEventListener(t,o?So:ko,o);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Jc(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=wo++;else if(t.t<n.u)return;return n(te.event?te.event(t):t)}}}function Mo(e,t,n,r,i,o,a,s,c,l){var d,f,p,g,y,v,b,_,k,x,C,T,M,A,E,j,B,V=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),o=[s=t.__e=n.__e]),(d=te.__b)&&d(t);e:if(typeof V=="function")try{if(_=t.props,k="prototype"in V&&V.prototype.render,x=(d=V.contextType)&&r[d.__c],C=d?x?x.props.value:d.__:r,n.__c?b=(f=t.__c=n.__c).__=f.__E:(k?t.__c=f=new V(_,C):(t.__c=f=new gt(_,C),f.constructor=V,f.render=Xm),x&&x.sub(f),f.props=_,f.state||(f.state={}),f.context=C,f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),k&&f.__s==null&&(f.__s=f.state),k&&V.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=xt({},f.__s)),xt(f.__s,V.getDerivedStateFromProps(_,f.__s))),g=f.props,y=f.state,f.__v=t,p)k&&V.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),k&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(k&&V.getDerivedStateFromProps==null&&_!==g&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(_,C),!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(_,f.__s,C)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=_,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(H){H&&(H.__=t)}),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);f._sb=[],f.__h.length&&a.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(_,f.__s,C),k&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(g,y,v)})}if(f.context=C,f.props=_,f.__P=e,f.__e=!1,M=te.__r,A=0,k){for(f.state=f.__s,f.__d=!1,M&&M(t),d=f.render(f.props,f.state,f.context),E=0;E<f._sb.length;E++)f.__h.push(f._sb[E]);f._sb=[]}else do f.__d=!1,M&&M(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++A<25);f.state=f.__s,f.getChildContext!=null&&(r=xt(xt({},r),f.getChildContext())),k&&!p&&f.getSnapshotBeforeUpdate!=null&&(v=f.getSnapshotBeforeUpdate(g,y)),j=d,d!=null&&d.type===Ke&&d.key==null&&(j=qc(d.props.children)),s=Uc(e,lr(j)?j:[j],t,n,r,i,o,a,s,c,l),f.base=t.__e,t.__u&=-161,f.__h.length&&a.push(f),b&&(f.__E=f.__=null)}catch(H){if(t.__v=null,c||o!=null)if(H.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else{for(B=o.length;B--;)xo(o[B]);Co(t)}else t.__e=n.__e,t.__k=n.__k,H.then||Co(t);te.__e(H,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=Ym(n.__e,t,n,r,i,o,a,c,l);return(d=te.diffed)&&d(t),128&t.__u?void 0:s}function Co(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(Co)}function Hc(e,t,n){for(var r=0;r<n.length;r++)Po(n[r],n[++r],n[++r]);te.__c&&te.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){te.__e(o,i.__v)}})}function qc(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:lr(e)?e.map(qc):xt({},e)}function Ym(e,t,n,r,i,o,a,s,c){var l,d,f,p,g,y,v,b=n.props,_=t.props,k=t.type;if(k=="svg"?i="http://www.w3.org/2000/svg":k=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(l=0;l<o.length;l++)if((g=o[l])&&"setAttribute"in g==!!k&&(k?g.localName==k:g.nodeType==3)){e=g,o[l]=null;break}}if(e==null){if(k==null)return document.createTextNode(_);e=document.createElementNS(i,k,_.is&&_),s&&(te.__m&&te.__m(t,o),s=!1),o=null}if(k==null)b===_||s&&e.data==_||(e.data=_);else{if(o=o&&sr.call(e.childNodes),b=n.props||cr,!s&&o!=null)for(b={},l=0;l<e.attributes.length;l++)b[(g=e.attributes[l]).name]=g.value;for(l in b)if(g=b[l],l!="children"){if(l=="dangerouslySetInnerHTML")f=g;else if(!(l in _)){if(l=="value"&&"defaultValue"in _||l=="checked"&&"defaultChecked"in _)continue;Qr(e,l,null,g,i)}}for(l in _)g=_[l],l=="children"?p=g:l=="dangerouslySetInnerHTML"?d=g:l=="value"?y=g:l=="checked"?v=g:s&&typeof g!="function"||b[l]===g||Qr(e,l,g,b[l],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=""),Uc(t.type=="template"?e.content:e,lr(p)?p:[p],t,n,r,k=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:n.__k&&An(n,0),s,c),o!=null)for(l=o.length;l--;)xo(o[l]);s||(l="value",k=="progress"&&y==null?e.removeAttribute("value"):y!=null&&(y!==e[l]||k=="progress"&&!y||k=="option"&&y!=b[l])&&Qr(e,l,y,b[l],i),l="checked",v!=null&&v!=e[l]&&Qr(e,l,v,b[l],i))}return e}function Po(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){te.__e(i,n)}}function Gc(e,t,n){var r,i;if(te.unmount&&te.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Po(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){te.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Gc(r[i],t,n||typeof e.type!="function");n||xo(e.__e),e.__c=e.__=e.__e=void 0}function Xm(e,t,n){return this.constructor(e,n)}function Ut(e,t,n){var r,i,o,a;t==document&&(t=document.documentElement),te.__&&te.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],a=[],Mo(t,e=(!r&&n||t).__k=ae(Ke,null,[e]),i||cr,cr,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?sr.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,a),Hc(o,e,a)}function Eo(e,t){Ut(e,t,Eo)}function Ao(e,t,n){var r,i,o,a,s=xt({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o]===void 0&&a!=null?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?sr.call(arguments,2):n),ur(e.type,s,r||e.key,i||e.ref,null)}function De(e){function t(n){var r,i;return this.getChildContext||(r=new Set,(i={})[t.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(a){a.__e=!0,To(a)})},this.sub=function(o){r.add(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),a&&a.call(o)}}),n.children}return t.__c="__cC"+Fc++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}sr=Bc.slice,te={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},Lc=0,gt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=xt({},this.state),typeof e=="function"&&(e=e(xt({},n),this.props)),e&&xt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),To(this))},gt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),To(this))},gt.prototype.render=Ke,tn=[],Rc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Vc=function(e,t){return e.__v.__b-t.__v.__b},Xr.__r=0,Nc=/(PointerCapture)$|Capture$/i,wo=0,ko=Jc(!1),So=Jc(!0),Fc=0;function Zr(){return Zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zr.apply(this,arguments)}function Kc(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}var Qm=["context","children"],Zm=["useFragment"];function eg(e,t,n,r){function i(){var o,a=Reflect.construct(HTMLElement,[],i);return a._vdomComponent=e,r&&r.shadow?(a._root=a.attachShadow({mode:r.mode||"open",serializable:(o=r.serializable)!=null&&o}),r.adoptedStyleSheets&&(a._root.adoptedStyleSheets=r.adoptedStyleSheets)):a._root=a,a}return(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=function(){ng.call(this,r)},i.prototype.attributeChangedCallback=rg,i.prototype.disconnectedCallback=ig,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,e.formAssociated&&(i.formAssociated=!0),n.forEach(function(o){Object.defineProperty(i.prototype,o,{get:function(){return this._vdom?this._vdom.props[o]:this._props[o]},set:function(a){this._vdom?this.attributeChangedCallback(o,null,a):(this._props||(this._props={}),this._props[o]=a);var s=typeof a;a!=null&&s!=="string"&&s!=="boolean"&&s!=="number"||this.setAttribute(o,a)}})}),customElements.define(t||e.tagName||e.displayName||e.name,i),i}function tg(e){this.getChildContext=function(){return e.context};var t=e.children,n=Kc(e,Qm);return Ao(t,n)}function ng(e){var t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=ae(tg,Zr({},this._props,{context:t.detail.context}),Qc(this,this._vdomComponent,e)),(this.hasAttribute("hydrate")?Eo:Ut)(this._vdom,this._root)}function Yc(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function rg(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Yc(e)]=n,this._vdom=Ao(this._vdom,r),Ut(this._vdom,this._root)}}function ig(){Ut(this._vdom=null,this._root)}function Xc(e,t){var n=this,r=e.useFragment,i=Kc(e,Zm);return ae(r?Ke:"slot",Zr({},i,{ref:function(o){o?(n.ref=o,n._listener||(n._listener=function(a){a.stopPropagation(),a.detail.context=t},o.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function Qc(e,t,n){if(e.nodeType===3)return e.data;if(e.nodeType!==1)return null;var r=[],i={},o=0,a=e.attributes,s=e.childNodes;for(o=a.length;o--;)a[o].name!=="slot"&&(i[a[o].name]=a[o].value,i[Yc(a[o].name)]=a[o].value);for(o=s.length;o--;){var c=Qc(s[o],null,n),l=s[o].slot;l?i[l]=ae(Xc,{name:l},c):r[o]=c}var d=!(!n||!n.shadow),f=t?ae(Xc,{useFragment:!d},r):r;return!d&&t&&(e.innerHTML=""),ae(t||e.nodeName.toLowerCase(),i,f)}var og=0;function O(e,t,n,r,i,o){t||(t={});var a,s,c=t;if("ref"in c)for(s in c={},t)s=="ref"?a=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--og,__i:-1,__u:0,__source:i,__self:o};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)c[s]===void 0&&(c[s]=a[s]);return te.vnode&&te.vnode(l),l}var zt,we,Oo,Zc,On=0,el=[],Se=te,tl=Se.__b,nl=Se.__r,rl=Se.diffed,il=Se.__c,ol=Se.unmount,al=Se.__;function In(e,t){Se.__h&&Se.__h(we,e,On||t),On=0;var n=we.__H||(we.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ne(e){return On=1,ei(cl,e)}function ei(e,t,n){var r=In(zt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):cl(void 0,t),function(s){var c=r.__N?r.__N[0]:r.__[0],l=r.t(c,s);c!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=we,!we.__f)){var i=function(s,c,l){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(p){return!!p.__c});if(d.every(function(p){return!p.__N}))return!o||o.call(this,s,c,l);var f=r.__c.props!==s;return d.forEach(function(p){if(p.__N){var g=p.__[0];p.__=p.__N,p.__N=void 0,g!==p.__[0]&&(f=!0)}}),o&&o.call(this,s,c,l)||f};we.__f=!0;var o=we.shouldComponentUpdate,a=we.componentWillUpdate;we.componentWillUpdate=function(s,c,l){if(this.__e){var d=o;o=void 0,i(s,c,l),o=d}a&&a.call(this,s,c,l)},we.shouldComponentUpdate=i}return r.__N||r.__}function Z(e,t){var n=In(zt++,3);!Se.__s&&jo(n.__H,t)&&(n.__=e,n.u=t,we.__H.__h.push(n))}function Dn(e,t){var n=In(zt++,4);!Se.__s&&jo(n.__H,t)&&(n.__=e,n.u=t,we.__h.push(n))}function fe(e){return On=5,Ve(function(){return{current:e}},[])}function Io(e,t,n){On=6,Dn(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function Ve(e,t){var n=In(zt++,7);return jo(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function R(e,t){return On=8,Ve(function(){return e},t)}function ge(e){var t=we.context[e.__c],n=In(zt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(we)),t.props.value):e.__}function Ze(e,t){Se.useDebugValue&&Se.useDebugValue(t?t(e):e)}function Do(){var e=In(zt++,11);if(!e.__){for(var t=we.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ag(){for(var e;e=el.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ti),e.__H.__h.forEach(Lo),e.__H.__h=[]}catch(t){e.__H.__h=[],Se.__e(t,e.__v)}}Se.__b=function(e){we=null,tl&&tl(e)},Se.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),al&&al(e,t)},Se.__r=function(e){nl&&nl(e),zt=0;var t=(we=e.__c).__H;t&&(Oo===we?(t.__h=[],we.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(ti),t.__h.forEach(Lo),t.__h=[],zt=0)),Oo=we},Se.diffed=function(e){rl&&rl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(el.push(t)!==1&&Zc===Se.requestAnimationFrame||((Zc=Se.requestAnimationFrame)||sg)(ag)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Oo=we=null},Se.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ti),n.__h=n.__h.filter(function(r){return!r.__||Lo(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],Se.__e(r,n.__v)}}),il&&il(e,t)},Se.unmount=function(e){ol&&ol(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ti(r)}catch(i){t=i}}),n.__H=void 0,t&&Se.__e(t,n.__v))};var sl=typeof requestAnimationFrame=="function";function sg(e){var t,n=function(){clearTimeout(r),sl&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);sl&&(t=requestAnimationFrame(n))}function ti(e){var t=we,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),we=t}function Lo(e){var t=we;e.__c=e.__(),we=t}function jo(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function cl(e,t){return typeof t=="function"?t(e):t}const Ln={};function ll(e){return"init"in e}function Ro(e){return!!e.write}function ul(e){return"v"in e||"e"in e}function ni(e){if("e"in e)throw e.e;if((Ln?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}const ri=new WeakMap;function dl(e){var t;return ii(e)&&!!((t=ri.get(e))!=null&&t[0])}function cg(e){const t=ri.get(e);t?.[0]&&(t[0]=!1,t[1].forEach(n=>n()))}function Vo(e,t){let n=ri.get(e);if(!n){n=[!0,new Set],ri.set(e,n);const r=()=>{n[0]=!1};e.then(r,r)}n[1].add(t)}function ii(e){return typeof e?.then=="function"}function fl(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function hl(e,t,n){var r;const i=new Set;for(const o of((r=n.get(e))==null?void 0:r.t)||[])n.has(o)&&i.add(o);for(const o of t.p)i.add(o);return i}const lg=(e,t,...n)=>t.read(...n),ug=(e,t,...n)=>t.write(...n),dg=(e,t)=>{var n;return(n=t.unstable_onInit)==null?void 0:n.call(t,e)},fg=(e,t,n)=>{var r;return(r=t.onMount)==null?void 0:r.call(t,n)},hg=(e,t)=>{const n=Ne(e),r=n[0],i=n[9];if((Ln?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let o=r.get(t);return o||(o={d:new Map,p:new Set,n:0},r.set(t,o),i?.(e,t)),o},pg=e=>{const t=Ne(e),n=t[1],r=t[3],i=t[4],o=t[5],a=t[6],s=t[13],c=[],l=d=>{try{d()}catch(f){c.push(f)}};do{a.f&&l(a.f);const d=new Set,f=d.add.bind(d);r.forEach(p=>{var g;return(g=n.get(p))==null?void 0:g.l.forEach(f)}),r.clear(),o.forEach(f),o.clear(),i.forEach(f),i.clear(),d.forEach(l),r.size&&s(e)}while(r.size||o.size||i.size);if(c.length)throw new AggregateError(c)},mg=e=>{const t=Ne(e),n=t[1],r=t[2],i=t[3],o=t[11],a=t[14],s=t[17],c=[],l=new WeakSet,d=new WeakSet,f=Array.from(i);for(;f.length;){const p=f[f.length-1],g=o(e,p);if(d.has(p)){f.pop();continue}if(l.has(p)){if(r.get(p)===g.n)c.push([p,g]);else if((Ln?"production":void 0)!=="production"&&r.has(p))throw new Error("[Bug] invalidated atom exists");d.add(p),f.pop();continue}l.add(p);for(const y of hl(p,g,n))l.has(y)||f.push(y)}for(let p=c.length-1;p>=0;--p){const[g,y]=c[p];let v=!1;for(const b of y.d.keys())if(b!==g&&i.has(b)){v=!0;break}v&&(a(e,g),s(e,g)),r.delete(g)}},gg=(e,t)=>{var n,r;const i=Ne(e),o=i[1],a=i[2],s=i[3],c=i[6],l=i[7],d=i[11],f=i[12],p=i[13],g=i[14],y=i[16],v=i[17],b=d(e,t);if(ul(b)&&(o.has(t)&&a.get(t)!==b.n||Array.from(b.d).every(([E,j])=>g(e,E).n===j)))return b;b.d.clear();let _=!0;function k(){o.has(t)&&(v(e,t),p(e),f(e))}function x(E){var j;if(E===t){const V=d(e,E);if(!ul(V))if(ll(E))oi(e,E,E.init);else throw new Error("no atom init");return ni(V)}const B=g(e,E);try{return ni(B)}finally{b.d.set(E,B.n),dl(b.v)&&fl(t,b.v,B),(j=o.get(E))==null||j.t.add(t),_||k()}}let C,T;const M={get signal(){return C||(C=new AbortController),C.signal},get setSelf(){return(Ln?"production":void 0)!=="production"&&!Ro(t)&&console.warn("setSelf function cannot be used with read-only atom"),!T&&Ro(t)&&(T=(...E)=>{if((Ln?"production":void 0)!=="production"&&_&&console.warn("setSelf function cannot be called in sync"),!_)try{return y(e,t,...E)}finally{p(e),f(e)}}),T}},A=b.n;try{const E=l(e,t,x,M);return oi(e,t,E),ii(E)&&(Vo(E,()=>C?.abort()),E.then(k,k)),(n=c.r)==null||n.call(c,t),b}catch(E){return delete b.v,b.e=E,++b.n,b}finally{_=!1,A!==b.n&&a.get(t)===A&&(a.set(t,b.n),s.add(t),(r=c.c)==null||r.call(c,t))}},vg=(e,t)=>{const n=Ne(e),r=n[1],i=n[2],o=n[11],a=[t];for(;a.length;){const s=a.pop(),c=o(e,s);for(const l of hl(s,c,r)){const d=o(e,l);i.set(l,d.n),a.push(l)}}},pl=(e,t,...n)=>{const r=Ne(e),i=r[3],o=r[6],a=r[8],s=r[11],c=r[12],l=r[13],d=r[14],f=r[15],p=r[17];let g=!0;const y=b=>ni(d(e,b)),v=(b,..._)=>{var k;const x=s(e,b);try{if(b===t){if(!ll(b))throw new Error("atom not writable");const C=x.n,T=_[0];oi(e,b,T),p(e,b),C!==x.n&&(i.add(b),(k=o.c)==null||k.call(o,b),f(e,b));return}else return pl(e,b,..._)}finally{g||(l(e),c(e))}};try{return a(e,t,y,v,...n)}finally{g=!1}},yg=(e,t)=>{var n;const r=Ne(e),i=r[1],o=r[3],a=r[6],s=r[11],c=r[15],l=r[18],d=r[19],f=s(e,t),p=i.get(t);if(p&&!dl(f.v)){for(const[g,y]of f.d)if(!p.d.has(g)){const v=s(e,g);l(e,g).t.add(t),p.d.add(g),y!==v.n&&(o.add(g),(n=a.c)==null||n.call(a,g),c(e,g))}for(const g of p.d||[])if(!f.d.has(g)){p.d.delete(g);const y=d(e,g);y?.t.delete(t)}}},ml=(e,t)=>{var n;const r=Ne(e),i=r[1],o=r[4],a=r[6],s=r[10],c=r[11],l=r[12],d=r[13],f=r[14],p=r[16],g=c(e,t);let y=i.get(t);if(!y){f(e,t);for(const v of g.d.keys())ml(e,v).t.add(t);if(y={l:new Set,d:new Set(g.d.keys()),t:new Set},i.set(t,y),(n=a.m)==null||n.call(a,t),Ro(t)){const v=()=>{let b=!0;const _=(...k)=>{try{return p(e,t,...k)}finally{b||(d(e),l(e))}};try{const k=s(e,t,_);k&&(y.u=()=>{b=!0;try{k()}finally{b=!1}})}finally{b=!1}};o.add(v)}}return y},bg=(e,t)=>{var n;const r=Ne(e),i=r[1],o=r[5],a=r[6],s=r[11],c=r[19],l=s(e,t);let d=i.get(t);if(d&&!d.l.size&&!Array.from(d.t).some(f=>{var p;return(p=i.get(f))==null?void 0:p.d.has(t)})){d.u&&o.add(d.u),d=void 0,i.delete(t),(n=a.u)==null||n.call(a,t);for(const f of l.d.keys()){const p=c(e,f);p?.t.delete(t)}return}return d},oi=(e,t,n)=>{const r=Ne(e)[11],i=r(e,t),o="v"in i,a=i.v;if(ii(n))for(const s of i.d.keys())fl(t,n,r(e,s));i.v=n,delete i.e,(!o||!Object.is(a,i.v))&&(++i.n,ii(a)&&cg(a))},_g=(e,t)=>{const n=Ne(e)[14];return ni(n(e,t))},wg=(e,t,...n)=>{const r=Ne(e),i=r[12],o=r[13],a=r[16];try{return a(e,t,...n)}finally{o(e),i(e)}},kg=(e,t,n)=>{const r=Ne(e),i=r[12],o=r[18],a=r[19],c=o(e,t).l;return c.add(n),i(e),()=>{c.delete(n),a(e,t),i(e)}},gl=new WeakMap,Ne=e=>{const t=gl.get(e);if((Ln?"production":void 0)!=="production"&&!t)throw new Error("Store must be created by buildStore to read its building blocks");return t};function Sg(...e){const t={get(r){const i=Ne(t)[21];return i(t,r)},set(r,...i){const o=Ne(t)[22];return o(t,r,...i)},sub(r,i){const o=Ne(t)[23];return o(t,r,i)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},lg,ug,dg,fg,hg,pg,mg,gg,vg,pl,yg,ml,bg,oi,_g,wg,kg,void 0].map((r,i)=>e[i]||r);return gl.set(t,Object.freeze(n)),t}const vl={};let xg=0;function ce(e,t){const n=`atom${++xg}`,r={toString(){return(vl?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=Tg,r.write=Mg),t&&(r.write=t),r}function Tg(e){return e(this)}function Mg(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}function yl(){return Sg()}let dr;function Cg(){return dr||(dr=yl(),(vl?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=dr),globalThis.__JOTAI_DEFAULT_STORE__!==dr&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),dr}const Pg={};function fr(e,t){let n=null;const r=new Map,i=new Set,o=s=>{let c;if(c=r.get(s),c!==void 0)if(n?.(c[1],s))o.remove(s);else return c[0];const l=e(s);return r.set(s,[l,Date.now()]),a("CREATE",s,l),l},a=(s,c,l)=>{for(const d of i)d({type:s,param:c,atom:l})};return o.unstable_listen=s=>(i.add(s),()=>{i.delete(s)}),o.getParams=()=>r.keys(),o.remove=s=>{{if(!r.has(s))return;const[c]=r.get(s);r.delete(s),a("REMOVE",s,c)}},o.setShouldRemove=s=>{if(n=s,!!n)for(const[c,[l,d]]of r)n(d,c)&&(r.delete(c),a("REMOVE",c,l))},o}const Eg=e=>typeof e?.then=="function";function Ag(e=()=>{try{return window.localStorage}catch(n){(Pg?"production":void 0)!=="production"&&typeof window<"u"&&console.warn(n);return}},t){var n;let r,i;const o={getItem:(c,l)=>{var d,f;const p=y=>{if(y=y||"",r!==y){try{i=JSON.parse(y,t?.reviver)}catch{return l}r=y}return i},g=(f=(d=e())==null?void 0:d.getItem(c))!=null?f:null;return Eg(g)?g.then(p):p(g)},setItem:(c,l)=>{var d;return(d=e())==null?void 0:d.setItem(c,JSON.stringify(l,void 0))},removeItem:c=>{var l;return(l=e())==null?void 0:l.removeItem(c)}},a=c=>(l,d,f)=>c(l,p=>{let g;try{g=JSON.parse(p||"")}catch{g=f}d(g)});let s;try{s=(n=e())==null?void 0:n.subscribe}catch{}return!s&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(s=(c,l)=>{if(!(e()instanceof window.Storage))return()=>{};const d=f=>{f.storageArea===e()&&f.key===c&&l(f.newValue)};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}}),s&&(o.subscribe=a(s)),o}Ag();function bl(e,t){for(var n in t)e[n]=t[n];return e}function No(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function _l(e,t){var n=t(),r=ne({t:{__:n,u:t}}),i=r[0].t,o=r[1];return Dn(function(){i.__=n,i.u=t,Fo(i)&&o({t:i})},[e,n,t]),Z(function(){return Fo(i)&&o({t:i}),e(function(){Fo(i)&&o({t:i})})},[e]),n}function Fo(e){var t,n,r=e.u,i=e.__;try{var o=r();return!((t=i)===(n=o)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}function wl(e){e()}function kl(e){return e}function Sl(){return[!1,wl]}var Bo=Dn;function $o(e,t){this.props=e,this.context=t}function Uo(e,t){function n(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!a:No(this.props,i)}function r(i){return this.shouldComponentUpdate=n,ae(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}($o.prototype=new gt).isPureReactComponent=!0,$o.prototype.shouldComponentUpdate=function(e,t){return No(this.props,e)||No(this.state,t)};var xl=te.__b;te.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xl&&xl(e)};var Og=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function et(e){function t(n){var r=bl({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Og,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Tl=function(e,t){return e==null?null:Dt(Dt(e).map(t))},Ig={map:Tl,forEach:Tl,count:function(e){return e?Dt(e).length:0},only:function(e){var t=Dt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Dt},Dg=te.__e;te.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Dg(e,t,n,r)};var Ml=te.unmount;function Cl(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=bl({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Cl(r,t,n)})),e}function Pl(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Pl(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ai(){this.__u=0,this.o=null,this.__b=null}function El(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Lg(e){var t,n,r;function i(o){if(t||(t=e()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw t;return ae(n,o)}return i.displayName="Lazy",i.__f=!0,i}function hr(){this.i=null,this.l=null}te.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ml&&Ml(e)},(ai.prototype=new gt).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=El(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=Pl(c,c.__c.__P,c.__c.__O)}var l;for(r.setState({__a:r.__b=null});l=r.o.pop();)l.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},ai.prototype.componentWillUnmount=function(){this.o=[]},ai.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Cl(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&ae(Ke,null,e.fallback);return i&&(i.__u&=-33),[ae(Ke,null,t.__a?null:e.children),i]};var Al=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function jg(e){return this.getChildContext=function(){return e.context},e.children}function Rg(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){Ut(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(i,o){this.childNodes.push(i),t.h.insertBefore(i,o)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),t.h.removeChild(i)}}}Ut(ae(jg,{context:t.context},e.__v),t.v)}function Vg(e,t){var n=ae(Rg,{__v:e,h:t});return n.containerInfo=t,n}(hr.prototype=new gt).__a=function(e){var t=this,n=El(t.__v),r=t.l.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Al(t,e,r)):i()};n?n(o):o()}},hr.prototype.render=function(e){this.i=null,this.l=new Map;var t=Dt(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},hr.prototype.componentDidUpdate=hr.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Al(e,n,t)})};var Ol=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ng=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Fg=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Bg=/[A-Z0-9]/g,$g=typeof document<"u",Ug=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function zg(e,t,n){return t.__k==null&&(t.textContent=""),Ut(e,t),typeof n=="function"&&n(),e?e.__c:null}function Wg(e,t,n){return Eo(e,t),typeof n=="function"&&n(),e?e.__c:null}gt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(gt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Il=te.event;function Jg(){}function Hg(){return this.cancelBubble}function qg(){return this.defaultPrevented}te.event=function(e){return Il&&(e=Il(e)),e.persist=Jg,e.isPropagationStopped=Hg,e.isDefaultPrevented=qg,e.nativeEvent=e};var zo,Gg={enumerable:!1,configurable:!0,get:function(){return this.class}},Dl=te.vnode;te.vnode=function(e){typeof e.type=="string"&&(function(t){var n=t.props,r=t.type,i={},o=r.indexOf("-")===-1;for(var a in n){var s=n[a];if(!(a==="value"&&"defaultValue"in n&&s==null||$g&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var c=a.toLowerCase();a==="defaultValue"&&"value"in n&&n.value==null?a="value":a==="download"&&s===!0?s="":c==="translate"&&s==="no"?s=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?a="ondblclick":c!=="onchange"||r!=="input"&&r!=="textarea"||Ug(n.type)?c==="onfocus"?a="onfocusin":c==="onblur"?a="onfocusout":Fg.test(a)&&(a=c):c=a="oninput":o&&Ng.test(a)?a=a.replace(Bg,"-$&").toLowerCase():s===null&&(s=void 0),c==="oninput"&&i[a=c]&&(a="oninputCapture"),i[a]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Dt(n.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Dt(n.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",Gg)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i})(e),e.$$typeof=Ol,Dl&&Dl(e)};var Ll=te.__r;te.__r=function(e){Ll&&Ll(e),zo=e.__c};var jl=te.diffed;te.diffed=function(e){jl&&jl(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),zo=null};var Kg={ReactCurrentDispatcher:{current:{readContext:function(e){return zo.__n[e.__c].props.value},useCallback:R,useContext:ge,useDebugValue:Ze,useDeferredValue:kl,useEffect:Z,useId:Do,useImperativeHandle:Io,useInsertionEffect:Bo,useLayoutEffect:Dn,useMemo:Ve,useReducer:ei,useRef:fe,useState:ne,useSyncExternalStore:_l,useTransition:Sl}}};function Yg(e){return ae.bind(null,e)}function si(e){return!!e&&e.$$typeof===Ol}function Xg(e){return si(e)&&e.type===Ke}function Qg(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Zg(e){return si(e)?Ao.apply(null,arguments):e}function ev(e){return!!e.__k&&(Ut(null,e),!0)}function tv(e){return e&&(e.base||e.nodeType===1&&e)||null}var nv=function(e,t){return e(t)},rv=function(e,t){return e(t)},iv=Ke,ov=si,de={useState:ne,useId:Do,useReducer:ei,useEffect:Z,useLayoutEffect:Dn,useInsertionEffect:Bo,useTransition:Sl,useDeferredValue:kl,useSyncExternalStore:_l,startTransition:wl,useRef:fe,useImperativeHandle:Io,useMemo:Ve,useCallback:R,useContext:ge,useDebugValue:Ze,version:"18.3.1",Children:Ig,render:zg,hydrate:Wg,unmountComponentAtNode:ev,createPortal:Vg,createElement:ae,createContext:De,createFactory:Yg,cloneElement:Zg,createRef:qm,Fragment:Ke,isValidElement:si,isElement:ov,isFragment:Xg,isMemo:Qg,findDOMNode:tv,Component:gt,PureComponent:$o,memo:Uo,forwardRef:et,flushSync:rv,unstable_batchedUpdates:nv,StrictMode:iv,Suspense:ai,SuspenseList:hr,lazy:Lg,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Kg};const av={},Wo=De(void 0);function Rl(e){return ge(Wo)||Cg()}function sv({children:e,store:t}){const n=fe(null);return t?ae(Wo.Provider,{value:t},e):(n.current===null&&(n.current=yl()),ae(Wo.Provider,{value:n.current},e))}const Jo=e=>typeof e?.then=="function",Ho=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},cv=de.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(Ho(e),e)}),qo=new WeakMap,Vl=(e,t)=>{let n=qo.get(e);return n||(n=new Promise((r,i)=>{let o=e;const a=l=>d=>{o===l&&r(d)},s=l=>d=>{o===l&&i(d)},c=()=>{try{const l=t();Jo(l)?(qo.set(l,n),o=l,l.then(a(l),s(l)),Vo(l,c)):r(l)}catch(l){i(l)}};e.then(a(e),s(e)),Vo(e,c)}),qo.set(e,n)),n};function nn(e,t){const{delay:n,unstable_promiseStatus:r=!de.use}={},i=Rl(),[[o,a,s],c]=ei(d=>{const f=i.get(e);return Object.is(d[0],f)&&d[1]===i&&d[2]===e?d:[f,i,e]},void 0,()=>[i.get(e),i,e]);let l=o;if((a!==i||s!==e)&&(c(),l=i.get(e)),Z(()=>{const d=i.sub(e,()=>{if(r)try{const f=i.get(e);Jo(f)&&Ho(Vl(f,()=>i.get(e)))}catch{}if(typeof n=="number"){setTimeout(c,n);return}c()});return c(),d},[i,e,n,r]),Ze(l),Jo(l)){const d=Vl(l,()=>i.get(e));return r&&Ho(d),cv(d)}return l}function lv(e,t){const n=Rl();return R((...i)=>{if((av?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return n.set(e,...i)},[n,e])}function oe(e,t){const n=Ve(()=>ce(null,(r,i,...o)=>e(r,i,...o)),[e]);return lv(n)}function Nl(e,t){if(e==null)return{};var n,r,i=(function(a,s){if(a==null)return{};var c={};for(var l in a)if({}.hasOwnProperty.call(a,l)){if(s.indexOf(l)!==-1)continue;c[l]=a[l]}return c})(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function tt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function he(e){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},he(e)}function Fl(e){var t=(function(n,r){if(he(n)!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,r);if(he(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(e,"string");return he(t)=="symbol"?t:t+""}function Bl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fl(r.key),r)}}function nt(e,t,n){return t&&Bl(e.prototype,t),n&&Bl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ci(e,t){if(t&&(he(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n})(e)}function vt(e){return vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vt(e)}function pr(e,t){return pr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},pr(e,t)}function li(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pr(e,t)}function Tt(e,t,n){return(t=Fl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $l(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}function Q(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(c){$l(o,r,i,a,s,"next",c)}function s(c){$l(o,r,i,a,s,"throw",c)}a(void 0)}))}}function Ul(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Fe(e,t){return(function(n){if(Array.isArray(n))return n})(e)||(function(n,r){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var o,a,s,c,l=[],d=!0,f=!1;try{if(s=(i=i.call(n)).next,r===0){if(Object(i)!==i)return;d=!1}else for(;!(d=(o=s.call(i)).done)&&(l.push(o.value),l.length!==r);d=!0);}catch(p){f=!0,a=p}finally{try{if(!d&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(f)throw a}}return l}})(e,t)||(function(n,r){if(n){if(typeof n=="string")return Ul(n,r);var i={}.toString.call(n).slice(8,-1);return i==="Object"&&n.constructor&&(i=n.constructor.name),i==="Map"||i==="Set"?Array.from(n):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ul(n,r):void 0}})(e,t)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function uv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zl,ui={exports:{}},Go=(function(){if(zl)return ui.exports;zl=1;var e,t=typeof Reflect=="object"?Reflect:null,n=t&&typeof t.apply=="function"?t.apply:function(v,b,_){return Function.prototype.apply.call(v,b,_)};e=t&&typeof t.ownKeys=="function"?t.ownKeys:Object.getOwnPropertySymbols?function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:function(v){return Object.getOwnPropertyNames(v)};var r=Number.isNaN||function(v){return v!=v};function i(){i.init.call(this)}ui.exports=i,ui.exports.once=function(v,b){return new Promise((function(_,k){function x(T){v.removeListener(b,C),k(T)}function C(){typeof v.removeListener=="function"&&v.removeListener("error",x),_([].slice.call(arguments))}y(v,b,C,{once:!0}),b!=="error"&&(function(T,M,A){typeof T.on=="function"&&y(T,"error",M,A)})(v,x,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function a(v){if(typeof v!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof v)}function s(v){return v._maxListeners===void 0?i.defaultMaxListeners:v._maxListeners}function c(v,b,_,k){var x,C,T,M;if(a(_),(C=v._events)===void 0?(C=v._events=Object.create(null),v._eventsCount=0):(C.newListener!==void 0&&(v.emit("newListener",b,_.listener?_.listener:_),C=v._events),T=C[b]),T===void 0)T=C[b]=_,++v._eventsCount;else if(typeof T=="function"?T=C[b]=k?[_,T]:[T,_]:k?T.unshift(_):T.push(_),(x=s(v))>0&&T.length>x&&!T.warned){T.warned=!0;var A=new Error("Possible EventEmitter memory leak detected. "+T.length+" "+String(b)+" listeners added. Use emitter.setMaxListeners() to increase limit");A.name="MaxListenersExceededWarning",A.emitter=v,A.type=b,A.count=T.length,M=A,console&&console.warn&&console.warn(M)}return v}function l(){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 d(v,b,_){var k={fired:!1,wrapFn:void 0,target:v,type:b,listener:_},x=l.bind(k);return x.listener=_,k.wrapFn=x,x}function f(v,b,_){var k=v._events;if(k===void 0)return[];var x=k[b];return x===void 0?[]:typeof x=="function"?_?[x.listener||x]:[x]:_?(function(C){for(var T=new Array(C.length),M=0;M<T.length;++M)T[M]=C[M].listener||C[M];return T})(x):g(x,x.length)}function p(v){var b=this._events;if(b!==void 0){var _=b[v];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}function g(v,b){for(var _=new Array(b),k=0;k<b;++k)_[k]=v[k];return _}function y(v,b,_,k){if(typeof v.on=="function")k.once?v.once(b,_):v.on(b,_);else{if(typeof v.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof v);v.addEventListener(b,(function x(C){k.once&&v.removeEventListener(b,x),_(C)}))}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(v){if(typeof v!="number"||v<0||r(v))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+v+".");o=v}}),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(v){if(typeof v!="number"||v<0||r(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(v){for(var b=[],_=1;_<arguments.length;_++)b.push(arguments[_]);var k=v==="error",x=this._events;if(x!==void 0)k=k&&x.error===void 0;else if(!k)return!1;if(k){var C;if(b.length>0&&(C=b[0]),C instanceof Error)throw C;var T=new Error("Unhandled error."+(C?" ("+C.message+")":""));throw T.context=C,T}var M=x[v];if(M===void 0)return!1;if(typeof M=="function")n(M,this,b);else{var A=M.length,E=g(M,A);for(_=0;_<A;++_)n(E[_],this,b)}return!0},i.prototype.addListener=function(v,b){return c(this,v,b,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(v,b){return c(this,v,b,!0)},i.prototype.once=function(v,b){return a(b),this.on(v,d(this,v,b)),this},i.prototype.prependOnceListener=function(v,b){return a(b),this.prependListener(v,d(this,v,b)),this},i.prototype.removeListener=function(v,b){var _,k,x,C,T;if(a(b),(k=this._events)===void 0)return this;if((_=k[v])===void 0)return this;if(_===b||_.listener===b)--this._eventsCount==0?this._events=Object.create(null):(delete k[v],k.removeListener&&this.emit("removeListener",v,_.listener||b));else if(typeof _!="function"){for(x=-1,C=_.length-1;C>=0;C--)if(_[C]===b||_[C].listener===b){T=_[C].listener,x=C;break}if(x<0)return this;x===0?_.shift():(function(M,A){for(;A+1<M.length;A++)M[A]=M[A+1];M.pop()})(_,x),_.length===1&&(k[v]=_[0]),k.removeListener!==void 0&&this.emit("removeListener",v,T||b)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(v){var b,_,k;if((_=this._events)===void 0)return this;if(_.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):_[v]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete _[v]),this;if(arguments.length===0){var x,C=Object.keys(_);for(k=0;k<C.length;++k)(x=C[k])!=="removeListener"&&this.removeAllListeners(x);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(b=_[v])=="function")this.removeListener(v,b);else if(b!==void 0)for(k=b.length-1;k>=0;k--)this.removeListener(v,b[k]);return this},i.prototype.listeners=function(v){return f(this,v,!0)},i.prototype.rawListeners=function(v){return f(this,v,!1)},i.listenerCount=function(v,b){return typeof v.listenerCount=="function"?v.listenerCount(b):p.call(v,b)},i.prototype.listenerCount=p,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},ui.exports})(),di=uv(Go),Wl=Object.prototype.hasOwnProperty;function Jl(e,t,n){for(n of e.keys())if(Je(n,t))return n}function Je(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Je(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if((i=r)&&typeof i=="object"&&!(i=Jl(t,i))||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if((i=r[0])&&typeof i=="object"&&!(i=Jl(t,i))||!Je(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){for(n in r=0,e)if(Wl.call(e,n)&&++r&&!Wl.call(t,n)||!(n in t)||!Je(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}const dv={"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"},Hl={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"},Ce={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},He={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"},Wt={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class I{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map((r=>parseInt(r,10)||0));if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map((r=>parseInt(r,10)||0));if(n.push(0),!(n[0]===1&&n[1]<5))return n[0]===1&&n[1]<6?"Cupcake":n[0]===1&&n[1]>=6?"Donut":n[0]===2&&n[1]<2?"Eclair":n[0]===2&&n[1]===2?"Froyo":n[0]===2&&n[1]>2?"Gingerbread":n[0]===3?"Honeycomb":n[0]===4&&n[1]<1?"Ice Cream Sandwich":n[0]===4&&n[1]<4?"Jelly Bean":n[0]===4&&n[1]>=4?"KitKat":n[0]===5?"Lollipop":n[0]===6?"Marshmallow":n[0]===7?"Nougat":n[0]===8?"Oreo":n[0]===9?"Pie":void 0}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=I.getVersionPrecision(t),o=I.getVersionPrecision(n);let a=Math.max(i,o),s=0;const c=I.map([t,n],(l=>{const d=a-I.getVersionPrecision(l),f=l+new Array(d+1).join(".0");return I.map(f.split("."),(p=>new Array(20-p.length).join("0")+p)).reverse()}));for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(c[0][a]>c[1][a])return 1;if(c[0][a]===c[1][a]){if(a===s)return 0;a-=1}else if(c[0][a]<c[1][a])return-1}}static map(t,n){const r=[];let i;if(Array.prototype.map)return Array.prototype.map.call(t,n);for(i=0;i<t.length;i+=1)r.push(n(t[i]));return r}static find(t,n){let r,i;if(Array.prototype.find)return Array.prototype.find.call(t,n);for(r=0,i=t.length;r<i;r+=1){const o=t[r];if(n(o,r))return o}}static assign(t,...n){const r=t;let i,o;if(Object.assign)return Object.assign(t,...n);for(i=0,o=n.length;i<o;i+=1){const a=n[i];typeof a=="object"&&a!==null&&Object.keys(a).forEach((s=>{r[s]=a[s]}))}return t}static getBrowserAlias(t){return dv[t]}static getBrowserTypeByAlias(t){return Hl[t]||""}}const ve=/version\/(\d+(\.?_?\d+)+)/i,fv=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=I.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=I.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=I.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=I.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=I.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=I.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=I.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=I.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=I.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=I.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=I.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=I.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=I.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=I.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=I.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=I.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=I.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=I.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=I.getFirstMatch(ve,e)||I.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=I.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=I.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=I.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=I.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=I.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=I.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=I.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=I.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=I.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=I.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=e.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:I.getFirstMatch(t,e),version:I.getSecondMatch(t,e)}}}];var hv=[{test:[/Roku\/DVP/],describe(e){const t=I.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:He.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=I.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:He.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=I.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=I.getWindowsVersionName(t);return{name:He.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:He.iOS},n=I.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=I.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=I.getMacOSVersionName(t),r={name:He.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=I.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:He.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=I.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=I.getAndroidVersionName(t),r={name:He.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=I.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:He.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=I.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||I.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||I.getFirstMatch(/\bbb(\d+)/i,e);return{name:He.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=I.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:He.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=I.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:He.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:He.Linux})},{test:[/CrOS/],describe:()=>({name:He.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=I.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:He.PlayStation4,version:t}}}],pv=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(e){const t=I.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Ce.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:Ce.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:Ce.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:Ce.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:Ce.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:Ce.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:Ce.tablet})},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=I.getFirstMatch(/(ipod|iphone)/i,e);return{type:Ce.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:Ce.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:Ce.mobile})},{test:e=>e.getBrowserName(!0)==="blackberry",describe:()=>({type:Ce.mobile,vendor:"BlackBerry"})},{test:e=>e.getBrowserName(!0)==="bada",describe:()=>({type:Ce.mobile})},{test:e=>e.getBrowserName()==="windows phone",describe:()=>({type:Ce.mobile,vendor:"Microsoft"})},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe:()=>({type:Ce.tablet})},{test:e=>e.getOSName(!0)==="android",describe:()=>({type:Ce.mobile})},{test:e=>e.getOSName(!0)==="macos",describe:()=>({type:Ce.desktop,vendor:"Apple"})},{test:e=>e.getOSName(!0)==="windows",describe:()=>({type:Ce.desktop})},{test:e=>e.getOSName(!0)==="linux",describe:()=>({type:Ce.desktop})},{test:e=>e.getOSName(!0)==="playstation 4",describe:()=>({type:Ce.tv})},{test:e=>e.getOSName(!0)==="roku",describe:()=>({type:Ce.tv})}],mv=[{test:e=>e.getBrowserName(!0)==="microsoft edge",describe(e){if(/\sedg\//i.test(e))return{name:Wt.Blink};const t=I.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Wt.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:Wt.Trident},n=I.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:Wt.Presto},n=I.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:Wt.Gecko},n=I.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:Wt.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:Wt.WebKit},n=I.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class ql{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=I.find(fv,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=I.find(hv,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=I.find(pv,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=I.find(mv,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return I.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach((a=>{const s=t[a];typeof s=="string"?(i[a]=s,o+=1):typeof s=="object"&&(n[a]=s,r+=1)})),r>0){const a=Object.keys(n),s=I.find(a,(l=>this.isOS(l)));if(s){const l=this.satisfies(n[s]);if(l!==void 0)return l}const c=I.find(a,(l=>this.isPlatform(l)));if(c){const l=this.satisfies(n[c]);if(l!==void 0)return l}}if(o>0){const a=Object.keys(i),s=I.find(a,(c=>this.isBrowser(c,!0)));if(s!==void 0)return this.compareVersion(i[s])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=I.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(I.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some((n=>this.is(n)))}}class gv{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new ql(t,n)}static parse(t){return new ql(t).getResult()}static get BROWSER_MAP(){return Hl}static get ENGINE_MAP(){return Wt}static get OS_MAP(){return He}static get PLATFORMS_MAP(){return Ce}}function fi(){return Date.now()+Math.random().toString()}function mr(){throw new Error("Method must be implemented in subclass")}function Gl(e,t){return t!=null&&t.proxyUrl?t.proxyUrl+(t.proxyUrl.slice(-1)==="/"?"":"/")+e.substring(8):e}function hi(e){return e!=null&&e.callObjectBundleUrlOverride?e.callObjectBundleUrlOverride:Gl("https://c.daily.co/call-machine/versioned/".concat("0.85.0","/static/call-machine-object-bundle.js"),e)}function pi(e){try{new URL(e)}catch{return!1}return!0}const _e=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,rn="8.55.0",pe=globalThis;function mi(e,t,n){const r=pe,i=r.__SENTRY__=r.__SENTRY__||{},o=i[rn]=i[rn]||{};return o[e]||(o[e]=t())}const on=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ko=["debug","info","warn","error","log","assert","trace"],gi={};function gr(e){if(!("console"in pe))return e();const t=pe.console,n={},r=Object.keys(gi);r.forEach((i=>{const o=gi[i];n[i]=t[i],t[i]=o}));try{return e()}finally{r.forEach((i=>{t[i]=n[i]}))}}const ee=mi("logger",(function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return on?Ko.forEach((n=>{t[n]=(...r)=>{e&&gr((()=>{pe.console[n](`Sentry Logger [${n}]:`,...r)}))}})):Ko.forEach((n=>{t[n]=()=>{}})),t})),an="?",Kl=/\(error: (.*)\)/,Yl=/captureMessage|captureException/;function vi(e){return e[e.length-1]||{}}const Xl="<anonymous>";function Jt(e){try{return e&&typeof e=="function"&&e.name||Xl}catch{return Xl}}function Ql(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach((r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)})),n}catch{return}}}const yi={},Zl={};function sn(e,t){yi[e]=yi[e]||[],yi[e].push(t)}function cn(e,t){if(!Zl[e]){Zl[e]=!0;try{t()}catch(n){on&&ee.error(`Error while instrumenting ${e}`,n)}}}function yt(e,t){const n=e&&yi[e];if(n)for(const r of n)try{r(t)}catch(i){on&&ee.error(`Error while triggering instrumentation handler.
3
3
  Type: ${e}
4
- Name: ${Ut(r)}
5
- Error:`,i)}}let Ga=null;function gv(){Ga=he.onerror,he.onerror=function(e,t,n,r,i){return vt("error",{column:r,error:i,line:n,msg:e,url:t}),!!Ga&&Ga.apply(this,arguments)},he.onerror.__SENTRY_INSTRUMENTED__=!0}let Ka=null;function vv(){Ka=he.onunhandledrejection,he.onunhandledrejection=function(e){return vt("unhandledrejection",e),!Ka||Ka.apply(this,arguments)},he.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function bi(){return Ya(he),he}function Ya(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||en,t[en]=t[en]||{}}const Zl=Object.prototype.toString;function Xa(e){switch(Zl.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return on(e,Error)}}function Ln(e,t){return Zl.call(e)===`[object ${t}]`}function eu(e){return Ln(e,"ErrorEvent")}function tu(e){return Ln(e,"DOMError")}function Ot(e){return Ln(e,"String")}function Qa(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Za(e){return e===null||Qa(e)||typeof e!="object"&&typeof e!="function"}function jn(e){return Ln(e,"Object")}function _i(e){return typeof Event<"u"&&on(e,Event)}function wi(e){return!!(e&&e.then&&typeof e.then=="function")}function on(e,t){try{return e instanceof t}catch{return!1}}function nu(e){return!(typeof e!="object"||e===null||!e.__isVue&&!e._isVue)}const eo=he;function ru(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let a=0,o=0;const s=" > ",c=s.length;let l;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&a++<r&&(l=yv(n,d),!(l==="html"||a>1&&o+i.length*c+l.length>=f));)i.push(l),o+=l.length,n=n.parentNode;return i.reverse().join(s)}catch{return"<unknown>"}}function yv(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(eo.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t&&t.length?t.filter((o=>n.getAttribute(o))).map((o=>[o,n.getAttribute(o)])):null;if(i&&i.length)i.forEach((o=>{r.push(`[${o[0]}="${o[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Ot(o)){const s=o.split(/\s+/);for(const c of s)r.push(`.${c}`)}}const a=["aria-label","type","name","title","alt"];for(const o of a){const s=n.getAttribute(o);s&&r.push(`[${o}="${s}"]`)}return r.join("")}function Rn(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function iu(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const i=e[r];try{nu(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function bv(e,t,n=!1){return!!Ot(e)&&(Ln(t,"RegExp")?t.test(e):!!Ot(t)&&(n?e===t:e.includes(t)))}function ki(e,t=[],n=!1){return t.some((r=>bv(e,r,n)))}function tt(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);typeof i=="function"&&au(i,r);try{e[t]=i}catch{tn&&Y.log(`Failed to replace method "${t}" in object`,e)}}function sn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{tn&&Y.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function au(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,sn(e,"__sentry_original__",t)}catch{}}function to(e){return e.__sentry_original__}function ou(e){if(Xa(e))return{message:e.message,name:e.name,stack:e.stack,...cu(e)};if(_i(e)){const t={type:e.type,target:su(e.target),currentTarget:su(e.currentTarget),...cu(e)};return typeof CustomEvent<"u"&&on(e,CustomEvent)&&(t.detail=e.detail),t}return e}function su(e){try{return t=e,typeof Element<"u"&&on(t,Element)?ru(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}var t}function cu(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function it(e){return no(e,new Map)}function no(e,t){if((function(n){if(!jn(n))return!1;try{const r=Object.getPrototypeOf(n).constructor.name;return!r||r==="Object"}catch{return!0}})(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const i of Object.getOwnPropertyNames(e))e[i]!==void 0&&(r[i]=no(e[i],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach((i=>{r.push(no(i,t))})),r}return e}function gr(){return Date.now()/1e3}const It=(function(){const{performance:e}=he;if(!e||!e.now)return gr;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/1e3})();function at(){const e=he,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,(r=>(r^(15&n())>>r/4).toString(16)))}function lu(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function zt(e){const{message:t,event_id:n}=e;if(t)return t;const r=lu(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function ro(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||(a.value=t||""),a.type||(a.type="Error")}function Vn(e,t){const n=lu(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const i={...r&&r.data,...t.data};n.mechanism.data=i}}function uu(e){if((function(t){try{return t.__sentry_captured__}catch{}})(e))return!0;try{sn(e,"__sentry_captured__",!0)}catch{}return!1}var Dt;function cn(e){return new ot((t=>{t(e)}))}function Si(e){return new ot(((t,n)=>{n(e)}))}(()=>{const{performance:e}=he;!e||!e.now||(e.now(),e.timing&&e.timing.navigationStart)})(),(function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"})(Dt||(Dt={}));class ot{constructor(t){ot.prototype.__init.call(this),ot.prototype.__init2.call(this),ot.prototype.__init3.call(this),ot.prototype.__init4.call(this),this._state=Dt.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new ot(((r,i)=>{this._handlers.push([!1,a=>{if(t)try{r(t(a))}catch(o){i(o)}else r(a)},a=>{if(n)try{r(n(a))}catch(o){i(o)}else i(a)}]),this._executeHandlers()}))}catch(t){return this.then((n=>n),t)}finally(t){return new ot(((n,r)=>{let i,a;return this.then((o=>{a=!1,i=o,t&&t()}),(o=>{a=!0,i=o,t&&t()})).then((()=>{a?r(i):n(i)}))}))}__init(){this._resolve=t=>{this._setResult(Dt.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Dt.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{this._state===Dt.PENDING&&(wi(n)?n.then(this._resolve,this._reject):(this._state=t,this._value=n,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Dt.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach((n=>{n[0]||(this._state===Dt.RESOLVED&&n[1](this._value),this._state===Dt.REJECTED&&n[2](this._value),n[0]=!0)}))}}}function _v(e){const t=It(),n={sid:at(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>(function(r){return it({sid:`${r.sid}`,init:r.init,started:new Date(1e3*r.started).toISOString(),timestamp:new Date(1e3*r.timestamp).toISOString(),status:r.status,errors:r.errors,did:typeof r.did=="number"||typeof r.did=="string"?`${r.did}`:void 0,duration:r.duration,abnormal_mechanism:r.abnormal_mechanism,attrs:{release:r.release,environment:r.environment,ip_address:r.ipAddress,user_agent:r.userAgent}})})(n)};return e&&Nn(n,e),n}function Nn(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||It(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:at()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function du(){return at()}function io(){return at().substring(16)}function xi(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=xi(r[i],t[i],n-1));return r}const ao="_sentrySpan";function fu(e,t){t?sn(e,ao,t):delete e[ao]}function hu(e){return e[ao]}class oo{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:du(),spanId:io()}}clone(){const t=new oo;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,fu(t,hu(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Nn(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,[r,i]=n instanceof Wt?[n.getScopeData(),n.getRequestSession()]:jn(n)?[t,t.requestSession]:[],{tags:a,extra:o,user:s,contexts:c,level:l,fingerprint:d=[],propagationContext:f}=r||{};return this._tags={...this._tags,...a},this._extra={...this._extra,...o},this._contexts={...this._contexts,...c},s&&Object.keys(s).length&&(this._user=s),l&&(this._level=l),d.length&&(this._fingerprint=d),f&&(this._propagationContext=f),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,fu(this,void 0),this._attachments=[],this.setPropagationContext({traceId:du()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:100;if(r<=0)return this;const i={timestamp:gr(),...t};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),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:hu(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=xi(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:io(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:at();if(!this._client)return Y.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r&&r.event_id?r.event_id:at();if(!this._client)return Y.warn("No client configured on scope - will not capture message!"),i;const a=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:a,...r,event_id:i},this),i}captureEvent(t,n){const r=n&&n.event_id?n.event_id:at();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(Y.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((t=>{t(this)})),this._notifyingListeners=!1)}}const Wt=oo;class wv{constructor(t,n){let r,i;r=t||new Wt,i=n||new Wt,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(i){throw this._popScope(),i}return wi(r)?r.then((i=>(this._popScope(),i)),(i=>{throw this._popScope(),i})):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Fn(){const e=Ya(bi());return e.stack=e.stack||new wv(mi("defaultCurrentScope",(()=>new Wt)),mi("defaultIsolationScope",(()=>new Wt)))}function kv(e){return Fn().withScope(e)}function Sv(e,t){const n=Fn();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function pu(e){return Fn().withScope((()=>e(Fn().getIsolationScope())))}function so(e){const t=Ya(e);return t.acs?t.acs:{withIsolationScope:pu,withScope:kv,withSetScope:Sv,withSetIsolationScope:(n,r)=>pu(r),getCurrentScope:()=>Fn().getScope(),getIsolationScope:()=>Fn().getIsolationScope()}}function ln(){return so(bi()).getCurrentScope()}function vr(){return so(bi()).getIsolationScope()}function Be(){return ln().getClient()}function xv(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:i}=t;return it({trace_id:n,span_id:r,parent_span_id:i})}function Tv(e){const t=e._sentryMetrics;if(!t)return;const n={};for(const[,[r,i]]of t)(n[r]||(n[r]=[])).push(it(i));return n}const Mv=/^sentry-/;function Cv(e){const t=(function(r){if(!(!r||!Ot(r)&&!Array.isArray(r)))return Array.isArray(r)?r.reduce(((i,a)=>{const o=mu(a);return Object.entries(o).forEach((([s,c])=>{i[s]=c})),i}),{}):mu(r)})(e);if(!t)return;const n=Object.entries(t).reduce(((r,[i,a])=>(i.match(Mv)&&(r[i.slice(7)]=a),r)),{});return Object.keys(n).length>0?n:void 0}function mu(e){return e.split(",").map((t=>t.split("=").map((n=>decodeURIComponent(n.trim()))))).reduce(((t,[n,r])=>(n&&r&&(t[n]=r),t)),{})}let gu=!1;function Pv(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return it({parent_span_id:r?t:co(e).parent_span_id,span_id:r?io():t,trace_id:n})}function vu(e){return typeof e=="number"?yu(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?yu(e.getTime()):It()}function yu(e){return e>9999999999?e/1e3:e}function co(e){if((function(t){return typeof t.getSpanJSON=="function"})(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if((function(r){const i=r;return!!(i.attributes&&i.startTime&&i.name&&i.endTime&&i.status)})(e)){const{attributes:r,startTime:i,name:a,endTime:o,parentSpanId:s,status:c}=e;return it({span_id:t,trace_id:n,data:r,description:a,parent_span_id:s,start_timestamp:vu(i),timestamp:vu(o)||void 0,status:Ev(c),op:r["sentry.op"],origin:r["sentry.origin"],_metrics_summary:Tv(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function Ev(e){if(e&&e.code!==0)return e.code===1?"ok":e.message||"unknown_error"}function bu(e){return e._sentryRootSpan||e}function Av(){gu||(mr((()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")})),gu=!0)}const lo="production";function _u(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=it({environment:n.environment||lo,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function Ov(e){const t=Be();if(!t)return{};const n=bu(e),r=n._frozenDsc;if(r)return r;const i=n.spanContext().traceState,a=i&&i.get("sentry.dsc"),o=a&&Cv(a);if(o)return o;const s=_u(e.spanContext().traceId,t),c=co(n),l=c.data||{},d=l["sentry.sample_rate"];d!=null&&(s.sample_rate=`${d}`);const f=l["sentry.source"],p=c.description;return f!=="url"&&p&&(s.transaction=p),(function(g){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const y=Be(),v=y&&y.getOptions();return!!v&&(v.enableTracing||"tracesSampleRate"in v||"tracesSampler"in v)})()&&(s.sampled=String((function(g){const{traceFlags:y}=g.spanContext();return y===1})(n))),t.emit("createDsc",s,n),s}const Iv=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ti(e,t=!1){const{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:""}@${n}${a?`:${a}`:""}/${r&&`${r}/`}${o}`}function wu(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Dv(e){const t=typeof e=="string"?(function(n){const r=Iv.exec(n);if(!r)return void mr((()=>{console.error(`Invalid Sentry Dsn: ${n}`)}));const[i,a,o="",s="",c="",l=""]=r.slice(1);let d="",f=l;const p=f.split("/");if(p.length>1&&(d=p.slice(0,-1).join("/"),f=p.pop()),f){const g=f.match(/^\d+/);g&&(f=g[0])}return wu({host:s,pass:o,path:d,projectId:f,port:c,protocol:i,publicKey:a})})(e):wu(e);if(t&&(function(n){if(!tn)return!0;const{port:r,projectId:i,protocol:a}=n;return!(["protocol","publicKey","host","projectId"].find((o=>!n[o]&&(Y.error(`Invalid Sentry Dsn: ${o} missing`),!0)))||(i.match(/^\d+$/)?(function(o){return o==="http"||o==="https"})(a)?r&&isNaN(parseInt(r,10))&&(Y.error(`Invalid Sentry Dsn: Invalid port ${r}`),1):(Y.error(`Invalid Sentry Dsn: Invalid protocol ${a}`),1):(Y.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),1)))})(t))return t}function Lt(e,t=100,n=1/0){try{return uo("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function ku(e,t=3,n=102400){const r=Lt(e,t);return i=r,(function(a){return~-encodeURI(a).split(/%..|./).length})(JSON.stringify(i))>n?ku(e,t-1,n):r;var i}function uo(e,t,n=1/0,r=1/0,i=(function(){const a=typeof WeakSet=="function",o=a?new WeakSet:[];return[function(s){if(a)return!!o.has(s)||(o.add(s),!1);for(let c=0;c<o.length;c++)if(o[c]===s)return!0;return o.push(s),!1},function(s){if(a)o.delete(s);else for(let c=0;c<o.length;c++)if(o[c]===s){o.splice(c,1);break}}]})()){const[a,o]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const s=(function(g,y){try{if(g==="domain"&&y&&typeof y=="object"&&y._events)return"[Domain]";if(g==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&y===global)return"[Global]";if(typeof window<"u"&&y===window)return"[Window]";if(typeof document<"u"&&y===document)return"[Document]";if(nu(y))return"[VueViewModel]";if(jn(v=y)&&"nativeEvent"in v&&"preventDefault"in v&&"stopPropagation"in v)return"[SyntheticEvent]";if(typeof y=="number"&&!Number.isFinite(y))return`[${y}]`;if(typeof y=="function")return`[Function: ${Ut(y)}]`;if(typeof y=="symbol")return`[${String(y)}]`;if(typeof y=="bigint")return`[BigInt: ${String(y)}]`;const b=(function(_){const k=Object.getPrototypeOf(_);return k?k.constructor.name:"null prototype"})(y);return/^HTML(\w*)Element$/.test(b)?`[HTMLElement: ${b}]`:`[object ${b}]`}catch(b){return`**non-serializable** (${b})`}var v})(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return s.replace("object ","");if(a(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{return uo("",l.toJSON(),c-1,r,i)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const p=ou(t);for(const g in p){if(!Object.prototype.hasOwnProperty.call(p,g))continue;if(f>=r){d[g]="[MaxProperties ~]";break}const y=p[g];d[g]=uo(g,y,c-1,r,i),f++}return o(t),d}function yr(e,t=[]){return[e,t]}function Lv(e,t){const[n,r]=e;return[n,[...r,t]]}function Su(e,t){const n=e[1];for(const r of n)if(t(r,r[0].type))return!0;return!1}function fo(e){return he.__SENTRY__&&he.__SENTRY__.encodePolyfill?he.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function jv(e){const[t,n]=e;let r=JSON.stringify(t);function i(a){typeof r=="string"?r=typeof a=="string"?r+a:[fo(r),a]:r.push(typeof a=="string"?fo(a):a)}for(const a of n){const[o,s]=a;if(i(`
6
- ${JSON.stringify(o)}
7
- `),typeof s=="string"||s instanceof Uint8Array)i(s);else{let c;try{c=JSON.stringify(s)}catch{c=JSON.stringify(Lt(s))}i(c)}}return typeof r=="string"?r:(function(a){const o=a.reduce(((l,d)=>l+d.length),0),s=new Uint8Array(o);let c=0;for(const l of a)s.set(l,c),c+=l.length;return s})(r)}function Rv(e){const t=typeof e.data=="string"?fo(e.data):e.data;return[it({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Vv={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 xu(e){return Vv[e]}function Tu(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Nv(e,t,n,r){const i=Tu(n),a=e.type&&e.type!=="replay_event"?e.type:"event";(function(s,c){c&&(s.sdk=s.sdk||{},s.sdk.name=s.sdk.name||c.name,s.sdk.version=s.sdk.version||c.version,s.sdk.integrations=[...s.sdk.integrations||[],...c.integrations||[]],s.sdk.packages=[...s.sdk.packages||[],...c.packages||[]])})(e,n&&n.sdk);const o=(function(s,c,l,d){const f=s.sdkProcessingMetadata&&s.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:s.event_id,sent_at:new Date().toISOString(),...c&&{sdk:c},...!!l&&d&&{dsn:Ti(d)},...f&&{trace:it({...f})}}})(e,i,r,t);return delete e.sdkProcessingMetadata,yr(o,[[{type:a},e]])}function ho(e,t,n,r=0){return new ot(((i,a)=>{const o=e[r];if(t===null||typeof o!="function")i(t);else{const s=o({...t},n);_e&&o.id&&s===null&&Y.log(`Event processor "${o.id}" dropped event`),wi(s)?s.then((c=>ho(e,c,n,r+1).then(i))).then(null,a):ho(e,s,n,r+1).then(i).then(null,a)}}))}let Mi,Mu,po;function Fv(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;(function(o,s){const{extra:c,tags:l,user:d,contexts:f,level:p,transactionName:g}=s,y=it(c);y&&Object.keys(y).length&&(o.extra={...y,...o.extra});const v=it(l);v&&Object.keys(v).length&&(o.tags={...v,...o.tags});const b=it(d);b&&Object.keys(b).length&&(o.user={...b,...o.user});const _=it(f);_&&Object.keys(_).length&&(o.contexts={..._,...o.contexts}),p&&(o.level=p),g&&o.type!=="transaction"&&(o.transaction=g)})(e,t),r&&(function(o,s){o.contexts={trace:Pv(s),...o.contexts},o.sdkProcessingMetadata={dynamicSamplingContext:Ov(s),...o.sdkProcessingMetadata};const c=bu(s),l=co(c).description;l&&!o.transaction&&o.type==="transaction"&&(o.transaction=l)})(e,r),(function(o,s){o.fingerprint=o.fingerprint?Array.isArray(o.fingerprint)?o.fingerprint:[o.fingerprint]:[],s&&(o.fingerprint=o.fingerprint.concat(s)),o.fingerprint&&!o.fingerprint.length&&delete o.fingerprint})(e,n),(function(o,s){const c=[...o.breadcrumbs||[],...s];o.breadcrumbs=c.length?c:void 0})(e,i),(function(o,s){o.sdkProcessingMetadata={...o.sdkProcessingMetadata,...s}})(e,a)}function Cu(e,t){const{extra:n,tags:r,user:i,contexts:a,level:o,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:l,eventProcessors:d,attachments:f,propagationContext:p,transactionName:g,span:y}=t;Ci(e,"extra",n),Ci(e,"tags",r),Ci(e,"user",i),Ci(e,"contexts",a),e.sdkProcessingMetadata=xi(e.sdkProcessingMetadata,s,2),o&&(e.level=o),g&&(e.transactionName=g),y&&(e.span=y),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function Ci(e,t,n){e[t]=xi(e[t],n,1)}function Bv(e,t,n,r,i,a){const{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||at(),timestamp:t.timestamp||gr()},l=n.integrations||e.integrations.map((y=>y.name));(function(y,v){const{environment:b,release:_,dist:k,maxValueLength:T=250}=v;y.environment=y.environment||b||lo,!y.release&&_&&(y.release=_),!y.dist&&k&&(y.dist=k),y.message&&(y.message=Rn(y.message,T));const M=y.exception&&y.exception.values&&y.exception.values[0];M&&M.value&&(M.value=Rn(M.value,T));const x=y.request;x&&x.url&&(x.url=Rn(x.url,T))})(c,e),(function(y,v){v.length>0&&(y.sdk=y.sdk||{},y.sdk.integrations=[...y.sdk.integrations||[],...v])})(c,l),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&(function(y,v){const b=(function(_){const k=he._sentryDebugIds;if(!k)return{};const T=Object.keys(k);return po&&T.length===Mu||(Mu=T.length,po=T.reduce(((M,x)=>{Mi||(Mi={});const C=Mi[x];if(C)M[C[0]]=C[1];else{const A=_(x);for(let E=A.length-1;E>=0;E--){const R=A[E],F=R&&R.filename,j=k[x];if(F&&j){M[F]=j,Mi[x]=[F,j];break}}}return M}),{})),po})(v);try{y.exception.values.forEach((_=>{_.stacktrace.frames.forEach((k=>{b&&k.filename&&(k.debug_id=b[k.filename])}))}))}catch{}})(c,e.stackParser);const d=(function(y,v){if(!v)return y;const b=y?y.clone():new Wt;return b.update(v),b})(r,n.captureContext);n.mechanism&&Vn(c,n.mechanism);const f=i?i.getEventProcessors():[],p=mi("globalScope",(()=>new Wt)).getScopeData();a&&Cu(p,a.getScopeData()),d&&Cu(p,d.getScopeData());const g=[...n.attachments||[],...p.attachments];return g.length&&(n.attachments=g),Fv(c,p),ho([...f,...p.eventProcessors],c,n).then((y=>(y&&(function(v){const b={};try{v.exception.values.forEach((k=>{k.stacktrace.frames.forEach((T=>{T.debug_id&&(T.abs_path?b[T.abs_path]=T.debug_id:T.filename&&(b[T.filename]=T.debug_id),delete T.debug_id)}))}))}catch{}if(Object.keys(b).length===0)return;v.debug_meta=v.debug_meta||{},v.debug_meta.images=v.debug_meta.images||[];const _=v.debug_meta.images;Object.entries(b).forEach((([k,T])=>{_.push({type:"sourcemap",code_file:k,debug_id:T})}))})(y),typeof o=="number"&&o>0?(function(v,b,_){if(!v)return null;const k={...v,...v.breadcrumbs&&{breadcrumbs:v.breadcrumbs.map((T=>({...T,...T.data&&{data:Lt(T.data,b,_)}})))},...v.user&&{user:Lt(v.user,b,_)},...v.contexts&&{contexts:Lt(v.contexts,b,_)},...v.extra&&{extra:Lt(v.extra,b,_)}};return v.contexts&&v.contexts.trace&&k.contexts&&(k.contexts.trace=v.contexts.trace,v.contexts.trace.data&&(k.contexts.trace.data=Lt(v.contexts.trace.data,b,_))),v.spans&&(k.spans=v.spans.map((T=>({...T,...T.data&&{data:Lt(T.data,b,_)}})))),v.contexts&&v.contexts.flags&&k.contexts&&(k.contexts.flags=Lt(v.contexts.flags,3,_)),k})(y,o,s):y)))}function ax(e){}function Pu(e,t){return ln().captureEvent(e,t)}function Eu(e){const t=Be(),n=vr(),r=ln(),{release:i,environment:a=lo}=t&&t.getOptions()||{},{userAgent:o}=he.navigator||{},s=_v({release:i,environment:a,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession();return c&&c.status==="ok"&&Nn(c,{status:"exited"}),Au(),n.setSession(s),r.setSession(s),s}function Au(){const e=vr(),t=ln(),n=t.getSession()||e.getSession();n&&(function(r,i){let a={};r.status==="ok"&&(a={status:"exited"}),Nn(r,a)})(n),Ou(),e.setSession(),t.setSession()}function Ou(){const e=vr(),t=ln(),n=Be(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Iu(e=!1){e?Au():Ou()}function $v(e,t,n){return t||`${(function(r){return`${(function(i){const a=i.protocol?`${i.protocol}:`:"",o=i.port?`:${i.port}`:"";return`${a}//${i.host}${o}${i.path?`/${i.path}`:""}/api/`})(r)}${r.projectId}/envelope/`})(e)}?${(function(r,i){const a={sentry_version:"7"};return r.publicKey&&(a.sentry_key=r.publicKey),i&&(a.sentry_client=`${i.name}/${i.version}`),new URLSearchParams(a).toString()})(e,n)}`}const Du=[];function Lu(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function ju(e,t,n){if(n[t.name])_e&&Y.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,Du.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Du.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",((i,a)=>r(i,a,e)))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign(((a,o)=>r(a,o,e)),{id:t.name});e.addEventProcessor(i)}_e&&Y.log(`Integration installed: ${t.name}`)}}class yt extends Error{constructor(t,n="warn"){super(t),this.message=t,this.logLevel=n}}const Ru="Not capturing exception because it's already been captured.";class Uv{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Dv(t.dsn):_e&&Y.warn("No DSN provided, client will not send events."),this._dsn){const r=$v(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}const n=["enableTracing","tracesSampleRate","tracesSampler"].find((r=>r in t&&t[r]==null));n&&mr((()=>{console.warn(`[Sentry] Deprecation warning: \`${n}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(t,n,r){const i=at();if(uu(t))return _e&&Y.log(Ru),i;const a={event_id:i,...n};return this._process(this.eventFromException(t,a).then((o=>this._captureEvent(o,a,r)))),a.event_id}captureMessage(t,n,r,i){const a={event_id:at(),...r},o=Qa(t)?t:String(t),s=Za(t)?this.eventFromMessage(o,n,a):this.eventFromException(t,a);return this._process(s.then((c=>this._captureEvent(c,a,i)))),a.event_id}captureEvent(t,n,r){const i=at();if(n&&n.originalException&&uu(n.originalException))return _e&&Y.log(Ru),i;const a={event_id:i,...n},o=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,a,o||r)),a.event_id}captureSession(t){typeof t.release!="string"?_e&&Y.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Nn(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then((r=>n.flush(t).then((i=>r&&i))))):cn(!0)}close(t){return this.flush(t).then((n=>(this.getOptions().enabled=!1,this.emit("close"),n)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some((({name:t})=>t.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];ju(this,t,this._integrations),n||Lu(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Nv(t,this._dsn,this._options._metadata,this._options.tunnel);for(const a of n.attachments||[])r=Lv(r,Rv(a));const i=this.sendEnvelope(r);i&&i.then((a=>this.emit("afterSendEvent",t,a)),null)}sendSession(t){const n=(function(r,i,a,o){const s=Tu(a);return yr({sent_at:new Date().toISOString(),...s&&{sdk:s},...!!o&&i&&{dsn:Ti(i)}},["aggregates"in r?[{type:"sessions"},r]:[{type:"session"},r.toJSON()]])})(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const i=typeof r=="number"?r:1,a=`${t}:${n}`;_e&&Y.log(`Recording outcome: "${a}"${i>1?` (${i} times)`:""}`),this._outcomes[a]=(this._outcomes[a]||0)+i}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach((i=>i(...n)))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,(n=>(_e&&Y.error("Error while sending envelope:",n),n))):(_e&&Y.error("Transport disabled"),cn({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=(function(n,r){const i={};return r.forEach((a=>{a&&ju(n,a,i)})),i})(this,t),Lu(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",i=!1;const a=n.exception&&n.exception.values;if(a){i=!0;for(const s of a){const c=s.mechanism;if(c&&c.handled===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(Nn(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new ot((n=>{let r=0;const i=setInterval((()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=1,t&&r>=t&&(clearInterval(i),n(!1)))}),1)}))}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r=ln(),i=vr()){const a=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),Bv(a,t,n,r,this,i).then((s=>{if(s===null)return s;s.contexts={trace:xv(r),...s.contexts};const c=(function(l,d){const f=d.getPropagationContext();return f.dsc||_u(f.traceId,l)})(this,r);return s.sdkProcessingMetadata={dynamicSamplingContext:c,...s.sdkProcessingMetadata},s}))}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then((i=>i.event_id),(i=>{_e&&(i instanceof yt&&i.logLevel==="log"?Y.log(i.message):Y.warn(i))}))}_processEvent(t,n,r){const i=this.getOptions(),{sampleRate:a}=i,o=Nu(t),s=Vu(t),c=t.type||"error",l=`before send for type \`${c}\``,d=a===void 0?void 0:(function(g){if(typeof g=="boolean")return Number(g);const y=typeof g=="string"?parseFloat(g):g;if(!(typeof y!="number"||isNaN(y)||y<0||y>1))return y;_e&&Y.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(g)} of type ${JSON.stringify(typeof g)}.`)})(a);if(s&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),Si(new yt(`Discarding event because it's not included in the random sample (sampling rate = ${a})`,"log"));const f=c==="replay_event"?"replay":c,p=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,p).then((g=>{if(g===null)throw this.recordDroppedEvent("event_processor",f,t),new yt("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return g;const y=(function(v,b,_,k){const{beforeSend:T,beforeSendTransaction:M,beforeSendSpan:x}=b;if(Vu(_)&&T)return T(_,k);if(Nu(_)){if(_.spans&&x){const C=[];for(const A of _.spans){const E=x(A);E?C.push(E):(Av(),v.recordDroppedEvent("before_send","span"))}_.spans=C}if(M){if(_.spans){const C=_.spans.length;_.sdkProcessingMetadata={..._.sdkProcessingMetadata,spanCountBeforeProcessing:C}}return M(_,k)}}return _})(this,i,g,n);return(function(v,b){const _=`${b} must return \`null\` or a valid event.`;if(wi(v))return v.then((k=>{if(!jn(k)&&k!==null)throw new yt(_);return k}),(k=>{throw new yt(`${b} rejected with ${k}`)}));if(!jn(v)&&v!==null)throw new yt(_);return v})(y,l)})).then((g=>{if(g===null){if(this.recordDroppedEvent("before_send",f,t),o){const b=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw new yt(`${l} returned \`null\`, will not send event.`,"log")}const y=r&&r.getSession();if(!o&&y&&this._updateSessionFromEvent(y,g),o){const b=(g.sdkProcessingMetadata&&g.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(g.spans?g.spans.length:0);b>0&&this.recordDroppedEvent("before_send","span",b)}const v=g.transaction_info;if(o&&v&&g.transaction!==t.transaction){const b="custom";g.transaction_info={...v,source:b}}return this.sendEvent(g,n),g})).then(null,(g=>{throw g instanceof yt?g:(this.captureException(g,{data:{__sentry__:!0},originalException:g}),new yt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
- Reason: ${g}`))}))}_process(t){this._numProcessing++,t.then((n=>(this._numProcessing--,n)),(n=>(this._numProcessing--,n)))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map((([n,r])=>{const[i,a]=n.split(":");return{reason:i,category:a,quantity:r}}))}_flushOutcomes(){_e&&Y.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0)return void(_e&&Y.log("No outcomes to send"));if(!this._dsn)return void(_e&&Y.log("No dsn provided, will not send outcomes"));_e&&Y.log("Sending outcomes:",t);const n=(r=t,yr((i=this._options.tunnel&&Ti(this._dsn))?{dsn:i}:{},[[{type:"client_report"},{timestamp:a||gr(),discarded_events:r}]]));var r,i,a;this.sendEnvelope(n)}}function Vu(e){return e.type===void 0}function Nu(e){return e.type==="transaction"}function zv(e){const t=[];function n(r){return t.splice(t.indexOf(r),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(e===void 0||t.length<e))return Si(new yt("Not adding Promise because buffer limit was reached."));const i=r();return t.indexOf(i)===-1&&t.push(i),i.then((()=>n(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(r){return new ot(((i,a)=>{let o=t.length;if(!o)return i(!0);const s=setTimeout((()=>{r&&r>0&&i(!1)}),r);t.forEach((c=>{cn(c).then((()=>{--o||(clearTimeout(s),i(!0))}),a)}))}))}}}function Wv(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},a=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(a)for(const s of a.trim().split(",")){const[c,l,,,d]=s.split(":",5),f=parseInt(c,10),p=1e3*(isNaN(f)?60:f);if(l)for(const g of l.split(";"))g==="metric_bucket"&&d&&!d.split(";").includes("custom")||(i[g]=r+p);else i.all=r+p}else o?i.all=r+(function(s,c=Date.now()){const l=parseInt(`${s}`,10);if(!isNaN(l))return 1e3*l;const d=Date.parse(`${s}`);return isNaN(d)?6e4:d-c})(o,r):t===429&&(i.all=r+6e4);return i}function Jv(e,t,n=zv(e.bufferSize||64)){let r={};return{send:function(i){const a=[];if(Su(i,((c,l)=>{const d=xu(l);if((function(f,p,g=Date.now()){return(function(y,v){return y[v]||y.all||0})(f,p)>g})(r,d)){const f=Fu(c,l);e.recordDroppedEvent("ratelimit_backoff",d,f)}else a.push(c)})),a.length===0)return cn({});const o=yr(i[0],a),s=c=>{Su(o,((l,d)=>{const f=Fu(l,d);e.recordDroppedEvent(c,xu(d),f)}))};return n.add((()=>t({body:jv(o)}).then((c=>(c.statusCode!==void 0&&(c.statusCode<200||c.statusCode>=300)&&_e&&Y.warn(`Sentry responded with status code ${c.statusCode} to sent event.`),r=Wv(r,c),c)),(c=>{throw s("network_error"),c})))).then((c=>c),(c=>{if(c instanceof yt)return _e&&Y.error("Skipped sending event because buffer is full."),s("queue_overflow"),cn({});throw c}))},flush:i=>n.drain(i)}}function Fu(e,t){if(t==="event"||t==="transaction")return Array.isArray(e)?e[1]:void 0}const qv=100;function un(e,t){const n=Be(),r=vr();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:a=qv}=n.getOptions();if(a<=0)return;const o={timestamp:gr(),...e},s=i?mr((()=>i(o,t))):o;s!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,a))}let Bu;const $u=new WeakMap,Hv=()=>({name:"FunctionToString",setupOnce(){Bu=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=to(this),n=$u.has(Be())&&t!==void 0?t:this;return Bu.apply(n,e)}}catch{}},setup(e){$u.set(e,!0)}}),Gv=[/^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+$/],Kv=(e={})=>({name:"InboundFilters",processEvent(t,n,r){const i=r.getOptions(),a=(function(o={},s={}){return{allowUrls:[...o.allowUrls||[],...s.allowUrls||[]],denyUrls:[...o.denyUrls||[],...s.denyUrls||[]],ignoreErrors:[...o.ignoreErrors||[],...s.ignoreErrors||[],...o.disableErrorDefaults?[]:Gv],ignoreTransactions:[...o.ignoreTransactions||[],...s.ignoreTransactions||[]],ignoreInternal:o.ignoreInternal===void 0||o.ignoreInternal}})(e,i);return(function(o,s){return s.ignoreInternal&&(function(c){try{return c.exception.values[0].type==="SentryError"}catch{}return!1})(o)?(_e&&Y.warn(`Event dropped due to being internal Sentry Error.
9
- Event: ${zt(o)}`),!0):(function(c,l){return c.type||!l||!l.length?!1:(function(d){const f=[];d.message&&f.push(d.message);let p;try{p=d.exception.values[d.exception.values.length-1]}catch{}return p&&p.value&&(f.push(p.value),p.type&&f.push(`${p.type}: ${p.value}`)),f})(c).some((d=>ki(d,l)))})(o,s.ignoreErrors)?(_e&&Y.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
10
- Event: ${zt(o)}`),!0):(function(c){return c.type||!c.exception||!c.exception.values||c.exception.values.length===0?!1:!c.message&&!c.exception.values.some((l=>l.stacktrace||l.type&&l.type!=="Error"||l.value))})(o)?(_e&&Y.warn(`Event dropped due to not having an error message, error type or stacktrace.
11
- Event: ${zt(o)}`),!0):(function(c,l){if(c.type!=="transaction"||!l||!l.length)return!1;const d=c.transaction;return!!d&&ki(d,l)})(o,s.ignoreTransactions)?(_e&&Y.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
12
- Event: ${zt(o)}`),!0):(function(c,l){if(!l||!l.length)return!1;const d=Pi(c);return!!d&&ki(d,l)})(o,s.denyUrls)?(_e&&Y.warn(`Event dropped due to being matched by \`denyUrls\` option.
13
- Event: ${zt(o)}.
14
- Url: ${Pi(o)}`),!0):(function(c,l){if(!l||!l.length)return!0;const d=Pi(c);return!d||ki(d,l)})(o,s.allowUrls)?!1:(_e&&Y.warn(`Event dropped due to not being matched by \`allowUrls\` option.
15
- Event: ${zt(o)}.
16
- Url: ${Pi(o)}`),!0)})(t,a)?null:t}});function Pi(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?(function(n=[]){for(let r=n.length-1;r>=0;r--){const i=n[r];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null})(t):null}catch{return _e&&Y.error(`Cannot extract url for event ${zt(e)}`),null}}function Yv(e,t,n=250,r,i,a,o){if(!(a.exception&&a.exception.values&&o&&on(o.originalException,Error)))return;const s=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;var c,l;s&&(a.exception.values=(c=mo(e,t,i,o.originalException,r,a.exception.values,s,0),l=n,c.map((d=>(d.value&&(d.value=Rn(d.value,l)),d)))))}function mo(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(on(r[i],Error)){Uu(o,s);const l=e(t,r[i]),d=c.length;zu(l,i,d,s),c=mo(e,t,n,r[i],i,[l,...c],l,d)}return Array.isArray(r.errors)&&r.errors.forEach(((l,d)=>{if(on(l,Error)){Uu(o,s);const f=e(t,l),p=c.length;zu(f,`errors[${d}]`,p,s),c=mo(e,t,n,l,i,[f,...c],f,p)}})),c}function Uu(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function zu(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function go(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Xv(){"console"in he&&Ha.forEach((function(e){e in he.console&&tt(he.console,e,(function(t){return gi[e]=t,function(...n){vt("console",{args:n,level:e});const r=gi[e];r&&r.apply(he.console,n)}}))}))}function Qv(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Zv=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if((function(n,r){return r?!!((function(i,a){const o=i.message,s=a.message;return!(!o&&!s||o&&!s||!o&&s||o!==s||!Ju(i,a)||!Wu(i,a))})(n,r)||(function(i,a){const o=qu(a),s=qu(i);return!(!o||!s||o.type!==s.type||o.value!==s.value||!Ju(i,a)||!Wu(i,a))})(n,r)):!1})(t,e))return _e&&Y.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function Wu(e,t){let n=Xl(e),r=Xl(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let i=0;i<r.length;i++){const a=r[i],o=n[i];if(a.filename!==o.filename||a.lineno!==o.lineno||a.colno!==o.colno||a.function!==o.function)return!1}return!0}function Ju(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function qu(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Hu(e){return e===void 0?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const vo=he;function yo(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function ey(){if(typeof EdgeRuntime=="string")return!0;if(!(function(){if(!("fetch"in vo))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}})())return!1;if(yo(vo.fetch))return!0;let e=!1;const t=vo.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=yo(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){tn&&Y.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function ty(e,t){const n="fetch";rn(n,e),an(n,(()=>(function(r,i=!1){i&&!ey()||tt(he,"fetch",(function(a){return function(...o){const s=new Error,{method:c,url:l}=(function(f){if(f.length===0)return{method:"GET",url:""};if(f.length===2){const[g,y]=f;return{url:Gu(g),method:bo(y,"method")?String(y.method).toUpperCase():"GET"}}const p=f[0];return{url:Gu(p),method:bo(p,"method")?String(p.method).toUpperCase():"GET"}})(o),d={args:o,fetchData:{method:c,url:l},startTimestamp:1e3*It(),virtualError:s};return r||vt("fetch",{...d}),a.apply(he,o).then((async f=>(r?r(f):vt("fetch",{...d,endTimestamp:1e3*It(),response:f}),f)),(f=>{throw vt("fetch",{...d,endTimestamp:1e3*It(),error:f}),Xa(f)&&f.stack===void 0&&(f.stack=s.stack,sn(f,"framesToPop",1)),f}))}}))})(void 0,t)))}function bo(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Gu(e){return typeof e=="string"?e:e?bo(e,"url")?e.url:e.toString?e.toString():"":""}const Ei=he,De=he;let _o=0;function Ku(){return _o>0}function Bn(e,t={}){if(!(function(r){return typeof r=="function"})(e))return e;try{const r=e.__sentry_wrapped__;if(r)return typeof r=="function"?r:e;if(to(e))return e}catch{return e}const n=function(...r){try{const i=r.map((a=>Bn(a,t)));return e.apply(this,i)}catch(i){throw _o++,setTimeout((()=>{_o--})),(function(...a){const o=so(bi());if(a.length===2){const[s,c]=a;return s?o.withSetScope(s,c):o.withScope(c)}o.withScope(a[0])})((a=>{var o;a.addEventProcessor((s=>(t.mechanism&&(ro(s,void 0),Vn(s,t.mechanism)),s.extra={...s.extra,arguments:r},s))),o=i,ln().captureException(o,void 0)})),i}};try{for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}catch{}au(n,e),sn(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}const Ai=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function wo(e,t){const n=So(e,t),r={type:iy(t),value:ay(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function ny(e,t,n,r){const i=Be(),a=i&&i.getOptions().normalizeDepth,o=(function(l){for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)){const f=l[d];if(f instanceof Error)return f}})(t),s={__serialized__:ku(t,a)};if(o)return{exception:{values:[wo(e,o)]},extra:s};const c={exception:{values:[{type:_i(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:oy(t,{isUnhandledRejection:r})}]},extra:s};if(n){const l=So(e,n);l.length&&(c.exception.values[0].stacktrace={frames:l})}return c}function ko(e,t){return{exception:{values:[wo(e,t)]}}}function So(e,t){const n=t.stacktrace||t.stack||"",r=(function(a){return a&&ry.test(a.message)?1:0})(t),i=(function(a){return typeof a.framesToPop=="number"?a.framesToPop:0})(t);try{return e(n,r,i)}catch{}return[]}const ry=/Minified React error #\d+;/i;function Yu(e){return typeof WebAssembly<"u"&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function iy(e){const t=e&&e.name;return!t&&Yu(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function ay(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:Yu(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function xo(e,t,n,r,i){let a;if(eu(t)&&t.error)return ko(e,t.error);if(tu(t)||Ln(t,"DOMException")){const o=t;if("stack"in t)a=ko(e,t);else{const s=o.name||(tu(o)?"DOMError":"DOMException"),c=o.message?`${s}: ${o.message}`:s;a=To(e,c,n,r),ro(a,c)}return"code"in o&&(a.tags={...a.tags,"DOMException.code":`${o.code}`}),a}return Xa(t)?ko(e,t):jn(t)||_i(t)?(a=ny(e,t,n,i),Vn(a,{synthetic:!0}),a):(a=To(e,t,n,r),ro(a,`${t}`),Vn(a,{synthetic:!0}),a)}function To(e,t,n,r){const i={};if(r&&n){const a=So(e,n);a.length&&(i.exception={values:[{value:t,stacktrace:{frames:a}}]}),Vn(i,{synthetic:!0})}if(Qa(t)){const{__sentry_template_string__:a,__sentry_template_values__:o}=t;return i.logentry={message:a,params:o},i}return i.message=t,i}function oy(e,{isUnhandledRejection:t}){const n=(function(i,a=40){const o=Object.keys(ou(i));o.sort();const s=o[0];if(!s)return"[object has no keys]";if(s.length>=a)return Rn(s,a);for(let c=o.length;c>0;c--){const l=o.slice(0,c).join(", ");if(!(l.length>a))return c===o.length?l:Rn(l,a)}return""})(e),r=t?"promise rejection":"exception";return eu(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:_i(e)?`Event \`${(function(i){try{const a=Object.getPrototypeOf(i);return a?a.constructor.name:void 0}catch{}})(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}class sy extends Uv{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t};(function(r,i,a=[i],o="npm"){const s=r._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${i}`,packages:a.map((c=>({name:`${o}:@sentry/${c}`,version:en}))),version:en}),r._metadata=s})(n,"browser",["browser"],De.SENTRY_SDK_SOURCE||"npm"),super(n),n.sendClientReports&&De.document&&De.document.addEventListener("visibilitychange",(()=>{De.document.visibilityState==="hidden"&&this._flushOutcomes()}))}eventFromException(t,n){return(function(r,i,a,o){const s=xo(r,i,a&&a.syntheticException||void 0,o);return Vn(s),s.level="error",a&&a.event_id&&(s.event_id=a.event_id),cn(s)})(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return(function(i,a,o="info",s,c){const l=To(i,a,s&&s.syntheticException||void 0,c);return l.level=o,s&&s.event_id&&(l.event_id=s.event_id),cn(l)})(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled())return void(Ai&&Y.warn("SDK not enabled, will not capture user feedback."));const n=(function(r,{metadata:i,tunnel:a,dsn:o}){const s={event_id:r.event_id,sent_at:new Date().toISOString(),...i&&i.sdk&&{sdk:{name:i.sdk.name,version:i.sdk.version}},...!!a&&!!o&&{dsn:Ti(o)}};return yr(s,[(function(l){return[{type:"user_report"},l]})(r)])})(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}}const cy=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,qe=he;let Xu,Mo,Co,Oi;function ly(){if(!qe.document)return;const e=vt.bind(null,"dom"),t=Qu(e,!0);qe.document.addEventListener("click",t,!1),qe.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((n=>{const r=qe[n],i=r&&r.prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&(tt(i,"addEventListener",(function(a){return function(o,s,c){if(o==="click"||o=="keypress")try{const l=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=l[o]=l[o]||{refCount:0};if(!d.handler){const f=Qu(e);d.handler=f,a.call(this,o,f,c)}d.refCount++}catch{}return a.call(this,o,s,c)}})),tt(i,"removeEventListener",(function(a){return function(o,s,c){if(o==="click"||o=="keypress")try{const l=this.__sentry_instrumentation_handlers__||{},d=l[o];d&&(d.refCount--,d.refCount<=0&&(a.call(this,o,d.handler,c),d.handler=void 0,delete l[o]),Object.keys(l).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return a.call(this,o,s,c)}})))}))}function Qu(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=(function(a){try{return a.target}catch{return null}})(n);if((function(a,o){return a==="keypress"&&(!o||!o.tagName||o.tagName!=="INPUT"&&o.tagName!=="TEXTAREA"&&!o.isContentEditable)})(n.type,r))return;sn(n,"_sentryCaptured",!0),r&&!r._sentryId&&sn(r,"_sentryId",at());const i=n.type==="keypress"?"input":n.type;(function(a){if(a.type!==Mo)return!1;try{if(!a.target||a.target._sentryId!==Co)return!1}catch{}return!0})(n)||(e({event:n,name:i,global:t}),Mo=n.type,Co=r?r._sentryId:void 0),clearTimeout(Xu),Xu=qe.setTimeout((()=>{Co=void 0,Mo=void 0}),1e3)}}function Zu(e){const t="history";rn(t,e),an(t,uy)}function uy(){if(!(function(){const n=Ei.chrome,r=n&&n.app&&n.app.runtime,i="history"in Ei&&!!Ei.history.pushState&&!!Ei.history.replaceState;return!r&&i})())return;const e=qe.onpopstate;function t(n){return function(...r){const i=r.length>2?r[2]:void 0;if(i){const a=Oi,o=String(i);Oi=o,vt("history",{from:a,to:o})}return n.apply(this,r)}}qe.onpopstate=function(...n){const r=qe.location.href,i=Oi;if(Oi=r,vt("history",{from:i,to:r}),e)try{return e.apply(this,n)}catch{}},tt(qe.history,"pushState",t),tt(qe.history,"replaceState",t)}const Ii={};function ed(e){Ii[e]=void 0}const br="__sentry_xhr_v3__";function dy(){if(!qe.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,a=1e3*It(),o=Ot(r[0])?r[0].toUpperCase():void 0,s=(function(l){if(Ot(l))return l;try{return l.toString()}catch{}})(r[1]);if(!o||!s)return t.apply(n,r);n[br]={method:o,url:s,request_headers:{}},o==="POST"&&s.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const l=n[br];if(l&&n.readyState===4){try{l.status_code=n.status}catch{}vt("xhr",{endTimestamp:1e3*It(),startTimestamp:a,xhr:n,virtualError:i})}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply:(l,d,f)=>(c(),l.apply(d,f))}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(l,d,f){const[p,g]=f,y=d[br];return y&&Ot(p)&&Ot(g)&&(y.request_headers[p.toLowerCase()]=g),l.apply(d,f)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[br];return i?(r[0]!==void 0&&(i.body=r[0]),vt("xhr",{startTimestamp:1e3*It(),xhr:n}),t.apply(n,r)):t.apply(n,r)}})}function fy(e,t=(function(n){const r=Ii[n];if(r)return r;let i=qe[n];if(yo(i))return Ii[n]=i.bind(qe);const a=qe.document;if(a&&typeof a.createElement=="function")try{const o=a.createElement("iframe");o.hidden=!0,a.head.appendChild(o);const s=o.contentWindow;s&&s[n]&&(i=s[n]),a.head.removeChild(o)}catch(o){cy&&Y.warn(`Could not create sandbox iframe for ${n} check, bailing to window.${n}: `,o)}return i&&(Ii[n]=i.bind(qe))})("fetch")){let n=0,r=0;return Jv(e,(function(i){const a=i.body.length;n+=a,r++;const o={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return ed("fetch"),Si("No fetch implementation available");try{return t(e.url,o).then((s=>(n-=a,r--,{statusCode:s.status,headers:{"x-sentry-rate-limits":s.headers.get("X-Sentry-Rate-Limits"),"retry-after":s.headers.get("Retry-After")}})))}catch(s){return ed("fetch"),n-=a,r--,Si(s)}}))}function Po(e,t,n,r){const i={filename:e,function:t==="<anonymous>"?nn:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const hy=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,py=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,my=/\((\S*)(?::(\d+))(?::(\d+))\)/,gy=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,vy=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,yy=(function(...e){const t=e.sort(((n,r)=>n[0]-r[0])).map((n=>n[1]));return(n,r=0,i=0)=>{const a=[],o=n.split(`
17
- `);for(let s=r;s<o.length;s++){const c=o[s];if(c.length>1024)continue;const l=Gl.test(c)?c.replace(Gl,"$1"):c;if(!l.match(/\S*Error: /)){for(const d of t){const f=d(l);if(f){a.push(f);break}}if(a.length>=50+i)break}}return(function(s){if(!s.length)return[];const c=Array.from(s);return/sentryWrapped/.test(vi(c).function||"")&&c.pop(),c.reverse(),Kl.test(vi(c).function||"")&&(c.pop(),Kl.test(vi(c).function||"")&&c.pop()),c.slice(0,50).map((l=>({...l,filename:l.filename||vi(c).filename,function:l.function||nn})))})(a.slice(i))}})([30,e=>{const t=hy.exec(e);if(t){const[,r,i,a]=t;return Po(r,nn,+i,+a)}const n=py.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const a=my.exec(n[2]);a&&(n[2]=a[1],n[3]=a[2],n[4]=a[3])}const[r,i]=td(n[1]||nn,n[2]);return Po(i,r,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=gy.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=vy.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],r=t[1]||nn;return[r,n]=td(r,n),Po(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),td=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:nn,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},nd=1024,by=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(n){var r;t.console&&(function(i){const a="console";rn(a,i),an(a,Xv)})((function(i){return function(a){if(Be()!==i)return;const o={category:"console",data:{arguments:a.args,logger:"console"},level:Qv(a.level),message:iu(a.args," ")};if(a.level==="assert"){if(a.args[0]!==!1)return;o.message=`Assertion failed: ${iu(a.args.slice(1)," ")||"console.assert"}`,o.data.arguments=a.args.slice(1)}un(o,{input:a.args,level:a.level})}})(n)),t.dom&&(r=(function(i,a){return function(o){if(Be()!==i)return;let s,c,l=typeof a=="object"?a.serializeAttribute:void 0,d=typeof a=="object"&&typeof a.maxStringLength=="number"?a.maxStringLength:void 0;d&&d>nd&&(Ai&&Y.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${d} was configured. Sentry will use 1024 instead.`),d=nd),typeof l=="string"&&(l=[l]);try{const p=o.event,g=(function(y){return!!y&&!!y.target})(p)?p.target:p;s=ru(g,{keyAttrs:l,maxStringLength:d}),c=(function(y){if(!eo.HTMLElement)return null;let v=y;for(let b=0;b<5;b++){if(!v)return null;if(v instanceof HTMLElement){if(v.dataset.sentryComponent)return v.dataset.sentryComponent;if(v.dataset.sentryElement)return v.dataset.sentryElement}v=v.parentNode}return null})(g)}catch{s="<unknown>"}if(s.length===0)return;const f={category:`ui.${o.name}`,message:s};c&&(f.data={"ui.component_name":c}),un(f,{event:o.event,name:o.name,global:o.global})}})(n,t.dom),rn("dom",r),an("dom",ly)),t.xhr&&(function(i){rn("xhr",i),an("xhr",dy)})((function(i){return function(a){if(Be()!==i)return;const{startTimestamp:o,endTimestamp:s}=a,c=a.xhr[br];if(!o||!s||!c)return;const{method:l,url:d,status_code:f,body:p}=c,g={method:l,url:d,status_code:f},y={xhr:a.xhr,input:p,startTimestamp:o,endTimestamp:s};un({category:"xhr",data:g,type:"http",level:Hu(f)},y)}})(n)),t.fetch&&ty((function(i){return function(a){if(Be()!==i)return;const{startTimestamp:o,endTimestamp:s}=a;if(s&&(!a.fetchData.url.match(/sentry_key/)||a.fetchData.method!=="POST"))if(a.error)un({category:"fetch",data:a.fetchData,level:"error",type:"http"},{data:a.error,input:a.args,startTimestamp:o,endTimestamp:s});else{const c=a.response,l={...a.fetchData,status_code:c&&c.status},d={input:a.args,response:c,startTimestamp:o,endTimestamp:s};un({category:"fetch",data:l,type:"http",level:Hu(l.status_code)},d)}}})(n)),t.history&&Zu((function(i){return function(a){if(Be()!==i)return;let o=a.from,s=a.to;const c=go(De.location.href);let l=o?go(o):void 0;const d=go(s);l&&l.path||(l=c),c.protocol===d.protocol&&c.host===d.host&&(s=d.relative),c.protocol===l.protocol&&c.host===l.host&&(o=l.relative),un({category:"navigation",data:{from:o,to:s}})}})(n)),t.sentry&&n.on("beforeSendEvent",(function(i){return function(a){Be()===i&&un({category:"sentry."+(a.type==="transaction"?"transaction":"event"),event_id:a.event_id,level:a.level,message:zt(a)},{event:a})}})(n))}}},_y=["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"],wy=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&tt(De,"setTimeout",rd),t.setInterval&&tt(De,"setInterval",rd),t.requestAnimationFrame&&tt(De,"requestAnimationFrame",ky),t.XMLHttpRequest&&"XMLHttpRequest"in De&&tt(XMLHttpRequest.prototype,"send",Sy);const n=t.eventTarget;n&&(Array.isArray(n)?n:_y).forEach(xy)}}};function rd(e){return function(...t){const n=t[0];return t[0]=Bn(n,{mechanism:{data:{function:Ut(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function ky(e){return function(t){return e.apply(this,[Bn(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ut(e)},handled:!1,type:"instrument"}})])}}function Sy(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((r=>{r in n&&typeof n[r]=="function"&&tt(n,r,(function(i){const a={mechanism:{data:{function:r,handler:Ut(i)},handled:!1,type:"instrument"}},o=to(i);return o&&(a.mechanism.data.handler=Ut(o)),Bn(i,a)}))})),e.apply(this,t)}}function xy(e){const t=De[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(tt(n,"addEventListener",(function(r){return function(i,a,o){try{typeof a.handleEvent=="function"&&(a.handleEvent=Bn(a.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ut(a),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,Bn(a,{mechanism:{data:{function:"addEventListener",handler:Ut(a),target:e},handled:!1,type:"instrument"}}),o])}})),tt(n,"removeEventListener",(function(r){return function(i,a,o){try{const s=a.__sentry_wrapped__;s&&r.call(this,i,s,o)}catch{}return r.call(this,i,a,o)}})))}const Ty=()=>({name:"BrowserSession",setupOnce(){De.document!==void 0?(Eu({ignoreDuration:!0}),Iu(),Zu((({from:e,to:t})=>{e!==void 0&&e!==t&&(Eu({ignoreDuration:!0}),Iu())}))):Ai&&Y.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),My=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&((function(r){(function(i){const a="error";rn(a,i),an(a,gv)})((i=>{const{stackParser:a,attachStacktrace:o}=ad();if(Be()!==r||Ku())return;const{msg:s,url:c,line:l,column:d,error:f}=i,p=(function(g,y,v,b){const _=g.exception=g.exception||{},k=_.values=_.values||[],T=k[0]=k[0]||{},M=T.stacktrace=T.stacktrace||{},x=M.frames=M.frames||[],C=b,A=v,E=Ot(y)&&y.length>0?y:(function(){try{return eo.document.location.href}catch{return""}})();return x.length===0&&x.push({colno:C,filename:E,function:nn,in_app:!0,lineno:A}),g})(xo(a,f||s,void 0,o,!1),c,l,d);p.level="error",Pu(p,{originalException:f,mechanism:{handled:!1,type:"onerror"}})}))})(n),id("onerror")),t.onunhandledrejection&&((function(r){(function(i){const a="unhandledrejection";rn(a,i),an(a,vv)})((i=>{const{stackParser:a,attachStacktrace:o}=ad();if(Be()!==r||Ku())return;const s=(function(l){if(Za(l))return l;try{if("reason"in l)return l.reason;if("detail"in l&&"reason"in l.detail)return l.detail.reason}catch{}return l})(i),c=Za(s)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(s)}`}]}}:xo(a,s,void 0,o,!0);c.level="error",Pu(c,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})}))})(n),id("onunhandledrejection"))}}};function id(e){Ai&&Y.log(`Global Handler attached: ${e}`)}function ad(){const e=Be();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Cy=()=>({name:"HttpContext",preprocessEvent(e){if(!De.navigator&&!De.location&&!De.document)return;const t=e.request&&e.request.url||De.location&&De.location.href,{referrer:n}=De.document||{},{userAgent:r}=De.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},a={...e.request,...t&&{url:t},headers:i};e.request=a}}),Py=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(r,i,a){const o=a.getOptions();Yv(wo,o.stackParser,o.maxValueLength,n,t,r,i)}}};var od="new",sd="loading",cd="loaded",Eo="joining-meeting",dn="joined-meeting",fn="left-meeting",Jt="error",Ey="playable",Ao="unknown",Ay="full",Oy="base",ld="no-room",Iy="end-of-life",Dy="connection-error",Ly="iframe-ready-for-launch-config",jy="iframe-launch-config",Ry="theme-updated",Vy="loading",Ny="load-attempt-failed",ud="loaded",Fy="started-camera",By="camera-error",$y="joining-meeting",Uy="joined-meeting",zy="left-meeting",Wy="participant-joined",Jy="participant-updated",qy="participant-left",Hy="participant-counts-updated",Gy="access-state-updated",Ky="meeting-session-summary-updated",Yy="meeting-session-state-updated",Xy="waiting-participant-added",Qy="waiting-participant-updated",Zy="waiting-participant-removed",eb="track-started",tb="track-stopped",nb="transcription-started",rb="transcription-stopped",ib="transcription-error",dd="recording-started",fd="recording-stopped",ab="recording-stats",ob="recording-error",sb="recording-upload-completed",cb="recording-data",lb="app-message",ub="transcription-message",db="remote-media-player-started",fb="remote-media-player-updated",hb="remote-media-player-stopped",pb="local-screen-share-started",mb="local-screen-share-stopped",gb="local-screen-share-canceled",vb="active-speaker-change",yb="active-speaker-mode-change",bb="network-quality-change",_b="network-connection",wb="cpu-load-change",kb="face-counts-updated",Di="fullscreen",Li="exited-fullscreen",Sb="live-streaming-started",xb="live-streaming-updated",Tb="live-streaming-stopped",Mb="live-streaming-error",Cb="lang-updated",Pb="receive-settings-updated",hd="input-settings-updated",pd="nonfatal-error",md="error",Oo=4096,gd=102400,Io="iframe-call-message",vd="local-screen-start",yd="daily-method-update-live-streaming-endpoints",ji="transmit-log",jt="daily-custom-track",Ri={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},bd={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},Do={PLAY:"play",PAUSE:"pause"},Lo=["jpg","png","jpeg"],Eb="add-endpoints",Ab="remove-endpoints",_d="sip-call-transfer";function st(){return!se()&&typeof window<"u"&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function se(){return typeof navigator<"u"&&navigator.product&&navigator.product==="ReactNative"}function wd(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function Ob(){return!!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)&&((function(e,t){if(!e||!t)return!0;switch(e){case"Chrome":return t.major>=75;case"Safari":return RTCRtpTransceiver.prototype.hasOwnProperty("currentDirection")&&!(t.major===13&&t.minor===0&&t.point===0);case"Firefox":return t.major>=67}return!0})(hn(),Vi())||se())}function kd(){if(se()||!document)return!1;var e=document.createElement("iframe");return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var jo="none",Ib="software",Db="hardware",Lb=(function(){try{var e,t=document.createElement("canvas"),n=!1;(e=t.getContext("webgl2",{failIfMajorPerformanceCaveat:!0}))||(n=!0,e=t.getContext("webgl2"));var r=e!=null;return t.remove(),r?n?Ib:Db:jo}catch{return jo}})();function Sd(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!se()&&Lb!==jo&&(e?(function(){return Md()?!1:["Chrome","Firefox"].includes(hn())})():(function(){if(Md())return!1;var t=hn();if(t==="Safari"){var n=No();if(n.major<15||n.major===15&&n.minor<4)return!1}return t==="Chrome"?Vo().major>=77:t==="Firefox"?Fo().major>=97:["Chrome","Firefox","Safari"].includes(t)})())}function xd(){if(se()||Td()||typeof AudioWorkletNode>"u")return!1;switch(hn()){case"Chrome":case"Firefox":return!0;case"Safari":var e=Vi();return e.major>17||e.major===17&&e.minor>=4}return!1}function Ro(){return wd()&&typeof MediaStreamTrack<"u"&&!(function(){var e,t=hn();if(!st())return!0;switch(t){case"Chrome":return(e=Vo()).major&&e.major>0&&e.major<75;case"Firefox":return(e=Fo()).major<91;case"Safari":return(e=No()).major<13||e.major===13&&e.minor<1;default:return!0}})()}function Td(){return st().match(/Linux; Android/)}function Md(){var e,t=st(),n=t.match(/Mac/)&&(!se()&&typeof window<"u"&&(e=window)!==null&&e!==void 0&&(e=e.navigator)!==null&&e!==void 0&&e.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(t.match(/Mobi/)||t.match(/Android/)||n)||!!st().match(/DailyAnd\//)||void 0}function hn(){if(typeof window<"u"){var e=st();return Cd()?"Safari":e.indexOf("Edge")>-1?"Edge":e.match(/Chrome\//)?"Chrome":e.indexOf("Safari")>-1||Pd()?"Safari":e.indexOf("Firefox")>-1?"Firefox":e.indexOf("MSIE")>-1||e.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function Vi(){switch(hn()){case"Chrome":return Vo();case"Safari":return No();case"Firefox":return Fo();case"Edge":return(function(){var e=0,t=0;if(typeof window<"u"){var n=st().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}})()}}function Vo(){var e=0,t=0,n=0,r=0,i=!1;if(typeof window<"u"){var a=st(),o=a.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(o)try{e=parseInt(o[1]),t=parseInt(o[2]),n=parseInt(o[3]),r=parseInt(o[4]),i=a.indexOf("OPR/")>-1}catch{}}return{major:e,minor:t,build:n,patch:r,opera:i}}function Cd(){return!!st().match(/iPad|iPhone|iPod/i)&&wd()}function Pd(){return st().indexOf("AppleWebKit/605.1.15")>-1}function No(){var e=0,t=0,n=0;if(typeof window<"u"){var r=st().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch{}else(Cd()||Pd())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function Fo(){var e=0,t=0;if(typeof window<"u"){var n=st().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}var Ed=(function(){return et((function e(){Ze(this,e)}),[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){pr()}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){pr()}},{key:"sendMessageToCallMachine",value:function(e,t,n,r){pr()}},{key:"sendMessageToDailyJs",value:function(e,t){pr()}},{key:"removeListener",value:function(e){pr()}}])})();function Ad(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function Bo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ad(Object(n),!0).forEach((function(r){xt(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ad(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Od(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Od=function(){return!!e})()}var jb=(function(){function e(){var t,n,r,i;return Ze(this,e),n=this,r=gt(r=e),(t=ci(n,Od()?Reflect.construct(r,[],gt(n).constructor):r.apply(n,i)))._wrappedListeners={},t._messageCallbacks={},t}return li(e,Ed),et(e,[{key:"addListenerForMessagesFromCallMachine",value:function(t,n,r){var i=this,a=function(o){if(o.data&&o.data.what==="iframe-call-message"&&(!o.data.callClientId||o.data.callClientId===n)&&(!o.data.from||o.data.from!=="module")){var s=Bo({},o.data);if(delete s.from,s.callbackStamp&&i._messageCallbacks[s.callbackStamp]){var c=s.callbackStamp;i._messageCallbacks[c].call(r,s),delete i._messageCallbacks[c]}delete s.what,delete s.callbackStamp,t.call(r,s)}};this._wrappedListeners[t]=a,window.addEventListener("message",a)}},{key:"addListenerForMessagesFromDailyJs",value:function(t,n,r){var i=function(a){var o;if(!(!a.data||a.data.what!==Io||!a.data.action||a.data.from&&a.data.from!=="module"||a.data.callClientId&&n&&a.data.callClientId!==n||a!=null&&(o=a.data)!==null&&o!==void 0&&o.callFrameId)){var s=a.data;t.call(r,s)}};this._wrappedListeners[t]=i,window.addEventListener("message",i)}},{key:"sendMessageToCallMachine",value:function(t,n,r,i){if(!r)throw new Error("undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?");var a=Bo({},t);if(a.what=Io,a.from="module",a.callClientId=r,n){var o=fi();this._messageCallbacks[o]=n,a.callbackStamp=o}var s=i?i.contentWindow:window,c=this._callMachineTargetOrigin(i);c&&s.postMessage(a,c)}},{key:"sendMessageToDailyJs",value:function(t,n){t.what=Io,t.callClientId=n,t.from="embedded",window.postMessage(t,this._targetOriginFromWindowLocation())}},{key:"removeListener",value:function(t){var n=this._wrappedListeners[t];n&&(window.removeEventListener("message",n),delete this._wrappedListeners[t])}},{key:"forwardPackagedMessageToCallMachine",value:function(t,n,r){var i=Bo({},t);i.callClientId=r;var a=n?n.contentWindow:window,o=this._callMachineTargetOrigin(n);o&&a.postMessage(i,o)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(t,n){var r=function(i){if(i.data&&i.data.what==="iframe-call-message"&&(!i.data.callClientId||i.data.callClientId===n)&&(!i.data.from||i.data.from!=="module")){var a=i.data;t(a)}};return this._wrappedListeners[t]=r,window.addEventListener("message",r),t}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(t){var n=this._wrappedListeners[t];n&&(window.removeEventListener("message",n),delete this._wrappedListeners[t])}},{key:"_callMachineTargetOrigin",value:function(t){return t?t.src?new URL(t.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:"_targetOriginFromWindowLocation",value:function(){return window.location.protocol==="file:"?"*":window.location.origin}}])})();function Id(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function Dd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Dd=function(){return!!e})()}var Rb=(function(){function e(){var t,n,r,i;return Ze(this,e),n=this,r=gt(r=e),t=ci(n,Dd()?Reflect.construct(r,[],gt(n).constructor):r.apply(n,i)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new qa.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new qa.EventEmitter,t._wrappedListeners={},t._messageCallbacks={},t}return li(e,Ed),et(e,[{key:"addListenerForMessagesFromCallMachine",value:function(t,n,r){this._addListener(t,global.callMachineToDailyJsEmitter,n,r,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(t,n,r){this._addListener(t,global.dailyJsToCallMachineEmitter,n,r,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(t,n,r){this._sendMessage(t,global.dailyJsToCallMachineEmitter,r,n,"sending message to call machine")}},{key:"sendMessageToDailyJs",value:function(t,n){this._sendMessage(t,global.callMachineToDailyJsEmitter,n,null,"sending message to daily-js")}},{key:"removeListener",value:function(t){var n=this._wrappedListeners[t];n&&(global.callMachineToDailyJsEmitter.removeListener("message",n),global.dailyJsToCallMachineEmitter.removeListener("message",n),delete this._wrappedListeners[t])}},{key:"_addListener",value:function(t,n,r,i,a){var o=this,s=function(c){if(c.callClientId===r){if(c.callbackStamp&&o._messageCallbacks[c.callbackStamp]){var l=c.callbackStamp;o._messageCallbacks[l].call(i,c),delete o._messageCallbacks[l]}t.call(i,c)}};this._wrappedListeners[t]=s,n.addListener("message",s)}},{key:"_sendMessage",value:function(t,n,r,i,a){var o=(function(c){for(var l=1;l<arguments.length;l++){var d=arguments[l]!=null?arguments[l]:{};l%2?Id(Object(d),!0).forEach((function(f){xt(c,f,d[f])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):Id(Object(d)).forEach((function(f){Object.defineProperty(c,f,Object.getOwnPropertyDescriptor(d,f))}))}return c})({},t);if(o.callClientId=r,i){var s=fi();this._messageCallbacks[s]=i,o.callbackStamp=s}n.emit("message",o)}}])})(),$o="replace",Uo="shallow-merge",Ld=[$o,Uo],Vb=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.data,r=t.mergeStrategy,i=r===void 0?$o:r;Ze(this,e),e._validateMergeStrategy(i),e._validateData(n,i),this.mergeStrategy=i,this.data=n}return et(e,[{key:"isNoOp",value:function(){return e.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:"isNoOpUpdate",value:function(t,n){return Object.keys(t).length===0&&n===Uo}},{key:"_validateMergeStrategy",value:function(t){if(!Ld.includes(t))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(Ld,"]"))}},{key:"_validateData",value:function(t,n){if(!(function(s){if(s==null||fe(s)!=="object")return!1;var c=Object.getPrototypeOf(s);return c==null||c===Object.prototype})(t))throw Error("Meeting session data must be a plain (map-like) object");var r;try{if(r=JSON.stringify(t),n===$o){var i=JSON.parse(r);We(i,t)||console.warn("The meeting session data provided will be modified when serialized.",i,t)}else if(n===Uo){for(var a in t)if(Object.hasOwnProperty.call(t,a)&&t[a]!==void 0){var o=JSON.parse(JSON.stringify(t[a]));We(t[a],o)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",o,t[a])}}}catch(s){throw Error("Meeting session data must be serializable to JSON: ".concat(s))}if(r.length>gd)throw Error("Meeting session data is too large (".concat(r.length," characters). Maximum size suppported is ").concat(gd,"."))}}])})();function jd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(jd=function(){return!!e})()}function zo(e){var t=typeof Map=="function"?new Map:void 0;return zo=function(n){if(n===null||!(function(i){try{return Function.toString.call(i).indexOf("[native code]")!==-1}catch{return typeof i=="function"}})(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,r)}function r(){return(function(i,a,o){if(jd())return Reflect.construct.apply(null,arguments);var s=[null];s.push.apply(s,a);var c=new(i.bind.apply(i,s));return o&&hr(c,o.prototype),c})(n,arguments,gt(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),hr(r,n)},zo(e)}function Rd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Rd=function(){return!!e})()}function Vd(e){var t,n=(t=window._daily)===null||t===void 0?void 0:t.pendings;if(n){var r=n.indexOf(e);r!==-1&&n.splice(r,1)}}var Nb=(function(){return et((function e(t){Ze(this,e),this._currentLoad=null,this._callClientId=t}),[{key:"load",value:function(){var e,t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new Fb(n,(function(){r(!1)}),(function(a,o){o||Vd(t._callClientId),i(a,o)})),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),Vd(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])})(),Fb=(function(){return et((function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;Ze(this,e),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r}),[{key:"start",value:function(){var e=this;if(!this._currentAttempt){var t=function(n){e._currentAttempt.cancelled||(e._attemptsRemaining--,e._failureCallback(n,e._attemptsRemaining>0),e._attemptsRemaining<=0||setTimeout((function(){e._currentAttempt.cancelled||(e._currentAttempt=new Nd(e._dailyConfig,e._successCallback,t),e._currentAttempt.start())}),3e3))};this._currentAttempt=new Nd(this._dailyConfig,this._successCallback,t),this._currentAttempt.start()}}},{key:"cancel",value:function(){this._currentAttempt&&this._currentAttempt.cancel()}},{key:"cancelled",get:function(){return this._currentAttempt&&this._currentAttempt.cancelled}},{key:"succeeded",get:function(){return this._currentAttempt&&this._currentAttempt.succeeded}}])})(),Wo=(function(){function e(){return Ze(this,e),t=this,r=arguments,n=gt(n=e),ci(t,Rd()?Reflect.construct(n,r||[],gt(t).constructor):n.apply(t,r));var t,n,r}return li(e,zo(Error)),et(e)})(),Ni=2e4,Nd=(function(){return et((function t(n,r,i){Ze(this,t),this._loadAttemptImpl=se()||!n.avoidEval?new Bb(n,r,i):new $b(n,r,i)}),[{key:"start",value:(e=H((function*(){return this._loadAttemptImpl.start()})),function(){return e.apply(this,arguments)})},{key:"cancel",value:function(){this._loadAttemptImpl.cancel()}},{key:"cancelled",get:function(){return this._loadAttemptImpl.cancelled}},{key:"succeeded",get:function(){return this._loadAttemptImpl.succeeded}}]);var e})(),Bb=(function(){return et((function i(a,o,s){Ze(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=a,this._successCallback=o,this._failureCallback=s}),[{key:"start",value:(r=H((function*(){var i=hi(this._dailyConfig);!(yield this._tryLoadFromIOSCache(i))&&this._loadFromNetwork(i)})),function(){return r.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(n=H((function*(i){if(!this._iosCache)return!1;try{var a=yield this._iosCache.get(i);return!!this.cancelled||!!a&&(a.code?(Function('"use strict";'+a.code)(),this.succeeded=!0,this._successCallback(),!0):(this._refetchHeaders=a.refetchHeaders,!1))}catch{return!1}})),function(i){return n.apply(this,arguments)})},{key:"_loadFromNetwork",value:(t=H((function*(i){var a=this;this._networkTimeout=setTimeout((function(){a._networkTimedOut=!0,a._failureCallback({msg:"Timed out (>".concat(Ni," ms) when loading call object bundle ").concat(i),type:"timeout"})}),Ni);try{var o=this._refetchHeaders?{headers:this._refetchHeaders}:{},s=yield fetch(i,o);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new Wo;var c=yield this._getBundleCodeFromResponse(i,s);if(this.cancelled)throw new Wo;Function('"use strict";'+c)(),this._iosCache&&this._iosCache.set(i,c,s.headers),this.succeeded=!0,this._successCallback()}catch(l){if(clearTimeout(this._networkTimeout),l instanceof Wo||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(i,": ").concat(l),type:l.message})}})),function(i){return t.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(e=H((function*(i,a){if(a.ok)return yield a.text();if(this._iosCache&&a.status===304)return(yield this._iosCache.renew(i,a.headers)).code;throw new Error("Received ".concat(a.status," response"))})),function(i,a){return e.apply(this,arguments)})}]);var e,t,n,r})(),$b=(function(){return et((function e(t,n,r){Ze(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r,this._attemptId=fi(),this._networkTimeout=null,this._scriptElement=null}),[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=hi(this._dailyConfig);(typeof document>"u"?"undefined":fe(document))==="object"?this._startLoading(e):this._failureCallback({msg:"Call object bundle must be loaded in a DOM/web context",type:"missing context"})}},{key:"cancel",value:function(){this._stopLoading(),this.cancelled=!0}},{key:"_startLoading",value:function(e){var t=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout((function(){t._stopLoading(),t._failureCallback({msg:"Timed out (>".concat(Ni," ms) when loading call object bundle ").concat(e),type:"timeout"})}),Ni);var n=document.getElementsByTagName("head")[0],r=document.createElement("script");this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback()},r.onerror=function(i){t._stopLoading(),t._failureCallback({msg:"Failed to load call object bundle ".concat(i.target.src),type:i.message})},r.src=e,n.appendChild(r)}},{key:"_stopLoading",value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:"_signUpForCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:"_withdrawFromCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}])})(),Fi=function(e,t,n){return zb(e.local,t,n)===!0},Ub=function(e,t,n){return e.local.streams&&e.local.streams[t]&&e.local.streams[t].stream&&e.local.streams[t].stream["get".concat(n==="video"?"Video":"Audio","Tracks")]()[0]},$n=function(e,t,n,r){var i=Wb(e,t,n,r);return i&&i.pendingTrack},zb=function(e,t,n){if(!e)return!1;var r=function(a){switch(a){case"avatar":return!0;case"staged":return a;default:return!!a}},i=e.public.subscribedTracks;return i&&i[t]?["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo"].indexOf(n)===-1&&i[t].custom?[!0,"staged"].includes(i[t].custom)?r(i[t].custom):r(i[t].custom[n]):r(i[t][n]):!i||r(i.ALL)},Wb=function(e,t,n,r){var i=Object.values(e.streams||{}).filter((function(a){return a.participantId===t&&a.type===n&&a.pendingTrack&&a.pendingTrack.kind===r})).sort((function(a,o){return new Date(o.starttime)-new Date(a.starttime)}));return i&&i[0]},Jb=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function Fd(e,t){for(var n=t.getState(),r=0,i=["cam","screen"];r<i.length;r++)for(var a=i[r],o=0,s=["video","audio"];o<s.length;o++){var c=s[o],l=a==="cam"?c:"screen".concat(c.charAt(0).toUpperCase()+c.slice(1)),d=e.tracks[l];if(d){var f=e.local?Ub(n,a,c):$n(n,e.session_id,a,c);d.state==="playable"&&(d.track=f),d.persistentTrack=f}}}function Bd(e,t){try{var n=t.getState();for(var r in e.tracks)if(!qb(r)){var i=e.tracks[r].kind;if(i){var a=e.tracks[r];if(a){var o=e.local?Jb(n,r):$n(n,e.session_id,r,i);a.state==="playable"&&(e.tracks[r].track=o),a.persistentTrack=o}}else console.error("unknown type for custom track")}}catch(s){console.error(s)}}function qb(e){return["video","audio","screenVideo","screenAudio"].includes(e)}function $d(e,t,n){var r=n.getState();if(e.local){if(e.audio)try{e.audioTrack=r.local.streams.cam.stream.getAudioTracks()[0],e.audioTrack||(e.audio=!1)}catch{}if(e.video)try{e.videoTrack=r.local.streams.cam.stream.getVideoTracks()[0],e.videoTrack||(e.video=!1)}catch{}if(e.screen)try{e.screenVideoTrack=r.local.streams.screen.stream.getVideoTracks()[0],e.screenAudioTrack=r.local.streams.screen.stream.getAudioTracks()[0],e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch{}}else{var i=!0;try{var a=r.participants[e.session_id];a&&a.public&&a.public.rtcType&&a.public.rtcType.impl==="peer-to-peer"&&a.private&&!["connected","completed"].includes(a.private.peeringState)&&(i=!1)}catch(d){console.error(d)}if(!i)return e.audio=!1,e.audioTrack=!1,e.video=!1,e.videoTrack=!1,e.screen=!1,void(e.screenTrack=!1);try{if(r.streams,e.audio&&Fi(r,e.session_id,"cam-audio")){var o=$n(r,e.session_id,"cam","audio");o&&(t&&t.audioTrack&&t.audioTrack.id===o.id?e.audioTrack=o:o.muted||(e.audioTrack=o)),e.audioTrack||(e.audio=!1)}if(e.video&&Fi(r,e.session_id,"cam-video")){var s=$n(r,e.session_id,"cam","video");s&&(t&&t.videoTrack&&t.videoTrack.id===s.id?e.videoTrack=s:s.muted||(e.videoTrack=s)),e.videoTrack||(e.video=!1)}if(e.screen&&Fi(r,e.session_id,"screen-audio")){var c=$n(r,e.session_id,"screen","audio");c&&(t&&t.screenAudioTrack&&t.screenAudioTrack.id===c.id?e.screenAudioTrack=c:c.muted||(e.screenAudioTrack=c))}if(e.screen&&Fi(r,e.session_id,"screen-video")){var l=$n(r,e.session_id,"screen","video");l&&(t&&t.screenVideoTrack&&t.screenVideoTrack.id===l.id?e.screenVideoTrack=l:l.muted||(e.screenVideoTrack=l))}e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch(d){console.error("unexpected error matching up tracks",d)}}}function Hb(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(function(c,l){if(c){if(typeof c=="string")return Ud(c,l);var d={}.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?Ud(c,l):void 0}})(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
18
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function Ud(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Tt=new Map,Un=null;function Gb(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(function(c,l){if(c){if(typeof c=="string")return zd(c,l);var d={}.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?zd(c,l):void 0}})(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
19
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function zd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Mt=new Map,_r=null;function Kb(e){Wd()?(function(t){Tt.has(t)||(Tt.set(t,{}),navigator.mediaDevices.enumerateDevices().then((function(n){Tt.has(t)&&(Tt.get(t).lastDevicesString=JSON.stringify(n),Un||(Un=(function(){var r=H((function*(){var i,a=yield navigator.mediaDevices.enumerateDevices(),o=Hb(Tt.keys());try{for(o.s();!(i=o.n()).done;){var s=i.value,c=JSON.stringify(a);c!==Tt.get(s).lastDevicesString&&(Tt.get(s).lastDevicesString=c,s(a))}}catch(l){o.e(l)}finally{o.f()}}));return function(){return r.apply(this,arguments)}})(),navigator.mediaDevices.addEventListener("devicechange",Un)))})).catch((function(){})))})(e):(function(t){Mt.has(t)||(Mt.set(t,{}),navigator.mediaDevices.enumerateDevices().then((function(n){Mt.has(t)&&(Mt.get(t).lastDevicesString=JSON.stringify(n),_r||(_r=setInterval(H((function*(){var r,i=yield navigator.mediaDevices.enumerateDevices(),a=Gb(Mt.keys());try{for(a.s();!(r=a.n()).done;){var o=r.value,s=JSON.stringify(i);s!==Mt.get(o).lastDevicesString&&(Mt.get(o).lastDevicesString=s,o(i))}}catch(c){a.e(c)}finally{a.f()}})),3e3)))})))})(e)}function Yb(e){Wd()?(function(t){Tt.has(t)&&(Tt.delete(t),Tt.size===0&&Un&&(navigator.mediaDevices.removeEventListener("devicechange",Un),Un=null))})(e):(function(t){Mt.has(t)&&(Mt.delete(t),Mt.size===0&&_r&&(clearInterval(_r),_r=null))})(e)}function Wd(){var e;return se()||((e=navigator.mediaDevices)===null||e===void 0?void 0:e.ondevicechange)!==void 0}var Xb=new Set;function Qb(e,t){return e&&e.readyState==="live"&&!(function(n,r){return n.muted&&!Xb.has(n.id)})(e)}function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jd(Object(n),!0).forEach((function(r){xt(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jd(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var wr=Object.freeze({VIDEO:"video",AUDIO:"audio",SCREEN_VIDEO:"screenVideo",SCREEN_AUDIO:"screenAudio",CUSTOM_VIDEO:"customVideo",CUSTOM_AUDIO:"customAudio"}),Zb=Object.freeze({PARTICIPANTS:"participants",STREAMING:"streaming",TRANSCRIPTION:"transcription"}),kr=Object.values(wr),qd=["v","a","sv","sa","cv","ca"];Object.freeze(kr.reduce((function(e,t,n){return e[t]=qd[n],e}),{})),Object.freeze(qd.reduce((function(e,t,n){return e[t]=kr[n],e}),{}));var e0=[wr.VIDEO,wr.AUDIO,wr.SCREEN_VIDEO,wr.SCREEN_AUDIO],Hd=Object.values(Zb),Gd=["p","s","t"];Object.freeze(Hd.reduce((function(e,t,n){return e[t]=Gd[n],e}),{})),Object.freeze(Gd.reduce((function(e,t,n){return e[t]=Hd[n],e}),{}));var Kd=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.base,r=t.byUserId,i=t.byParticipantId;Ze(this,e),this.base=n,this.byUserId=r,this.byParticipantId=i}return et(e,[{key:"clone",value:function(){var t=new e;if(this.base instanceof je?t.base=this.base.clone():t.base=this.base,this.byUserId!==void 0)for(var n in t.byUserId={},this.byUserId){var r=this.byUserId[n];t.byUserId[n]=r instanceof je?r.clone():r}if(this.byParticipantId!==void 0)for(var i in t.byParticipantId={},this.byParticipantId){var a=this.byParticipantId[i];t.byParticipantId[i]=a instanceof je?a.clone():a}return t}},{key:"toJSONObject",value:function(){var t={};if(typeof this.base=="boolean"?t.base=this.base:this.base instanceof je&&(t.base=this.base.toJSONObject()),this.byUserId!==void 0)for(var n in t.byUserId={},this.byUserId){var r=this.byUserId[n];t.byUserId[n]=r instanceof je?r.toJSONObject():r}if(this.byParticipantId!==void 0)for(var i in t.byParticipantId={},this.byParticipantId){var a=this.byParticipantId[i];t.byParticipantId[i]=a instanceof je?a.toJSONObject():a}return t}},{key:"toMinifiedJSONObject",value:function(){var t={};if(this.base!==void 0&&(typeof this.base=="boolean"?t.b=this.base:t.b=this.base.toMinifiedJSONObject()),this.byUserId!==void 0)for(var n in t.u={},this.byUserId){var r=this.byUserId[n];t.u[n]=typeof r=="boolean"?r:r.toMinifiedJSONObject()}if(this.byParticipantId!==void 0)for(var i in t.p={},this.byParticipantId){var a=this.byParticipantId[i];t.p[i]=typeof a=="boolean"?a:a.toMinifiedJSONObject()}return t}},{key:"normalize",value:function(){return this.base instanceof je&&(this.base=this.base.normalize()),this.byUserId&&(this.byUserId=Object.fromEntries(Object.entries(this.byUserId).map((function(t){var n=Fe(t,2),r=n[0],i=n[1];return[r,i instanceof je?i.normalize():i]})))),this.byParticipantId&&(this.byParticipantId=Object.fromEntries(Object.entries(this.byParticipantId).map((function(t){var n=Fe(t,2),r=n[0],i=n[1];return[r,i instanceof je?i.normalize():i]})))),this}}],[{key:"fromJSONObject",value:function(t){var n,r,i;if(t.base!==void 0&&(n=typeof t.base=="boolean"?t.base:je.fromJSONObject(t.base)),t.byUserId!==void 0)for(var a in r={},t.byUserId){var o=t.byUserId[a];r[a]=typeof o=="boolean"?o:je.fromJSONObject(o)}if(t.byParticipantId!==void 0)for(var s in i={},t.byParticipantId){var c=t.byParticipantId[s];i[s]=typeof c=="boolean"?c:je.fromJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:"fromMinifiedJSONObject",value:function(t){var n,r,i;if(t.b!==void 0&&(n=typeof t.b=="boolean"?t.b:je.fromMinifiedJSONObject(t.b)),t.u!==void 0)for(var a in r={},t.u){var o=t.u[a];r[a]=typeof o=="boolean"?o:je.fromMinifiedJSONObject(o)}if(t.p!==void 0)for(var s in i={},t.p){var c=t.p[s];i[s]=typeof c=="boolean"?c:je.fromMinifiedJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:"validateJSONObject",value:function(t){if(fe(t)!=="object")return[!1,"canReceive must be an object"];for(var n=["base","byUserId","byParticipantId"],r=0,i=Object.keys(t);r<i.length;r++){var a=i[r];if(!n.includes(a))return[!1,"canReceive can only contain keys (".concat(n.join(", "),")")];if(a==="base"){var o=Fe(je.validateJSONObject(t.base,!0),2),s=o[0],c=o[1];if(!s)return[!1,c]}else{if(fe(t[a])!=="object")return[!1,"invalid (non-object) value for field '".concat(a,"' in canReceive")];for(var l=0,d=Object.values(t[a]);l<d.length;l++){var f=d[l],p=Fe(je.validateJSONObject(f),2),g=p[0],y=p[1];if(!g)return[!1,y]}}}return[!0]}}])})(),je=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.video,r=t.audio,i=t.screenVideo,a=t.screenAudio,o=t.customVideo,s=t.customAudio;Ze(this,e),this.video=n,this.audio=r,this.screenVideo=i,this.screenAudio=a,this.customVideo=o,this.customAudio=s}return et(e,[{key:"clone",value:function(){var t=new e;return this.video!==void 0&&(t.video=this.video),this.audio!==void 0&&(t.audio=this.audio),this.screenVideo!==void 0&&(t.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(t.screenAudio=this.screenAudio),this.customVideo!==void 0&&(t.customVideo=qt({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=qt({},this.customAudio)),t}},{key:"toJSONObject",value:function(){var t={};return this.video!==void 0&&(t.video=this.video),this.audio!==void 0&&(t.audio=this.audio),this.screenVideo!==void 0&&(t.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(t.screenAudio=this.screenAudio),this.customVideo!==void 0&&(t.customVideo=qt({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=qt({},this.customAudio)),t}},{key:"toMinifiedJSONObject",value:function(){var t={};return this.video!==void 0&&(t.v=this.video),this.audio!==void 0&&(t.a=this.audio),this.screenVideo!==void 0&&(t.sv=this.screenVideo),this.screenAudio!==void 0&&(t.sa=this.screenAudio),this.customVideo!==void 0&&(t.cv=qt({},this.customVideo)),this.customAudio!==void 0&&(t.ca=qt({},this.customAudio)),t}},{key:"normalize",value:function(){function t(n,r){return n&&Object.keys(n).length===1&&n["*"]===r}return!(this.video!==!0||this.audio!==!0||this.screenVideo!==!0||this.screenAudio!==!0||!t(this.customVideo,!0)||!t(this.customAudio,!0))||(this.video!==!1||this.audio!==!1||this.screenVideo!==!1||this.screenAudio!==!1||!t(this.customVideo,!1)||!t(this.customAudio,!1))&&this}}],[{key:"fromBoolean",value:function(t){return new e({video:t,audio:t,screenVideo:t,screenAudio:t,customVideo:{"*":t},customAudio:{"*":t}})}},{key:"fromJSONObject",value:function(t){return new e({video:t.video,audio:t.audio,screenVideo:t.screenVideo,screenAudio:t.screenAudio,customVideo:t.customVideo!==void 0?qt({},t.customVideo):void 0,customAudio:t.customAudio!==void 0?qt({},t.customAudio):void 0})}},{key:"fromMinifiedJSONObject",value:function(t){return new e({video:t.v,audio:t.a,screenVideo:t.sv,screenAudio:t.sa,customVideo:t.cv,customAudio:t.ca})}},{key:"validateJSONObject",value:function(t,n){if(typeof t=="boolean")return[!0];if(fe(t)!=="object")return[!1,"invalid (non-object, non-boolean) value in canReceive"];for(var r=Object.keys(t),i=0,a=r;i<a.length;i++){var o=a[i];if(!kr.includes(o))return[!1,"invalid media type '".concat(o,"' in canReceive")];if(e0.includes(o)){if(typeof t[o]!="boolean")return[!1,"invalid (non-boolean) value for media type '".concat(o,"' in canReceive")]}else{if(fe(t[o])!=="object")return[!1,"invalid (non-object) value for media type '".concat(o,"' in canReceive")];for(var s=0,c=Object.values(t[o]);s<c.length;s++)if(typeof c[s]!="boolean")return[!1,"invalid (non-boolean) value for entry within '".concat(o,"' in canReceive")];if(n&&t[o]["*"]===void 0)return[!1,`canReceive "base" permission must specify "*" as an entry within '`.concat(o,"'")]}}return n&&r.length!==kr.length?[!1,'canReceive "base" permission must specify all media types: '.concat(kr.join(", ")," (or be set to a boolean shorthand)")]:[!0]}}])})(),t0=["result"],n0=["preserveIframe"];function Yd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yd(Object(n),!0).forEach((function(r){xt(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Xd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Xd=function(){return!!e})()}function Qd(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(function(c,l){if(c){if(typeof c=="string")return Zd(c,l);var d={}.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?Zd(c,l):void 0}})(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
20
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function Zd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var pn={},ef="video",r0="voice",tf=se()?{data:{}}:{data:{},topology:"none"},nf={present:0,hidden:0},rf={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},Jo=Object.keys(rf),af=["state","volume","simulcastEncodings"],of={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},Bi={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string",visualState:"'default' | 'sidebar-open' | 'active'"}},qo={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"}},mn={customIntegrations:{validate:gf,help:pf()},customTrayButtons:{validate:mf,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(Bi))},url:{validate:function(e){return typeof e=="string"},help:"url should be a string"},baseUrl:{validate:function(e){return typeof e=="string"},help:"baseUrl should be a string"},token:{validate:function(e){return typeof e=="string"},help:"token should be a string",queryString:"t"},dailyConfig:{validate:function(e,t){try{return t.validateDailyConfig(e),!0}catch(n){console.error("Failed to validate dailyConfig",n)}return!1},help:"Unsupported dailyConfig. Check error logs for detailed info."},reactNativeConfig:{validate:function(e){return vf(e,of)},help:"reactNativeConfig should look like ".concat(JSON.stringify(of),", all fields optional")},lang:{validate:function(e){return["da","de","en-us","en","es","fi","fr","it","jp","ka","nl","no","pl","pt","pt-BR","ru","sv","tr","user"].includes(e)},help:"language not supported. Options are: da, de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sv, tr, user"},userName:!0,userData:{validate:function(e){try{return cf(e),!0}catch(t){return console.error(t),!1}},help:"invalid userData type provided"},startVideoOff:!0,startAudioOff:!0,allowLocalVideo:!0,allowLocalAudio:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(e,t){if(typeof e=="boolean")return t._preloadCache.allowLocalVideo=e,!0;var n;if(e instanceof MediaStreamTrack)t._sharedTracks.videoTrack=e,n={customTrack:jt};else{if(delete t._sharedTracks.videoTrack,typeof e!="string")return console.error("videoSource must be a MediaStreamTrack, boolean, or a string"),!1;n={deviceId:e}}return t._updatePreloadCacheInputSettings({video:{settings:n}},!1),!0}},audioSource:{validate:function(e,t){if(typeof e=="boolean")return t._preloadCache.allowLocalAudio=e,!0;var n;if(e instanceof MediaStreamTrack)t._sharedTracks.audioTrack=e,n={customTrack:jt};else{if(delete t._sharedTracks.audioTrack,typeof e!="string")return console.error("audioSource must be a MediaStreamTrack, boolean, or a string"),!1;n={deviceId:e}}return t._updatePreloadCacheInputSettings({audio:{settings:n}},!1),!0}},subscribeToTracksAutomatically:{validate:function(e,t){return t._preloadCache.subscribeToTracksAutomatically=e,!0}},theme:{validate:function(e){var t=["accent","accentText","background","backgroundAccent","baseText","border","mainAreaBg","mainAreaBgAccent","mainAreaText","supportiveText"],n=function(r){for(var i=0,a=Object.keys(r);i<a.length;i++){var o=a[i];if(!t.includes(o))return console.error('unsupported color "'.concat(o,'". Valid colors: ').concat(t.join(", "))),!1;if(!r[o].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error("".concat(o,' theme color should be provided in valid hex color format. Received: "').concat(r[o],'"')),!1}return!0};return fe(e)==="object"&&("light"in e&&"dark"in e||"colors"in e)?"light"in e&&"dark"in e?"colors"in e.light?"colors"in e.dark?n(e.light.colors)&&n(e.dark.colors):(console.error('Dark theme is missing "colors" property.',e),!1):(console.error('Light theme is missing "colors" property.',e),!1):n(e.colors):(console.error('Theme must contain either both "light" and "dark" properties, or "colors".',e),!1)},help:"unsupported theme configuration. Check error logs for detailed info."},layoutConfig:{validate:function(e){if("grid"in e){var t=e.grid;if("maxTilesPerPage"in t){if(!Number.isInteger(t.maxTilesPerPage))return console.error("grid.maxTilesPerPage should be an integer. You passed ".concat(t.maxTilesPerPage,".")),!1;if(t.maxTilesPerPage>49)return console.error("grid.maxTilesPerPage can't be larger than 49 without sacrificing browser performance. Please contact us at https://www.daily.co/contact to talk about your use case."),!1}if("minTilesPerPage"in t){if(!Number.isInteger(t.minTilesPerPage))return console.error("grid.minTilesPerPage should be an integer. You passed ".concat(t.minTilesPerPage,".")),!1;if(t.minTilesPerPage<1)return console.error("grid.minTilesPerPage can't be lower than 1."),!1;if("maxTilesPerPage"in t&&t.minTilesPerPage>t.maxTilesPerPage)return console.error("grid.minTilesPerPage can't be higher than grid.maxTilesPerPage."),!1}}return!0},help:"unsupported layoutConfig. Check error logs for detailed info."},receiveSettings:{validate:function(e){return lf(e,{allowAllParticipantsKey:!1})},help:hf({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!(function(n,r){try{return r.validateUpdateSendSettings(n),!0}catch(i){return console.error("Failed to validate send settings",i),!1}})(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(e,t){var n;return!!uf(e)&&(t._inputSettings||(t._inputSettings={}),df(e,(n=t.properties)===null||n===void 0?void 0:n.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:Ko()},layout:{validate:function(e){return e==="custom-v1"||e==="browser"||e==="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},$i={styles:{validate:function(e){for(var t in e)if(t!=="cam"&&t!=="screen")return!1;if(e.cam){for(var n in e.cam)if(n!=="div"&&n!=="video")return!1}if(e.screen){for(var r in e.screen)if(r!=="div"&&r!=="video")return!1}return!0},help:"styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }"},setSubscribedTracks:{validate:function(e,t){if(t._preloadCache.subscribeToTracksAutomatically)return!1;var n=[!0,!1,"staged"];if(n.includes(e)||!se()&&e==="avatar")return!0;var r=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"],i=function(a){var o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var s in a)if(s==="custom"){if(!n.includes(a[s])&&!i(a[s],!0))return!1}else{var c=!o&&!r.includes(s),l=!n.includes(a[s]);if(c||l)return!1}return!0};return i(e)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(se()?"":" | 'avatar'"," | false | 'staged' | { [audio: true|false|'staged'], [video: true|false|'staged'], [screenAudio: true|false|'staged'], [screenVideo: true|false|'staged'] }")},setAudio:!0,setVideo:!0,setScreenShare:{validate:function(e){return e===!1},help:"setScreenShare must be false, as it's only meant for stopping remote participants' screen shares"},eject:!0,updatePermissions:{validate:function(e){for(var t=0,n=Object.entries(e);t<n.length;t++){var r=Fe(n[t],2),i=r[0],a=r[1];switch(i){case"hasPresence":if(typeof a!="boolean")return!1;break;case"canSend":if(a instanceof Set||a instanceof Array||Array.isArray(a)){var o,s=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],c=Qd(a);try{for(c.s();!(o=c.n()).done;){var l=o.value;if(!s.includes(l))return!1}}catch(_){c.e(_)}finally{c.f()}}else if(typeof a!="boolean")return!1;(a instanceof Array||Array.isArray(a))&&(e.canSend=new Set(a));break;case"canReceive":var d=Fe(Kd.validateJSONObject(a),2),f=d[0],p=d[1];if(!f)return console.error(p),!1;break;case"canAdmin":if(a instanceof Set||a instanceof Array||Array.isArray(a)){var g,y=["participants","streaming","transcription"],v=Qd(a);try{for(v.s();!(g=v.n()).done;){var b=g.value;if(!y.includes(b))return!1}}catch(_){v.e(_)}finally{v.f()}}else if(typeof a!="boolean")return!1;(a instanceof Array||Array.isArray(a))&&(e.canAdmin=new Set(a));break;default:return!1}}return!0},help:"updatePermissions can take hasPresence, canSend, canReceive, and canAdmin permissions. hasPresence must be a boolean. canSend can be a boolean or an Array or Set of media types (video, audio, screenVideo, screenAudio, customVideo, customAudio). canReceive must be an object specifying base, byUserId, and/or byParticipantId fields (see documentation for more details). canAdmin can be a boolean or an Array or Set of admin types (participants, streaming, transcription)."}};Promise.any||(Promise.any=(function(){var e=H((function*(t){return new Promise((function(n,r){var i=[];t.forEach((function(a){return Promise.resolve(a).then((function(o){n(o)})).catch((function(o){i.push(o),i.length===t.length&&r(i)}))}))}))}));return function(t){return e.apply(this,arguments)}})());var Sr=(function(){function e(u){var m,h,w,S,P,D,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Ze(this,e),w=this,S=gt(S=e),xt(h=ci(w,Xd()?Reflect.construct(S,[],gt(w).constructor):S.apply(w,P)),"startListeningForDeviceChanges",(function(){Kb(h.handleDeviceChange)})),xt(h,"stopListeningForDeviceChanges",(function(){Yb(h.handleDeviceChange)})),xt(h,"handleDeviceChange",(function(te){te=te.map((function(ue){return JSON.parse(JSON.stringify(ue))})),h.emitDailyJSEvent({action:"available-devices-updated",availableDevices:te})})),xt(h,"handleNativeAppStateChange",(function(){var te=H((function*(ue){if(ue==="destroyed")return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield h.destroy());var Et=ue==="active";h.disableReactNativeAutoDeviceManagement("video")||(Et?h.camUnmutedBeforeLosingNativeActiveState&&h.setLocalVideo(!0):(h.camUnmutedBeforeLosingNativeActiveState=h.localVideo(),h.camUnmutedBeforeLosingNativeActiveState&&h.setLocalVideo(!1)))}));return function(ue){return te.apply(this,arguments)}})()),xt(h,"handleNativeAudioFocusChange",(function(te){h.disableReactNativeAutoDeviceManagement("audio")||(h._hasNativeAudioFocus=te,h.toggleParticipantAudioBasedOnNativeAudioFocus(),h._hasNativeAudioFocus?h.micUnmutedBeforeLosingNativeAudioFocus&&h.setLocalAudio(!0):(h.micUnmutedBeforeLosingNativeAudioFocus=h.localAudio(),h.setLocalAudio(!1)))})),xt(h,"handleNativeSystemScreenCaptureStop",(function(){h.stopScreenShare()})),!Ro()&&!se())throw new Error("WebRTC not supported or suppressed");if(h.strictMode=L.strictMode===void 0||L.strictMode,h.allowMultipleCallInstances=(m=L.allowMultipleCallInstances)!==null&&m!==void 0&&m,Object.keys(pn).length&&(h._logDuplicateInstanceAttempt(),!h.allowMultipleCallInstances)){if(h.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:{}}),h.callClientId=fi(),pn[(D=h).callClientId]=D,window._daily.instances[h.callClientId]={},h._sharedTracks={},window._daily.instances[h.callClientId].tracks=h._sharedTracks,L.dailyJsVersion=e.version(),h._iframe=u,h._callObjectMode=L.layout==="none"&&!h._iframe,h._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},L.showLocalVideo!==void 0?h._callObjectMode?console.error("showLocalVideo is not available in call object mode"):h._showLocalVideo=!!L.showLocalVideo:h._showLocalVideo=!0,L.showParticipantsBar!==void 0?h._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):h._showParticipantsBar=!!L.showParticipantsBar:h._showParticipantsBar=!0,L.customIntegrations!==void 0?h._callObjectMode?console.error("customIntegrations is not available in call object mode"):h._customIntegrations=L.customIntegrations:h._customIntegrations={},L.customTrayButtons!==void 0?h._callObjectMode?console.error("customTrayButtons is not available in call object mode"):h._customTrayButtons=L.customTrayButtons:h._customTrayButtons={},L.activeSpeakerMode!==void 0?h._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):h._activeSpeakerMode=!!L.activeSpeakerMode:h._activeSpeakerMode=!1,L.receiveSettings?h._callObjectMode?h._receiveSettings=L.receiveSettings:console.error("receiveSettings is only available in call object mode"):h._receiveSettings={},h.validateProperties(L),h.properties=U({},L),h._inputSettings||(h._inputSettings={}),h._callObjectLoader=h._callObjectMode?new Nb(h.callClientId):null,h._callState=od,h._isPreparingToJoin=!1,h._accessState={access:Ao},h._meetingSessionSummary={},h._finalSummaryOfPrevSession={},h._meetingSessionState=Yo(tf,h._callObjectMode),h._nativeInCallAudioMode=ef,h._participants={},h._isScreenSharing=!1,h._participantCounts=nf,h._rmpPlayerState={},h._waitingParticipants={},h._network={threshold:"good",quality:100,networkState:"unknown",stats:{}},h._activeSpeaker={},h._localAudioLevel=0,h._isLocalAudioLevelObserverRunning=!1,h._remoteParticipantsAudioLevel={},h._isRemoteParticipantsAudioLevelObserverRunning=!1,h._maxAppMessageSize=Oo,h._messageChannel=se()?new Rb:new jb,h._iframe&&(h._iframe.requestFullscreen?h._iframe.addEventListener("fullscreenchange",(function(){document.fullscreenElement===h._iframe?(h.emitDailyJSEvent({action:Di}),h.sendMessageToCallMachine({action:Di})):(h.emitDailyJSEvent({action:Li}),h.sendMessageToCallMachine({action:Li}))})):h._iframe.webkitRequestFullscreen&&h._iframe.addEventListener("webkitfullscreenchange",(function(){document.webkitFullscreenElement===h._iframe?(h.emitDailyJSEvent({action:Di}),h.sendMessageToCallMachine({action:Di})):(h.emitDailyJSEvent({action:Li}),h.sendMessageToCallMachine({action:Li}))}))),se()){var $=h.nativeUtils();$.addAudioFocusChangeListener&&$.removeAudioFocusChangeListener&&$.addAppStateChangeListener&&$.removeAppStateChangeListener&&$.addSystemScreenCaptureStopListener&&$.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),h._hasNativeAudioFocus=!0,$.addAudioFocusChangeListener(h.handleNativeAudioFocusChange),$.addAppStateChangeListener(h.handleNativeAppStateChange),$.addSystemScreenCaptureStopListener(h.handleNativeSystemScreenCaptureStop)}return h._callObjectMode&&h.startListeningForDeviceChanges(),h._messageChannel.addListenerForMessagesFromCallMachine(h.handleMessageFromCallMachine,h.callClientId,h),h}return li(e,di),et(e,[{key:"destroy",value:(ht=H((function*(){var u;try{yield this.leave()}catch{}var m=this._iframe;if(m){var h=m.parentElement;h&&h.removeChild(m)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),se()){var w=this.nativeUtils();w.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),w.removeAppStateChangeListener(this.handleNativeAppStateChange),w.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete pn[this.callClientId],!((u=window)===null||u===void 0||(u=u._daily)===null||u===void 0)&&u.instances&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)})),function(){return ht.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(u){var m=u.bodyClass,h=u.cssFile,w=u.cssText;return ce(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(h),bodyClass:m,cssText:w}),this}},{key:"iframe",value:function(){return ce(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return bt(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return bt(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(u,m){for(var h in m){if(!$i[h])throw new Error("unrecognized updateParticipant property ".concat(h));if($i[h].validate&&!$i[h].validate(m[h],this,this._participants[u]))throw new Error($i[h].help)}}},{key:"updateParticipant",value:function(u,m){return this._participants.local&&this._participants.local.session_id===u&&(u="local"),u&&m&&(this.validateParticipantProperties(u,m),this.sendMessageToCallMachine({action:"update-participant",id:u,properties:m})),this}},{key:"updateParticipants",value:function(u){var m=this._participants.local&&this._participants.local.session_id;for(var h in u)h===m&&(h="local"),h&&u[h]&&this.validateParticipantProperties(h,u[h]);return this.sendMessageToCallMachine({action:"update-participants",participants:u}),this}},{key:"updateWaitingParticipant",value:(Ge=H((function*(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(bt(this._callObjectMode,"updateWaitingParticipant()"),ye(this._callState,"updateWaitingParticipant()"),typeof m!="string"||fe(h)!=="object")throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise((function(w,S){u.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:m,updates:h},(function(P){P.error&&S(P.error),P.id||S(new Error("unknown error in updateWaitingParticipant()")),w({id:P.id})}))}))})),function(){return Ge.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(G=H((function*(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(bt(this._callObjectMode,"updateWaitingParticipants()"),ye(this._callState,"updateWaitingParticipants()"),fe(m)!=="object")throw new Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise((function(h,w){u.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updatesById:m},(function(S){S.error&&w(S.error),S.ids||w(new Error("unknown error in updateWaitingParticipants()")),h({ids:S.ids})}))}))})),function(){return G.apply(this,arguments)})},{key:"requestAccess",value:(W=H((function*(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=m.access,w=h===void 0?{level:Ay}:h,S=m.name,P=S===void 0?"":S;return bt(this._callObjectMode,"requestAccess()"),ye(this._callState,"requestAccess()"),new Promise((function(D,L){u.sendMessageToCallMachine({action:"daily-method-request-access",access:w,name:P},(function($){$.error&&L($.error),$.access||L(new Error("unknown error in requestAccess()")),D({access:$.access,granted:$.granted})}))}))})),function(){return W.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(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return"forceDiscardTrack"in m&&(se()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),m={}):u&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),m={})),this.sendMessageToCallMachine({action:"local-audio",state:u,options:m}),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(u){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:u}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(u){return this.sendMessageToCallMachine({action:"local-video",state:u}),this}},{key:"_setAllowLocalAudio",value:function(u){if(this._preloadCache.allowLocalAudio=u,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-audio",state:u}),this}},{key:"_setAllowLocalVideo",value:function(u){if(this._preloadCache.allowLocalVideo=u,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-video",state:u}),this}},{key:"getReceiveSettings",value:(B=H((function*(u){var m=this,h=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,w=h!==void 0&&h;if(bt(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(fe(u)){case"string":return new Promise((function(S){m.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:u,showInheritedValues:w},(function(P){S(P.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(u){return B.apply(this,arguments)})},{key:"updateReceiveSettings",value:(K=H((function*(u){var m=this;if(bt(this._callObjectMode,"updateReceiveSettings()"),!lf(u,{allowAllParticipantsKey:!0}))throw new Error(hf({allowAllParticipantsKey:!0}));return ye(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise((function(h){m.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:u},(function(w){h({receiveSettings:w.receiveSettings})}))}))})),function(u){return K.apply(this,arguments)})},{key:"_prepInputSettingsForSharing",value:function(u,m){if(u){var h={};if(u.audio){var w,S,P;u.audio.settings&&(!Object.keys(u.audio.settings).length&&m||(h.audio={settings:U({},u.audio.settings)})),m&&(w=h.audio)!==null&&w!==void 0&&(w=w.settings)!==null&&w!==void 0&&w.customTrack&&(h.audio.settings={customTrack:this._sharedTracks.audioTrack});var D=((S=u.audio.processor)===null||S===void 0?void 0:S.type)==="none"&&((P=u.audio.processor)===null||P===void 0?void 0:P._isDefaultWhenNone);if(u.audio.processor&&!D){var L=U({},u.audio.processor);delete L._isDefaultWhenNone,h.audio=U(U({},h.audio),{},{processor:L})}}if(u.video){var $,te,ue;u.video.settings&&(!Object.keys(u.video.settings).length&&m||(h.video={settings:U({},u.video.settings)})),m&&($=h.video)!==null&&$!==void 0&&($=$.settings)!==null&&$!==void 0&&$.customTrack&&(h.video.settings={customTrack:this._sharedTracks.videoTrack});var Et=((te=u.video.processor)===null||te===void 0?void 0:te.type)==="none"&&((ue=u.video.processor)===null||ue===void 0?void 0:ue._isDefaultWhenNone);if(u.video.processor&&!Et){var Cn=U({},u.video.processor);delete Cn._isDefaultWhenNone,h.video=U(U({},h.video),{},{processor:Cn})}}return h}}},{key:"getInputSettings",value:function(){var u=this;return ce(),new Promise((function(m){m(u._getInputSettings())}))}},{key:"_getInputSettings",value:function(){var u,m,h,w,S,P,D={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(u=((h=this._inputSettings)===null||h===void 0?void 0:h.video)||D,m=((w=this._inputSettings)===null||w===void 0?void 0:w.audio)||D):(u=((S=this._preloadCache)===null||S===void 0||(S=S.inputSettings)===null||S===void 0?void 0:S.video)||D,m=((P=this._preloadCache)===null||P===void 0||(P=P.inputSettings)===null||P===void 0?void 0:P.audio)||D);var L={audio:m,video:u};return this._prepInputSettingsForSharing(L,!0)}},{key:"_updatePreloadCacheInputSettings",value:function(u,m){var h=this._inputSettings||{},w={};if(u.video){var S,P,D;w.video={},u.video.settings?(w.video.settings={},m||u.video.settings.customTrack||(D=h.video)===null||D===void 0||!D.settings?w.video.settings=u.video.settings:w.video.settings=U(U({},h.video.settings),u.video.settings),Object.keys(w.video.settings).length||delete w.video.settings):(S=h.video)!==null&&S!==void 0&&S.settings&&(w.video.settings=h.video.settings),u.video.processor?w.video.processor=u.video.processor:(P=h.video)!==null&&P!==void 0&&P.processor&&(w.video.processor=h.video.processor)}else h.video&&(w.video=h.video);if(u.audio){var L,$,te;w.audio={},u.audio.settings?(w.audio.settings={},m||u.audio.settings.customTrack||(te=h.audio)===null||te===void 0||!te.settings?w.audio.settings=u.audio.settings:w.audio.settings=U(U({},h.audio.settings),u.audio.settings),Object.keys(w.audio.settings).length||delete w.audio.settings):(L=h.audio)!==null&&L!==void 0&&L.settings&&(w.audio.settings=h.audio.settings),u.audio.processor?w.audio.processor=u.audio.processor:($=h.audio)!==null&&$!==void 0&&$.processor&&(w.audio.processor=h.audio.processor)}else h.audio&&(w.audio=h.audio);this._maybeUpdateInputSettings(w)}},{key:"_devicesFromInputSettings",value:function(u){var m,h,w=(u==null||(m=u.video)===null||m===void 0||(m=m.settings)===null||m===void 0?void 0:m.deviceId)||null,S=(u==null||(h=u.audio)===null||h===void 0||(h=h.settings)===null||h===void 0?void 0:h.deviceId)||null,P=this._preloadCache.outputDeviceId||null;return{camera:w?{deviceId:w}:{},mic:S?{deviceId:S}:{},speaker:P?{deviceId:P}:{}}}},{key:"updateInputSettings",value:(me=H((function*(u){var m=this;return ce(),uf(u)?u.video||u.audio?(df(u,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(u,!0),this._getInputSettings()):new Promise((function(h,w){m.sendMessageToCallMachine({action:"update-input-settings",inputSettings:u},(function(S){if(S.error)w(S.error);else{if(S.returnPreloadCache)return m._updatePreloadCacheInputSettings(u,!0),void h(m._getInputSettings());m._maybeUpdateInputSettings(S.inputSettings),h(m._prepInputSettingsForSharing(S.inputSettings,!0))}}))}))):this._getInputSettings():(console.error(Ko()),Promise.reject(Ko()))})),function(u){return me.apply(this,arguments)})},{key:"setBandwidth",value:function(u){var m=u.kbs,h=u.trackConstraints;if(ce(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:m,trackConstraints:h}),this}},{key:"getDailyLang",value:function(){var u=this;if(ce(),this._callMachineInitialized)return new Promise((function(m){u.sendMessageToCallMachine({action:"get-daily-lang"},(function(h){delete h.action,delete h.callbackStamp,m(h)}))}))}},{key:"setDailyLang",value:function(u){return ce(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:u}),this}},{key:"setProxyUrl",value:function(u){return this.sendMessageToCallMachine({action:"set-proxy-url",proxyUrl:u}),this}},{key:"setIceConfig",value:function(u){return this.sendMessageToCallMachine({action:"set-ice-config",iceConfig:u}),this}},{key:"meetingSessionSummary",value:function(){return[fn,Jt].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(ie=H((function*(){var u=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),ye(this._callState,"getMeetingSession()"),new Promise((function(m){u.sendMessageToCallMachine({action:"get-meeting-session"},(function(h){delete h.action,delete h.callbackStamp,m(h)}))}))})),function(){return ie.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return ye(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"replace";bt(this._callObjectMode,"setMeetingSessionData()"),ye(this._callState,"setMeetingSessionData");try{(function(h,w){new Vb({data:h,mergeStrategy:w})})(u,m)}catch(h){throw console.error(h),h}try{this.sendMessageToCallMachine({action:"set-session-data",data:u,mergeStrategy:m})}catch(h){throw new Error("Error setting meeting session data: ".concat(h))}}},{key:"setUserName",value:function(u,m){var h=this;return this.properties.userName=u,new Promise((function(w){h.sendMessageToCallMachine({action:"set-user-name",name:u??"",thisMeetingOnly:se()||!!m&&!!m.thisMeetingOnly},(function(S){delete S.action,delete S.callbackStamp,w(S)}))}))}},{key:"setUserData",value:(ee=H((function*(u){var m=this;try{cf(u)}catch(h){throw console.error(h),h}if(this.properties.userData=u,this._callMachineInitialized)return new Promise((function(h){try{m.sendMessageToCallMachine({action:"set-user-data",userData:u},(function(w){delete w.action,delete w.callbackStamp,h(w)}))}catch(w){throw new Error("Error setting user data: ".concat(w))}}))})),function(u){return ee.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(u){if(u&&(u<100||typeof u!="number"))throw new Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(u){var m=this;if(typeof AudioWorkletNode>"u"&&!se())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(u),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise((function(h,w){m.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:u},(function(S){m._isLocalAudioLevelObserverRunning=!S.error,S.error?w({error:S.error}):h()}))}));this._preloadCache.localAudioLevelObserver={enabled:!0,interval:u}}},{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(u){var m=this;if(this.validateAudioLevelInterval(u),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise((function(h,w){m.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:u},(function(S){m._isRemoteParticipantsAudioLevelObserverRunning=!S.error,S.error?w({error:S.error}):h()}))}));this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:u}}},{key:"isRemoteParticipantsAudioLevelObserverRunning",value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:"stopRemoteParticipantsAudioLevelObserver",value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-remote-participants-audio-level-observer"})}},{key:"startCamera",value:(V=H((function*(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(bt(this._callObjectMode,"startCamera()"),Ho(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),this.needsLoad())try{yield this.load(m)}catch(h){return Promise.reject(h)}else{if(this._didPreAuth){if(m.url&&m.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(m.token&&m.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(m),this.properties=U(U({},this.properties),m)}return new Promise((function(h){u._preloadCache.inputSettings=u._prepInputSettingsForSharing(u._inputSettings,!1),u.sendMessageToCallMachine({action:"start-camera",properties:zn(u.properties,u.callClientId),preloadCache:zn(u._preloadCache,u.callClientId)},(function(w){h({camera:w.camera,mic:w.mic,speaker:w.speaker})}))}))})),function(){return V.apply(this,arguments)})},{key:"validateCustomTrack",value:function(u,m,h){if(h&&h.length>50)throw new Error("Custom track `trackName` must not be more than 50 characters");if(m&&m!=="music"&&m!=="speech"&&!(m instanceof Object))throw new Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(h&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(h))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(!(u instanceof MediaStreamTrack))throw new Error("Custom tracks provided must be instances of MediaStreamTrack")}},{key:"startCustomTrack",value:function(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{track,mode,trackName,ignoreAudioLevel};return ce(),ye(this._callState,"startCustomTrack()"),this.validateCustomTrack(m.track,m.mode,m.trackName),new Promise((function(h,w){u._sharedTracks.customTrack=m.track,m.track=jt,u.sendMessageToCallMachine({action:"start-custom-track",properties:m},(function(S){S.error?w({error:S.error}):h(S.mediaTag)}))}))}},{key:"stopCustomTrack",value:function(u){var m=this;return ce(),ye(this._callState,"stopCustomTrack()"),new Promise((function(h){m.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:u},(function(w){h(w.mediaTag)}))}))}},{key:"setCamera",value:function(u){var m=this;return xr(),zi(this._callMachineInitialized,"setCamera()"),new Promise((function(h){m.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:u},(function(w){h({device:w.device})}))}))}},{key:"setAudioDevice",value:(z=H((function*(u){return xr(),this.nativeUtils().setAudioDevice(u),{deviceId:yield this.nativeUtils().getAudioDevice()}})),function(u){return z.apply(this,arguments)})},{key:"cycleCamera",value:function(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise((function(h){u.sendMessageToCallMachine({action:"cycle-camera",properties:m},(function(w){h({device:w.device})}))}))}},{key:"cycleMic",value:function(){var u=this;return ce(),new Promise((function(m){u.sendMessageToCallMachine({action:"cycle-mic"},(function(h){m({device:h.device})}))}))}},{key:"getCameraFacingMode",value:function(){var u=this;return xr(),new Promise((function(m){u.sendMessageToCallMachine({action:"get-camera-facing-mode"},(function(h){m(h.facingMode)}))}))}},{key:"setInputDevicesAsync",value:(j=H((function*(u){var m=this,h=u.audioDeviceId,w=u.videoDeviceId,S=u.audioSource,P=u.videoSource;if(ce(),S!==void 0&&(h=S),P!==void 0&&(w=P),typeof h=="boolean"&&(this._setAllowLocalAudio(h),h=void 0),typeof w=="boolean"&&(this._setAllowLocalVideo(w),w=void 0),!h&&!w)return yield this.getInputDevices();var D={};return h&&(h instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=h,h=jt,D.audio={settings:{customTrack:h}}):(delete this._sharedTracks.audioTrack,D.audio={settings:{deviceId:h}})),w&&(w instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=w,w=jt,D.video={settings:{customTrack:w}}):(delete this._sharedTracks.videoTrack,D.video={settings:{deviceId:w}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(D,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise((function(L){m.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:h,videoDeviceId:w},(function($){if(delete $.action,delete $.callbackStamp,$.returnPreloadCache)return m._updatePreloadCacheInputSettings(D,!1),void L(m._devicesFromInputSettings(m._inputSettings));L($)}))}))})),function(u){return j.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(F=H((function*(u){var m=this,h=u.outputDeviceId;if(ce(),!h||typeof h!="string")throw new Error("outputDeviceId must be provided and must be a valid device id");return this._preloadCache.outputDeviceId=h,this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(w,S){m.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:h},(function(P){if(delete P.action,delete P.callbackStamp,P.error){var D=new Error(P.error.message);return D.type=P.error.type,void S(D)}P.returnPreloadCache?w(m._devicesFromInputSettings(m._inputSettings)):w(P)}))}))})),function(u){return F.apply(this,arguments)})},{key:"getInputDevices",value:(R=H((function*(){var u=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(m){u.sendMessageToCallMachine({action:"get-input-devices"},(function(h){h.returnPreloadCache?m(u._devicesFromInputSettings(u._inputSettings)):m({camera:h.camera,mic:h.mic,speaker:h.speaker})}))}))})),function(){return R.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return xr(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(u){if(xr(),[ef,r0].includes(u)){if(u!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=u,!this.disableReactNativeAutoDeviceManagement("audio")&&Ui(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",u)}},{key:"preAuth",value:(E=H((function*(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(bt(this._callObjectMode,"preAuth()"),Ho(this._callState,this._isPreparingToJoin,"preAuth()"),this.needsLoad()&&(yield this.load(m)),!m.url)throw new Error("preAuth() requires at least a url to be provided");return this.validateProperties(m),this.properties=U(U({},this.properties),m),new Promise((function(h,w){u._preloadCache.inputSettings=u._prepInputSettingsForSharing(u._inputSettings,!1),u.sendMessageToCallMachine({action:"daily-method-preauth",properties:zn(u.properties,u.callClientId),preloadCache:zn(u._preloadCache,u.callClientId)},(function(S){return S.error?w(S.error):S.access?(u._didPreAuth=!0,void h({access:S.access})):w(new Error("unknown error in preAuth()"))}))}))})),function(){return E.apply(this,arguments)})},{key:"load",value:(A=H((function*(u){var m=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");if(u&&(this.validateProperties(u),this.properties=U(U({},this.properties),u)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");return this._updateCallState(sd),this.emitDailyJSEvent({action:Vy}),this._callObjectMode?new Promise((function(h,w){m._callObjectLoader.cancel();var S=Date.now();m._callObjectLoader.load(m.properties.dailyConfig,(function(P){m._bundleLoadTime=P?"no-op":Date.now()-S,m._updateCallState(cd),P&&m.emitDailyJSEvent({action:ud}),h()}),(function(P,D){if(m.emitDailyJSEvent({action:Ny}),!D){m._updateCallState(Jt),m.resetMeetingDependentVars();var L={action:md,errorMsg:P.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:P,bundleUrl:hi(m.properties.dailyConfig)}}};m._maybeSendToSentry(L),m.emitDailyJSEvent(L),w(P.msg)}}))})):(this._iframe.src=Hl(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise((function(h,w){m._loadedCallback=function(S){m._callState!==Jt?(m._updateCallState(cd),(m.properties.cssFile||m.properties.cssText)&&m.loadCss(m.properties),h()):w(S)}})))}})),function(u){return A.apply(this,arguments)})},{key:"join",value:(C=H((function*(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();var h=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(m)}catch(w){return this.updateIsPreparingToJoin(!1),Promise.reject(w)}}else{if(h=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(m.url&&m.url!==this.properties.url)return console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(m.token&&m.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(m.url&&!this._callObjectMode&&m.url&&m.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(m.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(m),this.properties=U(U({},this.properties),m)}return m.showLocalVideo!==void 0&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!m.showLocalVideo),m.showParticipantsBar!==void 0&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!m.showParticipantsBar),this._callState===dn||this._callState===Eo?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(Eo,!1),this.emitDailyJSEvent({action:$y}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:"join-meeting",properties:zn(this.properties,this.callClientId),preloadCache:zn(this._preloadCache,this.callClientId)}),new Promise((function(w,S){u._joinedCallback=function(P,D){if(u._callState!==Jt){if(u._updateCallState(dn),P)for(var L in P){if(u._callObjectMode){var $=u._callMachine().store;Fd(P[L],$),Bd(P[L],$),$d(P[L],u._participants[L],$)}u._participants[L]=U({},P[L]),u.toggleParticipantAudioBasedOnNativeAudioFocus()}h&&u.loadCss(u.properties),w(P)}else S(D)}})))})),function(){return C.apply(this,arguments)})},{key:"leave",value:(x=H((function*(){var u=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise((function(m){u._callState===fn||u._callState===Jt?m():u._callObjectLoader&&!u._callObjectLoader.loaded?(u._callObjectLoader.cancel(),u._updateCallState(fn),u.resetMeetingDependentVars(),u.emitDailyJSEvent({action:fn}),m()):(u._resolveLeave=m,u.sendMessageToCallMachine({action:"leave-meeting"}))}))})),function(){return x.apply(this,arguments)})},{key:"startScreenShare",value:(M=H((function*(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(zi(this._callMachineInitialized,"startScreenShare()"),m.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",m.screenVideoSendSettings),m.mediaStream&&(this._sharedTracks.screenMediaStream=m.mediaStream,m.mediaStream=jt),typeof DailyNativeUtils<"u"&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var h=this.nativeUtils();if(yield h.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:pd,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});h.setSystemScreenCaptureStartCallback((function(){h.setSystemScreenCaptureStartCallback(null),u.sendMessageToCallMachine({action:vd,captureOptions:m})})),h.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:vd,captureOptions:m})})),function(){return M.apply(this,arguments)})},{key:"stopScreenShare",value:function(){zi(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=u.type;if(m&&m!=="cloud"&&m!=="raw-tracks"&&m!=="local")throw new Error("invalid type: ".concat(m,", allowed values 'cloud', 'raw-tracks', or 'local'"));this.sendMessageToCallMachine(U({action:"local-recording-start"},u))}},{key:"updateRecording",value:function(u){var m=u.layout,h=m===void 0?{preset:"default"}:m,w=u.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:h,instanceId:w})}},{key:"stopRecording",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(U({action:"local-recording-stop"},u))}},{key:"startLiveStreaming",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(U({action:"daily-method-start-live-streaming"},u))}},{key:"updateLiveStreaming",value:function(u){var m=u.layout,h=m===void 0?{preset:"default"}:m,w=u.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:h,instanceId:w})}},{key:"addLiveStreamingEndpoints",value:function(u){var m=u.endpoints,h=u.instanceId;this.sendMessageToCallMachine({action:yd,endpointsOp:Eb,endpoints:m,instanceId:h})}},{key:"removeLiveStreamingEndpoints",value:function(u){var m=u.endpoints,h=u.instanceId;this.sendMessageToCallMachine({action:yd,endpointsOp:Ab,endpoints:m,instanceId:h})}},{key:"stopLiveStreaming",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(U({action:"daily-method-stop-live-streaming"},u))}},{key:"validateDailyConfig",value:function(u){u.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(u.camSimulcastEncodings)),u.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),Td()&&u.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,h=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(u){if(!(u instanceof Array||Array.isArray(u)))throw new Error("encodings must be an Array");if(!_f(u.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var w=0;w<u.length;w++){var S=u[w];for(var P in this._validateEncodingLayerHasValidProperties(S),S)if(Jo.includes(P)){if(typeof S[P]!="number")throw new Error("".concat(P," must be a number"));if(m){var D=m[P],L=D.min,$=D.max;if(!_f(S[P],L,$))throw new Error("".concat(P," value not in range. valid range: ").concat(L," to ").concat($))}}else if(!["active","scalabilityMode"].includes(P))throw new Error("Invalid key ".concat(P,", valid keys are:")+Object.values(Jo));if(h&&!S.hasOwnProperty("maxBitrate"))throw new Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(T=H((function*(u){var m=this,h=u.url,w=u.settings,S=w===void 0?{state:Do.PLAY}:w;try{(function(P){if(typeof P!="string")throw new Error('url parameter must be "string" type')})(h),bf(S),(function(P){for(var D in P)if(!af.includes(D))throw new Error("Invalid key ".concat(D,", valid keys are: ").concat(af));P.simulcastEncodings&&this.validateSimulcastEncodings(P.simulcastEncodings,rf,!0)})(S)}catch(P){throw console.error("invalid argument Error: ".concat(P)),console.error(`startRemoteMediaPlayer arguments must be of the form:
4
+ Name: ${Jt(r)}
5
+ Error:`,i)}}let Yo=null;function vv(){Yo=pe.onerror,pe.onerror=function(e,t,n,r,i){return yt("error",{column:r,error:i,line:n,msg:e,url:t}),!!Yo&&Yo.apply(this,arguments)},pe.onerror.__SENTRY_INSTRUMENTED__=!0}let Xo=null;function yv(){Xo=pe.onunhandledrejection,pe.onunhandledrejection=function(e){return yt("unhandledrejection",e),!Xo||Xo.apply(this,arguments)},pe.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function bi(){return Qo(pe),pe}function Qo(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||rn,t[rn]=t[rn]||{}}const eu=Object.prototype.toString;function Zo(e){switch(eu.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return ln(e,Error)}}function jn(e,t){return eu.call(e)===`[object ${t}]`}function tu(e){return jn(e,"ErrorEvent")}function nu(e){return jn(e,"DOMError")}function Lt(e){return jn(e,"String")}function ea(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ta(e){return e===null||ea(e)||typeof e!="object"&&typeof e!="function"}function Rn(e){return jn(e,"Object")}function _i(e){return typeof Event<"u"&&ln(e,Event)}function wi(e){return!!(e&&e.then&&typeof e.then=="function")}function ln(e,t){try{return e instanceof t}catch{return!1}}function ru(e){return!(typeof e!="object"||e===null||!e.__isVue&&!e._isVue)}const na=pe;function iu(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,a=0;const s=" > ",c=s.length;let l;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(l=bv(n,d),!(l==="html"||o>1&&a+i.length*c+l.length>=f));)i.push(l),a+=l.length,n=n.parentNode;return i.reverse().join(s)}catch{return"<unknown>"}}function bv(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(na.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const i=t&&t.length?t.filter((a=>n.getAttribute(a))).map((a=>[a,n.getAttribute(a)])):null;if(i&&i.length)i.forEach((a=>{r.push(`[${a[0]}="${a[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const a=n.className;if(a&&Lt(a)){const s=a.split(/\s+/);for(const c of s)r.push(`.${c}`)}}const o=["aria-label","type","name","title","alt"];for(const a of o){const s=n.getAttribute(a);s&&r.push(`[${a}="${s}"]`)}return r.join("")}function Vn(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ou(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const i=e[r];try{ru(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function _v(e,t,n=!1){return!!Lt(e)&&(jn(t,"RegExp")?t.test(e):!!Lt(t)&&(n?e===t:e.includes(t)))}function ki(e,t=[],n=!1){return t.some((r=>_v(e,r,n)))}function rt(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);typeof i=="function"&&au(i,r);try{e[t]=i}catch{on&&ee.log(`Failed to replace method "${t}" in object`,e)}}function un(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{on&&ee.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function au(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,un(e,"__sentry_original__",t)}catch{}}function ra(e){return e.__sentry_original__}function su(e){if(Zo(e))return{message:e.message,name:e.name,stack:e.stack,...lu(e)};if(_i(e)){const t={type:e.type,target:cu(e.target),currentTarget:cu(e.currentTarget),...lu(e)};return typeof CustomEvent<"u"&&ln(e,CustomEvent)&&(t.detail=e.detail),t}return e}function cu(e){try{return t=e,typeof Element<"u"&&ln(t,Element)?iu(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}var t}function lu(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function st(e){return ia(e,new Map)}function ia(e,t){if((function(n){if(!Rn(n))return!1;try{const r=Object.getPrototypeOf(n).constructor.name;return!r||r==="Object"}catch{return!0}})(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const i of Object.getOwnPropertyNames(e))e[i]!==void 0&&(r[i]=ia(e[i],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach((i=>{r.push(ia(i,t))})),r}return e}function vr(){return Date.now()/1e3}const jt=(function(){const{performance:e}=pe;if(!e||!e.now)return vr;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/1e3})();function ct(){const e=pe,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,(r=>(r^(15&n())>>r/4).toString(16)))}function uu(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ht(e){const{message:t,event_id:n}=e;if(t)return t;const r=uu(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function oa(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function Nn(e,t){const n=uu(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const i={...r&&r.data,...t.data};n.mechanism.data=i}}function du(e){if((function(t){try{return t.__sentry_captured__}catch{}})(e))return!0;try{un(e,"__sentry_captured__",!0)}catch{}return!1}var Rt;function dn(e){return new lt((t=>{t(e)}))}function Si(e){return new lt(((t,n)=>{n(e)}))}(()=>{const{performance:e}=pe;!e||!e.now||(e.now(),e.timing&&e.timing.navigationStart)})(),(function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"})(Rt||(Rt={}));class lt{constructor(t){lt.prototype.__init.call(this),lt.prototype.__init2.call(this),lt.prototype.__init3.call(this),lt.prototype.__init4.call(this),this._state=Rt.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new lt(((r,i)=>{this._handlers.push([!1,o=>{if(t)try{r(t(o))}catch(a){i(a)}else r(o)},o=>{if(n)try{r(n(o))}catch(a){i(a)}else i(o)}]),this._executeHandlers()}))}catch(t){return this.then((n=>n),t)}finally(t){return new lt(((n,r)=>{let i,o;return this.then((a=>{o=!1,i=a,t&&t()}),(a=>{o=!0,i=a,t&&t()})).then((()=>{o?r(i):n(i)}))}))}__init(){this._resolve=t=>{this._setResult(Rt.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Rt.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{this._state===Rt.PENDING&&(wi(n)?n.then(this._resolve,this._reject):(this._state=t,this._value=n,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Rt.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach((n=>{n[0]||(this._state===Rt.RESOLVED&&n[1](this._value),this._state===Rt.REJECTED&&n[2](this._value),n[0]=!0)}))}}}function wv(e){const t=jt(),n={sid:ct(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>(function(r){return st({sid:`${r.sid}`,init:r.init,started:new Date(1e3*r.started).toISOString(),timestamp:new Date(1e3*r.timestamp).toISOString(),status:r.status,errors:r.errors,did:typeof r.did=="number"||typeof r.did=="string"?`${r.did}`:void 0,duration:r.duration,abnormal_mechanism:r.abnormal_mechanism,attrs:{release:r.release,environment:r.environment,ip_address:r.ipAddress,user_agent:r.userAgent}})})(n)};return e&&Fn(n,e),n}function Fn(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||jt(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:ct()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function fu(){return ct()}function aa(){return ct().substring(16)}function xi(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=xi(r[i],t[i],n-1));return r}const sa="_sentrySpan";function hu(e,t){t?un(e,sa,t):delete e[sa]}function pu(e){return e[sa]}class ca{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:fu(),spanId:aa()}}clone(){const t=new ca;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,hu(t,pu(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Fn(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,[r,i]=n instanceof qt?[n.getScopeData(),n.getRequestSession()]:Rn(n)?[t,t.requestSession]:[],{tags:o,extra:a,user:s,contexts:c,level:l,fingerprint:d=[],propagationContext:f}=r||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...a},this._contexts={...this._contexts,...c},s&&Object.keys(s).length&&(this._user=s),l&&(this._level=l),d.length&&(this._fingerprint=d),f&&(this._propagationContext=f),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,hu(this,void 0),this._attachments=[],this.setPropagationContext({traceId:fu()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:100;if(r<=0)return this;const i={timestamp:vr(),...t};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),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:pu(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=xi(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:aa(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:ct();if(!this._client)return ee.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r&&r.event_id?r.event_id:ct();if(!this._client)return ee.warn("No client configured on scope - will not capture message!"),i;const o=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:i},this),i}captureEvent(t,n){const r=n&&n.event_id?n.event_id:ct();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(ee.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((t=>{t(this)})),this._notifyingListeners=!1)}}const qt=ca;class kv{constructor(t,n){let r,i;r=t||new qt,i=n||new qt,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(i){throw this._popScope(),i}return wi(r)?r.then((i=>(this._popScope(),i)),(i=>{throw this._popScope(),i})):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Bn(){const e=Qo(bi());return e.stack=e.stack||new kv(mi("defaultCurrentScope",(()=>new qt)),mi("defaultIsolationScope",(()=>new qt)))}function Sv(e){return Bn().withScope(e)}function xv(e,t){const n=Bn();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function mu(e){return Bn().withScope((()=>e(Bn().getIsolationScope())))}function la(e){const t=Qo(e);return t.acs?t.acs:{withIsolationScope:mu,withScope:Sv,withSetScope:xv,withSetIsolationScope:(n,r)=>mu(r),getCurrentScope:()=>Bn().getScope(),getIsolationScope:()=>Bn().getIsolationScope()}}function fn(){return la(bi()).getCurrentScope()}function yr(){return la(bi()).getIsolationScope()}function Be(){return fn().getClient()}function Tv(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:i}=t;return st({trace_id:n,span_id:r,parent_span_id:i})}function Mv(e){const t=e._sentryMetrics;if(!t)return;const n={};for(const[,[r,i]]of t)(n[r]||(n[r]=[])).push(st(i));return n}const Cv=/^sentry-/;function Pv(e){const t=(function(r){if(!(!r||!Lt(r)&&!Array.isArray(r)))return Array.isArray(r)?r.reduce(((i,o)=>{const a=gu(o);return Object.entries(a).forEach((([s,c])=>{i[s]=c})),i}),{}):gu(r)})(e);if(!t)return;const n=Object.entries(t).reduce(((r,[i,o])=>(i.match(Cv)&&(r[i.slice(7)]=o),r)),{});return Object.keys(n).length>0?n:void 0}function gu(e){return e.split(",").map((t=>t.split("=").map((n=>decodeURIComponent(n.trim()))))).reduce(((t,[n,r])=>(n&&r&&(t[n]=r),t)),{})}let vu=!1;function Ev(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return st({parent_span_id:r?t:ua(e).parent_span_id,span_id:r?aa():t,trace_id:n})}function yu(e){return typeof e=="number"?bu(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?bu(e.getTime()):jt()}function bu(e){return e>9999999999?e/1e3:e}function ua(e){if((function(t){return typeof t.getSpanJSON=="function"})(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if((function(r){const i=r;return!!(i.attributes&&i.startTime&&i.name&&i.endTime&&i.status)})(e)){const{attributes:r,startTime:i,name:o,endTime:a,parentSpanId:s,status:c}=e;return st({span_id:t,trace_id:n,data:r,description:o,parent_span_id:s,start_timestamp:yu(i),timestamp:yu(a)||void 0,status:Av(c),op:r["sentry.op"],origin:r["sentry.origin"],_metrics_summary:Mv(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function Av(e){if(e&&e.code!==0)return e.code===1?"ok":e.message||"unknown_error"}function _u(e){return e._sentryRootSpan||e}function Ov(){vu||(gr((()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")})),vu=!0)}const da="production";function wu(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=st({environment:n.environment||da,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function Iv(e){const t=Be();if(!t)return{};const n=_u(e),r=n._frozenDsc;if(r)return r;const i=n.spanContext().traceState,o=i&&i.get("sentry.dsc"),a=o&&Pv(o);if(a)return a;const s=wu(e.spanContext().traceId,t),c=ua(n),l=c.data||{},d=l["sentry.sample_rate"];d!=null&&(s.sample_rate=`${d}`);const f=l["sentry.source"],p=c.description;return f!=="url"&&p&&(s.transaction=p),(function(g){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const y=Be(),v=y&&y.getOptions();return!!v&&(v.enableTracing||"tracesSampleRate"in v||"tracesSampler"in v)})()&&(s.sampled=String((function(g){const{traceFlags:y}=g.spanContext();return y===1})(n))),t.emit("createDsc",s,n),s}const Dv=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ti(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${a}`}function ku(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Lv(e){const t=typeof e=="string"?(function(n){const r=Dv.exec(n);if(!r)return void gr((()=>{console.error(`Invalid Sentry Dsn: ${n}`)}));const[i,o,a="",s="",c="",l=""]=r.slice(1);let d="",f=l;const p=f.split("/");if(p.length>1&&(d=p.slice(0,-1).join("/"),f=p.pop()),f){const g=f.match(/^\d+/);g&&(f=g[0])}return ku({host:s,pass:a,path:d,projectId:f,port:c,protocol:i,publicKey:o})})(e):ku(e);if(t&&(function(n){if(!on)return!0;const{port:r,projectId:i,protocol:o}=n;return!(["protocol","publicKey","host","projectId"].find((a=>!n[a]&&(ee.error(`Invalid Sentry Dsn: ${a} missing`),!0)))||(i.match(/^\d+$/)?(function(a){return a==="http"||a==="https"})(o)?r&&isNaN(parseInt(r,10))&&(ee.error(`Invalid Sentry Dsn: Invalid port ${r}`),1):(ee.error(`Invalid Sentry Dsn: Invalid protocol ${o}`),1):(ee.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),1)))})(t))return t}function Vt(e,t=100,n=1/0){try{return fa("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Su(e,t=3,n=102400){const r=Vt(e,t);return i=r,(function(o){return~-encodeURI(o).split(/%..|./).length})(JSON.stringify(i))>n?Su(e,t-1,n):r;var i}function fa(e,t,n=1/0,r=1/0,i=(function(){const o=typeof WeakSet=="function",a=o?new WeakSet:[];return[function(s){if(o)return!!a.has(s)||(a.add(s),!1);for(let c=0;c<a.length;c++)if(a[c]===s)return!0;return a.push(s),!1},function(s){if(o)a.delete(s);else for(let c=0;c<a.length;c++)if(a[c]===s){a.splice(c,1);break}}]})()){const[o,a]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const s=(function(g,y){try{if(g==="domain"&&y&&typeof y=="object"&&y._events)return"[Domain]";if(g==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&y===global)return"[Global]";if(typeof window<"u"&&y===window)return"[Window]";if(typeof document<"u"&&y===document)return"[Document]";if(ru(y))return"[VueViewModel]";if(Rn(v=y)&&"nativeEvent"in v&&"preventDefault"in v&&"stopPropagation"in v)return"[SyntheticEvent]";if(typeof y=="number"&&!Number.isFinite(y))return`[${y}]`;if(typeof y=="function")return`[Function: ${Jt(y)}]`;if(typeof y=="symbol")return`[${String(y)}]`;if(typeof y=="bigint")return`[BigInt: ${String(y)}]`;const b=(function(_){const k=Object.getPrototypeOf(_);return k?k.constructor.name:"null prototype"})(y);return/^HTML(\w*)Element$/.test(b)?`[HTMLElement: ${b}]`:`[object ${b}]`}catch(b){return`**non-serializable** (${b})`}var v})(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return s.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{return fa("",l.toJSON(),c-1,r,i)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const p=su(t);for(const g in p){if(!Object.prototype.hasOwnProperty.call(p,g))continue;if(f>=r){d[g]="[MaxProperties ~]";break}const y=p[g];d[g]=fa(g,y,c-1,r,i),f++}return a(t),d}function br(e,t=[]){return[e,t]}function jv(e,t){const[n,r]=e;return[n,[...r,t]]}function xu(e,t){const n=e[1];for(const r of n)if(t(r,r[0].type))return!0;return!1}function ha(e){return pe.__SENTRY__&&pe.__SENTRY__.encodePolyfill?pe.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Rv(e){const[t,n]=e;let r=JSON.stringify(t);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[ha(r),o]:r.push(typeof o=="string"?ha(o):o)}for(const o of n){const[a,s]=o;if(i(`
6
+ ${JSON.stringify(a)}
7
+ `),typeof s=="string"||s instanceof Uint8Array)i(s);else{let c;try{c=JSON.stringify(s)}catch{c=JSON.stringify(Vt(s))}i(c)}}return typeof r=="string"?r:(function(o){const a=o.reduce(((l,d)=>l+d.length),0),s=new Uint8Array(a);let c=0;for(const l of o)s.set(l,c),c+=l.length;return s})(r)}function Vv(e){const t=typeof e.data=="string"?ha(e.data):e.data;return[st({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Nv={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 Tu(e){return Nv[e]}function Mu(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Fv(e,t,n,r){const i=Mu(n),o=e.type&&e.type!=="replay_event"?e.type:"event";(function(s,c){c&&(s.sdk=s.sdk||{},s.sdk.name=s.sdk.name||c.name,s.sdk.version=s.sdk.version||c.version,s.sdk.integrations=[...s.sdk.integrations||[],...c.integrations||[]],s.sdk.packages=[...s.sdk.packages||[],...c.packages||[]])})(e,n&&n.sdk);const a=(function(s,c,l,d){const f=s.sdkProcessingMetadata&&s.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:s.event_id,sent_at:new Date().toISOString(),...c&&{sdk:c},...!!l&&d&&{dsn:Ti(d)},...f&&{trace:st({...f})}}})(e,i,r,t);return delete e.sdkProcessingMetadata,br(a,[[{type:o},e]])}function pa(e,t,n,r=0){return new lt(((i,o)=>{const a=e[r];if(t===null||typeof a!="function")i(t);else{const s=a({...t},n);_e&&a.id&&s===null&&ee.log(`Event processor "${a.id}" dropped event`),wi(s)?s.then((c=>pa(e,c,n,r+1).then(i))).then(null,o):pa(e,s,n,r+1).then(i).then(null,o)}}))}let Mi,Cu,ma;function Bv(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;(function(a,s){const{extra:c,tags:l,user:d,contexts:f,level:p,transactionName:g}=s,y=st(c);y&&Object.keys(y).length&&(a.extra={...y,...a.extra});const v=st(l);v&&Object.keys(v).length&&(a.tags={...v,...a.tags});const b=st(d);b&&Object.keys(b).length&&(a.user={...b,...a.user});const _=st(f);_&&Object.keys(_).length&&(a.contexts={..._,...a.contexts}),p&&(a.level=p),g&&a.type!=="transaction"&&(a.transaction=g)})(e,t),r&&(function(a,s){a.contexts={trace:Ev(s),...a.contexts},a.sdkProcessingMetadata={dynamicSamplingContext:Iv(s),...a.sdkProcessingMetadata};const c=_u(s),l=ua(c).description;l&&!a.transaction&&a.type==="transaction"&&(a.transaction=l)})(e,r),(function(a,s){a.fingerprint=a.fingerprint?Array.isArray(a.fingerprint)?a.fingerprint:[a.fingerprint]:[],s&&(a.fingerprint=a.fingerprint.concat(s)),a.fingerprint&&!a.fingerprint.length&&delete a.fingerprint})(e,n),(function(a,s){const c=[...a.breadcrumbs||[],...s];a.breadcrumbs=c.length?c:void 0})(e,i),(function(a,s){a.sdkProcessingMetadata={...a.sdkProcessingMetadata,...s}})(e,o)}function Pu(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:l,eventProcessors:d,attachments:f,propagationContext:p,transactionName:g,span:y}=t;Ci(e,"extra",n),Ci(e,"tags",r),Ci(e,"user",i),Ci(e,"contexts",o),e.sdkProcessingMetadata=xi(e.sdkProcessingMetadata,s,2),a&&(e.level=a),g&&(e.transactionName=g),y&&(e.span=y),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function Ci(e,t,n){e[t]=xi(e[t],n,1)}function $v(e,t,n,r,i,o){const{normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ct(),timestamp:t.timestamp||vr()},l=n.integrations||e.integrations.map((y=>y.name));(function(y,v){const{environment:b,release:_,dist:k,maxValueLength:x=250}=v;y.environment=y.environment||b||da,!y.release&&_&&(y.release=_),!y.dist&&k&&(y.dist=k),y.message&&(y.message=Vn(y.message,x));const C=y.exception&&y.exception.values&&y.exception.values[0];C&&C.value&&(C.value=Vn(C.value,x));const T=y.request;T&&T.url&&(T.url=Vn(T.url,x))})(c,e),(function(y,v){v.length>0&&(y.sdk=y.sdk||{},y.sdk.integrations=[...y.sdk.integrations||[],...v])})(c,l),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&(function(y,v){const b=(function(_){const k=pe._sentryDebugIds;if(!k)return{};const x=Object.keys(k);return ma&&x.length===Cu||(Cu=x.length,ma=x.reduce(((C,T)=>{Mi||(Mi={});const M=Mi[T];if(M)C[M[0]]=M[1];else{const A=_(T);for(let E=A.length-1;E>=0;E--){const j=A[E],B=j&&j.filename,V=k[T];if(B&&V){C[B]=V,Mi[T]=[B,V];break}}}return C}),{})),ma})(v);try{y.exception.values.forEach((_=>{_.stacktrace.frames.forEach((k=>{b&&k.filename&&(k.debug_id=b[k.filename])}))}))}catch{}})(c,e.stackParser);const d=(function(y,v){if(!v)return y;const b=y?y.clone():new qt;return b.update(v),b})(r,n.captureContext);n.mechanism&&Nn(c,n.mechanism);const f=i?i.getEventProcessors():[],p=mi("globalScope",(()=>new qt)).getScopeData();o&&Pu(p,o.getScopeData()),d&&Pu(p,d.getScopeData());const g=[...n.attachments||[],...p.attachments];return g.length&&(n.attachments=g),Bv(c,p),pa([...f,...p.eventProcessors],c,n).then((y=>(y&&(function(v){const b={};try{v.exception.values.forEach((k=>{k.stacktrace.frames.forEach((x=>{x.debug_id&&(x.abs_path?b[x.abs_path]=x.debug_id:x.filename&&(b[x.filename]=x.debug_id),delete x.debug_id)}))}))}catch{}if(Object.keys(b).length===0)return;v.debug_meta=v.debug_meta||{},v.debug_meta.images=v.debug_meta.images||[];const _=v.debug_meta.images;Object.entries(b).forEach((([k,x])=>{_.push({type:"sourcemap",code_file:k,debug_id:x})}))})(y),typeof a=="number"&&a>0?(function(v,b,_){if(!v)return null;const k={...v,...v.breadcrumbs&&{breadcrumbs:v.breadcrumbs.map((x=>({...x,...x.data&&{data:Vt(x.data,b,_)}})))},...v.user&&{user:Vt(v.user,b,_)},...v.contexts&&{contexts:Vt(v.contexts,b,_)},...v.extra&&{extra:Vt(v.extra,b,_)}};return v.contexts&&v.contexts.trace&&k.contexts&&(k.contexts.trace=v.contexts.trace,v.contexts.trace.data&&(k.contexts.trace.data=Vt(v.contexts.trace.data,b,_))),v.spans&&(k.spans=v.spans.map((x=>({...x,...x.data&&{data:Vt(x.data,b,_)}})))),v.contexts&&v.contexts.flags&&k.contexts&&(k.contexts.flags=Vt(v.contexts.flags,3,_)),k})(y,a,s):y)))}function ax(e){}function Eu(e,t){return fn().captureEvent(e,t)}function Au(e){const t=Be(),n=yr(),r=fn(),{release:i,environment:o=da}=t&&t.getOptions()||{},{userAgent:a}=pe.navigator||{},s=wv({release:i,environment:o,user:r.getUser()||n.getUser(),...a&&{userAgent:a},...e}),c=n.getSession();return c&&c.status==="ok"&&Fn(c,{status:"exited"}),Ou(),n.setSession(s),r.setSession(s),s}function Ou(){const e=yr(),t=fn(),n=t.getSession()||e.getSession();n&&(function(r,i){let o={};r.status==="ok"&&(o={status:"exited"}),Fn(r,o)})(n),Iu(),e.setSession(),t.setSession()}function Iu(){const e=yr(),t=fn(),n=Be(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Du(e=!1){e?Ou():Iu()}function Uv(e,t,n){return t||`${(function(r){return`${(function(i){const o=i.protocol?`${i.protocol}:`:"",a=i.port?`:${i.port}`:"";return`${o}//${i.host}${a}${i.path?`/${i.path}`:""}/api/`})(r)}${r.projectId}/envelope/`})(e)}?${(function(r,i){const o={sentry_version:"7"};return r.publicKey&&(o.sentry_key=r.publicKey),i&&(o.sentry_client=`${i.name}/${i.version}`),new URLSearchParams(o).toString()})(e,n)}`}const Lu=[];function ju(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Ru(e,t,n){if(n[t.name])_e&&ee.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,Lu.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Lu.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",((i,o)=>r(i,o,e)))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign(((o,a)=>r(o,a,e)),{id:t.name});e.addEventProcessor(i)}_e&&ee.log(`Integration installed: ${t.name}`)}}class bt extends Error{constructor(t,n="warn"){super(t),this.message=t,this.logLevel=n}}const Vu="Not capturing exception because it's already been captured.";class zv{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Lv(t.dsn):_e&&ee.warn("No DSN provided, client will not send events."),this._dsn){const r=Uv(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}const n=["enableTracing","tracesSampleRate","tracesSampler"].find((r=>r in t&&t[r]==null));n&&gr((()=>{console.warn(`[Sentry] Deprecation warning: \`${n}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(t,n,r){const i=ct();if(du(t))return _e&&ee.log(Vu),i;const o={event_id:i,...n};return this._process(this.eventFromException(t,o).then((a=>this._captureEvent(a,o,r)))),o.event_id}captureMessage(t,n,r,i){const o={event_id:ct(),...r},a=ea(t)?t:String(t),s=ta(t)?this.eventFromMessage(a,n,o):this.eventFromException(t,o);return this._process(s.then((c=>this._captureEvent(c,o,i)))),o.event_id}captureEvent(t,n,r){const i=ct();if(n&&n.originalException&&du(n.originalException))return _e&&ee.log(Vu),i;const o={event_id:i,...n},a=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,o,a||r)),o.event_id}captureSession(t){typeof t.release!="string"?_e&&ee.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Fn(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then((r=>n.flush(t).then((i=>r&&i))))):dn(!0)}close(t){return this.flush(t).then((n=>(this.getOptions().enabled=!1,this.emit("close"),n)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some((({name:t})=>t.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];Ru(this,t,this._integrations),n||ju(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Fv(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=jv(r,Vv(o));const i=this.sendEnvelope(r);i&&i.then((o=>this.emit("afterSendEvent",t,o)),null)}sendSession(t){const n=(function(r,i,o,a){const s=Mu(o);return br({sent_at:new Date().toISOString(),...s&&{sdk:s},...!!a&&i&&{dsn:Ti(i)}},["aggregates"in r?[{type:"sessions"},r]:[{type:"session"},r.toJSON()]])})(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const i=typeof r=="number"?r:1,o=`${t}:${n}`;_e&&ee.log(`Recording outcome: "${o}"${i>1?` (${i} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+i}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach((i=>i(...n)))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,(n=>(_e&&ee.error("Error while sending envelope:",n),n))):(_e&&ee.error("Transport disabled"),dn({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=(function(n,r){const i={};return r.forEach((o=>{o&&Ru(n,o,i)})),i})(this,t),ju(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",i=!1;const o=n.exception&&n.exception.values;if(o){i=!0;for(const s of o){const c=s.mechanism;if(c&&c.handled===!1){r=!0;break}}}const a=t.status==="ok";(a&&t.errors===0||a&&r)&&(Fn(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new lt((n=>{let r=0;const i=setInterval((()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=1,t&&r>=t&&(clearInterval(i),n(!1)))}),1)}))}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r=fn(),i=yr()){const o=this.getOptions(),a=Object.keys(this._integrations);return!n.integrations&&a.length>0&&(n.integrations=a),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),$v(o,t,n,r,this,i).then((s=>{if(s===null)return s;s.contexts={trace:Tv(r),...s.contexts};const c=(function(l,d){const f=d.getPropagationContext();return f.dsc||wu(f.traceId,l)})(this,r);return s.sdkProcessingMetadata={dynamicSamplingContext:c,...s.sdkProcessingMetadata},s}))}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then((i=>i.event_id),(i=>{_e&&(i instanceof bt&&i.logLevel==="log"?ee.log(i.message):ee.warn(i))}))}_processEvent(t,n,r){const i=this.getOptions(),{sampleRate:o}=i,a=Fu(t),s=Nu(t),c=t.type||"error",l=`before send for type \`${c}\``,d=o===void 0?void 0:(function(g){if(typeof g=="boolean")return Number(g);const y=typeof g=="string"?parseFloat(g):g;if(!(typeof y!="number"||isNaN(y)||y<0||y>1))return y;_e&&ee.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(g)} of type ${JSON.stringify(typeof g)}.`)})(o);if(s&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),Si(new bt(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const f=c==="replay_event"?"replay":c,p=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,p).then((g=>{if(g===null)throw this.recordDroppedEvent("event_processor",f,t),new bt("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return g;const y=(function(v,b,_,k){const{beforeSend:x,beforeSendTransaction:C,beforeSendSpan:T}=b;if(Nu(_)&&x)return x(_,k);if(Fu(_)){if(_.spans&&T){const M=[];for(const A of _.spans){const E=T(A);E?M.push(E):(Ov(),v.recordDroppedEvent("before_send","span"))}_.spans=M}if(C){if(_.spans){const M=_.spans.length;_.sdkProcessingMetadata={..._.sdkProcessingMetadata,spanCountBeforeProcessing:M}}return C(_,k)}}return _})(this,i,g,n);return(function(v,b){const _=`${b} must return \`null\` or a valid event.`;if(wi(v))return v.then((k=>{if(!Rn(k)&&k!==null)throw new bt(_);return k}),(k=>{throw new bt(`${b} rejected with ${k}`)}));if(!Rn(v)&&v!==null)throw new bt(_);return v})(y,l)})).then((g=>{if(g===null){if(this.recordDroppedEvent("before_send",f,t),a){const b=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw new bt(`${l} returned \`null\`, will not send event.`,"log")}const y=r&&r.getSession();if(!a&&y&&this._updateSessionFromEvent(y,g),a){const b=(g.sdkProcessingMetadata&&g.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(g.spans?g.spans.length:0);b>0&&this.recordDroppedEvent("before_send","span",b)}const v=g.transaction_info;if(a&&v&&g.transaction!==t.transaction){const b="custom";g.transaction_info={...v,source:b}}return this.sendEvent(g,n),g})).then(null,(g=>{throw g instanceof bt?g:(this.captureException(g,{data:{__sentry__:!0},originalException:g}),new bt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
+ Reason: ${g}`))}))}_process(t){this._numProcessing++,t.then((n=>(this._numProcessing--,n)),(n=>(this._numProcessing--,n)))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map((([n,r])=>{const[i,o]=n.split(":");return{reason:i,category:o,quantity:r}}))}_flushOutcomes(){_e&&ee.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0)return void(_e&&ee.log("No outcomes to send"));if(!this._dsn)return void(_e&&ee.log("No dsn provided, will not send outcomes"));_e&&ee.log("Sending outcomes:",t);const n=(r=t,br((i=this._options.tunnel&&Ti(this._dsn))?{dsn:i}:{},[[{type:"client_report"},{timestamp:o||vr(),discarded_events:r}]]));var r,i,o;this.sendEnvelope(n)}}function Nu(e){return e.type===void 0}function Fu(e){return e.type==="transaction"}function Wv(e){const t=[];function n(r){return t.splice(t.indexOf(r),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(e===void 0||t.length<e))return Si(new bt("Not adding Promise because buffer limit was reached."));const i=r();return t.indexOf(i)===-1&&t.push(i),i.then((()=>n(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(r){return new lt(((i,o)=>{let a=t.length;if(!a)return i(!0);const s=setTimeout((()=>{r&&r>0&&i(!1)}),r);t.forEach((c=>{dn(c).then((()=>{--a||(clearTimeout(s),i(!0))}),o)}))}))}}}function Jv(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(o)for(const s of o.trim().split(",")){const[c,l,,,d]=s.split(":",5),f=parseInt(c,10),p=1e3*(isNaN(f)?60:f);if(l)for(const g of l.split(";"))g==="metric_bucket"&&d&&!d.split(";").includes("custom")||(i[g]=r+p);else i.all=r+p}else a?i.all=r+(function(s,c=Date.now()){const l=parseInt(`${s}`,10);if(!isNaN(l))return 1e3*l;const d=Date.parse(`${s}`);return isNaN(d)?6e4:d-c})(a,r):t===429&&(i.all=r+6e4);return i}function Hv(e,t,n=Wv(e.bufferSize||64)){let r={};return{send:function(i){const o=[];if(xu(i,((c,l)=>{const d=Tu(l);if((function(f,p,g=Date.now()){return(function(y,v){return y[v]||y.all||0})(f,p)>g})(r,d)){const f=Bu(c,l);e.recordDroppedEvent("ratelimit_backoff",d,f)}else o.push(c)})),o.length===0)return dn({});const a=br(i[0],o),s=c=>{xu(a,((l,d)=>{const f=Bu(l,d);e.recordDroppedEvent(c,Tu(d),f)}))};return n.add((()=>t({body:Rv(a)}).then((c=>(c.statusCode!==void 0&&(c.statusCode<200||c.statusCode>=300)&&_e&&ee.warn(`Sentry responded with status code ${c.statusCode} to sent event.`),r=Jv(r,c),c)),(c=>{throw s("network_error"),c})))).then((c=>c),(c=>{if(c instanceof bt)return _e&&ee.error("Skipped sending event because buffer is full."),s("queue_overflow"),dn({});throw c}))},flush:i=>n.drain(i)}}function Bu(e,t){if(t==="event"||t==="transaction")return Array.isArray(e)?e[1]:void 0}const qv=100;function hn(e,t){const n=Be(),r=yr();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=qv}=n.getOptions();if(o<=0)return;const a={timestamp:vr(),...e},s=i?gr((()=>i(a,t))):a;s!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,o))}let $u;const Uu=new WeakMap,Gv=()=>({name:"FunctionToString",setupOnce(){$u=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=ra(this),n=Uu.has(Be())&&t!==void 0?t:this;return $u.apply(n,e)}}catch{}},setup(e){Uu.set(e,!0)}}),Kv=[/^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+$/],Yv=(e={})=>({name:"InboundFilters",processEvent(t,n,r){const i=r.getOptions(),o=(function(a={},s={}){return{allowUrls:[...a.allowUrls||[],...s.allowUrls||[]],denyUrls:[...a.denyUrls||[],...s.denyUrls||[]],ignoreErrors:[...a.ignoreErrors||[],...s.ignoreErrors||[],...a.disableErrorDefaults?[]:Kv],ignoreTransactions:[...a.ignoreTransactions||[],...s.ignoreTransactions||[]],ignoreInternal:a.ignoreInternal===void 0||a.ignoreInternal}})(e,i);return(function(a,s){return s.ignoreInternal&&(function(c){try{return c.exception.values[0].type==="SentryError"}catch{}return!1})(a)?(_e&&ee.warn(`Event dropped due to being internal Sentry Error.
9
+ Event: ${Ht(a)}`),!0):(function(c,l){return c.type||!l||!l.length?!1:(function(d){const f=[];d.message&&f.push(d.message);let p;try{p=d.exception.values[d.exception.values.length-1]}catch{}return p&&p.value&&(f.push(p.value),p.type&&f.push(`${p.type}: ${p.value}`)),f})(c).some((d=>ki(d,l)))})(a,s.ignoreErrors)?(_e&&ee.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
10
+ Event: ${Ht(a)}`),!0):(function(c){return c.type||!c.exception||!c.exception.values||c.exception.values.length===0?!1:!c.message&&!c.exception.values.some((l=>l.stacktrace||l.type&&l.type!=="Error"||l.value))})(a)?(_e&&ee.warn(`Event dropped due to not having an error message, error type or stacktrace.
11
+ Event: ${Ht(a)}`),!0):(function(c,l){if(c.type!=="transaction"||!l||!l.length)return!1;const d=c.transaction;return!!d&&ki(d,l)})(a,s.ignoreTransactions)?(_e&&ee.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
12
+ Event: ${Ht(a)}`),!0):(function(c,l){if(!l||!l.length)return!1;const d=Pi(c);return!!d&&ki(d,l)})(a,s.denyUrls)?(_e&&ee.warn(`Event dropped due to being matched by \`denyUrls\` option.
13
+ Event: ${Ht(a)}.
14
+ Url: ${Pi(a)}`),!0):(function(c,l){if(!l||!l.length)return!0;const d=Pi(c);return!d||ki(d,l)})(a,s.allowUrls)?!1:(_e&&ee.warn(`Event dropped due to not being matched by \`allowUrls\` option.
15
+ Event: ${Ht(a)}.
16
+ Url: ${Pi(a)}`),!0)})(t,o)?null:t}});function Pi(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?(function(n=[]){for(let r=n.length-1;r>=0;r--){const i=n[r];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null})(t):null}catch{return _e&&ee.error(`Cannot extract url for event ${Ht(e)}`),null}}function Xv(e,t,n=250,r,i,o,a){if(!(o.exception&&o.exception.values&&a&&ln(a.originalException,Error)))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var c,l;s&&(o.exception.values=(c=ga(e,t,i,a.originalException,r,o.exception.values,s,0),l=n,c.map((d=>(d.value&&(d.value=Vn(d.value,l)),d)))))}function ga(e,t,n,r,i,o,a,s){if(o.length>=n+1)return o;let c=[...o];if(ln(r[i],Error)){zu(a,s);const l=e(t,r[i]),d=c.length;Wu(l,i,d,s),c=ga(e,t,n,r[i],i,[l,...c],l,d)}return Array.isArray(r.errors)&&r.errors.forEach(((l,d)=>{if(ln(l,Error)){zu(a,s);const f=e(t,l),p=c.length;Wu(f,`errors[${d}]`,p,s),c=ga(e,t,n,l,i,[f,...c],f,p)}})),c}function zu(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Wu(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function va(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Qv(){"console"in pe&&Ko.forEach((function(e){e in pe.console&&rt(pe.console,e,(function(t){return gi[e]=t,function(...n){yt("console",{args:n,level:e});const r=gi[e];r&&r.apply(pe.console,n)}}))}))}function Zv(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const ey=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if((function(n,r){return r?!!((function(i,o){const a=i.message,s=o.message;return!(!a&&!s||a&&!s||!a&&s||a!==s||!Hu(i,o)||!Ju(i,o))})(n,r)||(function(i,o){const a=qu(o),s=qu(i);return!(!a||!s||a.type!==s.type||a.value!==s.value||!Hu(i,o)||!Ju(i,o))})(n,r)):!1})(t,e))return _e&&ee.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function Ju(e,t){let n=Ql(e),r=Ql(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let i=0;i<r.length;i++){const o=r[i],a=n[i];if(o.filename!==a.filename||o.lineno!==a.lineno||o.colno!==a.colno||o.function!==a.function)return!1}return!0}function Hu(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function qu(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Gu(e){return e===void 0?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const ya=pe;function ba(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function ty(){if(typeof EdgeRuntime=="string")return!0;if(!(function(){if(!("fetch"in ya))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}})())return!1;if(ba(ya.fetch))return!0;let e=!1;const t=ya.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=ba(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){on&&ee.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function ny(e,t){const n="fetch";sn(n,e),cn(n,(()=>(function(r,i=!1){i&&!ty()||rt(pe,"fetch",(function(o){return function(...a){const s=new Error,{method:c,url:l}=(function(f){if(f.length===0)return{method:"GET",url:""};if(f.length===2){const[g,y]=f;return{url:Ku(g),method:_a(y,"method")?String(y.method).toUpperCase():"GET"}}const p=f[0];return{url:Ku(p),method:_a(p,"method")?String(p.method).toUpperCase():"GET"}})(a),d={args:a,fetchData:{method:c,url:l},startTimestamp:1e3*jt(),virtualError:s};return r||yt("fetch",{...d}),o.apply(pe,a).then((async f=>(r?r(f):yt("fetch",{...d,endTimestamp:1e3*jt(),response:f}),f)),(f=>{throw yt("fetch",{...d,endTimestamp:1e3*jt(),error:f}),Zo(f)&&f.stack===void 0&&(f.stack=s.stack,un(f,"framesToPop",1)),f}))}}))})(void 0,t)))}function _a(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Ku(e){return typeof e=="string"?e:e?_a(e,"url")?e.url:e.toString?e.toString():"":""}const Ei=pe,Le=pe;let wa=0;function Yu(){return wa>0}function $n(e,t={}){if(!(function(r){return typeof r=="function"})(e))return e;try{const r=e.__sentry_wrapped__;if(r)return typeof r=="function"?r:e;if(ra(e))return e}catch{return e}const n=function(...r){try{const i=r.map((o=>$n(o,t)));return e.apply(this,i)}catch(i){throw wa++,setTimeout((()=>{wa--})),(function(...o){const a=la(bi());if(o.length===2){const[s,c]=o;return s?a.withSetScope(s,c):a.withScope(c)}a.withScope(o[0])})((o=>{var a;o.addEventProcessor((s=>(t.mechanism&&(oa(s,void 0),Nn(s,t.mechanism)),s.extra={...s.extra,arguments:r},s))),a=i,fn().captureException(a,void 0)})),i}};try{for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}catch{}au(n,e),un(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}const Ai=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ka(e,t){const n=xa(e,t),r={type:oy(t),value:ay(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function ry(e,t,n,r){const i=Be(),o=i&&i.getOptions().normalizeDepth,a=(function(l){for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)){const f=l[d];if(f instanceof Error)return f}})(t),s={__serialized__:Su(t,o)};if(a)return{exception:{values:[ka(e,a)]},extra:s};const c={exception:{values:[{type:_i(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:sy(t,{isUnhandledRejection:r})}]},extra:s};if(n){const l=xa(e,n);l.length&&(c.exception.values[0].stacktrace={frames:l})}return c}function Sa(e,t){return{exception:{values:[ka(e,t)]}}}function xa(e,t){const n=t.stacktrace||t.stack||"",r=(function(o){return o&&iy.test(o.message)?1:0})(t),i=(function(o){return typeof o.framesToPop=="number"?o.framesToPop:0})(t);try{return e(n,r,i)}catch{}return[]}const iy=/Minified React error #\d+;/i;function Xu(e){return typeof WebAssembly<"u"&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function oy(e){const t=e&&e.name;return!t&&Xu(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function ay(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:Xu(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function Ta(e,t,n,r,i){let o;if(tu(t)&&t.error)return Sa(e,t.error);if(nu(t)||jn(t,"DOMException")){const a=t;if("stack"in t)o=Sa(e,t);else{const s=a.name||(nu(a)?"DOMError":"DOMException"),c=a.message?`${s}: ${a.message}`:s;o=Ma(e,c,n,r),oa(o,c)}return"code"in a&&(o.tags={...o.tags,"DOMException.code":`${a.code}`}),o}return Zo(t)?Sa(e,t):Rn(t)||_i(t)?(o=ry(e,t,n,i),Nn(o,{synthetic:!0}),o):(o=Ma(e,t,n,r),oa(o,`${t}`),Nn(o,{synthetic:!0}),o)}function Ma(e,t,n,r){const i={};if(r&&n){const o=xa(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]}),Nn(i,{synthetic:!0})}if(ea(t)){const{__sentry_template_string__:o,__sentry_template_values__:a}=t;return i.logentry={message:o,params:a},i}return i.message=t,i}function sy(e,{isUnhandledRejection:t}){const n=(function(i,o=40){const a=Object.keys(su(i));a.sort();const s=a[0];if(!s)return"[object has no keys]";if(s.length>=o)return Vn(s,o);for(let c=a.length;c>0;c--){const l=a.slice(0,c).join(", ");if(!(l.length>o))return c===a.length?l:Vn(l,o)}return""})(e),r=t?"promise rejection":"exception";return tu(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:_i(e)?`Event \`${(function(i){try{const o=Object.getPrototypeOf(i);return o?o.constructor.name:void 0}catch{}})(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}class cy extends zv{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t};(function(r,i,o=[i],a="npm"){const s=r._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${i}`,packages:o.map((c=>({name:`${a}:@sentry/${c}`,version:rn}))),version:rn}),r._metadata=s})(n,"browser",["browser"],Le.SENTRY_SDK_SOURCE||"npm"),super(n),n.sendClientReports&&Le.document&&Le.document.addEventListener("visibilitychange",(()=>{Le.document.visibilityState==="hidden"&&this._flushOutcomes()}))}eventFromException(t,n){return(function(r,i,o,a){const s=Ta(r,i,o&&o.syntheticException||void 0,a);return Nn(s),s.level="error",o&&o.event_id&&(s.event_id=o.event_id),dn(s)})(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return(function(i,o,a="info",s,c){const l=Ma(i,o,s&&s.syntheticException||void 0,c);return l.level=a,s&&s.event_id&&(l.event_id=s.event_id),dn(l)})(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled())return void(Ai&&ee.warn("SDK not enabled, will not capture user feedback."));const n=(function(r,{metadata:i,tunnel:o,dsn:a}){const s={event_id:r.event_id,sent_at:new Date().toISOString(),...i&&i.sdk&&{sdk:{name:i.sdk.name,version:i.sdk.version}},...!!o&&!!a&&{dsn:Ti(a)}};return br(s,[(function(l){return[{type:"user_report"},l]})(r)])})(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}}const ly=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,qe=pe;let Qu,Ca,Pa,Oi;function uy(){if(!qe.document)return;const e=yt.bind(null,"dom"),t=Zu(e,!0);qe.document.addEventListener("click",t,!1),qe.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((n=>{const r=qe[n],i=r&&r.prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&(rt(i,"addEventListener",(function(o){return function(a,s,c){if(a==="click"||a=="keypress")try{const l=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=l[a]=l[a]||{refCount:0};if(!d.handler){const f=Zu(e);d.handler=f,o.call(this,a,f,c)}d.refCount++}catch{}return o.call(this,a,s,c)}})),rt(i,"removeEventListener",(function(o){return function(a,s,c){if(a==="click"||a=="keypress")try{const l=this.__sentry_instrumentation_handlers__||{},d=l[a];d&&(d.refCount--,d.refCount<=0&&(o.call(this,a,d.handler,c),d.handler=void 0,delete l[a]),Object.keys(l).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,a,s,c)}})))}))}function Zu(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=(function(o){try{return o.target}catch{return null}})(n);if((function(o,a){return o==="keypress"&&(!a||!a.tagName||a.tagName!=="INPUT"&&a.tagName!=="TEXTAREA"&&!a.isContentEditable)})(n.type,r))return;un(n,"_sentryCaptured",!0),r&&!r._sentryId&&un(r,"_sentryId",ct());const i=n.type==="keypress"?"input":n.type;(function(o){if(o.type!==Ca)return!1;try{if(!o.target||o.target._sentryId!==Pa)return!1}catch{}return!0})(n)||(e({event:n,name:i,global:t}),Ca=n.type,Pa=r?r._sentryId:void 0),clearTimeout(Qu),Qu=qe.setTimeout((()=>{Pa=void 0,Ca=void 0}),1e3)}}function ed(e){const t="history";sn(t,e),cn(t,dy)}function dy(){if(!(function(){const n=Ei.chrome,r=n&&n.app&&n.app.runtime,i="history"in Ei&&!!Ei.history.pushState&&!!Ei.history.replaceState;return!r&&i})())return;const e=qe.onpopstate;function t(n){return function(...r){const i=r.length>2?r[2]:void 0;if(i){const o=Oi,a=String(i);Oi=a,yt("history",{from:o,to:a})}return n.apply(this,r)}}qe.onpopstate=function(...n){const r=qe.location.href,i=Oi;if(Oi=r,yt("history",{from:i,to:r}),e)try{return e.apply(this,n)}catch{}},rt(qe.history,"pushState",t),rt(qe.history,"replaceState",t)}const Ii={};function td(e){Ii[e]=void 0}const _r="__sentry_xhr_v3__";function fy(){if(!qe.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,o=1e3*jt(),a=Lt(r[0])?r[0].toUpperCase():void 0,s=(function(l){if(Lt(l))return l;try{return l.toString()}catch{}})(r[1]);if(!a||!s)return t.apply(n,r);n[_r]={method:a,url:s,request_headers:{}},a==="POST"&&s.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const l=n[_r];if(l&&n.readyState===4){try{l.status_code=n.status}catch{}yt("xhr",{endTimestamp:1e3*jt(),startTimestamp:o,xhr:n,virtualError:i})}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply:(l,d,f)=>(c(),l.apply(d,f))}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(l,d,f){const[p,g]=f,y=d[_r];return y&&Lt(p)&&Lt(g)&&(y.request_headers[p.toLowerCase()]=g),l.apply(d,f)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[_r];return i?(r[0]!==void 0&&(i.body=r[0]),yt("xhr",{startTimestamp:1e3*jt(),xhr:n}),t.apply(n,r)):t.apply(n,r)}})}function hy(e,t=(function(n){const r=Ii[n];if(r)return r;let i=qe[n];if(ba(i))return Ii[n]=i.bind(qe);const o=qe.document;if(o&&typeof o.createElement=="function")try{const a=o.createElement("iframe");a.hidden=!0,o.head.appendChild(a);const s=a.contentWindow;s&&s[n]&&(i=s[n]),o.head.removeChild(a)}catch(a){ly&&ee.warn(`Could not create sandbox iframe for ${n} check, bailing to window.${n}: `,a)}return i&&(Ii[n]=i.bind(qe))})("fetch")){let n=0,r=0;return Hv(e,(function(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return td("fetch"),Si("No fetch implementation available");try{return t(e.url,a).then((s=>(n-=o,r--,{statusCode:s.status,headers:{"x-sentry-rate-limits":s.headers.get("X-Sentry-Rate-Limits"),"retry-after":s.headers.get("Retry-After")}})))}catch(s){return td("fetch"),n-=o,r--,Si(s)}}))}function Ea(e,t,n,r){const i={filename:e,function:t==="<anonymous>"?an:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const py=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,my=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gy=/\((\S*)(?::(\d+))(?::(\d+))\)/,vy=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,yy=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,by=(function(...e){const t=e.sort(((n,r)=>n[0]-r[0])).map((n=>n[1]));return(n,r=0,i=0)=>{const o=[],a=n.split(`
17
+ `);for(let s=r;s<a.length;s++){const c=a[s];if(c.length>1024)continue;const l=Kl.test(c)?c.replace(Kl,"$1"):c;if(!l.match(/\S*Error: /)){for(const d of t){const f=d(l);if(f){o.push(f);break}}if(o.length>=50+i)break}}return(function(s){if(!s.length)return[];const c=Array.from(s);return/sentryWrapped/.test(vi(c).function||"")&&c.pop(),c.reverse(),Yl.test(vi(c).function||"")&&(c.pop(),Yl.test(vi(c).function||"")&&c.pop()),c.slice(0,50).map((l=>({...l,filename:l.filename||vi(c).filename,function:l.function||an})))})(o.slice(i))}})([30,e=>{const t=py.exec(e);if(t){const[,r,i,o]=t;return Ea(r,an,+i,+o)}const n=my.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=gy.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[r,i]=nd(n[1]||an,n[2]);return Ea(i,r,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=vy.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=yy.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],r=t[1]||an;return[r,n]=nd(r,n),Ea(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),nd=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:an,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},rd=1024,_y=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(n){var r;t.console&&(function(i){const o="console";sn(o,i),cn(o,Qv)})((function(i){return function(o){if(Be()!==i)return;const a={category:"console",data:{arguments:o.args,logger:"console"},level:Zv(o.level),message:ou(o.args," ")};if(o.level==="assert"){if(o.args[0]!==!1)return;a.message=`Assertion failed: ${ou(o.args.slice(1)," ")||"console.assert"}`,a.data.arguments=o.args.slice(1)}hn(a,{input:o.args,level:o.level})}})(n)),t.dom&&(r=(function(i,o){return function(a){if(Be()!==i)return;let s,c,l=typeof o=="object"?o.serializeAttribute:void 0,d=typeof o=="object"&&typeof o.maxStringLength=="number"?o.maxStringLength:void 0;d&&d>rd&&(Ai&&ee.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${d} was configured. Sentry will use 1024 instead.`),d=rd),typeof l=="string"&&(l=[l]);try{const p=a.event,g=(function(y){return!!y&&!!y.target})(p)?p.target:p;s=iu(g,{keyAttrs:l,maxStringLength:d}),c=(function(y){if(!na.HTMLElement)return null;let v=y;for(let b=0;b<5;b++){if(!v)return null;if(v instanceof HTMLElement){if(v.dataset.sentryComponent)return v.dataset.sentryComponent;if(v.dataset.sentryElement)return v.dataset.sentryElement}v=v.parentNode}return null})(g)}catch{s="<unknown>"}if(s.length===0)return;const f={category:`ui.${a.name}`,message:s};c&&(f.data={"ui.component_name":c}),hn(f,{event:a.event,name:a.name,global:a.global})}})(n,t.dom),sn("dom",r),cn("dom",uy)),t.xhr&&(function(i){sn("xhr",i),cn("xhr",fy)})((function(i){return function(o){if(Be()!==i)return;const{startTimestamp:a,endTimestamp:s}=o,c=o.xhr[_r];if(!a||!s||!c)return;const{method:l,url:d,status_code:f,body:p}=c,g={method:l,url:d,status_code:f},y={xhr:o.xhr,input:p,startTimestamp:a,endTimestamp:s};hn({category:"xhr",data:g,type:"http",level:Gu(f)},y)}})(n)),t.fetch&&ny((function(i){return function(o){if(Be()!==i)return;const{startTimestamp:a,endTimestamp:s}=o;if(s&&(!o.fetchData.url.match(/sentry_key/)||o.fetchData.method!=="POST"))if(o.error)hn({category:"fetch",data:o.fetchData,level:"error",type:"http"},{data:o.error,input:o.args,startTimestamp:a,endTimestamp:s});else{const c=o.response,l={...o.fetchData,status_code:c&&c.status},d={input:o.args,response:c,startTimestamp:a,endTimestamp:s};hn({category:"fetch",data:l,type:"http",level:Gu(l.status_code)},d)}}})(n)),t.history&&ed((function(i){return function(o){if(Be()!==i)return;let a=o.from,s=o.to;const c=va(Le.location.href);let l=a?va(a):void 0;const d=va(s);l&&l.path||(l=c),c.protocol===d.protocol&&c.host===d.host&&(s=d.relative),c.protocol===l.protocol&&c.host===l.host&&(a=l.relative),hn({category:"navigation",data:{from:a,to:s}})}})(n)),t.sentry&&n.on("beforeSendEvent",(function(i){return function(o){Be()===i&&hn({category:"sentry."+(o.type==="transaction"?"transaction":"event"),event_id:o.event_id,level:o.level,message:Ht(o)},{event:o})}})(n))}}},wy=["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"],ky=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&rt(Le,"setTimeout",id),t.setInterval&&rt(Le,"setInterval",id),t.requestAnimationFrame&&rt(Le,"requestAnimationFrame",Sy),t.XMLHttpRequest&&"XMLHttpRequest"in Le&&rt(XMLHttpRequest.prototype,"send",xy);const n=t.eventTarget;n&&(Array.isArray(n)?n:wy).forEach(Ty)}}};function id(e){return function(...t){const n=t[0];return t[0]=$n(n,{mechanism:{data:{function:Jt(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Sy(e){return function(t){return e.apply(this,[$n(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Jt(e)},handled:!1,type:"instrument"}})])}}function xy(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((r=>{r in n&&typeof n[r]=="function"&&rt(n,r,(function(i){const o={mechanism:{data:{function:r,handler:Jt(i)},handled:!1,type:"instrument"}},a=ra(i);return a&&(o.mechanism.data.handler=Jt(a)),$n(i,o)}))})),e.apply(this,t)}}function Ty(e){const t=Le[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(rt(n,"addEventListener",(function(r){return function(i,o,a){try{typeof o.handleEvent=="function"&&(o.handleEvent=$n(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Jt(o),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,$n(o,{mechanism:{data:{function:"addEventListener",handler:Jt(o),target:e},handled:!1,type:"instrument"}}),a])}})),rt(n,"removeEventListener",(function(r){return function(i,o,a){try{const s=o.__sentry_wrapped__;s&&r.call(this,i,s,a)}catch{}return r.call(this,i,o,a)}})))}const My=()=>({name:"BrowserSession",setupOnce(){Le.document!==void 0?(Au({ignoreDuration:!0}),Du(),ed((({from:e,to:t})=>{e!==void 0&&e!==t&&(Au({ignoreDuration:!0}),Du())}))):Ai&&ee.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),Cy=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&((function(r){(function(i){const o="error";sn(o,i),cn(o,vv)})((i=>{const{stackParser:o,attachStacktrace:a}=ad();if(Be()!==r||Yu())return;const{msg:s,url:c,line:l,column:d,error:f}=i,p=(function(g,y,v,b){const _=g.exception=g.exception||{},k=_.values=_.values||[],x=k[0]=k[0]||{},C=x.stacktrace=x.stacktrace||{},T=C.frames=C.frames||[],M=b,A=v,E=Lt(y)&&y.length>0?y:(function(){try{return na.document.location.href}catch{return""}})();return T.length===0&&T.push({colno:M,filename:E,function:an,in_app:!0,lineno:A}),g})(Ta(o,f||s,void 0,a,!1),c,l,d);p.level="error",Eu(p,{originalException:f,mechanism:{handled:!1,type:"onerror"}})}))})(n),od("onerror")),t.onunhandledrejection&&((function(r){(function(i){const o="unhandledrejection";sn(o,i),cn(o,yv)})((i=>{const{stackParser:o,attachStacktrace:a}=ad();if(Be()!==r||Yu())return;const s=(function(l){if(ta(l))return l;try{if("reason"in l)return l.reason;if("detail"in l&&"reason"in l.detail)return l.detail.reason}catch{}return l})(i),c=ta(s)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(s)}`}]}}:Ta(o,s,void 0,a,!0);c.level="error",Eu(c,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})}))})(n),od("onunhandledrejection"))}}};function od(e){Ai&&ee.log(`Global Handler attached: ${e}`)}function ad(){const e=Be();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Py=()=>({name:"HttpContext",preprocessEvent(e){if(!Le.navigator&&!Le.location&&!Le.document)return;const t=e.request&&e.request.url||Le.location&&Le.location.href,{referrer:n}=Le.document||{},{userAgent:r}=Le.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:i};e.request=o}}),Ey=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(r,i,o){const a=o.getOptions();Xv(ka,a.stackParser,a.maxValueLength,n,t,r,i)}}};var sd="new",cd="loading",ld="loaded",Aa="joining-meeting",pn="joined-meeting",mn="left-meeting",Gt="error",Ay="playable",Oa="unknown",Oy="full",Iy="base",ud="no-room",Dy="end-of-life",Ly="connection-error",jy="iframe-ready-for-launch-config",Ry="iframe-launch-config",Vy="theme-updated",Ny="loading",Fy="load-attempt-failed",dd="loaded",By="started-camera",$y="camera-error",Uy="joining-meeting",zy="joined-meeting",Wy="left-meeting",Jy="participant-joined",Hy="participant-updated",qy="participant-left",Gy="participant-counts-updated",Ky="access-state-updated",Yy="meeting-session-summary-updated",Xy="meeting-session-state-updated",Qy="waiting-participant-added",Zy="waiting-participant-updated",eb="waiting-participant-removed",tb="track-started",nb="track-stopped",rb="transcription-started",ib="transcription-stopped",ob="transcription-error",fd="recording-started",hd="recording-stopped",ab="recording-stats",sb="recording-error",cb="recording-upload-completed",lb="recording-data",ub="app-message",db="transcription-message",fb="remote-media-player-started",hb="remote-media-player-updated",pb="remote-media-player-stopped",mb="local-screen-share-started",gb="local-screen-share-stopped",vb="local-screen-share-canceled",yb="active-speaker-change",bb="active-speaker-mode-change",_b="network-quality-change",wb="network-connection",kb="cpu-load-change",Sb="face-counts-updated",Di="fullscreen",Li="exited-fullscreen",xb="live-streaming-started",Tb="live-streaming-updated",Mb="live-streaming-stopped",Cb="live-streaming-error",Pb="lang-updated",Eb="receive-settings-updated",pd="input-settings-updated",md="nonfatal-error",gd="error",Ia=4096,vd=102400,Da="iframe-call-message",yd="local-screen-start",bd="daily-method-update-live-streaming-endpoints",ji="transmit-log",Nt="daily-custom-track",Ri={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},_d={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},La={PLAY:"play",PAUSE:"pause"},ja=["jpg","png","jpeg"],Ab="add-endpoints",Ob="remove-endpoints",wd="sip-call-transfer";function ut(){return!le()&&typeof window<"u"&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function le(){return typeof navigator<"u"&&navigator.product&&navigator.product==="ReactNative"}function kd(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function Ib(){return!!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)&&((function(e,t){if(!e||!t)return!0;switch(e){case"Chrome":return t.major>=75;case"Safari":return RTCRtpTransceiver.prototype.hasOwnProperty("currentDirection")&&!(t.major===13&&t.minor===0&&t.point===0);case"Firefox":return t.major>=67}return!0})(gn(),Vi())||le())}function Sd(){if(le()||!document)return!1;var e=document.createElement("iframe");return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var Ra="none",Db="software",Lb="hardware",jb=(function(){try{var e,t=document.createElement("canvas"),n=!1;(e=t.getContext("webgl2",{failIfMajorPerformanceCaveat:!0}))||(n=!0,e=t.getContext("webgl2"));var r=e!=null;return t.remove(),r?n?Db:Lb:Ra}catch{return Ra}})();function xd(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!le()&&jb!==Ra&&(e?(function(){return Cd()?!1:["Chrome","Firefox"].includes(gn())})():(function(){if(Cd())return!1;var t=gn();if(t==="Safari"){var n=Fa();if(n.major<15||n.major===15&&n.minor<4)return!1}return t==="Chrome"?Na().major>=77:t==="Firefox"?Ba().major>=97:["Chrome","Firefox","Safari"].includes(t)})())}function Td(){if(le()||Md()||typeof AudioWorkletNode>"u")return!1;switch(gn()){case"Chrome":case"Firefox":return!0;case"Safari":var e=Vi();return e.major>17||e.major===17&&e.minor>=4}return!1}function Va(){return kd()&&typeof MediaStreamTrack<"u"&&!(function(){var e,t=gn();if(!ut())return!0;switch(t){case"Chrome":return(e=Na()).major&&e.major>0&&e.major<75;case"Firefox":return(e=Ba()).major<91;case"Safari":return(e=Fa()).major<13||e.major===13&&e.minor<1;default:return!0}})()}function Md(){return ut().match(/Linux; Android/)}function Cd(){var e,t=ut(),n=t.match(/Mac/)&&(!le()&&typeof window<"u"&&(e=window)!==null&&e!==void 0&&(e=e.navigator)!==null&&e!==void 0&&e.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(t.match(/Mobi/)||t.match(/Android/)||n)||!!ut().match(/DailyAnd\//)||void 0}function gn(){if(typeof window<"u"){var e=ut();return Pd()?"Safari":e.indexOf("Edge")>-1?"Edge":e.match(/Chrome\//)?"Chrome":e.indexOf("Safari")>-1||Ed()?"Safari":e.indexOf("Firefox")>-1?"Firefox":e.indexOf("MSIE")>-1||e.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function Vi(){switch(gn()){case"Chrome":return Na();case"Safari":return Fa();case"Firefox":return Ba();case"Edge":return(function(){var e=0,t=0;if(typeof window<"u"){var n=ut().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}})()}}function Na(){var e=0,t=0,n=0,r=0,i=!1;if(typeof window<"u"){var o=ut(),a=o.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(a)try{e=parseInt(a[1]),t=parseInt(a[2]),n=parseInt(a[3]),r=parseInt(a[4]),i=o.indexOf("OPR/")>-1}catch{}}return{major:e,minor:t,build:n,patch:r,opera:i}}function Pd(){return!!ut().match(/iPad|iPhone|iPod/i)&&kd()}function Ed(){return ut().indexOf("AppleWebKit/605.1.15")>-1}function Fa(){var e=0,t=0,n=0;if(typeof window<"u"){var r=ut().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch{}else(Pd()||Ed())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function Ba(){var e=0,t=0;if(typeof window<"u"){var n=ut().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}var Ad=(function(){return nt((function e(){tt(this,e)}),[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){mr()}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){mr()}},{key:"sendMessageToCallMachine",value:function(e,t,n,r){mr()}},{key:"sendMessageToDailyJs",value:function(e,t){mr()}},{key:"removeListener",value:function(e){mr()}}])})();function Od(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function $a(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Od(Object(n),!0).forEach((function(r){Tt(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Od(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Id(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Id=function(){return!!e})()}var Rb=(function(){function e(){var t,n,r,i;return tt(this,e),n=this,r=vt(r=e),(t=ci(n,Id()?Reflect.construct(r,[],vt(n).constructor):r.apply(n,i)))._wrappedListeners={},t._messageCallbacks={},t}return li(e,Ad),nt(e,[{key:"addListenerForMessagesFromCallMachine",value:function(t,n,r){var i=this,o=function(a){if(a.data&&a.data.what==="iframe-call-message"&&(!a.data.callClientId||a.data.callClientId===n)&&(!a.data.from||a.data.from!=="module")){var s=$a({},a.data);if(delete s.from,s.callbackStamp&&i._messageCallbacks[s.callbackStamp]){var c=s.callbackStamp;i._messageCallbacks[c].call(r,s),delete i._messageCallbacks[c]}delete s.what,delete s.callbackStamp,t.call(r,s)}};this._wrappedListeners[t]=o,window.addEventListener("message",o)}},{key:"addListenerForMessagesFromDailyJs",value:function(t,n,r){var i=function(o){var a;if(!(!o.data||o.data.what!==Da||!o.data.action||o.data.from&&o.data.from!=="module"||o.data.callClientId&&n&&o.data.callClientId!==n||o!=null&&(a=o.data)!==null&&a!==void 0&&a.callFrameId)){var s=o.data;t.call(r,s)}};this._wrappedListeners[t]=i,window.addEventListener("message",i)}},{key:"sendMessageToCallMachine",value:function(t,n,r,i){if(!r)throw new Error("undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?");var o=$a({},t);if(o.what=Da,o.from="module",o.callClientId=r,n){var a=fi();this._messageCallbacks[a]=n,o.callbackStamp=a}var s=i?i.contentWindow:window,c=this._callMachineTargetOrigin(i);c&&s.postMessage(o,c)}},{key:"sendMessageToDailyJs",value:function(t,n){t.what=Da,t.callClientId=n,t.from="embedded",window.postMessage(t,this._targetOriginFromWindowLocation())}},{key:"removeListener",value:function(t){var n=this._wrappedListeners[t];n&&(window.removeEventListener("message",n),delete this._wrappedListeners[t])}},{key:"forwardPackagedMessageToCallMachine",value:function(t,n,r){var i=$a({},t);i.callClientId=r;var o=n?n.contentWindow:window,a=this._callMachineTargetOrigin(n);a&&o.postMessage(i,a)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(t,n){var r=function(i){if(i.data&&i.data.what==="iframe-call-message"&&(!i.data.callClientId||i.data.callClientId===n)&&(!i.data.from||i.data.from!=="module")){var o=i.data;t(o)}};return this._wrappedListeners[t]=r,window.addEventListener("message",r),t}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(t){var n=this._wrappedListeners[t];n&&(window.removeEventListener("message",n),delete this._wrappedListeners[t])}},{key:"_callMachineTargetOrigin",value:function(t){return t?t.src?new URL(t.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:"_targetOriginFromWindowLocation",value:function(){return window.location.protocol==="file:"?"*":window.location.origin}}])})();function Dd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function Ld(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ld=function(){return!!e})()}var Vb=(function(){function e(){var t,n,r,i;return tt(this,e),n=this,r=vt(r=e),t=ci(n,Ld()?Reflect.construct(r,[],vt(n).constructor):r.apply(n,i)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new Go.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new Go.EventEmitter,t._wrappedListeners={},t._messageCallbacks={},t}return li(e,Ad),nt(e,[{key:"addListenerForMessagesFromCallMachine",value:function(t,n,r){this._addListener(t,global.callMachineToDailyJsEmitter,n,r,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(t,n,r){this._addListener(t,global.dailyJsToCallMachineEmitter,n,r,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(t,n,r){this._sendMessage(t,global.dailyJsToCallMachineEmitter,r,n,"sending message to call machine")}},{key:"sendMessageToDailyJs",value:function(t,n){this._sendMessage(t,global.callMachineToDailyJsEmitter,n,null,"sending message to daily-js")}},{key:"removeListener",value:function(t){var n=this._wrappedListeners[t];n&&(global.callMachineToDailyJsEmitter.removeListener("message",n),global.dailyJsToCallMachineEmitter.removeListener("message",n),delete this._wrappedListeners[t])}},{key:"_addListener",value:function(t,n,r,i,o){var a=this,s=function(c){if(c.callClientId===r){if(c.callbackStamp&&a._messageCallbacks[c.callbackStamp]){var l=c.callbackStamp;a._messageCallbacks[l].call(i,c),delete a._messageCallbacks[l]}t.call(i,c)}};this._wrappedListeners[t]=s,n.addListener("message",s)}},{key:"_sendMessage",value:function(t,n,r,i,o){var a=(function(c){for(var l=1;l<arguments.length;l++){var d=arguments[l]!=null?arguments[l]:{};l%2?Dd(Object(d),!0).forEach((function(f){Tt(c,f,d[f])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):Dd(Object(d)).forEach((function(f){Object.defineProperty(c,f,Object.getOwnPropertyDescriptor(d,f))}))}return c})({},t);if(a.callClientId=r,i){var s=fi();this._messageCallbacks[s]=i,a.callbackStamp=s}n.emit("message",a)}}])})(),Ua="replace",za="shallow-merge",jd=[Ua,za],Nb=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.data,r=t.mergeStrategy,i=r===void 0?Ua:r;tt(this,e),e._validateMergeStrategy(i),e._validateData(n,i),this.mergeStrategy=i,this.data=n}return nt(e,[{key:"isNoOp",value:function(){return e.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:"isNoOpUpdate",value:function(t,n){return Object.keys(t).length===0&&n===za}},{key:"_validateMergeStrategy",value:function(t){if(!jd.includes(t))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(jd,"]"))}},{key:"_validateData",value:function(t,n){if(!(function(s){if(s==null||he(s)!=="object")return!1;var c=Object.getPrototypeOf(s);return c==null||c===Object.prototype})(t))throw Error("Meeting session data must be a plain (map-like) object");var r;try{if(r=JSON.stringify(t),n===Ua){var i=JSON.parse(r);Je(i,t)||console.warn("The meeting session data provided will be modified when serialized.",i,t)}else if(n===za){for(var o in t)if(Object.hasOwnProperty.call(t,o)&&t[o]!==void 0){var a=JSON.parse(JSON.stringify(t[o]));Je(t[o],a)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",a,t[o])}}}catch(s){throw Error("Meeting session data must be serializable to JSON: ".concat(s))}if(r.length>vd)throw Error("Meeting session data is too large (".concat(r.length," characters). Maximum size suppported is ").concat(vd,"."))}}])})();function Rd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Rd=function(){return!!e})()}function Wa(e){var t=typeof Map=="function"?new Map:void 0;return Wa=function(n){if(n===null||!(function(i){try{return Function.toString.call(i).indexOf("[native code]")!==-1}catch{return typeof i=="function"}})(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,r)}function r(){return(function(i,o,a){if(Rd())return Reflect.construct.apply(null,arguments);var s=[null];s.push.apply(s,o);var c=new(i.bind.apply(i,s));return a&&pr(c,a.prototype),c})(n,arguments,vt(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),pr(r,n)},Wa(e)}function Vd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Vd=function(){return!!e})()}function Nd(e){var t,n=(t=window._daily)===null||t===void 0?void 0:t.pendings;if(n){var r=n.indexOf(e);r!==-1&&n.splice(r,1)}}var Fb=(function(){return nt((function e(t){tt(this,e),this._currentLoad=null,this._callClientId=t}),[{key:"load",value:function(){var e,t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new Bb(n,(function(){r(!1)}),(function(o,a){a||Nd(t._callClientId),i(o,a)})),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),Nd(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])})(),Bb=(function(){return nt((function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;tt(this,e),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r}),[{key:"start",value:function(){var e=this;if(!this._currentAttempt){var t=function(n){e._currentAttempt.cancelled||(e._attemptsRemaining--,e._failureCallback(n,e._attemptsRemaining>0),e._attemptsRemaining<=0||setTimeout((function(){e._currentAttempt.cancelled||(e._currentAttempt=new Fd(e._dailyConfig,e._successCallback,t),e._currentAttempt.start())}),3e3))};this._currentAttempt=new Fd(this._dailyConfig,this._successCallback,t),this._currentAttempt.start()}}},{key:"cancel",value:function(){this._currentAttempt&&this._currentAttempt.cancel()}},{key:"cancelled",get:function(){return this._currentAttempt&&this._currentAttempt.cancelled}},{key:"succeeded",get:function(){return this._currentAttempt&&this._currentAttempt.succeeded}}])})(),Ja=(function(){function e(){return tt(this,e),t=this,r=arguments,n=vt(n=e),ci(t,Vd()?Reflect.construct(n,r||[],vt(t).constructor):n.apply(t,r));var t,n,r}return li(e,Wa(Error)),nt(e)})(),Ni=2e4,Fd=(function(){return nt((function t(n,r,i){tt(this,t),this._loadAttemptImpl=le()||!n.avoidEval?new $b(n,r,i):new Ub(n,r,i)}),[{key:"start",value:(e=Q((function*(){return this._loadAttemptImpl.start()})),function(){return e.apply(this,arguments)})},{key:"cancel",value:function(){this._loadAttemptImpl.cancel()}},{key:"cancelled",get:function(){return this._loadAttemptImpl.cancelled}},{key:"succeeded",get:function(){return this._loadAttemptImpl.succeeded}}]);var e})(),$b=(function(){return nt((function i(o,a,s){tt(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=o,this._successCallback=a,this._failureCallback=s}),[{key:"start",value:(r=Q((function*(){var i=hi(this._dailyConfig);!(yield this._tryLoadFromIOSCache(i))&&this._loadFromNetwork(i)})),function(){return r.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(n=Q((function*(i){if(!this._iosCache)return!1;try{var o=yield this._iosCache.get(i);return!!this.cancelled||!!o&&(o.code?(Function('"use strict";'+o.code)(),this.succeeded=!0,this._successCallback(),!0):(this._refetchHeaders=o.refetchHeaders,!1))}catch{return!1}})),function(i){return n.apply(this,arguments)})},{key:"_loadFromNetwork",value:(t=Q((function*(i){var o=this;this._networkTimeout=setTimeout((function(){o._networkTimedOut=!0,o._failureCallback({msg:"Timed out (>".concat(Ni," ms) when loading call object bundle ").concat(i),type:"timeout"})}),Ni);try{var a=this._refetchHeaders?{headers:this._refetchHeaders}:{},s=yield fetch(i,a);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new Ja;var c=yield this._getBundleCodeFromResponse(i,s);if(this.cancelled)throw new Ja;Function('"use strict";'+c)(),this._iosCache&&this._iosCache.set(i,c,s.headers),this.succeeded=!0,this._successCallback()}catch(l){if(clearTimeout(this._networkTimeout),l instanceof Ja||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(i,": ").concat(l),type:l.message})}})),function(i){return t.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(e=Q((function*(i,o){if(o.ok)return yield o.text();if(this._iosCache&&o.status===304)return(yield this._iosCache.renew(i,o.headers)).code;throw new Error("Received ".concat(o.status," response"))})),function(i,o){return e.apply(this,arguments)})}]);var e,t,n,r})(),Ub=(function(){return nt((function e(t,n,r){tt(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r,this._attemptId=fi(),this._networkTimeout=null,this._scriptElement=null}),[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=hi(this._dailyConfig);(typeof document>"u"?"undefined":he(document))==="object"?this._startLoading(e):this._failureCallback({msg:"Call object bundle must be loaded in a DOM/web context",type:"missing context"})}},{key:"cancel",value:function(){this._stopLoading(),this.cancelled=!0}},{key:"_startLoading",value:function(e){var t=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout((function(){t._stopLoading(),t._failureCallback({msg:"Timed out (>".concat(Ni," ms) when loading call object bundle ").concat(e),type:"timeout"})}),Ni);var n=document.getElementsByTagName("head")[0],r=document.createElement("script");this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback()},r.onerror=function(i){t._stopLoading(),t._failureCallback({msg:"Failed to load call object bundle ".concat(i.target.src),type:i.message})},r.src=e,n.appendChild(r)}},{key:"_stopLoading",value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:"_signUpForCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:"_withdrawFromCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}])})(),Fi=function(e,t,n){return Wb(e.local,t,n)===!0},zb=function(e,t,n){return e.local.streams&&e.local.streams[t]&&e.local.streams[t].stream&&e.local.streams[t].stream["get".concat(n==="video"?"Video":"Audio","Tracks")]()[0]},Un=function(e,t,n,r){var i=Jb(e,t,n,r);return i&&i.pendingTrack},Wb=function(e,t,n){if(!e)return!1;var r=function(o){switch(o){case"avatar":return!0;case"staged":return o;default:return!!o}},i=e.public.subscribedTracks;return i&&i[t]?["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo"].indexOf(n)===-1&&i[t].custom?[!0,"staged"].includes(i[t].custom)?r(i[t].custom):r(i[t].custom[n]):r(i[t][n]):!i||r(i.ALL)},Jb=function(e,t,n,r){var i=Object.values(e.streams||{}).filter((function(o){return o.participantId===t&&o.type===n&&o.pendingTrack&&o.pendingTrack.kind===r})).sort((function(o,a){return new Date(a.starttime)-new Date(o.starttime)}));return i&&i[0]},Hb=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function Bd(e,t){for(var n=t.getState(),r=0,i=["cam","screen"];r<i.length;r++)for(var o=i[r],a=0,s=["video","audio"];a<s.length;a++){var c=s[a],l=o==="cam"?c:"screen".concat(c.charAt(0).toUpperCase()+c.slice(1)),d=e.tracks[l];if(d){var f=e.local?zb(n,o,c):Un(n,e.session_id,o,c);d.state==="playable"&&(d.track=f),d.persistentTrack=f}}}function $d(e,t){try{var n=t.getState();for(var r in e.tracks)if(!qb(r)){var i=e.tracks[r].kind;if(i){var o=e.tracks[r];if(o){var a=e.local?Hb(n,r):Un(n,e.session_id,r,i);o.state==="playable"&&(e.tracks[r].track=a),o.persistentTrack=a}}else console.error("unknown type for custom track")}}catch(s){console.error(s)}}function qb(e){return["video","audio","screenVideo","screenAudio"].includes(e)}function Ud(e,t,n){var r=n.getState();if(e.local){if(e.audio)try{e.audioTrack=r.local.streams.cam.stream.getAudioTracks()[0],e.audioTrack||(e.audio=!1)}catch{}if(e.video)try{e.videoTrack=r.local.streams.cam.stream.getVideoTracks()[0],e.videoTrack||(e.video=!1)}catch{}if(e.screen)try{e.screenVideoTrack=r.local.streams.screen.stream.getVideoTracks()[0],e.screenAudioTrack=r.local.streams.screen.stream.getAudioTracks()[0],e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch{}}else{var i=!0;try{var o=r.participants[e.session_id];o&&o.public&&o.public.rtcType&&o.public.rtcType.impl==="peer-to-peer"&&o.private&&!["connected","completed"].includes(o.private.peeringState)&&(i=!1)}catch(d){console.error(d)}if(!i)return e.audio=!1,e.audioTrack=!1,e.video=!1,e.videoTrack=!1,e.screen=!1,void(e.screenTrack=!1);try{if(r.streams,e.audio&&Fi(r,e.session_id,"cam-audio")){var a=Un(r,e.session_id,"cam","audio");a&&(t&&t.audioTrack&&t.audioTrack.id===a.id?e.audioTrack=a:a.muted||(e.audioTrack=a)),e.audioTrack||(e.audio=!1)}if(e.video&&Fi(r,e.session_id,"cam-video")){var s=Un(r,e.session_id,"cam","video");s&&(t&&t.videoTrack&&t.videoTrack.id===s.id?e.videoTrack=s:s.muted||(e.videoTrack=s)),e.videoTrack||(e.video=!1)}if(e.screen&&Fi(r,e.session_id,"screen-audio")){var c=Un(r,e.session_id,"screen","audio");c&&(t&&t.screenAudioTrack&&t.screenAudioTrack.id===c.id?e.screenAudioTrack=c:c.muted||(e.screenAudioTrack=c))}if(e.screen&&Fi(r,e.session_id,"screen-video")){var l=Un(r,e.session_id,"screen","video");l&&(t&&t.screenVideoTrack&&t.screenVideoTrack.id===l.id?e.screenVideoTrack=l:l.muted||(e.screenVideoTrack=l))}e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch(d){console.error("unexpected error matching up tracks",d)}}}function Gb(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(function(c,l){if(c){if(typeof c=="string")return zd(c,l);var d={}.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?zd(c,l):void 0}})(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
18
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function zd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Mt=new Map,zn=null;function Kb(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(function(c,l){if(c){if(typeof c=="string")return Wd(c,l);var d={}.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?Wd(c,l):void 0}})(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
19
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function Wd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ct=new Map,wr=null;function Yb(e){Jd()?(function(t){Mt.has(t)||(Mt.set(t,{}),navigator.mediaDevices.enumerateDevices().then((function(n){Mt.has(t)&&(Mt.get(t).lastDevicesString=JSON.stringify(n),zn||(zn=(function(){var r=Q((function*(){var i,o=yield navigator.mediaDevices.enumerateDevices(),a=Gb(Mt.keys());try{for(a.s();!(i=a.n()).done;){var s=i.value,c=JSON.stringify(o);c!==Mt.get(s).lastDevicesString&&(Mt.get(s).lastDevicesString=c,s(o))}}catch(l){a.e(l)}finally{a.f()}}));return function(){return r.apply(this,arguments)}})(),navigator.mediaDevices.addEventListener("devicechange",zn)))})).catch((function(){})))})(e):(function(t){Ct.has(t)||(Ct.set(t,{}),navigator.mediaDevices.enumerateDevices().then((function(n){Ct.has(t)&&(Ct.get(t).lastDevicesString=JSON.stringify(n),wr||(wr=setInterval(Q((function*(){var r,i=yield navigator.mediaDevices.enumerateDevices(),o=Kb(Ct.keys());try{for(o.s();!(r=o.n()).done;){var a=r.value,s=JSON.stringify(i);s!==Ct.get(a).lastDevicesString&&(Ct.get(a).lastDevicesString=s,a(i))}}catch(c){o.e(c)}finally{o.f()}})),3e3)))})))})(e)}function Xb(e){Jd()?(function(t){Mt.has(t)&&(Mt.delete(t),Mt.size===0&&zn&&(navigator.mediaDevices.removeEventListener("devicechange",zn),zn=null))})(e):(function(t){Ct.has(t)&&(Ct.delete(t),Ct.size===0&&wr&&(clearInterval(wr),wr=null))})(e)}function Jd(){var e;return le()||((e=navigator.mediaDevices)===null||e===void 0?void 0:e.ondevicechange)!==void 0}var Qb=new Set;function Zb(e,t){return e&&e.readyState==="live"&&!(function(n,r){return n.muted&&!Qb.has(n.id)})(e)}function Hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function Kt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hd(Object(n),!0).forEach((function(r){Tt(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hd(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var kr=Object.freeze({VIDEO:"video",AUDIO:"audio",SCREEN_VIDEO:"screenVideo",SCREEN_AUDIO:"screenAudio",CUSTOM_VIDEO:"customVideo",CUSTOM_AUDIO:"customAudio"}),e0=Object.freeze({PARTICIPANTS:"participants",STREAMING:"streaming",TRANSCRIPTION:"transcription"}),Sr=Object.values(kr),qd=["v","a","sv","sa","cv","ca"];Object.freeze(Sr.reduce((function(e,t,n){return e[t]=qd[n],e}),{})),Object.freeze(qd.reduce((function(e,t,n){return e[t]=Sr[n],e}),{}));var t0=[kr.VIDEO,kr.AUDIO,kr.SCREEN_VIDEO,kr.SCREEN_AUDIO],Gd=Object.values(e0),Kd=["p","s","t"];Object.freeze(Gd.reduce((function(e,t,n){return e[t]=Kd[n],e}),{})),Object.freeze(Kd.reduce((function(e,t,n){return e[t]=Gd[n],e}),{}));var Yd=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.base,r=t.byUserId,i=t.byParticipantId;tt(this,e),this.base=n,this.byUserId=r,this.byParticipantId=i}return nt(e,[{key:"clone",value:function(){var t=new e;if(this.base instanceof je?t.base=this.base.clone():t.base=this.base,this.byUserId!==void 0)for(var n in t.byUserId={},this.byUserId){var r=this.byUserId[n];t.byUserId[n]=r instanceof je?r.clone():r}if(this.byParticipantId!==void 0)for(var i in t.byParticipantId={},this.byParticipantId){var o=this.byParticipantId[i];t.byParticipantId[i]=o instanceof je?o.clone():o}return t}},{key:"toJSONObject",value:function(){var t={};if(typeof this.base=="boolean"?t.base=this.base:this.base instanceof je&&(t.base=this.base.toJSONObject()),this.byUserId!==void 0)for(var n in t.byUserId={},this.byUserId){var r=this.byUserId[n];t.byUserId[n]=r instanceof je?r.toJSONObject():r}if(this.byParticipantId!==void 0)for(var i in t.byParticipantId={},this.byParticipantId){var o=this.byParticipantId[i];t.byParticipantId[i]=o instanceof je?o.toJSONObject():o}return t}},{key:"toMinifiedJSONObject",value:function(){var t={};if(this.base!==void 0&&(typeof this.base=="boolean"?t.b=this.base:t.b=this.base.toMinifiedJSONObject()),this.byUserId!==void 0)for(var n in t.u={},this.byUserId){var r=this.byUserId[n];t.u[n]=typeof r=="boolean"?r:r.toMinifiedJSONObject()}if(this.byParticipantId!==void 0)for(var i in t.p={},this.byParticipantId){var o=this.byParticipantId[i];t.p[i]=typeof o=="boolean"?o:o.toMinifiedJSONObject()}return t}},{key:"normalize",value:function(){return this.base instanceof je&&(this.base=this.base.normalize()),this.byUserId&&(this.byUserId=Object.fromEntries(Object.entries(this.byUserId).map((function(t){var n=Fe(t,2),r=n[0],i=n[1];return[r,i instanceof je?i.normalize():i]})))),this.byParticipantId&&(this.byParticipantId=Object.fromEntries(Object.entries(this.byParticipantId).map((function(t){var n=Fe(t,2),r=n[0],i=n[1];return[r,i instanceof je?i.normalize():i]})))),this}}],[{key:"fromJSONObject",value:function(t){var n,r,i;if(t.base!==void 0&&(n=typeof t.base=="boolean"?t.base:je.fromJSONObject(t.base)),t.byUserId!==void 0)for(var o in r={},t.byUserId){var a=t.byUserId[o];r[o]=typeof a=="boolean"?a:je.fromJSONObject(a)}if(t.byParticipantId!==void 0)for(var s in i={},t.byParticipantId){var c=t.byParticipantId[s];i[s]=typeof c=="boolean"?c:je.fromJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:"fromMinifiedJSONObject",value:function(t){var n,r,i;if(t.b!==void 0&&(n=typeof t.b=="boolean"?t.b:je.fromMinifiedJSONObject(t.b)),t.u!==void 0)for(var o in r={},t.u){var a=t.u[o];r[o]=typeof a=="boolean"?a:je.fromMinifiedJSONObject(a)}if(t.p!==void 0)for(var s in i={},t.p){var c=t.p[s];i[s]=typeof c=="boolean"?c:je.fromMinifiedJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:"validateJSONObject",value:function(t){if(he(t)!=="object")return[!1,"canReceive must be an object"];for(var n=["base","byUserId","byParticipantId"],r=0,i=Object.keys(t);r<i.length;r++){var o=i[r];if(!n.includes(o))return[!1,"canReceive can only contain keys (".concat(n.join(", "),")")];if(o==="base"){var a=Fe(je.validateJSONObject(t.base,!0),2),s=a[0],c=a[1];if(!s)return[!1,c]}else{if(he(t[o])!=="object")return[!1,"invalid (non-object) value for field '".concat(o,"' in canReceive")];for(var l=0,d=Object.values(t[o]);l<d.length;l++){var f=d[l],p=Fe(je.validateJSONObject(f),2),g=p[0],y=p[1];if(!g)return[!1,y]}}}return[!0]}}])})(),je=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.video,r=t.audio,i=t.screenVideo,o=t.screenAudio,a=t.customVideo,s=t.customAudio;tt(this,e),this.video=n,this.audio=r,this.screenVideo=i,this.screenAudio=o,this.customVideo=a,this.customAudio=s}return nt(e,[{key:"clone",value:function(){var t=new e;return this.video!==void 0&&(t.video=this.video),this.audio!==void 0&&(t.audio=this.audio),this.screenVideo!==void 0&&(t.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(t.screenAudio=this.screenAudio),this.customVideo!==void 0&&(t.customVideo=Kt({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=Kt({},this.customAudio)),t}},{key:"toJSONObject",value:function(){var t={};return this.video!==void 0&&(t.video=this.video),this.audio!==void 0&&(t.audio=this.audio),this.screenVideo!==void 0&&(t.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(t.screenAudio=this.screenAudio),this.customVideo!==void 0&&(t.customVideo=Kt({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=Kt({},this.customAudio)),t}},{key:"toMinifiedJSONObject",value:function(){var t={};return this.video!==void 0&&(t.v=this.video),this.audio!==void 0&&(t.a=this.audio),this.screenVideo!==void 0&&(t.sv=this.screenVideo),this.screenAudio!==void 0&&(t.sa=this.screenAudio),this.customVideo!==void 0&&(t.cv=Kt({},this.customVideo)),this.customAudio!==void 0&&(t.ca=Kt({},this.customAudio)),t}},{key:"normalize",value:function(){function t(n,r){return n&&Object.keys(n).length===1&&n["*"]===r}return!(this.video!==!0||this.audio!==!0||this.screenVideo!==!0||this.screenAudio!==!0||!t(this.customVideo,!0)||!t(this.customAudio,!0))||(this.video!==!1||this.audio!==!1||this.screenVideo!==!1||this.screenAudio!==!1||!t(this.customVideo,!1)||!t(this.customAudio,!1))&&this}}],[{key:"fromBoolean",value:function(t){return new e({video:t,audio:t,screenVideo:t,screenAudio:t,customVideo:{"*":t},customAudio:{"*":t}})}},{key:"fromJSONObject",value:function(t){return new e({video:t.video,audio:t.audio,screenVideo:t.screenVideo,screenAudio:t.screenAudio,customVideo:t.customVideo!==void 0?Kt({},t.customVideo):void 0,customAudio:t.customAudio!==void 0?Kt({},t.customAudio):void 0})}},{key:"fromMinifiedJSONObject",value:function(t){return new e({video:t.v,audio:t.a,screenVideo:t.sv,screenAudio:t.sa,customVideo:t.cv,customAudio:t.ca})}},{key:"validateJSONObject",value:function(t,n){if(typeof t=="boolean")return[!0];if(he(t)!=="object")return[!1,"invalid (non-object, non-boolean) value in canReceive"];for(var r=Object.keys(t),i=0,o=r;i<o.length;i++){var a=o[i];if(!Sr.includes(a))return[!1,"invalid media type '".concat(a,"' in canReceive")];if(t0.includes(a)){if(typeof t[a]!="boolean")return[!1,"invalid (non-boolean) value for media type '".concat(a,"' in canReceive")]}else{if(he(t[a])!=="object")return[!1,"invalid (non-object) value for media type '".concat(a,"' in canReceive")];for(var s=0,c=Object.values(t[a]);s<c.length;s++)if(typeof c[s]!="boolean")return[!1,"invalid (non-boolean) value for entry within '".concat(a,"' in canReceive")];if(n&&t[a]["*"]===void 0)return[!1,`canReceive "base" permission must specify "*" as an entry within '`.concat(a,"'")]}}return n&&r.length!==Sr.length?[!1,'canReceive "base" permission must specify all media types: '.concat(Sr.join(", ")," (or be set to a boolean shorthand)")]:[!0]}}])})(),n0=["result"],r0=["preserveIframe"];function Xd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xd(Object(n),!0).forEach((function(r){Tt(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xd(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Qd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Qd=function(){return!!e})()}function Zd(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(function(c,l){if(c){if(typeof c=="string")return ef(c,l);var d={}.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?ef(c,l):void 0}})(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
20
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function ef(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var vn={},tf="video",i0="voice",nf=le()?{data:{}}:{data:{},topology:"none"},rf={present:0,hidden:0},of={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},Ha=Object.keys(of),af=["state","volume","simulcastEncodings"],sf={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},Bi={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string",visualState:"'default' | 'sidebar-open' | 'active'"}},qa={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"}},yn={customIntegrations:{validate:vf,help:mf()},customTrayButtons:{validate:gf,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(Bi))},url:{validate:function(e){return typeof e=="string"},help:"url should be a string"},baseUrl:{validate:function(e){return typeof e=="string"},help:"baseUrl should be a string"},token:{validate:function(e){return typeof e=="string"},help:"token should be a string",queryString:"t"},dailyConfig:{validate:function(e,t){try{return t.validateDailyConfig(e),!0}catch(n){console.error("Failed to validate dailyConfig",n)}return!1},help:"Unsupported dailyConfig. Check error logs for detailed info."},reactNativeConfig:{validate:function(e){return yf(e,sf)},help:"reactNativeConfig should look like ".concat(JSON.stringify(sf),", all fields optional")},lang:{validate:function(e){return["da","de","en-us","en","es","fi","fr","it","jp","ka","nl","no","pl","pt","pt-BR","ru","sv","tr","user"].includes(e)},help:"language not supported. Options are: da, de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sv, tr, user"},userName:!0,userData:{validate:function(e){try{return lf(e),!0}catch(t){return console.error(t),!1}},help:"invalid userData type provided"},startVideoOff:!0,startAudioOff:!0,allowLocalVideo:!0,allowLocalAudio:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(e,t){if(typeof e=="boolean")return t._preloadCache.allowLocalVideo=e,!0;var n;if(e instanceof MediaStreamTrack)t._sharedTracks.videoTrack=e,n={customTrack:Nt};else{if(delete t._sharedTracks.videoTrack,typeof e!="string")return console.error("videoSource must be a MediaStreamTrack, boolean, or a string"),!1;n={deviceId:e}}return t._updatePreloadCacheInputSettings({video:{settings:n}},!1),!0}},audioSource:{validate:function(e,t){if(typeof e=="boolean")return t._preloadCache.allowLocalAudio=e,!0;var n;if(e instanceof MediaStreamTrack)t._sharedTracks.audioTrack=e,n={customTrack:Nt};else{if(delete t._sharedTracks.audioTrack,typeof e!="string")return console.error("audioSource must be a MediaStreamTrack, boolean, or a string"),!1;n={deviceId:e}}return t._updatePreloadCacheInputSettings({audio:{settings:n}},!1),!0}},subscribeToTracksAutomatically:{validate:function(e,t){return t._preloadCache.subscribeToTracksAutomatically=e,!0}},theme:{validate:function(e){var t=["accent","accentText","background","backgroundAccent","baseText","border","mainAreaBg","mainAreaBgAccent","mainAreaText","supportiveText"],n=function(r){for(var i=0,o=Object.keys(r);i<o.length;i++){var a=o[i];if(!t.includes(a))return console.error('unsupported color "'.concat(a,'". Valid colors: ').concat(t.join(", "))),!1;if(!r[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(r[a],'"')),!1}return!0};return he(e)==="object"&&("light"in e&&"dark"in e||"colors"in e)?"light"in e&&"dark"in e?"colors"in e.light?"colors"in e.dark?n(e.light.colors)&&n(e.dark.colors):(console.error('Dark theme is missing "colors" property.',e),!1):(console.error('Light theme is missing "colors" property.',e),!1):n(e.colors):(console.error('Theme must contain either both "light" and "dark" properties, or "colors".',e),!1)},help:"unsupported theme configuration. Check error logs for detailed info."},layoutConfig:{validate:function(e){if("grid"in e){var t=e.grid;if("maxTilesPerPage"in t){if(!Number.isInteger(t.maxTilesPerPage))return console.error("grid.maxTilesPerPage should be an integer. You passed ".concat(t.maxTilesPerPage,".")),!1;if(t.maxTilesPerPage>49)return console.error("grid.maxTilesPerPage can't be larger than 49 without sacrificing browser performance. Please contact us at https://www.daily.co/contact to talk about your use case."),!1}if("minTilesPerPage"in t){if(!Number.isInteger(t.minTilesPerPage))return console.error("grid.minTilesPerPage should be an integer. You passed ".concat(t.minTilesPerPage,".")),!1;if(t.minTilesPerPage<1)return console.error("grid.minTilesPerPage can't be lower than 1."),!1;if("maxTilesPerPage"in t&&t.minTilesPerPage>t.maxTilesPerPage)return console.error("grid.minTilesPerPage can't be higher than grid.maxTilesPerPage."),!1}}return!0},help:"unsupported layoutConfig. Check error logs for detailed info."},receiveSettings:{validate:function(e){return uf(e,{allowAllParticipantsKey:!1})},help:pf({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!(function(n,r){try{return r.validateUpdateSendSettings(n),!0}catch(i){return console.error("Failed to validate send settings",i),!1}})(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(e,t){var n;return!!df(e)&&(t._inputSettings||(t._inputSettings={}),ff(e,(n=t.properties)===null||n===void 0?void 0:n.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:Ya()},layout:{validate:function(e){return e==="custom-v1"||e==="browser"||e==="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},$i={styles:{validate:function(e){for(var t in e)if(t!=="cam"&&t!=="screen")return!1;if(e.cam){for(var n in e.cam)if(n!=="div"&&n!=="video")return!1}if(e.screen){for(var r in e.screen)if(r!=="div"&&r!=="video")return!1}return!0},help:"styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }"},setSubscribedTracks:{validate:function(e,t){if(t._preloadCache.subscribeToTracksAutomatically)return!1;var n=[!0,!1,"staged"];if(n.includes(e)||!le()&&e==="avatar")return!0;var r=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"],i=function(o){var a=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var s in o)if(s==="custom"){if(!n.includes(o[s])&&!i(o[s],!0))return!1}else{var c=!a&&!r.includes(s),l=!n.includes(o[s]);if(c||l)return!1}return!0};return i(e)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(le()?"":" | 'avatar'"," | false | 'staged' | { [audio: true|false|'staged'], [video: true|false|'staged'], [screenAudio: true|false|'staged'], [screenVideo: true|false|'staged'] }")},setAudio:!0,setVideo:!0,setScreenShare:{validate:function(e){return e===!1},help:"setScreenShare must be false, as it's only meant for stopping remote participants' screen shares"},eject:!0,updatePermissions:{validate:function(e){for(var t=0,n=Object.entries(e);t<n.length;t++){var r=Fe(n[t],2),i=r[0],o=r[1];switch(i){case"hasPresence":if(typeof o!="boolean")return!1;break;case"canSend":if(o instanceof Set||o instanceof Array||Array.isArray(o)){var a,s=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],c=Zd(o);try{for(c.s();!(a=c.n()).done;){var l=a.value;if(!s.includes(l))return!1}}catch(_){c.e(_)}finally{c.f()}}else if(typeof o!="boolean")return!1;(o instanceof Array||Array.isArray(o))&&(e.canSend=new Set(o));break;case"canReceive":var d=Fe(Yd.validateJSONObject(o),2),f=d[0],p=d[1];if(!f)return console.error(p),!1;break;case"canAdmin":if(o instanceof Set||o instanceof Array||Array.isArray(o)){var g,y=["participants","streaming","transcription"],v=Zd(o);try{for(v.s();!(g=v.n()).done;){var b=g.value;if(!y.includes(b))return!1}}catch(_){v.e(_)}finally{v.f()}}else if(typeof o!="boolean")return!1;(o instanceof Array||Array.isArray(o))&&(e.canAdmin=new Set(o));break;default:return!1}}return!0},help:"updatePermissions can take hasPresence, canSend, canReceive, and canAdmin permissions. hasPresence must be a boolean. canSend can be a boolean or an Array or Set of media types (video, audio, screenVideo, screenAudio, customVideo, customAudio). canReceive must be an object specifying base, byUserId, and/or byParticipantId fields (see documentation for more details). canAdmin can be a boolean or an Array or Set of admin types (participants, streaming, transcription)."}};Promise.any||(Promise.any=(function(){var e=Q((function*(t){return new Promise((function(n,r){var i=[];t.forEach((function(o){return Promise.resolve(o).then((function(a){n(a)})).catch((function(a){i.push(a),i.length===t.length&&r(i)}))}))}))}));return function(t){return e.apply(this,arguments)}})());var xr=(function(){function e(u){var m,h,w,S,P,D,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(tt(this,e),w=this,S=vt(S=e),Tt(h=ci(w,Qd()?Reflect.construct(S,[],vt(w).constructor):S.apply(w,P)),"startListeningForDeviceChanges",(function(){Yb(h.handleDeviceChange)})),Tt(h,"stopListeningForDeviceChanges",(function(){Xb(h.handleDeviceChange)})),Tt(h,"handleDeviceChange",(function(U){U=U.map((function(re){return JSON.parse(JSON.stringify(re))})),h.emitDailyJSEvent({action:"available-devices-updated",availableDevices:U})})),Tt(h,"handleNativeAppStateChange",(function(){var U=Q((function*(re){if(re==="destroyed")return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield h.destroy());var mt=re==="active";h.disableReactNativeAutoDeviceManagement("video")||(mt?h.camUnmutedBeforeLosingNativeActiveState&&h.setLocalVideo(!0):(h.camUnmutedBeforeLosingNativeActiveState=h.localVideo(),h.camUnmutedBeforeLosingNativeActiveState&&h.setLocalVideo(!1)))}));return function(re){return U.apply(this,arguments)}})()),Tt(h,"handleNativeAudioFocusChange",(function(U){h.disableReactNativeAutoDeviceManagement("audio")||(h._hasNativeAudioFocus=U,h.toggleParticipantAudioBasedOnNativeAudioFocus(),h._hasNativeAudioFocus?h.micUnmutedBeforeLosingNativeAudioFocus&&h.setLocalAudio(!0):(h.micUnmutedBeforeLosingNativeAudioFocus=h.localAudio(),h.setLocalAudio(!1)))})),Tt(h,"handleNativeSystemScreenCaptureStop",(function(){h.stopScreenShare()})),!Va()&&!le())throw new Error("WebRTC not supported or suppressed");if(h.strictMode=L.strictMode===void 0||L.strictMode,h.allowMultipleCallInstances=(m=L.allowMultipleCallInstances)!==null&&m!==void 0&&m,Object.keys(vn).length&&(h._logDuplicateInstanceAttempt(),!h.allowMultipleCallInstances)){if(h.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:{}}),h.callClientId=fi(),vn[(D=h).callClientId]=D,window._daily.instances[h.callClientId]={},h._sharedTracks={},window._daily.instances[h.callClientId].tracks=h._sharedTracks,L.dailyJsVersion=e.version(),h._iframe=u,h._callObjectMode=L.layout==="none"&&!h._iframe,h._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},L.showLocalVideo!==void 0?h._callObjectMode?console.error("showLocalVideo is not available in call object mode"):h._showLocalVideo=!!L.showLocalVideo:h._showLocalVideo=!0,L.showParticipantsBar!==void 0?h._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):h._showParticipantsBar=!!L.showParticipantsBar:h._showParticipantsBar=!0,L.customIntegrations!==void 0?h._callObjectMode?console.error("customIntegrations is not available in call object mode"):h._customIntegrations=L.customIntegrations:h._customIntegrations={},L.customTrayButtons!==void 0?h._callObjectMode?console.error("customTrayButtons is not available in call object mode"):h._customTrayButtons=L.customTrayButtons:h._customTrayButtons={},L.activeSpeakerMode!==void 0?h._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):h._activeSpeakerMode=!!L.activeSpeakerMode:h._activeSpeakerMode=!1,L.receiveSettings?h._callObjectMode?h._receiveSettings=L.receiveSettings:console.error("receiveSettings is only available in call object mode"):h._receiveSettings={},h.validateProperties(L),h.properties=W({},L),h._inputSettings||(h._inputSettings={}),h._callObjectLoader=h._callObjectMode?new Fb(h.callClientId):null,h._callState=sd,h._isPreparingToJoin=!1,h._accessState={access:Oa},h._meetingSessionSummary={},h._finalSummaryOfPrevSession={},h._meetingSessionState=Xa(nf,h._callObjectMode),h._nativeInCallAudioMode=tf,h._participants={},h._isScreenSharing=!1,h._participantCounts=rf,h._rmpPlayerState={},h._waitingParticipants={},h._network={threshold:"good",quality:100,networkState:"unknown",stats:{}},h._activeSpeaker={},h._localAudioLevel=0,h._isLocalAudioLevelObserverRunning=!1,h._remoteParticipantsAudioLevel={},h._isRemoteParticipantsAudioLevelObserverRunning=!1,h._maxAppMessageSize=Ia,h._messageChannel=le()?new Vb:new Rb,h._iframe&&(h._iframe.requestFullscreen?h._iframe.addEventListener("fullscreenchange",(function(){document.fullscreenElement===h._iframe?(h.emitDailyJSEvent({action:Di}),h.sendMessageToCallMachine({action:Di})):(h.emitDailyJSEvent({action:Li}),h.sendMessageToCallMachine({action:Li}))})):h._iframe.webkitRequestFullscreen&&h._iframe.addEventListener("webkitfullscreenchange",(function(){document.webkitFullscreenElement===h._iframe?(h.emitDailyJSEvent({action:Di}),h.sendMessageToCallMachine({action:Di})):(h.emitDailyJSEvent({action:Li}),h.sendMessageToCallMachine({action:Li}))}))),le()){var $=h.nativeUtils();$.addAudioFocusChangeListener&&$.removeAudioFocusChangeListener&&$.addAppStateChangeListener&&$.removeAppStateChangeListener&&$.addSystemScreenCaptureStopListener&&$.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),h._hasNativeAudioFocus=!0,$.addAudioFocusChangeListener(h.handleNativeAudioFocusChange),$.addAppStateChangeListener(h.handleNativeAppStateChange),$.addSystemScreenCaptureStopListener(h.handleNativeSystemScreenCaptureStop)}return h._callObjectMode&&h.startListeningForDeviceChanges(),h._messageChannel.addListenerForMessagesFromCallMachine(h.handleMessageFromCallMachine,h.callClientId,h),h}return li(e,di),nt(e,[{key:"destroy",value:(at=Q((function*(){var u;try{yield this.leave()}catch{}var m=this._iframe;if(m){var h=m.parentElement;h&&h.removeChild(m)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),le()){var w=this.nativeUtils();w.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),w.removeAppStateChangeListener(this.handleNativeAppStateChange),w.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete vn[this.callClientId],!((u=window)===null||u===void 0||(u=u._daily)===null||u===void 0)&&u.instances&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)})),function(){return at.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(u){var m=u.bodyClass,h=u.cssFile,w=u.cssText;return ue(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(h),bodyClass:m,cssText:w}),this}},{key:"iframe",value:function(){return ue(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return _t(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return _t(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(u,m){for(var h in m){if(!$i[h])throw new Error("unrecognized updateParticipant property ".concat(h));if($i[h].validate&&!$i[h].validate(m[h],this,this._participants[u]))throw new Error($i[h].help)}}},{key:"updateParticipant",value:function(u,m){return this._participants.local&&this._participants.local.session_id===u&&(u="local"),u&&m&&(this.validateParticipantProperties(u,m),this.sendMessageToCallMachine({action:"update-participant",id:u,properties:m})),this}},{key:"updateParticipants",value:function(u){var m=this._participants.local&&this._participants.local.session_id;for(var h in u)h===m&&(h="local"),h&&u[h]&&this.validateParticipantProperties(h,u[h]);return this.sendMessageToCallMachine({action:"update-participants",participants:u}),this}},{key:"updateWaitingParticipant",value:(We=Q((function*(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(_t(this._callObjectMode,"updateWaitingParticipant()"),ye(this._callState,"updateWaitingParticipant()"),typeof m!="string"||he(h)!=="object")throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise((function(w,S){u.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:m,updates:h},(function(P){P.error&&S(P.error),P.id||S(new Error("unknown error in updateWaitingParticipant()")),w({id:P.id})}))}))})),function(){return We.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(z=Q((function*(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(_t(this._callObjectMode,"updateWaitingParticipants()"),ye(this._callState,"updateWaitingParticipants()"),he(m)!=="object")throw new Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise((function(h,w){u.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updatesById:m},(function(S){S.error&&w(S.error),S.ids||w(new Error("unknown error in updateWaitingParticipants()")),h({ids:S.ids})}))}))})),function(){return z.apply(this,arguments)})},{key:"requestAccess",value:(J=Q((function*(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=m.access,w=h===void 0?{level:Oy}:h,S=m.name,P=S===void 0?"":S;return _t(this._callObjectMode,"requestAccess()"),ye(this._callState,"requestAccess()"),new Promise((function(D,L){u.sendMessageToCallMachine({action:"daily-method-request-access",access:w,name:P},(function($){$.error&&L($.error),$.access||L(new Error("unknown error in requestAccess()")),D({access:$.access,granted:$.granted})}))}))})),function(){return J.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(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return"forceDiscardTrack"in m&&(le()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),m={}):u&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),m={})),this.sendMessageToCallMachine({action:"local-audio",state:u,options:m}),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(u){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:u}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(u){return this.sendMessageToCallMachine({action:"local-video",state:u}),this}},{key:"_setAllowLocalAudio",value:function(u){if(this._preloadCache.allowLocalAudio=u,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-audio",state:u}),this}},{key:"_setAllowLocalVideo",value:function(u){if(this._preloadCache.allowLocalVideo=u,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-video",state:u}),this}},{key:"getReceiveSettings",value:(N=Q((function*(u){var m=this,h=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,w=h!==void 0&&h;if(_t(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(he(u)){case"string":return new Promise((function(S){m.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:u,showInheritedValues:w},(function(P){S(P.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(u){return N.apply(this,arguments)})},{key:"updateReceiveSettings",value:(G=Q((function*(u){var m=this;if(_t(this._callObjectMode,"updateReceiveSettings()"),!uf(u,{allowAllParticipantsKey:!0}))throw new Error(pf({allowAllParticipantsKey:!0}));return ye(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise((function(h){m.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:u},(function(w){h({receiveSettings:w.receiveSettings})}))}))})),function(u){return G.apply(this,arguments)})},{key:"_prepInputSettingsForSharing",value:function(u,m){if(u){var h={};if(u.audio){var w,S,P;u.audio.settings&&(!Object.keys(u.audio.settings).length&&m||(h.audio={settings:W({},u.audio.settings)})),m&&(w=h.audio)!==null&&w!==void 0&&(w=w.settings)!==null&&w!==void 0&&w.customTrack&&(h.audio.settings={customTrack:this._sharedTracks.audioTrack});var D=((S=u.audio.processor)===null||S===void 0?void 0:S.type)==="none"&&((P=u.audio.processor)===null||P===void 0?void 0:P._isDefaultWhenNone);if(u.audio.processor&&!D){var L=W({},u.audio.processor);delete L._isDefaultWhenNone,h.audio=W(W({},h.audio),{},{processor:L})}}if(u.video){var $,U,re;u.video.settings&&(!Object.keys(u.video.settings).length&&m||(h.video={settings:W({},u.video.settings)})),m&&($=h.video)!==null&&$!==void 0&&($=$.settings)!==null&&$!==void 0&&$.customTrack&&(h.video.settings={customTrack:this._sharedTracks.videoTrack});var mt=((U=u.video.processor)===null||U===void 0?void 0:U.type)==="none"&&((re=u.video.processor)===null||re===void 0?void 0:re._isDefaultWhenNone);if(u.video.processor&&!mt){var Ot=W({},u.video.processor);delete Ot._isDefaultWhenNone,h.video=W(W({},h.video),{},{processor:Ot})}}return h}}},{key:"getInputSettings",value:function(){var u=this;return ue(),new Promise((function(m){m(u._getInputSettings())}))}},{key:"_getInputSettings",value:function(){var u,m,h,w,S,P,D={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(u=((h=this._inputSettings)===null||h===void 0?void 0:h.video)||D,m=((w=this._inputSettings)===null||w===void 0?void 0:w.audio)||D):(u=((S=this._preloadCache)===null||S===void 0||(S=S.inputSettings)===null||S===void 0?void 0:S.video)||D,m=((P=this._preloadCache)===null||P===void 0||(P=P.inputSettings)===null||P===void 0?void 0:P.audio)||D);var L={audio:m,video:u};return this._prepInputSettingsForSharing(L,!0)}},{key:"_updatePreloadCacheInputSettings",value:function(u,m){var h=this._inputSettings||{},w={};if(u.video){var S,P,D;w.video={},u.video.settings?(w.video.settings={},m||u.video.settings.customTrack||(D=h.video)===null||D===void 0||!D.settings?w.video.settings=u.video.settings:w.video.settings=W(W({},h.video.settings),u.video.settings),Object.keys(w.video.settings).length||delete w.video.settings):(S=h.video)!==null&&S!==void 0&&S.settings&&(w.video.settings=h.video.settings),u.video.processor?w.video.processor=u.video.processor:(P=h.video)!==null&&P!==void 0&&P.processor&&(w.video.processor=h.video.processor)}else h.video&&(w.video=h.video);if(u.audio){var L,$,U;w.audio={},u.audio.settings?(w.audio.settings={},m||u.audio.settings.customTrack||(U=h.audio)===null||U===void 0||!U.settings?w.audio.settings=u.audio.settings:w.audio.settings=W(W({},h.audio.settings),u.audio.settings),Object.keys(w.audio.settings).length||delete w.audio.settings):(L=h.audio)!==null&&L!==void 0&&L.settings&&(w.audio.settings=h.audio.settings),u.audio.processor?w.audio.processor=u.audio.processor:($=h.audio)!==null&&$!==void 0&&$.processor&&(w.audio.processor=h.audio.processor)}else h.audio&&(w.audio=h.audio);this._maybeUpdateInputSettings(w)}},{key:"_devicesFromInputSettings",value:function(u){var m,h,w=(u==null||(m=u.video)===null||m===void 0||(m=m.settings)===null||m===void 0?void 0:m.deviceId)||null,S=(u==null||(h=u.audio)===null||h===void 0||(h=h.settings)===null||h===void 0?void 0:h.deviceId)||null,P=this._preloadCache.outputDeviceId||null;return{camera:w?{deviceId:w}:{},mic:S?{deviceId:S}:{},speaker:P?{deviceId:P}:{}}}},{key:"updateInputSettings",value:(se=Q((function*(u){var m=this;return ue(),df(u)?u.video||u.audio?(ff(u,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(u,!0),this._getInputSettings()):new Promise((function(h,w){m.sendMessageToCallMachine({action:"update-input-settings",inputSettings:u},(function(S){if(S.error)w(S.error);else{if(S.returnPreloadCache)return m._updatePreloadCacheInputSettings(u,!0),void h(m._getInputSettings());m._maybeUpdateInputSettings(S.inputSettings),h(m._prepInputSettingsForSharing(S.inputSettings,!0))}}))}))):this._getInputSettings():(console.error(Ya()),Promise.reject(Ya()))})),function(u){return se.apply(this,arguments)})},{key:"setBandwidth",value:function(u){var m=u.kbs,h=u.trackConstraints;if(ue(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:m,trackConstraints:h}),this}},{key:"getDailyLang",value:function(){var u=this;if(ue(),this._callMachineInitialized)return new Promise((function(m){u.sendMessageToCallMachine({action:"get-daily-lang"},(function(h){delete h.action,delete h.callbackStamp,m(h)}))}))}},{key:"setDailyLang",value:function(u){return ue(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:u}),this}},{key:"setProxyUrl",value:function(u){return this.sendMessageToCallMachine({action:"set-proxy-url",proxyUrl:u}),this}},{key:"setIceConfig",value:function(u){return this.sendMessageToCallMachine({action:"set-ice-config",iceConfig:u}),this}},{key:"meetingSessionSummary",value:function(){return[mn,Gt].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(K=Q((function*(){var u=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),ye(this._callState,"getMeetingSession()"),new Promise((function(m){u.sendMessageToCallMachine({action:"get-meeting-session"},(function(h){delete h.action,delete h.callbackStamp,m(h)}))}))})),function(){return K.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return ye(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"replace";_t(this._callObjectMode,"setMeetingSessionData()"),ye(this._callState,"setMeetingSessionData");try{(function(h,w){new Nb({data:h,mergeStrategy:w})})(u,m)}catch(h){throw console.error(h),h}try{this.sendMessageToCallMachine({action:"set-session-data",data:u,mergeStrategy:m})}catch(h){throw new Error("Error setting meeting session data: ".concat(h))}}},{key:"setUserName",value:function(u,m){var h=this;return this.properties.userName=u,new Promise((function(w){h.sendMessageToCallMachine({action:"set-user-name",name:u??"",thisMeetingOnly:le()||!!m&&!!m.thisMeetingOnly},(function(S){delete S.action,delete S.callbackStamp,w(S)}))}))}},{key:"setUserData",value:(X=Q((function*(u){var m=this;try{lf(u)}catch(h){throw console.error(h),h}if(this.properties.userData=u,this._callMachineInitialized)return new Promise((function(h){try{m.sendMessageToCallMachine({action:"set-user-data",userData:u},(function(w){delete w.action,delete w.callbackStamp,h(w)}))}catch(w){throw new Error("Error setting user data: ".concat(w))}}))})),function(u){return X.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(u){if(u&&(u<100||typeof u!="number"))throw new Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(u){var m=this;if(typeof AudioWorkletNode>"u"&&!le())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(u),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise((function(h,w){m.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:u},(function(S){m._isLocalAudioLevelObserverRunning=!S.error,S.error?w({error:S.error}):h()}))}));this._preloadCache.localAudioLevelObserver={enabled:!0,interval:u}}},{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(u){var m=this;if(this.validateAudioLevelInterval(u),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise((function(h,w){m.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:u},(function(S){m._isRemoteParticipantsAudioLevelObserverRunning=!S.error,S.error?w({error:S.error}):h()}))}));this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:u}}},{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:(F=Q((function*(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(_t(this._callObjectMode,"startCamera()"),Ga(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),this.needsLoad())try{yield this.load(m)}catch(h){return Promise.reject(h)}else{if(this._didPreAuth){if(m.url&&m.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(m.token&&m.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(m),this.properties=W(W({},this.properties),m)}return new Promise((function(h){u._preloadCache.inputSettings=u._prepInputSettingsForSharing(u._inputSettings,!1),u.sendMessageToCallMachine({action:"start-camera",properties:Wn(u.properties,u.callClientId),preloadCache:Wn(u._preloadCache,u.callClientId)},(function(w){h({camera:w.camera,mic:w.mic,speaker:w.speaker})}))}))})),function(){return F.apply(this,arguments)})},{key:"validateCustomTrack",value:function(u,m,h){if(h&&h.length>50)throw new Error("Custom track `trackName` must not be more than 50 characters");if(m&&m!=="music"&&m!=="speech"&&!(m instanceof Object))throw new Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(h&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(h))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(!(u instanceof MediaStreamTrack))throw new Error("Custom tracks provided must be instances of MediaStreamTrack")}},{key:"startCustomTrack",value:function(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{track,mode,trackName,ignoreAudioLevel};return ue(),ye(this._callState,"startCustomTrack()"),this.validateCustomTrack(m.track,m.mode,m.trackName),new Promise((function(h,w){u._sharedTracks.customTrack=m.track,m.track=Nt,u.sendMessageToCallMachine({action:"start-custom-track",properties:m},(function(S){S.error?w({error:S.error}):h(S.mediaTag)}))}))}},{key:"stopCustomTrack",value:function(u){var m=this;return ue(),ye(this._callState,"stopCustomTrack()"),new Promise((function(h){m.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:u},(function(w){h(w.mediaTag)}))}))}},{key:"setCamera",value:function(u){var m=this;return Tr(),zi(this._callMachineInitialized,"setCamera()"),new Promise((function(h){m.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:u},(function(w){h({device:w.device})}))}))}},{key:"setAudioDevice",value:(H=Q((function*(u){return Tr(),this.nativeUtils().setAudioDevice(u),{deviceId:yield this.nativeUtils().getAudioDevice()}})),function(u){return H.apply(this,arguments)})},{key:"cycleCamera",value:function(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise((function(h){u.sendMessageToCallMachine({action:"cycle-camera",properties:m},(function(w){h({device:w.device})}))}))}},{key:"cycleMic",value:function(){var u=this;return ue(),new Promise((function(m){u.sendMessageToCallMachine({action:"cycle-mic"},(function(h){m({device:h.device})}))}))}},{key:"getCameraFacingMode",value:function(){var u=this;return Tr(),new Promise((function(m){u.sendMessageToCallMachine({action:"get-camera-facing-mode"},(function(h){m(h.facingMode)}))}))}},{key:"setInputDevicesAsync",value:(V=Q((function*(u){var m=this,h=u.audioDeviceId,w=u.videoDeviceId,S=u.audioSource,P=u.videoSource;if(ue(),S!==void 0&&(h=S),P!==void 0&&(w=P),typeof h=="boolean"&&(this._setAllowLocalAudio(h),h=void 0),typeof w=="boolean"&&(this._setAllowLocalVideo(w),w=void 0),!h&&!w)return yield this.getInputDevices();var D={};return h&&(h instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=h,h=Nt,D.audio={settings:{customTrack:h}}):(delete this._sharedTracks.audioTrack,D.audio={settings:{deviceId:h}})),w&&(w instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=w,w=Nt,D.video={settings:{customTrack:w}}):(delete this._sharedTracks.videoTrack,D.video={settings:{deviceId:w}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(D,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise((function(L){m.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:h,videoDeviceId:w},(function($){if(delete $.action,delete $.callbackStamp,$.returnPreloadCache)return m._updatePreloadCacheInputSettings(D,!1),void L(m._devicesFromInputSettings(m._inputSettings));L($)}))}))})),function(u){return V.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(B=Q((function*(u){var m=this,h=u.outputDeviceId;if(ue(),!h||typeof h!="string")throw new Error("outputDeviceId must be provided and must be a valid device id");return this._preloadCache.outputDeviceId=h,this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(w,S){m.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:h},(function(P){if(delete P.action,delete P.callbackStamp,P.error){var D=new Error(P.error.message);return D.type=P.error.type,void S(D)}P.returnPreloadCache?w(m._devicesFromInputSettings(m._inputSettings)):w(P)}))}))})),function(u){return B.apply(this,arguments)})},{key:"getInputDevices",value:(j=Q((function*(){var u=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(m){u.sendMessageToCallMachine({action:"get-input-devices"},(function(h){h.returnPreloadCache?m(u._devicesFromInputSettings(u._inputSettings)):m({camera:h.camera,mic:h.mic,speaker:h.speaker})}))}))})),function(){return j.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return Tr(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(u){if(Tr(),[tf,i0].includes(u)){if(u!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=u,!this.disableReactNativeAutoDeviceManagement("audio")&&Ui(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",u)}},{key:"preAuth",value:(E=Q((function*(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(_t(this._callObjectMode,"preAuth()"),Ga(this._callState,this._isPreparingToJoin,"preAuth()"),this.needsLoad()&&(yield this.load(m)),!m.url)throw new Error("preAuth() requires at least a url to be provided");return this.validateProperties(m),this.properties=W(W({},this.properties),m),new Promise((function(h,w){u._preloadCache.inputSettings=u._prepInputSettingsForSharing(u._inputSettings,!1),u.sendMessageToCallMachine({action:"daily-method-preauth",properties:Wn(u.properties,u.callClientId),preloadCache:Wn(u._preloadCache,u.callClientId)},(function(S){return S.error?w(S.error):S.access?(u._didPreAuth=!0,void h({access:S.access})):w(new Error("unknown error in preAuth()"))}))}))})),function(){return E.apply(this,arguments)})},{key:"load",value:(A=Q((function*(u){var m=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");if(u&&(this.validateProperties(u),this.properties=W(W({},this.properties),u)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");return this._updateCallState(cd),this.emitDailyJSEvent({action:Ny}),this._callObjectMode?new Promise((function(h,w){m._callObjectLoader.cancel();var S=Date.now();m._callObjectLoader.load(m.properties.dailyConfig,(function(P){m._bundleLoadTime=P?"no-op":Date.now()-S,m._updateCallState(ld),P&&m.emitDailyJSEvent({action:dd}),h()}),(function(P,D){if(m.emitDailyJSEvent({action:Fy}),!D){m._updateCallState(Gt),m.resetMeetingDependentVars();var L={action:gd,errorMsg:P.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:P,bundleUrl:hi(m.properties.dailyConfig)}}};m._maybeSendToSentry(L),m.emitDailyJSEvent(L),w(P.msg)}}))})):(this._iframe.src=Gl(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise((function(h,w){m._loadedCallback=function(S){m._callState!==Gt?(m._updateCallState(ld),(m.properties.cssFile||m.properties.cssText)&&m.loadCss(m.properties),h()):w(S)}})))}})),function(u){return A.apply(this,arguments)})},{key:"join",value:(M=Q((function*(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();var h=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(m)}catch(w){return this.updateIsPreparingToJoin(!1),Promise.reject(w)}}else{if(h=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(m.url&&m.url!==this.properties.url)return console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(m.token&&m.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(m.url&&!this._callObjectMode&&m.url&&m.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(m.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(m),this.properties=W(W({},this.properties),m)}return m.showLocalVideo!==void 0&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!m.showLocalVideo),m.showParticipantsBar!==void 0&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!m.showParticipantsBar),this._callState===pn||this._callState===Aa?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(Aa,!1),this.emitDailyJSEvent({action:Uy}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:"join-meeting",properties:Wn(this.properties,this.callClientId),preloadCache:Wn(this._preloadCache,this.callClientId)}),new Promise((function(w,S){u._joinedCallback=function(P,D){if(u._callState!==Gt){if(u._updateCallState(pn),P)for(var L in P){if(u._callObjectMode){var $=u._callMachine().store;Bd(P[L],$),$d(P[L],$),Ud(P[L],u._participants[L],$)}u._participants[L]=W({},P[L]),u.toggleParticipantAudioBasedOnNativeAudioFocus()}h&&u.loadCss(u.properties),w(P)}else S(D)}})))})),function(){return M.apply(this,arguments)})},{key:"leave",value:(T=Q((function*(){var u=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise((function(m){u._callState===mn||u._callState===Gt?m():u._callObjectLoader&&!u._callObjectLoader.loaded?(u._callObjectLoader.cancel(),u._updateCallState(mn),u.resetMeetingDependentVars(),u.emitDailyJSEvent({action:mn}),m()):(u._resolveLeave=m,u.sendMessageToCallMachine({action:"leave-meeting"}))}))})),function(){return T.apply(this,arguments)})},{key:"startScreenShare",value:(C=Q((function*(){var u=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(zi(this._callMachineInitialized,"startScreenShare()"),m.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",m.screenVideoSendSettings),m.mediaStream&&(this._sharedTracks.screenMediaStream=m.mediaStream,m.mediaStream=Nt),typeof DailyNativeUtils<"u"&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var h=this.nativeUtils();if(yield h.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:md,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});h.setSystemScreenCaptureStartCallback((function(){h.setSystemScreenCaptureStartCallback(null),u.sendMessageToCallMachine({action:yd,captureOptions:m})})),h.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:yd,captureOptions:m})})),function(){return C.apply(this,arguments)})},{key:"stopScreenShare",value:function(){zi(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=u.type;if(m&&m!=="cloud"&&m!=="raw-tracks"&&m!=="local")throw new Error("invalid type: ".concat(m,", allowed values 'cloud', 'raw-tracks', or 'local'"));this.sendMessageToCallMachine(W({action:"local-recording-start"},u))}},{key:"updateRecording",value:function(u){var m=u.layout,h=m===void 0?{preset:"default"}:m,w=u.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:h,instanceId:w})}},{key:"stopRecording",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(W({action:"local-recording-stop"},u))}},{key:"startLiveStreaming",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(W({action:"daily-method-start-live-streaming"},u))}},{key:"updateLiveStreaming",value:function(u){var m=u.layout,h=m===void 0?{preset:"default"}:m,w=u.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:h,instanceId:w})}},{key:"addLiveStreamingEndpoints",value:function(u){var m=u.endpoints,h=u.instanceId;this.sendMessageToCallMachine({action:bd,endpointsOp:Ab,endpoints:m,instanceId:h})}},{key:"removeLiveStreamingEndpoints",value:function(u){var m=u.endpoints,h=u.instanceId;this.sendMessageToCallMachine({action:bd,endpointsOp:Ob,endpoints:m,instanceId:h})}},{key:"stopLiveStreaming",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(W({action:"daily-method-stop-live-streaming"},u))}},{key:"validateDailyConfig",value:function(u){u.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(u.camSimulcastEncodings)),u.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),Md()&&u.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,h=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(u){if(!(u instanceof Array||Array.isArray(u)))throw new Error("encodings must be an Array");if(!wf(u.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var w=0;w<u.length;w++){var S=u[w];for(var P in this._validateEncodingLayerHasValidProperties(S),S)if(Ha.includes(P)){if(typeof S[P]!="number")throw new Error("".concat(P," must be a number"));if(m){var D=m[P],L=D.min,$=D.max;if(!wf(S[P],L,$))throw new Error("".concat(P," value not in range. valid range: ").concat(L," to ").concat($))}}else if(!["active","scalabilityMode"].includes(P))throw new Error("Invalid key ".concat(P,", valid keys are:")+Object.values(Ha));if(h&&!S.hasOwnProperty("maxBitrate"))throw new Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(x=Q((function*(u){var m=this,h=u.url,w=u.settings,S=w===void 0?{state:La.PLAY}:w;try{(function(P){if(typeof P!="string")throw new Error('url parameter must be "string" type')})(h),_f(S),(function(P){for(var D in P)if(!af.includes(D))throw new Error("Invalid key ".concat(D,", valid keys are: ").concat(af));P.simulcastEncodings&&this.validateSimulcastEncodings(P.simulcastEncodings,of,!0)})(S)}catch(P){throw console.error("invalid argument Error: ".concat(P)),console.error(`startRemoteMediaPlayer arguments must be of the form:
21
21
  { url: "playback url",
22
22
  settings?:
23
- {state: "play"|"pause", simulcastEncodings?: [{}] } }`),P}return new Promise((function(P,D){m.sendMessageToCallMachine({action:"daily-method-start-remote-media-player",url:h,settings:S},(function(L){L.error?D({error:L.error,errorMsg:L.errorMsg}):P({session_id:L.session_id,remoteMediaPlayerState:{state:L.state,settings:L.settings}})}))}))})),function(u){return T.apply(this,arguments)})},{key:"stopRemoteMediaPlayer",value:(k=H((function*(u){var m=this;if(typeof u!="string")throw new Error(" remotePlayerID must be of type string");return new Promise((function(h,w){m.sendMessageToCallMachine({action:"daily-method-stop-remote-media-player",session_id:u},(function(S){S.error?w({error:S.error,errorMsg:S.errorMsg}):h()}))}))})),function(u){return k.apply(this,arguments)})},{key:"updateRemoteMediaPlayer",value:(_=H((function*(u){var m=this,h=u.session_id,w=u.settings;try{bf(w)}catch(S){throw console.error("invalid argument Error: ".concat(S)),console.error(`updateRemoteMediaPlayer arguments must be of the form:
23
+ {state: "play"|"pause", simulcastEncodings?: [{}] } }`),P}return new Promise((function(P,D){m.sendMessageToCallMachine({action:"daily-method-start-remote-media-player",url:h,settings:S},(function(L){L.error?D({error:L.error,errorMsg:L.errorMsg}):P({session_id:L.session_id,remoteMediaPlayerState:{state:L.state,settings:L.settings}})}))}))})),function(u){return x.apply(this,arguments)})},{key:"stopRemoteMediaPlayer",value:(k=Q((function*(u){var m=this;if(typeof u!="string")throw new Error(" remotePlayerID must be of type string");return new Promise((function(h,w){m.sendMessageToCallMachine({action:"daily-method-stop-remote-media-player",session_id:u},(function(S){S.error?w({error:S.error,errorMsg:S.errorMsg}):h()}))}))})),function(u){return k.apply(this,arguments)})},{key:"updateRemoteMediaPlayer",value:(_=Q((function*(u){var m=this,h=u.session_id,w=u.settings;try{_f(w)}catch(S){throw console.error("invalid argument Error: ".concat(S)),console.error(`updateRemoteMediaPlayer arguments must be of the form:
24
24
  session_id: "participant session",
25
- { settings?: {state: "play"|"pause"} }`),S}return new Promise((function(S,P){m.sendMessageToCallMachine({action:"daily-method-update-remote-media-player",session_id:h,settings:w},(function(D){D.error?P({error:D.error,errorMsg:D.errorMsg}):S({session_id:D.session_id,remoteMediaPlayerState:{state:D.state,settings:D.settings}})}))}))})),function(u){return _.apply(this,arguments)})},{key:"startTranscription",value:function(u){ye(this._callState,"startTranscription()"),this.sendMessageToCallMachine(U({action:"daily-method-start-transcription"},u))}},{key:"updateTranscription",value:function(u){if(ye(this._callState,"updateTranscription()"),!u)throw new Error("updateTranscription Error: options is mandatory");if(fe(u)!=="object")throw new Error("updateTranscription Error: options must be object type");if(u.participants&&!Array.isArray(u.participants))throw new Error("updateTranscription Error: participants must be an array");this.sendMessageToCallMachine(U({action:"daily-method-update-transcription"},u))}},{key:"stopTranscription",value:function(u){if(ye(this._callState,"stopTranscription()"),u&&fe(u)!=="object")throw new Error("stopTranscription Error: options must be object type");if(u&&!u.instanceId)throw new Error('"instanceId" not provided');this.sendMessageToCallMachine(U({action:"daily-method-stop-transcription"},u))}},{key:"startDialOut",value:(b=H((function*(u){var m=this;ye(this._callState,"startDialOut()");var h=function(D){if(D){if(!Array.isArray(D))throw new Error("Error starting dial out: audio codec must be an array");if(D.length<=0)throw new Error("Error starting dial out: audio codec array specified but empty");D.forEach((function(L){if(typeof L!="string")throw new Error("Error starting dial out: audio codec must be a string");if(L!=="OPUS"&&L!=="PCMU"&&L!=="PCMA"&&L!=="G722")throw new Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722")}))}};if(!u.sipUri&&!u.phoneNumber)throw new Error("Error starting dial out: either a sip uri or phone number must be provided");if(u.sipUri&&u.phoneNumber)throw new Error("Error starting dial out: only one of sip uri or phone number must be provided");if(u.sipUri){if(typeof u.sipUri!="string")throw new Error("Error starting dial out: sipUri must be a string");if(!u.sipUri.startsWith("sip:"))throw new Error("Error starting dial out: Invalid SIP URI, must start with 'sip:'");if(u.video&&typeof u.video!="boolean")throw new Error("Error starting dial out: video must be a boolean value");(function(D){if(D&&(h(D.audio),D.video)){if(!Array.isArray(D.video))throw new Error("Error starting dial out: video codec must be an array");if(D.video.length<=0)throw new Error("Error starting dial out: video codec array specified but empty");D.video.forEach((function(L){if(typeof L!="string")throw new Error("Error starting dial out: video codec must be a string");if(L!=="H264"&&L!=="VP8")throw new Error("Error starting dial out: video codec must be H264 or VP8")}))}})(u.codecs)}if(u.phoneNumber){if(typeof u.phoneNumber!="string")throw new Error("Error starting dial out: phoneNumber must be a string");if(!/^\+\d{1,}$/.test(u.phoneNumber))throw new Error("Error starting dial out: Invalid phone number, must be valid phone number as per E.164");u.codecs&&h(u.codecs.audio)}if(u.callerId){if(typeof u.callerId!="string")throw new Error("Error starting dial out: callerId must be a string");if(u.sipUri)throw new Error("Error starting dial out: callerId not allowed with sipUri")}if(u.displayName){if(typeof u.displayName!="string")throw new Error("Error starting dial out: displayName must be a string");if(u.displayName.length>=200)throw new Error("Error starting dial out: displayName length must be less than 200")}if(u.userId){if(typeof u.userId!="string")throw new Error("Error starting dial out: userId must be a string");if(u.userId.length>36)throw new Error("Error starting dial out: userId length must be less than or equal to 36")}if(sf(u),u.permissions&&u.permissions.canReceive){var w=Fe(Kd.validateJSONObject(u.permissions.canReceive),2),S=w[0],P=w[1];if(!S)throw new Error(P)}if(u.provider){if(u.provider!=="daily")throw new Error("Error: provider can be set only to 'daily', got: ".concat(u.provider));if(u.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(D,L){m.sendMessageToCallMachine(U({action:"dialout-start"},u),(function($){$.error?L($.error):D($)}))}))})),function(u){return b.apply(this,arguments)})},{key:"stopDialOut",value:function(u){var m=this;return ye(this._callState,"stopDialOut()"),new Promise((function(h,w){m.sendMessageToCallMachine(U({action:"dialout-stop"},u),(function(S){S.error?w(S.error):h(S)}))}))}},{key:"sipCallTransfer",value:(v=H((function*(u){var m=this;if(ye(this._callState,"sipCallTransfer()"),!u)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return u.useSipRefer=!1,yf(u,"sipCallTransfer"),sf(u),new Promise((function(h,w){m.sendMessageToCallMachine(U({action:_d},u),(function(S){S.error?w(S.error):h(S)}))}))})),function(u){return v.apply(this,arguments)})},{key:"sipRefer",value:(y=H((function*(u){var m=this;if(ye(this._callState,"sipRefer()"),!u)throw new Error("sessionId and toEndPoint are mandatory parameter");return u.useSipRefer=!0,yf(u,"sipRefer"),new Promise((function(h,w){m.sendMessageToCallMachine(U({action:_d},u),(function(S){S.error?w(S.error):h(S)}))}))})),function(u){return y.apply(this,arguments)})},{key:"sendDTMF",value:(g=H((function*(u){var m=this;return ye(this._callState,"sendDTMF()"),(function(h){var w=h.sessionId,S=h.tones;if(!w||!S)throw new Error("sessionId and tones are mandatory parameter");if(typeof w!="string"||typeof S!="string")throw new Error("sessionId and tones should be of string type");if(S.length>20)throw new Error("tones string must be upto 20 characters");var P=/[^0-9A-D*#]/g,D=S.match(P);if(D&&D[0])throw new Error("".concat(D[0]," is not valid DTMF tone"))})(u),new Promise((function(h,w){m.sendMessageToCallMachine(U({action:"send-dtmf"},u),(function(S){S.error?w(S.error):h(S)}))}))})),function(u){return g.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var u=this;return this._callState!==dn?Promise.resolve(U({stats:{latest:{}}},this._network)):new Promise((function(m){u.sendMessageToCallMachine({action:"get-calc-stats"},(function(h){m(U(U({},u._network),{},{stats:h.stats}))}))}))}},{key:"testWebsocketConnectivity",value:(p=H((function*(){var u=this;if(Go(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(m){return Promise.reject(m)}return new Promise((function(m,h){u.sendMessageToCallMachine({action:"test-websocket-connectivity"},(function(w){w.error?h(w.error):m(w.results)}))}))})),function(){return p.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(u){return u?u instanceof MediaStreamTrack?!!Qb(u)||(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:(f=H((function*(){var u=this;ce(),bt(this._callObjectMode,"testCallQuality()"),zi(this._callMachineInitialized,"testCallQuality()",null,!0),Ho(this._callState,this._isPreparingToJoin,"testCallQuality()");var m=this._testCallAlreadyInProgress,h=function(S){m||(u._testCallInProgress=S)};if(h(!0),this.needsLoad())try{var w=this._callState;yield this.load(),this._callState=w}catch(S){return h(!1),Promise.reject(S)}return new Promise((function(S){u.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:u.properties.dailyJsVersion},(function(P){var D=P.results,L=D.result,$=Vl(D,t0);if(L==="failed"){var te,ue=U({},$);(te=$.error)!==null&&te!==void 0&&te.details?($.error.details=JSON.parse($.error.details),ue.error=U(U({},ue.error),{},{details:U({},ue.error.details)}),ue.error.details.duringTest="testCallQuality"):(ue.error=ue.error?U({},ue.error):{},ue.error.details={duringTest:"testCallQuality"}),u._maybeSendToSentry(ue)}h(!1),S(U({result:L},$))}))}))})),function(){return f.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(d=H((function*(u){var m;se()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),m=yield this.testPeerToPeerCallQuality(u)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),m=yield this.testCallQuality());var h={result:m.result,secondsElapsed:m.secondsElapsed};return m.data&&(h.data={maxRTT:m.data.maxRoundTripTime,packetLoss:m.data.avgRecvPacketLoss}),h})),function(u){return d.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(l=H((function*(u){var m=this;if(Go(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(S){return Promise.reject(S)}var h=u.videoTrack,w=u.duration;if(!this._validateVideoTrackForNetworkTests(h))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=h,new Promise((function(S,P){m.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:w},(function(D){D.error?P(D.error):S(D.results)}))}))})),function(u){return l.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){se()?(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:(c=H((function*(u){var m=this;if(Go(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(h){return Promise.reject(h)}if(!this._validateVideoTrackForNetworkTests(u))throw new Error("Video track error");return this._sharedTracks.videoTrackForNetworkConnectivityTest=u,new Promise((function(h,w){m.sendMessageToCallMachine({action:"test-network-connectivity"},(function(S){S.error?w(S.error):h(S.results)}))}))})),function(u){return c.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var u=this;return new Promise((function(m){u._callState===dn?u.sendMessageToCallMachine({action:"get-cpu-load-stats"},(function(h){m(h.cpuStats)})):m({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})}))}},{key:"_validateEncodingLayerHasValidProperties",value:function(u){var m;if(!(((m=Object.keys(u))===null||m===void 0?void 0:m.length)>0))throw new Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(Jo))}},{key:"_validateVideoSendSettings",value:function(u,m){var h=u==="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"],w="Video send settings should be either an object or one of the supported presets: ".concat(h.join());if(typeof m=="string"){if(!h.includes(m))throw new Error(w)}else{if(fe(m)!=="object")throw new Error(w);if(!m.maxQuality&&!m.encodings&&m.allowAdaptiveLayers===void 0)throw new Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(m.maxQuality&&["low","medium","high"].indexOf(m.maxQuality)===-1)throw new Error("maxQuality must be either low, medium or high");if(m.encodings){var S=!1;switch(Object.keys(m.encodings).length){case 1:S=!m.encodings.low;break;case 2:S=!m.encodings.low||!m.encodings.medium;break;case 3:S=!m.encodings.low||!m.encodings.medium||!m.encodings.high;break;default:S=!0}if(S)throw new Error("Encodings must be defined as: low, low and medium, or low, medium and high.");m.encodings.low&&this._validateEncodingLayerHasValidProperties(m.encodings.low),m.encodings.medium&&this._validateEncodingLayerHasValidProperties(m.encodings.medium),m.encodings.high&&this._validateEncodingLayerHasValidProperties(m.encodings.high)}}}},{key:"validateUpdateSendSettings",value:function(u){var m=this;if(!u||Object.keys(u).length===0)throw new Error("Send settings must contain at least information for one track!");Object.entries(u).forEach((function(h){var w=Fe(h,2),S=w[0],P=w[1];m._validateVideoSendSettings(S,P)}))}},{key:"updateSendSettings",value:function(u){var m=this;return this.validateUpdateSendSettings(u),this.needsLoad()?(this._preloadCache.sendSettings=u,{sendSettings:this._preloadCache.sendSettings}):new Promise((function(h,w){m.sendMessageToCallMachine({action:"update-send-settings",sendSettings:u},(function(S){S.error?w(S.error):h(S.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 ce(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(u){return ce(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:u}),this}},{key:"activeSpeakerMode",value:function(){return ce(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(u){return ye(this._callState,"setSubscribeToTracksAutomatically()","Use the subscribeToTracksAutomatically configuration property."),this._preloadCache.subscribeToTracksAutomatically=u,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:u}),this}},{key:"enumerateDevices",value:(s=H((function*(){var u=this;if(this._callObjectMode){var m=yield navigator.mediaDevices.enumerateDevices();return hn()==="Firefox"&&Vi().major>115&&Vi().major<123&&(m=m.filter((function(h){return h.kind!=="audiooutput"}))),{devices:m.map((function(h){var w=JSON.parse(JSON.stringify(h));if(!se()&&h.kind==="videoinput"&&h.getCapabilities){var S,P=h.getCapabilities();w.facing=(P==null||(S=P.facingMode)===null||S===void 0?void 0:S.length)>=1?P.facingMode[0]:void 0}return w}))}}return new Promise((function(h){u.sendMessageToCallMachine({action:"enumerate-devices"},(function(w){h({devices:w.devices})}))}))})),function(){return s.apply(this,arguments)})},{key:"sendAppMessage",value:function(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"*";if(ye(this._callState,"sendAppMessage()"),JSON.stringify(u).length>this._maxAppMessageSize)throw new Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:u,to:m}),this}},{key:"addFakeParticipant",value:function(u){return ce(),ye(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(U({action:"add-fake-participant"},u)),this}},{key:"setShowNamesMode",value:function(u){return nt(this._callObjectMode,"setShowNamesMode()"),ce(),u&&u!=="always"&&u!=="never"?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:u}),this)}},{key:"setShowLocalVideo",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return nt(this._callObjectMode,"setShowLocalVideo()"),ce(),ye(this._callState,"setShowLocalVideo()"),typeof u!="boolean"?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:u}),this._showLocalVideo=u,this)}},{key:"showLocalVideo",value:function(){return nt(this._callObjectMode,"showLocalVideo()"),ce(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return nt(this._callObjectMode,"setShowParticipantsBar()"),ce(),ye(this._callState,"setShowParticipantsBar()"),typeof u!="boolean"?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:u}),this._showParticipantsBar=u,this)}},{key:"showParticipantsBar",value:function(){return nt(this._callObjectMode,"showParticipantsBar()"),ce(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return ce(),nt(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(u){return ce(),nt(this._callObjectMode,"setCustomIntegrations()"),ye(this._callState,"setCustomIntegrations()"),gf(u)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:u}),this._customIntegrations=u,this):this}},{key:"startCustomIntegrations",value:function(u){var m=this;if(ce(),nt(this._callObjectMode,"startCustomIntegrations()"),ye(this._callState,"startCustomIntegrations()"),Array.isArray(u)&&u.some((function(S){return typeof S!="string"}))||!Array.isArray(u)&&typeof u!="string")return console.error("startCustomIntegrations() only accepts string | string[]"),this;var h=typeof u=="string"?[u]:u,w=h.filter((function(S){return!(S in m._customIntegrations)}));return w.length?(console.error(`Can't find custom integration(s): "`.concat(w.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:h}),this)}},{key:"stopCustomIntegrations",value:function(u){var m=this;if(ce(),nt(this._callObjectMode,"stopCustomIntegrations()"),ye(this._callState,"stopCustomIntegrations()"),Array.isArray(u)&&u.some((function(S){return typeof S!="string"}))||!Array.isArray(u)&&typeof u!="string")return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var h=typeof u=="string"?[u]:u,w=h.filter((function(S){return!(S in m._customIntegrations)}));return w.length?(console.error(`Can't find custom integration(s): "`.concat(w.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:h}),this)}},{key:"customTrayButtons",value:function(){return nt(this._callObjectMode,"customTrayButtons()"),ce(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(u){return nt(this._callObjectMode,"updateCustomTrayButtons()"),ce(),ye(this._callState,"updateCustomTrayButtons()"),mf(u)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:u}),this._customTrayButtons=u,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(Bi))),this)}},{key:"theme",value:function(){return nt(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(u){var m=this;return nt(this._callObjectMode,"setTheme()"),new Promise((function(h,w){try{m.validateProperties({theme:u}),m.properties.theme=U({},u),m.sendMessageToCallMachine({action:"set-theme",theme:m.properties.theme});try{m.emitDailyJSEvent({action:Ry,theme:m.properties.theme})}catch(S){console.log("could not emit 'theme-updated'",S)}h(m.properties.theme)}catch(S){w(S)}}))}},{key:"requestFullscreen",value:(o=H((function*(){if(ce(),this._iframe&&!document.fullscreenElement&&kd())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(u){console.log("could not make video call fullscreen",u)}})),function(){return o.apply(this,arguments)})},{key:"exitFullscreen",value:function(){ce(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(a=H((function*(){var u=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise((function(m){u.sendMessageToCallMachine({action:"get-sidebar-view"},(function(h){m(h.view)}))}))})),function(){return a.apply(this,arguments)})},{key:"setSidebarView",value:function(u){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:u}),this)}},{key:"room",value:(i=H((function*(){var u=this,m=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeRoomConfigDefaults,h=m===void 0||m;return this._accessState.access===Ao||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise((function(w){u.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:h},(function(S){delete S.action,delete S.callbackStamp,w(S)}))}))})),function(){return i.apply(this,arguments)})},{key:"geo",value:(r=H((function*(){try{var u=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield u.json()).geo}}catch(m){return console.error("geo lookup failed",m),{current:""}}})),function(){return r.apply(this,arguments)})},{key:"setNetworkTopology",value:(n=H((function*(u){var m=this;return ce(),ye(this._callState,"setNetworkTopology()"),new Promise((function(h,w){m.sendMessageToCallMachine({action:"set-network-topology",opts:u},(function(S){S.error?w({error:S.error}):h({workerId:S.workerId})}))}))})),function(u){return n.apply(this,arguments)})},{key:"getNetworkTopology",value:(t=H((function*(){var u=this;return new Promise((function(m,h){u.needsLoad()&&m({topology:"none"}),u.sendMessageToCallMachine({action:"get-network-topology"},(function(w){w.error?h({error:w.error}):m({topology:w.topology})}))}))})),function(){return t.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(u){if(ce(),typeof u!="number"&&u!==!0&&u!==!1)throw new Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(u));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:u})}},{key:"on",value:function(u,m){return di.prototype.on.call(this,u,m)}},{key:"once",value:function(u,m){return di.prototype.once.call(this,u,m)}},{key:"off",value:function(u,m){return di.prototype.off.call(this,u,m)}},{key:"validateProperties",value:function(u){var m,h;if(u!=null&&(m=u.dailyConfig)!==null&&m!==void 0&&m.userMediaAudioConstraints){var w,S;se()||console.warn("userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.");var P=u.inputSettings||{};P.audio=((w=u.inputSettings)===null||w===void 0?void 0:w.audio)||{},P.audio.settings=((S=u.inputSettings)===null||S===void 0||(S=S.audio)===null||S===void 0?void 0:S.settings)||{},P.audio.settings=U(U({},P.audio.settings),u.dailyConfig.userMediaAudioConstraints),u.inputSettings=P,delete u.dailyConfig.userMediaAudioConstraints}if(u!=null&&(h=u.dailyConfig)!==null&&h!==void 0&&h.userMediaVideoConstraints){var D,L;se()||console.warn("userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.");var $=u.inputSettings||{};$.video=((D=u.inputSettings)===null||D===void 0?void 0:D.video)||{},$.video.settings=((L=u.inputSettings)===null||L===void 0||(L=L.video)===null||L===void 0?void 0:L.settings)||{},$.video.settings=U(U({},$.video.settings),u.dailyConfig.userMediaVideoConstraints),u.inputSettings=$,delete u.dailyConfig.userMediaVideoConstraints}for(var te in u)if(mn[te]){if(mn[te].validate&&!mn[te].validate(u[te],this))throw new Error("property '".concat(te,"': ").concat(mn[te].help))}else console.warn("Ignoring unrecognized property '".concat(te,"'")),delete u[te]}},{key:"assembleMeetingUrl",value:function(){var u,m,h=U(U({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:(u=this.properties.dailyConfig)!==null&&u!==void 0&&u.proxyUrl?encodeURIComponent((m=this.properties.dailyConfig)===null||m===void 0?void 0:m.proxyUrl):void 0}),w=h.url.match(/\?/)?"&":"?";return h.url+w+Object.keys(mn).filter((function(S){return mn[S].queryString&&h[S]!==void 0})).map((function(S){return"".concat(mn[S].queryString,"=").concat(h[S])})).join("&")}},{key:"needsLoad",value:function(){return[od,sd,fn,Jt].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(u,m){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(u,m,this.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(u){this._messageChannel.forwardPackagedMessageToCallMachine(u,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(u){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(u,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(u){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(u)}},{key:"handleMessageFromCallMachine",value:function(u){switch(u.action){case Ly:this.sendMessageToCallMachine(U({action:jy},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var m={action:ji,level:"log",code:1011,stats:{event:"bundle load",time:this._bundleLoadTime==="no-op"?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime==="no-op",url:hi(this.properties.dailyConfig)}};this.sendMessageToCallMachine(m),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case ud:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(u);break;case Uy:var h,w=U({},u);delete w.internal,this._maxAppMessageSize=((h=u.internal)===null||h===void 0?void 0:h._maxAppMessageSize)||Oo,this._joinedCallback&&(this._joinedCallback(u.participants),this._joinedCallback=null),this.emitDailyJSEvent(w);break;case Wy:case Jy:if(this._callState===fn)return;if(u.participant&&u.participant.session_id){var S=u.participant.local?"local":u.participant.session_id;if(this._callObjectMode){var P=this._callMachine().store;Fd(u.participant,P),Bd(u.participant,P),$d(u.participant,this._participants[S],P)}try{this.maybeParticipantTracksStopped(this._participants[S],u.participant),this.maybeParticipantTracksStarted(this._participants[S],u.participant),this.maybeEventRecordingStopped(this._participants[S],u.participant),this.maybeEventRecordingStarted(this._participants[S],u.participant)}catch(ix){console.error("track events error",ix)}this.compareEqualForParticipantUpdateEvent(u.participant,this._participants[S])||(this._participants[S]=U({},u.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(u))}break;case qy:if(u.participant&&u.participant.session_id){var D=this._participants[u.participant.session_id];D&&this.maybeParticipantTracksStopped(D,null),delete this._participants[u.participant.session_id],this.emitDailyJSEvent(u)}break;case Hy:We(this._participantCounts,u.participantCounts)||(this._participantCounts=u.participantCounts,this.emitDailyJSEvent(u));break;case Gy:var L={access:u.access};u.awaitingAccess&&(L.awaitingAccess=u.awaitingAccess),We(this._accessState,L)||(this._accessState=L,this.emitDailyJSEvent(u));break;case Ky:if(u.meetingSession){this._meetingSessionSummary=u.meetingSession,this.emitDailyJSEvent(u);var $=U(U({},u),{},{action:"meeting-session-updated"});this.emitDailyJSEvent($)}break;case md:var te;this._iframe&&!u.preserveIframe&&(this._iframe.src=""),this._updateCallState(Jt),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(u.errorMsg),this._loadedCallback=null),u.preserveIframe;var ue=Vl(u,n0);ue!=null&&(te=ue.error)!==null&&te!==void 0&&te.details&&(ue.error.details=JSON.parse(ue.error.details)),this._maybeSendToSentry(u),this._joinedCallback&&(this._joinedCallback(null,ue),this._joinedCallback=null),this.emitDailyJSEvent(ue);break;case zy:this._callState!==Jt&&this._updateCallState(fn),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(u);break;case"selected-devices-updated":u.devices&&this.emitDailyJSEvent(u);break;case bb:var Et=u.state,Cn=u.threshold,Hr=u.quality,Le=Et.state,pt=Et.reasons;Le===this._network.networkState&&We(pt,this._network.networkStateReasons)&&Cn===this._network.threshold&&Hr===this._network.quality||(this._network.networkState=Le,this._network.networkStateReasons=pt,this._network.quality=Hr,this._network.threshold=Cn,u.networkState=Le,pt.length&&(u.networkStateReasons=pt),delete u.state,this.emitDailyJSEvent(u));break;case wb:u&&u.cpuLoadState&&this.emitDailyJSEvent(u);break;case kb:u&&u.faceCounts!==void 0&&this.emitDailyJSEvent(u);break;case vb:var Pn=u.activeSpeaker;this._activeSpeaker.peerId!==Pn.peerId&&(this._activeSpeaker.peerId=Pn.peerId,this.emitDailyJSEvent({action:u.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var Gr=u.show;this._showLocalVideo=Gr,this.emitDailyJSEvent({action:u.action,show:Gr});break;case yb:var va=u.enabled;this._activeSpeakerMode!==va&&(this._activeSpeakerMode=va,this.emitDailyJSEvent({action:u.action,enabled:this._activeSpeakerMode}));break;case Xy:case Qy:case Zy:this._waitingParticipants=u.allWaitingParticipants,this.emitDailyJSEvent({action:u.action,participant:u.participant});break;case Pb:We(this._receiveSettings,u.receiveSettings)||(this._receiveSettings=u.receiveSettings,this.emitDailyJSEvent({action:u.action,receiveSettings:u.receiveSettings}));break;case hd:this._maybeUpdateInputSettings(u.inputSettings);break;case"send-settings-updated":We(this._sendSettings,u.sendSettings)||(this._sendSettings=u.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:u.action,sendSettings:u.sendSettings}));break;case"local-audio-level":this._localAudioLevel=u.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(u);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=u.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(u);break;case db:var Kr=u.session_id;this._rmpPlayerState[Kr]=u.playerState,this.emitDailyJSEvent(u);break;case hb:delete this._rmpPlayerState[u.session_id],this.emitDailyJSEvent(u);break;case fb:var Yr=u.session_id,Wm=this._rmpPlayerState[Yr];Wm&&this.compareEqualForRMPUpdateEvent(Wm,u.remoteMediaPlayerState)||(this._rmpPlayerState[Yr]=u.remoteMediaPlayerState,this.emitDailyJSEvent(u));break;case"custom-button-click":case"sidebar-view-changed":case"pip-started":case"pip-stopped":this.emitDailyJSEvent(u);break;case Yy:var rx=this._meetingSessionState.topology!==(u.meetingSessionState&&u.meetingSessionState.topology);this._meetingSessionState=Yo(u.meetingSessionState,this._callObjectMode),(this._callObjectMode||rx)&&this.emitDailyJSEvent(u);break;case pb:this._isScreenSharing=!0,this.emitDailyJSEvent(u);break;case mb:case gb:this._isScreenSharing=!1,this.emitDailyJSEvent(u);break;case dd:case fd:case ab:case ob:case sb:case nb:case rb:case ib:case Fy:case By:case lb:case ub:case"test-completed":case _b:case cb:case Sb:case xb:case Tb:case Mb:case pd:case Cb: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(u);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(u,m){var h="record";u&&(m.local||m[h]!==!1||u[h]===m[h]||this.emitDailyJSEvent({action:fd}))}},{key:"maybeEventRecordingStarted",value:function(u,m){var h="record";u&&(m.local||m[h]!==!0||u[h]===m[h]||this.emitDailyJSEvent({action:dd}))}},{key:"_trackStatePlayable",value:function(u){return!(!u||u.state!==Ey)}},{key:"_trackChanged",value:function(u,m){return u?.id!==m?.id}},{key:"maybeEventTrackStopped",value:function(u,m,h){var w,S,P=(w=m?.tracks[u])!==null&&w!==void 0?w:null,D=(S=h?.tracks[u])!==null&&S!==void 0?S:null,L=P?.track;if(L){var $=this._trackStatePlayable(P),te=this._trackStatePlayable(D),ue=this._trackChanged(L,D?.track);$&&(te&&!ue||this.emitDailyJSEvent({action:tb,track:L,participant:h??m,type:u}))}}},{key:"maybeEventTrackStarted",value:function(u,m,h){var w,S,P=(w=m?.tracks[u])!==null&&w!==void 0?w:null,D=(S=h?.tracks[u])!==null&&S!==void 0?S:null,L=D?.track;if(L){var $=this._trackStatePlayable(P),te=this._trackStatePlayable(D),ue=this._trackChanged(P?.track,L);te&&($&&!ue||this.emitDailyJSEvent({action:eb,track:L,participant:h,type:u}))}}},{key:"maybeParticipantTracksStopped",value:function(u,m){if(u)for(var h in u.tracks)this.maybeEventTrackStopped(h,u,m)}},{key:"maybeParticipantTracksStarted",value:function(u,m){if(m)for(var h in m.tracks)this.maybeEventTrackStarted(h,u,m)}},{key:"compareEqualForRMPUpdateEvent",value:function(u,m){var h,w;return u.state===m.state&&((h=u.settings)===null||h===void 0?void 0:h.volume)===((w=m.settings)===null||w===void 0?void 0:w.volume)}},{key:"emitDailyJSEvent",value:function(u){try{u.callClientId=this.callClientId,this.emit(u.action,u)}catch(m){console.log("could not emit",u,m)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(u,m){return!!We(u,m)&&(!u.videoTrack||!m.videoTrack||u.videoTrack.id===m.videoTrack.id&&u.videoTrack.muted===m.videoTrack.muted&&u.videoTrack.enabled===m.videoTrack.enabled)&&(!u.audioTrack||!m.audioTrack||u.audioTrack.id===m.audioTrack.id&&u.audioTrack.muted===m.audioTrack.muted&&u.audioTrack.enabled===m.audioTrack.enabled)}},{key:"nativeUtils",value:function(){return se()?typeof DailyNativeUtils>"u"?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(u){this._updateCallState(this._callState,u)}},{key:"_updateCallState",value:function(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._isPreparingToJoin;if(u!==this._callState||m!==this._isPreparingToJoin){var h=this._callState,w=this._isPreparingToJoin;this._callState=u,this._isPreparingToJoin=m;var S=this._callState===dn;this.updateShowAndroidOngoingMeetingNotification(S);var P=Ui(h,w),D=Ui(this._callState,this._isPreparingToJoin);P!==D&&(this.updateKeepDeviceAwake(D),this.updateDeviceAudioMode(D),this.updateNoOpRecordingEnsuringBackgroundContinuity(D))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=nf,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:Ao},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Yo(tf,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=Oo,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(u){se()&&this.nativeUtils().setKeepDeviceAwake(u,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(u){if(se()&&!this.disableReactNativeAutoDeviceManagement("audio")){var m=u?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(m)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(u){if(se()&&this.nativeUtils().setShowOngoingMeetingNotification){var m,h,w,S;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var P=this.properties.reactNativeConfig.androidInCallNotification;m=P.title,h=P.subtitle,w=P.iconName,S=P.disableForCustomOverride}S&&(u=!1),this.nativeUtils().setShowOngoingMeetingNotification(u,m,h,w,this.callClientId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(u){se()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(u)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var u;if(se()){var m=(u=this._callMachine())===null||u===void 0||(u=u.store)===null||u===void 0?void 0:u.getState();for(var h in m?.streams){var w=m.streams[h];w&&w.pendingTrack&&w.pendingTrack.kind==="audio"&&(w.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(u){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[u]}},{key:"absoluteUrl",value:function(u){if(u!==void 0){var m=document.createElement("a");return m.href=u,m.href}}},{key:"sayHello",value:function(){var u="hello, world.";return console.log(u),u}},{key:"_logUseAfterDestroy",value:function(){var u=Object.values(pn)[0];if(this.needsLoad())if(u&&!u.needsLoad()){var m={action:ji,level:"error",code:this.strictMode?9995:9997};u.sendMessageToCallMachine(m)}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 h={action:ji,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(h,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var u=0,m=Object.values(pn);u<m.length;u++){var h=m[u];h._callMachineInitialized?(h.sendMessageToCallMachine({action:ji,level:"warn",code:this.allowMultipleCallInstances?9993:9992}),h._delayDuplicateInstanceLog=!1):h._delayDuplicateInstanceLog=!0}}},{key:"_maybeSendToSentry",value:function(u){var m,h,w,S;if(!((m=u.error)!==null&&m!==void 0&&m.type&&(![Dy,Iy,ld].includes(u.error.type)||u.error.type===ld&&u.error.msg.includes("deleted")))){var P=(h=this.properties)!==null&&h!==void 0&&h.url?new URL(this.properties.url):void 0,D="production";P&&P.host.includes(".staging.daily")&&(D="staging");var L,$,te,ue,Et,Cn=(function(Kr){const Yr=[Kv(),Hv(),wy(),by(),My(),Py(),Zv(),Cy()];return Kr.autoSessionTracking!==!1&&Yr.push(Ty()),Yr})({}).filter((function(Kr){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(Kr.name)})),Hr=new sy({dsn:"https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844",transport:fy,stackParser:yy,integrations:Cn,environment:D}),Le=new Wt;if(Le.setClient(Hr),Hr.init(),this.session_id&&Le.setExtra("sessionId",this.session_id),this.properties){var pt=U({},this.properties);pt.userName=pt.userName?"[Filtered]":void 0,pt.userData=pt.userData?"[Filtered]":void 0,pt.token=pt.token?"[Filtered]":void 0,Le.setExtra("properties",pt)}if(P){var Pn=P.searchParams.get("domain");if(!Pn){var Gr=P.host.match(/(.*?)\./);Pn=Gr&&Gr[1]||""}Pn&&Le.setTag("domain",Pn)}u.error&&(Le.setTag("fatalErrorType",u.error.type),Le.setExtra("errorDetails",u.error.details),!((L=u.error.details)===null||L===void 0)&&L.uri&&Le.setTag("serverAddress",u.error.details.uri),!(($=u.error.details)===null||$===void 0)&&$.workerGroup&&Le.setTag("workerGroup",u.error.details.workerGroup),!((te=u.error.details)===null||te===void 0)&&te.geoGroup&&Le.setTag("geoGroup",u.error.details.geoGroup),!((ue=u.error.details)===null||ue===void 0)&&ue.on&&Le.setTag("connectionAttempt",u.error.details.on),(Et=u.error.details)!==null&&Et!==void 0&&Et.bundleUrl&&(Le.setTag("bundleUrl",u.error.details.bundleUrl),Le.setTag("bundleError",u.error.details.sourceError.type))),Le.setTags({callMode:this._callObjectMode?se()?"reactNative":(w=this.properties)!==null&&w!==void 0&&(w=w.dailyConfig)!==null&&w!==void 0&&(w=w.callMode)!==null&&w!==void 0&&w.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:e.version()});var va=((S=u.error)===null||S===void 0?void 0:S.msg)||u.errorMsg;Le.captureException(new Error(va))}}},{key:"_callMachine",value:function(){var u;return(u=window._daily)===null||u===void 0||(u=u.instances)===null||u===void 0||(u=u[this.callClientId])===null||u===void 0?void 0:u.callMachine}},{key:"_maybeUpdateInputSettings",value:function(u){if(!We(this._inputSettings,u)){var m=this._getInputSettings();this._inputSettings=u;var h=this._getInputSettings();We(m,h)||this.emitDailyJSEvent({action:hd,inputSettings:h})}}}],[{key:"supportedBrowser",value:function(){if(se())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var u=mv.getParser(st());return{supported:!!Ro(),mobile:u.getPlatformType()==="mobile",name:u.getBrowserName(),version:u.getBrowserVersion(),supportsFullscreen:!!kd(),supportsScreenShare:!!Ob(),supportsSfu:!!Ro(),supportsVideoProcessing:Sd(),supportsAudioProcessing:xd()}}},{key:"version",value:function(){return"0.85.0"}},{key:"createCallObject",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return u.layout="none",new e(null,u)}},{key:"wrap",value:function(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(ce(),!u||!u.contentWindow||typeof u.src!="string")throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return m.layout||(m.customLayout?m.layout="custom-v1":m.layout="browser"),new e(u,m)}},{key:"createFrame",value:function(u,m){var h,w;ce(),u&&m?(h=u,w=m):u&&u.append?(h=u,w={}):(h=document.body,w=u||{});var S=w.iframeStyle;S||(S=h===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 P=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?P.allow="microphone, camera":P.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",P.style.visibility="hidden",h.appendChild(P),P.style.visibility=null,Object.keys(S).forEach((function(D){return P.style[D]=S[D]})),w.layout||(w.customLayout?w.layout="custom-v1":w.layout="browser");try{return new e(P,w)}catch(D){throw h.removeChild(P),D}}},{key:"createTransparentFrame",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce();var m=document.createElement("iframe");return m.allow="microphone; camera; autoplay",m.style.cssText=`
25
+ { settings?: {state: "play"|"pause"} }`),S}return new Promise((function(S,P){m.sendMessageToCallMachine({action:"daily-method-update-remote-media-player",session_id:h,settings:w},(function(D){D.error?P({error:D.error,errorMsg:D.errorMsg}):S({session_id:D.session_id,remoteMediaPlayerState:{state:D.state,settings:D.settings}})}))}))})),function(u){return _.apply(this,arguments)})},{key:"startTranscription",value:function(u){ye(this._callState,"startTranscription()"),this.sendMessageToCallMachine(W({action:"daily-method-start-transcription"},u))}},{key:"updateTranscription",value:function(u){if(ye(this._callState,"updateTranscription()"),!u)throw new Error("updateTranscription Error: options is mandatory");if(he(u)!=="object")throw new Error("updateTranscription Error: options must be object type");if(u.participants&&!Array.isArray(u.participants))throw new Error("updateTranscription Error: participants must be an array");this.sendMessageToCallMachine(W({action:"daily-method-update-transcription"},u))}},{key:"stopTranscription",value:function(u){if(ye(this._callState,"stopTranscription()"),u&&he(u)!=="object")throw new Error("stopTranscription Error: options must be object type");if(u&&!u.instanceId)throw new Error('"instanceId" not provided');this.sendMessageToCallMachine(W({action:"daily-method-stop-transcription"},u))}},{key:"startDialOut",value:(b=Q((function*(u){var m=this;ye(this._callState,"startDialOut()");var h=function(D){if(D){if(!Array.isArray(D))throw new Error("Error starting dial out: audio codec must be an array");if(D.length<=0)throw new Error("Error starting dial out: audio codec array specified but empty");D.forEach((function(L){if(typeof L!="string")throw new Error("Error starting dial out: audio codec must be a string");if(L!=="OPUS"&&L!=="PCMU"&&L!=="PCMA"&&L!=="G722")throw new Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722")}))}};if(!u.sipUri&&!u.phoneNumber)throw new Error("Error starting dial out: either a sip uri or phone number must be provided");if(u.sipUri&&u.phoneNumber)throw new Error("Error starting dial out: only one of sip uri or phone number must be provided");if(u.sipUri){if(typeof u.sipUri!="string")throw new Error("Error starting dial out: sipUri must be a string");if(!u.sipUri.startsWith("sip:"))throw new Error("Error starting dial out: Invalid SIP URI, must start with 'sip:'");if(u.video&&typeof u.video!="boolean")throw new Error("Error starting dial out: video must be a boolean value");(function(D){if(D&&(h(D.audio),D.video)){if(!Array.isArray(D.video))throw new Error("Error starting dial out: video codec must be an array");if(D.video.length<=0)throw new Error("Error starting dial out: video codec array specified but empty");D.video.forEach((function(L){if(typeof L!="string")throw new Error("Error starting dial out: video codec must be a string");if(L!=="H264"&&L!=="VP8")throw new Error("Error starting dial out: video codec must be H264 or VP8")}))}})(u.codecs)}if(u.phoneNumber){if(typeof u.phoneNumber!="string")throw new Error("Error starting dial out: phoneNumber must be a string");if(!/^\+\d{1,}$/.test(u.phoneNumber))throw new Error("Error starting dial out: Invalid phone number, must be valid phone number as per E.164");u.codecs&&h(u.codecs.audio)}if(u.callerId){if(typeof u.callerId!="string")throw new Error("Error starting dial out: callerId must be a string");if(u.sipUri)throw new Error("Error starting dial out: callerId not allowed with sipUri")}if(u.displayName){if(typeof u.displayName!="string")throw new Error("Error starting dial out: displayName must be a string");if(u.displayName.length>=200)throw new Error("Error starting dial out: displayName length must be less than 200")}if(u.userId){if(typeof u.userId!="string")throw new Error("Error starting dial out: userId must be a string");if(u.userId.length>36)throw new Error("Error starting dial out: userId length must be less than or equal to 36")}if(cf(u),u.permissions&&u.permissions.canReceive){var w=Fe(Yd.validateJSONObject(u.permissions.canReceive),2),S=w[0],P=w[1];if(!S)throw new Error(P)}if(u.provider){if(u.provider!=="daily")throw new Error("Error: provider can be set only to 'daily', got: ".concat(u.provider));if(u.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(D,L){m.sendMessageToCallMachine(W({action:"dialout-start"},u),(function($){$.error?L($.error):D($)}))}))})),function(u){return b.apply(this,arguments)})},{key:"stopDialOut",value:function(u){var m=this;return ye(this._callState,"stopDialOut()"),new Promise((function(h,w){m.sendMessageToCallMachine(W({action:"dialout-stop"},u),(function(S){S.error?w(S.error):h(S)}))}))}},{key:"sipCallTransfer",value:(v=Q((function*(u){var m=this;if(ye(this._callState,"sipCallTransfer()"),!u)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return u.useSipRefer=!1,bf(u,"sipCallTransfer"),cf(u),new Promise((function(h,w){m.sendMessageToCallMachine(W({action:wd},u),(function(S){S.error?w(S.error):h(S)}))}))})),function(u){return v.apply(this,arguments)})},{key:"sipRefer",value:(y=Q((function*(u){var m=this;if(ye(this._callState,"sipRefer()"),!u)throw new Error("sessionId and toEndPoint are mandatory parameter");return u.useSipRefer=!0,bf(u,"sipRefer"),new Promise((function(h,w){m.sendMessageToCallMachine(W({action:wd},u),(function(S){S.error?w(S.error):h(S)}))}))})),function(u){return y.apply(this,arguments)})},{key:"sendDTMF",value:(g=Q((function*(u){var m=this;return ye(this._callState,"sendDTMF()"),(function(h){var w=h.sessionId,S=h.tones;if(!w||!S)throw new Error("sessionId and tones are mandatory parameter");if(typeof w!="string"||typeof S!="string")throw new Error("sessionId and tones should be of string type");if(S.length>20)throw new Error("tones string must be upto 20 characters");var P=/[^0-9A-D*#]/g,D=S.match(P);if(D&&D[0])throw new Error("".concat(D[0]," is not valid DTMF tone"))})(u),new Promise((function(h,w){m.sendMessageToCallMachine(W({action:"send-dtmf"},u),(function(S){S.error?w(S.error):h(S)}))}))})),function(u){return g.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var u=this;return this._callState!==pn?Promise.resolve(W({stats:{latest:{}}},this._network)):new Promise((function(m){u.sendMessageToCallMachine({action:"get-calc-stats"},(function(h){m(W(W({},u._network),{},{stats:h.stats}))}))}))}},{key:"testWebsocketConnectivity",value:(p=Q((function*(){var u=this;if(Ka(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(m){return Promise.reject(m)}return new Promise((function(m,h){u.sendMessageToCallMachine({action:"test-websocket-connectivity"},(function(w){w.error?h(w.error):m(w.results)}))}))})),function(){return p.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(u){return u?u instanceof MediaStreamTrack?!!Zb(u)||(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:(f=Q((function*(){var u=this;ue(),_t(this._callObjectMode,"testCallQuality()"),zi(this._callMachineInitialized,"testCallQuality()",null,!0),Ga(this._callState,this._isPreparingToJoin,"testCallQuality()");var m=this._testCallAlreadyInProgress,h=function(S){m||(u._testCallInProgress=S)};if(h(!0),this.needsLoad())try{var w=this._callState;yield this.load(),this._callState=w}catch(S){return h(!1),Promise.reject(S)}return new Promise((function(S){u.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:u.properties.dailyJsVersion},(function(P){var D=P.results,L=D.result,$=Nl(D,n0);if(L==="failed"){var U,re=W({},$);(U=$.error)!==null&&U!==void 0&&U.details?($.error.details=JSON.parse($.error.details),re.error=W(W({},re.error),{},{details:W({},re.error.details)}),re.error.details.duringTest="testCallQuality"):(re.error=re.error?W({},re.error):{},re.error.details={duringTest:"testCallQuality"}),u._maybeSendToSentry(re)}h(!1),S(W({result:L},$))}))}))})),function(){return f.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(d=Q((function*(u){var m;le()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),m=yield this.testPeerToPeerCallQuality(u)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),m=yield this.testCallQuality());var h={result:m.result,secondsElapsed:m.secondsElapsed};return m.data&&(h.data={maxRTT:m.data.maxRoundTripTime,packetLoss:m.data.avgRecvPacketLoss}),h})),function(u){return d.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(l=Q((function*(u){var m=this;if(Ka(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(S){return Promise.reject(S)}var h=u.videoTrack,w=u.duration;if(!this._validateVideoTrackForNetworkTests(h))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=h,new Promise((function(S,P){m.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:w},(function(D){D.error?P(D.error):S(D.results)}))}))})),function(u){return l.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){le()?(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:(c=Q((function*(u){var m=this;if(Ka(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(h){return Promise.reject(h)}if(!this._validateVideoTrackForNetworkTests(u))throw new Error("Video track error");return this._sharedTracks.videoTrackForNetworkConnectivityTest=u,new Promise((function(h,w){m.sendMessageToCallMachine({action:"test-network-connectivity"},(function(S){S.error?w(S.error):h(S.results)}))}))})),function(u){return c.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var u=this;return new Promise((function(m){u._callState===pn?u.sendMessageToCallMachine({action:"get-cpu-load-stats"},(function(h){m(h.cpuStats)})):m({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})}))}},{key:"_validateEncodingLayerHasValidProperties",value:function(u){var m;if(!(((m=Object.keys(u))===null||m===void 0?void 0:m.length)>0))throw new Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(Ha))}},{key:"_validateVideoSendSettings",value:function(u,m){var h=u==="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"],w="Video send settings should be either an object or one of the supported presets: ".concat(h.join());if(typeof m=="string"){if(!h.includes(m))throw new Error(w)}else{if(he(m)!=="object")throw new Error(w);if(!m.maxQuality&&!m.encodings&&m.allowAdaptiveLayers===void 0)throw new Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(m.maxQuality&&["low","medium","high"].indexOf(m.maxQuality)===-1)throw new Error("maxQuality must be either low, medium or high");if(m.encodings){var S=!1;switch(Object.keys(m.encodings).length){case 1:S=!m.encodings.low;break;case 2:S=!m.encodings.low||!m.encodings.medium;break;case 3:S=!m.encodings.low||!m.encodings.medium||!m.encodings.high;break;default:S=!0}if(S)throw new Error("Encodings must be defined as: low, low and medium, or low, medium and high.");m.encodings.low&&this._validateEncodingLayerHasValidProperties(m.encodings.low),m.encodings.medium&&this._validateEncodingLayerHasValidProperties(m.encodings.medium),m.encodings.high&&this._validateEncodingLayerHasValidProperties(m.encodings.high)}}}},{key:"validateUpdateSendSettings",value:function(u){var m=this;if(!u||Object.keys(u).length===0)throw new Error("Send settings must contain at least information for one track!");Object.entries(u).forEach((function(h){var w=Fe(h,2),S=w[0],P=w[1];m._validateVideoSendSettings(S,P)}))}},{key:"updateSendSettings",value:function(u){var m=this;return this.validateUpdateSendSettings(u),this.needsLoad()?(this._preloadCache.sendSettings=u,{sendSettings:this._preloadCache.sendSettings}):new Promise((function(h,w){m.sendMessageToCallMachine({action:"update-send-settings",sendSettings:u},(function(S){S.error?w(S.error):h(S.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 ue(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(u){return ue(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:u}),this}},{key:"activeSpeakerMode",value:function(){return ue(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(u){return ye(this._callState,"setSubscribeToTracksAutomatically()","Use the subscribeToTracksAutomatically configuration property."),this._preloadCache.subscribeToTracksAutomatically=u,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:u}),this}},{key:"enumerateDevices",value:(s=Q((function*(){var u=this;if(this._callObjectMode){var m=yield navigator.mediaDevices.enumerateDevices();return gn()==="Firefox"&&Vi().major>115&&Vi().major<123&&(m=m.filter((function(h){return h.kind!=="audiooutput"}))),{devices:m.map((function(h){var w=JSON.parse(JSON.stringify(h));if(!le()&&h.kind==="videoinput"&&h.getCapabilities){var S,P=h.getCapabilities();w.facing=(P==null||(S=P.facingMode)===null||S===void 0?void 0:S.length)>=1?P.facingMode[0]:void 0}return w}))}}return new Promise((function(h){u.sendMessageToCallMachine({action:"enumerate-devices"},(function(w){h({devices:w.devices})}))}))})),function(){return s.apply(this,arguments)})},{key:"sendAppMessage",value:function(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"*";if(ye(this._callState,"sendAppMessage()"),JSON.stringify(u).length>this._maxAppMessageSize)throw new Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:u,to:m}),this}},{key:"addFakeParticipant",value:function(u){return ue(),ye(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(W({action:"add-fake-participant"},u)),this}},{key:"setShowNamesMode",value:function(u){return it(this._callObjectMode,"setShowNamesMode()"),ue(),u&&u!=="always"&&u!=="never"?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:u}),this)}},{key:"setShowLocalVideo",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return it(this._callObjectMode,"setShowLocalVideo()"),ue(),ye(this._callState,"setShowLocalVideo()"),typeof u!="boolean"?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:u}),this._showLocalVideo=u,this)}},{key:"showLocalVideo",value:function(){return it(this._callObjectMode,"showLocalVideo()"),ue(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return it(this._callObjectMode,"setShowParticipantsBar()"),ue(),ye(this._callState,"setShowParticipantsBar()"),typeof u!="boolean"?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:u}),this._showParticipantsBar=u,this)}},{key:"showParticipantsBar",value:function(){return it(this._callObjectMode,"showParticipantsBar()"),ue(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return ue(),it(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(u){return ue(),it(this._callObjectMode,"setCustomIntegrations()"),ye(this._callState,"setCustomIntegrations()"),vf(u)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:u}),this._customIntegrations=u,this):this}},{key:"startCustomIntegrations",value:function(u){var m=this;if(ue(),it(this._callObjectMode,"startCustomIntegrations()"),ye(this._callState,"startCustomIntegrations()"),Array.isArray(u)&&u.some((function(S){return typeof S!="string"}))||!Array.isArray(u)&&typeof u!="string")return console.error("startCustomIntegrations() only accepts string | string[]"),this;var h=typeof u=="string"?[u]:u,w=h.filter((function(S){return!(S in m._customIntegrations)}));return w.length?(console.error(`Can't find custom integration(s): "`.concat(w.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:h}),this)}},{key:"stopCustomIntegrations",value:function(u){var m=this;if(ue(),it(this._callObjectMode,"stopCustomIntegrations()"),ye(this._callState,"stopCustomIntegrations()"),Array.isArray(u)&&u.some((function(S){return typeof S!="string"}))||!Array.isArray(u)&&typeof u!="string")return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var h=typeof u=="string"?[u]:u,w=h.filter((function(S){return!(S in m._customIntegrations)}));return w.length?(console.error(`Can't find custom integration(s): "`.concat(w.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:h}),this)}},{key:"customTrayButtons",value:function(){return it(this._callObjectMode,"customTrayButtons()"),ue(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(u){return it(this._callObjectMode,"updateCustomTrayButtons()"),ue(),ye(this._callState,"updateCustomTrayButtons()"),gf(u)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:u}),this._customTrayButtons=u,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(Bi))),this)}},{key:"theme",value:function(){return it(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(u){var m=this;return it(this._callObjectMode,"setTheme()"),new Promise((function(h,w){try{m.validateProperties({theme:u}),m.properties.theme=W({},u),m.sendMessageToCallMachine({action:"set-theme",theme:m.properties.theme});try{m.emitDailyJSEvent({action:Vy,theme:m.properties.theme})}catch(S){console.log("could not emit 'theme-updated'",S)}h(m.properties.theme)}catch(S){w(S)}}))}},{key:"requestFullscreen",value:(a=Q((function*(){if(ue(),this._iframe&&!document.fullscreenElement&&Sd())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(u){console.log("could not make video call fullscreen",u)}})),function(){return a.apply(this,arguments)})},{key:"exitFullscreen",value:function(){ue(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(o=Q((function*(){var u=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise((function(m){u.sendMessageToCallMachine({action:"get-sidebar-view"},(function(h){m(h.view)}))}))})),function(){return o.apply(this,arguments)})},{key:"setSidebarView",value:function(u){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:u}),this)}},{key:"room",value:(i=Q((function*(){var u=this,m=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeRoomConfigDefaults,h=m===void 0||m;return this._accessState.access===Oa||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise((function(w){u.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:h},(function(S){delete S.action,delete S.callbackStamp,w(S)}))}))})),function(){return i.apply(this,arguments)})},{key:"geo",value:(r=Q((function*(){try{var u=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield u.json()).geo}}catch(m){return console.error("geo lookup failed",m),{current:""}}})),function(){return r.apply(this,arguments)})},{key:"setNetworkTopology",value:(n=Q((function*(u){var m=this;return ue(),ye(this._callState,"setNetworkTopology()"),new Promise((function(h,w){m.sendMessageToCallMachine({action:"set-network-topology",opts:u},(function(S){S.error?w({error:S.error}):h({workerId:S.workerId})}))}))})),function(u){return n.apply(this,arguments)})},{key:"getNetworkTopology",value:(t=Q((function*(){var u=this;return new Promise((function(m,h){u.needsLoad()&&m({topology:"none"}),u.sendMessageToCallMachine({action:"get-network-topology"},(function(w){w.error?h({error:w.error}):m({topology:w.topology})}))}))})),function(){return t.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(u){if(ue(),typeof u!="number"&&u!==!0&&u!==!1)throw new Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(u));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:u})}},{key:"on",value:function(u,m){return di.prototype.on.call(this,u,m)}},{key:"once",value:function(u,m){return di.prototype.once.call(this,u,m)}},{key:"off",value:function(u,m){return di.prototype.off.call(this,u,m)}},{key:"validateProperties",value:function(u){var m,h;if(u!=null&&(m=u.dailyConfig)!==null&&m!==void 0&&m.userMediaAudioConstraints){var w,S;le()||console.warn("userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.");var P=u.inputSettings||{};P.audio=((w=u.inputSettings)===null||w===void 0?void 0:w.audio)||{},P.audio.settings=((S=u.inputSettings)===null||S===void 0||(S=S.audio)===null||S===void 0?void 0:S.settings)||{},P.audio.settings=W(W({},P.audio.settings),u.dailyConfig.userMediaAudioConstraints),u.inputSettings=P,delete u.dailyConfig.userMediaAudioConstraints}if(u!=null&&(h=u.dailyConfig)!==null&&h!==void 0&&h.userMediaVideoConstraints){var D,L;le()||console.warn("userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.");var $=u.inputSettings||{};$.video=((D=u.inputSettings)===null||D===void 0?void 0:D.video)||{},$.video.settings=((L=u.inputSettings)===null||L===void 0||(L=L.video)===null||L===void 0?void 0:L.settings)||{},$.video.settings=W(W({},$.video.settings),u.dailyConfig.userMediaVideoConstraints),u.inputSettings=$,delete u.dailyConfig.userMediaVideoConstraints}for(var U in u)if(yn[U]){if(yn[U].validate&&!yn[U].validate(u[U],this))throw new Error("property '".concat(U,"': ").concat(yn[U].help))}else console.warn("Ignoring unrecognized property '".concat(U,"'")),delete u[U]}},{key:"assembleMeetingUrl",value:function(){var u,m,h=W(W({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:(u=this.properties.dailyConfig)!==null&&u!==void 0&&u.proxyUrl?encodeURIComponent((m=this.properties.dailyConfig)===null||m===void 0?void 0:m.proxyUrl):void 0}),w=h.url.match(/\?/)?"&":"?";return h.url+w+Object.keys(yn).filter((function(S){return yn[S].queryString&&h[S]!==void 0})).map((function(S){return"".concat(yn[S].queryString,"=").concat(h[S])})).join("&")}},{key:"needsLoad",value:function(){return[sd,cd,mn,Gt].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(u,m){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(u,m,this.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(u){this._messageChannel.forwardPackagedMessageToCallMachine(u,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(u){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(u,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(u){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(u)}},{key:"handleMessageFromCallMachine",value:function(u){switch(u.action){case jy:this.sendMessageToCallMachine(W({action:Ry},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var m={action:ji,level:"log",code:1011,stats:{event:"bundle load",time:this._bundleLoadTime==="no-op"?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime==="no-op",url:hi(this.properties.dailyConfig)}};this.sendMessageToCallMachine(m),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case dd:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(u);break;case zy:var h,w=W({},u);delete w.internal,this._maxAppMessageSize=((h=u.internal)===null||h===void 0?void 0:h._maxAppMessageSize)||Ia,this._joinedCallback&&(this._joinedCallback(u.participants),this._joinedCallback=null),this.emitDailyJSEvent(w);break;case Jy:case Hy:if(this._callState===mn)return;if(u.participant&&u.participant.session_id){var S=u.participant.local?"local":u.participant.session_id;if(this._callObjectMode){var P=this._callMachine().store;Bd(u.participant,P),$d(u.participant,P),Ud(u.participant,this._participants[S],P)}try{this.maybeParticipantTracksStopped(this._participants[S],u.participant),this.maybeParticipantTracksStarted(this._participants[S],u.participant),this.maybeEventRecordingStopped(this._participants[S],u.participant),this.maybeEventRecordingStarted(this._participants[S],u.participant)}catch(ox){console.error("track events error",ox)}this.compareEqualForParticipantUpdateEvent(u.participant,this._participants[S])||(this._participants[S]=W({},u.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(u))}break;case qy:if(u.participant&&u.participant.session_id){var D=this._participants[u.participant.session_id];D&&this.maybeParticipantTracksStopped(D,null),delete this._participants[u.participant.session_id],this.emitDailyJSEvent(u)}break;case Gy:Je(this._participantCounts,u.participantCounts)||(this._participantCounts=u.participantCounts,this.emitDailyJSEvent(u));break;case Ky:var L={access:u.access};u.awaitingAccess&&(L.awaitingAccess=u.awaitingAccess),Je(this._accessState,L)||(this._accessState=L,this.emitDailyJSEvent(u));break;case Yy:if(u.meetingSession){this._meetingSessionSummary=u.meetingSession,this.emitDailyJSEvent(u);var $=W(W({},u),{},{action:"meeting-session-updated"});this.emitDailyJSEvent($)}break;case gd:var U;this._iframe&&!u.preserveIframe&&(this._iframe.src=""),this._updateCallState(Gt),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(u.errorMsg),this._loadedCallback=null),u.preserveIframe;var re=Nl(u,r0);re!=null&&(U=re.error)!==null&&U!==void 0&&U.details&&(re.error.details=JSON.parse(re.error.details)),this._maybeSendToSentry(u),this._joinedCallback&&(this._joinedCallback(null,re),this._joinedCallback=null),this.emitDailyJSEvent(re);break;case Wy:this._callState!==Gt&&this._updateCallState(mn),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(u);break;case"selected-devices-updated":u.devices&&this.emitDailyJSEvent(u);break;case _b:var mt=u.state,Ot=u.threshold,en=u.quality,Ae=mt.state,Qe=mt.reasons;Ae===this._network.networkState&&Je(Qe,this._network.networkStateReasons)&&Ot===this._network.threshold&&en===this._network.quality||(this._network.networkState=Ae,this._network.networkStateReasons=Qe,this._network.quality=en,this._network.threshold=Ot,u.networkState=Ae,Qe.length&&(u.networkStateReasons=Qe),delete u.state,this.emitDailyJSEvent(u));break;case kb:u&&u.cpuLoadState&&this.emitDailyJSEvent(u);break;case Sb:u&&u.faceCounts!==void 0&&this.emitDailyJSEvent(u);break;case yb:var It=u.activeSpeaker;this._activeSpeaker.peerId!==It.peerId&&(this._activeSpeaker.peerId=It.peerId,this.emitDailyJSEvent({action:u.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var Gr=u.show;this._showLocalVideo=Gr,this.emitDailyJSEvent({action:u.action,show:Gr});break;case bb:var bo=u.enabled;this._activeSpeakerMode!==bo&&(this._activeSpeakerMode=bo,this.emitDailyJSEvent({action:u.action,enabled:this._activeSpeakerMode}));break;case Qy:case Zy:case eb:this._waitingParticipants=u.allWaitingParticipants,this.emitDailyJSEvent({action:u.action,participant:u.participant});break;case Eb:Je(this._receiveSettings,u.receiveSettings)||(this._receiveSettings=u.receiveSettings,this.emitDailyJSEvent({action:u.action,receiveSettings:u.receiveSettings}));break;case pd:this._maybeUpdateInputSettings(u.inputSettings);break;case"send-settings-updated":Je(this._sendSettings,u.sendSettings)||(this._sendSettings=u.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:u.action,sendSettings:u.sendSettings}));break;case"local-audio-level":this._localAudioLevel=u.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(u);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=u.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(u);break;case fb:var Kr=u.session_id;this._rmpPlayerState[Kr]=u.playerState,this.emitDailyJSEvent(u);break;case pb:delete this._rmpPlayerState[u.session_id],this.emitDailyJSEvent(u);break;case hb:var Yr=u.session_id,Jm=this._rmpPlayerState[Yr];Jm&&this.compareEqualForRMPUpdateEvent(Jm,u.remoteMediaPlayerState)||(this._rmpPlayerState[Yr]=u.remoteMediaPlayerState,this.emitDailyJSEvent(u));break;case"custom-button-click":case"sidebar-view-changed":case"pip-started":case"pip-stopped":this.emitDailyJSEvent(u);break;case Xy:var ix=this._meetingSessionState.topology!==(u.meetingSessionState&&u.meetingSessionState.topology);this._meetingSessionState=Xa(u.meetingSessionState,this._callObjectMode),(this._callObjectMode||ix)&&this.emitDailyJSEvent(u);break;case mb:this._isScreenSharing=!0,this.emitDailyJSEvent(u);break;case gb:case vb:this._isScreenSharing=!1,this.emitDailyJSEvent(u);break;case fd:case hd:case ab:case sb:case cb:case rb:case ib:case ob:case By:case $y:case ub:case db:case"test-completed":case wb:case lb:case xb:case Tb:case Mb:case Cb:case md:case Pb: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(u);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(u,m){var h="record";u&&(m.local||m[h]!==!1||u[h]===m[h]||this.emitDailyJSEvent({action:hd}))}},{key:"maybeEventRecordingStarted",value:function(u,m){var h="record";u&&(m.local||m[h]!==!0||u[h]===m[h]||this.emitDailyJSEvent({action:fd}))}},{key:"_trackStatePlayable",value:function(u){return!(!u||u.state!==Ay)}},{key:"_trackChanged",value:function(u,m){return u?.id!==m?.id}},{key:"maybeEventTrackStopped",value:function(u,m,h){var w,S,P=(w=m?.tracks[u])!==null&&w!==void 0?w:null,D=(S=h?.tracks[u])!==null&&S!==void 0?S:null,L=P?.track;if(L){var $=this._trackStatePlayable(P),U=this._trackStatePlayable(D),re=this._trackChanged(L,D?.track);$&&(U&&!re||this.emitDailyJSEvent({action:nb,track:L,participant:h??m,type:u}))}}},{key:"maybeEventTrackStarted",value:function(u,m,h){var w,S,P=(w=m?.tracks[u])!==null&&w!==void 0?w:null,D=(S=h?.tracks[u])!==null&&S!==void 0?S:null,L=D?.track;if(L){var $=this._trackStatePlayable(P),U=this._trackStatePlayable(D),re=this._trackChanged(P?.track,L);U&&($&&!re||this.emitDailyJSEvent({action:tb,track:L,participant:h,type:u}))}}},{key:"maybeParticipantTracksStopped",value:function(u,m){if(u)for(var h in u.tracks)this.maybeEventTrackStopped(h,u,m)}},{key:"maybeParticipantTracksStarted",value:function(u,m){if(m)for(var h in m.tracks)this.maybeEventTrackStarted(h,u,m)}},{key:"compareEqualForRMPUpdateEvent",value:function(u,m){var h,w;return u.state===m.state&&((h=u.settings)===null||h===void 0?void 0:h.volume)===((w=m.settings)===null||w===void 0?void 0:w.volume)}},{key:"emitDailyJSEvent",value:function(u){try{u.callClientId=this.callClientId,this.emit(u.action,u)}catch(m){console.log("could not emit",u,m)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(u,m){return!!Je(u,m)&&(!u.videoTrack||!m.videoTrack||u.videoTrack.id===m.videoTrack.id&&u.videoTrack.muted===m.videoTrack.muted&&u.videoTrack.enabled===m.videoTrack.enabled)&&(!u.audioTrack||!m.audioTrack||u.audioTrack.id===m.audioTrack.id&&u.audioTrack.muted===m.audioTrack.muted&&u.audioTrack.enabled===m.audioTrack.enabled)}},{key:"nativeUtils",value:function(){return le()?typeof DailyNativeUtils>"u"?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(u){this._updateCallState(this._callState,u)}},{key:"_updateCallState",value:function(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._isPreparingToJoin;if(u!==this._callState||m!==this._isPreparingToJoin){var h=this._callState,w=this._isPreparingToJoin;this._callState=u,this._isPreparingToJoin=m;var S=this._callState===pn;this.updateShowAndroidOngoingMeetingNotification(S);var P=Ui(h,w),D=Ui(this._callState,this._isPreparingToJoin);P!==D&&(this.updateKeepDeviceAwake(D),this.updateDeviceAudioMode(D),this.updateNoOpRecordingEnsuringBackgroundContinuity(D))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=rf,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:Oa},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Xa(nf,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=Ia,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(u){le()&&this.nativeUtils().setKeepDeviceAwake(u,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(u){if(le()&&!this.disableReactNativeAutoDeviceManagement("audio")){var m=u?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(m)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(u){if(le()&&this.nativeUtils().setShowOngoingMeetingNotification){var m,h,w,S;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var P=this.properties.reactNativeConfig.androidInCallNotification;m=P.title,h=P.subtitle,w=P.iconName,S=P.disableForCustomOverride}S&&(u=!1),this.nativeUtils().setShowOngoingMeetingNotification(u,m,h,w,this.callClientId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(u){le()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(u)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var u;if(le()){var m=(u=this._callMachine())===null||u===void 0||(u=u.store)===null||u===void 0?void 0:u.getState();for(var h in m?.streams){var w=m.streams[h];w&&w.pendingTrack&&w.pendingTrack.kind==="audio"&&(w.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(u){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[u]}},{key:"absoluteUrl",value:function(u){if(u!==void 0){var m=document.createElement("a");return m.href=u,m.href}}},{key:"sayHello",value:function(){var u="hello, world.";return console.log(u),u}},{key:"_logUseAfterDestroy",value:function(){var u=Object.values(vn)[0];if(this.needsLoad())if(u&&!u.needsLoad()){var m={action:ji,level:"error",code:this.strictMode?9995:9997};u.sendMessageToCallMachine(m)}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 h={action:ji,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(h,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var u=0,m=Object.values(vn);u<m.length;u++){var h=m[u];h._callMachineInitialized?(h.sendMessageToCallMachine({action:ji,level:"warn",code:this.allowMultipleCallInstances?9993:9992}),h._delayDuplicateInstanceLog=!1):h._delayDuplicateInstanceLog=!0}}},{key:"_maybeSendToSentry",value:function(u){var m,h,w,S;if(!((m=u.error)!==null&&m!==void 0&&m.type&&(![Ly,Dy,ud].includes(u.error.type)||u.error.type===ud&&u.error.msg.includes("deleted")))){var P=(h=this.properties)!==null&&h!==void 0&&h.url?new URL(this.properties.url):void 0,D="production";P&&P.host.includes(".staging.daily")&&(D="staging");var L,$,U,re,mt,Ot=(function(Kr){const Yr=[Yv(),Gv(),ky(),_y(),Cy(),Ey(),ey(),Py()];return Kr.autoSessionTracking!==!1&&Yr.push(My()),Yr})({}).filter((function(Kr){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(Kr.name)})),en=new cy({dsn:"https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844",transport:hy,stackParser:by,integrations:Ot,environment:D}),Ae=new qt;if(Ae.setClient(en),en.init(),this.session_id&&Ae.setExtra("sessionId",this.session_id),this.properties){var Qe=W({},this.properties);Qe.userName=Qe.userName?"[Filtered]":void 0,Qe.userData=Qe.userData?"[Filtered]":void 0,Qe.token=Qe.token?"[Filtered]":void 0,Ae.setExtra("properties",Qe)}if(P){var It=P.searchParams.get("domain");if(!It){var Gr=P.host.match(/(.*?)\./);It=Gr&&Gr[1]||""}It&&Ae.setTag("domain",It)}u.error&&(Ae.setTag("fatalErrorType",u.error.type),Ae.setExtra("errorDetails",u.error.details),!((L=u.error.details)===null||L===void 0)&&L.uri&&Ae.setTag("serverAddress",u.error.details.uri),!(($=u.error.details)===null||$===void 0)&&$.workerGroup&&Ae.setTag("workerGroup",u.error.details.workerGroup),!((U=u.error.details)===null||U===void 0)&&U.geoGroup&&Ae.setTag("geoGroup",u.error.details.geoGroup),!((re=u.error.details)===null||re===void 0)&&re.on&&Ae.setTag("connectionAttempt",u.error.details.on),(mt=u.error.details)!==null&&mt!==void 0&&mt.bundleUrl&&(Ae.setTag("bundleUrl",u.error.details.bundleUrl),Ae.setTag("bundleError",u.error.details.sourceError.type))),Ae.setTags({callMode:this._callObjectMode?le()?"reactNative":(w=this.properties)!==null&&w!==void 0&&(w=w.dailyConfig)!==null&&w!==void 0&&(w=w.callMode)!==null&&w!==void 0&&w.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:e.version()});var bo=((S=u.error)===null||S===void 0?void 0:S.msg)||u.errorMsg;Ae.captureException(new Error(bo))}}},{key:"_callMachine",value:function(){var u;return(u=window._daily)===null||u===void 0||(u=u.instances)===null||u===void 0||(u=u[this.callClientId])===null||u===void 0?void 0:u.callMachine}},{key:"_maybeUpdateInputSettings",value:function(u){if(!Je(this._inputSettings,u)){var m=this._getInputSettings();this._inputSettings=u;var h=this._getInputSettings();Je(m,h)||this.emitDailyJSEvent({action:pd,inputSettings:h})}}}],[{key:"supportedBrowser",value:function(){if(le())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var u=gv.getParser(ut());return{supported:!!Va(),mobile:u.getPlatformType()==="mobile",name:u.getBrowserName(),version:u.getBrowserVersion(),supportsFullscreen:!!Sd(),supportsScreenShare:!!Ib(),supportsSfu:!!Va(),supportsVideoProcessing:xd(),supportsAudioProcessing:Td()}}},{key:"version",value:function(){return"0.85.0"}},{key:"createCallObject",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return u.layout="none",new e(null,u)}},{key:"wrap",value:function(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(ue(),!u||!u.contentWindow||typeof u.src!="string")throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return m.layout||(m.customLayout?m.layout="custom-v1":m.layout="browser"),new e(u,m)}},{key:"createFrame",value:function(u,m){var h,w;ue(),u&&m?(h=u,w=m):u&&u.append?(h=u,w={}):(h=document.body,w=u||{});var S=w.iframeStyle;S||(S=h===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 P=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?P.allow="microphone, camera":P.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",P.style.visibility="hidden",h.appendChild(P),P.style.visibility=null,Object.keys(S).forEach((function(D){return P.style[D]=S[D]})),w.layout||(w.customLayout?w.layout="custom-v1":w.layout="browser");try{return new e(P,w)}catch(D){throw h.removeChild(P),D}}},{key:"createTransparentFrame",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ue();var m=document.createElement("iframe");return m.allow="microphone; camera; autoplay",m.style.cssText=`
26
26
  position: fixed;
27
27
  top: 0;
28
28
  left: 0;
@@ -30,38 +30,38 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
30
30
  height: 100%;
31
31
  border: 0;
32
32
  pointer-events: none;
33
- `,document.body.appendChild(m),u.layout||(u.layout="custom-v1"),e.wrap(m,u)}},{key:"getCallInstance",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return u?pn[u]:Object.values(pn)[0]}}]);var t,n,r,i,a,o,s,c,l,d,f,p,g,y,v,b,_,k,T,M,x,C,A,E,R,F,j,z,V,ee,ie,me,K,B,W,G,Ge,ht})();function sf(e){if(e.extension){if(typeof e.extension!="string")throw new Error("Error starting dial out: extension must be a string");if(e.extension.length>20)throw new Error("Error starting dial out: extension length must be less than or equal to 20")}if(e.waitBeforeExtensionDialSec){if(typeof e.waitBeforeExtensionDialSec!="number")throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be a number");if(e.waitBeforeExtensionDialSec>60)throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be less than or equal to 60");if(!e.extension)throw new Error("Error starting dial out: waitBeforeExtensionDialSec requires a phoneNumber and extension")}}function zn(e,t){var n={};for(var r in e)if(e[r]instanceof MediaStreamTrack)console.warn("MediaStreamTrack found in props or cache.",r),n[r]=jt;else if(r==="dailyConfig"){if(e[r].modifyLocalSdpHook){var i=window._daily.instances[t].customCallbacks||{};i.modifyLocalSdpHook=e[r].modifyLocalSdpHook,window._daily.instances[t].customCallbacks=i,delete e[r].modifyLocalSdpHook}if(e[r].modifyRemoteSdpHook){var a=window._daily.instances[t].customCallbacks||{};a.modifyRemoteSdpHook=e[r].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=a,delete e[r].modifyRemoteSdpHook}n[r]=e[r]}else n[r]=e[r];return n}function ye(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==dn){var n="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," only supported after join.");throw t&&(n+=" ".concat(t)),console.error(n),new Error(n)}}function Ui(e,t){return[Eo,dn].includes(e)||t}function Ho(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"This daily-js method",r=arguments.length>3?arguments[3]:void 0;if(Ui(e,t)){var i="".concat(n," not supported after joining a meeting.");throw r&&(i+=" ".concat(r)),console.error(i),new Error(i)}}function zi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method",n=arguments.length>2?arguments[2]:void 0;if(!e){var r="".concat(t,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 n&&(r+=" ".concat(n)),console.error(r),new Error(r)}}function Go(e){if(e){var t="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(t),new Error(t)}}function bt(e){if(!e){var t="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(t),new Error(t)}}function nt(e){if(e){var t="".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(t),new Error(t)}}function ce(){if(se())throw new Error("This daily-js method is not currently supported in React Native")}function xr(){if(!se())throw new Error("This daily-js method is only supported in React Native")}function cf(e){if(e===void 0)return!0;var t;if(typeof e=="string")t=e;else try{t=JSON.stringify(e),We(JSON.parse(t),e)||console.warn("The userData provided will be modified when serialized.")}catch(n){throw Error("userData must be serializable to JSON: ".concat(n))}if(t.length>4096)throw Error("userData is too large (".concat(t.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function lf(e,t){for(var n=t.allowAllParticipantsKey,r=function(f){var p=["local"];return n||p.push("*"),f&&!p.includes(f)},i=function(f){return!!(f.layer===void 0||Number.isInteger(f.layer)&&f.layer>=0||f.layer==="inherit")},a=function(f){return!!f&&!(f.video&&!i(f.video))&&!(f.screenVideo&&!i(f.screenVideo))},o=0,s=Object.entries(e);o<s.length;o++){var c=Fe(s[o],2),l=c[0],d=c[1];if(!r(l)||!a(d))return!1}return!0}function uf(e){if(fe(e)!=="object")return!1;for(var t=0,n=Object.entries(e);t<n.length;t++){var r=Fe(n[t],2),i=r[0],a=r[1];switch(i){case"video":if(fe(a)!=="object")return!1;for(var o=0,s=Object.entries(a);o<s.length;o++){var c=Fe(s[o],2),l=c[0],d=c[1];switch(l){case"processor":if(!a0(d))return!1;break;case"settings":if(!ff(d))return!1;break;default:return!1}}break;case"audio":if(fe(a)!=="object")return!1;for(var f=0,p=Object.entries(a);f<p.length;f++){var g=Fe(p[f],2),y=g[0],v=g[1];switch(y){case"processor":if(!i0(v))return!1;break;case"settings":if(!ff(v))return!1;break;default:return!1}}break;default:return!1}}return!0}function df(e,t,n){var r,i=[];e.video&&e.video.processor&&(Sd((r=t?.useLegacyVideoProcessor)!==null&&r!==void 0&&r)||(e.video.settings?delete e.video.processor:delete e.video,i.push("video"))),e.audio&&e.audio.processor&&(xd()||(e.audio.settings?delete e.audio.processor:delete e.audio,i.push("audio"))),i.length>0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(i.join(", "))),e.audio&&e.audio.settings&&(e.audio.settings.customTrack?(n.audioTrack=e.audio.settings.customTrack,e.audio.settings={customTrack:jt}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:jt}):delete n.videoTrack)}function i0(e){if(se())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type"];return!!e&&fe(e)==="object"&&(Object.keys(e).filter((function(n){return!t.includes(n)})).forEach((function(n){console.warn("invalid key inputSettings -> audio -> processor : ".concat(n)),delete e[n]})),!!(function(n){return typeof n!="string"?!1:Object.values(bd).includes(n)?!0:(console.error("inputSettings audio processor type invalid"),!1)})(e.type))}function a0(e){if(se())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type","config"];return!e||fe(e)!=="object"||!(function(n){return typeof n!="string"?!1:Object.values(Ri).includes(n)?!0:(console.error("inputSettings video processor type invalid"),!1)})(e.type)||e.config&&(fe(e.config)!=="object"||!(function(n,r){var i=Object.keys(r);if(i.length===0)return!0;var a="invalid object in inputSettings -> video -> processor -> config";switch(n){case Ri.BGBLUR:return i.length>1||i[0]!=="strength"?(console.error(a),!1):!(typeof r.strength!="number"||r.strength<=0||r.strength>1||isNaN(r.strength))||(console.error("".concat(a,"; expected: {0 < strength <= 1}, got: ").concat(r.strength)),!1);case Ri.BGIMAGE:return!(r.source!==void 0&&!(function(o){if(o.source==="default")return o.type="default",!0;if(o.source instanceof ArrayBuffer)return!0;if(pi(o.source))return o.type="url",!!(function(l){var d=new URL(l),f=d.pathname;if(d.protocol==="data:")try{var p=f.substring(f.indexOf(":")+1,f.indexOf(";")).split("/")[1];return Lo.includes(p)}catch(y){return console.error("failed to deduce blob content type",y),!1}var g=f.split(".").at(-1).toLowerCase().trim();return Lo.includes(g)})(o.source)||(console.error("invalid image type; supported types: [".concat(Lo.join(", "),"]")),!1);return s=o.source,c=Number(s),isNaN(c)||!Number.isInteger(c)||c<=0||c>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(o.type="daily-preselect",!0);var s,c})(r));default:return!0}})(e.type,e.config))?!1:(Object.keys(e).filter((function(n){return!t.includes(n)})).forEach((function(n){console.warn("invalid key inputSettings -> video -> processor : ".concat(n)),delete e[n]})),!0)}function ff(e){return fe(e)==="object"&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function Ko(){var e=Object.values(Ri).join(" | "),t=Object.values(bd).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(e," ], config?: {} } }, audio?: { processor: {type: [ ").concat(t," ] } } }")}function hf(e){var t=e.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(Oy).concat(t?' | "'.concat("*",'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function pf(){return"customIntegrations should be an object of type ".concat(JSON.stringify(qo),".")}function mf(e){if(e&&fe(e)!=="object"||Array.isArray(e))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(Bi),".")),!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=Fe(n[t],1)[0],i=0,a=Object.entries(e[r]);i<a.length;i++){var o=Fe(a[i],2),s=o[0],c=o[1],l=Bi.id[s];if(!l)return console.error("customTrayButton does not support key ".concat(s)),!1;switch(s){case"iconPath":case"iconPathDarkMode":if(!pi(c))return console.error("customTrayButton ".concat(s," should be a url.")),!1;break;case"visualState":if(!["default","sidebar-open","active"].includes(c))return console.error("customTrayButton ".concat(s," should be ").concat(l,". Got: ").concat(c)),!1;break;default:if(fe(c)!==l)return console.error("customTrayButton ".concat(s," should be a ").concat(l,".")),!1}}return!0}function gf(e){if(!e||e&&fe(e)!=="object"||Array.isArray(e))return console.error(pf()),!1;for(var t=function(f){return"".concat(f," should be ").concat(qo.id[f])},n=function(f,p){return console.error("customIntegration ".concat(f,": ").concat(p))},r=0,i=Object.entries(e);r<i.length;r++){var a=Fe(i[r],1)[0];if(!("label"in e[a]))return n(a,"label is required"),!1;if(!("location"in e[a]))return n(a,"location is required"),!1;if(!("src"in e[a])&&!("srcdoc"in e[a]))return n(a,"src or srcdoc is required"),!1;for(var o=0,s=Object.entries(e[a]);o<s.length;o++){var c=Fe(s[o],2),l=c[0],d=c[1];switch(l){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if(typeof d!="string")return n(a,t(l)),!1;break;case"iconURL":if(!pi(d))return n(a,"".concat(l," should be a url")),!1;break;case"src":if("srcdoc"in e[a])return n(a,"cannot have both src and srcdoc"),!1;if(!pi(d))return n(a,'src "'.concat(d,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in e[a])return n(a,"cannot have both src and srcdoc"),!1;if(typeof d!="string")return n(a,t(l)),!1;break;case"location":if(!["main","sidebar"].includes(d))return n(a,t(l)),!1;break;case"controlledBy":if(d!=="*"&&d!=="owners"&&(!Array.isArray(d)||d.some((function(f){return typeof f!="string"}))))return n(a,t(l)),!1;break;case"shared":if((!Array.isArray(d)||d.some((function(f){return typeof f!="string"})))&&d!=="owners"&&typeof d!="boolean")return n(a,t(l)),!1;break;default:if(!qo.id[l])return console.error("customIntegration does not support key ".concat(l)),!1}}}return!0}function vf(e,t){if(t===void 0)return!1;switch(fe(t)){case"string":return fe(e)===t;case"object":if(fe(e)!=="object")return!1;for(var n in e)if(!vf(e[n],t[n]))return!1;return!0;default:return!1}}function yf(e,t){var n=e.sessionId,r=e.toEndPoint,i=e.callerId,a=e.useSipRefer;if(!n||!r)throw new Error("".concat(t,"() requires a sessionId and toEndPoint"));if(typeof n!="string"||typeof r!="string")throw new Error("Invalid paramater: sessionId and toEndPoint must be of type string");if(a&&!r.startsWith("sip:"))throw new Error('"toEndPoint" must be a "sip" address');if(!r.startsWith("sip:")&&!r.startsWith("+"))throw new Error("toEndPoint: ".concat(r,' must starts with either "sip:" or "+"'));if(i&&typeof i!="string")throw new Error("callerId must be of type string");if(i&&!r.startsWith("+"))throw new Error("callerId is only valid when transferring to a PSTN number")}function bf(e){if(fe(e)!=="object")throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(e.state&&!Object.values(Do).includes(e.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(Do));if(e.volume){if(typeof e.volume!="number")throw new Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(e.volume<0||e.volume>2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function _f(e,t,n){return!(typeof e!="number"||e<t||e>n)}function Yo(e,t){return e&&!t&&delete e.data,e}function rt(e){"@babel/helpers - typeof";return rt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rt(e)}var ne=function(){return ne=Object.assign||function(n){for(var r,i=1,a=arguments.length;i<a;i++){r=arguments[i];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])}return n},ne.apply(this,arguments)};function Xo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Wn(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(d){try{l(r.next(d))}catch(f){o(f)}}function c(d){try{l(r.throw(d))}catch(f){o(f)}}function l(d){d.done?a(d.value):i(d.value).then(s,c)}l((r=r.apply(e,[])).next())})}function Jn(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(d){return c([l,d])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function wf(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function be(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function $e(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var kf=Ie(null),_t=function(){var t=ge(kf);return Xe(t),t},Qo=Ie({on:function(){},off:function(){}}),o0=-1,Zo=function(){return o0--},s0=1,es=function(){return s0++},J=function(t,n,r){r===void 0&&(r=!1);var i=ge(Qo),a=i.off,o=i.on,s=be(Z(!1),2),c=s[0],l=s[1],d=de(0),f=Ve(function(){return r?Zo():es()},[r]);X(function(){if(!(!t||c)){if(d.current>1e5){console.error(`useDailyEvent called with potentially non-memoized event callback or due to too many re-renders.
33
+ `,document.body.appendChild(m),u.layout||(u.layout="custom-v1"),e.wrap(m,u)}},{key:"getCallInstance",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return u?vn[u]:Object.values(vn)[0]}}]);var t,n,r,i,o,a,s,c,l,d,f,p,g,y,v,b,_,k,x,C,T,M,A,E,j,B,V,H,F,X,K,se,G,N,J,z,We,at})();function cf(e){if(e.extension){if(typeof e.extension!="string")throw new Error("Error starting dial out: extension must be a string");if(e.extension.length>20)throw new Error("Error starting dial out: extension length must be less than or equal to 20")}if(e.waitBeforeExtensionDialSec){if(typeof e.waitBeforeExtensionDialSec!="number")throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be a number");if(e.waitBeforeExtensionDialSec>60)throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be less than or equal to 60");if(!e.extension)throw new Error("Error starting dial out: waitBeforeExtensionDialSec requires a phoneNumber and extension")}}function Wn(e,t){var n={};for(var r in e)if(e[r]instanceof MediaStreamTrack)console.warn("MediaStreamTrack found in props or cache.",r),n[r]=Nt;else if(r==="dailyConfig"){if(e[r].modifyLocalSdpHook){var i=window._daily.instances[t].customCallbacks||{};i.modifyLocalSdpHook=e[r].modifyLocalSdpHook,window._daily.instances[t].customCallbacks=i,delete e[r].modifyLocalSdpHook}if(e[r].modifyRemoteSdpHook){var o=window._daily.instances[t].customCallbacks||{};o.modifyRemoteSdpHook=e[r].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=o,delete e[r].modifyRemoteSdpHook}n[r]=e[r]}else n[r]=e[r];return n}function ye(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==pn){var n="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," only supported after join.");throw t&&(n+=" ".concat(t)),console.error(n),new Error(n)}}function Ui(e,t){return[Aa,pn].includes(e)||t}function Ga(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"This daily-js method",r=arguments.length>3?arguments[3]:void 0;if(Ui(e,t)){var i="".concat(n," not supported after joining a meeting.");throw r&&(i+=" ".concat(r)),console.error(i),new Error(i)}}function zi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method",n=arguments.length>2?arguments[2]:void 0;if(!e){var r="".concat(t,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 n&&(r+=" ".concat(n)),console.error(r),new Error(r)}}function Ka(e){if(e){var t="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(t),new Error(t)}}function _t(e){if(!e){var t="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(t),new Error(t)}}function it(e){if(e){var t="".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(t),new Error(t)}}function ue(){if(le())throw new Error("This daily-js method is not currently supported in React Native")}function Tr(){if(!le())throw new Error("This daily-js method is only supported in React Native")}function lf(e){if(e===void 0)return!0;var t;if(typeof e=="string")t=e;else try{t=JSON.stringify(e),Je(JSON.parse(t),e)||console.warn("The userData provided will be modified when serialized.")}catch(n){throw Error("userData must be serializable to JSON: ".concat(n))}if(t.length>4096)throw Error("userData is too large (".concat(t.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function uf(e,t){for(var n=t.allowAllParticipantsKey,r=function(f){var p=["local"];return n||p.push("*"),f&&!p.includes(f)},i=function(f){return!!(f.layer===void 0||Number.isInteger(f.layer)&&f.layer>=0||f.layer==="inherit")},o=function(f){return!!f&&!(f.video&&!i(f.video))&&!(f.screenVideo&&!i(f.screenVideo))},a=0,s=Object.entries(e);a<s.length;a++){var c=Fe(s[a],2),l=c[0],d=c[1];if(!r(l)||!o(d))return!1}return!0}function df(e){if(he(e)!=="object")return!1;for(var t=0,n=Object.entries(e);t<n.length;t++){var r=Fe(n[t],2),i=r[0],o=r[1];switch(i){case"video":if(he(o)!=="object")return!1;for(var a=0,s=Object.entries(o);a<s.length;a++){var c=Fe(s[a],2),l=c[0],d=c[1];switch(l){case"processor":if(!a0(d))return!1;break;case"settings":if(!hf(d))return!1;break;default:return!1}}break;case"audio":if(he(o)!=="object")return!1;for(var f=0,p=Object.entries(o);f<p.length;f++){var g=Fe(p[f],2),y=g[0],v=g[1];switch(y){case"processor":if(!o0(v))return!1;break;case"settings":if(!hf(v))return!1;break;default:return!1}}break;default:return!1}}return!0}function ff(e,t,n){var r,i=[];e.video&&e.video.processor&&(xd((r=t?.useLegacyVideoProcessor)!==null&&r!==void 0&&r)||(e.video.settings?delete e.video.processor:delete e.video,i.push("video"))),e.audio&&e.audio.processor&&(Td()||(e.audio.settings?delete e.audio.processor:delete e.audio,i.push("audio"))),i.length>0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(i.join(", "))),e.audio&&e.audio.settings&&(e.audio.settings.customTrack?(n.audioTrack=e.audio.settings.customTrack,e.audio.settings={customTrack:Nt}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:Nt}):delete n.videoTrack)}function o0(e){if(le())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type"];return!!e&&he(e)==="object"&&(Object.keys(e).filter((function(n){return!t.includes(n)})).forEach((function(n){console.warn("invalid key inputSettings -> audio -> processor : ".concat(n)),delete e[n]})),!!(function(n){return typeof n!="string"?!1:Object.values(_d).includes(n)?!0:(console.error("inputSettings audio processor type invalid"),!1)})(e.type))}function a0(e){if(le())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type","config"];return!e||he(e)!=="object"||!(function(n){return typeof n!="string"?!1:Object.values(Ri).includes(n)?!0:(console.error("inputSettings video processor type invalid"),!1)})(e.type)||e.config&&(he(e.config)!=="object"||!(function(n,r){var i=Object.keys(r);if(i.length===0)return!0;var o="invalid object in inputSettings -> video -> processor -> config";switch(n){case Ri.BGBLUR:return i.length>1||i[0]!=="strength"?(console.error(o),!1):!(typeof r.strength!="number"||r.strength<=0||r.strength>1||isNaN(r.strength))||(console.error("".concat(o,"; expected: {0 < strength <= 1}, got: ").concat(r.strength)),!1);case Ri.BGIMAGE:return!(r.source!==void 0&&!(function(a){if(a.source==="default")return a.type="default",!0;if(a.source instanceof ArrayBuffer)return!0;if(pi(a.source))return a.type="url",!!(function(l){var d=new URL(l),f=d.pathname;if(d.protocol==="data:")try{var p=f.substring(f.indexOf(":")+1,f.indexOf(";")).split("/")[1];return ja.includes(p)}catch(y){return console.error("failed to deduce blob content type",y),!1}var g=f.split(".").at(-1).toLowerCase().trim();return ja.includes(g)})(a.source)||(console.error("invalid image type; supported types: [".concat(ja.join(", "),"]")),!1);return s=a.source,c=Number(s),isNaN(c)||!Number.isInteger(c)||c<=0||c>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(a.type="daily-preselect",!0);var s,c})(r));default:return!0}})(e.type,e.config))?!1:(Object.keys(e).filter((function(n){return!t.includes(n)})).forEach((function(n){console.warn("invalid key inputSettings -> video -> processor : ".concat(n)),delete e[n]})),!0)}function hf(e){return he(e)==="object"&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function Ya(){var e=Object.values(Ri).join(" | "),t=Object.values(_d).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(e," ], config?: {} } }, audio?: { processor: {type: [ ").concat(t," ] } } }")}function pf(e){var t=e.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(Iy).concat(t?' | "'.concat("*",'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function mf(){return"customIntegrations should be an object of type ".concat(JSON.stringify(qa),".")}function gf(e){if(e&&he(e)!=="object"||Array.isArray(e))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(Bi),".")),!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=Fe(n[t],1)[0],i=0,o=Object.entries(e[r]);i<o.length;i++){var a=Fe(o[i],2),s=a[0],c=a[1],l=Bi.id[s];if(!l)return console.error("customTrayButton does not support key ".concat(s)),!1;switch(s){case"iconPath":case"iconPathDarkMode":if(!pi(c))return console.error("customTrayButton ".concat(s," should be a url.")),!1;break;case"visualState":if(!["default","sidebar-open","active"].includes(c))return console.error("customTrayButton ".concat(s," should be ").concat(l,". Got: ").concat(c)),!1;break;default:if(he(c)!==l)return console.error("customTrayButton ".concat(s," should be a ").concat(l,".")),!1}}return!0}function vf(e){if(!e||e&&he(e)!=="object"||Array.isArray(e))return console.error(mf()),!1;for(var t=function(f){return"".concat(f," should be ").concat(qa.id[f])},n=function(f,p){return console.error("customIntegration ".concat(f,": ").concat(p))},r=0,i=Object.entries(e);r<i.length;r++){var o=Fe(i[r],1)[0];if(!("label"in e[o]))return n(o,"label is required"),!1;if(!("location"in e[o]))return n(o,"location is required"),!1;if(!("src"in e[o])&&!("srcdoc"in e[o]))return n(o,"src or srcdoc is required"),!1;for(var a=0,s=Object.entries(e[o]);a<s.length;a++){var c=Fe(s[a],2),l=c[0],d=c[1];switch(l){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if(typeof d!="string")return n(o,t(l)),!1;break;case"iconURL":if(!pi(d))return n(o,"".concat(l," should be a url")),!1;break;case"src":if("srcdoc"in e[o])return n(o,"cannot have both src and srcdoc"),!1;if(!pi(d))return n(o,'src "'.concat(d,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in e[o])return n(o,"cannot have both src and srcdoc"),!1;if(typeof d!="string")return n(o,t(l)),!1;break;case"location":if(!["main","sidebar"].includes(d))return n(o,t(l)),!1;break;case"controlledBy":if(d!=="*"&&d!=="owners"&&(!Array.isArray(d)||d.some((function(f){return typeof f!="string"}))))return n(o,t(l)),!1;break;case"shared":if((!Array.isArray(d)||d.some((function(f){return typeof f!="string"})))&&d!=="owners"&&typeof d!="boolean")return n(o,t(l)),!1;break;default:if(!qa.id[l])return console.error("customIntegration does not support key ".concat(l)),!1}}}return!0}function yf(e,t){if(t===void 0)return!1;switch(he(t)){case"string":return he(e)===t;case"object":if(he(e)!=="object")return!1;for(var n in e)if(!yf(e[n],t[n]))return!1;return!0;default:return!1}}function bf(e,t){var n=e.sessionId,r=e.toEndPoint,i=e.callerId,o=e.useSipRefer;if(!n||!r)throw new Error("".concat(t,"() requires a sessionId and toEndPoint"));if(typeof n!="string"||typeof r!="string")throw new Error("Invalid paramater: sessionId and toEndPoint must be of type string");if(o&&!r.startsWith("sip:"))throw new Error('"toEndPoint" must be a "sip" address');if(!r.startsWith("sip:")&&!r.startsWith("+"))throw new Error("toEndPoint: ".concat(r,' must starts with either "sip:" or "+"'));if(i&&typeof i!="string")throw new Error("callerId must be of type string");if(i&&!r.startsWith("+"))throw new Error("callerId is only valid when transferring to a PSTN number")}function _f(e){if(he(e)!=="object")throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(e.state&&!Object.values(La).includes(e.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(La));if(e.volume){if(typeof e.volume!="number")throw new Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(e.volume<0||e.volume>2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function wf(e,t,n){return!(typeof e!="number"||e<t||e>n)}function Xa(e,t){return e&&!t&&delete e.data,e}function ot(e){"@babel/helpers - typeof";return ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ot(e)}var ie=function(){return ie=Object.assign||function(n){for(var r,i=1,o=arguments.length;i<o;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])}return n},ie.apply(this,arguments)};function Qa(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Jn(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(d){try{l(r.next(d))}catch(f){a(f)}}function c(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((r=r.apply(e,[])).next())})}function Hn(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return c([l,d])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function kf(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function be(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function $e(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Sf=De(null),wt=function(){var t=ge(Sf);return Ze(t),t},Za=De({on:function(){},off:function(){}}),s0=-1,es=function(){return s0--},c0=1,ts=function(){return c0++},q=function(t,n,r){r===void 0&&(r=!1);var i=ge(Za),o=i.off,a=i.on,s=be(ne(!1),2),c=s[0],l=s[1],d=fe(0),f=Ve(function(){return r?es():ts()},[r]);Z(function(){if(!(!t||c)){if(d.current>1e5){console.error(`useDailyEvent called with potentially non-memoized event callback or due to too many re-renders.
34
34
  Memoize using useCallback to avoid re-render loop or reduce the amount of state transitions the callback depends on.
35
- Passed callback for '`.concat(t,"' event is NOT registered."),n),l(!0);return}d.current++;var p=setTimeout(function(){d.current=0},50);return o(t,n,f),function(){clearTimeout(p),a(t,f)}}},[n,t,f,c,a,o]),Xe({event:t,eventId:f,isBlocked:c,callback:n})};function wt(e,t){var n,r;if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!wt(e[i],t[i]))return!1;return!0}if(MediaStream&&e instanceof MediaStream&&t instanceof MediaStream)return e.id===t.id&&e.active===t.active&&e.getTracks().length===t.getTracks().length&&e.getTracks().every(function(y,v){return wt(y,t.getTracks()[v])});if(MediaStreamTrack&&e instanceof MediaStreamTrack&&t instanceof MediaStreamTrack)return e.id===t.id&&e.kind===t.kind&&e.readyState===t.readyState;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;var a=Array.from(e).sort(),o=Array.from(t).sort();return a.every(function(y,v){return wt(y,o[v])})}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;try{for(var s=wf(e.entries()),c=s.next();!c.done;c=s.next()){var l=be(c.value,2),d=l[0],f=l[1];if(!t.has(d)||!wt(f,t.get(d)))return!1}}catch(y){n={error:y}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return!0}if(rt(e)!=="object"||e===null||rt(t)!=="object"||t===null)return!1;var p=Object.keys(e),g=Object.keys(t);if(p.length!==g.length)return!1;for(var i=0;i<p.length;i++){var d=p[i];if(!Object.prototype.hasOwnProperty.call(t,d)||!wt(e[d],t[d]))return!1}return!0}function ts(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],i=t[n],a=r!==null&&rt(r)==="object",o=i!==null&&rt(i)==="object";if(a||o){if(!wt(r,i))return!1}else if(r!==i)return!1}return!0}function pe(e){return"daily-react-"+e}function ns(e){var t=new Map,n=new Map;return function(r){if(!t.has(r)){var i=oe(function(a){var o=e.get(r)(a),s=n.get(r);return s!=null&&e.equals(o,s)?s:(n.set(r,o),o)});t.set(r,i)}return t.get(r)}}var rs="::",Sf=";",is=function(t,n){return t+rs+n},c0=function(t,n){return t+rs+n.join(Sf)},Ue=function(t,n){return as(is(t,n))},qn=dr(function(e){var t=oe([]);return t.debugLabel=pe("participant-property-paths-".concat(e)),t}),as=dr(function(e){var t=oe(null);return t.debugLabel=pe("participant-property-".concat(e)),t}),l0=ns({equals:ts,get:function(t){return function(n){var r=be(t.split(rs),2),i=r[0],a=r[1],o=a.split(Sf);return o.map(function(s){return n(Ue(i,s))})}}}),xf=function(t,n){var r,i=Zt(Array.isArray(n)?l0(c0(t,n)):as(is(t,n)));return Xe(Array.isArray(n)?n.reduce(function(a,o,s){return a[o]=i[s],a},{}):(r={},r[n]=i,r)),i},Wi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function u0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var os,Tf;function d0(){if(Tf)return os;Tf=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,c=rt(Wi)=="object"&&Wi&&Wi.Object===Object&&Wi,l=(typeof self>"u"?"undefined":rt(self))=="object"&&self&&self.Object===Object&&self,d=c||l||Function("return this")(),f=Object.prototype,p=f.toString,g=Math.max,y=Math.min,v=function(){return d.Date.now()};function b(C,A,E){var R,F,j,z,V,ee,ie=0,me=!1,K=!1,B=!0;if(typeof C!="function")throw new TypeError(e);A=x(A)||0,k(E)&&(me=!!E.leading,K="maxWait"in E,j=K?g(x(E.maxWait)||0,A):j,B="trailing"in E?!!E.trailing:B);function W(P){var D=R,L=F;return R=F=void 0,ie=P,z=C.apply(L,D),z}function G(P){return ie=P,V=setTimeout(u,A),me?W(P):z}function Ge(P){var D=P-ee,L=P-ie,$=A-D;return K?y($,j-L):$}function ht(P){var D=P-ee,L=P-ie;return ee===void 0||D>=A||D<0||K&&L>=j}function u(){var P=v();if(ht(P))return m(P);V=setTimeout(u,Ge(P))}function m(P){return V=void 0,B&&R?W(P):(R=F=void 0,z)}function h(){V!==void 0&&clearTimeout(V),ie=0,R=ee=F=V=void 0}function w(){return V===void 0?z:m(v())}function S(){var P=v(),D=ht(P);if(R=arguments,F=this,ee=P,D){if(V===void 0)return G(ee);if(K)return V=setTimeout(u,A),W(ee)}return V===void 0&&(V=setTimeout(u,A)),z}return S.cancel=h,S.flush=w,S}function _(C,A,E){var R=!0,F=!0;if(typeof C!="function")throw new TypeError(e);return k(E)&&(R="leading"in E?!!E.leading:R,F="trailing"in E?!!E.trailing:F),b(C,A,{leading:R,maxWait:A,trailing:F})}function k(C){var A=rt(C);return!!C&&(A=="object"||A=="function")}function T(C){return!!C&&rt(C)=="object"}function M(C){return rt(C)=="symbol"||T(C)&&p.call(C)==n}function x(C){if(typeof C=="number")return C;if(M(C))return t;if(k(C)){var A=typeof C.valueOf=="function"?C.valueOf():C;C=k(A)?A+"":A}if(typeof C!="string")return C===0?C:+C;C=C.replace(r,"");var E=a.test(C);return E||o.test(C)?s(C.slice(2),E?2:8):i.test(C)?t:+C}return os=_,os}var f0=d0(),h0=u0(f0),Ji=function(t,n,r,i){r===void 0&&(r=500),i===void 0&&(i=!1);var a=ge(Qo),o=a.off,s=a.on,c=Ve(function(){var f;return Array.isArray(t)?t.reduce(function(p,g){return p[g]=i?Zo():es(),p},{}):(f={},f[t]=i?Zo():es(),f)},[t,i]),l=de([]);J("call-instance-destroyed",N(function(){l.current.length=0},[]));var d=Ve(function(){return h0(function(){l.current.length!==0&&(n(l.current),l.current.length=0)},r,{trailing:!0})},[n,r]);X(function(){if(t){var f=function(g){l.current.push(g),d()};return Array.isArray(t)?t.forEach(function(p){return s(p,f,c[p])}):s(t,f,c[t]),function(){Array.isArray(t)?t.forEach(function(p){return o(p,c[p])}):o(t,c[t])}}},[d,t,c,o,s]),Xe({event:t,eventId:c})},Mf=function(t,n,r){if(n===void 0&&(n=""),r===void 0&&(r=new Set),rt(t)!=="object"||t===null||r.has(t))return[n];r.add(t);var i=[];for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var o=n?"".concat(n,".").concat(a):a;i.push.apply(i,$e([o],be(Mf(t[a],o,r)),!1))}return r.delete(t),i},ss=function(t){return Mf(t)},p0=function(t,n){return String(n).split(".").filter(function(r){return r.length}).reduce(function(r,i){return r&&r[i]},t)},cs=function(t,n){return n.map(function(r){return p0(t,r)})},qi=oe(null);qi.debugLabel=pe("active-id");var Tr=oe("");Tr.debugLabel=pe("local-id");var Cf=oe(null);Cf.debugLabel=pe("local-join-date");var gn=oe([]);gn.debugLabel=pe("participant-ids");var vn=dr(function(e){var t=oe(null);return t.debugLabel=pe("participant-".concat(e)),t}),ls=oe([]);ls.debugLabel=pe("waiting-participants");var us=dr(function(e){var t=oe({awaitingAccess:{level:"full"},id:e,name:""});return t.debugLabel=pe("waiting-participant-".concat(e)),t}),m0=function(t){var n=t.children,r=_t(),i=be(Z(!1),2),a=i[0],o=i[1],s=re(N(function(d,f,p){f(Tr,p.local.session_id);var g=Object.values(p),y=g.map(function(v){return v.session_id});f(gn,y),g.forEach(function(v){f(vn(v.session_id),v);var b=ss(v);f(qn(v.session_id),b),b.forEach(function(_){var k=be(cs(v,[_]),1),T=k[0];f(Ue(v.session_id,_),T)})}),o(!0)},[]));X(function(){if(!(!r||a)){var d=setInterval(function(){var f=r.participants();"local"in f&&(s(f),clearInterval(d))},100);return function(){clearInterval(d)}}},[r,a,s]);var c=N(function(){if(r){var d=r?.participants();d.local&&s(d)}},[r,s]);J("started-camera",c,!0),J("access-state-updated",c,!0),J("joining-meeting",re(N(function(d,f){f(Cf,new Date),c()},[c])),!0),J("joined-meeting",N(function(d){s(d.participants)},[s]),!0);var l=re(N(function(d,f){f(Tr,""),f(qi,null);var p=d(gn);p.forEach(function(g){return vn.remove(g)}),f(gn,[])},[]));return J("call-instance-destroyed",l,!0),J("left-meeting",l,!0),Ji(["active-speaker-change","participant-joined","participant-updated","participant-left"],re(N(function(d,f,p){p.length&&p.forEach(function(g){switch(g.action){case"active-speaker-change":{f(qi,g.activeSpeaker.peerId),f(vn(g.activeSpeaker.peerId),function(M){return M?ne(ne({},M),{last_active:new Date}):null});break}case"participant-joined":{f(gn,function(M){return M.includes(g.participant.session_id)?M:$e($e([],be(M),!1),[g.participant.session_id],!1)}),f(vn(g.participant.session_id),g.participant);var y=ss(g.participant);f(qn(g.participant.session_id),y),y.forEach(function(M){var x=be(cs(g.participant,[M]),1),C=x[0];f(Ue(g.participant.session_id,M),C)});break}case"participant-updated":{f(vn(g.participant.session_id),g.participant),g.participant.local&&f(Tr,g.participant.session_id);var y=ss(g.participant),v=d(qn(g.participant.session_id)),b=y.length!==v.length||y.some(function(x){return!v.includes(x)});b&&f(qn(g.participant.session_id),y);var _=new Set(v),k=cs(g.participant,y);y.forEach(function(x,C){var A=k[C];_.delete(x),f(Ue(g.participant.session_id,x),function(E){return wt(E,A)?E:A})}),_.forEach(function(x){f(Ue(g.participant.session_id,x),null)});break}case"participant-left":{f(gn,function(M){return M.includes(g.participant.session_id)?M.filter(function(x){return x!==g.participant.session_id}):M}),vn.remove(g.participant.session_id);var T=d(qn(g.participant.session_id));T.forEach(function(M){as.remove(is(g.participant.session_id,M))}),qn.remove(g.participant.session_id);break}}})},[])),100,!0),Ji(["waiting-participant-added","waiting-participant-updated","waiting-participant-removed"],re(N(function(d,f,p){p.forEach(function(g){switch(g.action){case"waiting-participant-added":f(ls,function(y){return y.includes(g.participant.id)?y:$e($e([],be(y),!1),[g.participant.id],!1)}),f(us(g.participant.id),g.participant);break;case"waiting-participant-updated":f(us(g.participant.id),g.participant);break;case"waiting-participant-removed":f(ls,function(y){return y.filter(function(v){return v!==g.participant.id})}),us.remove(g.participant.id);break}})},[])),100,!0),le.createElement(le.Fragment,null,n)},Hi=function(){var t=Zt(Tr);return Xe(t),t},g0=function(){return!0},v0=function(t){var n=t===void 0?{}:t,r=n.filter,i=r===void 0?g0:r,a=n.ignoreLocal,o=a===void 0?!1:a,s=Hi(),c=Zt(qi),l=o&&c===s,d=!i?.(c),f=!l&&!d,p=be(Z(f?c:null),2),g=p[0],y=p[1];return X(function(){l||d||y(c)},[d,l,c]),Xe(g),g},Gi=function(t){return["blocked","off"].includes(t)},Pf=";",Ef=function(t,n){return"".concat(t).concat(Pf).concat(n)},Af=ns({equals:wt,get:function(t){return function(n){var r=be(t.split(Pf),2),i=r[0],a=r[1],o=n(gn);return o.filter(function(s){switch(i){case"local":case"owner":case"record":return n(Ue(s,i));case"remote":return!n(Ue(s,"local"));case"screen":{var c=n(Ue(s,"tracks.screenAudio.state")),l=n(Ue(s,"tracks.screenVideo.state"));return!Gi(c)||!Gi(l)}default:return!0}}).sort(function(s,c){switch(a){case"joined_at":case"session_id":case"user_id":case"user_name":{var l=n(Ue(s,a)),d=n(Ue(c,a));if(l!==void 0||d!==void 0){if(l===void 0)return-1;if(d===void 0||l>d)return 1;if(l<d)return-1}return 0}default:return 0}})}}}),yn=function(t){var n=t===void 0?{}:t,r=n.filter,i=n.onActiveSpeakerChange,a=n.onParticipantJoined,o=n.onParticipantLeft,s=n.onParticipantUpdated,c=n.sort,l=Zt(Af(Ef(typeof r=="string"?r:null,typeof c=="string"?c:null))),d=typeof r=="function"||typeof c=="function",f=N(function(_){if(typeof r!="function"&&typeof c!="function")return[];var k=l.map(function(T){return _(vn(T))});return k.filter(function(T){return!!T}).filter(typeof r=="function"?r:function(){return!0}).sort(typeof c=="function"?c:function(){return 0}).map(function(T){return T.session_id}).filter(Boolean)},[r,l,c]),p=be(Z([]),2),g=p[0],y=p[1],v=re(N(function(_){if(d){var k=f(_);wt(k,g)||y(k)}},[g,f,d]));X(function(){v()},[v]),Ji(["participant-joined","participant-updated","active-speaker-change","participant-left"],N(function(_){_.length&&(_.forEach(function(k){switch(k.action){case"participant-joined":a?.(k);break;case"participant-updated":s?.(k);break;case"active-speaker-change":i?.(k);break;case"participant-left":o?.(k);break}}),v())},[v,i,a,o,s]));var b=typeof r=="function"||typeof c=="function"?g:l;return Xe(b),b},y0=ns({equals:ts,get:function(){return function(t){var n=t(Af(Ef("screen",null)));return n.map(function(r){return{local:t(Ue(r,"local")),screenAudio:t(Ue(r,"tracks.screenAudio")),screenVideo:t(Ue(r,"tracks.screenVideo")),screenId:"".concat(r,"-screen"),session_id:r}})}}}),b0=function(t){var n={},r=n.onError,i=n.onLocalScreenShareStarted,a=n.onLocalScreenShareStopped,o=_t(),s=N(function(){for(var f=[],p=0;p<arguments.length;p++)f[p]=arguments[p];o?.startScreenShare.apply(o,$e([],be(f),!1))},[o]),c=N(function(){for(var f=[],p=0;p<arguments.length;p++)f[p]=arguments[p];o?.stopScreenShare.apply(o,$e([],be(f),!1))},[o]);J("local-screen-share-started",N(function(){return i?.()},[i])),J("local-screen-share-stopped",N(function(){return a?.()},[a])),J("nonfatal-error",N(function(f){f.type==="screen-share-error"&&r?.(f)},[r]));var l=Zt(y0(void 0)),d={isSharingScreen:l.some(function(f){return f.local}),screens:l,startScreenShare:s,stopScreenShare:c};return Xe(d),d},Of=function(t,n){n===void 0&&(n="video");var r=xf(t,"tracks.".concat(n)),i=r?ne(ne({},r),{isOff:Gi(r.state)}):{isOff:!0,persistentTrack:void 0,state:"off",subscribed:!1};return Xe(i),i};function If(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return N(function(n){for(var r=0;r<e.length;r++){var i=e[r];typeof i=="function"?i(n):i&&rt(i)==="object"&&(i.current=n)}},e)}var Ki=Ba(Qe(function(e,t){var n=e.onPlayFailed,r=e.sessionId,i=e.type,a=i===void 0?"audio":i,o=Xo(e,["onPlayFailed","sessionId","type"]),s=de(null),c=Of(r,a),l=If(s,t),d=c?.subscribed;return X(function(){var f=s.current;if(!(!f||!c?.persistentTrack)){var p=function(){f.play().catch(function(y){n?.({sessionId:r,target:f,type:a,message:y.message,name:y.name})})};if(!MediaStream){console.warn("MediaStream API not available. Can't setup ".concat(a," for ").concat(r)),n?.({sessionId:r,target:f,type:a,message:"MediaStream API not available",name:"MediaStream API not available"});return}return f.addEventListener("canplay",p),f.srcObject=new MediaStream([c?.persistentTrack]),function(){f?.removeEventListener("canplay",p)}}},[c?.persistentTrack,n,r,a]),J("participant-left",N(function(f){var p=s.current;f.participant.session_id!==r||!p||(p.srcObject=null)},[r])),le.createElement("audio",ne({autoPlay:!0,ref:l},o,{"data-session-id":r,"data-audio-type":a,"data-subscribed":d}))}));Ki.displayName="DailyAudioTrack";var Df=Ba(Qe(function(e,t){var n=e.autoSubscribeActiveSpeaker,r=n===void 0?!1:n,i=e.maxSpeakers,a=i===void 0?5:i,o=e.onPlayFailed,s=e.playLocalScreenAudio,c=s===void 0?!1:s,l=_t(),d=be(Z(new Array(a).fill("")),2),f=d[0],p=d[1],g=b0().screens,y=Hi(),v=v0({ignoreLocal:!0}),b=de(null);Aa(t,function(){return{getActiveSpeakerAudio:function(){var x,C;return(C=(x=b.current)===null||x===void 0?void 0:x.querySelector('audio[data-session-id="'.concat(v,'"][data-audio-type="audio"]')))!==null&&C!==void 0?C:null},getAllAudio:function(){var x,C;return Array.from((C=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll("audio"))!==null&&C!==void 0?C:[])},getAudioBySessionId:function(x){var C,A;return(A=(C=b.current)===null||C===void 0?void 0:C.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="audio"]')))!==null&&A!==void 0?A:null},getRmpAudio:function(){var x,C;return Array.from((C=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll('audio[data-audio-type="rmpAudio"]'))!==null&&C!==void 0?C:[])},getScreenAudio:function(){var x,C;return Array.from((C=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll('audio[data-audio-type="screenAudio"]'))!==null&&C!==void 0?C:[])},getRmpAudioBySessionId:function(x){var C,A;return(A=(C=b.current)===null||C===void 0?void 0:C.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="rmpAudio"]')))!==null&&A!==void 0?A:null},getScreenAudioBySessionId:function(x){var C,A;return(A=(C=b.current)===null||C===void 0?void 0:C.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="screenAudio"]')))!==null&&A!==void 0?A:null}}},[v]);var _=re(N(function(M,x,C){return Wn(void 0,void 0,void 0,function(){var A,E,R;return Jn(this,function(F){if(A=Object.values((R=l?.participants())!==null&&R!==void 0?R:{}).filter(function(j){return!j.local&&!!j.tracks.audio.subscribed}),E=function(z){return A.some(function(V){return V.session_id===z})},!E(C))if(l&&!l.isDestroyed()&&r&&!l.subscribeToTracksAutomatically())l.updateParticipant(C,{setSubscribedTracks:{audio:!0}});else return[2];return p(function(j){var z;if(j.includes(C))return j;var V=function(G){return!G||!E(G)};if(j.some(V)){var ee=j.findIndex(V);return j[ee]=C,$e([],be(j),!1)}var ie=j.findIndex(function(W){return A.some(function(G){return G.session_id===W&&Gi(G.tracks.audio.state)})});if(ie>=0)return j[ie]=C,$e([],be(j),!1);var me=A.filter(function(W){return j.includes(W.session_id)&&W.session_id!==v}).sort(function(W,G){var Ge,ht,u=(Ge=M(Ue(W.session_id,"last_active")))!==null&&Ge!==void 0?Ge:new Date("1970-01-01"),m=(ht=M(Ue(G.session_id,"last_active")))!==null&&ht!==void 0?ht:new Date("1970-01-01");return u>m?1:u<m?-1:0});if(!me.length){var K=j.findIndex(function(W){return W!==v});return j[K]=C,$e([],be(j),!1)}var B=j.indexOf((z=me[0])===null||z===void 0?void 0:z.session_id);return j[B]=C,$e([],be(j),!1)}),[2]})})},[v,r,l])),k=N(function(M){p(function(x){if(!x.includes(M))return x;var C=$e([],be(x),!1),A=C.indexOf(M);return C[A]="",C})},[]);Ji(["active-speaker-change","track-started","participant-left"],N(function(M){M.forEach(function(x){switch(x.action){case"active-speaker-change":if(x.activeSpeaker.peerId===y)return;_(x.activeSpeaker.peerId);break;case"track-started":x.track.kind==="audio"&&x.participant&&!x.participant.local&&_(x.participant.session_id);break;case"participant-left":k(x.participant.session_id);break}})},[_,y,k]),200);var T=yn({filter:N(function(M){var x;return!!(!((x=M?.tracks)===null||x===void 0)&&x.rmpAudio)},[])});return le.createElement("div",{ref:b},f.map(function(M,x){return le.createElement(Ki,{key:"speaker-slot-".concat(x),onPlayFailed:o,sessionId:M,type:"audio"})}),g.filter(function(M){return c?!0:!M.local}).map(function(M){return le.createElement(Ki,{key:M.screenId,onPlayFailed:o,sessionId:M.session_id,type:"screenAudio"})}),T.map(function(M){return le.createElement(Ki,{key:"".concat(M,"-rmp"),onPlayFailed:o,sessionId:M,type:"rmpAudio"})}))}));Df.displayName="DailyAudio";var Lf=Qe(function(t,n){var r=t.automirror,i=t.fit,a=i===void 0?"contain":i,o=t.mirror,s=t.onResize,c=t.playableStyle,l=c===void 0?{}:c,d=t.sessionId,f=t.style,p=f===void 0?{}:f,g=t.type,y=g===void 0?"video":g,v=Xo(t,["automirror","fit","mirror","onResize","playableStyle","sessionId","style","type"]),b=Hi(),_=b===d,k=y==="screenVideo",T=_&&!k,M=de(null),x=If(M,n),C=Of(d,y),A=C.persistentTrack,E=T||k||!C.isOff,R=xf(d,"tracks.".concat(y)),F=R?.subscribed,j=Ve(function(){if(typeof o=="boolean")return o;if(!r)return!1;if(!A)return T;var z=A.getSettings(),V="facingMode"in z?T&&z.facingMode==="user":T;return V},[r,T,o,A]);return X(function(){var V=M.current;if(V){var ee=function(){var G=V.play();G!==void 0&&G.then(function(){V.controls=!1}).catch(function(Ge){V.controls=!0,console.warn("Failed to play video",Ge)})},ie=function(){V.paused&&ee()},me=function(){V.style.transform="scale(1)"},K=function(){V.style.transform="",setTimeout(function(){V.paused&&ee()},100)},B=function(){document.visibilityState!=="hidden"&&V.paused&&ee()};return V.addEventListener("canplay",ie),V.addEventListener("enterpictureinpicture",me),V.addEventListener("leavepictureinpicture",K),document.addEventListener("visibilitychange",B),function(){V.removeEventListener("canplay",ie),V.removeEventListener("enterpictureinpicture",me),V.removeEventListener("leavepictureinpicture",K),document.removeEventListener("visibilitychange",B)}}},[]),X(function(){var V=M.current;if(!(!V||!A)){if(!MediaStream){console.warn("MediaStream API not available. Can't setup ".concat(y," for ").concat(d));return}return V.srcObject=new MediaStream([A]),V.load(),function(){V.srcObject=null,V.load()}}},[d,y,A,A?.id]),X(function(){var V=M.current;if(!s||!V)return;var ee;function ie(){ee&&cancelAnimationFrame(ee),ee=requestAnimationFrame(function(){var me=M.current;if(!(!me||document.hidden)){var K=me.videoWidth,B=me.videoHeight;K&&B&&s?.({aspectRatio:K/B,height:B,width:K})}})}return ie(),V.addEventListener("loadedmetadata",ie),V.addEventListener("resize",ie),function(){ee&&cancelAnimationFrame(ee),V.removeEventListener("loadedmetadata",ie),V.removeEventListener("resize",ie)}},[s]),le.createElement("video",ne({autoPlay:!0,muted:!0,playsInline:!0,ref:x,"data-local":_,"data-mirrored":j||void 0,"data-playable":E||void 0,"data-session-id":d,"data-subscribed":F,"data-video-type":y,style:ne(ne({objectFit:a,transform:j?"scale(-1, 1)":""},p),E?l:{})},v))});Lf.displayName="DailyVideo";var _0=Ie({refreshDevices:function(){return Promise.resolve()}}),Ee=oe("idle");Ee.debugLabel=pe("camera-state");var Ae=oe("idle");Ae.debugLabel=pe("microphone-state");var Yi=oe([]);Yi.debugLabel=pe("camera-devices");var Xi=oe([]);Xi.debugLabel=pe("microphone-devices");var jf=oe([]);jf.debugLabel=pe("speaker-devices");var Rf=oe(null);Rf.debugLabel=pe("last-camera-error");var w0=function(t){var n=t.children,r=_t(),i=re(N(function(o,s){return Wn(void 0,void 0,void 0,function(){var c,l,d,f,p,g,y,v,b,_,k,T;return Jn(this,function(M){switch(M.label){case 0:if(typeof((k=navigator?.mediaDevices)===null||k===void 0?void 0:k.getUserMedia)>"u"||typeof((T=navigator?.mediaDevices)===null||T===void 0?void 0:T.enumerateDevices)>"u")return s(Ee,"not-supported"),s(Ae,"not-supported"),[2];if(!r)return[2];M.label=1;case 1:return M.trys.push([1,4,,5]),[4,r.enumerateDevices()];case 2:return c=M.sent().devices,l=c.filter(function(x){return x.kind==="videoinput"&&x.deviceId!==""}),d=c.filter(function(x){return x.kind==="audioinput"&&x.deviceId!==""}),f=c.filter(function(x){return x.kind==="audiooutput"&&x.deviceId!==""}),[4,r.getInputDevices()];case 3:return p=M.sent(),g=p.camera,y=p.mic,v=p.speaker,b=function(C,A,E){var R,F=E.find(function(V){return V.device.deviceId===A.deviceId}),j="deviceId"in C&&A.deviceId===C.deviceId,z=!("deviceId"in C)&&F?.selected;return{device:A,selected:j||!!z,state:(R=F?.state)!==null&&R!==void 0?R:"granted"}},_=function(C,A){return C.device.deviceId==="default"?-1:A.device.deviceId==="default"?1:C.device.label<A.device.label?-1:C.device.label>A.device.label?1:0},s(Yi,function(x){return l.filter(Boolean).map(function(C){return b(g,C,x)}).sort(_)}),s(Xi,function(x){return d.filter(Boolean).map(function(C){return b(y,C,x)}).sort(_)}),s(jf,function(x){return f.filter(Boolean).map(function(C){return b(v,C,x)}).sort(_)}),[3,5];case 4:return M.sent(),s(Ee,"not-supported"),s(Ae,"not-supported"),[3,5];case 5:return[2]}})})},[r])),a=re(N(function(o,s){return Wn(void 0,void 0,void 0,function(){var c,l,d,f,p,g,y,v,b,_,k,T,M,x,C,A,E,R,F,j,z,V,ee,ie,me,K;return Jn(this,function(B){switch(B.label){case 0:if(!r)return[2];if(c=o(Ee),l=o(Ae),d=r.participants(),!d.local)return[2];if(f=d.local.tracks,p="prompt",g="prompt",!navigator.permissions)return[3,5];B.label=1;case 1:return B.trys.push([1,4,,5]),[4,navigator.permissions.query({name:"camera"})];case 2:return y=B.sent(),p=y.state,[4,navigator.permissions.query({name:"microphone"})];case 3:return v=B.sent(),g=v.state,[3,5];case 4:return B.sent(),[3,5];case 5:return b=p==="prompt"&&["idle","pending"].includes(c)&&f.video.state==="interrupted"&&!f.video.persistentTrack,_=["idle","pending"].includes(c)&&!f.video.persistentTrack&&!!(!((M=f.video.off)===null||M===void 0)&&M.byUser),k=g==="prompt"&&["idle","pending"].includes(l)&&f.audio.state==="interrupted"&&!f.audio.persistentTrack,T=["idle","pending"].includes(l)&&!f.audio.persistentTrack&&!!(!((x=f.audio.off)===null||x===void 0)&&x.byUser),!((A=(C=f.audio)===null||C===void 0?void 0:C.blocked)===null||A===void 0)&&A.byDeviceInUse?(s(Ae,"in-use"),s(Xi,function(W){return W.map(function(G){return G.selected?ne(ne({},G),{state:"in-use"}):G})})):!((R=(E=f.audio)===null||E===void 0?void 0:E.blocked)===null||R===void 0)&&R.byDeviceMissing?s(Ae,"not-found"):!((j=(F=f.audio)===null||F===void 0?void 0:F.blocked)===null||j===void 0)&&j.byPermissions||g==="denied"?s(Ae,"blocked"):k?s(Ae,"pending"):T?s(Ae,"idle"):(s(Ae,"granted"),s(Xi,function(W){return W.map(function(G){return G.selected?ne(ne({},G),{state:"granted"}):G})})),!((V=(z=f.video)===null||z===void 0?void 0:z.blocked)===null||V===void 0)&&V.byDeviceInUse?(s(Ee,"in-use"),s(Yi,function(W){return W.map(function(G){return G.selected?ne(ne({},G),{state:"in-use"}):G})})):!((ie=(ee=f.video)===null||ee===void 0?void 0:ee.blocked)===null||ie===void 0)&&ie.byDeviceMissing?s(Ee,"not-found"):!((K=(me=f.video)===null||me===void 0?void 0:me.blocked)===null||K===void 0)&&K.byPermissions||p==="denied"?s(Ee,"blocked"):b?s(Ee,"pending"):_?s(Ee,"idle"):(s(Ee,"granted"),s(Yi,function(W){return W.map(function(G){return G.selected?ne(ne({},G),{state:"granted"}):G})})),i(),[2]}})})},[r,i]));return J("participant-updated",N(function(o){o.participant.local&&a()},[a])),J("available-devices-updated",i),J("selected-devices-updated",i),J("camera-error",re(N(function(o,s,c){var l,d,f,p,g,y,v;switch(s(Rf,c.error),(l=c.error)===null||l===void 0?void 0:l.type){case"cam-in-use":s(Ee,"in-use");break;case"mic-in-use":s(Ae,"in-use");break;case"cam-mic-in-use":s(Ee,"in-use"),s(Ae,"in-use");break;case"not-found":!((d=c.error)===null||d===void 0)&&d.missingMedia.includes("video")&&s(Ee,"not-found"),!((f=c.error)===null||f===void 0)&&f.missingMedia.includes("audio")&&s(Ae,"not-found");break;case"permissions":!((p=c.error)===null||p===void 0)&&p.blockedMedia.includes("video")&&s(Ee,"blocked"),!((g=c.error)===null||g===void 0)&&g.blockedMedia.includes("audio")&&s(Ae,"blocked");break;case"constraints":((y=c.error)===null||y===void 0?void 0:y.reason)==="invalid"?(s(Ee,"constraints-invalid"),s(Ae,"constraints-invalid")):((v=c.error)===null||v===void 0?void 0:v.reason)==="none-specified"&&(s(Ee,"constraints-none-specified"),s(Ae,"constraints-none-specified"));break;case"undefined-mediadevices":s(Ee,"undefined-mediadevices"),s(Ae,"undefined-mediadevices");break;case"unknown":default:s(Ee,"unknown"),s(Ae,"unknown");break}},[]))),J("started-camera",re(N(function(o,s){s(Ee,"granted"),s(Ae,"granted"),a()},[a]))),le.createElement(_0.Provider,{value:{refreshDevices:i}},n)},Mr=oe({errorMsg:void 0,isLiveStreaming:!1,layout:void 0});Mr.debugLabel=pe("live-streaming");var k0=function(t){var n=t.children;return J("live-streaming-started",re(N(function(r,i,a){i(Mr,{isLiveStreaming:!0,layout:a?.layout})},[]))),J("live-streaming-stopped",re(N(function(r,i){i(Mr,function(a){return ne(ne({},a),{isLiveStreaming:!1,layout:void 0})})},[]))),J("live-streaming-error",re(N(function(r,i,a){i(Mr,function(o){return ne(ne({},o),{errorMsg:a.errorMsg})})},[]))),J("left-meeting",re(N(function(r,i){i(Mr,{errorMsg:void 0,isLiveStreaming:!1,layout:void 0})},[]))),le.createElement(le.Fragment,null,n)},Qi=oe("new");Qi.debugLabel=pe("meeting-state");var ds=oe(null);ds.debugLabel=pe("meeting-error");var fs=oe(null);fs.debugLabel=pe("non-fatal-error");var Cr=oe({data:void 0,topology:"none"});Cr.debugLabel=pe("meeting-session-data");var S0=function(t){var n=t.children,r=_t(),i=re(N(function(o,s){if(r){var c=r.meetingState();return s(Qi,c),c}},[r]));J("loading",i),J("loaded",i),J("joining-meeting",i),J("joined-meeting",i),J("left-meeting",i),J("error",re(N(function(o,s,c){s(ds,c),i()},[i]))),J("nonfatal-error",re(N(function(o,s,c){s(fs,c)},[])));var a=re(N(function(o,s){r&&s(Cr,r.meetingSessionState())},[r]));return J("joined-meeting",a),J("meeting-session-state-updated",re(N(function(o,s,c){s(Cr,c.meetingSessionState)},[]))),J("left-meeting",re(N(function(o,s){s(Cr,{data:void 0,topology:"none"})},[]))),J("call-instance-destroyed",re(N(function(o,s){s(Qi,"new"),s(ds,null),s(fs,null),s(Cr,{data:void 0,topology:"none"})},[]))),le.createElement(le.Fragment,null,n)},Hn=oe("none");Hn.debugLabel=pe("topology");var Vf=oe("unknown"),Nf=oe([]),hs=oe(100);hs.debugLabel=pe("network-quality");var ps=oe("good");ps.debugLabel=pe("network-threshold");var x0=function(t){var n=t.children,r=_t(),i=Zt(Hn),a=re(N(function(o,s){return Wn(void 0,void 0,void 0,function(){var c;return Jn(this,function(l){switch(l.label){case 0:return r?[4,r.getNetworkTopology()]:[2];case 1:return c=l.sent(),!c||c?.topology==="none"?[2]:(s(Hn,c.topology),[2])}})})},[r]));return J("joined-meeting",a),J("network-connection",re(N(function(o,s,c){switch(c.event){case"connected":c.type==="peer-to-peer"&&s(Hn,"peer"),c.type==="sfu"&&s(Hn,"sfu");break}},[]))),J("network-quality-change",re(N(function(o,s,c){s(Vf,function(l){return l!==c.networkState?c.networkState:l}),s(Nf,function(l){var d,f=(d=c.networkStateReasons)!==null&&d!==void 0?d:[];return ts(l,f)?l:f}),s(hs,function(l){return l!==c.quality?c.quality:l}),s(ps,function(l){return l!==c.threshold?c.threshold:l})},[]))),J("left-meeting",re(N(function(o,s){s(Hn,"none"),s(Vf,"unknown"),s(Nf,[]),s(hs,100),s(ps,"good")},[]))),X(function(){!r||i!=="none"||a()},[r,a,i]),le.createElement(le.Fragment,null,n)},bn=oe({isLocalParticipantRecorded:!1,isRecording:!1});bn.debugLabel=pe("recording-state");var T0=function(t){var n=t.children,r=Hi(),i=yn({filter:"record"}),a=re(N(function(o,s,c,l){var d=o(bn),f={isLocalParticipantRecorded:d.isLocalParticipantRecorded,isRecording:d.isRecording,local:d.local,type:d.type},p={isLocalParticipantRecorded:f?.type==="local"||!f?.type?c:f.isLocalParticipantRecorded,isRecording:f?.type==="local"||!f?.type?c:f.isRecording,local:(f?.type==="local"||!f?.type)&&c?l:f?.local,type:c?"local":d?.type};wt(f,p)||s(bn,ne(ne({},f),p))},[]));return X(function(){var o=i.length>0,s=i.includes(r||"local");a(o,s)},[r,a,i]),J("recording-started",re(N(function(o,s,c){var l,d=!0;switch(c.type){case"cloud-beta":case"cloud":{r&&((l=c.layout)===null||l===void 0?void 0:l.preset)==="single-participant"&&c.layout.session_id!==r&&(d=!1);break}}s(bn,{error:!1,isLocalParticipantRecorded:d,isRecording:!0,layout:c?.layout,local:c?.local,recordingId:c?.recordingId,recordingStartedDate:new Date,startedBy:c?.startedBy,type:c?.type})},[r]))),J("recording-stopped",re(N(function(o,s){s(bn,function(c){return ne(ne({},c),{isLocalParticipantRecorded:!1,isRecording:!1})})},[]))),J("recording-error",re(N(function(o,s){s(bn,function(c){return ne(ne({},c),{error:!0,isLocalParticipantRecorded:!1,isRecording:!1})})},[]))),J("left-meeting",re(N(function(o,s){s(bn,{isLocalParticipantRecorded:!1,isRecording:!1})},[]))),le.createElement(le.Fragment,null,n)},M0=function(){var t=Zt(Qi);return Xe(t),t},ms=oe(null);ms.debugLabel=pe("room-state");var C0=function(t){var n=t.children,r=_t(),i=M0(),a=re(N(function(o,s){return Wn(void 0,void 0,void 0,function(){var c;return Jn(this,function(l){switch(l.label){case 0:return!r||i==="left-meeting"?[2]:[4,r.room()];case 1:return c=l.sent(),c&&"id"in c&&s(ms,c),[2,c]}})})},[r,i]));return J("access-state-updated",a),J("left-meeting",re(N(function(o,s){return function(){s(ms,null)}},[]))),le.createElement(le.Fragment,null,n)},Gn=oe({isTranscribing:!1,model:"general",language:"en",transcriptions:[]});Gn.debugLabel=pe("transcription-state");var P0=function(t){var n=t.children;return J("transcription-started",re(N(function(r,i,a){i(Gn,{error:!1,transcriptionStartDate:new Date,isTranscribing:!0,transcriptions:[],endpointing:a.endpointing,extra:a.extra,includeRawResponse:a.includeRawResponse,instanceId:a.instanceId,language:a.language,model:a.model,profanity_filter:a.profanity_filter,punctuate:a.punctuate,redact:a.redact,startedBy:a.startedBy,tier:a.tier})},[]))),J("transcription-stopped",re(N(function(r,i,a){i(Gn,function(o){return ne(ne({},o),{updatedBy:a.updatedBy,isTranscribing:!1})})},[]))),J("transcription-error",re(N(function(r,i){i(Gn,function(a){return ne(ne({},a),{error:!0,isTranscribing:!1})})},[]))),J("left-meeting",re(N(function(r,i){i(Gn,function(a){return ne(ne({},a),{isTranscribing:!1})})},[]))),J("app-message",re(N(function(r,i,a){a?.fromId==="transcription"&&i(Gn,function(o){return ne(ne({},o),{isTranscribing:!0,transcriptions:$e($e([],be(o.transcriptions),!1),[a.data],!1)})})},[]))),le.createElement(le.Fragment,null,n)},Ff={strictMode:!0},Bf=function(){return!0},E0={options:Ff,shouldCreateInstance:Bf},A0=function(t,n){var r=n===void 0?E0:n,i=r.parentElRef,a=r.options,o=a===void 0?Ff:a,s=r.shouldCreateInstance,c=s===void 0?Bf:s,l=be(Z(null),2),d=l[0],f=l[1],p=de();return X(function(){if(!c())return;function g(b){return Wn(this,void 0,void 0,function(){return Jn(this,function(_){switch(_.label){case 0:return[4,b.destroy()];case 1:return _.sent(),[2]}})})}var y=function(){setTimeout(function(){return f(null)},0)},v=Sr.getCallInstance();if(!d&&v&&!v.isDestroyed()){v.once("call-instance-destroyed",y),f(v);return}if(d){wt(p.current,o)||g(d);return}if(!v||v.isDestroyed())try{switch(t){case"callFrame":v=i?.current?Sr.createFrame(i.current,ne({},o)):Sr.createFrame(ne({},o));break;case"callObject":v=Sr.createCallObject(ne({},o));break}p.current=o,f(v),v.once("call-instance-destroyed",y)}catch(b){if(console.error("Error creating call instance:",b),o.strictMode)throw b}},[d,o,i,c,t]),d},O0=function(t){return A0("callObject",t)},I0=function(t){var n=t.children,r=t.jotaiStore,i=Xo(t,["children","jotaiStore"]),a=de({}),o=N(function(y){var v,b,_,k;if("action"in y){var T=y.action,M=Array.from((k=(_=a.current)===null||_===void 0?void 0:_[T])!==null&&k!==void 0?k:[]),x=M.filter(function(z){var V=be(z,1),ee=V[0];return ee<0}),C=M.filter(function(z){var V=be(z,1),ee=V[0];return ee>0}),A=$e($e([],be(x),!1),be(C),!1);try{for(var E=wf(A),R=E.next();!R.done;R=E.next()){var F=be(R.value,2),j=F[1];j(y)}}catch(z){v={error:z}}finally{try{R&&!R.done&&(b=E.return)&&b.call(E)}finally{if(v)throw v.error}}}},[]),s=N(function(y){y&&Object.keys(a.current).forEach(function(v){y.off(v,o),y.isDestroyed()||y.on(v,o)})},[o]),c="callObject"in i?i.callObject:null,l=Ve(function(){return"callObject"in i?{}:i},[i]),d=O0({options:l,shouldCreateInstance:N(function(){return!("callObject"in i)},[i])}),f=c??d;X(function(){f&&s(f)},[f,s]);var p=N(function(y,v,b){var _,k;a.current[y]||(a.current[y]=new Map,f&&(f.off(y,o),f.isDestroyed()||f.on(y,o))),!((_=a.current[y])===null||_===void 0)&&_.has(b)||(k=a.current[y])===null||k===void 0||k.set(b,v)},[f,o]),g=N(function(y,v){var b,_;(b=a.current[y])===null||b===void 0||b.delete(v),((_=a.current[y])===null||_===void 0?void 0:_.size)===0&&(f?.off(y,o),delete a.current[y])},[f,o]);return le.createElement(ov,{store:r},le.createElement(kf.Provider,{value:f},le.createElement(Qo.Provider,{value:{on:p,off:g}},le.createElement(C0,null,le.createElement(S0,null,le.createElement(x0,null,le.createElement(m0,null,le.createElement(T0,null,le.createElement(k0,null,le.createElement(P0,null,le.createElement(w0,null,n)))))))))))},gs=function(t){var n={},r=n.onAppMessage,i=_t(),a=N(function(s,c){c===void 0&&(c="*"),i&&i.sendAppMessage(s,c)},[i]),o=N(function(s){r?.(s,a)},[r,a]);return J("app-message",o),a},D0=oe({state:"low",reason:"none"});D0.debugLabel=pe("cpu-load");var L0=oe(null);L0.debugLabel=pe("input-settings");var j0=oe({hidden:0,present:0});j0.debugLabel=pe("participant-counts");var R0=dr(function(e){var t=oe({},function(n,r,i){r(R0(e),i)});return t.debugLabel=pe("participant-receive-settings-".concat(e)),t}),V0=oe(null);V0.debugLabel=pe("send-settings");const N0='@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-600:oklch(57.7% .245 27.325);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-light:300;--font-weight-medium:500;--font-weight-semibold:600;--radius-lg:.5rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--blur-lg:16px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-gray-40:#919191}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.inset-2{inset:calc(var(--spacing)*2)}.inset-3{inset:calc(var(--spacing)*3)}.top-0{top:calc(var(--spacing)*0)}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-5{right:calc(var(--spacing)*5)}.right-15{right:calc(var(--spacing)*15)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-25{bottom:calc(var(--spacing)*25)}.left-0{left:calc(var(--spacing)*0)}.left-2{left:calc(var(--spacing)*2)}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-1000{z-index:1000}.mx-auto{margin-inline:auto}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.line-clamp-4{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.flex{display:flex}.hidden{display:none}.inline{display:inline}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.h-3{height:calc(var(--spacing)*3)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-\\[28px\\]{height:28px}.h-\\[64px\\]{height:64px}.h-\\[180px\\]{height:180px}.h-\\[216px\\]{height:216px}.h-\\[300px\\]{height:300px}.h-\\[377px\\]{height:377px}.h-full{height:100%}.max-h-36{max-height:calc(var(--spacing)*36)}.min-h-11{min-height:calc(var(--spacing)*11)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-25{width:calc(var(--spacing)*25)}.w-\\[36px\\]{width:36px}.w-\\[120px\\]{width:120px}.w-\\[144px\\]{width:144px}.w-\\[200px\\]{width:200px}.w-\\[252px\\]{width:252px}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[90\\%\\]{max-width:90%}.flex-1{flex:1}.flex-none{flex:none}.scale-25{--tw-scale-x:25%;--tw-scale-y:25%;--tw-scale-z:25%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-none{scale:none}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[22px\\]{border-radius:22px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-l-3xl{border-top-left-radius:var(--radius-3xl);border-bottom-left-radius:var(--radius-3xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.bg-black{background-color:var(--color-black)}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-black\\/95{background-color:#000000f2}@supports (color:color-mix(in lab,red,red)){.bg-black\\/95{background-color:color-mix(in oklab,var(--color-black)95%,transparent)}}.bg-gray-40\\/25{background-color:#91919140}@supports (color:color-mix(in lab,red,red)){.bg-gray-40\\/25{background-color:color-mix(in oklab,var(--color-gray-40)25%,transparent)}}.bg-gray-40\\/30{background-color:#9191914d}@supports (color:color-mix(in lab,red,red)){.bg-gray-40\\/30{background-color:color-mix(in oklab,var(--color-gray-40)30%,transparent)}}.bg-red-600\\/25{background-color:#e4001440}@supports (color:color-mix(in lab,red,red)){.bg-red-600\\/25{background-color:color-mix(in oklab,var(--color-red-600)25%,transparent)}}.bg-red-600\\/50{background-color:#e4001480}@supports (color:color-mix(in lab,red,red)){.bg-red-600\\/50{background-color:color-mix(in oklab,var(--color-red-600)50%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\\/30{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.bg-white\\/30{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.bg-\\[linear-gradient\\(transparent\\,\\#000000\\)\\]{background-image:linear-gradient(#0000,#000)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)\\,rgba\\(0\\,0\\,0\\,1\\)_10\\%\\,rgba\\(0\\,0\\,0\\,1\\)_30\\%\\,rgba\\(0\\,0\\,0\\,0\\)_40\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000,#000 10% 30%,#0000 40%);mask-image:linear-gradient(#0000,#000 10% 30%,#0000 40%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_10\\%\\,rgba\\(0\\,0\\,0\\,1\\)_20\\%\\,rgba\\(0\\,0\\,0\\,1\\)_40\\%\\,rgba\\(0\\,0\\,0\\,0\\)_50\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 10%,#000 20% 40%,#0000 50%);mask-image:linear-gradient(#0000 10%,#000 20% 40%,#0000 50%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_15\\%\\,rgba\\(0\\,0\\,0\\,1\\)_30\\%\\,rgba\\(0\\,0\\,0\\,1\\)_50\\%\\,rgba\\(0\\,0\\,0\\,0\\)_60\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 15%,#000 30% 50%,#0000 60%);mask-image:linear-gradient(#0000 15%,#000 30% 50%,#0000 60%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_20\\%\\,rgba\\(0\\,0\\,0\\,1\\)_40\\%\\,rgba\\(0\\,0\\,0\\,1\\)_60\\%\\,rgba\\(0\\,0\\,0\\,0\\)_70\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 20%,#000 40% 60%,#0000 70%);mask-image:linear-gradient(#0000 20%,#000 40% 60%,#0000 70%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_40\\%\\,rgba\\(0\\,0\\,0\\,1\\)_60\\%\\,rgba\\(0\\,0\\,0\\,1\\)_80\\%\\,rgba\\(0\\,0\\,0\\,0\\)_90\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 40%,#000 60% 80%,#0000 90%);mask-image:linear-gradient(#0000 40%,#000 60% 80%,#0000 90%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_60\\%\\,rgba\\(0\\,0\\,0\\,1\\)_80\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 60%,#000 80%);mask-image:linear-gradient(#0000 60%,#000 80%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_70\\%\\,rgba\\(0\\,0\\,0\\,1\\)_100\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 70%,#000 100%);mask-image:linear-gradient(#0000 70%,#000)}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-cover{object-fit:cover}.p-2{padding:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-14{padding-right:calc(var(--spacing)*14)}.pr-\\[4px\\]{padding-right:4px}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.text-right{text-align:right}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[8px\\]{font-size:8px}.leading-\\[1\\.4\\]{--tw-leading:1.4;line-height:1.4}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-nowrap{white-space:nowrap}.text-white{color:var(--color-white)}.text-white\\/75{color:#ffffffbf}@supports (color:color-mix(in lab,red,red)){.text-white\\/75{color:color-mix(in oklab,var(--color-white)75%,transparent)}}.underline{text-decoration-line:underline}.decoration-white\\/50{text-decoration-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.decoration-white\\/50{-webkit-text-decoration-color:color-mix(in oklab,var(--color-white)50%,transparent);text-decoration-color:color-mix(in oklab,var(--color-white)50%,transparent)}}.opacity-0{opacity:0}.opacity-100{opacity:1}.mix-blend-difference{mix-blend-mode:difference}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xs{--tw-shadow:0 1px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-sm{--tw-blur:blur(var(--blur-sm));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-\\[1px\\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[2px\\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[4px\\]{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[8px\\]{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[16px\\]{--tw-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[32px\\]{--tw-backdrop-blur:blur(32px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[64px\\]{--tw-backdrop-blur:blur(64px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-none{--tw-backdrop-blur: ;-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[backdrop-filter\\]{transition-property:-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-linear{--tw-ease:linear;transition-timing-function:linear}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.\\[scrollbar-width\\:none\\]{scrollbar-width:none}.placeholder\\:text-white\\/70::placeholder{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-white\\/70::placeholder{color:color-mix(in oklab,var(--color-white)70%,transparent)}}.placeholder\\:opacity-0::placeholder{opacity:0}.placeholder\\:opacity-70::placeholder{opacity:.7}@media(hover:hover){.hover\\:bg-black\\/30:hover{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-black\\/30:hover{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.hover\\:bg-gray-40\\/40:hover{background-color:#91919166}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-gray-40\\/40:hover{background-color:color-mix(in oklab,var(--color-gray-40)40%,transparent)}}.hover\\:bg-white\\/15:hover{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/15:hover{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.hover\\:bg-white\\/80:hover{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/80:hover{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}}@media(min-width:40rem){.sm\\:flex{display:flex}.sm\\:hidden{display:none}}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:hidden::-webkit-scrollbar{display:none}.shadow-inset-white-10{box-shadow:inset 0 0 0 1px #ffffff1a}.shadow-inset-white-20{box-shadow:inset 0 0 0 1px #fff3}.shadow-focused{box-shadow:inset 0 0 0 1.5px #fff6}}@keyframes fadeInUp{0%{opacity:0;filter:blur(12px);transform:translateY(12px)}to{opacity:1;filter:blur();transform:translateY(0)}}@keyframes fadeOutUp{0%{opacity:1;filter:blur();transform:translateY(0)}to{opacity:0;filter:blur(12px);transform:translateY(-12px)}}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}';function F0(){return O("style",{children:N0})}const $f=Ie(void 0);function B0({children:e}){const[t,n]=Z(!1);return O($f.Provider,{value:{hasUserInteracted:t,setHasUserInteracted:n},children:e})}function Pr(){const e=ge($f);if(!e)throw new Error("useUserInteraction must be used within a UserInteractionProvider");return e}const Oe="active",ct="minimized",Ht="hidden",Uf=Ie(void 0),$0=3e4;function U0({children:e,showMinimizeButton:t=!0,onSetShowMinimizeButton:n}){const{setHasUserInteracted:r}=Pr(),i=gs(),a=_t(),[o,s]=Z(ct),[c,l]=Z(!1),[d,f]=Z(!1),[p,g]=Z(!1),[y,v]=Z(null),[b,_]=Z(!1),[k,T]=Z(t),[M,x]=Z(!1),[C,A]=Z(!1),E=de(null),R=de(null),F=de(null);X(()=>{n&&n(T)},[n]);const j=N(()=>{if(a)try{const V=a.meetingState();(V==="joined-meeting"||V==="joining-meeting")&&(console.log("Sending force-end event to Daily"),i({event:"force-end"},"*"))}catch{}l(!1),r(!1),_(!1),v(null),x(!1),A(!1)},[a]),z=V=>{E.current!==null&&clearTimeout(E.current),R.current!==null&&clearTimeout(R.current),V===Oe?F.current!==null&&(clearTimeout(F.current),F.current=null):o===Oe&&V===ct&&(F.current=window.setTimeout(()=>{j(),F.current=null},$0)),V===Ht||o===Ht?(f(!0),E.current=window.setTimeout(()=>{s(V),f(!1),g(!0),E.current=null,R.current=window.setTimeout(()=>{g(!1),R.current=null},300)},1)):(s(V),f(!1),g(!1))};return O(Uf.Provider,{value:{widgetState:o,setWidgetState:z,isAgentVideoReady:c,setIsAgentVideoReady:l,roomUrl:y,setRoomUrl:v,isTransitioning:p,isAboutToTransition:d,hasJoinedRoom:b,setHasJoinedRoom:_,resetDailyState:j,showMinimizeButton:k,setShowMinimizeButton:T,isImageChangeRequested:M,setIsImageChangeRequested:x,isImageChanging:C,setIsImageChanging:A},children:e})}function Rt(){const e=ge(Uf);if(!e)throw new Error("useWidget must be used within a WidgetProvider");return e}const zf=Ie(void 0);function z0({children:e}){const[t,n]=Z(!0),[r,i]=Z(!1),a=_t();return X(()=>{a&&a.setLocalAudio(!t)},[t,a]),O(zf.Provider,{value:{isMicMuted:t,setIsMicMuted:n,isAudioMuted:r,setIsAudioMuted:i},children:e})}function vs(){const e=ge(zf);if(!e)throw new Error("useMute must be used within a MuteProvider");return e}const Wf=Ie(void 0);function W0({children:e}){const t=Ve(()=>typeof window>"u"?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),[]);return O(Wf.Provider,{value:{isMobileDevice:t},children:e})}function ys(){const e=ge(Wf);if(!e)throw new Error("useMobile must be used within a MobileProvider");return e}const Jf=Ie(void 0);function J0({children:e}){const[t,n]=Z(null);return O(Jf.Provider,{value:{agentData:t,setAgentData:n},children:e})}function _n(){const e=ge(Jf);if(!e)throw new Error("useAgent must be used within an AgentProvider");return e}const qf=360,q0=30,Hf=Ie(void 0);function H0({children:e}){const[t,n]=Z(""),[r,i]=Z(""),[a,o]=Z(""),s=de(null),c=de(null),{agentData:l}=_n(),{resetDailyState:d,setWidgetState:f}=Rt(),p=de(qf),g=N(b=>{c.current!==null&&(clearTimeout(c.current),c.current=null),i(b),b&&(c.current=window.setTimeout(()=>{i(""),c.current=null},1e4))},[]),y=N(()=>{n(""),g(""),o("")},[]),v=N(()=>{s.current!==null&&clearInterval(s.current);const b=l?.max_conv_dur!=null&&l.max_conv_dur>0?l.max_conv_dur:qf;p.current=b,o(""),s.current=window.setInterval(()=>{p.current-=1,p.current<=q0&&p.current>0?o(`• ${p.current}s left`):p.current===0&&s.current!==null&&(o(""),n(""),g(""),f(ct),d(),clearInterval(s.current),s.current=null)},1e3)},[l,f,d]);return X(()=>{s.current!==null&&l?.max_conv_dur!=null&&l.max_conv_dur>0&&v()},[l?.max_conv_dur,v]),X(()=>{!r&&c.current!==null&&(clearTimeout(c.current),c.current=null)},[r]),X(()=>()=>{s.current!==null&&clearInterval(s.current),c.current!==null&&clearTimeout(c.current)},[]),O(Hf.Provider,{value:{errorMsg:t,setErrorMsg:n,nonFatalErrorMsg:r,setNonFatalErrorMsg:g,timeMsg:a,setTimeMsg:o,startMaxVideoTimer:v,resetErrors:y},children:e})}function Zi(){const e=ge(Hf);if(!e)throw new Error("useError must be used within an ErrorProvider");return e}function G0(){const e=yn({filter:"remote"}),{timeMsg:t}=Zi(),{agentData:n}=_n(),{isImageChanging:r}=Rt();if(e.length===0)return null;const i=e[0],a=n?.image_url;return O("div",{className:"h-full rounded-lg relative",children:[a&&O("div",{className:"absolute inset-0 bg-cover bg-center rounded-lg",style:{backgroundImage:`url(${a})`}}),O("div",{className:"relative w-full h-full",children:[O(Lf,{sessionId:i,type:"video",style:{objectFit:"cover",width:"100%",height:"100%",position:"relative"}}),O("div",{className:`absolute inset-0 bg-black/95 bg-cover bg-center rounded-lg transition-opacity
35
+ Passed callback for '`.concat(t,"' event is NOT registered."),n),l(!0);return}d.current++;var p=setTimeout(function(){d.current=0},50);return a(t,n,f),function(){clearTimeout(p),o(t,f)}}},[n,t,f,c,o,a]),Ze({event:t,eventId:f,isBlocked:c,callback:n})};function kt(e,t){var n,r;if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!kt(e[i],t[i]))return!1;return!0}if(MediaStream&&e instanceof MediaStream&&t instanceof MediaStream)return e.id===t.id&&e.active===t.active&&e.getTracks().length===t.getTracks().length&&e.getTracks().every(function(y,v){return kt(y,t.getTracks()[v])});if(MediaStreamTrack&&e instanceof MediaStreamTrack&&t instanceof MediaStreamTrack)return e.id===t.id&&e.kind===t.kind&&e.readyState===t.readyState;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;var o=Array.from(e).sort(),a=Array.from(t).sort();return o.every(function(y,v){return kt(y,a[v])})}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;try{for(var s=kf(e.entries()),c=s.next();!c.done;c=s.next()){var l=be(c.value,2),d=l[0],f=l[1];if(!t.has(d)||!kt(f,t.get(d)))return!1}}catch(y){n={error:y}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return!0}if(ot(e)!=="object"||e===null||ot(t)!=="object"||t===null)return!1;var p=Object.keys(e),g=Object.keys(t);if(p.length!==g.length)return!1;for(var i=0;i<p.length;i++){var d=p[i];if(!Object.prototype.hasOwnProperty.call(t,d)||!kt(e[d],t[d]))return!1}return!0}function ns(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],i=t[n],o=r!==null&&ot(r)==="object",a=i!==null&&ot(i)==="object";if(o||a){if(!kt(r,i))return!1}else if(r!==i)return!1}return!0}function me(e){return"daily-react-"+e}function rs(e){var t=new Map,n=new Map;return function(r){if(!t.has(r)){var i=ce(function(o){var a=e.get(r)(o),s=n.get(r);return s!=null&&e.equals(a,s)?s:(n.set(r,a),a)});t.set(r,i)}return t.get(r)}}var is="::",xf=";",os=function(t,n){return t+is+n},l0=function(t,n){return t+is+n.join(xf)},Ue=function(t,n){return as(os(t,n))},qn=fr(function(e){var t=ce([]);return t.debugLabel=me("participant-property-paths-".concat(e)),t}),as=fr(function(e){var t=ce(null);return t.debugLabel=me("participant-property-".concat(e)),t}),u0=rs({equals:ns,get:function(t){return function(n){var r=be(t.split(is),2),i=r[0],o=r[1],a=o.split(xf);return a.map(function(s){return n(Ue(i,s))})}}}),Tf=function(t,n){var r,i=nn(Array.isArray(n)?u0(l0(t,n)):as(os(t,n)));return Ze(Array.isArray(n)?n.reduce(function(o,a,s){return o[a]=i[s],o},{}):(r={},r[n]=i,r)),i},Wi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function d0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ss,Mf;function f0(){if(Mf)return ss;Mf=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=ot(Wi)=="object"&&Wi&&Wi.Object===Object&&Wi,l=(typeof self>"u"?"undefined":ot(self))=="object"&&self&&self.Object===Object&&self,d=c||l||Function("return this")(),f=Object.prototype,p=f.toString,g=Math.max,y=Math.min,v=function(){return d.Date.now()};function b(M,A,E){var j,B,V,H,F,X,K=0,se=!1,G=!1,N=!0;if(typeof M!="function")throw new TypeError(e);A=T(A)||0,k(E)&&(se=!!E.leading,G="maxWait"in E,V=G?g(T(E.maxWait)||0,A):V,N="trailing"in E?!!E.trailing:N);function J(P){var D=j,L=B;return j=B=void 0,K=P,H=M.apply(L,D),H}function z(P){return K=P,F=setTimeout(u,A),se?J(P):H}function We(P){var D=P-X,L=P-K,$=A-D;return G?y($,V-L):$}function at(P){var D=P-X,L=P-K;return X===void 0||D>=A||D<0||G&&L>=V}function u(){var P=v();if(at(P))return m(P);F=setTimeout(u,We(P))}function m(P){return F=void 0,N&&j?J(P):(j=B=void 0,H)}function h(){F!==void 0&&clearTimeout(F),K=0,j=X=B=F=void 0}function w(){return F===void 0?H:m(v())}function S(){var P=v(),D=at(P);if(j=arguments,B=this,X=P,D){if(F===void 0)return z(X);if(G)return F=setTimeout(u,A),J(X)}return F===void 0&&(F=setTimeout(u,A)),H}return S.cancel=h,S.flush=w,S}function _(M,A,E){var j=!0,B=!0;if(typeof M!="function")throw new TypeError(e);return k(E)&&(j="leading"in E?!!E.leading:j,B="trailing"in E?!!E.trailing:B),b(M,A,{leading:j,maxWait:A,trailing:B})}function k(M){var A=ot(M);return!!M&&(A=="object"||A=="function")}function x(M){return!!M&&ot(M)=="object"}function C(M){return ot(M)=="symbol"||x(M)&&p.call(M)==n}function T(M){if(typeof M=="number")return M;if(C(M))return t;if(k(M)){var A=typeof M.valueOf=="function"?M.valueOf():M;M=k(A)?A+"":A}if(typeof M!="string")return M===0?M:+M;M=M.replace(r,"");var E=o.test(M);return E||a.test(M)?s(M.slice(2),E?2:8):i.test(M)?t:+M}return ss=_,ss}var h0=f0(),p0=d0(h0),Ji=function(t,n,r,i){r===void 0&&(r=500),i===void 0&&(i=!1);var o=ge(Za),a=o.off,s=o.on,c=Ve(function(){var f;return Array.isArray(t)?t.reduce(function(p,g){return p[g]=i?es():ts(),p},{}):(f={},f[t]=i?es():ts(),f)},[t,i]),l=fe([]);q("call-instance-destroyed",R(function(){l.current.length=0},[]));var d=Ve(function(){return p0(function(){l.current.length!==0&&(n(l.current),l.current.length=0)},r,{trailing:!0})},[n,r]);Z(function(){if(t){var f=function(g){l.current.push(g),d()};return Array.isArray(t)?t.forEach(function(p){return s(p,f,c[p])}):s(t,f,c[t]),function(){Array.isArray(t)?t.forEach(function(p){return a(p,c[p])}):a(t,c[t])}}},[d,t,c,a,s]),Ze({event:t,eventId:c})},Cf=function(t,n,r){if(n===void 0&&(n=""),r===void 0&&(r=new Set),ot(t)!=="object"||t===null||r.has(t))return[n];r.add(t);var i=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var a=n?"".concat(n,".").concat(o):o;i.push.apply(i,$e([a],be(Cf(t[o],a,r)),!1))}return r.delete(t),i},cs=function(t){return Cf(t)},m0=function(t,n){return String(n).split(".").filter(function(r){return r.length}).reduce(function(r,i){return r&&r[i]},t)},ls=function(t,n){return n.map(function(r){return m0(t,r)})},Hi=ce(null);Hi.debugLabel=me("active-id");var Mr=ce("");Mr.debugLabel=me("local-id");var Pf=ce(null);Pf.debugLabel=me("local-join-date");var bn=ce([]);bn.debugLabel=me("participant-ids");var _n=fr(function(e){var t=ce(null);return t.debugLabel=me("participant-".concat(e)),t}),us=ce([]);us.debugLabel=me("waiting-participants");var ds=fr(function(e){var t=ce({awaitingAccess:{level:"full"},id:e,name:""});return t.debugLabel=me("waiting-participant-".concat(e)),t}),g0=function(t){var n=t.children,r=wt(),i=be(ne(!1),2),o=i[0],a=i[1],s=oe(R(function(d,f,p){f(Mr,p.local.session_id);var g=Object.values(p),y=g.map(function(v){return v.session_id});f(bn,y),g.forEach(function(v){f(_n(v.session_id),v);var b=cs(v);f(qn(v.session_id),b),b.forEach(function(_){var k=be(ls(v,[_]),1),x=k[0];f(Ue(v.session_id,_),x)})}),a(!0)},[]));Z(function(){if(!(!r||o)){var d=setInterval(function(){var f=r.participants();"local"in f&&(s(f),clearInterval(d))},100);return function(){clearInterval(d)}}},[r,o,s]);var c=R(function(){if(r){var d=r?.participants();d.local&&s(d)}},[r,s]);q("started-camera",c,!0),q("access-state-updated",c,!0),q("joining-meeting",oe(R(function(d,f){f(Pf,new Date),c()},[c])),!0),q("joined-meeting",R(function(d){s(d.participants)},[s]),!0);var l=oe(R(function(d,f){f(Mr,""),f(Hi,null);var p=d(bn);p.forEach(function(g){return _n.remove(g)}),f(bn,[])},[]));return q("call-instance-destroyed",l,!0),q("left-meeting",l,!0),Ji(["active-speaker-change","participant-joined","participant-updated","participant-left"],oe(R(function(d,f,p){p.length&&p.forEach(function(g){switch(g.action){case"active-speaker-change":{f(Hi,g.activeSpeaker.peerId),f(_n(g.activeSpeaker.peerId),function(C){return C?ie(ie({},C),{last_active:new Date}):null});break}case"participant-joined":{f(bn,function(C){return C.includes(g.participant.session_id)?C:$e($e([],be(C),!1),[g.participant.session_id],!1)}),f(_n(g.participant.session_id),g.participant);var y=cs(g.participant);f(qn(g.participant.session_id),y),y.forEach(function(C){var T=be(ls(g.participant,[C]),1),M=T[0];f(Ue(g.participant.session_id,C),M)});break}case"participant-updated":{f(_n(g.participant.session_id),g.participant),g.participant.local&&f(Mr,g.participant.session_id);var y=cs(g.participant),v=d(qn(g.participant.session_id)),b=y.length!==v.length||y.some(function(T){return!v.includes(T)});b&&f(qn(g.participant.session_id),y);var _=new Set(v),k=ls(g.participant,y);y.forEach(function(T,M){var A=k[M];_.delete(T),f(Ue(g.participant.session_id,T),function(E){return kt(E,A)?E:A})}),_.forEach(function(T){f(Ue(g.participant.session_id,T),null)});break}case"participant-left":{f(bn,function(C){return C.includes(g.participant.session_id)?C.filter(function(T){return T!==g.participant.session_id}):C}),_n.remove(g.participant.session_id);var x=d(qn(g.participant.session_id));x.forEach(function(C){as.remove(os(g.participant.session_id,C))}),qn.remove(g.participant.session_id);break}}})},[])),100,!0),Ji(["waiting-participant-added","waiting-participant-updated","waiting-participant-removed"],oe(R(function(d,f,p){p.forEach(function(g){switch(g.action){case"waiting-participant-added":f(us,function(y){return y.includes(g.participant.id)?y:$e($e([],be(y),!1),[g.participant.id],!1)}),f(ds(g.participant.id),g.participant);break;case"waiting-participant-updated":f(ds(g.participant.id),g.participant);break;case"waiting-participant-removed":f(us,function(y){return y.filter(function(v){return v!==g.participant.id})}),ds.remove(g.participant.id);break}})},[])),100,!0),de.createElement(de.Fragment,null,n)},qi=function(){var t=nn(Mr);return Ze(t),t},v0=function(){return!0},y0=function(t){var n=t===void 0?{}:t,r=n.filter,i=r===void 0?v0:r,o=n.ignoreLocal,a=o===void 0?!1:o,s=qi(),c=nn(Hi),l=a&&c===s,d=!i?.(c),f=!l&&!d,p=be(ne(f?c:null),2),g=p[0],y=p[1];return Z(function(){l||d||y(c)},[d,l,c]),Ze(g),g},Gi=function(t){return["blocked","off"].includes(t)},Ef=";",Af=function(t,n){return"".concat(t).concat(Ef).concat(n)},Of=rs({equals:kt,get:function(t){return function(n){var r=be(t.split(Ef),2),i=r[0],o=r[1],a=n(bn);return a.filter(function(s){switch(i){case"local":case"owner":case"record":return n(Ue(s,i));case"remote":return!n(Ue(s,"local"));case"screen":{var c=n(Ue(s,"tracks.screenAudio.state")),l=n(Ue(s,"tracks.screenVideo.state"));return!Gi(c)||!Gi(l)}default:return!0}}).sort(function(s,c){switch(o){case"joined_at":case"session_id":case"user_id":case"user_name":{var l=n(Ue(s,o)),d=n(Ue(c,o));if(l!==void 0||d!==void 0){if(l===void 0)return-1;if(d===void 0||l>d)return 1;if(l<d)return-1}return 0}default:return 0}})}}}),wn=function(t){var n=t===void 0?{}:t,r=n.filter,i=n.onActiveSpeakerChange,o=n.onParticipantJoined,a=n.onParticipantLeft,s=n.onParticipantUpdated,c=n.sort,l=nn(Of(Af(typeof r=="string"?r:null,typeof c=="string"?c:null))),d=typeof r=="function"||typeof c=="function",f=R(function(_){if(typeof r!="function"&&typeof c!="function")return[];var k=l.map(function(x){return _(_n(x))});return k.filter(function(x){return!!x}).filter(typeof r=="function"?r:function(){return!0}).sort(typeof c=="function"?c:function(){return 0}).map(function(x){return x.session_id}).filter(Boolean)},[r,l,c]),p=be(ne([]),2),g=p[0],y=p[1],v=oe(R(function(_){if(d){var k=f(_);kt(k,g)||y(k)}},[g,f,d]));Z(function(){v()},[v]),Ji(["participant-joined","participant-updated","active-speaker-change","participant-left"],R(function(_){_.length&&(_.forEach(function(k){switch(k.action){case"participant-joined":o?.(k);break;case"participant-updated":s?.(k);break;case"active-speaker-change":i?.(k);break;case"participant-left":a?.(k);break}}),v())},[v,i,o,a,s]));var b=typeof r=="function"||typeof c=="function"?g:l;return Ze(b),b},b0=rs({equals:ns,get:function(){return function(t){var n=t(Of(Af("screen",null)));return n.map(function(r){return{local:t(Ue(r,"local")),screenAudio:t(Ue(r,"tracks.screenAudio")),screenVideo:t(Ue(r,"tracks.screenVideo")),screenId:"".concat(r,"-screen"),session_id:r}})}}}),_0=function(t){var n={},r=n.onError,i=n.onLocalScreenShareStarted,o=n.onLocalScreenShareStopped,a=wt(),s=R(function(){for(var f=[],p=0;p<arguments.length;p++)f[p]=arguments[p];a?.startScreenShare.apply(a,$e([],be(f),!1))},[a]),c=R(function(){for(var f=[],p=0;p<arguments.length;p++)f[p]=arguments[p];a?.stopScreenShare.apply(a,$e([],be(f),!1))},[a]);q("local-screen-share-started",R(function(){return i?.()},[i])),q("local-screen-share-stopped",R(function(){return o?.()},[o])),q("nonfatal-error",R(function(f){f.type==="screen-share-error"&&r?.(f)},[r]));var l=nn(b0(void 0)),d={isSharingScreen:l.some(function(f){return f.local}),screens:l,startScreenShare:s,stopScreenShare:c};return Ze(d),d},If=function(t,n){n===void 0&&(n="video");var r=Tf(t,"tracks.".concat(n)),i=r?ie(ie({},r),{isOff:Gi(r.state)}):{isOff:!0,persistentTrack:void 0,state:"off",subscribed:!1};return Ze(i),i};function Df(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return R(function(n){for(var r=0;r<e.length;r++){var i=e[r];typeof i=="function"?i(n):i&&ot(i)==="object"&&(i.current=n)}},e)}var Ki=Uo(et(function(e,t){var n=e.onPlayFailed,r=e.sessionId,i=e.type,o=i===void 0?"audio":i,a=Qa(e,["onPlayFailed","sessionId","type"]),s=fe(null),c=If(r,o),l=Df(s,t),d=c?.subscribed;return Z(function(){var f=s.current;if(!(!f||!c?.persistentTrack)){var p=function(){f.play().catch(function(y){n?.({sessionId:r,target:f,type:o,message:y.message,name:y.name})})};if(!MediaStream){console.warn("MediaStream API not available. Can't setup ".concat(o," for ").concat(r)),n?.({sessionId:r,target:f,type:o,message:"MediaStream API not available",name:"MediaStream API not available"});return}return f.addEventListener("canplay",p),f.srcObject=new MediaStream([c?.persistentTrack]),function(){f?.removeEventListener("canplay",p)}}},[c?.persistentTrack,n,r,o]),q("participant-left",R(function(f){var p=s.current;f.participant.session_id!==r||!p||(p.srcObject=null)},[r])),de.createElement("audio",ie({autoPlay:!0,ref:l},a,{"data-session-id":r,"data-audio-type":o,"data-subscribed":d}))}));Ki.displayName="DailyAudioTrack";var Lf=Uo(et(function(e,t){var n=e.autoSubscribeActiveSpeaker,r=n===void 0?!1:n,i=e.maxSpeakers,o=i===void 0?5:i,a=e.onPlayFailed,s=e.playLocalScreenAudio,c=s===void 0?!1:s,l=wt(),d=be(ne(new Array(o).fill("")),2),f=d[0],p=d[1],g=_0().screens,y=qi(),v=y0({ignoreLocal:!0}),b=fe(null);Io(t,function(){return{getActiveSpeakerAudio:function(){var T,M;return(M=(T=b.current)===null||T===void 0?void 0:T.querySelector('audio[data-session-id="'.concat(v,'"][data-audio-type="audio"]')))!==null&&M!==void 0?M:null},getAllAudio:function(){var T,M;return Array.from((M=(T=b.current)===null||T===void 0?void 0:T.querySelectorAll("audio"))!==null&&M!==void 0?M:[])},getAudioBySessionId:function(T){var M,A;return(A=(M=b.current)===null||M===void 0?void 0:M.querySelector('audio[data-session-id="'.concat(T,'"][data-audio-type="audio"]')))!==null&&A!==void 0?A:null},getRmpAudio:function(){var T,M;return Array.from((M=(T=b.current)===null||T===void 0?void 0:T.querySelectorAll('audio[data-audio-type="rmpAudio"]'))!==null&&M!==void 0?M:[])},getScreenAudio:function(){var T,M;return Array.from((M=(T=b.current)===null||T===void 0?void 0:T.querySelectorAll('audio[data-audio-type="screenAudio"]'))!==null&&M!==void 0?M:[])},getRmpAudioBySessionId:function(T){var M,A;return(A=(M=b.current)===null||M===void 0?void 0:M.querySelector('audio[data-session-id="'.concat(T,'"][data-audio-type="rmpAudio"]')))!==null&&A!==void 0?A:null},getScreenAudioBySessionId:function(T){var M,A;return(A=(M=b.current)===null||M===void 0?void 0:M.querySelector('audio[data-session-id="'.concat(T,'"][data-audio-type="screenAudio"]')))!==null&&A!==void 0?A:null}}},[v]);var _=oe(R(function(C,T,M){return Jn(void 0,void 0,void 0,function(){var A,E,j;return Hn(this,function(B){if(A=Object.values((j=l?.participants())!==null&&j!==void 0?j:{}).filter(function(V){return!V.local&&!!V.tracks.audio.subscribed}),E=function(H){return A.some(function(F){return F.session_id===H})},!E(M))if(l&&!l.isDestroyed()&&r&&!l.subscribeToTracksAutomatically())l.updateParticipant(M,{setSubscribedTracks:{audio:!0}});else return[2];return p(function(V){var H;if(V.includes(M))return V;var F=function(z){return!z||!E(z)};if(V.some(F)){var X=V.findIndex(F);return V[X]=M,$e([],be(V),!1)}var K=V.findIndex(function(J){return A.some(function(z){return z.session_id===J&&Gi(z.tracks.audio.state)})});if(K>=0)return V[K]=M,$e([],be(V),!1);var se=A.filter(function(J){return V.includes(J.session_id)&&J.session_id!==v}).sort(function(J,z){var We,at,u=(We=C(Ue(J.session_id,"last_active")))!==null&&We!==void 0?We:new Date("1970-01-01"),m=(at=C(Ue(z.session_id,"last_active")))!==null&&at!==void 0?at:new Date("1970-01-01");return u>m?1:u<m?-1:0});if(!se.length){var G=V.findIndex(function(J){return J!==v});return V[G]=M,$e([],be(V),!1)}var N=V.indexOf((H=se[0])===null||H===void 0?void 0:H.session_id);return V[N]=M,$e([],be(V),!1)}),[2]})})},[v,r,l])),k=R(function(C){p(function(T){if(!T.includes(C))return T;var M=$e([],be(T),!1),A=M.indexOf(C);return M[A]="",M})},[]);Ji(["active-speaker-change","track-started","participant-left"],R(function(C){C.forEach(function(T){switch(T.action){case"active-speaker-change":if(T.activeSpeaker.peerId===y)return;_(T.activeSpeaker.peerId);break;case"track-started":T.track.kind==="audio"&&T.participant&&!T.participant.local&&_(T.participant.session_id);break;case"participant-left":k(T.participant.session_id);break}})},[_,y,k]),200);var x=wn({filter:R(function(C){var T;return!!(!((T=C?.tracks)===null||T===void 0)&&T.rmpAudio)},[])});return de.createElement("div",{ref:b},f.map(function(C,T){return de.createElement(Ki,{key:"speaker-slot-".concat(T),onPlayFailed:a,sessionId:C,type:"audio"})}),g.filter(function(C){return c?!0:!C.local}).map(function(C){return de.createElement(Ki,{key:C.screenId,onPlayFailed:a,sessionId:C.session_id,type:"screenAudio"})}),x.map(function(C){return de.createElement(Ki,{key:"".concat(C,"-rmp"),onPlayFailed:a,sessionId:C,type:"rmpAudio"})}))}));Lf.displayName="DailyAudio";var jf=et(function(t,n){var r=t.automirror,i=t.fit,o=i===void 0?"contain":i,a=t.mirror,s=t.onResize,c=t.playableStyle,l=c===void 0?{}:c,d=t.sessionId,f=t.style,p=f===void 0?{}:f,g=t.type,y=g===void 0?"video":g,v=Qa(t,["automirror","fit","mirror","onResize","playableStyle","sessionId","style","type"]),b=qi(),_=b===d,k=y==="screenVideo",x=_&&!k,C=fe(null),T=Df(C,n),M=If(d,y),A=M.persistentTrack,E=x||k||!M.isOff,j=Tf(d,"tracks.".concat(y)),B=j?.subscribed,V=Ve(function(){if(typeof a=="boolean")return a;if(!r)return!1;if(!A)return x;var H=A.getSettings(),F="facingMode"in H?x&&H.facingMode==="user":x;return F},[r,x,a,A]);return Z(function(){var F=C.current;if(F){var X=function(){var z=F.play();z!==void 0&&z.then(function(){F.controls=!1}).catch(function(We){F.controls=!0,console.warn("Failed to play video",We)})},K=function(){F.paused&&X()},se=function(){F.style.transform="scale(1)"},G=function(){F.style.transform="",setTimeout(function(){F.paused&&X()},100)},N=function(){document.visibilityState!=="hidden"&&F.paused&&X()};return F.addEventListener("canplay",K),F.addEventListener("enterpictureinpicture",se),F.addEventListener("leavepictureinpicture",G),document.addEventListener("visibilitychange",N),function(){F.removeEventListener("canplay",K),F.removeEventListener("enterpictureinpicture",se),F.removeEventListener("leavepictureinpicture",G),document.removeEventListener("visibilitychange",N)}}},[]),Z(function(){var F=C.current;if(!(!F||!A)){if(!MediaStream){console.warn("MediaStream API not available. Can't setup ".concat(y," for ").concat(d));return}return F.srcObject=new MediaStream([A]),F.load(),function(){F.srcObject=null,F.load()}}},[d,y,A,A?.id]),Z(function(){var F=C.current;if(!s||!F)return;var X;function K(){X&&cancelAnimationFrame(X),X=requestAnimationFrame(function(){var se=C.current;if(!(!se||document.hidden)){var G=se.videoWidth,N=se.videoHeight;G&&N&&s?.({aspectRatio:G/N,height:N,width:G})}})}return K(),F.addEventListener("loadedmetadata",K),F.addEventListener("resize",K),function(){X&&cancelAnimationFrame(X),F.removeEventListener("loadedmetadata",K),F.removeEventListener("resize",K)}},[s]),de.createElement("video",ie({autoPlay:!0,muted:!0,playsInline:!0,ref:T,"data-local":_,"data-mirrored":V||void 0,"data-playable":E||void 0,"data-session-id":d,"data-subscribed":B,"data-video-type":y,style:ie(ie({objectFit:o,transform:V?"scale(-1, 1)":""},p),E?l:{})},v))});jf.displayName="DailyVideo";var w0=De({refreshDevices:function(){return Promise.resolve()}}),Oe=ce("idle");Oe.debugLabel=me("camera-state");var Ie=ce("idle");Ie.debugLabel=me("microphone-state");var Yi=ce([]);Yi.debugLabel=me("camera-devices");var Xi=ce([]);Xi.debugLabel=me("microphone-devices");var Rf=ce([]);Rf.debugLabel=me("speaker-devices");var Vf=ce(null);Vf.debugLabel=me("last-camera-error");var k0=function(t){var n=t.children,r=wt(),i=oe(R(function(a,s){return Jn(void 0,void 0,void 0,function(){var c,l,d,f,p,g,y,v,b,_,k,x;return Hn(this,function(C){switch(C.label){case 0:if(typeof((k=navigator?.mediaDevices)===null||k===void 0?void 0:k.getUserMedia)>"u"||typeof((x=navigator?.mediaDevices)===null||x===void 0?void 0:x.enumerateDevices)>"u")return s(Oe,"not-supported"),s(Ie,"not-supported"),[2];if(!r)return[2];C.label=1;case 1:return C.trys.push([1,4,,5]),[4,r.enumerateDevices()];case 2:return c=C.sent().devices,l=c.filter(function(T){return T.kind==="videoinput"&&T.deviceId!==""}),d=c.filter(function(T){return T.kind==="audioinput"&&T.deviceId!==""}),f=c.filter(function(T){return T.kind==="audiooutput"&&T.deviceId!==""}),[4,r.getInputDevices()];case 3:return p=C.sent(),g=p.camera,y=p.mic,v=p.speaker,b=function(M,A,E){var j,B=E.find(function(F){return F.device.deviceId===A.deviceId}),V="deviceId"in M&&A.deviceId===M.deviceId,H=!("deviceId"in M)&&B?.selected;return{device:A,selected:V||!!H,state:(j=B?.state)!==null&&j!==void 0?j:"granted"}},_=function(M,A){return M.device.deviceId==="default"?-1:A.device.deviceId==="default"?1:M.device.label<A.device.label?-1:M.device.label>A.device.label?1:0},s(Yi,function(T){return l.filter(Boolean).map(function(M){return b(g,M,T)}).sort(_)}),s(Xi,function(T){return d.filter(Boolean).map(function(M){return b(y,M,T)}).sort(_)}),s(Rf,function(T){return f.filter(Boolean).map(function(M){return b(v,M,T)}).sort(_)}),[3,5];case 4:return C.sent(),s(Oe,"not-supported"),s(Ie,"not-supported"),[3,5];case 5:return[2]}})})},[r])),o=oe(R(function(a,s){return Jn(void 0,void 0,void 0,function(){var c,l,d,f,p,g,y,v,b,_,k,x,C,T,M,A,E,j,B,V,H,F,X,K,se,G;return Hn(this,function(N){switch(N.label){case 0:if(!r)return[2];if(c=a(Oe),l=a(Ie),d=r.participants(),!d.local)return[2];if(f=d.local.tracks,p="prompt",g="prompt",!navigator.permissions)return[3,5];N.label=1;case 1:return N.trys.push([1,4,,5]),[4,navigator.permissions.query({name:"camera"})];case 2:return y=N.sent(),p=y.state,[4,navigator.permissions.query({name:"microphone"})];case 3:return v=N.sent(),g=v.state,[3,5];case 4:return N.sent(),[3,5];case 5:return b=p==="prompt"&&["idle","pending"].includes(c)&&f.video.state==="interrupted"&&!f.video.persistentTrack,_=["idle","pending"].includes(c)&&!f.video.persistentTrack&&!!(!((C=f.video.off)===null||C===void 0)&&C.byUser),k=g==="prompt"&&["idle","pending"].includes(l)&&f.audio.state==="interrupted"&&!f.audio.persistentTrack,x=["idle","pending"].includes(l)&&!f.audio.persistentTrack&&!!(!((T=f.audio.off)===null||T===void 0)&&T.byUser),!((A=(M=f.audio)===null||M===void 0?void 0:M.blocked)===null||A===void 0)&&A.byDeviceInUse?(s(Ie,"in-use"),s(Xi,function(J){return J.map(function(z){return z.selected?ie(ie({},z),{state:"in-use"}):z})})):!((j=(E=f.audio)===null||E===void 0?void 0:E.blocked)===null||j===void 0)&&j.byDeviceMissing?s(Ie,"not-found"):!((V=(B=f.audio)===null||B===void 0?void 0:B.blocked)===null||V===void 0)&&V.byPermissions||g==="denied"?s(Ie,"blocked"):k?s(Ie,"pending"):x?s(Ie,"idle"):(s(Ie,"granted"),s(Xi,function(J){return J.map(function(z){return z.selected?ie(ie({},z),{state:"granted"}):z})})),!((F=(H=f.video)===null||H===void 0?void 0:H.blocked)===null||F===void 0)&&F.byDeviceInUse?(s(Oe,"in-use"),s(Yi,function(J){return J.map(function(z){return z.selected?ie(ie({},z),{state:"in-use"}):z})})):!((K=(X=f.video)===null||X===void 0?void 0:X.blocked)===null||K===void 0)&&K.byDeviceMissing?s(Oe,"not-found"):!((G=(se=f.video)===null||se===void 0?void 0:se.blocked)===null||G===void 0)&&G.byPermissions||p==="denied"?s(Oe,"blocked"):b?s(Oe,"pending"):_?s(Oe,"idle"):(s(Oe,"granted"),s(Yi,function(J){return J.map(function(z){return z.selected?ie(ie({},z),{state:"granted"}):z})})),i(),[2]}})})},[r,i]));return q("participant-updated",R(function(a){a.participant.local&&o()},[o])),q("available-devices-updated",i),q("selected-devices-updated",i),q("camera-error",oe(R(function(a,s,c){var l,d,f,p,g,y,v;switch(s(Vf,c.error),(l=c.error)===null||l===void 0?void 0:l.type){case"cam-in-use":s(Oe,"in-use");break;case"mic-in-use":s(Ie,"in-use");break;case"cam-mic-in-use":s(Oe,"in-use"),s(Ie,"in-use");break;case"not-found":!((d=c.error)===null||d===void 0)&&d.missingMedia.includes("video")&&s(Oe,"not-found"),!((f=c.error)===null||f===void 0)&&f.missingMedia.includes("audio")&&s(Ie,"not-found");break;case"permissions":!((p=c.error)===null||p===void 0)&&p.blockedMedia.includes("video")&&s(Oe,"blocked"),!((g=c.error)===null||g===void 0)&&g.blockedMedia.includes("audio")&&s(Ie,"blocked");break;case"constraints":((y=c.error)===null||y===void 0?void 0:y.reason)==="invalid"?(s(Oe,"constraints-invalid"),s(Ie,"constraints-invalid")):((v=c.error)===null||v===void 0?void 0:v.reason)==="none-specified"&&(s(Oe,"constraints-none-specified"),s(Ie,"constraints-none-specified"));break;case"undefined-mediadevices":s(Oe,"undefined-mediadevices"),s(Ie,"undefined-mediadevices");break;case"unknown":default:s(Oe,"unknown"),s(Ie,"unknown");break}},[]))),q("started-camera",oe(R(function(a,s){s(Oe,"granted"),s(Ie,"granted"),o()},[o]))),de.createElement(w0.Provider,{value:{refreshDevices:i}},n)},Cr=ce({errorMsg:void 0,isLiveStreaming:!1,layout:void 0});Cr.debugLabel=me("live-streaming");var S0=function(t){var n=t.children;return q("live-streaming-started",oe(R(function(r,i,o){i(Cr,{isLiveStreaming:!0,layout:o?.layout})},[]))),q("live-streaming-stopped",oe(R(function(r,i){i(Cr,function(o){return ie(ie({},o),{isLiveStreaming:!1,layout:void 0})})},[]))),q("live-streaming-error",oe(R(function(r,i,o){i(Cr,function(a){return ie(ie({},a),{errorMsg:o.errorMsg})})},[]))),q("left-meeting",oe(R(function(r,i){i(Cr,{errorMsg:void 0,isLiveStreaming:!1,layout:void 0})},[]))),de.createElement(de.Fragment,null,n)},Qi=ce("new");Qi.debugLabel=me("meeting-state");var fs=ce(null);fs.debugLabel=me("meeting-error");var hs=ce(null);hs.debugLabel=me("non-fatal-error");var Pr=ce({data:void 0,topology:"none"});Pr.debugLabel=me("meeting-session-data");var x0=function(t){var n=t.children,r=wt(),i=oe(R(function(a,s){if(r){var c=r.meetingState();return s(Qi,c),c}},[r]));q("loading",i),q("loaded",i),q("joining-meeting",i),q("joined-meeting",i),q("left-meeting",i),q("error",oe(R(function(a,s,c){s(fs,c),i()},[i]))),q("nonfatal-error",oe(R(function(a,s,c){s(hs,c)},[])));var o=oe(R(function(a,s){r&&s(Pr,r.meetingSessionState())},[r]));return q("joined-meeting",o),q("meeting-session-state-updated",oe(R(function(a,s,c){s(Pr,c.meetingSessionState)},[]))),q("left-meeting",oe(R(function(a,s){s(Pr,{data:void 0,topology:"none"})},[]))),q("call-instance-destroyed",oe(R(function(a,s){s(Qi,"new"),s(fs,null),s(hs,null),s(Pr,{data:void 0,topology:"none"})},[]))),de.createElement(de.Fragment,null,n)},Gn=ce("none");Gn.debugLabel=me("topology");var Nf=ce("unknown"),Ff=ce([]),ps=ce(100);ps.debugLabel=me("network-quality");var ms=ce("good");ms.debugLabel=me("network-threshold");var T0=function(t){var n=t.children,r=wt(),i=nn(Gn),o=oe(R(function(a,s){return Jn(void 0,void 0,void 0,function(){var c;return Hn(this,function(l){switch(l.label){case 0:return r?[4,r.getNetworkTopology()]:[2];case 1:return c=l.sent(),!c||c?.topology==="none"?[2]:(s(Gn,c.topology),[2])}})})},[r]));return q("joined-meeting",o),q("network-connection",oe(R(function(a,s,c){switch(c.event){case"connected":c.type==="peer-to-peer"&&s(Gn,"peer"),c.type==="sfu"&&s(Gn,"sfu");break}},[]))),q("network-quality-change",oe(R(function(a,s,c){s(Nf,function(l){return l!==c.networkState?c.networkState:l}),s(Ff,function(l){var d,f=(d=c.networkStateReasons)!==null&&d!==void 0?d:[];return ns(l,f)?l:f}),s(ps,function(l){return l!==c.quality?c.quality:l}),s(ms,function(l){return l!==c.threshold?c.threshold:l})},[]))),q("left-meeting",oe(R(function(a,s){s(Gn,"none"),s(Nf,"unknown"),s(Ff,[]),s(ps,100),s(ms,"good")},[]))),Z(function(){!r||i!=="none"||o()},[r,o,i]),de.createElement(de.Fragment,null,n)},kn=ce({isLocalParticipantRecorded:!1,isRecording:!1});kn.debugLabel=me("recording-state");var M0=function(t){var n=t.children,r=qi(),i=wn({filter:"record"}),o=oe(R(function(a,s,c,l){var d=a(kn),f={isLocalParticipantRecorded:d.isLocalParticipantRecorded,isRecording:d.isRecording,local:d.local,type:d.type},p={isLocalParticipantRecorded:f?.type==="local"||!f?.type?c:f.isLocalParticipantRecorded,isRecording:f?.type==="local"||!f?.type?c:f.isRecording,local:(f?.type==="local"||!f?.type)&&c?l:f?.local,type:c?"local":d?.type};kt(f,p)||s(kn,ie(ie({},f),p))},[]));return Z(function(){var a=i.length>0,s=i.includes(r||"local");o(a,s)},[r,o,i]),q("recording-started",oe(R(function(a,s,c){var l,d=!0;switch(c.type){case"cloud-beta":case"cloud":{r&&((l=c.layout)===null||l===void 0?void 0:l.preset)==="single-participant"&&c.layout.session_id!==r&&(d=!1);break}}s(kn,{error:!1,isLocalParticipantRecorded:d,isRecording:!0,layout:c?.layout,local:c?.local,recordingId:c?.recordingId,recordingStartedDate:new Date,startedBy:c?.startedBy,type:c?.type})},[r]))),q("recording-stopped",oe(R(function(a,s){s(kn,function(c){return ie(ie({},c),{isLocalParticipantRecorded:!1,isRecording:!1})})},[]))),q("recording-error",oe(R(function(a,s){s(kn,function(c){return ie(ie({},c),{error:!0,isLocalParticipantRecorded:!1,isRecording:!1})})},[]))),q("left-meeting",oe(R(function(a,s){s(kn,{isLocalParticipantRecorded:!1,isRecording:!1})},[]))),de.createElement(de.Fragment,null,n)},C0=function(){var t=nn(Qi);return Ze(t),t},gs=ce(null);gs.debugLabel=me("room-state");var P0=function(t){var n=t.children,r=wt(),i=C0(),o=oe(R(function(a,s){return Jn(void 0,void 0,void 0,function(){var c;return Hn(this,function(l){switch(l.label){case 0:return!r||i==="left-meeting"?[2]:[4,r.room()];case 1:return c=l.sent(),c&&"id"in c&&s(gs,c),[2,c]}})})},[r,i]));return q("access-state-updated",o),q("left-meeting",oe(R(function(a,s){return function(){s(gs,null)}},[]))),de.createElement(de.Fragment,null,n)},Kn=ce({isTranscribing:!1,model:"general",language:"en",transcriptions:[]});Kn.debugLabel=me("transcription-state");var E0=function(t){var n=t.children;return q("transcription-started",oe(R(function(r,i,o){i(Kn,{error:!1,transcriptionStartDate:new Date,isTranscribing:!0,transcriptions:[],endpointing:o.endpointing,extra:o.extra,includeRawResponse:o.includeRawResponse,instanceId:o.instanceId,language:o.language,model:o.model,profanity_filter:o.profanity_filter,punctuate:o.punctuate,redact:o.redact,startedBy:o.startedBy,tier:o.tier})},[]))),q("transcription-stopped",oe(R(function(r,i,o){i(Kn,function(a){return ie(ie({},a),{updatedBy:o.updatedBy,isTranscribing:!1})})},[]))),q("transcription-error",oe(R(function(r,i){i(Kn,function(o){return ie(ie({},o),{error:!0,isTranscribing:!1})})},[]))),q("left-meeting",oe(R(function(r,i){i(Kn,function(o){return ie(ie({},o),{isTranscribing:!1})})},[]))),q("app-message",oe(R(function(r,i,o){o?.fromId==="transcription"&&i(Kn,function(a){return ie(ie({},a),{isTranscribing:!0,transcriptions:$e($e([],be(a.transcriptions),!1),[o.data],!1)})})},[]))),de.createElement(de.Fragment,null,n)},Bf={strictMode:!0},$f=function(){return!0},A0={options:Bf,shouldCreateInstance:$f},O0=function(t,n){var r=n===void 0?A0:n,i=r.parentElRef,o=r.options,a=o===void 0?Bf:o,s=r.shouldCreateInstance,c=s===void 0?$f:s,l=be(ne(null),2),d=l[0],f=l[1],p=fe();return Z(function(){if(!c())return;function g(b){return Jn(this,void 0,void 0,function(){return Hn(this,function(_){switch(_.label){case 0:return[4,b.destroy()];case 1:return _.sent(),[2]}})})}var y=function(){setTimeout(function(){return f(null)},0)},v=xr.getCallInstance();if(!d&&v&&!v.isDestroyed()){v.once("call-instance-destroyed",y),f(v);return}if(d){kt(p.current,a)||g(d);return}if(!v||v.isDestroyed())try{switch(t){case"callFrame":v=i?.current?xr.createFrame(i.current,ie({},a)):xr.createFrame(ie({},a));break;case"callObject":v=xr.createCallObject(ie({},a));break}p.current=a,f(v),v.once("call-instance-destroyed",y)}catch(b){if(console.error("Error creating call instance:",b),a.strictMode)throw b}},[d,a,i,c,t]),d},I0=function(t){return O0("callObject",t)},D0=function(t){var n=t.children,r=t.jotaiStore,i=Qa(t,["children","jotaiStore"]),o=fe({}),a=R(function(y){var v,b,_,k;if("action"in y){var x=y.action,C=Array.from((k=(_=o.current)===null||_===void 0?void 0:_[x])!==null&&k!==void 0?k:[]),T=C.filter(function(H){var F=be(H,1),X=F[0];return X<0}),M=C.filter(function(H){var F=be(H,1),X=F[0];return X>0}),A=$e($e([],be(T),!1),be(M),!1);try{for(var E=kf(A),j=E.next();!j.done;j=E.next()){var B=be(j.value,2),V=B[1];V(y)}}catch(H){v={error:H}}finally{try{j&&!j.done&&(b=E.return)&&b.call(E)}finally{if(v)throw v.error}}}},[]),s=R(function(y){y&&Object.keys(o.current).forEach(function(v){y.off(v,a),y.isDestroyed()||y.on(v,a)})},[a]),c="callObject"in i?i.callObject:null,l=Ve(function(){return"callObject"in i?{}:i},[i]),d=I0({options:l,shouldCreateInstance:R(function(){return!("callObject"in i)},[i])}),f=c??d;Z(function(){f&&s(f)},[f,s]);var p=R(function(y,v,b){var _,k;o.current[y]||(o.current[y]=new Map,f&&(f.off(y,a),f.isDestroyed()||f.on(y,a))),!((_=o.current[y])===null||_===void 0)&&_.has(b)||(k=o.current[y])===null||k===void 0||k.set(b,v)},[f,a]),g=R(function(y,v){var b,_;(b=o.current[y])===null||b===void 0||b.delete(v),((_=o.current[y])===null||_===void 0?void 0:_.size)===0&&(f?.off(y,a),delete o.current[y])},[f,a]);return de.createElement(sv,{store:r},de.createElement(Sf.Provider,{value:f},de.createElement(Za.Provider,{value:{on:p,off:g}},de.createElement(P0,null,de.createElement(x0,null,de.createElement(T0,null,de.createElement(g0,null,de.createElement(M0,null,de.createElement(S0,null,de.createElement(E0,null,de.createElement(k0,null,n)))))))))))},vs=function(t){var n={},r=n.onAppMessage,i=wt(),o=R(function(s,c){c===void 0&&(c="*"),i&&i.sendAppMessage(s,c)},[i]),a=R(function(s){r?.(s,o)},[r,o]);return q("app-message",a),o},L0=ce({state:"low",reason:"none"});L0.debugLabel=me("cpu-load");var j0=ce(null);j0.debugLabel=me("input-settings");var R0=ce({hidden:0,present:0});R0.debugLabel=me("participant-counts");var V0=fr(function(e){var t=ce({},function(n,r,i){r(V0(e),i)});return t.debugLabel=me("participant-receive-settings-".concat(e)),t}),N0=ce(null);N0.debugLabel=me("send-settings");const F0='@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-600:oklch(57.7% .245 27.325);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-light:300;--font-weight-medium:500;--font-weight-semibold:600;--radius-lg:.5rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--blur-lg:16px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-gray-40:#919191;--color-primary-action:#24ff5099;--color-primary-action-hover:#24ff5080}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.inset-2{inset:calc(var(--spacing)*2)}.inset-3{inset:calc(var(--spacing)*3)}.top-0{top:calc(var(--spacing)*0)}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-5{right:calc(var(--spacing)*5)}.right-15{right:calc(var(--spacing)*15)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-25{bottom:calc(var(--spacing)*25)}.left-0{left:calc(var(--spacing)*0)}.left-2{left:calc(var(--spacing)*2)}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-1000{z-index:1000}.mx-auto{margin-inline:auto}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.line-clamp-4{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.flex{display:flex}.hidden{display:none}.inline{display:inline}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.h-3{height:calc(var(--spacing)*3)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-\\[28px\\]{height:28px}.h-\\[64px\\]{height:64px}.h-\\[180px\\]{height:180px}.h-\\[216px\\]{height:216px}.h-\\[300px\\]{height:300px}.h-\\[377px\\]{height:377px}.h-full{height:100%}.max-h-36{max-height:calc(var(--spacing)*36)}.min-h-11{min-height:calc(var(--spacing)*11)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-25{width:calc(var(--spacing)*25)}.w-\\[36px\\]{width:36px}.w-\\[120px\\]{width:120px}.w-\\[144px\\]{width:144px}.w-\\[200px\\]{width:200px}.w-\\[252px\\]{width:252px}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[90\\%\\]{max-width:90%}.flex-1{flex:1}.flex-none{flex:none}.scale-25{--tw-scale-x:25%;--tw-scale-y:25%;--tw-scale-z:25%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-none{scale:none}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[22px\\]{border-radius:22px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-l-3xl{border-top-left-radius:var(--radius-3xl);border-bottom-left-radius:var(--radius-3xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.bg-\\[var\\(--color-primary-action\\)\\]{background-color:var(--color-primary-action)}.bg-black{background-color:var(--color-black)}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-black\\/95{background-color:#000000f2}@supports (color:color-mix(in lab,red,red)){.bg-black\\/95{background-color:color-mix(in oklab,var(--color-black)95%,transparent)}}.bg-gray-40\\/25{background-color:#91919140}@supports (color:color-mix(in lab,red,red)){.bg-gray-40\\/25{background-color:color-mix(in oklab,var(--color-gray-40)25%,transparent)}}.bg-gray-40\\/30{background-color:#9191914d}@supports (color:color-mix(in lab,red,red)){.bg-gray-40\\/30{background-color:color-mix(in oklab,var(--color-gray-40)30%,transparent)}}.bg-red-600\\/25{background-color:#e4001440}@supports (color:color-mix(in lab,red,red)){.bg-red-600\\/25{background-color:color-mix(in oklab,var(--color-red-600)25%,transparent)}}.bg-red-600\\/50{background-color:#e4001480}@supports (color:color-mix(in lab,red,red)){.bg-red-600\\/50{background-color:color-mix(in oklab,var(--color-red-600)50%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\\/30{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.bg-white\\/30{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.bg-\\[linear-gradient\\(transparent\\,\\#000000\\)\\]{background-image:linear-gradient(#0000,#000)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)\\,rgba\\(0\\,0\\,0\\,1\\)_10\\%\\,rgba\\(0\\,0\\,0\\,1\\)_30\\%\\,rgba\\(0\\,0\\,0\\,0\\)_40\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000,#000 10% 30%,#0000 40%);mask-image:linear-gradient(#0000,#000 10% 30%,#0000 40%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_10\\%\\,rgba\\(0\\,0\\,0\\,1\\)_20\\%\\,rgba\\(0\\,0\\,0\\,1\\)_40\\%\\,rgba\\(0\\,0\\,0\\,0\\)_50\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 10%,#000 20% 40%,#0000 50%);mask-image:linear-gradient(#0000 10%,#000 20% 40%,#0000 50%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_15\\%\\,rgba\\(0\\,0\\,0\\,1\\)_30\\%\\,rgba\\(0\\,0\\,0\\,1\\)_50\\%\\,rgba\\(0\\,0\\,0\\,0\\)_60\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 15%,#000 30% 50%,#0000 60%);mask-image:linear-gradient(#0000 15%,#000 30% 50%,#0000 60%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_20\\%\\,rgba\\(0\\,0\\,0\\,1\\)_40\\%\\,rgba\\(0\\,0\\,0\\,1\\)_60\\%\\,rgba\\(0\\,0\\,0\\,0\\)_70\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 20%,#000 40% 60%,#0000 70%);mask-image:linear-gradient(#0000 20%,#000 40% 60%,#0000 70%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_40\\%\\,rgba\\(0\\,0\\,0\\,1\\)_60\\%\\,rgba\\(0\\,0\\,0\\,1\\)_80\\%\\,rgba\\(0\\,0\\,0\\,0\\)_90\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 40%,#000 60% 80%,#0000 90%);mask-image:linear-gradient(#0000 40%,#000 60% 80%,#0000 90%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_60\\%\\,rgba\\(0\\,0\\,0\\,1\\)_80\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 60%,#000 80%);mask-image:linear-gradient(#0000 60%,#000 80%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_70\\%\\,rgba\\(0\\,0\\,0\\,1\\)_100\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 70%,#000 100%);mask-image:linear-gradient(#0000 70%,#000)}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-cover{object-fit:cover}.p-2{padding:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-14{padding-right:calc(var(--spacing)*14)}.pr-\\[4px\\]{padding-right:4px}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.text-right{text-align:right}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[8px\\]{font-size:8px}.leading-\\[1\\.4\\]{--tw-leading:1.4;line-height:1.4}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-nowrap{white-space:nowrap}.text-white{color:var(--color-white)}.text-white\\/75{color:#ffffffbf}@supports (color:color-mix(in lab,red,red)){.text-white\\/75{color:color-mix(in oklab,var(--color-white)75%,transparent)}}.underline{text-decoration-line:underline}.decoration-white\\/50{text-decoration-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.decoration-white\\/50{-webkit-text-decoration-color:color-mix(in oklab,var(--color-white)50%,transparent);text-decoration-color:color-mix(in oklab,var(--color-white)50%,transparent)}}.opacity-0{opacity:0}.opacity-100{opacity:1}.mix-blend-difference{mix-blend-mode:difference}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xs{--tw-shadow:0 1px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-sm{--tw-blur:blur(var(--blur-sm));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-\\[1px\\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[2px\\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[4px\\]{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[8px\\]{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[16px\\]{--tw-backdrop-blur:blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[32px\\]{--tw-backdrop-blur:blur(32px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-\\[64px\\]{--tw-backdrop-blur:blur(64px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-none{--tw-backdrop-blur: ;-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[backdrop-filter\\]{transition-property:-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-linear{--tw-ease:linear;transition-timing-function:linear}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.\\[scrollbar-width\\:none\\]{scrollbar-width:none}.placeholder\\:text-white\\/70::placeholder{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-white\\/70::placeholder{color:color-mix(in oklab,var(--color-white)70%,transparent)}}.placeholder\\:opacity-0::placeholder{opacity:0}.placeholder\\:opacity-70::placeholder{opacity:.7}@media(hover:hover){.hover\\:bg-\\[var\\(--color-primary-action-hover\\)\\]:hover{background-color:var(--color-primary-action-hover)}.hover\\:bg-black\\/30:hover{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-black\\/30:hover{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.hover\\:bg-gray-40\\/40:hover{background-color:#91919166}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-gray-40\\/40:hover{background-color:color-mix(in oklab,var(--color-gray-40)40%,transparent)}}.hover\\:bg-white\\/15:hover{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/15:hover{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.hover\\:bg-white\\/80:hover{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/80:hover{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}}@media(min-width:40rem){.sm\\:flex{display:flex}.sm\\:hidden{display:none}}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:hidden::-webkit-scrollbar{display:none}.shadow-inset-white-10{box-shadow:inset 0 0 0 1px #ffffff1a}.shadow-inset-white-20{box-shadow:inset 0 0 0 1px #fff3}.shadow-focused{box-shadow:inset 0 0 0 1.5px #fff6}}@keyframes fadeInUp{0%{opacity:0;filter:blur(12px);transform:translateY(12px)}to{opacity:1;filter:blur();transform:translateY(0)}}@keyframes fadeOutUp{0%{opacity:1;filter:blur();transform:translateY(0)}to{opacity:0;filter:blur(12px);transform:translateY(-12px)}}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}';function B0(){return O("style",{children:F0})}const Uf=De(void 0);function $0({children:e}){const[t,n]=ne(!1);return O(Uf.Provider,{value:{hasUserInteracted:t,setHasUserInteracted:n},children:e})}function Er(){const e=ge(Uf);if(!e)throw new Error("useUserInteraction must be used within a UserInteractionProvider");return e}const Te="active",Ye="minimized",Pt="hidden",zf=De(void 0),U0=3e4;function z0({children:e,showMinimizeButton:t=!0,initialState:n=Ye,controlledWidgetState:r=null,controlledShowMinimizeButton:i=null,customActiveWidth:o=null,customActiveHeight:a=null,customMinimizedWidth:s=null,customMinimizedHeight:c=null}){const{setHasUserInteracted:l}=Er(),d=vs(),f=wt(),[p,g]=ne(n),[y,v]=ne(!1),[b,_]=ne(!1),[k,x]=ne(!1),[C,T]=ne(null),[M,A]=ne(!1),[E,j]=ne(t),[B,V]=ne(!1),[H,F]=ne(!1),X=fe(null),K=fe(null),se=fe(null),G=fe(n);Z(()=>{G.current=p},[p]);const N=R(()=>{if(f)try{const z=f.meetingState();(z==="joined-meeting"||z==="joining-meeting")&&(console.log("Sending force-end event to Daily"),d({event:"force-end"},"*"))}catch{}v(!1),l(!1),A(!1),T(null),V(!1),F(!1)},[f]),J=R(z=>{X.current!==null&&clearTimeout(X.current),K.current!==null&&clearTimeout(K.current),z===Te?se.current!==null&&(clearTimeout(se.current),se.current=null):G.current===Te&&z===Ye&&(se.current=window.setTimeout(()=>{N(),se.current=null},U0)),z===Pt||G.current===Pt?(_(!0),X.current=window.setTimeout(()=>{G.current=z,g(z),_(!1),x(!0),X.current=null,K.current=window.setTimeout(()=>{x(!1),K.current=null},300)},1)):(G.current=z,g(z),_(!1),x(!1))},[N]);return Z(()=>{r!==null&&J(r)},[r]),Z(()=>{i!==null&&j(i)},[i]),O(zf.Provider,{value:{widgetState:p,setWidgetState:J,isAgentVideoReady:y,setIsAgentVideoReady:v,roomUrl:C,setRoomUrl:T,isTransitioning:k,isAboutToTransition:b,hasJoinedRoom:M,setHasJoinedRoom:A,resetDailyState:N,showMinimizeButton:E,setShowMinimizeButton:j,isImageChangeRequested:B,setIsImageChangeRequested:V,isImageChanging:H,setIsImageChanging:F,customActiveWidth:o,customActiveHeight:a,customMinimizedWidth:s,customMinimizedHeight:c},children:e})}function Ft(){const e=ge(zf);if(!e)throw new Error("useWidget must be used within a WidgetProvider");return e}const Wf=De(void 0);function W0({children:e}){const[t,n]=ne(!0),[r,i]=ne(!0),o=wt();return Z(()=>{o&&o.setLocalAudio(!t)},[t,o]),O(Wf.Provider,{value:{isMicMuted:t,setIsMicMuted:n,isAudioMuted:r,setIsAudioMuted:i},children:e})}function ys(){const e=ge(Wf);if(!e)throw new Error("useMute must be used within a MuteProvider");return e}const Jf=De(void 0);function J0({children:e}){const t=Ve(()=>typeof window>"u"?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),[]);return O(Jf.Provider,{value:{isMobileDevice:t},children:e})}function bs(){const e=ge(Jf);if(!e)throw new Error("useMobile must be used within a MobileProvider");return e}const Hf=De(void 0);function H0({children:e}){const[t,n]=ne(null);return O(Hf.Provider,{value:{agentData:t,setAgentData:n},children:e})}function Sn(){const e=ge(Hf);if(!e)throw new Error("useAgent must be used within an AgentProvider");return e}const qf=360,q0=30,Gf=De(void 0);function G0({children:e}){const[t,n]=ne(""),[r,i]=ne(""),[o,a]=ne(""),s=fe(null),c=fe(null),{agentData:l}=Sn(),{resetDailyState:d,setWidgetState:f}=Ft(),p=fe(qf),g=R(b=>{c.current!==null&&(clearTimeout(c.current),c.current=null),i(b),b&&(c.current=window.setTimeout(()=>{i(""),c.current=null},1e4))},[]),y=R(()=>{n(""),g(""),a("")},[]),v=R(()=>{s.current!==null&&clearInterval(s.current);const b=l?.max_conv_dur!=null&&l.max_conv_dur>0?l.max_conv_dur:qf;p.current=b,a(""),s.current=window.setInterval(()=>{p.current-=1,p.current<=q0&&p.current>0?a(`• ${p.current}s left`):p.current===0&&s.current!==null&&(a(""),n(""),g(""),f(Ye),d(),clearInterval(s.current),s.current=null)},1e3)},[l,f,d]);return Z(()=>{s.current!==null&&l?.max_conv_dur!=null&&l.max_conv_dur>0&&v()},[l?.max_conv_dur,v]),Z(()=>{!r&&c.current!==null&&(clearTimeout(c.current),c.current=null)},[r]),Z(()=>()=>{s.current!==null&&clearInterval(s.current),c.current!==null&&clearTimeout(c.current)},[]),O(Gf.Provider,{value:{errorMsg:t,setErrorMsg:n,nonFatalErrorMsg:r,setNonFatalErrorMsg:g,timeMsg:o,setTimeMsg:a,startMaxVideoTimer:v,resetErrors:y},children:e})}function Zi(){const e=ge(Gf);if(!e)throw new Error("useError must be used within an ErrorProvider");return e}function K0(){const e=wn({filter:"remote"}),{timeMsg:t}=Zi(),{agentData:n}=Sn(),{isImageChanging:r}=Ft();if(e.length===0)return null;const i=e[0],o=n?.image_url;return O("div",{className:"h-full rounded-lg relative",children:[o&&O("div",{className:"absolute inset-0 bg-cover bg-center rounded-lg",style:{backgroundImage:`url(${o})`}}),O("div",{className:"relative w-full h-full",children:[O(jf,{sessionId:i,type:"video",style:{objectFit:"cover",width:"100%",height:"100%",position:"relative"}}),O("div",{className:`absolute inset-0 bg-black/95 bg-cover bg-center rounded-lg transition-opacity
36
36
  transition-[backdrop-filter] duration-300 ease-in-out
37
- ${r?"opacity-100 backdrop-blur-lg":"opacity-0 backdrop-blur-none"}`})]}),t&&O("div",{className:"absolute top-2 left-2",children:O("div",{className:"bg-red-600/50 backdrop-blur-xl rounded-3xl py-2 px-4 w-fit shadow-inset-white-10",children:O("p",{className:"text-white text-lg font-semibold text-center",children:t})})})]})}const Gf=Ie({});function K0(e){const t=de(null);return t.current===null&&(t.current=e()),t.current}const bs=typeof window<"u",Y0=bs?In:X,_s=Ie(null);function ws(e,t){e.indexOf(t)===-1&&e.push(t)}function ks(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Vt=(e,t,n)=>n>t?t:n<e?e:n;let Ss=()=>{};const Nt={},Kf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Yf(e){return typeof e=="object"&&e!==null}const Xf=e=>/^0[^.\s]+$/u.test(e);function xs(e){let t;return()=>(t===void 0&&(t=e()),t)}const lt=e=>e,X0=(e,t)=>n=>t(e(n)),Er=(...e)=>e.reduce(X0),Ar=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ts{constructor(){this.subscriptions=[]}add(t){return ws(this.subscriptions,t),()=>ks(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ct=e=>e*1e3,ut=e=>e/1e3;function Qf(e,t){return t?e*(1e3/t):0}const Zf=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Q0=1e-7,Z0=12;function e_(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Zf(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Q0&&++s<Z0);return o}function Or(e,t,n,r){if(e===t&&n===r)return lt;const i=a=>e_(a,0,1,e,n);return a=>a===0||a===1?a:Zf(i(a),t,r)}const eh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,th=e=>t=>1-e(1-t),nh=Or(.33,1.53,.69,.99),Ms=th(nh),rh=eh(Ms),ih=e=>(e*=2)<1?.5*Ms(e):.5*(2-Math.pow(2,-10*(e-1))),Cs=e=>1-Math.sin(Math.acos(e)),ah=th(Cs),oh=eh(Cs),t_=Or(.42,0,1,1),n_=Or(0,0,.58,1),sh=Or(.42,0,.58,1),r_=e=>Array.isArray(e)&&typeof e[0]!="number",ch=e=>Array.isArray(e)&&typeof e[0]=="number",i_={linear:lt,easeIn:t_,easeInOut:sh,easeOut:n_,circIn:Cs,circInOut:oh,circOut:ah,backIn:Ms,backInOut:rh,backOut:nh,anticipate:ih},a_=e=>typeof e=="string",lh=e=>{if(ch(e)){Ss(e.length===4);const[t,n,r,i]=e;return Or(t,n,r,i)}else if(a_(e))return i_[e];return e},ea=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function o_(e,t){let n=new Set,r=new Set,i=!1,a=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function c(d){o.has(d)&&(l.schedule(d),e()),d(s)}const l={schedule:(d,f=!1,p=!1)=>{const y=p&&i?n:r;return f&&o.add(d),y.has(d)||y.add(d),d},cancel:d=>{r.delete(d),o.delete(d)},process:d=>{if(s=d,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),n.clear(),i=!1,a&&(a=!1,l.process(d))}};return l}const s_=40;function uh(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=ea.reduce((T,M)=>(T[M]=o_(a),T),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:d,update:f,preRender:p,render:g,postRender:y}=o,v=()=>{const T=Nt.useManualTiming?i.timestamp:performance.now();n=!1,Nt.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(T-i.timestamp,s_),1)),i.timestamp=T,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),d.process(i),f.process(i),p.process(i),g.process(i),y.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(v))},b=()=>{n=!0,r=!0,i.isProcessing||e(v)};return{schedule:ea.reduce((T,M)=>{const x=o[M];return T[M]=(C,A=!1,E=!1)=>(n||b(),x.schedule(C,A,E)),T},{}),cancel:T=>{for(let M=0;M<ea.length;M++)o[ea[M]].cancel(T)},state:i,steps:o}}const{schedule:ke,cancel:Gt,state:Re,steps:Ps}=uh(typeof requestAnimationFrame<"u"?requestAnimationFrame:lt,!0);let ta;function c_(){ta=void 0}const Ye={now:()=>(ta===void 0&&Ye.set(Re.isProcessing||Nt.useManualTiming?Re.timestamp:performance.now()),ta),set:e=>{ta=e,queueMicrotask(c_)}},dh=e=>t=>typeof t=="string"&&t.startsWith(e),Es=dh("--"),l_=dh("var(--"),As=e=>l_(e)?u_.test(e.split("/*")[0].trim()):!1,u_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Kn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ir={...Kn,transform:e=>Vt(0,1,e)},na={...Kn,default:1},Dr=e=>Math.round(e*1e5)/1e5,Os=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function d_(e){return e==null}const f_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Is=(e,t)=>n=>!!(typeof n=="string"&&f_.test(n)&&n.startsWith(e)||t&&!d_(n)&&Object.prototype.hasOwnProperty.call(n,t)),fh=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,s]=r.match(Os);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},h_=e=>Vt(0,255,e),Ds={...Kn,transform:e=>Math.round(h_(e))},wn={test:Is("rgb","red"),parse:fh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ds.transform(e)+", "+Ds.transform(t)+", "+Ds.transform(n)+", "+Dr(Ir.transform(r))+")"};function p_(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Ls={test:Is("#"),parse:p_,transform:wn.transform},Lr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kt=Lr("deg"),Pt=Lr("%"),q=Lr("px"),m_=Lr("vh"),g_=Lr("vw"),hh={...Pt,parse:e=>Pt.parse(e)/100,transform:e=>Pt.transform(e*100)},Yn={test:Is("hsl","hue"),parse:fh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pt.transform(Dr(t))+", "+Pt.transform(Dr(n))+", "+Dr(Ir.transform(r))+")"},Pe={test:e=>wn.test(e)||Ls.test(e)||Yn.test(e),parse:e=>wn.test(e)?wn.parse(e):Yn.test(e)?Yn.parse(e):Ls.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?wn.transform(e):Yn.transform(e),getAnimatableNone:e=>{const t=Pe.parse(e);return t.alpha=0,Pe.transform(t)}},v_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function y_(e){return isNaN(e)&&typeof e=="string"&&(e.match(Os)?.length||0)+(e.match(v_)?.length||0)>0}const ph="number",mh="color",b_="var",__="var(",gh="${}",w_=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function jr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const s=t.replace(w_,c=>(Pe.test(c)?(r.color.push(a),i.push(mh),n.push(Pe.parse(c))):c.startsWith(__)?(r.var.push(a),i.push(b_),n.push(c)):(r.number.push(a),i.push(ph),n.push(parseFloat(c))),++a,gh)).split(gh);return{values:n,split:s,indexes:r,types:i}}function vh(e){return jr(e).values}function yh(e){const{split:t,types:n}=jr(e),r=t.length;return i=>{let a="";for(let o=0;o<r;o++)if(a+=t[o],i[o]!==void 0){const s=n[o];s===ph?a+=Dr(i[o]):s===mh?a+=Pe.transform(i[o]):a+=i[o]}return a}}const k_=e=>typeof e=="number"?0:Pe.test(e)?Pe.getAnimatableNone(e):e;function S_(e){const t=vh(e);return yh(e)(t.map(k_))}const Yt={test:y_,parse:vh,createTransformer:yh,getAnimatableNone:S_};function js(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<.16666666666666666?e+(t-e)*6*n:n<.5?t:n<.6666666666666666?e+(t-e)*(.6666666666666666-n)*6:e}function x_({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;i=js(c,s,e+.3333333333333333),a=js(c,s,e),o=js(c,s,e-.3333333333333333)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function ra(e,t){return n=>n>0?t:e}const xe=(e,t,n)=>e+(t-e)*n,Rs=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},T_=[Ls,wn,Yn],M_=e=>T_.find(t=>t.test(e));function bh(e){const t=M_(e);if(!t)return!1;let n=t.parse(e);return t===Yn&&(n=x_(n)),n}const _h=(e,t)=>{const n=bh(e),r=bh(t);if(!n||!r)return ra(e,t);const i={...n};return a=>(i.red=Rs(n.red,r.red,a),i.green=Rs(n.green,r.green,a),i.blue=Rs(n.blue,r.blue,a),i.alpha=xe(n.alpha,r.alpha,a),wn.transform(i))},Vs=new Set(["none","hidden"]);function C_(e,t){return Vs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function P_(e,t){return n=>xe(e,t,n)}function Ns(e){return typeof e=="number"?P_:typeof e=="string"?As(e)?ra:Pe.test(e)?_h:O_:Array.isArray(e)?wh:typeof e=="object"?Pe.test(e)?_h:E_:ra}function wh(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>Ns(a)(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=i[o](a);return n}}function E_(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Ns(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function A_(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}const O_=(e,t)=>{const n=Yt.createTransformer(t),r=jr(e),i=jr(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Vs.has(e)&&!i.values.length||Vs.has(t)&&!r.values.length?C_(e,t):Er(wh(A_(r,i),i.values),n):ra(e,t)};function kh(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?xe(e,t,n):Ns(e)(e,t)}const I_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ke.update(t,n),stop:()=>Gt(t),now:()=>Re.isProcessing?Re.timestamp:Ye.now()}},Sh=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)r+=Math.round(e(a/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},ia=2e4;function Fs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ia;)t+=n,r=e.next(t);return t>=ia?1/0:t}function D_(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Fs(r),ia);return{type:"keyframes",ease:a=>r.next(i*a).value/t,duration:ut(i)}}const L_=5;function xh(e,t,n){const r=Math.max(t-L_,0);return Qf(n-e(r),t-r)}const Te={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Bs=.001;function j_({duration:e=Te.duration,bounce:t=Te.bounce,velocity:n=Te.velocity,mass:r=Te.mass}){let i,a,o=1-t;o=Vt(Te.minDamping,Te.maxDamping,o),e=Vt(Te.minDuration,Te.maxDuration,ut(e)),o<1?(i=l=>{const d=l*o,f=d*e,p=d-n,g=$s(l,o),y=Math.exp(-f);return Bs-p/g*y},a=l=>{const f=l*o*e,p=f*n+n,g=Math.pow(o,2)*Math.pow(l,2)*e,y=Math.exp(-f),v=$s(Math.pow(l,2),o);return(-i(l)+Bs>0?-1:1)*((p-g)*y)/v}):(i=l=>{const d=Math.exp(-l*e),f=(l-n)*e+1;return-Bs+d*f},a=l=>{const d=Math.exp(-l*e),f=(n-l)*(e*e);return d*f});const s=5/e,c=V_(i,a,s);if(e=Ct(e),isNaN(c))return{stiffness:Te.stiffness,damping:Te.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:o*2*Math.sqrt(r*l),duration:e}}}const R_=12;function V_(e,t,n){let r=n;for(let i=1;i<R_;i++)r=r-e(r)/t(r);return r}function $s(e,t){return e*Math.sqrt(1-t*t)}const N_=["duration","bounce"],F_=["stiffness","damping","mass"];function Th(e,t){return t.some(n=>e[n]!==void 0)}function B_(e){let t={velocity:Te.velocity,stiffness:Te.stiffness,damping:Te.damping,mass:Te.mass,isResolvedFromDuration:!1,...e};if(!Th(e,F_)&&Th(e,N_))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*Vt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Te.mass,stiffness:i,damping:a}}else{const n=j_(e);t={...t,...n,mass:Te.mass},t.isResolvedFromDuration=!0}return t}function aa(e=Te.visualDuration,t=Te.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:d,duration:f,velocity:p,isResolvedFromDuration:g}=B_({...n,velocity:-ut(n.velocity||0)}),y=p||0,v=l/(2*Math.sqrt(c*d)),b=o-a,_=ut(Math.sqrt(c/d)),k=Math.abs(b)<5;r||(r=k?Te.restSpeed.granular:Te.restSpeed.default),i||(i=k?Te.restDelta.granular:Te.restDelta.default);let T;if(v<1){const x=$s(_,v);T=C=>{const A=Math.exp(-v*_*C);return o-A*((y+v*_*b)/x*Math.sin(x*C)+b*Math.cos(x*C))}}else if(v===1)T=x=>o-Math.exp(-_*x)*(b+(y+_*b)*x);else{const x=_*Math.sqrt(v*v-1);T=C=>{const A=Math.exp(-v*_*C),E=Math.min(x*C,300);return o-A*((y+v*_*b)*Math.sinh(E)+x*b*Math.cosh(E))/x}}const M={calculatedDuration:g&&f||null,next:x=>{const C=T(x);if(g)s.done=x>=f;else{let A=x===0?y:0;v<1&&(A=x===0?Ct(y):xh(T,x,C));const E=Math.abs(A)<=r,R=Math.abs(o-C)<=i;s.done=E&&R}return s.value=s.done?o:C,s},toString:()=>{const x=Math.min(Fs(M),ia),C=Sh(A=>M.next(x*A).value,x,30);return x+"ms "+C},toTransition:()=>{}};return M}aa.applyToOptions=e=>{const t=D_(e,100,aa);return e.ease=t.ease,e.duration=Ct(t.duration),e.type="keyframes",e};function Us({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:d}){const f=e[0],p={done:!1,value:f},g=E=>s!==void 0&&E<s||c!==void 0&&E>c,y=E=>s===void 0?c:c===void 0||Math.abs(s-E)<Math.abs(c-E)?s:c;let v=n*t;const b=f+v,_=o===void 0?b:o(b);_!==b&&(v=_-f);const k=E=>-v*Math.exp(-E/r),T=E=>_+k(E),M=E=>{const R=k(E),F=T(E);p.done=Math.abs(R)<=l,p.value=p.done?_:F};let x,C;const A=E=>{g(p.value)&&(x=E,C=aa({keyframes:[p.value,y(p.value)],velocity:xh(T,E,p.value),damping:i,stiffness:a,restDelta:l,restSpeed:d}))};return A(0),{calculatedDuration:null,next:E=>{let R=!1;return!C&&x===void 0&&(R=!0,M(E),A(E)),x!==void 0&&E>=x?C.next(E-x):(!R&&M(E),p)}}}function $_(e,t,n){const r=[],i=n||Nt.mix||kh,a=e.length-1;for(let o=0;o<a;o++){let s=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||lt:t;s=Er(c,s)}r.push(s)}return r}function U_(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(Ss(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=$_(t,r,i),c=s.length,l=d=>{if(o&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const p=Ar(e[f],e[f+1],d);return s[f](p)};return n?d=>l(Vt(e[0],e[a-1],d)):l}function z_(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ar(0,t,r);e.push(xe(n,1,i))}}function W_(e){const t=[0];return z_(t,e.length-1),t}function J_(e,t){return e.map(n=>n*t)}function q_(e,t){return e.map(()=>t||sh).splice(0,e.length-1)}function Rr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=r_(r)?r.map(lh):lh(r),a={done:!1,value:t[0]},o=J_(n&&n.length===t.length?n:W_(t),e),s=U_(o,t,{ease:Array.isArray(i)?i:q_(t,i)});return{calculatedDuration:e,next:c=>(a.value=s(c),a.done=c>=e,a)}}const H_=e=>e!==null;function zs(e,{repeat:t,repeatType:n="loop"},r,i=1){const a=e.filter(H_),s=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!s||r===void 0?a[s]:r}const G_={decay:Us,inertia:Us,tween:Rr,keyframes:Rr,spring:aa};function Mh(e){typeof e.type=="string"&&(e.type=G_[e.type])}class Ws{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const K_=e=>e/100;class Js extends Ws{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Ye.now()&&this.tick(Ye.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Mh(t);const{type:n=Rr,repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=t;let{keyframes:s}=t;const c=n||Rr;c!==Rr&&typeof s[0]!="number"&&(this.mixKeyframes=Er(K_,kh(s[0],s[1])),s=[0,100]);const l=c({...t,keyframes:s});a==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...s].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=Fs(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=l}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:s,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:d,repeat:f,repeatType:p,repeatDelay:g,type:y,onUpdate:v,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const _=this.currentTime-l*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?_<0:_>i;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,M=r;if(f){const E=Math.min(this.currentTime,i)/s;let R=Math.floor(E),F=E%1;!F&&E>=1&&(F=1),F===1&&R--,R=Math.min(R,f+1),!!(R%2)&&(p==="reverse"?(F=1-F,g&&(F-=g/s)):p==="mirror"&&(M=o)),T=Vt(0,1,F)*s}const x=k?{done:!1,value:d[0]}:M.next(T);a&&(x.value=a(x.value));let{done:C}=x;!k&&c!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return A&&y!==Us&&(x.value=zs(d,this.options,b,this.speed)),v&&v(x.value),A&&this.finish(),x}then(t,n){return this.finished.then(t,n)}get duration(){return ut(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ut(t)}get time(){return ut(this.currentTime)}set time(t){t=Ct(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ye.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ut(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=I_,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ye.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Y_(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const kn=e=>e*180/Math.PI,qs=e=>{const t=kn(Math.atan2(e[1],e[0]));return Hs(t)},X_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qs,rotateZ:qs,skewX:e=>kn(Math.atan(e[1])),skewY:e=>kn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Hs=e=>(e=e%360,e<0&&(e+=360),e),Ch=qs,Ph=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Eh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Q_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ph,scaleY:Eh,scale:e=>(Ph(e)+Eh(e))/2,rotateX:e=>Hs(kn(Math.atan2(e[6],e[5]))),rotateY:e=>Hs(kn(Math.atan2(-e[2],e[0]))),rotateZ:Ch,rotate:Ch,skewX:e=>kn(Math.atan(e[4])),skewY:e=>kn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Gs(e){return e.includes("scale")?1:0}function Ks(e,t){if(!e||e==="none")return Gs(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Q_,i=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=X_,i=s}if(!i)return Gs(t);const a=r[t],o=i[1].split(",").map(ew);return typeof a=="function"?a(o):o[a]}const Z_=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ks(n,t)};function ew(e){return parseFloat(e.trim())}const Xn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qn=new Set(Xn),Ah=e=>e===Kn||e===q,tw=new Set(["x","y","z"]),nw=Xn.filter(e=>!tw.has(e));function rw(e){const t=[];return nw.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Sn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ks(t,"x"),y:(e,{transform:t})=>Ks(t,"y")};Sn.translateX=Sn.x,Sn.translateY=Sn.y;const xn=new Set;let Ys=!1,Xs=!1,Qs=!1;function Oh(){if(Xs){const e=Array.from(xn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=rw(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,o])=>{r.getValue(a)?.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Xs=!1,Ys=!1,xn.forEach(e=>e.complete(Qs)),xn.clear()}function Ih(){xn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Xs=!0)})}function iw(){Qs=!0,Ih(),Oh(),Qs=!1}class Zs{constructor(t,n,r,i,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(xn.add(this),Ys||(Ys=!0,ke.read(Ih),ke.resolveKeyframes(Oh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const a=i?.get(),o=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const s=r.readValue(n,o);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=o),i&&a===void 0&&i.set(t[0])}Y_(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),xn.delete(this)}cancel(){this.state==="scheduled"&&(xn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const aw=e=>e.startsWith("--");function ow(e,t,n){aw(t)?e.style.setProperty(t,n):e.style[t]=n}const sw=xs(()=>window.ScrollTimeline!==void 0),cw={};function lw(e,t){const n=xs(e);return()=>cw[t]??n()}const Dh=lw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Vr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Lh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vr([0,.65,.55,1]),circOut:Vr([.55,0,1,.45]),backIn:Vr([.31,.01,.66,-.59]),backOut:Vr([.33,1.53,.69,.99])};function jh(e,t){if(e)return typeof e=="function"?Dh()?Sh(e,t):"ease-out":ch(e)?Vr(e):Array.isArray(e)?e.map(n=>jh(n,t)||Lh.easeOut):Lh[e]}function uw(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeOut",times:c}={},l=void 0){const d={[t]:n};c&&(d.offset=c);const f=jh(s,i);Array.isArray(f)&&(d.easing=f);const p={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};return l&&(p.pseudoElement=l),e.animate(d,p)}function Rh(e){return typeof e=="function"&&"applyToOptions"in e}function dw({type:e,...t}){return Rh(e)&&Dh()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class fw extends Ws{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:s,onComplete:c}=t;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=t,Ss(typeof t.type!="string");const l=dw(t);this.animation=uw(n,r,i,l,a),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const d=zs(i,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(d):ow(n,r,d),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ut(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ut(t)}get time(){return ut(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ct(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&sw()?(this.animation.timeline=t,lt):n(this)}}const Vh={anticipate:ih,backInOut:rh,circInOut:oh};function hw(e){return e in Vh}function pw(e){typeof e.ease=="string"&&hw(e.ease)&&(e.ease=Vh[e.ease])}const Nh=10;class mw extends fw{constructor(t){pw(t),Mh(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:a,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new Js({...o,autoplay:!1}),c=Ct(this.finishedTime??this.time);n.setWithVelocity(s.sample(c-Nh).value,s.sample(c).value,Nh),s.stop()}}const Fh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Yt.test(e)||e==="0")&&!e.startsWith("url("));function gw(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function vw(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=Fh(i,t),s=Fh(a,t);return!o||!s?!1:gw(e)||(n==="spring"||Rh(n))&&r}function ec(e){e.duration=0,e.type="keyframes"}const yw=new Set(["opacity","clipPath","filter","transform"]),bw=xs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function _w(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=t.owner.getProps();return bw()&&n&&yw.has(n)&&(n!=="transform"||!l)&&!c&&!r&&i!=="mirror"&&a!==0&&o!=="inertia"}const ww=40;class kw extends Ws{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",keyframes:s,name:c,motionValue:l,element:d,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ye.now();const p={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:o,name:c,motionValue:l,element:d,...f},g=d?.KeyframeResolver||Zs;this.keyframeResolver=new g(s,(y,v,b)=>this.onKeyframesResolved(y,v,p,!b),c,l,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:a,type:o,velocity:s,delay:c,isHandoff:l,onUpdate:d}=r;this.resolvedAt=Ye.now(),vw(t,a,o,s)||((Nt.instantAnimations||!c)&&d?.(zs(t,r,n)),t[0]=t[t.length-1],ec(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ww?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=!l&&_w(p)?new mw({...p,element:p.motionValue.owner.current}):new Js(p);g.finished.then(()=>this.notifyFinished()).catch(lt),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),iw()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Sw=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function xw(e){const t=Sw.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Bh(e,t,n=1){const[r,i]=xw(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return Kf(o)?parseFloat(o):o}return As(i)?Bh(i,t,n+1):i}function tc(e,t){return e?.[t]??e?.default??e}const $h=new Set(["width","height","top","left","right","bottom",...Xn]),Tw={test:e=>e==="auto",parse:e=>e},Uh=e=>t=>t.test(e),zh=[Kn,q,Pt,Kt,g_,m_,Tw],Wh=e=>zh.find(Uh(e));function Mw(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Xf(e):!0}const Cw=new Set(["brightness","contrast","saturate","opacity"]);function Pw(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Os)||[];if(!r)return e;const i=n.replace(r,"");let a=Cw.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const Ew=/\b([a-z-]*)\(.*?\)/gu,nc={...Yt,getAnimatableNone:e=>{const t=e.match(Ew);return t?t.map(Pw).join(" "):e}},Jh={...Kn,transform:Math.round},rc={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,radius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,backgroundPositionX:q,backgroundPositionY:q,...{rotate:Kt,rotateX:Kt,rotateY:Kt,rotateZ:Kt,scale:na,scaleX:na,scaleY:na,scaleZ:na,skew:Kt,skewX:Kt,skewY:Kt,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:Ir,originX:hh,originY:hh,originZ:q},zIndex:Jh,fillOpacity:Ir,strokeOpacity:Ir,numOctaves:Jh},Aw={...rc,color:Pe,backgroundColor:Pe,outlineColor:Pe,fill:Pe,stroke:Pe,borderColor:Pe,borderTopColor:Pe,borderRightColor:Pe,borderBottomColor:Pe,borderLeftColor:Pe,filter:nc,WebkitFilter:nc},qh=e=>Aw[e];function Hh(e,t){let n=qh(e);return n!==nc&&(n=Yt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ow=new Set(["auto","none","0"]);function Iw(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!Ow.has(a)&&jr(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=Hh(n,i)}class Dw extends Zs{constructor(t,n,r,i,a){super(t,n,r,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),As(l))){const d=Bh(l,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!$h.has(r)||t.length!==2)return;const[i,a]=t,o=Wh(i),s=Wh(a);if(o!==s)if(Ah(o)&&Ah(s))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else Sn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||Mw(t[i]))&&r.push(i);r.length&&Iw(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Sn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const a=r.length-1,o=r[a];r[a]=Sn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,c])=>{t.getValue(s).set(c)}),this.resolveNoneKeyframes()}}function Lw(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const Gh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function jw(e){return Yf(e)&&"offsetHeight"in e}const Kh=30,Rw=e=>!isNaN(parseFloat(e));class Vw{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=Ye.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ye.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Rw(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ts);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Kh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Kh);return Qf(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zn(e,t){return new Vw(e,t)}const{schedule:ic}=uh(queueMicrotask,!1),kt={x:!1,y:!1};function Yh(){return kt.x||kt.y}function Nw(e){return e==="x"||e==="y"?kt[e]?null:(kt[e]=!0,()=>{kt[e]=!1}):kt.x||kt.y?null:(kt.x=kt.y=!0,()=>{kt.x=kt.y=!1})}function Xh(e,t){const n=Lw(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Qh(e){return!(e.pointerType==="touch"||Yh())}function Fw(e,t,n={}){const[r,i,a]=Xh(e,n),o=s=>{if(!Qh(s))return;const{target:c}=s,l=t(c,s);if(typeof l!="function"||!c)return;const d=f=>{Qh(f)&&(l(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,i)};return r.forEach(s=>{s.addEventListener("pointerenter",o,i)}),a}const Zh=(e,t)=>t?e===t?!0:Zh(e,t.parentElement):!1,ac=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Bw=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function $w(e){return Bw.has(e.tagName)||e.tabIndex!==-1}const oa=new WeakSet;function ep(e){return t=>{t.key==="Enter"&&e(t)}}function oc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Uw=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ep(()=>{if(oa.has(n))return;oc(n,"down");const i=ep(()=>{oc(n,"up")}),a=()=>oc(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function tp(e){return ac(e)&&!Yh()}function zw(e,t,n={}){const[r,i,a]=Xh(e,n),o=s=>{const c=s.currentTarget;if(!tp(s))return;oa.add(c);const l=t(c,s),d=(g,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),oa.has(c)&&oa.delete(c),tp(g)&&typeof l=="function"&&l(g,{success:y})},f=g=>{d(g,c===window||c===document||n.useGlobalTarget||Zh(c,g.target))},p=g=>{d(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",p,i)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",o,i),jw(s)&&(s.addEventListener("focus",l=>Uw(l,i)),!$w(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function np(e){return Yf(e)&&"ownerSVGElement"in e}function Ww(e){return np(e)&&e.tagName==="svg"}const ze=e=>!!(e&&e.getVelocity),Jw=[...zh,Pe,Yt],qw=e=>Jw.find(Uh(e)),rp=Ie({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Hw(e=!0){const t=ge(_s);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,a=Oa();X(()=>{if(e)return i(a)},[e]);const o=N(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const ip=Ie({strict:!1}),ap={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},er={};for(const e in ap)er[e]={isEnabled:t=>ap[e].some(n=>!!t[n])};function Gw(e){for(const t in e)er[t]={...er[t],...e[t]}}const Kw=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function sa(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Kw.has(e)}let op=e=>!sa(e);function Yw(e){typeof e=="function"&&(op=t=>t.startsWith("on")?!sa(t):e(t))}try{Yw(require("@emotion/is-prop-valid").default)}catch{}function Xw(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(op(i)||n===!0&&sa(i)||!t&&!sa(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const ca=Ie({});function la(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Nr(e){return typeof e=="string"||Array.isArray(e)}const sc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cc=["initial",...sc];function ua(e){return la(e.animate)||cc.some(t=>Nr(e[t]))}function sp(e){return!!(ua(e)||e.variants)}function Qw(e,t){if(ua(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Nr(n)?n:void 0,animate:Nr(r)?r:void 0}}return e.inherit!==!1?t:{}}function Zw(e){const{initial:t,animate:n}=Qw(e,ge(ca));return Ve(()=>({initial:t,animate:n}),[cp(t),cp(n)])}function cp(e){return Array.isArray(e)?e.join(" "):e}const Fr={};function ek(e){for(const t in e)Fr[t]=e[t],Es(t)&&(Fr[t].isCSSVariable=!0)}function lp(e,{layout:t,layoutId:n}){return Qn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Fr[e]||e==="opacity")}const tk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nk=Xn.length;function rk(e,t,n){let r="",i=!0;for(let a=0;a<nk;a++){const o=Xn[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s=="number"?c=s===(o.startsWith("scale")?1:0):c=parseFloat(s)===0,!c||n){const l=Gh(s,rc[o]);if(!c){i=!1;const d=tk[o]||o;r+=`${d}(${l}) `}n&&(t[o]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function lc(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const c in t){const l=t[c];if(Qn.has(c)){o=!0;continue}else if(Es(c)){i[c]=l;continue}else{const d=Gh(l,rc[c]);c.startsWith("origin")?(s=!0,a[c]=d):r[c]=d}}if(t.transform||(o||n?r.transform=rk(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:c="50%",originY:l="50%",originZ:d=0}=a;r.transformOrigin=`${c} ${l} ${d}`}}const uc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function up(e,t,n){for(const r in t)!ze(t[r])&&!lp(r,n)&&(e[r]=t[r])}function ik({transformTemplate:e},t){return Ve(()=>{const n=uc();return lc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ak(e,t){const n=e.style||{},r={};return up(r,n,e),Object.assign(r,ik(e,t)),r}function ok(e,t){const n={},r=ak(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const sk={offset:"stroke-dashoffset",array:"stroke-dasharray"},ck={offset:"strokeDashoffset",array:"strokeDasharray"};function lk(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?sk:ck;e[a.offset]=q.transform(-r);const o=q.transform(t),s=q.transform(n);e[a.array]=`${o} ${s}`}function dp(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,d){if(lc(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p}=e;f.transform&&(p.transform=f.transform,delete f.transform),(p.transform||f.transformOrigin)&&(p.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=d?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&lk(f,i,a,o,!1)}const fp=()=>({...uc(),attrs:{}}),hp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function uk(e,t,n,r){const i=Ve(()=>{const a=fp();return dp(a,t,hp(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};up(a,e.style,e),i.style={...a,...i.style}}return i}const dk=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function dc(e){return typeof e!="string"||e.includes("-")?!1:!!(dk.indexOf(e)>-1||/[A-Z]/u.test(e))}function fk(e,t,n,{latestValues:r},i,a=!1){const s=(dc(e)?uk:ok)(t,r,i,e),c=Xw(t,typeof e=="string",a),l=e!==Ke?{...c,...s,ref:n}:{},{children:d}=t,f=Ve(()=>ze(d)?d.get():d,[d]);return ae(e,{...l,children:f})}function pp(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function fc(e,t,n,r){if(typeof t=="function"){const[i,a]=pp(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=pp(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function da(e){return ze(e)?e.get():e}function hk({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:pk(n,r,i,e),renderState:t()}}function pk(e,t,n,r){const i={},a=r(e,{});for(const p in a)i[p]=da(a[p]);let{initial:o,animate:s}=e;const c=ua(e),l=sp(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?s:o;if(f&&typeof f!="boolean"&&!la(f)){const p=Array.isArray(f)?f:[f];for(let g=0;g<p.length;g++){const y=fc(e,p[g]);if(y){const{transitionEnd:v,transition:b,..._}=y;for(const k in _){let T=_[k];if(Array.isArray(T)){const M=d?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in v)i[k]=v[k]}}}return i}const mp=e=>(t,n)=>{const r=ge(ca),i=ge(_s),a=()=>hk(e,t,r,i);return n?a():K0(a)};function hc(e,t,n){const{style:r}=e,i={};for(const a in r)(ze(r[a])||t.style&&ze(t.style[a])||lp(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}const mk=mp({scrapeMotionValuesFromProps:hc,createRenderState:uc});function gp(e,t,n){const r=hc(e,t,n);for(const i in e)if(ze(e[i])||ze(t[i])){const a=Xn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}const gk=mp({scrapeMotionValuesFromProps:gp,createRenderState:fp}),vk=Symbol.for("motionComponentSymbol");function tr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function yk(e,t,n){return N(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):tr(n)&&(n.current=r))},[t])}const pc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),vp="data-"+pc("framerAppearId"),yp=Ie({});function bk(e,t,n,r,i){const{visualElement:a}=ge(ca),o=ge(ip),s=ge(_s),c=ge(rp).reducedMotion,l=de(null);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:a,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));const d=l.current,f=ge(yp);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&_k(l.current,n,i,f);const p=de(!1);Na(()=>{d&&p.current&&d.update(n,s)});const g=n[vp],y=de(!!g&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return Y0(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),y.current&&d.animationState&&d.animationState.animateChanges())}),X(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),y.current=!1),d.enteringChildren=void 0)}),d}function _k(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bp(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&tr(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l})}function bp(e){if(e)return e.options.allowProjection!==!1?e.projection:bp(e.parent)}function mc(e,{forwardMotionProps:t=!1}={},n,r){n&&Gw(n);const i=dc(e)?gk:mk;function a(s,c){let l;const d={...ge(rp),...s,layoutId:wk(s)},{isStatic:f}=d,p=Zw(s),g=i(s,f);if(!f&&bs){kk();const y=Sk(d);l=y.MeasureLayout,p.visualElement=bk(e,g,d,r,y.ProjectionNode)}return O(ca.Provider,{value:p,children:[l&&p.visualElement?O(l,{visualElement:p.visualElement,...d}):null,fk(e,s,yk(g,p.visualElement,c),g,f,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=Qe(a);return o[vk]=e,o}function wk({layoutId:e}){const t=ge(Gf).id;return t&&e!==void 0?t+"-"+e:e}function kk(e,t){ge(ip).strict}function Sk(e){const{drag:t,layout:n}=er;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function xk(e,t){if(typeof Proxy>"u")return mc;const n=new Map,r=(a,o)=>mc(a,o,e,t),i=(a,o)=>r(a,o);return new Proxy(i,{get:(a,o)=>o==="create"?r:(n.has(o)||n.set(o,mc(o,void 0,e,t)),n.get(o))})}function _p({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Tk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Mk(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function gc(e){return e===void 0||e===1}function vc({scale:e,scaleX:t,scaleY:n}){return!gc(e)||!gc(t)||!gc(n)}function Tn(e){return vc(e)||wp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function wp(e){return kp(e.x)||kp(e.y)}function kp(e){return e&&e!=="0%"}function fa(e,t,n){const r=e-n,i=t*r;return n+i}function Sp(e,t,n,r,i){return i!==void 0&&(e=fa(e,i,r)),fa(e,n,r)+t}function yc(e,t=0,n=1,r,i){e.min=Sp(e.min,t,n,r,i),e.max=Sp(e.max,t,n,r,i)}function xp(e,{x:t,y:n}){yc(e.x,t.translate,t.scale,t.originPoint),yc(e.y,n.translate,n.scale,n.originPoint)}const Tp=.999999999999,Mp=1.0000000000001;function Ck(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;const{visualElement:c}=a.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&rr(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,xp(e,o)),r&&Tn(a.latestValues)&&rr(e,a.latestValues))}t.x<Mp&&t.x>Tp&&(t.x=1),t.y<Mp&&t.y>Tp&&(t.y=1)}function nr(e,t){e.min=e.min+t,e.max=e.max+t}function Cp(e,t,n,r,i=.5){const a=xe(e.min,e.max,i);yc(e,t,n,a,r)}function rr(e,t){Cp(e.x,t.x,t.scaleX,t.scale,t.originX),Cp(e.y,t.y,t.scaleY,t.scale,t.originY)}function Pp(e,t){return _p(Mk(e.getBoundingClientRect(),t))}function Pk(e,t,n){const r=Pp(e,n),{scroll:i}=t;return i&&(nr(r.x,i.offset.x),nr(r.y,i.offset.y)),r}const Ep=()=>({translate:0,scale:1,origin:0,originPoint:0}),ir=()=>({x:Ep(),y:Ep()}),Ap=()=>({min:0,max:0}),Ce=()=>({x:Ap(),y:Ap()}),bc={current:null},Op={current:!1};function Ek(){if(Op.current=!0,!!bs)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>bc.current=e.matches;e.addEventListener("change",t),t()}else bc.current=!1}const Ak=new WeakMap;function Ok(e,t,n){for(const r in t){const i=t[r],a=n[r];if(ze(i))e.addValue(r,i);else if(ze(a))e.addValue(r,Zn(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Zn(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Ip=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ik{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Zs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Ye.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ke.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=ua(n),this.isVariantNode=sp(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const g=f[p];c[p]!==void 0&&ze(g)&&g.set(c[p])}}mount(t){this.current=t,Ak.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Op.current||Ek(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:bc.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Gt(this.notifyUpdate),Gt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Qn.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in er){const n=er[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ce()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Ip.length;r++){const i=Ip[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Ok(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Zn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Kf(r)||Xf(r))?r=parseFloat(r):!qw(r)&&Yt.test(n)&&(r=Hh(t,n)),this.setBaseTarget(t,ze(r)?r.get():r)),ze(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const a=fc(this.props,n,this.presenceContext?.custom);a&&(r=a[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ze(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ts),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ic.render(this.render)}}class Dp extends Ik{constructor(){super(...arguments),this.KeyframeResolver=Dw}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ze(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Lp(e,{style:t,vars:n},r,i){const a=e.style;let o;for(o in t)a[o]=t[o];i?.applyProjectionStyles(a,r);for(o in n)a.setProperty(o,n[o])}function Dk(e){return window.getComputedStyle(e)}class Lk extends Dp{constructor(){super(...arguments),this.type="html",this.renderInstance=Lp}readValueFromInstance(t,n){if(Qn.has(n))return this.projection?.isProjecting?Gs(n):Z_(t,n);{const r=Dk(t),i=(Es(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Pp(t,n)}build(t,n,r){lc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return hc(t,n,r)}}const jp=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function jk(e,t,n,r){Lp(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(jp.has(i)?i:pc(i),t.attrs[i])}class Rk extends Dp{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ce}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Qn.has(n)){const r=qh(n);return r&&r.default||0}return n=jp.has(n)?n:pc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return gp(t,n,r)}build(t,n,r){dp(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){jk(t,n,r,i)}mount(t){this.isSVGTag=hp(t.tagName),super.mount(t)}}const Vk=(e,t)=>dc(e)?new Rk(t):new Lk(t,{allowProjection:e!==Ke});function ar(e,t,n){const r=e.getProps();return fc(r,t,n!==void 0?n:r.custom,e)}const _c=e=>Array.isArray(e);function Nk(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zn(n))}function Fk(e){return _c(e)?e[e.length-1]||0:e}function Bk(e,t){const n=ar(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const s=Fk(a[o]);Nk(e,o,s)}}function $k(e){return!!(ze(e)&&e.add)}function wc(e,t){const n=e.getValue("willChange");if($k(n))return n.add(t);if(!n&&Nt.WillChange){const r=new Nt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Rp(e){return e.props[vp]}const Uk=e=>e!==null;function zk(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Uk),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[a]}const Wk={type:"spring",stiffness:500,damping:25,restSpeed:10},Jk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qk={type:"keyframes",duration:.8},Hk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Gk=(e,{keyframes:t})=>t.length>2?qk:Qn.has(e)?e.startsWith("scale")?Jk(t[1]):Wk:Hk;function Kk({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...d}){return!!Object.keys(d).length}const kc=(e,t,n,r={},i,a)=>o=>{const s=tc(r,e)||{},c=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Ct(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Kk(s)||Object.assign(d,Gk(e,d)),d.duration&&(d.duration=Ct(d.duration)),d.repeatDelay&&(d.repeatDelay=Ct(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(ec(d),d.delay===0&&(f=!0)),(Nt.instantAnimations||Nt.skipAnimations)&&(f=!0,ec(d),d.delay=0),d.allowFlatten=!s.type&&!s.ease,f&&!a&&t.get()!==void 0){const p=zk(d.keyframes,s);if(p!==void 0){ke.update(()=>{d.onUpdate(p),d.onComplete()});return}}return s.isSync?new Js(d):new kw(d)};function Yk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Vp(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);const c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const d in s){const f=e.getValue(d,e.latestValues[d]??null),p=s[d];if(p===void 0||l&&Yk(l,d))continue;const g={delay:n,...tc(a||{},d)},y=f.get();if(y!==void 0&&!f.isAnimating&&!Array.isArray(p)&&p===y&&!g.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const _=Rp(e);if(_){const k=window.MotionHandoffAnimation(_,d,ke);k!==null&&(g.startTime=k,v=!0)}}wc(e,d),f.start(kc(d,f,p,e.shouldReduceMotion&&$h.has(d)?{type:!1}:g,e,v));const b=f.animation;b&&c.push(b)}return o&&Promise.all(c).then(()=>{ke.update(()=>{o&&Bk(e,o)})}),c}function Np(e,t,n,r=0,i=1){const a=Array.from(e).sort((l,d)=>l.sortNodePosition(d)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n=="function"?n(a,o):i===1?a*r:s-a*r}function Sc(e,t,n={}){const r=ar(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(Vp(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:f}=i;return Xk(e,t,c,l,d,f,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[c,l]=s==="beforeChildren"?[a,o]:[o,a];return c().then(()=>l())}else return Promise.all([a(),o(n.delay)])}function Xk(e,t,n=0,r=0,i=0,a=1,o){const s=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),s.push(Sc(c,t,{...o,delay:n+(typeof r=="function"?0:r)+Np(e.variantChildren,c,r,i,a)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(s)}function Qk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>Sc(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=Sc(e,t,n);else{const i=typeof t=="function"?ar(e,t,n.custom):t;r=Promise.all(Vp(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Fp(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Zk=cc.length;function Bp(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Bp(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Zk;n++){const r=cc[n],i=e.props[r];(Nr(i)||i===!1)&&(t[r]=i)}return t}const eS=[...sc].reverse(),tS=sc.length;function nS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Qk(e,n,r)))}function rS(e){let t=nS(e),n=$p(),r=!0;const i=c=>(l,d)=>{const f=ar(e,d,c==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:p,transitionEnd:g,...y}=f;l={...l,...y,...g}}return l};function a(c){t=c(e)}function o(c){const{props:l}=e,d=Bp(e.parent)||{},f=[],p=new Set;let g={},y=1/0;for(let b=0;b<tS;b++){const _=eS[b],k=n[_],T=l[_]!==void 0?l[_]:d[_],M=Nr(T),x=_===c?k.isActive:null;x===!1&&(y=b);let C=T===d[_]&&T!==l[_]&&M;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),k.protectedKeys={...g},!k.isActive&&x===null||!T&&!k.prevProp||la(T)||typeof T=="boolean")continue;const A=iS(k.prevProp,T);let E=A||_===c&&k.isActive&&!C&&M||b>y&&M,R=!1;const F=Array.isArray(T)?T:[T];let j=F.reduce(i(_),{});x===!1&&(j={});const{prevResolvedValues:z={}}=k,V={...z,...j},ee=K=>{E=!0,p.has(K)&&(R=!0,p.delete(K)),k.needsAnimating[K]=!0;const B=e.getValue(K);B&&(B.liveStyle=!1)};for(const K in V){const B=j[K],W=z[K];if(g.hasOwnProperty(K))continue;let G=!1;_c(B)&&_c(W)?G=!Fp(B,W):G=B!==W,G?B!=null?ee(K):p.add(K):B!==void 0&&p.has(K)?ee(K):k.protectedKeys[K]=!0}k.prevProp=T,k.prevResolvedValues=j,k.isActive&&(g={...g,...j}),r&&e.blockInitialAnimation&&(E=!1);const ie=C&&A;E&&(!ie||R)&&f.push(...F.map(K=>{const B={type:_};if(typeof K=="string"&&r&&!ie&&e.manuallyAnimateOnMount&&e.parent){const{parent:W}=e,G=ar(W,K);if(W.enteringChildren&&G){const{delayChildren:Ge}=G.transition||{};B.delay=Np(W.enteringChildren,e,Ge)}}return{animation:K,options:B}}))}if(p.size){const b={};if(typeof l.initial!="boolean"){const _=ar(e,Array.isArray(l.initial)?l.initial[0]:l.initial);_&&_.transition&&(b.transition=_.transition)}p.forEach(_=>{const k=e.getBaseTarget(_),T=e.getValue(_);T&&(T.liveStyle=!0),b[_]=k??null}),f.push({animation:b})}let v=!!f.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Promise.resolve()}function s(c,l){if(n[c].isActive===l)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(c,l)),n[c].isActive=l;const d=o(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=$p()}}}function iS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Fp(t,e):!1}function Mn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $p(){return{animate:Mn(!0),whileInView:Mn(),whileHover:Mn(),whileTap:Mn(),whileDrag:Mn(),whileFocus:Mn(),exit:Mn()}}class Xt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class aS extends Xt{constructor(t){super(t),t.animationState||(t.animationState=rS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();la(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let oS=0;class sS extends Xt{constructor(){super(...arguments),this.id=oS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const cS={animation:{Feature:aS},exit:{Feature:sS}};function Br(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function $r(e){return{point:{x:e.pageX,y:e.pageY}}}const lS=e=>t=>ac(t)&&e(t,$r(t));function Ur(e,t,n,r){return Br(e,t,lS(n),r)}const Up=1e-4,uS=1-Up,dS=1+Up,zp=.01,fS=0-zp,hS=0+zp;function He(e){return e.max-e.min}function pS(e,t,n){return Math.abs(e-t)<=n}function Wp(e,t,n,r=.5){e.origin=r,e.originPoint=xe(t.min,t.max,e.origin),e.scale=He(n)/He(t),e.translate=xe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=uS&&e.scale<=dS||isNaN(e.scale))&&(e.scale=1),(e.translate>=fS&&e.translate<=hS||isNaN(e.translate))&&(e.translate=0)}function zr(e,t,n,r){Wp(e.x,t.x,n.x,r?r.originX:void 0),Wp(e.y,t.y,n.y,r?r.originY:void 0)}function Jp(e,t,n){e.min=n.min+t.min,e.max=e.min+He(t)}function mS(e,t,n){Jp(e.x,t.x,n.x),Jp(e.y,t.y,n.y)}function qp(e,t,n){e.min=t.min-n.min,e.max=e.min+He(t)}function Wr(e,t,n){qp(e.x,t.x,n.x),qp(e.y,t.y,n.y)}function dt(e){return[e("x"),e("y")]}const Hp=({current:e})=>e?e.ownerDocument.defaultView:null,Gp=(e,t)=>Math.abs(e-t);function gS(e,t){const n=Gp(e.x,t.x),r=Gp(e.y,t.y);return Math.sqrt(n**2+r**2)}class Kp{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Tc(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=gS(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:v}=p,{timestamp:b}=Re;this.history.push({...v,timestamp:b});const{onStart:_,onMove:k}=this.handlers;g||(_&&_(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=xc(g,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:y,onSessionEnd:v,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=Tc(p.type==="pointercancel"?this.lastMoveEventInfo:xc(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,_),v&&v(p,_)},!ac(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const s=$r(t),c=xc(s,this.transformPagePoint),{point:l}=c,{timestamp:d}=Re;this.history=[{...l,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Tc(c,this.history)),this.removeListeners=Er(Ur(this.contextWindow,"pointermove",this.handlePointerMove),Ur(this.contextWindow,"pointerup",this.handlePointerUp),Ur(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Gt(this.updatePoint)}}function xc(e,t){return t?{point:t(e.point)}:e}function Yp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Tc({point:e},t){return{point:e,delta:Yp(e,Xp(t)),offset:Yp(e,vS(t)),velocity:yS(t,.1)}}function vS(e){return e[0]}function Xp(e){return e[e.length-1]}function yS(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Xp(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ct(t)));)n--;if(!r)return{x:0,y:0};const a=ut(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function bS(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?xe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?xe(n,e,r.max):Math.min(e,n)),e}function Qp(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function _S(e,{top:t,left:n,bottom:r,right:i}){return{x:Qp(e.x,n,i),y:Qp(e.y,t,r)}}function Zp(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function wS(e,t){return{x:Zp(e.x,t.x),y:Zp(e.y,t.y)}}function kS(e,t){let n=.5;const r=He(e),i=He(t);return i>r?n=Ar(t.min,t.max-r,e.min):r>i&&(n=Ar(e.min,e.max-i,t.min)),Vt(0,1,n)}function SS(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Mc=.35;function xS(e=Mc){return e===!1?e=0:e===!0&&(e=Mc),{x:em(e,"left","right"),y:em(e,"top","bottom")}}function em(e,t,n){return{min:tm(e,t),max:tm(e,n)}}function tm(e,t){return typeof e=="number"?e:e[t]||0}const TS=new WeakMap;class MS{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ce(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const a=f=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor($r(f).point)},o=(f,p)=>{const{drag:g,dragPropagation:y,onDragStart:v}=this.getProps();if(g&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Nw(g),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),dt(_=>{let k=this.getAxisMotionValue(_).get()||0;if(Pt.test(k)){const{projection:T}=this.visualElement;if(T&&T.layout){const M=T.layout.layoutBox[_];M&&(k=He(M)*(parseFloat(k)/100))}}this.originPoint[_]=k}),v&&ke.postRender(()=>v(f,p)),wc(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},s=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p;const{dragPropagation:g,dragDirectionLock:y,onDirectionLock:v,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:_}=p;if(y&&this.currentDirection===null){this.currentDirection=CS(_),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",p.point,_),this.updateAxis("y",p.point,_),this.visualElement.render(),b&&b(f,p)},c=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p,this.stop(f,p),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>dt(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:d}=this.getProps();this.panSession=new Kp(t,{onSessionStart:a,onStart:o,onMove:s,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Hp(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&ke.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ha(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=bS(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&tr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=_S(r.layoutBox,t):this.constraints=!1,this.elastic=xS(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&dt(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=SS(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!tr(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=Pk(r,i.root,this.visualElement.getTransformPagePoint());let o=wS(i.layout.layoutBox,a);if(n){const s=n(Tk(o));this.hasMutatedConstraints=!!s,s&&(o=_p(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=dt(d=>{if(!ha(d,n,this.currentDirection))return;let f=c&&c[d]||{};o&&(f={min:0,max:0});const p=i?200:1e6,g=i?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...a,...f};return this.startAxisValueAnimation(d,y)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return wc(this.visualElement,t),r.start(kc(t,r,0,n,this.visualElement,!1))}stopAnimation(){dt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){dt(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){dt(n=>{const{drag:r}=this.getProps();if(!ha(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n];a.set(t[n]-xe(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!tr(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};dt(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const c=s.get();i[o]=kS({min:c,max:c},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),dt(o=>{if(!ha(o,t,null))return;const s=this.getAxisMotionValue(o),{min:c,max:l}=this.constraints[o];s.set(xe(c,l,i[o]))})}addListeners(){if(!this.visualElement.current)return;TS.set(this.visualElement,this);const t=this.visualElement.current,n=Ur(t,"pointerdown",c=>{const{drag:l,dragListener:d=!0}=this.getProps();l&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();tr(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ke.read(r);const o=Br(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(dt(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{o(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=Mc,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function ha(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function CS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class PS extends Xt{constructor(t){super(t),this.removeGroupControls=lt,this.removeListeners=lt,this.controls=new MS(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||lt}unmount(){this.removeGroupControls(),this.removeListeners()}}const nm=e=>(t,n)=>{e&&ke.postRender(()=>e(t,n))};class ES extends Xt{constructor(){super(...arguments),this.removePointerDownListener=lt}onPointerDown(t){this.session=new Kp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Hp(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:nm(t),onStart:nm(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&ke.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=Ur(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const pa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Jr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(q.test(e))e=parseFloat(e);else return e;const n=rm(e,t.target.x),r=rm(e,t.target.y);return`${n}% ${r}%`}},AS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Yt.parse(e);if(i.length>5)return r;const a=Yt.createTransformer(e),o=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;const l=xe(s,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=l),typeof i[3+o]=="number"&&(i[3+o]/=l),a(i)}};let Cc=!1;class OS extends mt{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;ek(IS),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),Cc&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),pa.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,Cc=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==a?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||ke.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ic.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Cc=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function im(e){const[t,n]=Hw(),r=ge(Gf);return O(OS,{...e,layoutGroup:r,switchLayoutGroup:ge(yp),isPresent:t,safeToRemove:n})}const IS={borderRadius:{...Jr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Jr,borderTopRightRadius:Jr,borderBottomLeftRadius:Jr,borderBottomRightRadius:Jr,boxShadow:AS};function DS(e,t,n){const r=ze(e)?e:Zn(e);return r.start(kc("",r,t,n)),r.animation}const LS=(e,t)=>e.depth-t.depth;class jS{constructor(){this.children=[],this.isDirty=!1}add(t){ws(this.children,t),this.isDirty=!0}remove(t){ks(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(LS),this.isDirty=!1,this.children.forEach(t)}}function RS(e,t){const n=Ye.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Gt(r),e(a-t))};return ke.setup(r,!0),()=>Gt(r)}const am=["TopLeft","TopRight","BottomLeft","BottomRight"],VS=am.length,om=e=>typeof e=="string"?parseFloat(e):e,sm=e=>typeof e=="number"||q.test(e);function NS(e,t,n,r,i,a){i?(e.opacity=xe(0,n.opacity??1,FS(r)),e.opacityExit=xe(t.opacity??1,0,BS(r))):a&&(e.opacity=xe(t.opacity??1,n.opacity??1,r));for(let o=0;o<VS;o++){const s=`border${am[o]}Radius`;let c=cm(t,s),l=cm(n,s);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||sm(c)===sm(l)?(e[s]=Math.max(xe(om(c),om(l),r),0),(Pt.test(l)||Pt.test(c))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=xe(t.rotate||0,n.rotate||0,r))}function cm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const FS=lm(0,.5,ah),BS=lm(.5,.95,lt);function lm(e,t,n){return r=>r<e?0:r>t?1:n(Ar(e,t,r))}function um(e,t){e.min=t.min,e.max=t.max}function ft(e,t){um(e.x,t.x),um(e.y,t.y)}function dm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function fm(e,t,n,r,i){return e-=t,e=fa(e,1/n,r),i!==void 0&&(e=fa(e,1/i,r)),e}function $S(e,t=0,n=1,r=.5,i,a=e,o=e){if(Pt.test(t)&&(t=parseFloat(t),t=xe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=xe(a.min,a.max,r);e===a&&(s-=t),e.min=fm(e.min,t,n,s,i),e.max=fm(e.max,t,n,s,i)}function hm(e,t,[n,r,i],a,o){$S(e,t[n],t[r],t[i],t.scale,a,o)}const US=["x","scaleX","originX"],zS=["y","scaleY","originY"];function pm(e,t,n,r){hm(e.x,t,US,n?n.x:void 0,r?r.x:void 0),hm(e.y,t,zS,n?n.y:void 0,r?r.y:void 0)}function mm(e){return e.translate===0&&e.scale===1}function gm(e){return mm(e.x)&&mm(e.y)}function vm(e,t){return e.min===t.min&&e.max===t.max}function WS(e,t){return vm(e.x,t.x)&&vm(e.y,t.y)}function ym(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function bm(e,t){return ym(e.x,t.x)&&ym(e.y,t.y)}function _m(e){return He(e.x)/He(e.y)}function wm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class JS{constructor(){this.members=[]}add(t){ws(this.members,t),t.scheduleRender()}remove(t){if(ks(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function qS(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:d,rotateX:f,rotateY:p,skewX:g,skewY:y}=n;l&&(r=`perspective(${l}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),g&&(r+=`skewX(${g}deg) `),y&&(r+=`skewY(${y}deg) `)}const s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||"none"}const Pc=["","X","Y","Z"],HS=1e3;let GS=0;function Ec(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function km(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Rp(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ke,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&km(r)}function Sm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t?.()){this.id=GS++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(XS),this.nodes.forEach(t1),this.nodes.forEach(n1),this.nodes.forEach(QS)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new jS)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Ts),this.eventHandlers.get(o).add(s)}notifyListeners(o,...s){const c=this.eventHandlers.get(o);c&&c.notify(...s)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=np(o)&&!Ww(o),this.instance=o;const{layoutId:s,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||s)&&(this.isLayoutDirty=!0),e){let d,f=0;const p=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{f=window.innerWidth}),e(o,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,d&&d(),d=RS(p,250),pa.hasAnimatedSinceResize&&(pa.hasAnimatedSinceResize=!1,this.nodes.forEach(Mm)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&l&&(s||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||l.getDefaultTransition()||s1,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=l.getProps(),_=!this.targetLayout||!bm(this.targetLayout,g),k=!f&&p;if(this.options.layoutRoot||this.resumeFrom||k||f&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...tc(y,"layout"),onPlay:v,onComplete:b};(l.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(d,k)}else f||Mm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Gt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(r1),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&km(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:s,layout:c}=this.options;if(s===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(xm);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Tm);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(e1),this.nodes.forEach(KS),this.nodes.forEach(YS)):this.nodes.forEach(Tm),this.clearAllSnapshots();const s=Ye.now();Re.delta=Vt(0,16.666666666666668,s-Re.timestamp),Re.timestamp=s,Re.isProcessing=!0,Ps.update.process(Re),Ps.preRender.process(Re),Ps.render.process(Re),Re.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ic.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ZS),this.sharedNodes.forEach(i1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!He(this.snapshot.measuredBox.x)&&!He(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ce(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(s=!1),s&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!gm(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,d=l!==this.prevTransformTemplateValue;o&&this.instance&&(s||Tn(this.latestValues)||d)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const s=this.measurePageBox();let c=this.removeElementScroll(s);return o&&(c=this.removeTransform(c)),c1(c),{animationId:this.root.animationId,measuredBox:s,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return Ce();const s=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(l1))){const{scroll:l}=this.root;l&&(nr(s.x,l.offset.x),nr(s.y,l.offset.y))}return s}removeElementScroll(o){const s=Ce();if(ft(s,o),this.scroll?.wasRoot)return s;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:d,options:f}=l;l!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&ft(s,o),nr(s.x,d.offset.x),nr(s.y,d.offset.y))}return s}applyTransform(o,s=!1){const c=Ce();ft(c,o);for(let l=0;l<this.path.length;l++){const d=this.path[l];!s&&d.options.layoutScroll&&d.scroll&&d!==d.root&&rr(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Tn(d.latestValues)&&rr(c,d.latestValues)}return Tn(this.latestValues)&&rr(c,this.latestValues),c}removeTransform(o){const s=Ce();ft(s,o);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!Tn(l.latestValues))continue;vc(l.latestValues)&&l.updateSnapshot();const d=Ce(),f=l.measurePageBox();ft(d,f),pm(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,d)}return Tn(this.latestValues)&&pm(s,this.latestValues),s}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Re.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==s;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Re.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ce(),this.relativeTargetOrigin=Ce(),Wr(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),ft(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ce(),this.targetWithTransforms=Ce()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),mS(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ft(this.target,this.layout.layoutBox),xp(this.target,this.targetDelta)):ft(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ce(),this.relativeTargetOrigin=Ce(),Wr(this.relativeTargetOrigin,this.target,p.target),ft(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||vc(this.parent.latestValues)||wp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const o=this.getLead(),s=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Re.timestamp&&(c=!1),c)return;const{layout:l,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||d))return;ft(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;Ck(this.layoutCorrected,this.treeScale,this.path,s),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ce());const{target:g}=o;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(dm(this.prevProjectionDelta.x,this.projectionDelta.x),dm(this.prevProjectionDelta.y,this.projectionDelta.y)),zr(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!wm(this.projectionDelta.x,this.prevProjectionDelta.x)||!wm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ir(),this.projectionDelta=ir(),this.projectionDeltaWithTransform=ir()}setAnimationOrigin(o,s=!1){const c=this.snapshot,l=c?c.latestValues:{},d={...this.latestValues},f=ir();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=Ce(),g=c?c.source:void 0,y=this.layout?this.layout.source:void 0,v=g!==y,b=this.getStack(),_=!b||b.members.length<=1,k=!!(v&&!_&&this.options.crossfade===!0&&!this.path.some(o1));this.animationProgress=0;let T;this.mixTargetDelta=M=>{const x=M/1e3;Cm(f.x,o.x,x),Cm(f.y,o.y,x),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Wr(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),a1(this.relativeTarget,this.relativeTargetOrigin,p,x),T&&WS(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Ce()),ft(T,this.relativeTarget)),v&&(this.animationValues=d,NS(d,l,this.latestValues,x,k,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Gt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{pa.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Zn(0)),this.currentAnimation=DS(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(HS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:c,layout:l,latestValues:d}=o;if(!(!s||!c||!l)){if(this!==o&&this.layout&&l&&Im(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Ce();const f=He(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const p=He(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+p}ft(s,c),rr(s,d),zr(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new JS),this.sharedNodes.get(o).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(s=!0),!s)return;const l={};c.z&&Ec("z",o,l,this.animationValues);for(let d=0;d<Pc.length;d++)Ec(`rotate${Pc[d]}`,o,l,this.animationValues),Ec(`skew${Pc[d]}`,o,l,this.animationValues);o.render();for(const d in l)o.setStaticValue(d,l[d]),this.animationValues&&(this.animationValues[d]=l[d]);o.scheduleRender()}applyProjectionStyles(o,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=da(s?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=da(s?.pointerEvents)||""),this.hasProjected&&!Tn(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=qS(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),o.transform=f;const{x:p,y:g}=this.projectionDelta;o.transformOrigin=`${p.origin*100}% ${g.origin*100}% 0`,l.animationValues?o.opacity=l===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=l===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const y in Fr){if(d[y]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:_}=Fr[y],k=f==="none"?d[y]:v(d[y],l);if(b){const T=b.length;for(let M=0;M<T;M++)o[b[M]]=k}else _?this.options.visualElement.renderState.vars[y]=k:o[y]=k}this.options.layoutId&&(o.pointerEvents=l===this?da(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(xm),this.root.sharedNodes.clear()}}}function KS(e){e.updateLayout()}function YS(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i==="size"?dt(d=>{const f=a?t.measuredBox[d]:t.layoutBox[d],p=He(f);f.min=n[d].min,f.max=f.min+p}):Im(i,t.layoutBox,n)&&dt(d=>{const f=a?t.measuredBox[d]:t.layoutBox[d],p=He(n[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const o=ir();zr(o,n,t.layoutBox);const s=ir();a?zr(s,e.applyTransform(r,!0),t.measuredBox):zr(s,n,t.layoutBox);const c=!gm(o);let l=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const g=Ce();Wr(g,t.layoutBox,f.layoutBox);const y=Ce();Wr(y,n,p.layoutBox),bm(g,y)||(l=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function XS(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function QS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ZS(e){e.clearSnapshot()}function xm(e){e.clearMeasurements()}function Tm(e){e.isLayoutDirty=!1}function e1(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function t1(e){e.resolveTargetDelta()}function n1(e){e.calcProjection()}function r1(e){e.resetSkewAndRotation()}function i1(e){e.removeLeadSnapshot()}function Cm(e,t,n){e.translate=xe(t.translate,0,n),e.scale=xe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Pm(e,t,n,r){e.min=xe(t.min,n.min,r),e.max=xe(t.max,n.max,r)}function a1(e,t,n,r){Pm(e.x,t.x,n.x,r),Pm(e.y,t.y,n.y,r)}function o1(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const s1={duration:.45,ease:[.4,0,.1,1]},Em=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Am=Em("applewebkit/")&&!Em("chrome/")?Math.round:lt;function Om(e){e.min=Am(e.min),e.max=Am(e.max)}function c1(e){Om(e.x),Om(e.y)}function Im(e,t,n){return e==="position"||e==="preserve-aspect"&&!pS(_m(t),_m(n),.2)}function l1(e){return e!==e.root&&e.scroll?.wasRoot}const u1=Sm({attachResizeListener:(e,t)=>Br(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ac={current:void 0},Dm=Sm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ac.current){const e=new u1({});e.mount(window),e.setOptions({layoutScroll:!0}),Ac.current=e}return Ac.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),d1={pan:{Feature:ES},drag:{Feature:PS,ProjectionNode:Dm,MeasureLayout:im}};function Lm(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=r[i];a&&ke.postRender(()=>a(t,$r(t)))}class f1 extends Xt{mount(){const{current:t}=this.node;t&&(this.unmount=Fw(t,(n,r)=>(Lm(this.node,r,"Start"),i=>Lm(this.node,i,"End"))))}unmount(){}}class h1 extends Xt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Er(Br(this.node.current,"focus",()=>this.onFocus()),Br(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function jm(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=r[i];a&&ke.postRender(()=>a(t,$r(t)))}class p1 extends Xt{mount(){const{current:t}=this.node;t&&(this.unmount=zw(t,(n,r)=>(jm(this.node,r,"Start"),(i,{success:a})=>jm(this.node,i,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Oc=new WeakMap,Ic=new WeakMap,m1=e=>{const t=Oc.get(e.target);t&&t(e)},g1=e=>{e.forEach(m1)};function v1({root:e,...t}){const n=e||document;Ic.has(n)||Ic.set(n,{});const r=Ic.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(g1,{root:e,...t})),r[i]}function y1(e,t,n){const r=v1(t);return Oc.set(e,n),r.observe(e),()=>{Oc.delete(e),r.unobserve(e)}}const b1={some:0,all:1};class _1 extends Xt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:b1[i]},s=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,a&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),p=l?d:f;p&&p(c)};return y1(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(w1(t,n))&&this.startObserver()}unmount(){}}function w1({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const k1={...cS,...{inView:{Feature:_1},tap:{Feature:p1},focus:{Feature:h1},hover:{Feature:f1}},...d1,...{layout:{ProjectionNode:Dm,MeasureLayout:im}}},ma=xk(k1,Vk);function S1(){const{agentData:e}=_n(),[t,n]=Z(0),r=96,i=1e4,{isMobileDevice:a}=ys();X(()=>{const s=Date.now(),c=()=>{const l=Date.now()-s,d=Math.min(l/i*100,r);n(d),d<r&&requestAnimationFrame(c)};requestAnimationFrame(c)},[]);const o=e?.image_url;return O("div",{className:"absolute inset-0 w-full h-full flex flex-col items-center justify-center",children:[O("div",{className:"absolute inset-0 w-full h-full bg-black"}),o&&O("div",{className:"absolute inset-0 w-full h-full bg-cover bg-center scale-125",style:{backgroundImage:`url(${o})`,filter:"blur(25px) brightness(0.5)"}}),O(ma.div,{initial:{filter:"blur(12px)",opacity:0},animate:{filter:"blur(0px)",opacity:1},transition:{duration:.2,ease:"easeOut"},className:`absolute inset-0 w-full h-full flex flex-col items-center justify-center ${a?"pb-6 px-4":"pb-4 px-8 "}`,children:O("div",{className:"flex flex-col items-center text-white",children:[O("h2",{className:"text-lg font-medium mb-2 text-center",children:"You're about to speak with an AI."}),O("div",{className:"w-25 h-3 bg-white/30 rounded-full overflow-hidden mb-6",children:O("div",{className:"h-full bg-white rounded-full transition-all duration-100 ease-linear",style:{width:`${t}%`}})}),O("div",{className:"flex justify-center",children:O("span",{className:"font-light text-xs text-center text-white",children:["This call may be recorded and shared with our service providers."," ",O("a",{href:"https://lemonslice.com",target:"_blank",rel:"noopener noreferrer",className:"underline decoration-white/50 hover:text-white transition-colors",children:"Learn more"})]})})]})})]})}const x1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),T1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Rm=e=>{const t=T1(e);return t.charAt(0).toUpperCase()+t.slice(1)},Vm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),M1=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var C1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const P1=Qe(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...s},c)=>ae("svg",{ref:c,...C1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Vm("lucide",i),...!a&&!M1(s)&&{"aria-hidden":"true"},...s},[...o.map(([l,d])=>ae(l,d)),...Array.isArray(a)?a:[a]]));const qr=(e,t)=>{const n=Qe(({className:r,...i},a)=>ae(P1,{ref:a,iconNode:t,className:Vm(`lucide-${x1(Rm(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Rm(e),n};const E1=qr("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const A1=qr("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const O1=qr("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const I1=qr("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]);const D1=qr("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);function ga({msg:e,isError:t=!1,isFullWidth:n=!0,showSpinner:r=!1,onClick:i=null}){return O("div",{className:"absolute top-2 left-2 flex items-center justify-between z-10 text-white/75",children:O("div",{className:`backdrop-blur-sm rounded-2xl py-2.5 px-4 flex-1 shadow-inset-white-10 flex items-center gap-2
37
+ ${r?"opacity-100 backdrop-blur-lg":"opacity-0 backdrop-blur-none"}`})]}),t&&O("div",{className:"absolute top-2 left-2",children:O("div",{className:"bg-red-600/50 backdrop-blur-xl rounded-3xl py-2 px-4 w-fit shadow-inset-white-10",children:O("p",{className:"text-white text-lg font-semibold text-center",children:t})})})]})}const Kf=De({});function Y0(e){const t=fe(null);return t.current===null&&(t.current=e()),t.current}const _s=typeof window<"u",X0=_s?Dn:Z,ws=De(null);function ks(e,t){e.indexOf(t)===-1&&e.push(t)}function Ss(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Bt=(e,t,n)=>n>t?t:n<e?e:n;let xs=()=>{};const $t={},Yf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Xf(e){return typeof e=="object"&&e!==null}const Qf=e=>/^0[^.\s]+$/u.test(e);function Ts(e){let t;return()=>(t===void 0&&(t=e()),t)}const dt=e=>e,Q0=(e,t)=>n=>t(e(n)),Ar=(...e)=>e.reduce(Q0),Or=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ms{constructor(){this.subscriptions=[]}add(t){return ks(this.subscriptions,t),()=>Ss(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Et=e=>e*1e3,ft=e=>e/1e3;function Zf(e,t){return t?e*(1e3/t):0}const eh=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Z0=1e-7,e_=12;function t_(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=eh(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Z0&&++s<e_);return a}function Ir(e,t,n,r){if(e===t&&n===r)return dt;const i=o=>t_(o,0,1,e,n);return o=>o===0||o===1?o:eh(i(o),t,r)}const th=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,nh=e=>t=>1-e(1-t),rh=Ir(.33,1.53,.69,.99),Cs=nh(rh),ih=th(Cs),oh=e=>(e*=2)<1?.5*Cs(e):.5*(2-Math.pow(2,-10*(e-1))),Ps=e=>1-Math.sin(Math.acos(e)),ah=nh(Ps),sh=th(Ps),n_=Ir(.42,0,1,1),r_=Ir(0,0,.58,1),ch=Ir(.42,0,.58,1),i_=e=>Array.isArray(e)&&typeof e[0]!="number",lh=e=>Array.isArray(e)&&typeof e[0]=="number",o_={linear:dt,easeIn:n_,easeInOut:ch,easeOut:r_,circIn:Ps,circInOut:sh,circOut:ah,backIn:Cs,backInOut:ih,backOut:rh,anticipate:oh},a_=e=>typeof e=="string",uh=e=>{if(lh(e)){xs(e.length===4);const[t,n,r,i]=e;return Ir(t,n,r,i)}else if(a_(e))return o_[e];return e},eo=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function s_(e,t){let n=new Set,r=new Set,i=!1,o=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function c(d){a.has(d)&&(l.schedule(d),e()),d(s)}const l={schedule:(d,f=!1,p=!1)=>{const y=p&&i?n:r;return f&&a.add(d),y.has(d)||y.add(d),d},cancel:d=>{r.delete(d),a.delete(d)},process:d=>{if(s=d,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),n.clear(),i=!1,o&&(o=!1,l.process(d))}};return l}const c_=40;function dh(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=eo.reduce((x,C)=>(x[C]=s_(o),x),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:d,update:f,preRender:p,render:g,postRender:y}=a,v=()=>{const x=$t.useManualTiming?i.timestamp:performance.now();n=!1,$t.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(x-i.timestamp,c_),1)),i.timestamp=x,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),d.process(i),f.process(i),p.process(i),g.process(i),y.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(v))},b=()=>{n=!0,r=!0,i.isProcessing||e(v)};return{schedule:eo.reduce((x,C)=>{const T=a[C];return x[C]=(M,A=!1,E=!1)=>(n||b(),T.schedule(M,A,E)),x},{}),cancel:x=>{for(let C=0;C<eo.length;C++)a[eo[C]].cancel(x)},state:i,steps:a}}const{schedule:ke,cancel:Yt,state:Re,steps:Es}=dh(typeof requestAnimationFrame<"u"?requestAnimationFrame:dt,!0);let to;function l_(){to=void 0}const Xe={now:()=>(to===void 0&&Xe.set(Re.isProcessing||$t.useManualTiming?Re.timestamp:performance.now()),to),set:e=>{to=e,queueMicrotask(l_)}},fh=e=>t=>typeof t=="string"&&t.startsWith(e),As=fh("--"),u_=fh("var(--"),Os=e=>u_(e)?d_.test(e.split("/*")[0].trim()):!1,d_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Yn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Dr={...Yn,transform:e=>Bt(0,1,e)},no={...Yn,default:1},Lr=e=>Math.round(e*1e5)/1e5,Is=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function f_(e){return e==null}const h_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ds=(e,t)=>n=>!!(typeof n=="string"&&h_.test(n)&&n.startsWith(e)||t&&!f_(n)&&Object.prototype.hasOwnProperty.call(n,t)),hh=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,s]=r.match(Is);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},p_=e=>Bt(0,255,e),Ls={...Yn,transform:e=>Math.round(p_(e))},xn={test:Ds("rgb","red"),parse:hh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ls.transform(e)+", "+Ls.transform(t)+", "+Ls.transform(n)+", "+Lr(Dr.transform(r))+")"};function m_(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const js={test:Ds("#"),parse:m_,transform:xn.transform},jr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Xt=jr("deg"),At=jr("%"),Y=jr("px"),g_=jr("vh"),v_=jr("vw"),ph={...At,parse:e=>At.parse(e)/100,transform:e=>At.transform(e*100)},Xn={test:Ds("hsl","hue"),parse:hh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+At.transform(Lr(t))+", "+At.transform(Lr(n))+", "+Lr(Dr.transform(r))+")"},Ee={test:e=>xn.test(e)||js.test(e)||Xn.test(e),parse:e=>xn.test(e)?xn.parse(e):Xn.test(e)?Xn.parse(e):js.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?xn.transform(e):Xn.transform(e),getAnimatableNone:e=>{const t=Ee.parse(e);return t.alpha=0,Ee.transform(t)}},y_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function b_(e){return isNaN(e)&&typeof e=="string"&&(e.match(Is)?.length||0)+(e.match(y_)?.length||0)>0}const mh="number",gh="color",__="var",w_="var(",vh="${}",k_=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Rr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(k_,c=>(Ee.test(c)?(r.color.push(o),i.push(gh),n.push(Ee.parse(c))):c.startsWith(w_)?(r.var.push(o),i.push(__),n.push(c)):(r.number.push(o),i.push(mh),n.push(parseFloat(c))),++o,vh)).split(vh);return{values:n,split:s,indexes:r,types:i}}function yh(e){return Rr(e).values}function bh(e){const{split:t,types:n}=Rr(e),r=t.length;return i=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],i[a]!==void 0){const s=n[a];s===mh?o+=Lr(i[a]):s===gh?o+=Ee.transform(i[a]):o+=i[a]}return o}}const S_=e=>typeof e=="number"?0:Ee.test(e)?Ee.getAnimatableNone(e):e;function x_(e){const t=yh(e);return bh(e)(t.map(S_))}const Qt={test:b_,parse:yh,createTransformer:bh,getAnimatableNone:x_};function Rs(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<.16666666666666666?e+(t-e)*6*n:n<.5?t:n<.6666666666666666?e+(t-e)*(.6666666666666666-n)*6:e}function T_({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;i=Rs(c,s,e+.3333333333333333),o=Rs(c,s,e),a=Rs(c,s,e-.3333333333333333)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function ro(e,t){return n=>n>0?t:e}const xe=(e,t,n)=>e+(t-e)*n,Vs=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},M_=[js,xn,Xn],C_=e=>M_.find(t=>t.test(e));function _h(e){const t=C_(e);if(!t)return!1;let n=t.parse(e);return t===Xn&&(n=T_(n)),n}const wh=(e,t)=>{const n=_h(e),r=_h(t);if(!n||!r)return ro(e,t);const i={...n};return o=>(i.red=Vs(n.red,r.red,o),i.green=Vs(n.green,r.green,o),i.blue=Vs(n.blue,r.blue,o),i.alpha=xe(n.alpha,r.alpha,o),xn.transform(i))},Ns=new Set(["none","hidden"]);function P_(e,t){return Ns.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function E_(e,t){return n=>xe(e,t,n)}function Fs(e){return typeof e=="number"?E_:typeof e=="string"?Os(e)?ro:Ee.test(e)?wh:I_:Array.isArray(e)?kh:typeof e=="object"?Ee.test(e)?wh:A_:ro}function kh(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>Fs(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}}function A_(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Fs(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function O_(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],a=e.indexes[o][r[o]],s=e.values[a]??0;n[i]=s,r[o]++}return n}const I_=(e,t)=>{const n=Qt.createTransformer(t),r=Rr(e),i=Rr(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Ns.has(e)&&!i.values.length||Ns.has(t)&&!r.values.length?P_(e,t):Ar(kh(O_(r,i),i.values),n):ro(e,t)};function Sh(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?xe(e,t,n):Fs(e)(e,t)}const D_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ke.update(t,n),stop:()=>Yt(t),now:()=>Re.isProcessing?Re.timestamp:Xe.now()}},xh=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},io=2e4;function Bs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<io;)t+=n,r=e.next(t);return t>=io?1/0:t}function L_(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Bs(r),io);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:ft(i)}}const j_=5;function Th(e,t,n){const r=Math.max(t-j_,0);return Zf(n-e(r),t-r)}const Me={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},$s=.001;function R_({duration:e=Me.duration,bounce:t=Me.bounce,velocity:n=Me.velocity,mass:r=Me.mass}){let i,o,a=1-t;a=Bt(Me.minDamping,Me.maxDamping,a),e=Bt(Me.minDuration,Me.maxDuration,ft(e)),a<1?(i=l=>{const d=l*a,f=d*e,p=d-n,g=Us(l,a),y=Math.exp(-f);return $s-p/g*y},o=l=>{const f=l*a*e,p=f*n+n,g=Math.pow(a,2)*Math.pow(l,2)*e,y=Math.exp(-f),v=Us(Math.pow(l,2),a);return(-i(l)+$s>0?-1:1)*((p-g)*y)/v}):(i=l=>{const d=Math.exp(-l*e),f=(l-n)*e+1;return-$s+d*f},o=l=>{const d=Math.exp(-l*e),f=(n-l)*(e*e);return d*f});const s=5/e,c=N_(i,o,s);if(e=Et(e),isNaN(c))return{stiffness:Me.stiffness,damping:Me.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const V_=12;function N_(e,t,n){let r=n;for(let i=1;i<V_;i++)r=r-e(r)/t(r);return r}function Us(e,t){return e*Math.sqrt(1-t*t)}const F_=["duration","bounce"],B_=["stiffness","damping","mass"];function Mh(e,t){return t.some(n=>e[n]!==void 0)}function $_(e){let t={velocity:Me.velocity,stiffness:Me.stiffness,damping:Me.damping,mass:Me.mass,isResolvedFromDuration:!1,...e};if(!Mh(e,B_)&&Mh(e,F_))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Bt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Me.mass,stiffness:i,damping:o}}else{const n=R_(e);t={...t,...n,mass:Me.mass},t.isResolvedFromDuration=!0}return t}function oo(e=Me.visualDuration,t=Me.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:c,damping:l,mass:d,duration:f,velocity:p,isResolvedFromDuration:g}=$_({...n,velocity:-ft(n.velocity||0)}),y=p||0,v=l/(2*Math.sqrt(c*d)),b=a-o,_=ft(Math.sqrt(c/d)),k=Math.abs(b)<5;r||(r=k?Me.restSpeed.granular:Me.restSpeed.default),i||(i=k?Me.restDelta.granular:Me.restDelta.default);let x;if(v<1){const T=Us(_,v);x=M=>{const A=Math.exp(-v*_*M);return a-A*((y+v*_*b)/T*Math.sin(T*M)+b*Math.cos(T*M))}}else if(v===1)x=T=>a-Math.exp(-_*T)*(b+(y+_*b)*T);else{const T=_*Math.sqrt(v*v-1);x=M=>{const A=Math.exp(-v*_*M),E=Math.min(T*M,300);return a-A*((y+v*_*b)*Math.sinh(E)+T*b*Math.cosh(E))/T}}const C={calculatedDuration:g&&f||null,next:T=>{const M=x(T);if(g)s.done=T>=f;else{let A=T===0?y:0;v<1&&(A=T===0?Et(y):Th(x,T,M));const E=Math.abs(A)<=r,j=Math.abs(a-M)<=i;s.done=E&&j}return s.value=s.done?a:M,s},toString:()=>{const T=Math.min(Bs(C),io),M=xh(A=>C.next(T*A).value,T,30);return T+"ms "+M},toTransition:()=>{}};return C}oo.applyToOptions=e=>{const t=L_(e,100,oo);return e.ease=t.ease,e.duration=Et(t.duration),e.type="keyframes",e};function zs({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:c,restDelta:l=.5,restSpeed:d}){const f=e[0],p={done:!1,value:f},g=E=>s!==void 0&&E<s||c!==void 0&&E>c,y=E=>s===void 0?c:c===void 0||Math.abs(s-E)<Math.abs(c-E)?s:c;let v=n*t;const b=f+v,_=a===void 0?b:a(b);_!==b&&(v=_-f);const k=E=>-v*Math.exp(-E/r),x=E=>_+k(E),C=E=>{const j=k(E),B=x(E);p.done=Math.abs(j)<=l,p.value=p.done?_:B};let T,M;const A=E=>{g(p.value)&&(T=E,M=oo({keyframes:[p.value,y(p.value)],velocity:Th(x,E,p.value),damping:i,stiffness:o,restDelta:l,restSpeed:d}))};return A(0),{calculatedDuration:null,next:E=>{let j=!1;return!M&&T===void 0&&(j=!0,C(E),A(E)),T!==void 0&&E>=T?M.next(E-T):(!j&&C(E),p)}}}function U_(e,t,n){const r=[],i=n||$t.mix||Sh,o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||dt:t;s=Ar(c,s)}r.push(s)}return r}function z_(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(xs(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=U_(t,r,i),c=s.length,l=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const p=Or(e[f],e[f+1],d);return s[f](p)};return n?d=>l(Bt(e[0],e[o-1],d)):l}function W_(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Or(0,t,r);e.push(xe(n,1,i))}}function J_(e){const t=[0];return W_(t,e.length-1),t}function H_(e,t){return e.map(n=>n*t)}function q_(e,t){return e.map(()=>t||ch).splice(0,e.length-1)}function Vr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=i_(r)?r.map(uh):uh(r),o={done:!1,value:t[0]},a=H_(n&&n.length===t.length?n:J_(t),e),s=z_(a,t,{ease:Array.isArray(i)?i:q_(t,i)});return{calculatedDuration:e,next:c=>(o.value=s(c),o.done=c>=e,o)}}const G_=e=>e!==null;function Ws(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(G_),s=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const K_={decay:zs,inertia:zs,tween:Vr,keyframes:Vr,spring:oo};function Ch(e){typeof e.type=="string"&&(e.type=K_[e.type])}class Js{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Y_=e=>e/100;class Hs extends Js{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Xe.now()&&this.tick(Xe.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ch(t);const{type:n=Vr,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=t;let{keyframes:s}=t;const c=n||Vr;c!==Vr&&typeof s[0]!="number"&&(this.mixKeyframes=Ar(Y_,Sh(s[0],s[1])),s=[0,100]);const l=c({...t,keyframes:s});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...s].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=Bs(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=l}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:d,repeat:f,repeatType:p,repeatDelay:g,type:y,onUpdate:v,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const _=this.currentTime-l*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?_<0:_>i;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,C=r;if(f){const E=Math.min(this.currentTime,i)/s;let j=Math.floor(E),B=E%1;!B&&E>=1&&(B=1),B===1&&j--,j=Math.min(j,f+1),!!(j%2)&&(p==="reverse"?(B=1-B,g&&(B-=g/s)):p==="mirror"&&(C=a)),x=Bt(0,1,B)*s}const T=k?{done:!1,value:d[0]}:C.next(x);o&&(T.value=o(T.value));let{done:M}=T;!k&&c!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return A&&y!==zs&&(T.value=Ws(d,this.options,b,this.speed)),v&&v(T.value),A&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return ft(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ft(t)}get time(){return ft(this.currentTime)}set time(t){t=Et(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Xe.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ft(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=D_,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Xe.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function X_(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Tn=e=>e*180/Math.PI,qs=e=>{const t=Tn(Math.atan2(e[1],e[0]));return Gs(t)},Q_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qs,rotateZ:qs,skewX:e=>Tn(Math.atan(e[1])),skewY:e=>Tn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Gs=e=>(e=e%360,e<0&&(e+=360),e),Ph=qs,Eh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ah=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Z_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Eh,scaleY:Ah,scale:e=>(Eh(e)+Ah(e))/2,rotateX:e=>Gs(Tn(Math.atan2(e[6],e[5]))),rotateY:e=>Gs(Tn(Math.atan2(-e[2],e[0]))),rotateZ:Ph,rotate:Ph,skewX:e=>Tn(Math.atan(e[4])),skewY:e=>Tn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ks(e){return e.includes("scale")?1:0}function Ys(e,t){if(!e||e==="none")return Ks(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Z_,i=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Q_,i=s}if(!i)return Ks(t);const o=r[t],a=i[1].split(",").map(tw);return typeof o=="function"?o(a):a[o]}const ew=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ys(n,t)};function tw(e){return parseFloat(e.trim())}const Qn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Zn=new Set(Qn),Oh=e=>e===Yn||e===Y,nw=new Set(["x","y","z"]),rw=Qn.filter(e=>!nw.has(e));function iw(e){const t=[];return rw.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Mn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ys(t,"x"),y:(e,{transform:t})=>Ys(t,"y")};Mn.translateX=Mn.x,Mn.translateY=Mn.y;const Cn=new Set;let Xs=!1,Qs=!1,Zs=!1;function Ih(){if(Qs){const e=Array.from(Cn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=iw(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,a])=>{r.getValue(o)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Qs=!1,Xs=!1,Cn.forEach(e=>e.complete(Zs)),Cn.clear()}function Dh(){Cn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qs=!0)})}function ow(){Zs=!0,Dh(),Ih(),Zs=!1}class ec{constructor(t,n,r,i,o,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Cn.add(this),Xs||(Xs=!0,ke.read(Dh),ke.resolveKeyframes(Ih))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i?.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const s=r.readValue(n,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}X_(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Cn.delete(this)}cancel(){this.state==="scheduled"&&(Cn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const aw=e=>e.startsWith("--");function sw(e,t,n){aw(t)?e.style.setProperty(t,n):e.style[t]=n}const cw=Ts(()=>window.ScrollTimeline!==void 0),lw={};function uw(e,t){const n=Ts(e);return()=>lw[t]??n()}const Lh=uw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Nr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,jh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nr([0,.65,.55,1]),circOut:Nr([.55,0,1,.45]),backIn:Nr([.31,.01,.66,-.59]),backOut:Nr([.33,1.53,.69,.99])};function Rh(e,t){if(e)return typeof e=="function"?Lh()?xh(e,t):"ease-out":lh(e)?Nr(e):Array.isArray(e)?e.map(n=>Rh(n,t)||jh.easeOut):jh[e]}function dw(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s="easeOut",times:c}={},l=void 0){const d={[t]:n};c&&(d.offset=c);const f=Rh(s,i);Array.isArray(f)&&(d.easing=f);const p={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"};return l&&(p.pseudoElement=l),e.animate(d,p)}function Vh(e){return typeof e=="function"&&"applyToOptions"in e}function fw({type:e,...t}){return Vh(e)&&Lh()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class hw extends Js{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:s,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=a,this.options=t,xs(typeof t.type!="string");const l=fw(t);this.animation=dw(n,r,i,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=Ws(i,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(d):sw(n,r,d),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ft(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ft(t)}get time(){return ft(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Et(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&cw()?(this.animation.timeline=t,dt):n(this)}}const Nh={anticipate:oh,backInOut:ih,circInOut:sh};function pw(e){return e in Nh}function mw(e){typeof e.ease=="string"&&pw(e.ease)&&(e.ease=Nh[e.ease])}const Fh=10;class gw extends hw{constructor(t){mw(t),Ch(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new Hs({...a,autoplay:!1}),c=Et(this.finishedTime??this.time);n.setWithVelocity(s.sample(c-Fh).value,s.sample(c).value,Fh),s.stop()}}const Bh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Qt.test(e)||e==="0")&&!e.startsWith("url("));function vw(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function yw(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=Bh(i,t),s=Bh(o,t);return!a||!s?!1:vw(e)||(n==="spring"||Vh(n))&&r}function tc(e){e.duration=0,e.type="keyframes"}const bw=new Set(["opacity","clipPath","filter","transform"]),_w=Ts(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ww(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=t.owner.getProps();return _w()&&n&&bw.has(n)&&(n!=="transform"||!l)&&!c&&!r&&i!=="mirror"&&o!==0&&a!=="inertia"}const kw=40;class Sw extends Js{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",keyframes:s,name:c,motionValue:l,element:d,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Xe.now();const p={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:a,name:c,motionValue:l,element:d,...f},g=d?.KeyframeResolver||ec;this.keyframeResolver=new g(s,(y,v,b)=>this.onKeyframesResolved(y,v,p,!b),c,l,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:o,type:a,velocity:s,delay:c,isHandoff:l,onUpdate:d}=r;this.resolvedAt=Xe.now(),yw(t,o,a,s)||(($t.instantAnimations||!c)&&d?.(Ws(t,r,n)),t[0]=t[t.length-1],tc(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>kw?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=!l&&ww(p)?new gw({...p,element:p.motionValue.owner.current}):new Hs(p);g.finished.then(()=>this.notifyFinished()).catch(dt),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ow()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const xw=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Tw(e){const t=xw.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function $h(e,t,n=1){const[r,i]=Tw(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return Yf(a)?parseFloat(a):a}return Os(i)?$h(i,t,n+1):i}function nc(e,t){return e?.[t]??e?.default??e}const Uh=new Set(["width","height","top","left","right","bottom",...Qn]),Mw={test:e=>e==="auto",parse:e=>e},zh=e=>t=>t.test(e),Wh=[Yn,Y,At,Xt,v_,g_,Mw],Jh=e=>Wh.find(zh(e));function Cw(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Qf(e):!0}const Pw=new Set(["brightness","contrast","saturate","opacity"]);function Ew(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Is)||[];if(!r)return e;const i=n.replace(r,"");let o=Pw.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Aw=/\b([a-z-]*)\(.*?\)/gu,rc={...Qt,getAnimatableNone:e=>{const t=e.match(Aw);return t?t.map(Ew).join(" "):e}},Hh={...Yn,transform:Math.round},ic={borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,radius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,top:Y,right:Y,bottom:Y,left:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,backgroundPositionX:Y,backgroundPositionY:Y,...{rotate:Xt,rotateX:Xt,rotateY:Xt,rotateZ:Xt,scale:no,scaleX:no,scaleY:no,scaleZ:no,skew:Xt,skewX:Xt,skewY:Xt,distance:Y,translateX:Y,translateY:Y,translateZ:Y,x:Y,y:Y,z:Y,perspective:Y,transformPerspective:Y,opacity:Dr,originX:ph,originY:ph,originZ:Y},zIndex:Hh,fillOpacity:Dr,strokeOpacity:Dr,numOctaves:Hh},Ow={...ic,color:Ee,backgroundColor:Ee,outlineColor:Ee,fill:Ee,stroke:Ee,borderColor:Ee,borderTopColor:Ee,borderRightColor:Ee,borderBottomColor:Ee,borderLeftColor:Ee,filter:rc,WebkitFilter:rc},qh=e=>Ow[e];function Gh(e,t){let n=qh(e);return n!==rc&&(n=Qt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Iw=new Set(["auto","none","0"]);function Dw(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!Iw.has(o)&&Rr(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Gh(n,i)}class Lw extends ec{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),Os(l))){const d=$h(l,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!Uh.has(r)||t.length!==2)return;const[i,o]=t,a=Jh(i),s=Jh(o);if(a!==s)if(Oh(a)&&Oh(s))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else Mn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||Cw(t[i]))&&r.push(i);r.length&&Dw(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Mn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,a=r[o];r[o]=Mn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,c])=>{t.getValue(s).set(c)}),this.resolveNoneKeyframes()}}function jw(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const Kh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Rw(e){return Xf(e)&&"offsetHeight"in e}const Yh=30,Vw=e=>!isNaN(parseFloat(e));class Nw{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=Xe.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Xe.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Vw(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ms);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Xe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Yh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Yh);return Zf(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function er(e,t){return new Nw(e,t)}const{schedule:oc}=dh(queueMicrotask,!1),St={x:!1,y:!1};function Xh(){return St.x||St.y}function Fw(e){return e==="x"||e==="y"?St[e]?null:(St[e]=!0,()=>{St[e]=!1}):St.x||St.y?null:(St.x=St.y=!0,()=>{St.x=St.y=!1})}function Qh(e,t){const n=jw(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Zh(e){return!(e.pointerType==="touch"||Xh())}function Bw(e,t,n={}){const[r,i,o]=Qh(e,n),a=s=>{if(!Zh(s))return;const{target:c}=s,l=t(c,s);if(typeof l!="function"||!c)return;const d=f=>{Zh(f)&&(l(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,i)};return r.forEach(s=>{s.addEventListener("pointerenter",a,i)}),o}const ep=(e,t)=>t?e===t?!0:ep(e,t.parentElement):!1,ac=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,$w=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Uw(e){return $w.has(e.tagName)||e.tabIndex!==-1}const ao=new WeakSet;function tp(e){return t=>{t.key==="Enter"&&e(t)}}function sc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const zw=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=tp(()=>{if(ao.has(n))return;sc(n,"down");const i=tp(()=>{sc(n,"up")}),o=()=>sc(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function np(e){return ac(e)&&!Xh()}function Ww(e,t,n={}){const[r,i,o]=Qh(e,n),a=s=>{const c=s.currentTarget;if(!np(s))return;ao.add(c);const l=t(c,s),d=(g,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),ao.has(c)&&ao.delete(c),np(g)&&typeof l=="function"&&l(g,{success:y})},f=g=>{d(g,c===window||c===document||n.useGlobalTarget||ep(c,g.target))},p=g=>{d(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",p,i)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,i),Rw(s)&&(s.addEventListener("focus",l=>zw(l,i)),!Uw(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),o}function rp(e){return Xf(e)&&"ownerSVGElement"in e}function Jw(e){return rp(e)&&e.tagName==="svg"}const ze=e=>!!(e&&e.getVelocity),Hw=[...Wh,Ee,Qt],qw=e=>Hw.find(zh(e)),ip=De({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Gw(e=!0){const t=ge(ws);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=Do();Z(()=>{if(e)return i(o)},[e]);const a=R(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,a]:[!0]}const op=De({strict:!1}),ap={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},tr={};for(const e in ap)tr[e]={isEnabled:t=>ap[e].some(n=>!!t[n])};function Kw(e){for(const t in e)tr[t]={...tr[t],...e[t]}}const Yw=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function so(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Yw.has(e)}let sp=e=>!so(e);function Xw(e){typeof e=="function"&&(sp=t=>t.startsWith("on")?!so(t):e(t))}try{Xw(require("@emotion/is-prop-valid").default)}catch{}function Qw(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(sp(i)||n===!0&&so(i)||!t&&!so(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const co=De({});function lo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Fr(e){return typeof e=="string"||Array.isArray(e)}const cc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],lc=["initial",...cc];function uo(e){return lo(e.animate)||lc.some(t=>Fr(e[t]))}function cp(e){return!!(uo(e)||e.variants)}function Zw(e,t){if(uo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fr(n)?n:void 0,animate:Fr(r)?r:void 0}}return e.inherit!==!1?t:{}}function ek(e){const{initial:t,animate:n}=Zw(e,ge(co));return Ve(()=>({initial:t,animate:n}),[lp(t),lp(n)])}function lp(e){return Array.isArray(e)?e.join(" "):e}const Br={};function tk(e){for(const t in e)Br[t]=e[t],As(t)&&(Br[t].isCSSVariable=!0)}function up(e,{layout:t,layoutId:n}){return Zn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Br[e]||e==="opacity")}const nk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rk=Qn.length;function ik(e,t,n){let r="",i=!0;for(let o=0;o<rk;o++){const a=Qn[o],s=e[a];if(s===void 0)continue;let c=!0;if(typeof s=="number"?c=s===(a.startsWith("scale")?1:0):c=parseFloat(s)===0,!c||n){const l=Kh(s,ic[a]);if(!c){i=!1;const d=nk[a]||a;r+=`${d}(${l}) `}n&&(t[a]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function uc(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let a=!1,s=!1;for(const c in t){const l=t[c];if(Zn.has(c)){a=!0;continue}else if(As(c)){i[c]=l;continue}else{const d=Kh(l,ic[c]);c.startsWith("origin")?(s=!0,o[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=ik(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:c="50%",originY:l="50%",originZ:d=0}=o;r.transformOrigin=`${c} ${l} ${d}`}}const dc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dp(e,t,n){for(const r in t)!ze(t[r])&&!up(r,n)&&(e[r]=t[r])}function ok({transformTemplate:e},t){return Ve(()=>{const n=dc();return uc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ak(e,t){const n=e.style||{},r={};return dp(r,n,e),Object.assign(r,ok(e,t)),r}function sk(e,t){const n={},r=ak(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const ck={offset:"stroke-dashoffset",array:"stroke-dasharray"},lk={offset:"strokeDashoffset",array:"strokeDasharray"};function uk(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?ck:lk;e[o.offset]=Y.transform(-r);const a=Y.transform(t),s=Y.transform(n);e[o.array]=`${a} ${s}`}function fp(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...s},c,l,d){if(uc(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p}=e;f.transform&&(p.transform=f.transform,delete f.transform),(p.transform||f.transformOrigin)&&(p.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=d?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&uk(f,i,o,a,!1)}const hp=()=>({...dc(),attrs:{}}),pp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function dk(e,t,n,r){const i=Ve(()=>{const o=hp();return fp(o,t,pp(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};dp(o,e.style,e),i.style={...o,...i.style}}return i}const fk=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function fc(e){return typeof e!="string"||e.includes("-")?!1:!!(fk.indexOf(e)>-1||/[A-Z]/u.test(e))}function hk(e,t,n,{latestValues:r},i,o=!1){const s=(fc(e)?dk:sk)(t,r,i,e),c=Qw(t,typeof e=="string",o),l=e!==Ke?{...c,...s,ref:n}:{},{children:d}=t,f=Ve(()=>ze(d)?d.get():d,[d]);return ae(e,{...l,children:f})}function mp(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function hc(e,t,n,r){if(typeof t=="function"){const[i,o]=mp(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=mp(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function fo(e){return ze(e)?e.get():e}function pk({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:mk(n,r,i,e),renderState:t()}}function mk(e,t,n,r){const i={},o=r(e,{});for(const p in o)i[p]=fo(o[p]);let{initial:a,animate:s}=e;const c=uo(e),l=cp(e);t&&l&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?s:a;if(f&&typeof f!="boolean"&&!lo(f)){const p=Array.isArray(f)?f:[f];for(let g=0;g<p.length;g++){const y=hc(e,p[g]);if(y){const{transitionEnd:v,transition:b,..._}=y;for(const k in _){let x=_[k];if(Array.isArray(x)){const C=d?x.length-1:0;x=x[C]}x!==null&&(i[k]=x)}for(const k in v)i[k]=v[k]}}}return i}const gp=e=>(t,n)=>{const r=ge(co),i=ge(ws),o=()=>pk(e,t,r,i);return n?o():Y0(o)};function pc(e,t,n){const{style:r}=e,i={};for(const o in r)(ze(r[o])||t.style&&ze(t.style[o])||up(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}const gk=gp({scrapeMotionValuesFromProps:pc,createRenderState:dc});function vp(e,t,n){const r=pc(e,t,n);for(const i in e)if(ze(e[i])||ze(t[i])){const o=Qn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}const vk=gp({scrapeMotionValuesFromProps:vp,createRenderState:hp}),yk=Symbol.for("motionComponentSymbol");function nr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bk(e,t,n){return R(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):nr(n)&&(n.current=r))},[t])}const mc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yp="data-"+mc("framerAppearId"),bp=De({});function _k(e,t,n,r,i){const{visualElement:o}=ge(co),a=ge(op),s=ge(ws),c=ge(ip).reducedMotion,l=fe(null);r=r||a.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));const d=l.current,f=ge(bp);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&wk(l.current,n,i,f);const p=fe(!1);Bo(()=>{d&&p.current&&d.update(n,s)});const g=n[yp],y=fe(!!g&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return X0(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),y.current&&d.animationState&&d.animationState.animateChanges())}),Z(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),y.current=!1),d.enteringChildren=void 0)}),d}function wk(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:_p(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&nr(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l})}function _p(e){if(e)return e.options.allowProjection!==!1?e.projection:_p(e.parent)}function gc(e,{forwardMotionProps:t=!1}={},n,r){n&&Kw(n);const i=fc(e)?vk:gk;function o(s,c){let l;const d={...ge(ip),...s,layoutId:kk(s)},{isStatic:f}=d,p=ek(s),g=i(s,f);if(!f&&_s){Sk();const y=xk(d);l=y.MeasureLayout,p.visualElement=_k(e,g,d,r,y.ProjectionNode)}return O(co.Provider,{value:p,children:[l&&p.visualElement?O(l,{visualElement:p.visualElement,...d}):null,hk(e,s,bk(g,p.visualElement,c),g,f,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const a=et(o);return a[yk]=e,a}function kk({layoutId:e}){const t=ge(Kf).id;return t&&e!==void 0?t+"-"+e:e}function Sk(e,t){ge(op).strict}function xk(e){const{drag:t,layout:n}=tr;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Tk(e,t){if(typeof Proxy>"u")return gc;const n=new Map,r=(o,a)=>gc(o,a,e,t),i=(o,a)=>r(o,a);return new Proxy(i,{get:(o,a)=>a==="create"?r:(n.has(a)||n.set(a,gc(a,void 0,e,t)),n.get(a))})}function wp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Mk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ck(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function vc(e){return e===void 0||e===1}function yc({scale:e,scaleX:t,scaleY:n}){return!vc(e)||!vc(t)||!vc(n)}function Pn(e){return yc(e)||kp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function kp(e){return Sp(e.x)||Sp(e.y)}function Sp(e){return e&&e!=="0%"}function ho(e,t,n){const r=e-n,i=t*r;return n+i}function xp(e,t,n,r,i){return i!==void 0&&(e=ho(e,i,r)),ho(e,n,r)+t}function bc(e,t=0,n=1,r,i){e.min=xp(e.min,t,n,r,i),e.max=xp(e.max,t,n,r,i)}function Tp(e,{x:t,y:n}){bc(e.x,t.translate,t.scale,t.originPoint),bc(e.y,n.translate,n.scale,n.originPoint)}const Mp=.999999999999,Cp=1.0000000000001;function Pk(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s<i;s++){o=n[s],a=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ir(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Tp(e,a)),r&&Pn(o.latestValues)&&ir(e,o.latestValues))}t.x<Cp&&t.x>Mp&&(t.x=1),t.y<Cp&&t.y>Mp&&(t.y=1)}function rr(e,t){e.min=e.min+t,e.max=e.max+t}function Pp(e,t,n,r,i=.5){const o=xe(e.min,e.max,i);bc(e,t,n,o,r)}function ir(e,t){Pp(e.x,t.x,t.scaleX,t.scale,t.originX),Pp(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ep(e,t){return wp(Ck(e.getBoundingClientRect(),t))}function Ek(e,t,n){const r=Ep(e,n),{scroll:i}=t;return i&&(rr(r.x,i.offset.x),rr(r.y,i.offset.y)),r}const Ap=()=>({translate:0,scale:1,origin:0,originPoint:0}),or=()=>({x:Ap(),y:Ap()}),Op=()=>({min:0,max:0}),Pe=()=>({x:Op(),y:Op()}),_c={current:null},Ip={current:!1};function Ak(){if(Ip.current=!0,!!_s)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>_c.current=e.matches;e.addEventListener("change",t),t()}else _c.current=!1}const Ok=new WeakMap;function Ik(e,t,n){for(const r in t){const i=t[r],o=n[r];if(ze(i))e.addValue(r,i);else if(ze(o))e.addValue(r,er(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,er(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Dp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Dk{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ec,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Xe.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ke.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=uo(n),this.isVariantNode=cp(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const g=f[p];c[p]!==void 0&&ze(g)&&g.set(c[p])}}mount(t){this.current=t,Ok.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Ip.current||Ak(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:_c.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Yt(this.notifyUpdate),Yt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Zn.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in tr){const n=tr[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Dp.length;r++){const i=Dp[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,a=t[o];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=Ik(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=er(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Yf(r)||Qf(r))?r=parseFloat(r):!qw(r)&&Qt.test(n)&&(r=Gh(t,n)),this.setBaseTarget(t,ze(r)?r.get():r)),ze(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=hc(this.props,n,this.presenceContext?.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ze(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ms),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){oc.render(this.render)}}class Lp extends Dk{constructor(){super(...arguments),this.KeyframeResolver=Lw}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ze(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function jp(e,{style:t,vars:n},r,i){const o=e.style;let a;for(a in t)o[a]=t[a];i?.applyProjectionStyles(o,r);for(a in n)o.setProperty(a,n[a])}function Lk(e){return window.getComputedStyle(e)}class jk extends Lp{constructor(){super(...arguments),this.type="html",this.renderInstance=jp}readValueFromInstance(t,n){if(Zn.has(n))return this.projection?.isProjecting?Ks(n):ew(t,n);{const r=Lk(t),i=(As(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ep(t,n)}build(t,n,r){uc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return pc(t,n,r)}}const Rp=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Rk(e,t,n,r){jp(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Rp.has(i)?i:mc(i),t.attrs[i])}class Vk extends Lp{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Zn.has(n)){const r=qh(n);return r&&r.default||0}return n=Rp.has(n)?n:mc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return vp(t,n,r)}build(t,n,r){fp(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){Rk(t,n,r,i)}mount(t){this.isSVGTag=pp(t.tagName),super.mount(t)}}const Nk=(e,t)=>fc(e)?new Vk(t):new jk(t,{allowProjection:e!==Ke});function ar(e,t,n){const r=e.getProps();return hc(r,t,n!==void 0?n:r.custom,e)}const wc=e=>Array.isArray(e);function Fk(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,er(n))}function Bk(e){return wc(e)?e[e.length-1]||0:e}function $k(e,t){const n=ar(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const s=Bk(o[a]);Fk(e,a,s)}}function Uk(e){return!!(ze(e)&&e.add)}function kc(e,t){const n=e.getValue("willChange");if(Uk(n))return n.add(t);if(!n&&$t.WillChange){const r=new $t.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Vp(e){return e.props[yp]}const zk=e=>e!==null;function Wk(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(zk),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const Jk={type:"spring",stiffness:500,damping:25,restSpeed:10},Hk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qk={type:"keyframes",duration:.8},Gk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kk=(e,{keyframes:t})=>t.length>2?qk:Zn.has(e)?e.startsWith("scale")?Hk(t[1]):Jk:Gk;function Yk({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:c,elapsed:l,...d}){return!!Object.keys(d).length}const Sc=(e,t,n,r={},i,o)=>a=>{const s=nc(r,e)||{},c=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Et(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};Yk(s)||Object.assign(d,Kk(e,d)),d.duration&&(d.duration=Et(d.duration)),d.repeatDelay&&(d.repeatDelay=Et(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(tc(d),d.delay===0&&(f=!0)),($t.instantAnimations||$t.skipAnimations)&&(f=!0,tc(d),d.delay=0),d.allowFlatten=!s.type&&!s.ease,f&&!o&&t.get()!==void 0){const p=Wk(d.keyframes,s);if(p!==void 0){ke.update(()=>{d.onUpdate(p),d.onComplete()});return}}return s.isSync?new Hs(d):new Sw(d)};function Xk({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Np(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(o=r);const c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const d in s){const f=e.getValue(d,e.latestValues[d]??null),p=s[d];if(p===void 0||l&&Xk(l,d))continue;const g={delay:n,...nc(o||{},d)},y=f.get();if(y!==void 0&&!f.isAnimating&&!Array.isArray(p)&&p===y&&!g.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const _=Vp(e);if(_){const k=window.MotionHandoffAnimation(_,d,ke);k!==null&&(g.startTime=k,v=!0)}}kc(e,d),f.start(Sc(d,f,p,e.shouldReduceMotion&&Uh.has(d)?{type:!1}:g,e,v));const b=f.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{ke.update(()=>{a&&$k(e,a)})}),c}function Fp(e,t,n,r=0,i=1){const o=Array.from(e).sort((l,d)=>l.sortNodePosition(d)).indexOf(t),a=e.size,s=(a-1)*r;return typeof n=="function"?n(o,a):i===1?o*r:s-o*r}function xc(e,t,n={}){const r=ar(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Np(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:f}=i;return Qk(e,t,c,l,d,f,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[c,l]=s==="beforeChildren"?[o,a]:[a,o];return c().then(()=>l())}else return Promise.all([o(),a(n.delay)])}function Qk(e,t,n=0,r=0,i=0,o=1,a){const s=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),s.push(xc(c,t,{...a,delay:n+(typeof r=="function"?0:r)+Fp(e.variantChildren,c,r,i,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(s)}function Zk(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>xc(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=xc(e,t,n);else{const i=typeof t=="function"?ar(e,t,n.custom):t;r=Promise.all(Np(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Bp(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const eS=lc.length;function $p(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?$p(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<eS;n++){const r=lc[n],i=e.props[r];(Fr(i)||i===!1)&&(t[r]=i)}return t}const tS=[...cc].reverse(),nS=cc.length;function rS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Zk(e,n,r)))}function iS(e){let t=rS(e),n=Up(),r=!0;const i=c=>(l,d)=>{const f=ar(e,d,c==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:p,transitionEnd:g,...y}=f;l={...l,...y,...g}}return l};function o(c){t=c(e)}function a(c){const{props:l}=e,d=$p(e.parent)||{},f=[],p=new Set;let g={},y=1/0;for(let b=0;b<nS;b++){const _=tS[b],k=n[_],x=l[_]!==void 0?l[_]:d[_],C=Fr(x),T=_===c?k.isActive:null;T===!1&&(y=b);let M=x===d[_]&&x!==l[_]&&C;if(M&&r&&e.manuallyAnimateOnMount&&(M=!1),k.protectedKeys={...g},!k.isActive&&T===null||!x&&!k.prevProp||lo(x)||typeof x=="boolean")continue;const A=oS(k.prevProp,x);let E=A||_===c&&k.isActive&&!M&&C||b>y&&C,j=!1;const B=Array.isArray(x)?x:[x];let V=B.reduce(i(_),{});T===!1&&(V={});const{prevResolvedValues:H={}}=k,F={...H,...V},X=G=>{E=!0,p.has(G)&&(j=!0,p.delete(G)),k.needsAnimating[G]=!0;const N=e.getValue(G);N&&(N.liveStyle=!1)};for(const G in F){const N=V[G],J=H[G];if(g.hasOwnProperty(G))continue;let z=!1;wc(N)&&wc(J)?z=!Bp(N,J):z=N!==J,z?N!=null?X(G):p.add(G):N!==void 0&&p.has(G)?X(G):k.protectedKeys[G]=!0}k.prevProp=x,k.prevResolvedValues=V,k.isActive&&(g={...g,...V}),r&&e.blockInitialAnimation&&(E=!1);const K=M&&A;E&&(!K||j)&&f.push(...B.map(G=>{const N={type:_};if(typeof G=="string"&&r&&!K&&e.manuallyAnimateOnMount&&e.parent){const{parent:J}=e,z=ar(J,G);if(J.enteringChildren&&z){const{delayChildren:We}=z.transition||{};N.delay=Fp(J.enteringChildren,e,We)}}return{animation:G,options:N}}))}if(p.size){const b={};if(typeof l.initial!="boolean"){const _=ar(e,Array.isArray(l.initial)?l.initial[0]:l.initial);_&&_.transition&&(b.transition=_.transition)}p.forEach(_=>{const k=e.getBaseTarget(_),x=e.getValue(_);x&&(x.liveStyle=!0),b[_]=k??null}),f.push({animation:b})}let v=!!f.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Promise.resolve()}function s(c,l){if(n[c].isActive===l)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(c,l)),n[c].isActive=l;const d=a(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Up()}}}function oS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Bp(t,e):!1}function En(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Up(){return{animate:En(!0),whileInView:En(),whileHover:En(),whileTap:En(),whileDrag:En(),whileFocus:En(),exit:En()}}class Zt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class aS extends Zt{constructor(t){super(t),t.animationState||(t.animationState=iS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();lo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let sS=0;class cS extends Zt{constructor(){super(...arguments),this.id=sS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const lS={animation:{Feature:aS},exit:{Feature:cS}};function $r(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ur(e){return{point:{x:e.pageX,y:e.pageY}}}const uS=e=>t=>ac(t)&&e(t,Ur(t));function zr(e,t,n,r){return $r(e,t,uS(n),r)}const zp=1e-4,dS=1-zp,fS=1+zp,Wp=.01,hS=0-Wp,pS=0+Wp;function Ge(e){return e.max-e.min}function mS(e,t,n){return Math.abs(e-t)<=n}function Jp(e,t,n,r=.5){e.origin=r,e.originPoint=xe(t.min,t.max,e.origin),e.scale=Ge(n)/Ge(t),e.translate=xe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=dS&&e.scale<=fS||isNaN(e.scale))&&(e.scale=1),(e.translate>=hS&&e.translate<=pS||isNaN(e.translate))&&(e.translate=0)}function Wr(e,t,n,r){Jp(e.x,t.x,n.x,r?r.originX:void 0),Jp(e.y,t.y,n.y,r?r.originY:void 0)}function Hp(e,t,n){e.min=n.min+t.min,e.max=e.min+Ge(t)}function gS(e,t,n){Hp(e.x,t.x,n.x),Hp(e.y,t.y,n.y)}function qp(e,t,n){e.min=t.min-n.min,e.max=e.min+Ge(t)}function Jr(e,t,n){qp(e.x,t.x,n.x),qp(e.y,t.y,n.y)}function ht(e){return[e("x"),e("y")]}const Gp=({current:e})=>e?e.ownerDocument.defaultView:null,Kp=(e,t)=>Math.abs(e-t);function vS(e,t){const n=Kp(e.x,t.x),r=Kp(e.y,t.y);return Math.sqrt(n**2+r**2)}class Yp{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Mc(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=vS(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:v}=p,{timestamp:b}=Re;this.history.push({...v,timestamp:b});const{onStart:_,onMove:k}=this.handlers;g||(_&&_(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Tc(g,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:y,onSessionEnd:v,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=Mc(p.type==="pointercancel"?this.lastMoveEventInfo:Tc(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,_),v&&v(p,_)},!ac(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=i||window;const s=Ur(t),c=Tc(s,this.transformPagePoint),{point:l}=c,{timestamp:d}=Re;this.history=[{...l,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Mc(c,this.history)),this.removeListeners=Ar(zr(this.contextWindow,"pointermove",this.handlePointerMove),zr(this.contextWindow,"pointerup",this.handlePointerUp),zr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Yt(this.updatePoint)}}function Tc(e,t){return t?{point:t(e.point)}:e}function Xp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Mc({point:e},t){return{point:e,delta:Xp(e,Qp(t)),offset:Xp(e,yS(t)),velocity:bS(t,.1)}}function yS(e){return e[0]}function Qp(e){return e[e.length-1]}function bS(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Qp(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Et(t)));)n--;if(!r)return{x:0,y:0};const o=ft(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function _S(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?xe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?xe(n,e,r.max):Math.min(e,n)),e}function Zp(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function wS(e,{top:t,left:n,bottom:r,right:i}){return{x:Zp(e.x,n,i),y:Zp(e.y,t,r)}}function em(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function kS(e,t){return{x:em(e.x,t.x),y:em(e.y,t.y)}}function SS(e,t){let n=.5;const r=Ge(e),i=Ge(t);return i>r?n=Or(t.min,t.max-r,e.min):r>i&&(n=Or(e.min,e.max-i,t.min)),Bt(0,1,n)}function xS(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Cc=.35;function TS(e=Cc){return e===!1?e=0:e===!0&&(e=Cc),{x:tm(e,"left","right"),y:tm(e,"top","bottom")}}function tm(e,t,n){return{min:nm(e,t),max:nm(e,n)}}function nm(e,t){return typeof e=="number"?e:e[t]||0}const MS=new WeakMap;class CS{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ur(f).point)},a=(f,p)=>{const{drag:g,dragPropagation:y,onDragStart:v}=this.getProps();if(g&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fw(g),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ht(_=>{let k=this.getAxisMotionValue(_).get()||0;if(At.test(k)){const{projection:x}=this.visualElement;if(x&&x.layout){const C=x.layout.layoutBox[_];C&&(k=Ge(C)*(parseFloat(k)/100))}}this.originPoint[_]=k}),v&&ke.postRender(()=>v(f,p)),kc(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},s=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p;const{dragPropagation:g,dragDirectionLock:y,onDirectionLock:v,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:_}=p;if(y&&this.currentDirection===null){this.currentDirection=PS(_),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",p.point,_),this.updateAxis("y",p.point,_),this.visualElement.render(),b&&b(f,p)},c=(f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p,this.stop(f,p),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>ht(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:d}=this.getProps();this.panSession=new Yp(t,{onSessionStart:o,onStart:a,onMove:s,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Gp(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:a}=i;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&ke.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!po(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=_S(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&nr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=wS(r.layoutBox,t):this.constraints=!1,this.elastic=TS(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ht(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=xS(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nr(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Ek(r,i.root,this.visualElement.getTransformPagePoint());let a=kS(i.layout.layoutBox,o);if(n){const s=n(Mk(a));this.hasMutatedConstraints=!!s,s&&(a=wp(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=ht(d=>{if(!po(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const p=i?200:1e6,g=i?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,y)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return kc(this.visualElement,t),r.start(Sc(t,r,0,n,this.visualElement,!1))}stopAnimation(){ht(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ht(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ht(n=>{const{drag:r}=this.getProps();if(!po(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-xe(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!nr(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ht(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const c=s.get();i[a]=SS({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ht(a=>{if(!po(a,t,null))return;const s=this.getAxisMotionValue(a),{min:c,max:l}=this.constraints[a];s.set(xe(c,l,i[a]))})}addListeners(){if(!this.visualElement.current)return;MS.set(this.visualElement,this);const t=this.visualElement.current,n=zr(t,"pointerdown",c=>{const{drag:l,dragListener:d=!0}=this.getProps();l&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();nr(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ke.read(r);const a=$r(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(ht(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=Cc,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function po(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function PS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class ES extends Zt{constructor(t){super(t),this.removeGroupControls=dt,this.removeListeners=dt,this.controls=new CS(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dt}unmount(){this.removeGroupControls(),this.removeListeners()}}const rm=e=>(t,n)=>{e&&ke.postRender(()=>e(t,n))};class AS extends Zt{constructor(){super(...arguments),this.removePointerDownListener=dt}onPointerDown(t){this.session=new Yp(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Gp(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:rm(t),onStart:rm(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&ke.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=zr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const mo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function im(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Hr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Y.test(e))e=parseFloat(e);else return e;const n=im(e,t.target.x),r=im(e,t.target.y);return`${n}% ${r}%`}},OS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Qt.parse(e);if(i.length>5)return r;const o=Qt.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=c;const l=xe(s,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=l),typeof i[3+a]=="number"&&(i[3+a]/=l),o(i)}};let Pc=!1;class IS extends gt{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;tk(DS),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Pc&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),mo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:a}=r;return a&&(a.isPresent=o,Pc=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||ke.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),oc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Pc=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function om(e){const[t,n]=Gw(),r=ge(Kf);return O(IS,{...e,layoutGroup:r,switchLayoutGroup:ge(bp),isPresent:t,safeToRemove:n})}const DS={borderRadius:{...Hr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Hr,borderTopRightRadius:Hr,borderBottomLeftRadius:Hr,borderBottomRightRadius:Hr,boxShadow:OS};function LS(e,t,n){const r=ze(e)?e:er(e);return r.start(Sc("",r,t,n)),r.animation}const jS=(e,t)=>e.depth-t.depth;class RS{constructor(){this.children=[],this.isDirty=!1}add(t){ks(this.children,t),this.isDirty=!0}remove(t){Ss(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(jS),this.isDirty=!1,this.children.forEach(t)}}function VS(e,t){const n=Xe.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Yt(r),e(o-t))};return ke.setup(r,!0),()=>Yt(r)}const am=["TopLeft","TopRight","BottomLeft","BottomRight"],NS=am.length,sm=e=>typeof e=="string"?parseFloat(e):e,cm=e=>typeof e=="number"||Y.test(e);function FS(e,t,n,r,i,o){i?(e.opacity=xe(0,n.opacity??1,BS(r)),e.opacityExit=xe(t.opacity??1,0,$S(r))):o&&(e.opacity=xe(t.opacity??1,n.opacity??1,r));for(let a=0;a<NS;a++){const s=`border${am[a]}Radius`;let c=lm(t,s),l=lm(n,s);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||cm(c)===cm(l)?(e[s]=Math.max(xe(sm(c),sm(l),r),0),(At.test(l)||At.test(c))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=xe(t.rotate||0,n.rotate||0,r))}function lm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const BS=um(0,.5,ah),$S=um(.5,.95,dt);function um(e,t,n){return r=>r<e?0:r>t?1:n(Or(e,t,r))}function dm(e,t){e.min=t.min,e.max=t.max}function pt(e,t){dm(e.x,t.x),dm(e.y,t.y)}function fm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function hm(e,t,n,r,i){return e-=t,e=ho(e,1/n,r),i!==void 0&&(e=ho(e,1/i,r)),e}function US(e,t=0,n=1,r=.5,i,o=e,a=e){if(At.test(t)&&(t=parseFloat(t),t=xe(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=xe(o.min,o.max,r);e===o&&(s-=t),e.min=hm(e.min,t,n,s,i),e.max=hm(e.max,t,n,s,i)}function pm(e,t,[n,r,i],o,a){US(e,t[n],t[r],t[i],t.scale,o,a)}const zS=["x","scaleX","originX"],WS=["y","scaleY","originY"];function mm(e,t,n,r){pm(e.x,t,zS,n?n.x:void 0,r?r.x:void 0),pm(e.y,t,WS,n?n.y:void 0,r?r.y:void 0)}function gm(e){return e.translate===0&&e.scale===1}function vm(e){return gm(e.x)&&gm(e.y)}function ym(e,t){return e.min===t.min&&e.max===t.max}function JS(e,t){return ym(e.x,t.x)&&ym(e.y,t.y)}function bm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function _m(e,t){return bm(e.x,t.x)&&bm(e.y,t.y)}function wm(e){return Ge(e.x)/Ge(e.y)}function km(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class HS{constructor(){this.members=[]}add(t){ks(this.members,t),t.scheduleRender()}remove(t){if(Ss(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function qS(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=n?.z||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:d,rotateX:f,rotateY:p,skewX:g,skewY:y}=n;l&&(r=`perspective(${l}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),g&&(r+=`skewX(${g}deg) `),y&&(r+=`skewY(${y}deg) `)}const s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||"none"}const Ec=["","X","Y","Z"],GS=1e3;let KS=0;function Ac(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Sm(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Vp(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ke,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Sm(r)}function xm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t?.()){this.id=KS++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(QS),this.nodes.forEach(n1),this.nodes.forEach(r1),this.nodes.forEach(ZS)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new RS)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Ms),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const c=this.eventHandlers.get(a);c&&c.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=rp(a)&&!Jw(a),this.instance=a;const{layoutId:s,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||s)&&(this.isLayoutDirty=!0),e){let d,f=0;const p=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{f=window.innerWidth}),e(a,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,d&&d(),d=VS(p,250),mo.hasAnimatedSinceResize&&(mo.hasAnimatedSinceResize=!1,this.nodes.forEach(Cm)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&l&&(s||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||l.getDefaultTransition()||c1,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=l.getProps(),_=!this.targetLayout||!_m(this.targetLayout,g),k=!f&&p;if(this.options.layoutRoot||this.resumeFrom||k||f&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...nc(y,"layout"),onPlay:v,onComplete:b};(l.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(d,k)}else f||Cm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Yt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(i1),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Sm(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:s,layout:c}=this.options;if(s===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Tm);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Mm);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(t1),this.nodes.forEach(YS),this.nodes.forEach(XS)):this.nodes.forEach(Mm),this.clearAllSnapshots();const s=Xe.now();Re.delta=Bt(0,16.666666666666668,s-Re.timestamp),Re.timestamp=s,Re.isProcessing=!0,Es.update.process(Re),Es.preRender.process(Re),Es.render.process(Re),Re.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,oc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(e1),this.sharedNodes.forEach(o1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ge(this.snapshot.measuredBox.x)&&!Ge(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!vm(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,d=l!==this.prevTransformTemplateValue;a&&this.instance&&(s||Pn(this.latestValues)||d)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let c=this.removeElementScroll(s);return a&&(c=this.removeTransform(c)),l1(c),{animationId:this.root.animationId,measuredBox:s,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Pe();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(u1))){const{scroll:l}=this.root;l&&(rr(s.x,l.offset.x),rr(s.y,l.offset.y))}return s}removeElementScroll(a){const s=Pe();if(pt(s,a),this.scroll?.wasRoot)return s;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:d,options:f}=l;l!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&pt(s,a),rr(s.x,d.offset.x),rr(s.y,d.offset.y))}return s}applyTransform(a,s=!1){const c=Pe();pt(c,a);for(let l=0;l<this.path.length;l++){const d=this.path[l];!s&&d.options.layoutScroll&&d.scroll&&d!==d.root&&ir(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Pn(d.latestValues)&&ir(c,d.latestValues)}return Pn(this.latestValues)&&ir(c,this.latestValues),c}removeTransform(a){const s=Pe();pt(s,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!Pn(l.latestValues))continue;yc(l.latestValues)&&l.updateSnapshot();const d=Pe(),f=l.measurePageBox();pt(d,f),mm(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,d)}return Pn(this.latestValues)&&mm(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Re.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==s;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Re.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Jr(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),pt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pe(),this.targetWithTransforms=Pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),gS(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):pt(this.target,this.layout.layoutBox),Tp(this.target,this.targetDelta)):pt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Jr(this.relativeTargetOrigin,this.target,p.target),pt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||yc(this.parent.latestValues)||kp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Re.timestamp&&(c=!1),c)return;const{layout:l,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||d))return;pt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;Pk(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Pe());const{target:g}=a;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(fm(this.prevProjectionDelta.x,this.projectionDelta.x),fm(this.prevProjectionDelta.y,this.projectionDelta.y)),Wr(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!km(this.projectionDelta.x,this.prevProjectionDelta.x)||!km(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=or(),this.projectionDelta=or(),this.projectionDeltaWithTransform=or()}setAnimationOrigin(a,s=!1){const c=this.snapshot,l=c?c.latestValues:{},d={...this.latestValues},f=or();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=Pe(),g=c?c.source:void 0,y=this.layout?this.layout.source:void 0,v=g!==y,b=this.getStack(),_=!b||b.members.length<=1,k=!!(v&&!_&&this.options.crossfade===!0&&!this.path.some(s1));this.animationProgress=0;let x;this.mixTargetDelta=C=>{const T=C/1e3;Pm(f.x,a.x,T),Pm(f.y,a.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jr(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),a1(this.relativeTarget,this.relativeTargetOrigin,p,T),x&&JS(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Pe()),pt(x,this.relativeTarget)),v&&(this.animationValues=d,FS(d,l,this.latestValues,T,k,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Yt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{mo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=er(0)),this.currentAnimation=LS(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(GS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:c,layout:l,latestValues:d}=a;if(!(!s||!c||!l)){if(this!==a&&this.layout&&l&&Dm(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Pe();const f=Ge(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const p=Ge(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+p}pt(s,c),ir(s,d),Wr(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new HS),this.sharedNodes.get(a).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(s=!0),!s)return;const l={};c.z&&Ac("z",a,l,this.animationValues);for(let d=0;d<Ec.length;d++)Ac(`rotate${Ec[d]}`,a,l,this.animationValues),Ac(`skew${Ec[d]}`,a,l,this.animationValues);a.render();for(const d in l)a.setStaticValue(d,l[d]),this.animationValues&&(this.animationValues[d]=l[d]);a.scheduleRender()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=fo(s?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=fo(s?.pointerEvents)||""),this.hasProjected&&!Pn(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=qS(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),a.transform=f;const{x:p,y:g}=this.projectionDelta;a.transformOrigin=`${p.origin*100}% ${g.origin*100}% 0`,l.animationValues?a.opacity=l===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=l===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const y in Br){if(d[y]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:_}=Br[y],k=f==="none"?d[y]:v(d[y],l);if(b){const x=b.length;for(let C=0;C<x;C++)a[b[C]]=k}else _?this.options.visualElement.renderState.vars[y]=k:a[y]=k}this.options.layoutId&&(a.pointerEvents=l===this?fo(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Tm),this.root.sharedNodes.clear()}}}function YS(e){e.updateLayout()}function XS(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?ht(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],p=Ge(f);f.min=n[d].min,f.max=f.min+p}):Dm(i,t.layoutBox,n)&&ht(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],p=Ge(n[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=or();Wr(a,n,t.layoutBox);const s=or();o?Wr(s,e.applyTransform(r,!0),t.measuredBox):Wr(s,n,t.layoutBox);const c=!vm(a);let l=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const g=Pe();Jr(g,t.layoutBox,f.layoutBox);const y=Pe();Jr(y,n,p.layoutBox),_m(g,y)||(l=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function QS(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ZS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function e1(e){e.clearSnapshot()}function Tm(e){e.clearMeasurements()}function Mm(e){e.isLayoutDirty=!1}function t1(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Cm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function n1(e){e.resolveTargetDelta()}function r1(e){e.calcProjection()}function i1(e){e.resetSkewAndRotation()}function o1(e){e.removeLeadSnapshot()}function Pm(e,t,n){e.translate=xe(t.translate,0,n),e.scale=xe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Em(e,t,n,r){e.min=xe(t.min,n.min,r),e.max=xe(t.max,n.max,r)}function a1(e,t,n,r){Em(e.x,t.x,n.x,r),Em(e.y,t.y,n.y,r)}function s1(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const c1={duration:.45,ease:[.4,0,.1,1]},Am=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Om=Am("applewebkit/")&&!Am("chrome/")?Math.round:dt;function Im(e){e.min=Om(e.min),e.max=Om(e.max)}function l1(e){Im(e.x),Im(e.y)}function Dm(e,t,n){return e==="position"||e==="preserve-aspect"&&!mS(wm(t),wm(n),.2)}function u1(e){return e!==e.root&&e.scroll?.wasRoot}const d1=xm({attachResizeListener:(e,t)=>$r(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Oc={current:void 0},Lm=xm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Oc.current){const e=new d1({});e.mount(window),e.setOptions({layoutScroll:!0}),Oc.current=e}return Oc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),f1={pan:{Feature:AS},drag:{Feature:ES,ProjectionNode:Lm,MeasureLayout:om}};function jm(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&ke.postRender(()=>o(t,Ur(t)))}class h1 extends Zt{mount(){const{current:t}=this.node;t&&(this.unmount=Bw(t,(n,r)=>(jm(this.node,r,"Start"),i=>jm(this.node,i,"End"))))}unmount(){}}class p1 extends Zt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ar($r(this.node.current,"focus",()=>this.onFocus()),$r(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Rm(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&ke.postRender(()=>o(t,Ur(t)))}class m1 extends Zt{mount(){const{current:t}=this.node;t&&(this.unmount=Ww(t,(n,r)=>(Rm(this.node,r,"Start"),(i,{success:o})=>Rm(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ic=new WeakMap,Dc=new WeakMap,g1=e=>{const t=Ic.get(e.target);t&&t(e)},v1=e=>{e.forEach(g1)};function y1({root:e,...t}){const n=e||document;Dc.has(n)||Dc.set(n,{});const r=Dc.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(v1,{root:e,...t})),r[i]}function b1(e,t,n){const r=y1(t);return Ic.set(e,n),r.observe(e),()=>{Ic.delete(e),r.unobserve(e)}}const _1={some:0,all:1};class w1 extends Zt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:_1[i]},s=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),p=l?d:f;p&&p(c)};return b1(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(k1(t,n))&&this.startObserver()}unmount(){}}function k1({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const S1={...lS,...{inView:{Feature:w1},tap:{Feature:m1},focus:{Feature:p1},hover:{Feature:h1}},...f1,...{layout:{ProjectionNode:Lm,MeasureLayout:om}}},go=Tk(S1,Nk);function x1(){const{agentData:e}=Sn(),[t,n]=ne(0),r=96,i=1e4,{isMobileDevice:o}=bs();Z(()=>{const s=Date.now(),c=()=>{const l=Date.now()-s,d=Math.min(l/i*100,r);n(d),d<r&&requestAnimationFrame(c)};requestAnimationFrame(c)},[]);const a=e?.image_url;return O("div",{className:"absolute inset-0 w-full h-full flex flex-col items-center justify-center",children:[O("div",{className:"absolute inset-0 w-full h-full bg-black"}),a&&O("div",{className:"absolute inset-0 w-full h-full bg-cover bg-center scale-125",style:{backgroundImage:`url(${a})`,filter:"blur(25px) brightness(0.5)"}}),O(go.div,{initial:{filter:"blur(12px)",opacity:0},animate:{filter:"blur(0px)",opacity:1},transition:{duration:.2,ease:"easeOut"},className:`absolute inset-0 w-full h-full flex flex-col items-center justify-center ${o?"pb-6 px-4":"pb-4 px-8 "}`,children:O("div",{className:"flex flex-col items-center text-white",children:[O("h2",{className:"text-lg font-medium mb-2 text-center",children:"You're about to speak with an AI."}),O("div",{className:"w-25 h-3 bg-white/30 rounded-full overflow-hidden mb-6",children:O("div",{className:"h-full bg-white rounded-full transition-all duration-100 ease-linear",style:{width:`${t}%`}})}),O("div",{className:"flex justify-center",children:O("span",{className:"font-light text-xs text-center text-white",children:["This call may be recorded and shared with our service providers."," ",O("a",{href:"https://lemonslice.com",target:"_blank",rel:"noopener noreferrer",className:"underline decoration-white/50 hover:text-white transition-colors",children:"Learn more"})]})})]})})]})}const T1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),M1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Vm=e=>{const t=M1(e);return t.charAt(0).toUpperCase()+t.slice(1)},Nm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),C1=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var P1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const E1=et(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},c)=>ae("svg",{ref:c,...P1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Nm("lucide",i),...!o&&!C1(s)&&{"aria-hidden":"true"},...s},[...a.map(([l,d])=>ae(l,d)),...Array.isArray(o)?o:[o]]));const qr=(e,t)=>{const n=et(({className:r,...i},o)=>ae(E1,{ref:o,iconNode:t,className:Nm(`lucide-${T1(Vm(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Vm(e),n};const A1=qr("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const O1=qr("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const I1=qr("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const D1=qr("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]);const L1=qr("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);function vo({msg:e,isError:t=!1,isFullWidth:n=!0,showSpinner:r=!1,onClick:i=null}){return O("div",{className:"absolute top-2 left-2 flex items-center justify-between z-10 text-white/75",children:O("div",{className:`backdrop-blur-sm rounded-2xl py-2.5 px-4 flex-1 shadow-inset-white-10 flex items-center gap-2
38
38
  ${n?"right-15":""}
39
39
  ${t?"bg-red-600/25":"bg-gray-40/25"}
40
- ${i?"cursor-pointer":""}`,onClick:i||void 0,children:[r&&O(O1,{className:"animate-spin",size:16}),O("p",{className:"text-sm font-medium",children:e||"An error occurred. Please try again."})]})})}function L1(){const{agentData:e}=_n(),{errorMsg:t,resetErrors:n}=Zi(),{resetDailyState:r}=Rt(),i=e?.image_url,a=()=>{r(),n()};return O("div",{className:"fixed inset-0 w-full h-full flex flex-col items-center justify-center",children:[O("div",{className:"absolute w-full h-full bg-black"}),i&&O("div",{className:"absolute w-full h-full bg-cover bg-center",style:{backgroundImage:`url(${i})`,filter:"blur(25px) brightness(0.5)"}}),O(ga,{msg:t,isError:!0}),O("button",{onClick:a,className:"absolute flex items-center justify-center","aria-label":"Play video",children:O("span",{className:"opacity-100 hover:opacity-80 transition-opacity cursor-pointer",children:O(D1,{size:40,fill:"white",color:"none"})})})]})}const Nm=Ie(void 0);function j1({children:e}){const[t,n]=Z(""),[r,i]=Z(""),{hasJoinedRoom:a}=Rt(),{hasUserInteracted:o}=Pr(),s=gs(),c=yn({filter:"remote"}),l=de(!1),d="hello",f=()=>{l.current=!1};return X(()=>{if(c.length>0&&a&&o&&!l.current){l.current=!0;let g;r?(n(r),g=r):g=d,s({event:"chat-msg",message:g,name:"Guest"},"*"),i("")}},[r,a,c,o,l]),O(Nm.Provider,{value:{lastMessage:t,setLastMessage:n,queuedMessage:r,setQueuedMessage:i,resetInitMsg:f},children:e})}function Fm(){const e=ge(Nm);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e}function R1({title:e,titleId:t,...n},r){return ae("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ae("title",{id:t},e):null,ae("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),ae("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const V1=Qe(R1);function N1({title:e,titleId:t,...n},r){return ae("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ae("title",{id:t},e):null,ae("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM12.95 3.05a.75.75 0 1 0-1.06 1.06 5.5 5.5 0 0 1 0 7.78.75.75 0 1 0 1.06 1.06 7 7 0 0 0 0-9.9Z"}),ae("path",{d:"M10.828 5.172a.75.75 0 1 0-1.06 1.06 2.5 2.5 0 0 1 0 3.536.75.75 0 1 0 1.06 1.06 4 4 0 0 0 0-5.656Z"}))}const F1=Qe(N1);function B1({title:e,titleId:t,...n},r){return ae("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ae("title",{id:t},e):null,ae("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM11.28 5.72a.75.75 0 1 0-1.06 1.06L11.44 8l-1.22 1.22a.75.75 0 1 0 1.06 1.06l1.22-1.22 1.22 1.22a.75.75 0 1 0 1.06-1.06L13.56 8l1.22-1.22a.75.75 0 0 0-1.06-1.06L12.5 6.94l-1.22-1.22Z"}))}const $1=Qe(B1);function U1({title:e,titleId:t,...n},r){return ae("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ae("title",{id:t},e):null,ae("path",{d:"M3 4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H3ZM15 4.75a.75.75 0 0 0-1.28-.53l-2 2a.75.75 0 0 0-.22.53v2.5c0 .199.079.39.22.53l2 2a.75.75 0 0 0 1.28-.53v-6.5Z"}))}const Bm=Qe(U1);function z1({title:e,titleId:t,...n},r){return ae("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ae("title",{id:t},e):null,ae("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"}))}const $m=Qe(z1),W1=Qe(function({title:t,titleId:n,...r},i){return O("svg",{ref:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-labelledby":n,...r,children:[t?O("title",{id:n,children:t}):null,O("path",{d:"M3.33157 2.40868C3.66659 2.09013 4.19642 2.10349 4.51497 2.43851L17.0321 15.6032C17.3507 15.9382 17.3373 16.4681 17.0023 16.7866C16.6673 17.1051 16.1374 17.0918 15.8189 16.7568L3.30173 3.59208C2.98318 3.25705 2.99654 2.72722 3.33157 2.40868Z",fill:"currentColor"}),O("path",{d:"M4.6877 7.8125C5.20547 7.8125 5.6252 8.23223 5.6252 8.75C5.6252 11.1662 7.58395 13.125 10.0002 13.125C10.7088 13.125 11.3769 12.9543 11.9689 12.6553L13.301 14.0566C12.5948 14.4968 11.7951 14.8007 10.9377 14.9297V16.875H12.8127C13.3305 16.875 13.7502 17.2947 13.7502 17.8125C13.7502 18.3303 13.3305 18.75 12.8127 18.75H7.1877C6.66993 18.75 6.2502 18.3303 6.2502 17.8125C6.2502 17.2947 6.66993 16.875 7.1877 16.875H9.0627V14.9297C6.05569 14.4773 3.7502 11.8831 3.7502 8.75C3.7502 8.23223 4.16993 7.8125 4.6877 7.8125Z",fill:"currentColor"}),O("path",{d:"M15.3127 7.8125C15.8305 7.8125 16.2502 8.23223 16.2502 8.75C16.2502 9.94681 15.9127 11.0644 15.3293 12.0146L13.9709 10.5859C14.2295 10.0275 14.3752 9.4059 14.3752 8.75C14.3752 8.23223 14.7949 7.8125 15.3127 7.8125Z",fill:"currentColor"}),O("path",{d:"M10.5676 11.1826C10.3851 11.225 10.1956 11.25 10.0002 11.25C8.61949 11.25 7.5002 10.1307 7.5002 8.75V7.95508L10.5676 11.1826Z",fill:"currentColor"}),O("path",{d:"M10.0002 1.25C11.3809 1.25 12.5002 2.36929 12.5002 3.75V8.75C12.5002 8.8421 12.4943 8.93294 12.4846 9.02246L7.5002 3.78027V3.75C7.5002 2.36929 8.61949 1.25 10.0002 1.25Z",fill:"currentColor"})]})}),J1=5e3,Um="/imagine";function q1({onClose:e,onSetMessageRef:t,onFocusRef:n}){const[r,i]=Z(0),{lastMessage:a,setLastMessage:o,setQueuedMessage:s}=Fm(),{isMicMuted:c,setIsMicMuted:l,isAudioMuted:d,setIsAudioMuted:f}=vs(),{setHasUserInteracted:p}=Pr(),{hasJoinedRoom:g,isAgentVideoReady:y,setIsImageChangeRequested:v}=Rt(),{agentData:b}=_n(),_=gs(),k=yn({filter:"remote"}),[T,M]=Z(""),[x,C]=Z(40),[A,E]=Z(!1),R=de(null),F=de(null),[j]=Z(!1),[z,V]=Z(!1),[ee,ie]=Z(!1),{isMobileDevice:me}=ys(),K=b?.allow_image_edits||!1;X(()=>{t&&t(M),n&&n(()=>{R.current?.focus()})},[t,n]),X(()=>{if(!a){E(!1);return}return k.length>0&&y&&(E(!0),ie(!1)),F.current!==null&&clearTimeout(F.current),F.current=window.setTimeout(()=>{ie(!0),F.current=null},J1),()=>{F.current!==null&&(clearTimeout(F.current),F.current=null)}},[r,a,k,y]),X(()=>{if(R.current&&T){R.current.style.height="auto";const u=R.current.scrollHeight,m=Math.min(u,128);R.current.style.height=`${u}px`,C(m)}else R.current&&!T&&(R.current.style.height="40px",C(40))},[T]);const B=()=>{if(p(!0),T.trim()){const u=T.trim();M(""),g&&k.length>0?(_({event:"chat-msg",message:u,name:"Guest"},"*"),K&&u.toLowerCase().startsWith(Um)?v(!0):(o(u),i(m=>m+1))):u.toLowerCase().startsWith(Um)||s(u)}else M("")},W=u=>{const m=u.target;M(m.value)},G=u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),B())},Ge=async()=>{p(!0),l(!c)},ht=()=>{f(!d)};return O(Ke,{children:[A&&O("div",{className:"absolute left-2 right-2 flex justify-center z-10",style:{bottom:`${x+24}px`},children:O("div",{onAnimationEnd:()=>{ee&&(E(!1),ie(!1),o(""))},style:{animation:ee?"fadeOutUp 0.2s ease-out forwards":"fadeInUp 0.2s ease-out forwards"},className:"mx-auto bg-black/20 backdrop-blur-xl text-white rounded-2xl px-3 py-2 text-sm text-center max-w-[90%] overflow-hidden",children:O("div",{className:"line-clamp-4",children:a})},r)}),O("div",{className:"absolute bottom-0 left-0 right-0 p-2 flex items-end gap-1 pt-4",children:[O("div",{class:"absolute w-full h-full left-0 right-0 pointer-events-none bottom-0 z-0",children:[O("div",{class:"absolute inset-0 backdrop-blur-[1px] mask-[linear-gradient(rgba(0,0,0,0),rgba(0,0,0,1)_10%,rgba(0,0,0,1)_30%,rgba(0,0,0,0)_40%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[2px] mask-[linear-gradient(rgba(0,0,0,0)_10%,rgba(0,0,0,1)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,0)_50%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[4px] mask-[linear-gradient(rgba(0,0,0,0)_15%,rgba(0,0,0,1)_30%,rgba(0,0,0,1)_50%,rgba(0,0,0,0)_60%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[8px] mask-[linear-gradient(rgba(0,0,0,0)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,0)_70%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[16px] mask-[linear-gradient(rgba(0,0,0,0)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,1)_80%,rgba(0,0,0,0)_90%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[32px] mask-[linear-gradient(rgba(0,0,0,0)_60%,rgba(0,0,0,1)_80%)]"}),O("div",{class:"absolute inset-0 z-10 backdrop-blur-[64px] mask-[linear-gradient(rgba(0,0,0,0)_70%,rgba(0,0,0,1)_100%)]"}),O("div",{class:"absolute inset-0 bg-[linear-gradient(transparent,#000000)]"})]}),O(ma.div,{className:`flex items-center w-full z-10 ${me?"justify-between":""}`,children:[!me&&O(ma.div,{layout:!0,className:"flex-1",children:O("div",{className:`
40
+ ${i?"cursor-pointer":""}`,onClick:i||void 0,children:[r&&O(I1,{className:"animate-spin",size:16}),O("p",{className:"text-sm font-medium",children:e||"An error occurred. Please try again."})]})})}function j1(){const{agentData:e}=Sn(),{errorMsg:t,resetErrors:n}=Zi(),{resetDailyState:r}=Ft(),i=e?.image_url,o=()=>{r(),n()};return O("div",{className:"fixed inset-0 w-full h-full flex flex-col items-center justify-center",children:[O("div",{className:"absolute w-full h-full bg-black"}),i&&O("div",{className:"absolute w-full h-full bg-cover bg-center",style:{backgroundImage:`url(${i})`,filter:"blur(25px) brightness(0.5)"}}),O(vo,{msg:t,isError:!0}),O("button",{onClick:o,className:"absolute flex items-center justify-center","aria-label":"Play video",children:O("span",{className:"opacity-100 hover:opacity-80 transition-opacity cursor-pointer",children:O(L1,{size:40,fill:"white",color:"none"})})})]})}const Fm=De(void 0);function R1({children:e}){const[t,n]=ne(""),[r,i]=ne(""),{hasJoinedRoom:o}=Ft(),{hasUserInteracted:a}=Er(),s=vs(),c=wn({filter:"remote"}),l=fe(!1),d="hello",f=()=>{l.current=!1};return Z(()=>{if(c.length>0&&o&&a&&!l.current){l.current=!0;let g;r?(n(r),g=r):g=d,s({event:"chat-msg",message:g,name:"Guest"},"*"),i("")}},[r,o,c,a,l]),O(Fm.Provider,{value:{lastMessage:t,setLastMessage:n,queuedMessage:r,setQueuedMessage:i,resetInitMsg:f},children:e})}function Bm(){const e=ge(Fm);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e}function V1({title:e,titleId:t,...n},r){return ae("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ae("title",{id:t},e):null,ae("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),ae("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const N1=et(V1);function F1({title:e,titleId:t,...n},r){return ae("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ae("title",{id:t},e):null,ae("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM12.95 3.05a.75.75 0 1 0-1.06 1.06 5.5 5.5 0 0 1 0 7.78.75.75 0 1 0 1.06 1.06 7 7 0 0 0 0-9.9Z"}),ae("path",{d:"M10.828 5.172a.75.75 0 1 0-1.06 1.06 2.5 2.5 0 0 1 0 3.536.75.75 0 1 0 1.06 1.06 4 4 0 0 0 0-5.656Z"}))}const B1=et(F1);function $1({title:e,titleId:t,...n},r){return ae("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ae("title",{id:t},e):null,ae("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM11.28 5.72a.75.75 0 1 0-1.06 1.06L11.44 8l-1.22 1.22a.75.75 0 1 0 1.06 1.06l1.22-1.22 1.22 1.22a.75.75 0 1 0 1.06-1.06L13.56 8l1.22-1.22a.75.75 0 0 0-1.06-1.06L12.5 6.94l-1.22-1.22Z"}))}const U1=et($1);function z1({title:e,titleId:t,...n},r){return ae("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ae("title",{id:t},e):null,ae("path",{d:"M3 4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H3ZM15 4.75a.75.75 0 0 0-1.28-.53l-2 2a.75.75 0 0 0-.22.53v2.5c0 .199.079.39.22.53l2 2a.75.75 0 0 0 1.28-.53v-6.5Z"}))}const $m=et(z1);function W1({title:e,titleId:t,...n},r){return ae("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ae("title",{id:t},e):null,ae("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"}))}const Um=et(W1),J1=et(function({title:t,titleId:n,...r},i){return O("svg",{ref:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-labelledby":n,...r,children:[t?O("title",{id:n,children:t}):null,O("path",{d:"M3.33157 2.40868C3.66659 2.09013 4.19642 2.10349 4.51497 2.43851L17.0321 15.6032C17.3507 15.9382 17.3373 16.4681 17.0023 16.7866C16.6673 17.1051 16.1374 17.0918 15.8189 16.7568L3.30173 3.59208C2.98318 3.25705 2.99654 2.72722 3.33157 2.40868Z",fill:"currentColor"}),O("path",{d:"M4.6877 7.8125C5.20547 7.8125 5.6252 8.23223 5.6252 8.75C5.6252 11.1662 7.58395 13.125 10.0002 13.125C10.7088 13.125 11.3769 12.9543 11.9689 12.6553L13.301 14.0566C12.5948 14.4968 11.7951 14.8007 10.9377 14.9297V16.875H12.8127C13.3305 16.875 13.7502 17.2947 13.7502 17.8125C13.7502 18.3303 13.3305 18.75 12.8127 18.75H7.1877C6.66993 18.75 6.2502 18.3303 6.2502 17.8125C6.2502 17.2947 6.66993 16.875 7.1877 16.875H9.0627V14.9297C6.05569 14.4773 3.7502 11.8831 3.7502 8.75C3.7502 8.23223 4.16993 7.8125 4.6877 7.8125Z",fill:"currentColor"}),O("path",{d:"M15.3127 7.8125C15.8305 7.8125 16.2502 8.23223 16.2502 8.75C16.2502 9.94681 15.9127 11.0644 15.3293 12.0146L13.9709 10.5859C14.2295 10.0275 14.3752 9.4059 14.3752 8.75C14.3752 8.23223 14.7949 7.8125 15.3127 7.8125Z",fill:"currentColor"}),O("path",{d:"M10.5676 11.1826C10.3851 11.225 10.1956 11.25 10.0002 11.25C8.61949 11.25 7.5002 10.1307 7.5002 8.75V7.95508L10.5676 11.1826Z",fill:"currentColor"}),O("path",{d:"M10.0002 1.25C11.3809 1.25 12.5002 2.36929 12.5002 3.75V8.75C12.5002 8.8421 12.4943 8.93294 12.4846 9.02246L7.5002 3.78027V3.75C7.5002 2.36929 8.61949 1.25 10.0002 1.25Z",fill:"currentColor"})]})}),H1=5e3,zm="/imagine";function q1({onClose:e,onSetMessageRef:t,onFocusRef:n}){const[r,i]=ne(0),{lastMessage:o,setLastMessage:a,setQueuedMessage:s}=Bm(),{isMicMuted:c,setIsMicMuted:l,isAudioMuted:d,setIsAudioMuted:f}=ys(),{setHasUserInteracted:p}=Er(),{hasJoinedRoom:g,isAgentVideoReady:y,setIsImageChangeRequested:v}=Ft(),{agentData:b}=Sn(),_=vs(),k=wn({filter:"remote"}),[x,C]=ne(""),[T,M]=ne(40),[A,E]=ne(!1),j=fe(null),B=fe(null),[V]=ne(!1),[H,F]=ne(!1),[X,K]=ne(!1),{isMobileDevice:se}=bs(),G=b?.allow_image_edits||!1;Z(()=>{t&&t(C),n&&n(()=>{j.current?.focus()})},[t,n]),Z(()=>{if(!o){E(!1);return}return k.length>0&&y&&(E(!0),K(!1)),B.current!==null&&clearTimeout(B.current),B.current=window.setTimeout(()=>{K(!0),B.current=null},H1),()=>{B.current!==null&&(clearTimeout(B.current),B.current=null)}},[r,o,k,y]),Z(()=>{if(j.current&&x){j.current.style.height="auto";const u=j.current.scrollHeight,m=Math.min(u,128);j.current.style.height=`${u}px`,M(m)}else j.current&&!x&&(j.current.style.height="40px",M(40))},[x]);const N=()=>{if(p(!0),x.trim()){const u=x.trim();C(""),g&&k.length>0?(_({event:"chat-msg",message:u,name:"Guest"},"*"),G&&u.toLowerCase().startsWith(zm)?v(!0):(a(u),i(m=>m+1))):u.toLowerCase().startsWith(zm)||s(u)}else C("")},J=u=>{const m=u.target;C(m.value)},z=u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),N())},We=async()=>{p(!0),l(!c)},at=()=>{f(!d)};return O(Ke,{children:[A&&O("div",{className:"absolute left-2 right-2 flex justify-center z-10",style:{bottom:`${T+24}px`},children:O("div",{onAnimationEnd:()=>{X&&(E(!1),K(!1),a(""))},style:{animation:X?"fadeOutUp 0.2s ease-out forwards":"fadeInUp 0.2s ease-out forwards"},className:"mx-auto bg-black/20 backdrop-blur-xl text-white rounded-2xl px-3 py-2 text-sm text-center max-w-[90%] overflow-hidden",children:O("div",{className:"line-clamp-4",children:o})},r)}),O("div",{className:"absolute bottom-0 left-0 right-0 p-2 flex items-end gap-1 pt-4",children:[O("div",{class:"absolute w-full h-full left-0 right-0 pointer-events-none bottom-0 z-0",children:[O("div",{class:"absolute inset-0 backdrop-blur-[1px] mask-[linear-gradient(rgba(0,0,0,0),rgba(0,0,0,1)_10%,rgba(0,0,0,1)_30%,rgba(0,0,0,0)_40%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[2px] mask-[linear-gradient(rgba(0,0,0,0)_10%,rgba(0,0,0,1)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,0)_50%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[4px] mask-[linear-gradient(rgba(0,0,0,0)_15%,rgba(0,0,0,1)_30%,rgba(0,0,0,1)_50%,rgba(0,0,0,0)_60%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[8px] mask-[linear-gradient(rgba(0,0,0,0)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,0)_70%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[16px] mask-[linear-gradient(rgba(0,0,0,0)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,1)_80%,rgba(0,0,0,0)_90%)]"}),O("div",{class:"absolute inset-0 backdrop-blur-[32px] mask-[linear-gradient(rgba(0,0,0,0)_60%,rgba(0,0,0,1)_80%)]"}),O("div",{class:"absolute inset-0 z-10 backdrop-blur-[64px] mask-[linear-gradient(rgba(0,0,0,0)_70%,rgba(0,0,0,1)_100%)]"}),O("div",{class:"absolute inset-0 bg-[linear-gradient(transparent,#000000)]"})]}),O(go.div,{className:`flex items-center w-full z-10 ${se?"justify-between":""}`,children:[!se&&O(go.div,{layout:!0,className:"flex-1",children:O("div",{className:`
41
41
  relative flex gap-0 items-center w-full bg-white/10 hover:bg-white/15 transition-colors duration-150
42
42
  rounded-[22px] shadow-lg shadow-inset-white-10 min-h-11
43
- ${z?"shadow-focused":"shadow-inset-white-10"}
44
- `,children:[O("textarea",{ref:R,value:T,onChange:W,onKeyDown:G,onInput:W,placeholder:"Message",rows:1,onFocus:()=>{V(!0)},onBlur:()=>{V(!1)},className:`
43
+ ${H?"shadow-focused":"shadow-inset-white-10"}
44
+ `,children:[O("textarea",{ref:j,value:x,onChange:J,onKeyDown:z,onInput:J,placeholder:"Message",rows:1,onFocus:()=>{F(!0)},onBlur:()=>{F(!1)},className:`
45
45
  relative w-full flex-1 resize-none border-none outline-none pl-4 py-2 text leading-[1.4] max-h-36 overflow-y-auto text-white placeholder:text-white/70
46
46
  [scrollbar-width:none] [&::-webkit-scrollbar]:hidden
47
47
  transition-opacity duration-150
48
- ${j?"placeholder:opacity-0":"placeholder:opacity-70"}
49
- ${T.trim()?"pr-14":""}
48
+ ${V?"placeholder:opacity-0":"placeholder:opacity-70"}
49
+ ${x.trim()?"pr-14":""}
50
50
  `}),O("div",{className:`
51
51
  absolute right-0 bottom-0 top-0 transition-all duration-150 flex items-end p-2
52
- ${T.trim()?"opacity-100 blur-0 scale-100 pointer-events-auto":"opacity-0 blur-sm scale-95 pointer-events-none"}
53
- `,children:O("button",{onClick:B,className:"py-1 px-3 rounded-3xl bg-white hover:bg-white/80 cursor-pointer transition-colors h-[28px]]","aria-label":"Send message",children:O(E1,{strokeWidth:2,size:20,color:"black"})})})]})}),O(ma.div,{layout:!0,animate:{opacity:T.trim()?0:1,scale:T.trim()?.2:1,width:T.trim()?0:"auto",filter:T.trim()?"blur(20px)":"blur(0px)"},transition:{layout:{duration:.25,ease:"easeOut"},opacity:{duration:.25},width:{duration:.25,ease:"easeOut"},scale:{duration:.25,ease:"easeOut"},filter:{duration:.25}},className:`flex items-center gap-1 flex-none ${me?"":"pl-1"}
54
- `,children:[O("button",{onClick:Ge,className:"w-11 h-11 flex-none rounded-full flex items-center justify-center bg-white/10 hover:bg-white/15 backdrop-blur-xl cursor-pointer transition-colors duration-150 shadow-inset-white-10",children:c?O(W1,{className:"size-5 text-white"}):O(V1,{className:"size-5 text-white"})}),O("button",{onClick:ht,className:"w-11 h-11 flex-none rounded-full flex items-center justify-center bg-white/10 hover:bg-white/15 backdrop-blur-xl cursor-pointer transition-colors duration-150 shadow-inset-white-10",children:d?O($1,{className:"size-5 text-white"}):O(F1,{className:"size-5 text-white"})})]}),me&&e&&O("button",{onClick:e,className:"w-11 h-11 flex-none rounded-full flex items-center justify-center bg-white/10 hover:bg-white/15 backdrop-blur-xl cursor-pointer transition-colors duration-150 shadow-inset-white-10","aria-label":"Close",children:O($m,{className:"size-6 text-white"})})]})]})]})}const H1=15e3;function G1(){const{setWidgetState:e,widgetState:t,isAgentVideoReady:n,showMinimizeButton:r,isImageChangeRequested:i}=Rt(),{agentData:a}=_n(),{isAudioMuted:o,setIsAudioMuted:s,setIsMicMuted:c}=vs(),{hasUserInteracted:l}=Pr(),{errorMsg:d,setErrorMsg:f,nonFatalErrorMsg:p}=Zi(),{resetDailyState:g}=Rt(),y=yn({filter:"remote"}),v=de(null),[b,_]=Z(!1),[k,T]=Z(!1),M=de(null),{isMobileDevice:x}=ys(),[C,A]=Z(!1),E=de(null),[R,F]=Z(!1),j=de(null),z=de(null),V=de(null),ee=a?.first_video_url,ie=a?.allow_image_edits||!1;X(()=>{const P=t===Oe,D=P?x?200:252:x?120:144,L=P?x?300:377:x?180:216,$=document.querySelector("lemon-slice-widget");$&&$.dispatchEvent(new CustomEvent("widget-size-change",{detail:{width:D,height:L,isExpanded:P,isMobile:x,state:t},bubbles:!0,composed:!0}))},[t,x]),X(()=>{(t===ct||t===Oe)&&v.current&&(v.current.currentTime=0,v.current.play().catch(P=>{console.error("Error restarting video:",P)}))},[t]),X(()=>(y.length>0&&n?(M.current!==null&&clearTimeout(M.current),M.current=window.setTimeout(()=>{T(!0),M.current=null},300)):(T(!1),M.current!==null&&(clearTimeout(M.current),M.current=null)),()=>{M.current!==null&&(clearTimeout(M.current),M.current=null)}),[y.length,n]),X(()=>(y.length>0&&n&&ie?(F(!0),j.current!==null&&clearTimeout(j.current),j.current=window.setTimeout(()=>{F(!1),j.current=null},H1)):(F(!1),j.current!==null&&(clearTimeout(j.current),j.current=null)),()=>{j.current!==null&&(clearTimeout(j.current),j.current=null)}),[y.length,n,ie]);const me=()=>{e(ct),s(!0),c(!0),d&&(f(""),g()),A(!0),E.current!==null&&clearTimeout(E.current),E.current=window.setTimeout(()=>{A(!1),E.current=null},3e3)},K=()=>{e(Ht)},B=()=>{e(Oe),s(!1),d&&(f(""),g())},W=y.length>0&&n,G=t===Oe&&(!l||W||t===Oe&&!W&&l&&!d)&&!d;return O("div",{onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),className:`relative mb-1 rounded-3xl shadow-4xl overflow-hidden transition-all bg-black
55
- ${t===Ht?"duration-300 ease-in":"duration-300 ease-out"}
56
- ${t===Oe?x?"w-[200px] h-[300px]":"w-[252px] h-[377px]":x?"w-[120px] h-[180px]":"w-[144px] h-[216px]"}`,style:t===Ht?{transform:"translateX(100%) scale(0.8, 0.5)",filter:"blur(12px)",opacity:0,pointerEvents:"none"}:{transform:"translateX(0) scale(1)",filter:"blur(0px)",opacity:1},children:[t===Oe&&!(x&&G)&&O("button",{onClick:me,className:`absolute top-2 right-2 p-2 rounded-full flex items-center justify-center
52
+ ${x.trim()?"opacity-100 blur-0 scale-100 pointer-events-auto":"opacity-0 blur-sm scale-95 pointer-events-none"}
53
+ `,children:O("button",{onClick:N,className:"py-1 px-3 rounded-3xl bg-white hover:bg-white/80 cursor-pointer transition-colors h-[28px]]","aria-label":"Send message",children:O(A1,{strokeWidth:2,size:20,color:"black"})})})]})}),O(go.div,{layout:!0,animate:{opacity:x.trim()?0:1,scale:x.trim()?.2:1,width:x.trim()?0:"auto",filter:x.trim()?"blur(20px)":"blur(0px)"},transition:{layout:{duration:.25,ease:"easeOut"},opacity:{duration:.25},width:{duration:.25,ease:"easeOut"},scale:{duration:.25,ease:"easeOut"},filter:{duration:.25}},className:`flex items-center gap-1 flex-none ${se?"":"pl-1"}
54
+ `,children:[O("button",{onClick:We,className:"w-11 h-11 flex-none rounded-full flex items-center justify-center bg-white/10 hover:bg-white/15 backdrop-blur-xl cursor-pointer transition-colors duration-150 shadow-inset-white-10",children:c?O(J1,{className:"size-5 text-white"}):O(N1,{className:"size-5 text-white"})}),O("button",{onClick:at,className:"w-11 h-11 flex-none rounded-full flex items-center justify-center bg-white/10 hover:bg-white/15 backdrop-blur-xl cursor-pointer transition-colors duration-150 shadow-inset-white-10",children:d?O(U1,{className:"size-5 text-white"}):O(B1,{className:"size-5 text-white"})})]}),se&&e&&O("button",{onClick:e,className:"w-11 h-11 flex-none rounded-full flex items-center justify-center bg-white/10 hover:bg-white/15 backdrop-blur-xl cursor-pointer transition-colors duration-150 shadow-inset-white-10","aria-label":"Close",children:O(Um,{className:"size-6 text-white"})})]})]})]})}const G1=15e3;function K1(){const{setWidgetState:e,widgetState:t,isAgentVideoReady:n,showMinimizeButton:r,isImageChangeRequested:i,customActiveWidth:o,customActiveHeight:a,customMinimizedWidth:s,customMinimizedHeight:c}=Ft(),{agentData:l}=Sn(),{isAudioMuted:d,setIsAudioMuted:f,setIsMicMuted:p}=ys(),{hasUserInteracted:g}=Er(),{errorMsg:y,setErrorMsg:v,nonFatalErrorMsg:b}=Zi(),{resetDailyState:_}=Ft(),k=wn({filter:"remote"}),x=fe(null),[C,T]=ne(!1),[M,A]=ne(!1),E=fe(null),{isMobileDevice:j}=bs(),[B,V]=ne(!1),H=fe(null),[F,X]=ne(!1),K=fe(null),se=fe(null),G=fe(null),N=l?.first_video_url,J=l?.allow_image_edits||!1;Z(()=>{const U=t===Te,re=U?j?200:252:j?120:144,mt=U?j?300:377:j?180:216,Ot=U?o:s,en=U?a:c,Ae=Ot!==null?Ot:re,Qe=en!==null?en:mt,It=document.querySelector("lemon-slice-widget");It&&It.dispatchEvent(new CustomEvent("widget-size-change",{detail:{width:Ae,height:Qe,isExpanded:U,isMobile:j,state:t},bubbles:!0,composed:!0}))},[t,j,o,a,s,c]),Z(()=>{(t===Ye||t===Te)&&x.current&&(x.current.currentTime=0,x.current.play().catch(U=>{console.error("Error restarting video:",U)}))},[t]),Z(()=>{if(t!==Te||!g||!x.current||!d)return;const U=x.current,re=()=>{f(!1),U.removeEventListener("playing",re)};if(!U.paused&&!U.ended){f(!1);return}return U.addEventListener("playing",re),()=>{U.removeEventListener("playing",re)}},[t,g,d,f]),Z(()=>(k.length>0&&n?(E.current!==null&&clearTimeout(E.current),E.current=window.setTimeout(()=>{A(!0),E.current=null},300)):(A(!1),E.current!==null&&(clearTimeout(E.current),E.current=null)),()=>{E.current!==null&&(clearTimeout(E.current),E.current=null)}),[k.length,n]),Z(()=>(k.length>0&&n&&J?(X(!0),K.current!==null&&clearTimeout(K.current),K.current=window.setTimeout(()=>{X(!1),K.current=null},G1)):(X(!1),K.current!==null&&(clearTimeout(K.current),K.current=null)),()=>{K.current!==null&&(clearTimeout(K.current),K.current=null)}),[k.length,n,J]);const z=()=>{e(Ye),f(!0),p(!0),y&&(v(""),_()),V(!0),H.current!==null&&clearTimeout(H.current),H.current=window.setTimeout(()=>{V(!1),H.current=null},3e3)},We=()=>{e(Pt)},at=()=>{e(Te),f(!1),y&&(v(""),_())},u=k.length>0&&n,m=t===Te&&(!g||u||t===Te&&!u&&g&&!y)&&!y,h=t===Ye||t===Pt||!g&&!y,w=t===Te&&!M&&g&&!y,S=t===Te&&M&&g&&!y,P=t===Te&&y,D=t===Te&&g&&b,L=t===Te&&M&&F&&J&&!i&&!y&&!b,$=t===Te&&u&&i&&!b&&!y;return O("div",{onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),className:`relative mb-1 rounded-3xl shadow-4xl overflow-hidden transition-all bg-black
55
+ ${t===Pt?"duration-300 ease-in":"duration-300 ease-out"}
56
+ ${t===Te?`${o===null?j?"w-[200px]":"w-[252px]":""} ${a===null?j?"h-[300px]":"h-[377px]":""}`:`${s===null?j?"w-[120px]":"w-[144px]":""} ${c===null?j?"h-[180px]":"h-[216px]":""}`}`,style:{...t===Pt?{transform:"translateX(100%) scale(0.8, 0.5)",filter:"blur(12px)",opacity:0,pointerEvents:"none"}:{transform:"translateX(0) scale(1)",filter:"blur(0px)",opacity:1},...t===Te&&o!==null&&{width:`${o}px`},...t===Te&&a!==null&&{height:`${a}px`},...(t===Ye||t===Pt)&&s!==null&&{width:`${s}px`},...(t===Ye||t===Pt)&&c!==null&&{height:`${c}px`}},children:[t===Te&&!(j&&m)&&O("button",{onClick:z,className:`absolute top-2 right-2 p-2 rounded-full flex items-center justify-center
57
57
  bg-gray-40/30 hover:bg-gray-40/40 backdrop-blur-xl cursor-pointer z-10 transition-colors
58
- h-11 w-11 shadow-inset-white-10`,"aria-label":"Close",children:O($m,{className:"size-6 text-white"})}),t===ct&&r&&O("button",{onClick:K,className:`
59
- ${x?"h-10 w-10":"h-11 w-11"}
58
+ h-11 w-11 shadow-inset-white-10`,"aria-label":"Close",children:O(Um,{className:"size-6 text-white"})}),t===Ye&&r&&O("button",{onClick:We,className:`
59
+ ${j?"h-10 w-10":"h-11 w-11"}
60
60
  absolute cursor-pointer top-2 right-2 z-10 bg-gray-40/30 hover:bg-gray-40/40 backdrop-blur-xl transition-colors shadow-inset-white-10 transition-opacity duration-200 rounded-full flex items-center
61
61
  justify-center
62
- ${x||b||C?"opacity-100":"opacity-0"}
63
- `,"aria-label":"Minimize",children:O(I1,{strokeWidth:2,size:20,color:"white"})}),O("div",{className:"absolute inset-0 w-full h-full",children:[(t===ct||t===Ht||!l&&!d)&&O("video",{ref:v,src:ee,className:"absolute inset-0 w-full h-full object-cover",playsInline:!0,autoPlay:!0,muted:t!==Oe||o,loop:!0}),t===Oe&&!k&&l&&!d&&O(S1,{}),t===Oe&&k&&l&&!d&&O(G0,{}),t===Oe&&d&&O(L1,{}),t===Oe&&l&&p&&O(ga,{msg:p,isError:!0}),t===Oe&&W&&i&&!p&&!d&&O(ga,{msg:"Imagining",showSpinner:!0}),t===Oe&&k&&R&&ie&&!i&&!d&&!p&&O(ga,{msg:"✨ Try /imagine",isFullWidth:!1,onClick:()=>{z.current?.("/imagine "),V.current?.()}})]}),t===ct&&O("button",{onClick:B,className:"absolute inset-0 cursor-pointer",children:[O("div",{className:"hidden sm:flex absolute inset-3 items-end justify-center",children:O("div",{className:`flex items-center gap-2 px-4 h-10
64
- bg-gray-40/30 backdrop-blur-xl
65
- rounded-full transition-opacity hover:bg-gray-40/40 shadow-inset-white-10`,children:[O(Bm,{className:"size-5 text-white"}),O("p",{className:"text-sm text-white whitespace-nowrap font-medium",children:"Chat live"})]})}),O("div",{className:"flex sm:hidden absolute inset-2 items-end justify-center",children:O("div",{className:`flex items-center gap-2 px-4 h-11
66
- bg-gray-40/30 backdrop-blur-xl
67
- rounded-full transition-opacity hover:bg-gray-40/40 shadow-inset-white-10`,children:[O(Bm,{className:"size-5 text-white"}),O("p",{className:"text-base text-white whitespace-nowrap font-medium",children:"Chat"})]})})]}),G&&O(q1,{onClose:me,onSetMessageRef:P=>{z.current=P},onFocusRef:P=>{V.current=P}}),O("div",{className:"pointer-events-none absolute inset-0 rounded-3xl shadow-inset-white-20"})]})}function K1(){const{setWidgetState:e,widgetState:t}=Rt();return O("button",{onClick:()=>{e(ct)},className:`fixed right-0 bottom-25 z-50 bg-black/40 rounded-l-3xl w-[36px] h-[64px] flex items-center justify-center hover:bg-black/30 transition-all duration-300 cursor-pointer backdrop-blur-xl shadow-inset-white-20 ${t===ct?"opacity-0 pointer-events-none":"opacity-100"}`,"aria-label":"Open widget",children:O(A1,{size:24,color:"white"})})}const Y1="https://toinfinityai--s2v-pipecat-server-create-room.modal.run",X1="https://lemonslice.com/api";async function Q1(e){const t=await fetch(`${Y1}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent_id:e})});if(!t.ok)throw new Error(`Failed to create agent room: ${t.statusText}`);return await t.json()}async function Z1(e){const t=await fetch(`${X1}/agents/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Failed to get agent: ${t.statusText}`);return await t.json()}function ex({agentId:e,isInline:t}){const{agentData:n,setAgentData:r}=_n(),{widgetState:i,setWidgetState:a,roomUrl:o,setRoomUrl:s,isTransitioning:c,isAboutToTransition:l,hasJoinedRoom:d,setHasJoinedRoom:f,resetDailyState:p,setIsAgentVideoReady:g,setIsImageChanging:y,setIsImageChangeRequested:v}=Rt(),{startMaxVideoTimer:b,errorMsg:_,setErrorMsg:k,setNonFatalErrorMsg:T}=Zi(),{resetInitMsg:M}=Fm(),{isAudioMuted:x,isMicMuted:C}=vs(),{hasUserInteracted:A}=Pr(),E=_t(),R=yn({filter:"remote"}),F=de(!1),j=de(!1),z=de(null),[V,ee]=Z(!1),[ie,me]=Z(!1);X(()=>{e&&Z1(e).then(B=>{if(!B.sufficient_balance)throw new Error("Insufficient balance");r(B)}).catch(B=>{console.error("Error fetching agent data:",B)})},[e,r]),X(()=>{i===Oe&&A&&!F.current&&!o&&e&&!_&&(F.current=!0,Q1(e).then(B=>{B.status==="success"?s(B.room_url):k("An error occurred. Please try again.")}).catch(B=>{console.error("Error creating agent room:",B),k("An error occurred. Please try again.")}).finally(()=>{F.current=!1}))},[i,A,e,o,_]),X(()=>{i===Oe&&E&&o&&!d&&!j.current&&(j.current=!0,E.join({url:o,audioSource:!0,videoSource:!1,startAudioOff:C,dailyConfig:{alwaysIncludeMicInPermissionPrompt:!1}}).then(()=>{f(!0),M()}).catch(B=>{console.error("Error joining call:",B),k("An error occurred. Please try again."),f(!1)}).finally(()=>{j.current=!1}))},[i,E,o,d,C]),X(()=>{E&&!d&&E.leave()},[d,E]),J("app-message",N(B=>{B?.data?.type==="pipecat_shutdown"&&(k("An error occurred. Please try again."),p()),B?.data?.type==="bot_ready"&&g(!0),B?.data?.type==="gpu_error"&&(k("An error occurred. Please try again."),p()),B?.data?.type==="image_created"&&(y(!0),v(!1)),B?.data?.type==="image_change_complete"&&(y(!1),v(!1)),B?.data?.type==="image_change_error"&&(v(!1),y(!1),T("Unable to imagine"))},[])),J("participant-joined",N(()=>{b()},[])),J("error",N(()=>{console.error("Encountered Daily error"),k("An error occurred. Please try again.")},[])),J("participant-left",N(()=>{!_&&d&&(console.error("Agent left the call"),a(ct),p())},[d])),J("network-connection",N(B=>{if(!B)return;const W=B.type,G=B.event;G==="connected"?W==="peer-to-peer"||W==="sfu"?ee(!1):W==="signaling"&&me(!1):G==="interrupted"&&(W==="peer-to-peer"||W==="sfu"?ee(!0):W==="signaling"&&me(!0))},[])),X(()=>{T(ie?"Network issues.":V?"Poor connection.":"")},[V,ie]);const K=B=>{console.error("DailyAudio play failed:",B),k("An error occurred. Please try again.")};return X(()=>{if(z.current){const B=z.current.getAllAudio();B&&B.length>0&&B.forEach(W=>{W&&(W.muted=x)})}},[x,R.length]),X(()=>{const B=()=>{p()};return window.addEventListener("beforeunload",B),()=>{window.removeEventListener("beforeunload",B),p()}},[]),n?O("div",{className:t?"":"fixed bottom-2 right-5 z-1000 flex flex-col items-end",children:[(i===Ht||c||l)&&O(K1,{}),(i===Oe||i===ct||c||l)&&O(G1,{}),i!==Ht&&O("div",{className:"text-right text-[8px] text-white mix-blend-difference transition-opacity duration-150 shadow-2xs pr-[4px]",children:!t&&O(Ke,{children:["Powered by"," ",O("a",{href:"https://lemonslice.com",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Lemon Slice"})]})}),O(Df,{ref:z,onPlayFailed:K})]}):null}function tx(e={}){const t=e["agent-id"]||void 0,n=e.inline,r=n==="true"||n===""||n===!0,i=e["show-minimize-button"],a=i===void 0||i==="true"||i===""||i===!0,o=Ve(()=>Sr.createCallObject({videoSource:!1,audioSource:!0}),[]);X(()=>()=>{if(o){try{const c=o.meetingState();(c==="joined-meeting"||c==="joining-meeting")&&o.leave()}catch{}try{o.destroy()}catch(c){console.error("Error destroying call object:",c)}}},[o]);const s=de(null);return X(()=>{const c=document.querySelector("lemon-slice-widget");c&&(c.setShowMinimizeButton=l=>{s.current?.(l)})},[]),O("div",{translate:!1,children:O(W0,{children:O(J0,{children:O(B0,{children:O(I0,{callObject:o,children:O(U0,{showMinimizeButton:a,onSetShowMinimizeButton:c=>{s.current=c},children:O(H0,{children:O(z0,{children:O(j1,{children:[O(F0,{}),O(ex,{agentId:t,isInline:r})]})})})})})})})})})}const nx=["agent-id","show-minimize-button"];function zm(e="lemon-slice-widget"){Zm(tx,e,nx,{shadow:!0,mode:"open"})}return zm(),ya.registerWidget=zm,Object.defineProperty(ya,Symbol.toStringTag,{value:"Module"}),ya})({});
62
+ ${j||C||B?"opacity-100":"opacity-0"}
63
+ `,"aria-label":"Minimize",children:O(D1,{strokeWidth:2,size:20,color:"white"})}),O("div",{className:"absolute inset-0 w-full h-full",children:[h&&O("video",{ref:x,src:N,className:"absolute inset-0 w-full h-full object-cover",playsInline:!0,autoPlay:!0,muted:t!==Te||d,loop:!0}),w&&O(x1,{}),S&&O(K0,{}),P&&O(j1,{}),D&&O(vo,{msg:b,isError:!0}),$&&O(vo,{msg:"Imagining",showSpinner:!0}),L&&O(vo,{msg:"✨ Try /imagine",isFullWidth:!1,onClick:()=>{se.current?.("/imagine "),G.current?.()}})]}),t===Ye&&O("button",{onClick:at,className:"absolute inset-0 cursor-pointer",children:[O("div",{className:"hidden sm:flex absolute inset-3 items-end justify-center",children:O("div",{className:`flex items-center gap-2 px-3 h-10
64
+ bg-[var(--color-primary-action)] backdrop-blur-xl
65
+ rounded-full transition-opacity hover:bg-[var(--color-primary-action-hover)] shadow-inset-white-20`,children:[O($m,{className:"size-5 text-white"}),O("p",{className:"text-sm text-white whitespace-nowrap font-medium",children:"Video chat"})]})}),O("div",{className:"flex sm:hidden absolute inset-2 items-end justify-center",children:O("div",{className:`flex items-center gap-2 px-3 h-11
66
+ bg-[var(--color-primary-action)] backdrop-blur-xl
67
+ rounded-full transition-opacity hover:bg-[var(--color-primary-action-hover)] shadow-inset-white-20`,children:[O($m,{className:"size-5 text-white"}),O("p",{className:"text-base text-white whitespace-nowrap font-medium",children:"Join"})]})})]}),m&&O(q1,{onClose:z,onSetMessageRef:U=>{se.current=U},onFocusRef:U=>{G.current=U}}),O("div",{className:"pointer-events-none absolute inset-0 rounded-3xl shadow-inset-white-20"})]})}function Y1(){const{setWidgetState:e,widgetState:t}=Ft();return O("button",{onClick:()=>{e(Ye)},className:`fixed right-0 bottom-25 z-50 bg-black/40 rounded-l-3xl w-[36px] h-[64px] flex items-center justify-center hover:bg-black/30 transition-all duration-300 cursor-pointer backdrop-blur-xl shadow-inset-white-20 ${t===Ye?"opacity-0 pointer-events-none":"opacity-100"}`,"aria-label":"Open widget",children:O(O1,{size:24,color:"white"})})}const X1="https://toinfinityai--s2v-pipecat-server-create-room.modal.run",Q1="https://lemonslice.com/api";async function Z1(e){const t=await fetch(`${X1}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent_id:e})});if(!t.ok)throw new Error(`Failed to create agent room: ${t.statusText}`);return await t.json()}async function ex(e){const t=await fetch(`${Q1}/agents/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Failed to get agent: ${t.statusText}`);return await t.json()}function tx({agentId:e,isInline:t}){const{agentData:n,setAgentData:r}=Sn(),{widgetState:i,setWidgetState:o,roomUrl:a,setRoomUrl:s,isTransitioning:c,isAboutToTransition:l,hasJoinedRoom:d,setHasJoinedRoom:f,resetDailyState:p,setIsAgentVideoReady:g,setIsImageChanging:y,setIsImageChangeRequested:v}=Ft(),{startMaxVideoTimer:b,errorMsg:_,setErrorMsg:k,setNonFatalErrorMsg:x}=Zi(),{resetInitMsg:C}=Bm(),{isAudioMuted:T,isMicMuted:M}=ys(),{hasUserInteracted:A}=Er(),E=wt(),j=wn({filter:"remote"}),B=fe(!1),V=fe(!1),H=fe(null),[F,X]=ne(!1),[K,se]=ne(!1);Z(()=>{e&&ex(e).then(N=>{if(!N.sufficient_balance)throw new Error("Insufficient balance");r(N)}).catch(N=>{console.error("Error fetching agent data:",N)})},[e,r]),Z(()=>{i===Te&&A&&!B.current&&!a&&e&&!_&&(B.current=!0,Z1(e).then(N=>{N.status==="success"?s(N.room_url):k("An error occurred. Please try again.")}).catch(N=>{console.error("Error creating agent room:",N),k("An error occurred. Please try again.")}).finally(()=>{B.current=!1}))},[i,A,e,a,_]),Z(()=>{i===Te&&E&&a&&!d&&!V.current&&(V.current=!0,E.join({url:a,audioSource:!0,videoSource:!1,startAudioOff:M,dailyConfig:{alwaysIncludeMicInPermissionPrompt:!1}}).then(()=>{f(!0),C()}).catch(N=>{console.error("Error joining call:",N),k("An error occurred. Please try again."),f(!1)}).finally(()=>{V.current=!1}))},[i,E,a,d,M]),Z(()=>{E&&!d&&E.leave()},[d,E]),q("app-message",R(N=>{N?.data?.type==="pipecat_shutdown"&&(k("An error occurred. Please try again."),p()),N?.data?.type==="bot_ready"&&g(!0),N?.data?.type==="gpu_error"&&(k("An error occurred. Please try again."),p()),N?.data?.type==="image_created"&&(y(!0),v(!1)),N?.data?.type==="image_change_complete"&&(y(!1),v(!1)),N?.data?.type==="image_change_error"&&(v(!1),y(!1),x("Unable to imagine"))},[])),q("participant-joined",R(()=>{b()},[])),q("error",R(()=>{console.error("Encountered Daily error"),k("An error occurred. Please try again.")},[])),q("participant-left",R(()=>{!_&&d&&(console.error("Agent left the call"),o(Ye),p())},[d])),q("network-connection",R(N=>{if(!N)return;const J=N.type,z=N.event;z==="connected"?J==="peer-to-peer"||J==="sfu"?X(!1):J==="signaling"&&se(!1):z==="interrupted"&&(J==="peer-to-peer"||J==="sfu"?X(!0):J==="signaling"&&se(!0))},[])),Z(()=>{x(K?"Network issues.":F?"Poor connection.":"")},[F,K]);const G=N=>{console.error("DailyAudio play failed:",N),k("An error occurred. Please try again.")};return Z(()=>{if(H.current){const N=H.current.getAllAudio();N&&N.length>0&&N.forEach(J=>{J&&(J.muted=T)})}},[T,j.length]),Z(()=>{const N=()=>{p()};return window.addEventListener("beforeunload",N),()=>{window.removeEventListener("beforeunload",N),p()}},[]),n?O("div",{className:t?"":"fixed bottom-2 right-5 z-1000 flex flex-col items-end",children:[(i===Pt||c||l)&&O(Y1,{}),(i===Te||i===Ye||c||l)&&O(K1,{}),i!==Pt&&O("div",{className:"text-right text-[8px] text-white mix-blend-difference transition-opacity duration-150 shadow-2xs pr-[4px]",children:!t&&O(Ke,{children:["Powered by"," ",O("a",{href:"https://lemonslice.com",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Lemon Slice"})]})}),O(Lf,{ref:H,onPlayFailed:G})]}):null}function yo(e){if(e==null||e==="")return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=Number(e);return Number.isFinite(t)?t:null}function nx(e={}){const t=e["agent-id"]||void 0,n=e.inline,r=n==="true"||n===""||n===!0,i=e["show-minimize-button"],o=i===void 0||i==="true"||i===""||i===!0,a=e["initial-state"],s=a==="active"||a==="minimized"||a==="hidden"?a:"minimized",c=e["controlled-widget-state"],l=c==="active"||c==="minimized"||c==="hidden"?c:null,d=e["controlled-show-minimize-button"],f=d===void 0?null:d==="true"||d===""||d===!0,p=yo(e["custom-active-width"]),g=yo(e["custom-active-height"]),y=yo(e["custom-minimized-width"]),v=yo(e["custom-minimized-height"]),b=Ve(()=>xr.createCallObject({videoSource:!1,audioSource:!0}),[]);return Z(()=>()=>{if(b){try{const _=b.meetingState();(_==="joined-meeting"||_==="joining-meeting")&&b.leave()}catch{}try{b.destroy()}catch(_){console.error("Error destroying call object:",_)}}},[b]),O("div",{translate:!1,children:O(J0,{children:O(H0,{children:O($0,{children:O(D0,{callObject:b,children:O(z0,{showMinimizeButton:o,initialState:s,controlledWidgetState:l,controlledShowMinimizeButton:f,customActiveWidth:p,customActiveHeight:g,customMinimizedWidth:y,customMinimizedHeight:v,children:O(G0,{children:O(W0,{children:O(R1,{children:[O(B0,{}),O(tx,{agentId:t,isInline:r})]})})})})})})})})})}const rx=["agent-id","show-minimize-button","initial-state","controlled-widget-state","controlled-show-minimize-button","custom-active-width","custom-active-height","custom-minimized-width","custom-minimized-height"];function Wm(e="lemon-slice-widget"){eg(nx,e,rx,{shadow:!0,mode:"open"})}return Wm(),_o.registerWidget=Wm,Object.defineProperty(_o,Symbol.toStringTag,{value:"Module"}),_o})({});