@tavus/widget 0.0.1-beta.8 → 0.0.1-beta.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.
@@ -1,12 +1,12 @@
1
- var TavusWidget=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,t)=>()=>(e&&(t=e(e=0)),t),o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(var c=r(a),l=0,u=c.length,d;l<u;l++)d=c[l],!i.call(e,d)&&d!==o&&t(e,d,{get:(e=>a[e]).bind(null,d),enumerable:!(s=n(a,d))||s.enumerable});return e},l=e=>i.call(e,`module.exports`)?e[`module.exports`]:c(t({},`__esModule`,{value:!0}),e),u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,ee,T={},te=[],ne=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,re=Array.isArray;function ie(e,t){for(var n in t)e[n]=t[n];return e}function ae(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function oe(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?u.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 se(e,o,r,i,null)}function se(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??++f,__i:-1,__u:0};return i==null&&d.vnode!=null&&d.vnode(a),a}function ce(){return{current:null}}function le(e){return e.children}function ue(e,t){this.props=e,this.context=t}function de(e,t){if(t==null)return e.__?de(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`?de(e):null}function fe(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],a=ie({},t);a.__v=t.__v+1,d.vnode&&d.vnode(a),we(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??de(t),!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,Ee(r,a,i),t.__e=t.__=null,a.__e!=n&&pe(a)}}function pe(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),pe(e)}function me(e){(!e.__d&&(e.__d=!0)&&m.push(e)&&!he.__r++||h!=d.debounceRendering)&&((h=d.debounceRendering)||g)(he)}function he(){try{for(var e,t=1;m.length;)m.length>t&&m.sort(_),e=m.shift(),t=m.length,fe(e)}finally{m.length=he.__r=0}}function ge(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v=r&&r.__k||te,y=t.length;for(c=_e(n,t,v,c,y),d=0;d<y;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&v[p.__i]||T,p.__i=d,g=we(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&ke(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),(_=!!(4&p.__u))||f.__k===p.__k?(c=ve(p,c,e,_),_&&f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function _e(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=se(null,o,null,null,null):re(o)?o=e.__k[a]=se(le,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=se(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=be(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=de(s)),Ae(s,s));return r}function ve(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=ve(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=de(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ye(e,t){return t||=[],e==null||typeof e==`boolean`||(re(e)?e.some(function(e){ye(e,t)}):t.push(e)),t}function be(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function xe(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||ne.test(t)?n:n+`px`}function Se(e,t,n,r,i){var a,o;n: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||xe(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||xe(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(x,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n[b]=r[b]:(n[b]=S,e.addEventListener(t,a?w:C,a)):e.removeEventListener(t,a?w:C,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 n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function Ce(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[y]==null)t[y]=S++;else if(t[y]<n[b])return;return n(d.event?d.event(t):t)}}}function we(e,t,n,r,i,a,o,s,c,l){var u,f,p,m,h,g,_,v,y,b,x,S,C,w,ee,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=d.__b)&&u(t);n:if(typeof T==`function`)try{if(v=t.props,y=T.prototype&&T.prototype.render,b=(u=T.contextType)&&r[u.__c],x=u?b?b.props.value:u.__:r,n.__c?_=(f=t.__c=n.__c).__=f.__E:(y?t.__c=f=new T(v,x):(t.__c=f=new ue(v,x),f.constructor=T,f.render=je),b&&b.sub(f),f.state||={},f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&T.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ie({},f.__s)),ie(f.__s,T.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&T.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&T.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),t.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)){t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),te.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__e=!1,S=d.__r,C=0,y)f.state=f.__s,f.__d=!1,S&&S(t),u=f.render(f.props,f.state,f.context),te.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,S&&S(t),u=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++C<25);f.state=f.__s,f.getChildContext!=null&&(r=ie(ie({},r),f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),w=u!=null&&u.type===le&&u.key==null?De(u.props.children):u,s=ge(e,re(w)?w:[w],t,n,r,i,a,o,s,c,l),f.base=t.__e,t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__E=f.__=null)}catch(e){if(t.__v=null,c||a!=null)if(e.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(ee=a.length;ee--;)ae(a[ee]);Te(t)}else t.__e=n.__e,t.__k=n.__k,e.then||Te(t);d.__e(e,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=Oe(n.__e,t,n,r,i,a,o,c,l);return(u=d.diffed)&&u(t),128&t.__u?void 0:s}function Te(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Te))}function Ee(e,t,n){for(var r=0;r<n.length;r++)ke(n[r],n[++r],n[++r]);d.__c&&d.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){d.__e(e,t.__v)}})}function De(e){return typeof e!=`object`||!e||e.__b>0?e:re(e)?e.map(De):e.constructor===void 0?ie({},e):null}function Oe(e,t,n,r,i,a,o,s,c){var l,f,p,m,h,g,_,v=n.props||T,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(l=0;l<a.length;l++)if((h=a[l])&&`setAttribute`in h==!!b&&(b?h.localName==b:h.nodeType==3)){e=h,a[l]=null;break}}if(e==null){if(b==null)return document.createTextNode(y);e=document.createElementNS(i,b,y.is&&y),s&&=(d.__m&&d.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a=b==`textarea`&&y.defaultValue!=null?null:a&&u.call(e.childNodes),!s&&a!=null)for(v={},l=0;l<e.attributes.length;l++)v[(h=e.attributes[l]).name]=h.value;for(l in v)h=v[l],l==`dangerouslySetInnerHTML`?p=h:l==`children`||l in y||l==`value`&&`defaultValue`in y||l==`checked`&&`defaultChecked`in y||Se(e,l,null,h,i);for(l in y)h=y[l],l==`children`?m=h:l==`dangerouslySetInnerHTML`?f=h:l==`value`?g=h:l==`checked`?_=h:s&&typeof h!=`function`||v[l]===h||Se(e,l,h,v[l],i);if(f)s||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=``),ge(t.type==`template`?e.content:e,re(m)?m:[m],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&de(n,0),s,c),a!=null)for(l=a.length;l--;)ae(a[l]);s&&b!=`textarea`||(l=`value`,b==`progress`&&g==null?e.removeAttribute(`value`):g!=null&&(g!==e[l]||b==`progress`&&!g||b==`option`&&g!=v[l])&&Se(e,l,g,v[l],i),l=`checked`,_!=null&&_!=e[l]&&Se(e,l,_,v[l],i))}return e}function ke(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(e){d.__e(e,n)}}function Ae(e,t,n){var r,i;if(d.unmount&&d.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ke(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){d.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Ae(r[i],t,n||typeof e.type!=`function`);n||ae(e.__e),e.__c=e.__=e.__e=void 0}function je(e,t,n){return this.constructor(e,n)}function Me(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),d.__&&d.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],o=[],we(t,e=(!r&&n||t).__k=oe(le,null,[e]),i||T,T,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?u.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,o),Ee(a,e,o)}function Ne(e,t){Me(e,t,Ne)}function Pe(e,t,n){var r,i,a,o,s=ie({},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?u.call(arguments,2):n),se(e.type,s,r||e.key,i||e.ref,null)}function Fe(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,me(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c=`__cC`+ ee++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}u=te.slice,d={__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(t){e=t}throw e}},f=0,p=function(e){return e!=null&&e.constructor===void 0},ue.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ie({},this.state);typeof e==`function`&&(e=e(ie({},n),this.props)),e&&ie(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),me(this))},ue.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),me(this))},ue.prototype.render=le,m=[],g=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_=function(e,t){return e.__v.__b-t.__v.__b},he.__r=0,v=Math.random().toString(8),y=`__d`+v,b=`__a`+v,x=/(PointerCapture)$|Capture$/i,S=0,C=Ce(!1),w=Ce(!0),ee=0;function Ie(){return Ie=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},Ie.apply(this,arguments)}function Le(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 Re=[`context`,`children`],ze=[`useFragment`];function Be(e,t,n,r){function i(){var t,n=Reflect.construct(HTMLElement,[],i);return n._vdomComponent=e,r&&r.shadow?(n._root=n.attachShadow({mode:r.mode||`open`,serializable:(t=r.serializable)!=null&&t}),r.adoptedStyleSheets&&(n._root.adoptedStyleSheets=r.adoptedStyleSheets)):n._root=n,n}return(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=function(){He.call(this,r)},i.prototype.attributeChangedCallback=We,i.prototype.disconnectedCallback=Ge,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,e.formAssociated&&(i.formAssociated=!0),n.forEach(function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom?this._vdom.props[e]:this._props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||={},this._props[e]=t);var n=typeof t;t!=null&&n!==`string`&&n!==`boolean`&&n!==`number`||this.setAttribute(e,t)}})}),customElements.define(t||e.tagName||e.displayName||e.name,i),i}function Ve(e){this.getChildContext=function(){return e.context};var t=e.children;return Pe(t,Le(e,Re))}function He(e){var t=new CustomEvent(`_preact`,{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=oe(Ve,Ie({},this._props,{context:t.detail.context}),qe(this,this._vdomComponent,e)),(this.hasAttribute(`hydrate`)?Ne:Me)(this._vdom,this._root)}function Ue(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():``})}function We(e,t,n){if(this._vdom){var r={};r[e]=n??=void 0,r[Ue(e)]=n,this._vdom=Pe(this._vdom,r),Me(this._vdom,this._root)}}function Ge(){Me(this._vdom=null,this._root)}function Ke(e,t){var n=this,r=e.useFragment,i=Le(e,ze);return oe(r?le:`slot`,Ie({},i,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener(`_preact`,n._listener))):n.ref.removeEventListener(`_preact`,n._listener)}}))}function qe(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[Ue(o[a].name)]=o[a].value);for(a=s.length;a--;){var c=qe(s[a],null,n),l=s[a].slot;l?i[l]=oe(Ke,{name:l},c):r[a]=c}var u=!(!n||!n.shadow),d=t?oe(Ke,{useFragment:!u},r):r;return!u&&t&&(e.innerHTML=``),oe(t||e.nodeName.toLowerCase(),i,d)}var Je=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
2
- @layer properties{*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--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-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking: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-ease:initial}}@layer theme{:host,: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-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--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:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-lg:.5rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-xs:4px;--blur-sm:8px;--aspect-video:16 / 9;--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)}}@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;-webkit-text-decoration:inherit;-webkit-text-decoration: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}:is(:host:has(input.theme-controller[value=wireframe]:checked),[data-theme=wireframe]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(94% 0 0);--color-base-content:oklch(20% 0 0);--color-primary:oklch(87% 0 0);--color-primary-content:oklch(26% 0 0);--color-secondary:oklch(87% 0 0);--color-secondary-content:oklch(26% 0 0);--color-accent:oklch(87% 0 0);--color-accent-content:oklch(26% 0 0);--color-neutral:oklch(87% 0 0);--color-neutral-content:oklch(26% 0 0);--color-info:oklch(44% .11 240.79);--color-info-content:oklch(90% .058 230.902);--color-success:oklch(43% .095 166.913);--color-success-content:oklch(90% .093 164.15);--color-warning:oklch(47% .137 46.201);--color-warning-content:oklch(92% .12 95.746);--color-error:oklch(44% .177 26.899);--color-error-content:oklch(88% .062 18.334);--radius-selector:0rem;--radius-field:.25rem;--radius-box:.25rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=silk]:checked),[data-theme=silk]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(97% .0035 67.78);--color-base-200:oklch(95% .0081 61.42);--color-base-300:oklch(90% .0081 61.42);--color-base-content:oklch(40% .0081 61.42);--color-primary:oklch(23.27% .0249 284.3);--color-primary-content:oklch(94.22% .2505 117.44);--color-secondary:oklch(23.27% .0249 284.3);--color-secondary-content:oklch(73.92% .2135 50.94);--color-accent:oklch(23.27% .0249 284.3);--color-accent-content:oklch(88.92% .2061 189.9);--color-neutral:oklch(20% 0 0);--color-neutral-content:oklch(80% .0081 61.42);--color-info:oklch(80.39% .1148 241.68);--color-info-content:oklch(30.39% .1148 241.68);--color-success:oklch(83.92% .0901 136.87);--color-success-content:oklch(23.92% .0901 136.87);--color-warning:oklch(83.92% .1085 80);--color-warning-content:oklch(43.92% .1085 80);--color-error:oklch(75.1% .1814 22.37);--color-error-content:oklch(35.1% .1814 22.37);--radius-selector:2rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:2px;--depth:1;--noise:0}:is(:host:has(input.theme-controller[value=cyberpunk]:checked),[data-theme=cyberpunk]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(94.51% .179 104.32);--color-base-200:oklch(91.51% .179 104.32);--color-base-300:oklch(85.51% .179 104.32);--color-base-content:oklch(0% 0 0);--color-primary:oklch(74.22% .209 6.35);--color-primary-content:oklch(14.844% .041 6.35);--color-secondary:oklch(83.33% .184 204.72);--color-secondary-content:oklch(16.666% .036 204.72);--color-accent:oklch(71.86% .217 310.43);--color-accent-content:oklch(14.372% .043 310.43);--color-neutral:oklch(23.04% .065 269.31);--color-neutral-content:oklch(94.51% .179 104.32);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:0rem;--radius-field:0rem;--radius-box:0rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=retro]:checked),[data-theme=retro]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(91.637% .034 90.515);--color-base-200:oklch(88.272% .049 91.774);--color-base-300:oklch(84.133% .065 90.856);--color-base-content:oklch(41% .112 45.904);--color-primary:oklch(80% .114 19.571);--color-primary-content:oklch(39% .141 25.723);--color-secondary:oklch(92% .084 155.995);--color-secondary-content:oklch(44% .119 151.328);--color-accent:oklch(68% .162 75.834);--color-accent-content:oklch(41% .112 45.904);--color-neutral:oklch(44% .011 73.639);--color-neutral-content:oklch(86% .005 56.366);--color-info:oklch(58% .158 241.966);--color-info-content:oklch(96% .059 95.617);--color-success:oklch(51% .096 186.391);--color-success-content:oklch(96% .059 95.617);--color-warning:oklch(64% .222 41.116);--color-warning-content:oklch(96% .059 95.617);--color-error:oklch(70% .191 22.216);--color-error-content:oklch(40% .123 38.172);--radius-selector:.25rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=lemonade]:checked),[data-theme=lemonade]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(98.71% .02 123.72);--color-base-200:oklch(91.8% .018 123.72);--color-base-300:oklch(84.89% .017 123.72);--color-base-content:oklch(19.742% .004 123.72);--color-primary:oklch(58.92% .199 134.6);--color-primary-content:oklch(11.784% .039 134.6);--color-secondary:oklch(77.75% .196 111.09);--color-secondary-content:oklch(15.55% .039 111.09);--color-accent:oklch(85.39% .201 100.73);--color-accent-content:oklch(17.078% .04 100.73);--color-neutral:oklch(30.98% .075 108.6);--color-neutral-content:oklch(86.196% .015 108.6);--color-info:oklch(86.19% .047 224.14);--color-info-content:oklch(17.238% .009 224.14);--color-success:oklch(86.19% .047 157.85);--color-success-content:oklch(17.238% .009 157.85);--color-warning:oklch(86.19% .047 102.15);--color-warning-content:oklch(17.238% .009 102.15);--color-error:oklch(86.19% .047 25.85);--color-error-content:oklch(17.238% .009 25.85);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:host{--fx-noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E");scrollbar-color:currentColor #0000}@supports (color:color-mix(in lab, red, red)){:host{scrollbar-color:color-mix(in oklch, currentColor 35%, #0000) #0000}}@property --radialprogress{syntax:"<percentage>";inherits:true;initial-value:0%}:host:not(span){overflow:var(--page-overflow)}:host{background:var(--page-scroll-bg,var(--root-bg));--page-scroll-bg-on:linear-gradient(var(--root-bg,#0000), var(--root-bg,#0000)) var(--root-bg,#0000)}@supports (color:color-mix(in lab, red, red)){:host{--page-scroll-bg-on:linear-gradient(var(--root-bg,#0000), var(--root-bg,#0000)) color-mix(in srgb, var(--root-bg,#0000), oklch(0% 0 0) calc(var(--page-has-backdrop,0) * 40%))}}:host{--page-scroll-transition-on:background-color .3s ease-out;transition:var(--page-scroll-transition);scrollbar-gutter:var(--page-scroll-gutter,unset);scrollbar-gutter:if(style(--page-has-scroll: 1): var(--page-scroll-gutter,unset) ; else: unset)}@keyframes set-page-has-scroll{0%,to{--page-has-scroll:1}}:host,[data-theme]{background:var(--page-scroll-bg,var(--root-bg));color:var(--color-base-content)}:where(:host,[data-theme]){--root-bg:var(--color-base-100)}:where(:host),[data-theme=black-white]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(92% 0 0);--color-base-content:oklch(21% 0 0);--color-primary:oklch(21% 0 0);--color-primary-content:oklch(98% 0 0);--color-secondary:oklch(50% 0 0);--color-secondary-content:oklch(98% 0 0);--color-accent:oklch(27% 0 0);--color-accent-content:oklch(98% 0 0);--color-neutral:oklch(27% 0 0);--color-neutral-content:oklch(98% 0 0);--color-info:oklch(70% .12 230);--color-info-content:oklch(98% 0 0);--color-success:oklch(65% .18 145);--color-success-content:oklch(98% 0 0);--color-warning:oklch(80% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(60% .22 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:host:has(input.theme-controller[value=black-white]:checked){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(92% 0 0);--color-base-content:oklch(21% 0 0);--color-primary:oklch(21% 0 0);--color-primary-content:oklch(98% 0 0);--color-secondary:oklch(50% 0 0);--color-secondary-content:oklch(98% 0 0);--color-accent:oklch(27% 0 0);--color-accent-content:oklch(98% 0 0);--color-neutral:oklch(27% 0 0);--color-neutral-content:oklch(98% 0 0);--color-info:oklch(70% .12 230);--color-info-content:oklch(98% 0 0);--color-success:oklch(65% .18 145);--color-success-content:oklch(98% 0 0);--color-warning:oklch(80% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(60% .22 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}@media (prefers-color-scheme:dark){:host:not([data-theme]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(22% 0 0);--color-base-300:oklch(27% 0 0);--color-base-content:oklch(96% 0 0);--color-primary:oklch(96% 0 0);--color-primary-content:oklch(18% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(18% 0 0);--color-accent:oklch(90% 0 0);--color-accent-content:oklch(18% 0 0);--color-neutral:oklch(92% 0 0);--color-neutral-content:oklch(18% 0 0);--color-info:oklch(72% .13 230);--color-info-content:oklch(15% 0 0);--color-success:oklch(70% .17 145);--color-success-content:oklch(15% 0 0);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(65% .21 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}}:is(:host:has(input.theme-controller[value=white-black]:checked),[data-theme=white-black]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(22% 0 0);--color-base-300:oklch(27% 0 0);--color-base-content:oklch(96% 0 0);--color-primary:oklch(96% 0 0);--color-primary-content:oklch(18% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(18% 0 0);--color-accent:oklch(90% 0 0);--color-accent-content:oklch(18% 0 0);--color-neutral:oklch(92% 0 0);--color-neutral-content:oklch(18% 0 0);--color-info:oklch(72% .13 230);--color-info-content:oklch(15% 0 0);--color-success:oklch(70% .17 145);--color-success-content:oklch(15% 0 0);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(65% .21 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:is(:host:has(input.theme-controller[value=wireframe-dark]:checked),[data-theme=wireframe-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(23% 0 0);--color-base-300:oklch(29% 0 0);--color-base-content:oklch(92% 0 0);--color-primary:oklch(92% 0 0);--color-primary-content:oklch(12% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(12% 0 0);--color-accent:oklch(55% 0 0);--color-accent-content:oklch(95% 0 0);--color-neutral:oklch(30% 0 0);--color-neutral-content:oklch(92% 0 0);--color-info:oklch(70% .15 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(72% .16 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(65% .22 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=silk-dark]:checked),[data-theme=silk-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(20% .02 320);--color-base-200:oklch(25% .022 320);--color-base-300:oklch(30% .025 320);--color-base-content:oklch(94% .01 320);--color-primary:oklch(74% .12 320);--color-primary-content:oklch(15% .03 320);--color-secondary:oklch(74% .12 270);--color-secondary-content:oklch(15% .03 270);--color-accent:oklch(76% .12 20);--color-accent-content:oklch(15% .03 20);--color-neutral:oklch(28% .02 320);--color-neutral-content:oklch(94% .01 320);--color-info:oklch(72% .13 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(74% .15 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(82% .15 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(66% .21 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=cyberpunk-dark]:checked),[data-theme=cyberpunk-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(15% .04 305);--color-base-200:oklch(20% .05 305);--color-base-300:oklch(26% .06 305);--color-base-content:oklch(92% .18 95);--color-primary:oklch(72% .28 340);--color-primary-content:oklch(15% .04 305);--color-secondary:oklch(80% .2 200);--color-secondary-content:oklch(15% .04 305);--color-accent:oklch(90% .2 95);--color-accent-content:oklch(15% .04 305);--color-neutral:oklch(25% .05 305);--color-neutral-content:oklch(92% .18 95);--color-info:oklch(75% .2 220);--color-info-content:oklch(15% .04 305);--color-success:oklch(78% .2 145);--color-success-content:oklch(15% .04 305);--color-warning:oklch(85% .18 80);--color-warning-content:oklch(15% .04 305);--color-error:oklch(70% .25 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=retro-dark]:checked),[data-theme=retro-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(22% .03 60);--color-base-200:oklch(27% .03 60);--color-base-300:oklch(33% .035 60);--color-base-content:oklch(88% .05 70);--color-primary:oklch(62% .16 30);--color-primary-content:oklch(95% .04 70);--color-secondary:oklch(66% .1 80);--color-secondary-content:oklch(15% .03 60);--color-accent:oklch(72% .13 60);--color-accent-content:oklch(15% .03 60);--color-neutral:oklch(28% .03 60);--color-neutral-content:oklch(88% .05 70);--color-info:oklch(70% .14 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(72% .15 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(80% .15 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(65% .2 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=lemonade-dark]:checked),[data-theme=lemonade-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(20% .05 140);--color-base-200:oklch(25% .05 140);--color-base-300:oklch(31% .06 140);--color-base-content:oklch(94% .1 100);--color-primary:oklch(85% .18 95);--color-primary-content:oklch(15% .05 140);--color-secondary:oklch(75% .2 130);--color-secondary-content:oklch(15% .05 140);--color-accent:oklch(85% .15 110);--color-accent-content:oklch(15% .05 140);--color-neutral:oklch(28% .05 140);--color-neutral-content:oklch(94% .1 100);--color-info:oklch(72% .18 220);--color-info-content:oklch(15% .05 140);--color-success:oklch(76% .2 145);--color-success-content:oklch(15% .05 140);--color-warning:oklch(86% .18 80);--color-warning-content:oklch(15% .05 140);--color-error:oklch(65% .22 25);--color-error-content:oklch(95% .02 25)}}@layer components;@layer utilities{.\\@container\\/conversation{container:conversation/inline-size}.\\@container\\/pip{container:pip/inline-size}@layer daisyui.l1.l2.l3{.tooltip{--tt-bg:var(--color-neutral);--tt-off:calc(100% + .5rem);--tt-tail:calc(100% + 1px + .25rem);display:inline-block;position:relative}.tooltip>.tooltip-content,.tooltip[data-tip]:before{border-radius:var(--radius-field);text-align:center;white-space:normal;max-width:20rem;color:var(--color-neutral-content);opacity:0;background-color:var(--tt-bg);pointer-events:none;z-index:2;--tw-content:attr(data-tip);content:var(--tw-content);width:max-content;padding-block:.25rem;padding-inline:.5rem;font-size:.875rem;line-height:1.25;position:absolute}.tooltip:after{opacity:0;background-color:var(--tt-bg);content:"";pointer-events:none;--mask-tooltip:url("data:image/svg+xml,%3Csvg width='10' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.500009 1C3.5 1 3.00001 4 5.00001 4C7 4 6.5 1 9.5 1C10 1 10 0.499897 10 0H0C-1.99338e-08 0.5 0 1 0.500009 1Z' fill='black'/%3E%3C/svg%3E%0A");width:.625rem;height:.25rem;-webkit-mask-position:-1px 0;mask-position:-1px 0;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-image:var(--mask-tooltip);-webkit-mask-image:var(--mask-tooltip);-webkit-mask-image:var(--mask-tooltip);mask-image:var(--mask-tooltip);display:block;position:absolute}@media (prefers-reduced-motion:no-preference){.tooltip>.tooltip-content,.tooltip[data-tip]:before,.tooltip:after{transition:opacity .2s cubic-bezier(.4,0,.2,1) 75ms,transform .2s cubic-bezier(.4,0,.2,1) 75ms}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{opacity:1;--tt-pos:0rem}@media (prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}.tab{cursor:pointer;appearance:none;text-align:center;webkit-user-select:none;-webkit-user-select:none;user-select:none;flex-wrap:wrap;justify-content:center;align-items:center;display:inline-flex;position:relative}@media (hover:hover){.tab:hover{color:var(--color-base-content)}}.tab{--tab-p:.75rem;--tab-bg:var(--color-base-100);--tab-border-color:var(--color-base-300);--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:0;--tab-radius-ee:0;--tab-order:0;--tab-radius-min:calc(.75rem - var(--border));--tab-radius-limit:min(var(--radius-field), var(--tab-radius-min));--tab-radius-grad:#0000 calc(69% - var(--border)), var(--tab-border-color) calc(69% - var(--border) + .25px), var(--tab-border-color) 69%, var(--tab-bg) calc(69% + .25px);order:var(--tab-order);height:var(--tab-height);padding-inline:var(--tab-p);border-color:#0000;font-size:.875rem}.tab:is(input[type=radio]){min-width:fit-content}.tab:is(input[type=radio]):after{--tw-content:attr(aria-label);content:var(--tw-content)}.tab:is(label){position:relative}.tab:is(label) input{cursor:pointer;appearance:none;opacity:0;position:absolute;inset:0}:is(.tab:checked,.tab:is(label:has(:checked)),.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]))+.tab-content{display:block}.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}.tab:not(input):empty{cursor:default;flex-grow:1}.tab:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.tab:focus{outline-offset:2px;outline:2px solid #0000}}.tab:focus-visible,.tab:is(label:has(:checked:focus-visible)){outline-offset:-5px;outline:2px solid}.tab[disabled]{pointer-events:none;opacity:.4}.menu{--menu-active-fg:var(--color-neutral-content);--menu-active-bg:var(--color-neutral);flex-flow:column wrap;width:fit-content;padding:.5rem;font-size:.875rem;display:flex}.menu :where(li ul){white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem;position:relative}.menu :where(li ul):before{background-color:var(--color-base-content);opacity:.1;width:var(--border);content:"";inset-inline-start:0;position:absolute;top:.75rem;bottom:.75rem}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}.menu :where(li:not(.menu-title)>:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--radius-field);text-align:start;text-wrap:balance;-webkit-user-select:none;user-select:none;grid-auto-columns:minmax(auto,max-content) auto max-content;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;padding-block:.375rem;padding-inline:.75rem;transition-property:color,background-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:grid}.menu :where(li>details>summary){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li>details>summary){outline-offset:2px;outline:2px solid #0000}}.menu :where(li>details>summary)::-webkit-details-marker{display:none}:is(.menu :where(li>details>summary),.menu :where(li>.menu-dropdown-toggle)):after{content:"";transform-origin:50%;pointer-events:none;justify-self:flex-end;width:.375rem;height:.375rem;transition-property:rotate,translate;transition-duration:.2s;display:block;translate:0 -1px;rotate:-135deg;box-shadow:inset 2px 2px}.menu details{interpolate-size:allow-keywords;overflow:hidden}.menu details::details-content{block-size:0}@media (prefers-reduced-motion:no-preference){.menu details::details-content{transition-behavior:allow-discrete;transition-property:block-size,content-visibility;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}}.menu details[open]::details-content{block-size:auto}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{translate:0 1px;rotate:45deg}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{color:var(--color-base-content);--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){box-shadow:inset 0 1px oklch(0% 0 0/.01),inset 0 -1px oklch(100% 0 0/.01)}.menu :where(li:empty){background-color:var(--color-base-content);opacity:.1;height:1px;margin:.5rem 1rem}.menu :where(li){flex-flow:column wrap;flex-shrink:0;align-items:stretch;display:flex;position:relative}.menu :where(li) .badge{justify-self:flex-end}.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{outline-offset:2px;outline:2px solid #0000}}.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{color:var(--menu-active-fg);background-color:var(--menu-active-bg);background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise)}:is(.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):not(:is(.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):active){box-shadow:0 2px calc(var(--depth) * 3px) -2px var(--menu-active-bg)}.menu :where(li).menu-disabled{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li).menu-disabled{color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.menu .dropdown:focus-within .menu-dropdown-toggle:after{translate:0 1px;rotate:45deg}.menu .dropdown-content{margin-top:.5rem;padding:.5rem}.menu .dropdown-content:before{display:none}.dock{z-index:1;background-color:var(--color-base-100);color:currentColor;border-top:.5px solid var(--color-base-content);flex-direction:row;justify-content:space-around;align-items:center;width:100%;padding:.5rem;display:flex;position:fixed;bottom:0;left:0;right:0}@supports (color:color-mix(in lab, red, red)){.dock{border-top:.5px solid color-mix(in oklab, var(--color-base-content) 5%, #0000)}}.dock{height:4rem;height:calc(4rem + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}.dock>*{cursor:pointer;border-radius:var(--radius-box);background-color:#0000;flex-direction:column;flex-shrink:1;flex-basis:100%;justify-content:center;align-items:center;gap:1px;max-width:8rem;height:100%;margin-bottom:.5rem;transition:opacity .2s ease-out;display:flex;position:relative}@media (hover:hover){.dock>:hover{opacity:.8}}:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{opacity:1}.dock>* .dock-label{font-size:.6875rem}.dock>:after{content:"";background-color:#0000;border-top:3px solid #0000;border-radius:3.40282e38px;width:1.5rem;height:.25rem;transition:background-color .1s ease-out,text-color .1s ease-out,width .1s ease-out;position:absolute;bottom:.2rem}.dropdown{position-area:var(--anchor-v,bottom) var(--anchor-h,span-right);display:inline-block;position:relative}.dropdown>:not(:has(~[class*=dropdown-content])):focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.dropdown>:not(:has(~[class*=dropdown-content])):focus{outline-offset:2px;outline:2px solid #0000}}.dropdown .dropdown-content{position:absolute}.dropdown.dropdown-close .dropdown-content,.dropdown:not(details,.dropdown-open,.dropdown-hover:hover,:focus-within) .dropdown-content,.dropdown.dropdown-hover:not(:hover) [tabindex]:first-child:focus:not(:focus-visible)~.dropdown-content{transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover],.dropdown .dropdown-content{z-index:999}@media (prefers-reduced-motion:no-preference){.dropdown[popover],.dropdown .dropdown-content{transition-behavior:allow-discrete;transition-property:opacity,scale,display;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s dropdown}}@starting-style{.dropdown[popover],.dropdown .dropdown-content{opacity:0;scale:.95}}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within)>[tabindex]:first-child{pointer-events:none}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within) .dropdown-content,.dropdown:not(.dropdown-close).dropdown-hover:hover .dropdown-content{opacity:1;scale:1}.dropdown:is(details) summary::-webkit-details-marker{display:none}.dropdown:where([popover]){background:0 0}.dropdown[popover]{color:inherit;position:fixed}@supports not (position-area:bottom){.dropdown[popover]{margin:auto}.dropdown[popover].dropdown-close{transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover].dropdown-open:not(:popover-open){transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover]::backdrop{background-color:oklab(0% none none/.3)}}:is(.dropdown[popover].dropdown-close,.dropdown[popover]:not(.dropdown-open,:popover-open)){transform-origin:top;opacity:0;display:none;scale:.95}:where(.btn){width:unset}.btn{cursor:pointer;text-align:center;vertical-align:middle;outline-offset:2px;webkit-user-select:none;-webkit-user-select:none;user-select:none;padding-inline:var(--btn-p);color:var(--btn-fg);--tw-prose-links:var(--btn-fg);height:var(--size);font-size:var(--fontsize,.875rem);outline-color:var(--btn-color,var(--color-base-content));background-color:var(--btn-bg);background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--btn-noise);border-width:var(--border);border-style:solid;border-color:var(--btn-border);text-shadow:0 .5px oklch(100% 0 0 / calc(var(--depth) * .15));touch-action:manipulation;box-shadow:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%)) inset, var(--btn-shadow);--size:calc(var(--size-field,.25rem) * 10);--btn-bg:var(--btn-color,var(--color-base-200));--btn-fg:var(--color-base-content);--btn-p:1rem;--btn-border:var(--btn-bg);border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-wrap:nowrap;flex-shrink:0;justify-content:center;align-items:center;gap:.375rem;font-weight:600;transition-property:color,background-color,border-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:inline-flex}@supports (color:color-mix(in lab, red, red)){.btn{--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn{--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn{--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}.btn{--btn-noise:var(--fx-noise)}@media (hover:hover){.btn:hover{--btn-bg:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab, red, red)){.btn:hover{--btn-bg:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 7%)}}}.btn:focus-visible{isolation:isolate;outline-width:2px;outline-style:solid}.btn:has(:focus-visible){isolation:isolate;outline-width:2px;outline-style:solid}.btn:active:not(.btn-active){--btn-bg:var(--btn-color,var(--color-base-200));translate:0 .5px}@supports (color:color-mix(in lab, red, red)){.btn:active:not(.btn-active){--btn-bg:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 5%)}}.btn:active:not(.btn-active){--btn-border:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab, red, red)){.btn:active:not(.btn-active){--btn-border:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 7%)}}.btn:active:not(.btn-active){--btn-shadow:0 0 0 0 oklch(0% 0 0/0), 0 0 0 0 oklch(0% 0 0/0)}.btn:is(input[type=checkbox],input[type=radio]){appearance:none}.btn:is(input[type=checkbox],input[type=radio])[aria-label]:after{--tw-content:attr(aria-label);content:var(--tw-content)}.btn:where(input:checked:not(.filter .btn)){--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content);isolation:isolate}.loading{pointer-events:none;aspect-ratio:1;vertical-align:middle;width:calc(var(--size-selector,.25rem) * 6);background-color:currentColor;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.collapse{border-radius:var(--radius-box,1rem);isolation:isolate;grid-template-rows:max-content 0fr;grid-template-columns:minmax(0,1fr);width:100%;display:grid;position:relative;overflow:hidden}@media (prefers-reduced-motion:no-preference){.collapse{transition:grid-template-rows .2s}}.collapse>input:is([type=checkbox],[type=radio]){appearance:none;opacity:0;z-index:1;grid-row-start:1;grid-column-start:1;width:100%;min-height:1lh;padding:1rem;padding-inline-end:3rem;transition:background-color .2s ease-out}.collapse:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close)){grid-template-rows:max-content 1fr}.collapse:not(.collapse-close):has(>input:is([type=checkbox],[type=radio]):checked){grid-template-rows:max-content 1fr}.collapse:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){content-visibility:visible;min-height:fit-content}@supports not (content-visibility:visible){.collapse:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){visibility:visible}}.collapse:focus-visible{outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:has(>input:is([type=checkbox],[type=radio]):focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:has(summary:focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(.collapse-close)>input[type=checkbox],.collapse:not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(.collapse-close)>.collapse-title{cursor:pointer}:is(.collapse[tabindex]:focus:not(.collapse-close,.collapse[open]),.collapse[tabindex]:focus-within:not(.collapse-close,.collapse[open]))>.collapse-title{cursor:unset}.collapse:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>:where(.collapse-content),.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){padding-bottom:1rem}.collapse:is(details){width:100%}@media (prefers-reduced-motion:no-preference){.collapse:is(details)::details-content{transition:content-visibility .2s allow-discrete, visibility .2s allow-discrete, min-height .2s ease-out allow-discrete, padding .1s ease-out 20ms, background-color .2s ease-out, height .2s;interpolate-size:allow-keywords;height:0}.collapse:is(details):where([open])::details-content{height:auto}}.collapse:is(details) summary{display:block;position:relative}.collapse:is(details) summary::-webkit-details-marker{display:none}.collapse:is(details)>.collapse-content{content-visibility:visible}.collapse:is(details) summary{outline:none}.validator:user-valid{--input-color:var(--color-success)}.validator:user-valid:focus{--input-color:var(--color-success)}.validator:user-valid:checked{--input-color:var(--color-success)}.validator:user-valid[aria-checked=true]{--input-color:var(--color-success)}.validator:user-valid:focus-within{--input-color:var(--color-success)}.validator:has(:user-valid){--input-color:var(--color-success)}.validator:has(:user-valid):focus{--input-color:var(--color-success)}.validator:has(:user-valid):checked{--input-color:var(--color-success)}.validator:has(:user-valid)[aria-checked=true]{--input-color:var(--color-success)}.validator:has(:user-valid):focus-within{--input-color:var(--color-success)}.validator:user-invalid{--input-color:var(--color-error)}.validator:user-invalid:focus{--input-color:var(--color-error)}.validator:user-invalid:checked{--input-color:var(--color-error)}.validator:user-invalid[aria-checked=true]{--input-color:var(--color-error)}.validator:user-invalid:focus-within{--input-color:var(--color-error)}.validator:user-invalid~.validator-hint{visibility:visible;color:var(--color-error)}.validator:has(:user-invalid){--input-color:var(--color-error)}.validator:has(:user-invalid):focus{--input-color:var(--color-error)}.validator:has(:user-invalid):checked{--input-color:var(--color-error)}.validator:has(:user-invalid)[aria-checked=true]{--input-color:var(--color-error)}.validator:has(:user-invalid):focus-within{--input-color:var(--color-error)}.validator:has(:user-invalid)~.validator-hint{visibility:visible;color:var(--color-error)}:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))),:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))):focus,:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))):checked,:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false])))[aria-checked=true],:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))):focus-within{--input-color:var(--color-error)}:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false])))~.validator-hint{visibility:visible;color:var(--color-error)}.list{flex-direction:column;font-size:.875rem;display:flex}.list .list-row{--list-grid-cols:minmax(0, auto) 1fr;border-radius:var(--radius-box);word-break:break-word;grid-auto-flow:column;grid-template-columns:var(--list-grid-cols);gap:1rem;padding:1rem;display:grid;position:relative}:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{content:"";border-bottom:var(--border) solid;inset-inline:var(--radius-box);border-color:var(--color-base-content);position:absolute;bottom:0}@supports (color:color-mix(in lab, red, red)){:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{border-color:color-mix(in oklab, var(--color-base-content) 5%, transparent)}}.toggle{border:var(--border) solid currentColor;color:var(--input-color);cursor:pointer;appearance:none;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--toggle-p), var(--radius-selector-max)) + min(var(--border), var(--radius-selector-max)));padding:var(--toggle-p);flex-shrink:0;grid-template-columns:0fr 1fr 1fr;place-content:center;display:inline-grid;position:relative;box-shadow:inset 0 1px}@supports (color:color-mix(in lab, red, red)){.toggle{box-shadow:0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000) inset}}.toggle{--input-color:var(--color-base-content);transition:color .3s,grid-template-columns .2s}@supports (color:color-mix(in lab, red, red)){.toggle{--input-color:color-mix(in oklab, var(--color-base-content) 50%, #0000)}}.toggle{--toggle-p:calc(var(--size) * .125);--size:calc(var(--size-selector,.25rem) * 6);width:calc((var(--size) * 2) - (var(--border) + var(--toggle-p)) * 2);height:var(--size)}.toggle>*{z-index:1;cursor:pointer;appearance:none;background-color:#0000;border:none;grid-column:2/span 1;grid-row-start:1;height:100%;padding:.125rem;transition:opacity .2s,rotate .4s}.toggle>:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.toggle>:focus{outline-offset:2px;outline:2px solid #0000}}.toggle>:nth-child(2){color:var(--color-base-100);rotate:0deg}.toggle>:nth-child(3){color:var(--color-base-100);opacity:0;rotate:-15deg}.toggle:has(:checked)>:nth-child(2){opacity:0;rotate:15deg}.toggle:has(:checked)>:nth-child(3){opacity:1;rotate:0deg}.toggle:before{aspect-ratio:1;border-radius:var(--radius-selector);--tw-content:"";content:var(--tw-content);width:100%;height:100%;box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor;background-color:currentColor;grid-row-start:1;grid-column-start:2;transition:background-color .1s,translate .2s,inset-inline-start .2s;position:relative;inset-inline-start:0;translate:0}@supports (color:color-mix(in lab, red, red)){.toggle:before{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000)}}.toggle:before{background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise)}@media (forced-colors:active){.toggle:before{outline-style:var(--tw-outline-style);outline-offset:calc(1px * -1);outline-width:1px}}@media print{.toggle:before{outline-offset:-1rem;outline:.25rem solid}}.toggle:focus-visible{outline-offset:2px;outline:2px solid}.toggle:has(:focus-visible){outline-offset:2px;outline:2px solid}.toggle:checked,.toggle[aria-checked=true]{background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle:has(>input:checked){background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}:is(.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked)):before{background-color:currentColor}@starting-style{:is(.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked)):before{opacity:0}}.toggle:indeterminate{grid-template-columns:.5fr 1fr .5fr}.toggle:disabled{cursor:not-allowed;opacity:.3}.toggle:disabled:before{border:var(--border) solid currentColor;background-color:#0000}.input{cursor:text;border:var(--border) solid #0000;appearance:none;background-color:var(--color-base-100);vertical-align:middle;white-space:nowrap;width:clamp(3rem,20rem,100%);height:var(--size);font-size:max(var(--font-size,.875rem), .875rem);touch-action:manipulation;border-color:var(--input-color);box-shadow:0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-shrink:1;align-items:center;gap:.5rem;padding-inline:.75rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab, red, red)){.input{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}}.input{--size:calc(var(--size-field,.25rem) * 10);--input-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.input{--input-color:color-mix(in oklab, var(--color-base-content) 20%, #0000)}}.input:where(input){display:inline-flex}.input :where(input){appearance:none;background-color:#0000;border:none;width:100%;height:100%;display:inline-flex}.input :where(input):focus,.input :where(input):focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.input :where(input):focus,.input :where(input):focus-within{outline-offset:2px;outline:2px solid #0000}}.input :where(input[type=url]),.input :where(input[type=email]){direction:ltr}.input :where(input[type=date]){display:inline-flex}.input:focus,.input:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.input:focus,.input:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.input:focus,.input:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.input:focus,.input:focus-within{--font-size:1rem}}}.input:is(:disabled,[disabled]),fieldset:disabled .input{cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}.input:has(>input[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.input:is(:disabled,[disabled]),fieldset:disabled .input{color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}.input:has(>input[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input)::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input)::placeholder{color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.input:is(:disabled,[disabled]),fieldset:disabled .input{box-shadow:none}.input:has(>input[disabled]){box-shadow:none}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.input[type=number]::-webkit-inner-spin-button{margin-block:-.75rem;margin-inline-end:-.75rem}.input::-webkit-calendar-picker-indicator{position:absolute;inset-inline-end:.75em}.input:has(>input[type=date]) :where(input[type=date]){webkit-appearance:none;appearance:none;display:inline-flex}.input:has(>input[type=date]) input[type=date]::-webkit-calendar-picker-indicator{cursor:pointer;width:1em;height:1em;position:absolute;inset-inline-end:.75em}.range{appearance:none;webkit-appearance:none;--range-thumb:var(--color-base-100);--range-thumb-size:calc(var(--size-selector,.25rem) * 6);--range-progress:currentColor;--range-fill:1;--range-p:.25rem;--range-bg:currentColor}@supports (color:color-mix(in lab, red, red)){.range{--range-bg:color-mix(in oklab, currentColor 10%, #0000)}}.range{cursor:pointer;vertical-align:middle;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));width:clamp(3rem,20rem,100%);height:var(--range-thumb-size);background-color:#0000;border:none;overflow:hidden}[dir=rtl] .range{--range-dir:-1}.range:focus{outline:none}.range:focus-visible{outline-offset:2px;outline:2px solid}.range::-webkit-slider-runnable-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size) * .5)}@media (forced-colors:active){.range::-webkit-slider-runnable-track{border:1px solid}.range::-moz-range-track{border:1px solid}}.range::-webkit-slider-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));background-color:var(--range-thumb);height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p) solid;appearance:none;webkit-appearance:none;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor, 0 0 0 2rem var(--range-thumb) inset, calc((var(--range-dir,1) * -100cqw) - (var(--range-dir,1) * var(--range-thumb-size) / 2)) 0 0 calc(100cqw * var(--range-fill));position:relative;top:50%;transform:translateY(-50%)}@supports (color:color-mix(in lab, red, red)){.range::-webkit-slider-thumb{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000), 0 0 0 2rem var(--range-thumb) inset, calc((var(--range-dir,1) * -100cqw) - (var(--range-dir,1) * var(--range-thumb-size) / 2)) 0 0 calc(100cqw * var(--range-fill))}}.range::-moz-range-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size) * .5)}.range::-moz-range-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p) solid;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor, 0 0 0 2rem var(--range-thumb) inset, calc((var(--range-dir,1) * -100cqw) - (var(--range-dir,1) * var(--range-thumb-size) / 2)) 0 0 calc(100cqw * var(--range-fill));background-color:currentColor;position:relative;top:50%}@supports (color:color-mix(in lab, red, red)){.range::-moz-range-thumb{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000), 0 0 0 2rem var(--range-thumb) inset, calc((var(--range-dir,1) * -100cqw) - (var(--range-dir,1) * var(--range-thumb-size) / 2)) 0 0 calc(100cqw * var(--range-fill))}}.range:disabled{cursor:not-allowed;opacity:.3}.swap{cursor:pointer;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;place-content:center;display:inline-grid;position:relative}.swap input{appearance:none;border:none}.swap>*{grid-row-start:1;grid-column-start:1}@media (prefers-reduced-motion:no-preference){.swap>*{transition-property:transform,rotate,opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}}.swap .swap-on,.swap .swap-indeterminate,.swap input:indeterminate~.swap-on,.swap input:is(:checked,:indeterminate)~.swap-off{opacity:0}.swap input:checked~.swap-on,.swap input:indeterminate~.swap-indeterminate{opacity:1;backface-visibility:visible}.avatar{vertical-align:middle;display:inline-flex;position:relative}.avatar>div{aspect-ratio:1;display:block;overflow:hidden}.avatar img{object-fit:cover;width:100%;height:100%}.checkbox{border:var(--border) solid var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox{border:var(--border) solid var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox{cursor:pointer;appearance:none;border-radius:var(--radius-selector);vertical-align:middle;color:var(--color-base-content);box-shadow:0 1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 0 #0000 inset, 0 0 #0000;--size:calc(var(--size-selector,.25rem) * 6);width:var(--size);height:var(--size);background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise);flex-shrink:0;padding:.25rem;transition:background-color .2s,box-shadow .2s;display:inline-block;position:relative}.checkbox:before{--tw-content:"";content:var(--tw-content);opacity:0;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,70% 80%,70% 100%);width:100%;height:100%;box-shadow:0px 3px 0 0px oklch(100% 0 0 / calc(var(--depth) * .1)) inset;background-color:currentColor;font-size:1rem;line-height:.75;transition:clip-path .3s .1s,opacity .1s .1s,rotate .3s .1s,translate .3s .1s;display:block;rotate:45deg}.checkbox:focus-visible{outline:2px solid var(--input-color,currentColor);outline-offset:2px}.checkbox:checked,.checkbox[aria-checked=true]{background-color:var(--input-color,#0000);box-shadow:0 0 #0000 inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px oklch(0% 0 0 / calc(var(--depth) * .1))}:is(.checkbox:checked,.checkbox[aria-checked=true]):before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media (forced-colors:active){:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}@media print{:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}.checkbox:indeterminate{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox:indeterminate{background-color:var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox:indeterminate:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:0deg}.card{border-radius:var(--radius-box);outline-offset:2px;outline:0 solid #0000;flex-direction:column;transition:outline .2s ease-in-out;display:flex;position:relative}.card:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.card:focus{outline-offset:2px;outline:2px solid #0000}}.card:focus-visible{outline-color:currentColor}.card :where(figure:first-child){border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-end-radius:unset;border-end-start-radius:unset;overflow:hidden}.card :where(figure:last-child){border-start-start-radius:unset;border-start-end-radius:unset;border-end-end-radius:inherit;border-end-start-radius:inherit;overflow:hidden}.card figure{justify-content:center;align-items:center;display:flex}.card:has(>input:is(input[type=checkbox],input[type=radio])){cursor:pointer;-webkit-user-select:none;user-select:none}.card:has(>:checked){outline:2px solid}.textarea{border:var(--border) solid #0000;appearance:none;border-radius:var(--radius-field);background-color:var(--color-base-100);vertical-align:middle;width:clamp(3rem,20rem,100%);min-height:5rem;font-size:max(var(--font-size,.875rem), .875rem);touch-action:manipulation;border-color:var(--input-color);box-shadow:0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset;flex-shrink:1;padding-block:.5rem;padding-inline:.75rem}@supports (color:color-mix(in lab, red, red)){.textarea{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}}.textarea{--input-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.textarea{--input-color:color-mix(in oklab, var(--color-base-content) 20%, #0000)}}.textarea textarea{appearance:none;background-color:#0000;border:none}.textarea textarea:focus,.textarea textarea:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.textarea textarea:focus,.textarea textarea:focus-within{outline-offset:2px;outline:2px solid #0000}}.textarea:focus,.textarea:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.textarea:focus,.textarea:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.textarea:focus,.textarea:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.textarea:focus,.textarea:focus-within{--font-size:1rem}}}.textarea:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}.textarea:has(>textarea[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.textarea:is(:disabled,[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}.textarea:has(>textarea[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder{color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.textarea:is(:disabled,[disabled]){box-shadow:none}.textarea:has(>textarea[disabled]){box-shadow:none}.textarea:has(>textarea[disabled])>textarea[disabled]{cursor:not-allowed}.stack{grid-template-rows:3px 4px 1fr 4px 3px;grid-template-columns:3px 4px 1fr 4px 3px;display:inline-grid}.stack>*{width:100%;height:100%}.stack>:nth-child(n+2){opacity:.7;width:100%}.stack>:nth-child(2){z-index:2;opacity:.9}.stack>:first-child{z-index:3;width:100%}.filter{flex-wrap:wrap;display:flex}.filter input[type=radio]{width:auto}.filter input{opacity:1;transition:margin .1s,opacity .3s,padding .3s,border-width .1s;overflow:hidden;scale:1}.filter input:not(:last-child){margin-inline-end:.25rem}.filter input.filter-reset{aspect-ratio:1}.filter input.filter-reset:after{--tw-content:"×";content:var(--tw-content)}.filter:not(:has(input:checked:not(.filter-reset))) .filter-reset{opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}.filter:not(:has(input:checked:not(.filter-reset))) input[type=reset]{opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}.filter:has(input:checked:not(.filter-reset)) input:not(:checked,.filter-reset,input[type=reset]){opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}.label{white-space:nowrap;color:currentColor;align-items:center;gap:.375rem;display:inline-flex}@supports (color:color-mix(in lab, red, red)){.label{color:color-mix(in oklab, currentcolor 60%, transparent)}}.label:has(input){cursor:pointer}.label:is(.input>*,.select>*){white-space:nowrap;height:calc(100% - .5rem);font-size:inherit;align-items:center;padding-inline:.75rem;display:flex}.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid currentColor;margin-inline:-.75rem .75rem}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid currentColor;margin-inline:.75rem -.75rem}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.status{aspect-ratio:1;border-radius:var(--radius-selector);background-color:var(--color-base-content);width:.5rem;height:.5rem;display:inline-block}@supports (color:color-mix(in lab, red, red)){.status{background-color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.status{vertical-align:middle;color:#0000004d;background-position:50%;background-repeat:no-repeat}@supports (color:color-mix(in lab, red, red)){.status{color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.status{background-image:radial-gradient(circle at 35% 30%, oklch(1 0 0 / calc(var(--depth) * .5)), #0000);box-shadow:0 2px 3px -1px}@supports (color:color-mix(in lab, red, red)){.status{box-shadow:0 2px 3px -1px color-mix(in oklab, currentColor calc(var(--depth) * 100%), #0000)}}.badge{border-radius:var(--radius-selector);vertical-align:middle;color:var(--badge-fg);border:var(--border) solid var(--badge-color,var(--color-base-200));background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise);background-color:var(--badge-bg);--badge-bg:var(--badge-color,var(--color-base-100));--badge-fg:var(--color-base-content);--size:calc(var(--size-selector,.25rem) * 6);width:fit-content;height:var(--size);padding-inline:calc(var(--size) / 2 - var(--border));justify-content:center;align-items:center;gap:.5rem;font-size:.875rem;display:inline-flex}.tabs{--tabs-height:auto;--tabs-direction:row;--tab-height:calc(var(--size-field,.25rem) * 10);height:var(--tabs-height);flex-wrap:wrap;flex-direction:var(--tabs-direction);display:flex}.card-body{padding:var(--card-p,1.5rem);font-size:var(--card-fs,.875rem);flex-direction:column;flex:auto;gap:.5rem;display:flex}.card-body :where(p){flex-grow:1}.alert{--alert-border-color:var(--color-base-200);border-radius:var(--radius-box);color:var(--color-base-content);background-color:var(--alert-color,var(--color-base-200));text-align:start;background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise);box-shadow:0 3px 0 -2px oklch(100% 0 0 / calc(var(--depth) * .08)) inset, 0 1px #000, 0 4px 3px -2px oklch(0% 0 0 / calc(var(--depth) * .08));border-style:solid;grid-template-columns:auto;grid-auto-flow:column;justify-content:start;place-items:center start;gap:1rem;padding-block:.75rem;padding-inline:1rem;font-size:.875rem;line-height:1.25rem;display:grid}@supports (color:color-mix(in lab, red, red)){.alert{box-shadow:0 3px 0 -2px oklch(100% 0 0 / calc(var(--depth) * .08)) inset, 0 1px color-mix(in oklab, color-mix(in oklab, #000 20%, var(--alert-color,var(--color-base-200))) calc(var(--depth) * 20%), #0000), 0 4px 3px -2px oklch(0% 0 0 / calc(var(--depth) * .08))}}.alert:has(:nth-child(2)){grid-template-columns:auto minmax(auto,1fr)}.chat{--mask-chat:url("data:image/svg+xml,%3csvg width='13' height='13' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='M0 11.5004C0 13.0004 2 13.0004 2 13.0004H12H13V0.00036329L12.5 0C12.5 0 11.977 2.09572 11.8581 2.50033C11.6075 3.35237 10.9149 4.22374 9 5.50036C6 7.50036 0 10.0004 0 11.5004Z'/%3e%3c/svg%3e");grid-auto-rows:min-content;column-gap:.75rem;padding-block:.25rem;display:grid}.card-title{font-size:var(--cardtitle-fs,1.125rem);align-items:center;gap:.5rem;font-weight:600;display:flex}.mask{vertical-align:middle;display:inline-block;-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.link{cursor:pointer;text-decoration-line:underline}.link:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.link:focus{outline-offset:2px;outline:2px solid #0000}}.link:focus-visible{outline-offset:2px;outline:2px solid}.btn-accent{--btn-color:var(--color-accent);--btn-fg:var(--color-accent-content)}.btn-error{--btn-color:var(--color-error);--btn-fg:var(--color-error-content)}.btn-info{--btn-color:var(--color-info);--btn-fg:var(--color-info-content)}.btn-neutral{--btn-color:var(--color-neutral);--btn-fg:var(--color-neutral-content)}.btn-primary{--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content)}}@layer daisyui.l1.l2{.tooltip>.tooltip-content,.tooltip[data-tip]:before{transform:translateX(-50%) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-off) 50%}.tooltip:after{transform:translateX(-50%) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-tail) 50%}.btn:disabled:not(.btn-link,.btn-ghost){background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.btn:disabled:not(.btn-link,.btn-ghost){background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.btn:disabled:not(.btn-link,.btn-ghost){box-shadow:none}.btn:disabled{pointer-events:none;--btn-border:#0000;--btn-noise:none;--btn-fg:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.btn:disabled{--btn-fg:color-mix(in oklch, var(--color-base-content) 20%, #0000)}}.btn[disabled]:not(.btn-link,.btn-ghost){background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.btn[disabled]:not(.btn-link,.btn-ghost){background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.btn[disabled]:not(.btn-link,.btn-ghost){box-shadow:none}.btn[disabled]{pointer-events:none;--btn-border:#0000;--btn-noise:none;--btn-fg:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.btn[disabled]{--btn-fg:color-mix(in oklch, var(--color-base-content) 20%, #0000)}}@media (prefers-reduced-motion:no-preference){.collapse[open].collapse-arrow>.collapse-title:after,.collapse.collapse-open.collapse-arrow>.collapse-title:after{transform:translateY(-50%)rotate(225deg)}}.collapse.collapse-open.collapse-plus>.collapse-title:after{--tw-content:"−";content:var(--tw-content)}:is(.collapse[tabindex].collapse-arrow:focus:not(.collapse-close),.collapse.collapse-arrow[tabindex]:focus-within:not(.collapse-close))>.collapse-title:after,.collapse.collapse-arrow:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{transform:translateY(-50%)rotate(225deg)}.collapse[open].collapse-plus>.collapse-title:after,.collapse[tabindex].collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse.collapse-plus:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{--tw-content:"−";content:var(--tw-content)}.list .list-row:has(.list-col-grow:first-child){--list-grid-cols:1fr}.list .list-row:has(.list-col-grow:nth-child(2)){--list-grid-cols:minmax(0, auto) 1fr}.list .list-row:has(.list-col-grow:nth-child(3)){--list-grid-cols:minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(.list-col-grow:nth-child(4)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(.list-col-grow:nth-child(5)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(.list-col-grow:nth-child(6)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row>*{grid-row-start:1}.checkbox:disabled{cursor:not-allowed;opacity:.2}:is(.stack,.stack.stack-bottom)>*{grid-area:3/3/6/4}:is(.stack,.stack.stack-bottom)>:nth-child(2){grid-area:2/2/5/5}:is(.stack,.stack.stack-bottom)>:first-child{grid-area:1/1/4/6}.stack.stack-top>*{grid-area:1/3/4/4}.stack.stack-top>:nth-child(2){grid-area:2/2/5/5}.stack.stack-top>:first-child{grid-area:3/1/6/6}.stack.stack-start>*{grid-area:3/1/4/4}.stack.stack-start>:nth-child(2){grid-area:2/2/5/5}.stack.stack-start>:first-child{grid-area:1/3/6/6}.stack.stack-end>*{grid-area:3/3/4/6}.stack.stack-end>:nth-child(2){grid-area:2/2/5/5}.stack.stack-end>:first-child{grid-area:1/1/6/4}.btn-circle{width:var(--size);height:var(--size);border-radius:3.40282e38px;padding-inline:0}.loading-md{width:calc(var(--size-selector,.25rem) * 6)}.loading-sm{width:calc(var(--size-selector,.25rem) * 5)}.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}.checkbox-sm{--size:calc(var(--size-selector,.25rem) * 5);padding:.1875rem}.checkbox-xs{--size:calc(var(--size-selector,.25rem) * 4);padding:.125rem}.textarea-sm{font-size:max(var(--font-size,.75rem), .75rem)}.checkbox-secondary{color:var(--color-secondary-content);--input-color:var(--color-secondary)}.btn-sm{--fontsize:.75rem;--btn-p:.75rem;--size:calc(var(--size-field,.25rem) * 8)}.btn-xs{--fontsize:.6875rem;--btn-p:.5rem;--size:calc(var(--size-field,.25rem) * 6)}}.prose :where(a.btn:not(.btn-link)):not(:where([class~=not-prose],[class~=not-prose] *)){text-decoration-line:none}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse:not(td,tr,colgroup){visibility:revert-layer}.validator:user-invalid~.validator-hint{display:revert-layer}.validator:has(:user-invalid)~.validator-hint{display:revert-layer}:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false])))~.validator-hint{display:revert-layer}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.inset-4{inset:calc(var(--spacing) * 4)}.inset-\\[12\\%\\]{inset:12%}.inset-\\[28\\%\\]{inset:28%}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.-top-2{top:calc(var(--spacing) * -2)}.top-0{top:calc(var(--spacing) * 0)}.top-1\\/2{top:50%}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:calc(var(--spacing) * 0)}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.right-\\[-6px\\]{right:-6px}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-6{bottom:calc(var(--spacing) * 6)}.bottom-24{bottom:calc(var(--spacing) * 24)}.bottom-full{bottom:100%}.-left-2{left:calc(var(--spacing) * -2)}.left-0{left:calc(var(--spacing) * 0)}.left-1\\/2{left:50%}.left-4{left:calc(var(--spacing) * 4)}.left-\\[-6px\\]{left:-6px}.join{--join-ss:0;--join-se:0;--join-es:0;--join-ee:0;align-items:stretch;display:inline-flex}.join :where(.join-item){border-start-start-radius:var(--join-ss,0);border-start-end-radius:var(--join-se,0);border-end-end-radius:var(--join-ee,0);border-end-start-radius:var(--join-es,0)}.join :where(.join-item) *{--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}.join>.join-item:where(:first-child),.join :first-child:not(:last-child) :where(.join-item){--join-ss:var(--radius-field);--join-se:0;--join-es:var(--radius-field);--join-ee:0}.join>.join-item:where(:last-child),.join :last-child:not(:first-child) :where(.join-item){--join-ss:0;--join-se:var(--radius-field);--join-es:0;--join-ee:var(--radius-field)}.join>.join-item:where(:only-child),.join :only-child :where(.join-item){--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}.join>:where(:focus,:has(:focus)){z-index:1}@media (hover:hover){.join>:where(.btn:hover,:has(.btn:hover)){isolation:isolate}}.z-0{z-index:0}.z-2{z-index:2}.z-5{z-index:5}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-\\[5\\]{z-index:5}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.my-auto{margin-block:auto}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.alert{border-width:var(--border);border-color:var(--alert-border-color,var(--color-base-200))}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.aspect-9\\/16{aspect-ratio:9/16}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.select-control-pill{--size:calc(var(--size-field,.25rem) * 10);--icon-size:calc(var(--size-field,.25rem) * 5);--chevron-size:calc(var(--size-field,.25rem) * 3);width:calc(var(--size) + 1.25rem);height:var(--size);border-radius:var(--radius-field)}.btn-control{--icon-size:calc(var(--size-field,.25rem) * 5);width:var(--size);height:var(--size);padding-inline:0}.size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.h-0{height:calc(var(--spacing) * 0)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-16{height:calc(var(--spacing) * 16)}.h-\\[100dvh\\]{height:100dvh}.h-\\[min\\(34rem\\,calc\\(100dvh-3rem\\)\\)\\]{height:min(34rem,100dvh - 3rem)}.h-full{height:100%}.max-h-15{max-height:calc(var(--spacing) * 15)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-screen{max-height:100vh}.min-h-0{min-height:calc(var(--spacing) * 0)}.w-0{width:calc(var(--spacing) * 0)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-32{width:calc(var(--spacing) * 32)}.w-64{width:calc(var(--spacing) * 64)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[3px\\]{width:3px}.w-\\[22rem\\]{width:22rem}.w-\\[100vw\\]{width:100vw}.w-\\[min\\(28rem\\,calc\\(100vw_-_2rem\\)\\)\\]{width:min(28rem,100vw - 2rem)}.w-full{width:100%}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-\\[80\\%\\]{max-width:80%}.max-w-\\[90\\%\\]{max-width:90%}.max-w-\\[min\\(20rem\\,90\\%\\)\\]{max-width:min(20rem,90%)}.max-w-\\[min\\(48cqi\\,16rem\\)\\]{max-width:min(48cqi,16rem)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-5{--tw-translate-y:calc(var(--spacing) * 5);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-\\[0\\.98\\]{scale:.98}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[tavusFadeUp_180ms_ease-out\\]{animation:.18s ease-out tavusFadeUp}.animate-\\[tavusFadeUp_240ms_ease-out\\]{animation:.24s ease-out tavusFadeUp}.animate-\\[tavusPopIn_180ms_ease-out\\]{animation:.18s ease-out tavusPopIn}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.appearance-none{appearance:none}.grid-rows-\\[1fr_auto\\]{grid-template-rows:1fr auto}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-stretch{justify-content:stretch}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-\\[2px\\]{gap:2px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-box{border-radius:var(--radius-box);border-radius:var(--radius-box)}.rounded-field{border-radius:var(--radius-field);border-radius:var(--radius-field)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-base-300{border-color:var(--color-base-300)}.bg-base-100,.bg-base-100\\/70{background-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.bg-base-100\\/70{background-color:color-mix(in oklab, var(--color-base-100) 70%, transparent)}}.bg-base-100\\/95{background-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.bg-base-100\\/95{background-color:color-mix(in oklab, var(--color-base-100) 95%, transparent)}}.bg-base-200{background-color:var(--color-base-200)}.bg-base-300{background-color:var(--color-base-300)}.bg-black{background-color:var(--color-black)}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\\/45{background-color:#00000073}@supports (color:color-mix(in lab, red, red)){.bg-black\\/45{background-color:color-mix(in oklab, var(--color-black) 45%, transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-error{background-color:var(--color-error)}.bg-neutral{background-color:var(--color-neutral)}.bg-primary,.bg-primary\\/15{background-color:var(--color-primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\\/15{background-color:color-mix(in oklab, var(--color-primary) 15%, transparent)}}.bg-transparent{background-color:#0000}.bg-linear-to-br{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-br{--tw-gradient-position:to bottom right in oklab}}.bg-linear-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-t{--tw-gradient-position:to top}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-t{--tw-gradient-position:to top in oklab}}.bg-linear-to-t{background-image:linear-gradient(var(--tw-gradient-stops))}.from-base-300{--tw-gradient-from:var(--color-base-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/30{--tw-gradient-from:#0000004d}@supports (color:color-mix(in lab, red, red)){.from-black\\/30{--tw-gradient-from:color-mix(in oklab, var(--color-black) 30%, transparent)}}.from-black\\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-black\\/10{--tw-gradient-via:#0000001a}@supports (color:color-mix(in lab, red, red)){.via-black\\/10{--tw-gradient-via:color-mix(in oklab, var(--color-black) 10%, transparent)}}.via-black\\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-base-200{--tw-gradient-to:var(--color-base-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-cover\\!{object-fit:cover!important}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-2\\.5{padding-left:calc(var(--spacing) * 2.5)}.text-center{text-align:center}.text-left{text-align:left}.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-\\[10px\\]{font-size:10px}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.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)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.text-base-content,.text-base-content\\/40{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/40{color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.text-base-content\\/50{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/50{color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}.text-base-content\\/60{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/60{color:color-mix(in oklab, var(--color-base-content) 60%, transparent)}}.text-base-content\\/70{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/70{color:color-mix(in oklab, var(--color-base-content) 70%, transparent)}}.text-error{color:var(--color-error)}.text-error-content{color:var(--color-error-content)}.text-neutral{color:var(--color-neutral)}.text-neutral-content{color:var(--color-neutral-content)}.text-primary{color:var(--color-primary)}.text-primary-content{color:var(--color-primary-content)}.text-secondary{color:var(--color-secondary)}.text-white{color:var(--color-white)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-100{opacity:1}.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-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)}.shadow-sm{--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-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px 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)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}@layer daisyui.l1{.btn-ghost:not(.btn-active,:hover,:active:focus,:focus-visible,input:checked:not(.filter .btn)){--btn-shadow:"";--btn-bg:#0000;--btn-border:#0000;--btn-noise:none}.btn-ghost:not(.btn-active,:hover,:active:focus,:focus-visible,input:checked:not(.filter .btn)):not(:disabled,[disabled],.btn-disabled){--btn-fg:var(--btn-color,currentColor);outline-color:currentColor}@media (hover:none){.btn-ghost:not(.btn-active,:active,:focus-visible,input:checked:not(.filter .btn)):hover{--btn-shadow:"";--btn-bg:#0000;--btn-fg:var(--btn-color,currentColor);--btn-border:#0000;--btn-noise:none;outline-color:currentColor}}.btn-outline:not(.btn-active,:hover,:active:focus,:focus-visible,input:checked:not(.filter .btn),:disabled,[disabled],.btn-disabled){--btn-shadow:"";--btn-bg:#0000;--btn-fg:var(--btn-color);--btn-border:var(--btn-color);--btn-noise:none}@media (hover:none){.btn-outline:not(.btn-active,:active,:focus-visible,input:checked:not(.filter .btn)):hover{--btn-shadow:"";--btn-bg:#0000;--btn-fg:var(--btn-color);--btn-border:var(--btn-color);--btn-noise:none}}}.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{--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-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-xs{--tw-backdrop-blur:blur(var(--blur-xs));-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-\\[opacity\\,transform\\]{transition-property:opacity,transform;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))}.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))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-transform{will-change:transform}.btn{--icon-size:calc(var(--size-field,.25rem) * 5)}@media (hover:hover){.hover\\:bg-base-200:hover{background-color:var(--color-base-200)}.hover\\:text-base-content\\/80:hover{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-base-content\\/80:hover{color:color-mix(in oklab, var(--color-base-content) 80%, transparent)}}.hover\\:shadow-2xl:hover{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px 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)}}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){.motion-safe\\:animate-\\[tavusFadeOut_280ms_ease-out_forwards\\]{animation:.28s ease-out forwards tavusFadeOut}.motion-safe\\:animate-\\[tavusFadeUp_280ms_ease-out\\]{animation:.28s ease-out tavusFadeUp}}@container not (width>=56.25rem){.\\@max-mobile\\:right-3{right:calc(var(--spacing) * 3)}.\\@max-mobile\\:bottom-20{bottom:calc(var(--spacing) * 20)}.\\@max-mobile\\:left-3{left:calc(var(--spacing) * 3)}.\\@max-mobile\\:aspect-9\\/16{aspect-ratio:9/16}.\\@max-mobile\\:w-24{width:calc(var(--spacing) * 24)}.\\@max-mobile\\:w-full{width:100%}.\\@max-mobile\\:gap-1{gap:calc(var(--spacing) * 1)}}}.btn:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){background-color:var(--btn-bg);box-shadow:var(--btn-shadow);--btn-border:var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){--btn-noise:var(--fx-noise);--btn-fg:var(--color-base-content);opacity:.9}.btn-primary:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn-primary[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn-primary.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){--btn-fg:var(--color-primary-content)}.btn-accent:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn-accent[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn-accent.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){--btn-fg:var(--color-accent-content)}.btn-info:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn-info[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn-info.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){--btn-fg:var(--color-info-content)}.btn-error:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn-error[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn-error.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){--btn-fg:var(--color-error-content)}.btn-neutral:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn-neutral[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn-neutral.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){--btn-fg:var(--color-neutral-content)}.embed-loading-screen{isolation:isolate;background-color:var(--color-base-200);color:var(--color-base-content);flex-direction:column;justify-content:center;align-items:center;display:flex}.embed-loading-screen:before{content:"";z-index:0;pointer-events:none;opacity:.42;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'><rect x='0' y='0' width='1' height='1' fill='white' fill-opacity='0.55'/><rect x='2' y='1' width='1' height='1' fill='white' fill-opacity='0.24'/><rect x='1' y='3' width='1' height='1' fill='white' fill-opacity='0.36'/></svg>");background-size:4px 4px;position:absolute;inset:-2rem;-webkit-mask-image:radial-gradient(circle at 50% 48%,#000,#0000 72%);mask-image:radial-gradient(circle at 50% 48%,#000,#0000 72%)}.embed-loading-dot-field{z-index:1;grid-template-columns:repeat(var(--dot-columns,21), minmax(0, 1fr));grid-template-rows:repeat(var(--dot-rows,13), minmax(0, 1fr));pointer-events:none;grid-auto-rows:0;place-items:center;display:grid;position:absolute;inset:0;overflow:hidden}.embed-loading-field-dot{aspect-ratio:1;width:clamp(2px,.28vw,4px);opacity:var(--dot-opacity,.54);animation:embed-loading-field-dot 2.1s steps(5, end) var(--dot-delay,0s) infinite;background:currentColor;border-radius:999px;transform:scale(1)}@container conversation (width<=899.98px){.embed-loading-dot-field{inset:0}}@keyframes embed-loading-field-dot{0%,16%{opacity:var(--dot-opacity,.54);transform:scale(1)}42%,74%{opacity:0;transform:scale(.35)}to{opacity:var(--dot-opacity,.54);transform:scale(1)}}@media (prefers-reduced-motion:reduce){.embed-loading-field-dot{animation:none}}.cs-dot{opacity:0;animation:1.4s ease-in-out infinite cs-dot-fade;display:inline-block}.cs-dot:first-child{animation-delay:0s}.cs-dot:nth-child(2){animation-delay:.2s}.cs-dot:nth-child(3){animation-delay:.4s}@keyframes cs-dot-fade{0%,80%,to{opacity:0}40%{opacity:1}}@keyframes tavusFadeUp{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes tavusFadeOut{0%{opacity:1}to{opacity:0}}@keyframes tavusPopIn{0%{opacity:0;transform:scale(.92)translateY(8px)}to{opacity:1;transform:scale(1)translateY(0)}}@keyframes tavusOrbSpin{to{transform:rotate(360deg)}}@keyframes tavusOrbPulse{0%,to{opacity:.18;transform:scale(1)}50%{opacity:.34;transform:scale(1.18)}}.tavus-mesh-bg{isolation:isolate;background-color:var(--color-base-200);background-image:radial-gradient(ellipse 90% 90% at 18% 14%, var(--color-primary), transparent 55%), radial-gradient(ellipse 95% 90% at 82% 18%, var(--color-secondary), transparent 55%), radial-gradient(ellipse 95% 90% at 22% 88%, var(--color-accent), transparent 55%), radial-gradient(ellipse 90% 95% at 80% 84%, var(--color-info,var(--color-secondary)), transparent 55%), radial-gradient(circle at 52% 48%, var(--color-primary), transparent 60%);width:100%;height:100%;position:relative;overflow:hidden}@supports (color:color-mix(in lab, red, red)){.tavus-mesh-bg{background-image:radial-gradient(ellipse 90% 90% at 18% 14%, color-mix(in oklab, var(--color-primary) 90%, transparent), transparent 55%), radial-gradient(ellipse 95% 90% at 82% 18%, color-mix(in oklab, var(--color-secondary) 90%, transparent), transparent 55%), radial-gradient(ellipse 95% 90% at 22% 88%, color-mix(in oklab, var(--color-accent) 90%, transparent), transparent 55%), radial-gradient(ellipse 90% 95% at 80% 84%, color-mix(in oklab, var(--color-info,var(--color-secondary)) 90%, transparent), transparent 55%), radial-gradient(circle at 52% 48%, color-mix(in oklab, var(--color-primary) 35%, transparent), transparent 60%)}}.tavus-mesh-bg>.tavus-mesh-blob{filter:blur(60px);will-change:transform;pointer-events:none;opacity:.65;border-radius:50%;position:absolute}.tavus-mesh-bg>.tavus-mesh-blob-1{background-color:var(--color-primary);width:55%;height:60%;animation:23s ease-in-out infinite tavusMeshFlow1;top:6%;left:4%}.tavus-mesh-bg>.tavus-mesh-blob-2{background-color:var(--color-secondary);width:50%;height:55%;animation:28s ease-in-out infinite tavusMeshFlow2;top:10%;right:6%}.tavus-mesh-bg>.tavus-mesh-blob-3{background-color:var(--color-accent);width:58%;height:50%;animation:21s ease-in-out infinite tavusMeshFlow3;bottom:8%;left:6%}.tavus-mesh-bg>.tavus-mesh-blob-4{background-color:var(--color-info,var(--color-secondary));width:52%;height:55%;animation:26s ease-in-out infinite tavusMeshFlow4;bottom:6%;right:8%}.tavus-mesh-bg>.tavus-mesh-blob-5{background-color:var(--color-primary);opacity:.45;width:42%;height:46%;animation:19s ease-in-out infinite tavusMeshFlow5;top:28%;left:30%}@keyframes tavusMeshFlow1{0%,to{transform:translate(0%)scale(1)}20%{transform:translate(18%,10%)scale(1.08)}45%{transform:translate(10%,24%)scale(1.14)}70%{transform:translate(24%,18%)scale(1.06)}}@keyframes tavusMeshFlow2{0%,to{transform:translate(0%)scale(1)}30%{transform:translate(-22%,14%)scale(1.1)}55%{transform:translate(-30%,6%)scale(1.05)}80%{transform:translate(-12%,22%)scale(1.12)}}@keyframes tavusMeshFlow3{0%,to{transform:translate(0%)scale(1)}25%{transform:translate(20%,-14%)scale(1.06)}60%{transform:translate(28%,-22%)scale(1.14)}85%{transform:translate(14%,-10%)scale(1.04)}}@keyframes tavusMeshFlow4{0%,to{transform:translate(0%)scale(1)}35%{transform:translate(-18%,-22%)scale(1.12)}60%{transform:translate(-26%,-12%)scale(1.06)}85%{transform:translate(-8%,-26%)scale(1.1)}}@keyframes tavusMeshFlow5{0%,to{transform:translate(0%)scale(1)rotate(0)}25%{transform:translate(28%,-12%)scale(1.18)rotate(90deg)}50%{transform:translate(-6%,26%)scale(.85)rotate(180deg)}75%{transform:translate(-26%,-8%)scale(1.08)rotate(270deg)}}@media (prefers-reduced-motion:reduce){.tavus-mesh-bg>.tavus-mesh-blob{animation:none}}@keyframes rating{0%,40%{filter:brightness(1.05)contrast(1.05);scale:1.1}}@keyframes dropdown{0%{opacity:0}}@keyframes radio{0%{padding:5px}50%{padding:3px}}@keyframes toast{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes rotator{89.9999%,to{--first-item-position:0 0%}90%,99.9999%{--first-item-position:0 calc(var(--items) * 100%)}to{translate:0 -100%}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@keyframes menu{0%{opacity:0}}@keyframes progress{50%{background-position-x:-115%}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@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-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{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-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}`,Ye,Xe,Ze,Qe,$e=0,et=[],tt=d,nt=tt.__b,rt=tt.__r,it=tt.diffed,at=tt.__c,ot=tt.unmount,st=tt.__;function ct(e,t){tt.__h&&tt.__h(Xe,e,$e||t),$e=0;var n=Xe.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function E(e){return $e=1,lt(xt,e)}function lt(e,t,n){var r=ct(Ye++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):xt(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Xe,!Xe.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,t,n)||o};Xe.__f=!0;var a=Xe.shouldComponentUpdate,o=Xe.componentWillUpdate;Xe.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},Xe.shouldComponentUpdate=i}return r.__N||r.__}function D(e,t){var n=ct(Ye++,3);!tt.__s&&bt(n.__H,t)&&(n.__=e,n.u=t,Xe.__H.__h.push(n))}function ut(e,t){var n=ct(Ye++,4);!tt.__s&&bt(n.__H,t)&&(n.__=e,n.u=t,Xe.__h.push(n))}function O(e){return $e=5,k(function(){return{current:e}},[])}function dt(e,t,n){$e=6,ut(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function k(e,t){var n=ct(Ye++,7);return bt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function A(e,t){return $e=8,k(function(){return e},t)}function ft(e){var t=Xe.context[e.__c],n=ct(Ye++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(Xe)),t.props.value):e.__}function pt(e,t){tt.useDebugValue&&tt.useDebugValue(t?t(e):e)}function mt(){var e=ct(Ye++,11);if(!e.__){for(var t=Xe.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||=[0,0];e.__=`P`+n[0]+`-`+ n[1]++}return e.__}function ht(){for(var e;e=et.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(vt),t.__h.some(yt),t.__h=[]}catch(n){t.__h=[],tt.__e(n,e.__v)}}}tt.__b=function(e){Xe=null,nt&&nt(e)},tt.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),st&&st(e,t)},tt.__r=function(e){rt&&rt(e),Ye=0;var t=(Xe=e.__c).__H;t&&(Ze===Xe?(t.__h=[],Xe.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(vt),t.__h.some(yt),t.__h=[],Ye=0)),Ze=Xe},tt.diffed=function(e){it&&it(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(et.push(t)!==1&&Qe===tt.requestAnimationFrame||((Qe=tt.requestAnimationFrame)||_t)(ht)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Ze=Xe=null},tt.__c=function(e,t){t.some(function(e){try{e.__h.some(vt),e.__h=e.__h.filter(function(e){return!e.__||yt(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],tt.__e(n,e.__v)}}),at&&at(e,t)},tt.unmount=function(e){ot&&ot(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{vt(e)}catch(e){t=e}}),n.__H=void 0,t&&tt.__e(t,n.__v))};var gt=typeof requestAnimationFrame==`function`;function _t(e){var t,n=function(){clearTimeout(r),gt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);gt&&(t=requestAnimationFrame(n))}function vt(e){var t=Xe,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),Xe=t}function yt(e){var t=Xe;e.__c=e.__(),Xe=t}function bt(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function xt(e,t){return typeof t==`function`?t(e):t}var St=0;Array.isArray;function j(e,t,n,r,i,a){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:--St,__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 d.vnode&&d.vnode(l),l}var Ct=Fe(null);function wt(e){let t;if(e[`override-config`])try{t=JSON.parse(e[`override-config`])}catch{}let n=!!e.token;return{deploymentId:e[`deployment-id`],conversationUrl:e[`conversation-url`],previewToken:e.token,baseUrl:e[`base-url`],conversationalContext:Et(e[`conversational-context`]),customGreeting:Et(e[`custom-greeting`]),overrideConfig:t,mode:n?`preview`:`production`}}function Tt(e){let t=k(()=>wt({"deployment-id":e[`deployment-id`],"conversation-url":e[`conversation-url`],"override-config":e[`override-config`],"conversational-context":e[`conversational-context`],"custom-greeting":e[`custom-greeting`],"base-url":e[`base-url`],token:e.token}),[e[`deployment-id`],e[`conversation-url`],e[`override-config`],e[`conversational-context`],e[`custom-greeting`],e[`base-url`],e.token]);return j(Ct.Provider,{value:t,children:e.children})}function Et(e){return e?.trim()||void 0}var Dt=Symbol.for(`preact-signals`);function Ot(){if(Pt>1)Pt--;else{var e,t=!1;for((function(){var e=Rt;for(Rt=void 0;e!==void 0;)e.S.v===e.v&&(e.S.i=e.i),e=e.o})();Nt!==void 0;){var n=Nt;for(Nt=void 0,Ft++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Ut(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(Ft=0,Pt--,t)throw e}}function kt(e){if(Pt>0)return e();Lt=++It,Pt++;try{return e()}finally{Ot()}}var At=void 0;function jt(e){var t=At;At=void 0;try{return e()}finally{At=t}}var Mt,Nt=void 0,Pt=0,Ft=0,It=0,Lt=0,Rt=void 0,zt=0;function Bt(e){if(At!==void 0){var t=e.n;if(t===void 0||t.t!==At)return t={i:0,S:e,p:At.s,n:void 0,t:At,e:void 0,x:void 0,r:t},At.s!==void 0&&(At.s.n=t),At.s=t,e.n=t,32&At.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=At.s,t.n=void 0,At.s.n=t,At.s=t),t}}function Vt(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}Vt.prototype.brand=Dt,Vt.prototype.h=function(){return!0},Vt.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n===void 0?jt(function(){var e;(e=t.W)==null||e.call(t)}):n.e=e)},Vt.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&jt(function(){var e;(e=t.Z)==null||e.call(t)}))}},Vt.prototype.subscribe=function(e){var t=this;return Qt(function(){var n=t.value,r=At;At=void 0;try{e(n)}finally{At=r}},{name:`sub`})},Vt.prototype.valueOf=function(){return this.value},Vt.prototype.toString=function(){return this.value+``},Vt.prototype.toJSON=function(){return this.value},Vt.prototype.peek=function(){var e=this;return jt(function(){return e.value})},Object.defineProperty(Vt.prototype,"value",{get:function(){var e=Bt(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Ft>100)throw Error(`Cycle detected`);(function(e){Pt!==0&&Ft===0&&e.l!==Lt&&(e.l=Lt,Rt={S:e,v:e.v,i:e.i,o:Rt})})(this),this.v=e,this.i++,zt++,Pt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Ot()}}}});function Ht(e,t){return new Vt(e,t)}function Ut(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Wt(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Gt(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Kt(e,t){Vt.call(this,void 0),this.x=e,this.s=void 0,this.g=zt-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}Kt.prototype=new Vt,Kt.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===zt))return!0;if(this.g=zt,this.f|=1,this.i>0&&!Ut(this))return this.f&=-2,!0;var e=At;try{Wt(this),At=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return At=e,Gt(this),this.f&=-2,!0},Kt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Vt.prototype.S.call(this,e)},Kt.prototype.U=function(e){if(this.t!==void 0&&(Vt.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Kt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Kt.prototype,"value",{get:function(){if(1&this.f)throw Error(`Cycle detected`);var e=Bt(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function qt(e,t){return new Kt(e,t)}function Jt(e){var t=e.m;if(e.m=void 0,typeof t==`function`){Pt++;var n=At;At=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Yt(e),t}finally{At=n,Ot()}}}function Yt(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Jt(e)}function Xt(e){if(At!==this)throw Error(`Out-of-order effect`);Gt(this),At=e,this.f&=-2,8&this.f&&Yt(this),Ot()}function Zt(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,Mt&&Mt.push(this)}Zt.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t==`function`&&(this.m=t)}finally{e()}},Zt.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,Jt(this),Wt(this),Pt++;var e=At;return At=this,Xt.bind(this,e)},Zt.prototype.N=function(){2&this.f||(this.f|=2,this.u=Nt,Nt=this)},Zt.prototype.d=function(){this.f|=8,1&this.f||Yt(this)},Zt.prototype.dispose=function(){this.d()};function Qt(e,t){var n=new Zt(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var $t,en,tn=typeof window<`u`&&!!window.__PREACT_SIGNALS_DEVTOOLS__,nn=[],rn=[];Qt(function(){$t=this.N})();function an(e,t){d[e]=t.bind(null,d[e]||function(){})}function on(e){if(en){var t=en;en=void 0,t()}en=e&&e.S()}function sn(e){var t=this,n=e.data,r=ln(n);r.value=n;var i=k(function(){for(var e=t,n=t.__v;n=n.__;)if(n.__c){n.__c.__$f|=4;break}var i=qt(function(){var e=r.value.value;return e===0?0:!0===e?``:e||``}),a=qt(function(){return!Array.isArray(i.value)&&!p(i.value)}),o=Qt(function(){if(this.N=hn,a.value){var t=i.value;e.__v&&e.__v.__e&&e.__v.__e.nodeType===3&&(e.__v.__e.data=t)}}),s=t.__$u.d;return t.__$u.d=function(){o(),s.call(this)},[a,i]},[]),a=i[0],o=i[1];return a.value?o.peek():o.value}sn.displayName=`ReactiveTextNode`,Object.defineProperties(Vt.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:sn},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}}),an(`__b`,function(e,t){if(typeof t.type==`string`){var n,r=t.props;for(var i in r)if(i!==`children`){var a=r[i];a instanceof Vt&&(n||(t.__np=n={}),n[i]=a,r[i]=a.peek())}}e(t)}),an(`__r`,function(e,t){if(e(t),t.type!==le){on();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(e,t){var n;return Qt(function(){n=this},{name:t}),n.c=e,n}(function(){var e;tn&&((e=n.y)==null||e.call(n)),r.__$f|=1,r.setState({})},typeof t.type==`function`?t.type.displayName||t.type.name:``))),on(n)}}),an(`__e`,function(e,t,n,r){on(),e(t,n,r)}),an(`diffed`,function(e,t){on();var n;if(typeof t.type==`string`&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var a=n.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in r)&&(s.d(),a[o]=void 0)}else a={},n.U=a;for(var c in r){var l=a[c],u=r[c];l===void 0?(l=cn(n,c,u),a[c]=l):l.o(u,i)}for(var d in r)i[d]=r[d]}}e(t)});function cn(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,a=Ht(n),o=n.peek();return{o:function(e,t){a.value=e,o=e.peek()},d:Qt(function(){this.N=hn;var n=a.value.value;o===n?o=void 0:(o=void 0,i?e[t]=n:n!=null&&(!1!==n||t[4]===`-`)?e.setAttribute(t,n):e.removeAttribute(t))})}}an(`unmount`,function(e,t){if(typeof t.type==`string`){var n=t.__e;if(n){var r=n.U;if(r)for(var i in n.U=void 0,r){var a=r[i];a&&a.d()}}t.__np=void 0}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),an(`__h`,function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)}),ue.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u==`boolean`&&!0===this.u){var a=2&this.__$f;if(!(r||a||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in e)if(o!==`__source`&&e[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};function ln(e,t){return k(function(){return Ht(e,t)},[])}var un=typeof requestAnimationFrame>`u`?setTimeout:function(e){var t=function(){clearTimeout(n),cancelAnimationFrame(r),e()},n=setTimeout(t,35),r=requestAnimationFrame(t)},dn=function(e){queueMicrotask(function(){queueMicrotask(e)})};function fn(){kt(function(){for(var e;e=nn.shift();)$t.call(e)})}function pn(){nn.push(this)===1&&(d.requestAnimationFrame||un)(fn)}function mn(){kt(function(){for(var e;e=rn.shift();)$t.call(e)})}function hn(){rn.push(this)===1&&(d.requestAnimationFrame||dn)(mn)}function gn(e,t){var n=O(e);n.current=e,D(function(){return Qt(function(){return this.N=pn,n.current()},t)},[])}function _n(e){let t=`[Tavus:${e}]`;return{info:(...e)=>{},warn:(...e)=>console.warn(t,...e),error:(...e)=>console.error(t,...e)}}var vn=_n(`API`);function yn(e={}){let t=(e.baseUrl??`https://tavusapi.com`).replace(/\/+$/,``),n=e.token;async function r(e,r,i,a){let o={"Content-Type":`application/json`};n&&(o.Authorization=`Bearer ${n}`);let s=`${t}${r}`;vn.info(e,s);let c=await fetch(s,{method:e,headers:o,body:i==null?void 0:JSON.stringify(i),signal:a?.signal});if(!c.ok){let t=await c.text().catch(()=>``);throw vn.error(`${e} ${s} → ${c.status}`,t),new bn(c.status,t||c.statusText,c.headers)}if(c.headers.get(`content-type`)?.includes(`application/json`))return await c.json()}return{get:(e,t)=>r(`GET`,e,void 0,t),post:(e,t,n)=>r(`POST`,e,t,n)}}var bn=class extends Error{status;body;headers;constructor(e,t,n){super(`API error ${e}: ${t}`),this.status=e,this.body=t,this.headers=n,this.name=`ApiError`}};function xn(e,t,n){return e.get(`/v2/deployments/${t}/init`,n)}function Sn(e,t,n={},r){return e.post(`/v2/deployments/${t}/start`,n,r)}function Cn(e,t,n){return e.post(`/v2/deployments/${t}/conversations/${n}/end`)}function wn(e,t,n,r){let i=`/v2/conversations/${t}/canvas/interactions`;return r?e.post(i,n,r):e.post(i,n)}function Tn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function En(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(Tn(a)&&Tn(i)?n[r]=En(a,i):n[r]=i)}return n}var Dn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),On=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=Dn(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),M=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=Dn(),n=On(),r=Dn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=On();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=re(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=re(this.rhs,e,n),this}get names(){return ne(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=re(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(ie(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>te(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(ae(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=re(this.condition,e,t),this}get names(){let e=super.names;return ne(e,this.condition),this.else&&te(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=re(this.iteration,e,t),this}get names(){return te(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return ne(ne(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=re(this.iterable,e,t),this}get names(){return te(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&te(e,this.catch.names),this.finally&&te(e,this.finally.names),e}},ee=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};ee.kind=`catch`;var T=class extends m{render(e){return`finally`+super.render(e)}};T.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
3
- `:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new ee(e),t(e)}return n&&(this._currNode=r.finally=new T,this.code(n)),this._endBlockNode(ee,T)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function te(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function ne(e,n){return n instanceof t._CodeOrName?te(e,n.names):e}function re(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function ie(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function ae(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${de(e)}`}e.not=ae;var oe=ue(e.operators.AND);function se(...e){return e.reduce(oe)}e.and=se;var ce=ue(e.operators.OR);function le(...e){return e.reduce(ce)}e.or=le;function ue(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${de(n)} ${e} ${de(r)}`}function de(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),kn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=M(),n=Dn();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0?!0:(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0?!0:(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),An=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),jn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=M(),n=kn(),r=An();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),Mn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=jn(),n=M(),r=An(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),Nn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),Pn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),Fn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=Nn(),n=Pn(),r=jn(),i=M(),a=kn(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
1
+ var TavusWidget=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,t)=>()=>(e&&(t=e(e=0)),t),o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(var c=r(a),l=0,u=c.length,d;l<u;l++)d=c[l],!i.call(e,d)&&d!==o&&t(e,d,{get:(e=>a[e]).bind(null,d),enumerable:!(s=n(a,d))||s.enumerable});return e},l=e=>i.call(e,`module.exports`)?e[`module.exports`]:c(t({},`__esModule`,{value:!0}),e),u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,ee,te={},ne=[],re=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ie=Array.isArray;function ae(e,t){for(var n in t)e[n]=t[n];return e}function oe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function se(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?u.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 ce(e,o,r,i,null)}function ce(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??++f,__i:-1,__u:0};return i==null&&d.vnode!=null&&d.vnode(a),a}function le(){return{current:null}}function ue(e){return e.children}function de(e,t){this.props=e,this.context=t}function fe(e,t){if(t==null)return e.__?fe(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`?fe(e):null}function pe(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],a=ae({},t);a.__v=t.__v+1,d.vnode&&d.vnode(a),Te(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??fe(t),!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,De(r,a,i),t.__e=t.__=null,a.__e!=n&&me(a)}}function me(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),me(e)}function he(e){(!e.__d&&(e.__d=!0)&&m.push(e)&&!ge.__r++||h!=d.debounceRendering)&&((h=d.debounceRendering)||g)(ge)}function ge(){try{for(var e,t=1;m.length;)m.length>t&&m.sort(_),e=m.shift(),t=m.length,pe(e)}finally{m.length=ge.__r=0}}function _e(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v=r&&r.__k||ne,y=t.length;for(c=ve(n,t,v,c,y),d=0;d<y;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&v[p.__i]||te,p.__i=d,g=Te(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&Ae(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),(_=!!(4&p.__u))||f.__k===p.__k?(c=ye(p,c,e,_),_&&f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function ve(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=ce(null,o,null,null,null):ie(o)?o=e.__k[a]=ce(ue,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=ce(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=xe(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=fe(s)),je(s,s));return r}function ye(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=ye(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=fe(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function be(e,t){return t||=[],e==null||typeof e==`boolean`||(ie(e)?e.some(function(e){be(e,t)}):t.push(e)),t}function xe(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function Se(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||re.test(t)?n:n+`px`}function Ce(e,t,n,r,i){var a,o;n: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||Se(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||Se(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(x,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n[b]=r[b]:(n[b]=S,e.addEventListener(t,a?w:C,a)):e.removeEventListener(t,a?w:C,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 n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function we(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[y]==null)t[y]=S++;else if(t[y]<n[b])return;return n(d.event?d.event(t):t)}}}function Te(e,t,n,r,i,a,o,s,c,l){var u,f,p,m,h,g,_,v,y,b,x,S,C,w,ee,te=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=d.__b)&&u(t);n:if(typeof te==`function`)try{if(v=t.props,y=te.prototype&&te.prototype.render,b=(u=te.contextType)&&r[u.__c],x=u?b?b.props.value:u.__:r,n.__c?_=(f=t.__c=n.__c).__=f.__E:(y?t.__c=f=new te(v,x):(t.__c=f=new de(v,x),f.constructor=te,f.render=Me),b&&b.sub(f),f.state||={},f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&te.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ae({},f.__s)),ae(f.__s,te.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&te.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&te.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),t.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)){t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),ne.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__e=!1,S=d.__r,C=0,y)f.state=f.__s,f.__d=!1,S&&S(t),u=f.render(f.props,f.state,f.context),ne.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,S&&S(t),u=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++C<25);f.state=f.__s,f.getChildContext!=null&&(r=ae(ae({},r),f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),w=u!=null&&u.type===ue&&u.key==null?Oe(u.props.children):u,s=_e(e,ie(w)?w:[w],t,n,r,i,a,o,s,c,l),f.base=t.__e,t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__E=f.__=null)}catch(e){if(t.__v=null,c||a!=null)if(e.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(ee=a.length;ee--;)oe(a[ee]);Ee(t)}else t.__e=n.__e,t.__k=n.__k,e.then||Ee(t);d.__e(e,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=ke(n.__e,t,n,r,i,a,o,c,l);return(u=d.diffed)&&u(t),128&t.__u?void 0:s}function Ee(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Ee))}function De(e,t,n){for(var r=0;r<n.length;r++)Ae(n[r],n[++r],n[++r]);d.__c&&d.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){d.__e(e,t.__v)}})}function Oe(e){return typeof e!=`object`||!e||e.__b>0?e:ie(e)?e.map(Oe):e.constructor===void 0?ae({},e):null}function ke(e,t,n,r,i,a,o,s,c){var l,f,p,m,h,g,_,v=n.props||te,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(l=0;l<a.length;l++)if((h=a[l])&&`setAttribute`in h==!!b&&(b?h.localName==b:h.nodeType==3)){e=h,a[l]=null;break}}if(e==null){if(b==null)return document.createTextNode(y);e=document.createElementNS(i,b,y.is&&y),s&&=(d.__m&&d.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a=b==`textarea`&&y.defaultValue!=null?null:a&&u.call(e.childNodes),!s&&a!=null)for(v={},l=0;l<e.attributes.length;l++)v[(h=e.attributes[l]).name]=h.value;for(l in v)h=v[l],l==`dangerouslySetInnerHTML`?p=h:l==`children`||l in y||l==`value`&&`defaultValue`in y||l==`checked`&&`defaultChecked`in y||Ce(e,l,null,h,i);for(l in y)h=y[l],l==`children`?m=h:l==`dangerouslySetInnerHTML`?f=h:l==`value`?g=h:l==`checked`?_=h:s&&typeof h!=`function`||v[l]===h||Ce(e,l,h,v[l],i);if(f)s||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=``),_e(t.type==`template`?e.content:e,ie(m)?m:[m],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&fe(n,0),s,c),a!=null)for(l=a.length;l--;)oe(a[l]);s&&b!=`textarea`||(l=`value`,b==`progress`&&g==null?e.removeAttribute(`value`):g!=null&&(g!==e[l]||b==`progress`&&!g||b==`option`&&g!=v[l])&&Ce(e,l,g,v[l],i),l=`checked`,_!=null&&_!=e[l]&&Ce(e,l,_,v[l],i))}return e}function Ae(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(e){d.__e(e,n)}}function je(e,t,n){var r,i;if(d.unmount&&d.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Ae(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){d.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&je(r[i],t,n||typeof e.type!=`function`);n||oe(e.__e),e.__c=e.__=e.__e=void 0}function Me(e,t,n){return this.constructor(e,n)}function Ne(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),d.__&&d.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],o=[],Te(t,e=(!r&&n||t).__k=se(ue,null,[e]),i||te,te,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?u.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,o),De(a,e,o)}function Pe(e,t){Ne(e,t,Pe)}function Fe(e,t,n){var r,i,a,o,s=ae({},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?u.call(arguments,2):n),ce(e.type,s,r||e.key,i||e.ref,null)}function Ie(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,he(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c=`__cC`+ ee++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}u=ne.slice,d={__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(t){e=t}throw e}},f=0,p=function(e){return e!=null&&e.constructor===void 0},de.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ae({},this.state);typeof e==`function`&&(e=e(ae({},n),this.props)),e&&ae(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),he(this))},de.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),he(this))},de.prototype.render=ue,m=[],g=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_=function(e,t){return e.__v.__b-t.__v.__b},ge.__r=0,v=Math.random().toString(8),y=`__d`+v,b=`__a`+v,x=/(PointerCapture)$|Capture$/i,S=0,C=we(!1),w=we(!0),ee=0;function Le(){return Le=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},Le.apply(this,arguments)}function Re(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 ze=[`context`,`children`],Be=[`useFragment`];function Ve(e,t,n,r){function i(){var t,n=Reflect.construct(HTMLElement,[],i);return n._vdomComponent=e,r&&r.shadow?(n._root=n.attachShadow({mode:r.mode||`open`,serializable:(t=r.serializable)!=null&&t}),r.adoptedStyleSheets&&(n._root.adoptedStyleSheets=r.adoptedStyleSheets)):n._root=n,n}return(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=function(){Ue.call(this,r)},i.prototype.attributeChangedCallback=Ge,i.prototype.disconnectedCallback=Ke,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,e.formAssociated&&(i.formAssociated=!0),n.forEach(function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom?this._vdom.props[e]:this._props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||={},this._props[e]=t);var n=typeof t;t!=null&&n!==`string`&&n!==`boolean`&&n!==`number`||this.setAttribute(e,t)}})}),customElements.define(t||e.tagName||e.displayName||e.name,i),i}function He(e){this.getChildContext=function(){return e.context};var t=e.children;return Fe(t,Re(e,ze))}function Ue(e){var t=new CustomEvent(`_preact`,{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=se(He,Le({},this._props,{context:t.detail.context}),Je(this,this._vdomComponent,e)),(this.hasAttribute(`hydrate`)?Pe:Ne)(this._vdom,this._root)}function We(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():``})}function Ge(e,t,n){if(this._vdom){var r={};r[e]=n??=void 0,r[We(e)]=n,this._vdom=Fe(this._vdom,r),Ne(this._vdom,this._root)}}function Ke(){Ne(this._vdom=null,this._root)}function qe(e,t){var n=this,r=e.useFragment,i=Re(e,Be);return se(r?ue:`slot`,Le({},i,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener(`_preact`,n._listener))):n.ref.removeEventListener(`_preact`,n._listener)}}))}function Je(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[We(o[a].name)]=o[a].value);for(a=s.length;a--;){var c=Je(s[a],null,n),l=s[a].slot;l?i[l]=se(qe,{name:l},c):r[a]=c}var u=!(!n||!n.shadow),d=t?se(qe,{useFragment:!u},r):r;return!u&&t&&(e.innerHTML=``),se(t||e.nodeName.toLowerCase(),i,d)}var Ye=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
2
+ @layer properties{*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--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-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction: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-ease:initial}}@layer theme{:host,: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-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--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:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-lg:.5rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-xs:4px;--blur-sm:8px;--aspect-video:16 / 9;--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)}}@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;-webkit-text-decoration:inherit;-webkit-text-decoration: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}:is(:host:has(input.theme-controller[value=wireframe]:checked),[data-theme=wireframe]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(94% 0 0);--color-base-content:oklch(20% 0 0);--color-primary:oklch(87% 0 0);--color-primary-content:oklch(26% 0 0);--color-secondary:oklch(87% 0 0);--color-secondary-content:oklch(26% 0 0);--color-accent:oklch(87% 0 0);--color-accent-content:oklch(26% 0 0);--color-neutral:oklch(87% 0 0);--color-neutral-content:oklch(26% 0 0);--color-info:oklch(44% .11 240.79);--color-info-content:oklch(90% .058 230.902);--color-success:oklch(43% .095 166.913);--color-success-content:oklch(90% .093 164.15);--color-warning:oklch(47% .137 46.201);--color-warning-content:oklch(92% .12 95.746);--color-error:oklch(44% .177 26.899);--color-error-content:oklch(88% .062 18.334);--radius-selector:0rem;--radius-field:.25rem;--radius-box:.25rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=silk]:checked),[data-theme=silk]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(97% .0035 67.78);--color-base-200:oklch(95% .0081 61.42);--color-base-300:oklch(90% .0081 61.42);--color-base-content:oklch(40% .0081 61.42);--color-primary:oklch(23.27% .0249 284.3);--color-primary-content:oklch(94.22% .2505 117.44);--color-secondary:oklch(23.27% .0249 284.3);--color-secondary-content:oklch(73.92% .2135 50.94);--color-accent:oklch(23.27% .0249 284.3);--color-accent-content:oklch(88.92% .2061 189.9);--color-neutral:oklch(20% 0 0);--color-neutral-content:oklch(80% .0081 61.42);--color-info:oklch(80.39% .1148 241.68);--color-info-content:oklch(30.39% .1148 241.68);--color-success:oklch(83.92% .0901 136.87);--color-success-content:oklch(23.92% .0901 136.87);--color-warning:oklch(83.92% .1085 80);--color-warning-content:oklch(43.92% .1085 80);--color-error:oklch(75.1% .1814 22.37);--color-error-content:oklch(35.1% .1814 22.37);--radius-selector:2rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:2px;--depth:1;--noise:0}:is(:host:has(input.theme-controller[value=cyberpunk]:checked),[data-theme=cyberpunk]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(94.51% .179 104.32);--color-base-200:oklch(91.51% .179 104.32);--color-base-300:oklch(85.51% .179 104.32);--color-base-content:oklch(0% 0 0);--color-primary:oklch(74.22% .209 6.35);--color-primary-content:oklch(14.844% .041 6.35);--color-secondary:oklch(83.33% .184 204.72);--color-secondary-content:oklch(16.666% .036 204.72);--color-accent:oklch(71.86% .217 310.43);--color-accent-content:oklch(14.372% .043 310.43);--color-neutral:oklch(23.04% .065 269.31);--color-neutral-content:oklch(94.51% .179 104.32);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:0rem;--radius-field:0rem;--radius-box:0rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=retro]:checked),[data-theme=retro]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(91.637% .034 90.515);--color-base-200:oklch(88.272% .049 91.774);--color-base-300:oklch(84.133% .065 90.856);--color-base-content:oklch(41% .112 45.904);--color-primary:oklch(80% .114 19.571);--color-primary-content:oklch(39% .141 25.723);--color-secondary:oklch(92% .084 155.995);--color-secondary-content:oklch(44% .119 151.328);--color-accent:oklch(68% .162 75.834);--color-accent-content:oklch(41% .112 45.904);--color-neutral:oklch(44% .011 73.639);--color-neutral-content:oklch(86% .005 56.366);--color-info:oklch(58% .158 241.966);--color-info-content:oklch(96% .059 95.617);--color-success:oklch(51% .096 186.391);--color-success-content:oklch(96% .059 95.617);--color-warning:oklch(64% .222 41.116);--color-warning-content:oklch(96% .059 95.617);--color-error:oklch(70% .191 22.216);--color-error-content:oklch(40% .123 38.172);--radius-selector:.25rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=lemonade]:checked),[data-theme=lemonade]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(98.71% .02 123.72);--color-base-200:oklch(91.8% .018 123.72);--color-base-300:oklch(84.89% .017 123.72);--color-base-content:oklch(19.742% .004 123.72);--color-primary:oklch(58.92% .199 134.6);--color-primary-content:oklch(11.784% .039 134.6);--color-secondary:oklch(77.75% .196 111.09);--color-secondary-content:oklch(15.55% .039 111.09);--color-accent:oklch(85.39% .201 100.73);--color-accent-content:oklch(17.078% .04 100.73);--color-neutral:oklch(30.98% .075 108.6);--color-neutral-content:oklch(86.196% .015 108.6);--color-info:oklch(86.19% .047 224.14);--color-info-content:oklch(17.238% .009 224.14);--color-success:oklch(86.19% .047 157.85);--color-success-content:oklch(17.238% .009 157.85);--color-warning:oklch(86.19% .047 102.15);--color-warning-content:oklch(17.238% .009 102.15);--color-error:oklch(86.19% .047 25.85);--color-error-content:oklch(17.238% .009 25.85);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:host{--fx-noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E");scrollbar-color:currentColor #0000}@supports (color:color-mix(in lab, red, red)){:host{scrollbar-color:color-mix(in oklch, currentColor 35%, #0000) #0000}}@property --radialprogress{syntax:"<percentage>";inherits:true;initial-value:0%}:host:not(span){overflow:var(--page-overflow)}:host{background:var(--page-scroll-bg,var(--root-bg));--page-scroll-bg-on:linear-gradient(var(--root-bg,#0000), var(--root-bg,#0000)) var(--root-bg,#0000)}@supports (color:color-mix(in lab, red, red)){:host{--page-scroll-bg-on:linear-gradient(var(--root-bg,#0000), var(--root-bg,#0000)) color-mix(in srgb, var(--root-bg,#0000), oklch(0% 0 0) calc(var(--page-has-backdrop,0) * 40%))}}:host{--page-scroll-transition-on:background-color .3s ease-out;transition:var(--page-scroll-transition);scrollbar-gutter:var(--page-scroll-gutter,unset);scrollbar-gutter:if(style(--page-has-scroll: 1): var(--page-scroll-gutter,unset) ; else: unset)}@keyframes set-page-has-scroll{0%,to{--page-has-scroll:1}}:host,[data-theme]{background:var(--page-scroll-bg,var(--root-bg));color:var(--color-base-content)}:where(:host,[data-theme]){--root-bg:var(--color-base-100)}:where(:host),[data-theme=black-white]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(92% 0 0);--color-base-content:oklch(21% 0 0);--color-primary:oklch(21% 0 0);--color-primary-content:oklch(98% 0 0);--color-secondary:oklch(50% 0 0);--color-secondary-content:oklch(98% 0 0);--color-accent:oklch(27% 0 0);--color-accent-content:oklch(98% 0 0);--color-neutral:oklch(27% 0 0);--color-neutral-content:oklch(98% 0 0);--color-info:oklch(70% .12 230);--color-info-content:oklch(98% 0 0);--color-success:oklch(65% .18 145);--color-success-content:oklch(98% 0 0);--color-warning:oklch(80% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(60% .22 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:host:has(input.theme-controller[value=black-white]:checked){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(92% 0 0);--color-base-content:oklch(21% 0 0);--color-primary:oklch(21% 0 0);--color-primary-content:oklch(98% 0 0);--color-secondary:oklch(50% 0 0);--color-secondary-content:oklch(98% 0 0);--color-accent:oklch(27% 0 0);--color-accent-content:oklch(98% 0 0);--color-neutral:oklch(27% 0 0);--color-neutral-content:oklch(98% 0 0);--color-info:oklch(70% .12 230);--color-info-content:oklch(98% 0 0);--color-success:oklch(65% .18 145);--color-success-content:oklch(98% 0 0);--color-warning:oklch(80% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(60% .22 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}@media (prefers-color-scheme:dark){:host:not([data-theme]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(22% 0 0);--color-base-300:oklch(27% 0 0);--color-base-content:oklch(96% 0 0);--color-primary:oklch(96% 0 0);--color-primary-content:oklch(18% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(18% 0 0);--color-accent:oklch(90% 0 0);--color-accent-content:oklch(18% 0 0);--color-neutral:oklch(92% 0 0);--color-neutral-content:oklch(18% 0 0);--color-info:oklch(72% .13 230);--color-info-content:oklch(15% 0 0);--color-success:oklch(70% .17 145);--color-success-content:oklch(15% 0 0);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(65% .21 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}}:is(:host:has(input.theme-controller[value=white-black]:checked),[data-theme=white-black]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(22% 0 0);--color-base-300:oklch(27% 0 0);--color-base-content:oklch(96% 0 0);--color-primary:oklch(96% 0 0);--color-primary-content:oklch(18% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(18% 0 0);--color-accent:oklch(90% 0 0);--color-accent-content:oklch(18% 0 0);--color-neutral:oklch(92% 0 0);--color-neutral-content:oklch(18% 0 0);--color-info:oklch(72% .13 230);--color-info-content:oklch(15% 0 0);--color-success:oklch(70% .17 145);--color-success-content:oklch(15% 0 0);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(65% .21 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:is(:host:has(input.theme-controller[value=wireframe-dark]:checked),[data-theme=wireframe-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(23% 0 0);--color-base-300:oklch(29% 0 0);--color-base-content:oklch(92% 0 0);--color-primary:oklch(92% 0 0);--color-primary-content:oklch(12% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(12% 0 0);--color-accent:oklch(55% 0 0);--color-accent-content:oklch(95% 0 0);--color-neutral:oklch(30% 0 0);--color-neutral-content:oklch(92% 0 0);--color-info:oklch(70% .15 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(72% .16 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(65% .22 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=silk-dark]:checked),[data-theme=silk-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(20% .02 320);--color-base-200:oklch(25% .022 320);--color-base-300:oklch(30% .025 320);--color-base-content:oklch(94% .01 320);--color-primary:oklch(74% .12 320);--color-primary-content:oklch(15% .03 320);--color-secondary:oklch(74% .12 270);--color-secondary-content:oklch(15% .03 270);--color-accent:oklch(76% .12 20);--color-accent-content:oklch(15% .03 20);--color-neutral:oklch(28% .02 320);--color-neutral-content:oklch(94% .01 320);--color-info:oklch(72% .13 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(74% .15 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(82% .15 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(66% .21 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=cyberpunk-dark]:checked),[data-theme=cyberpunk-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(15% .04 305);--color-base-200:oklch(20% .05 305);--color-base-300:oklch(26% .06 305);--color-base-content:oklch(92% .18 95);--color-primary:oklch(72% .28 340);--color-primary-content:oklch(15% .04 305);--color-secondary:oklch(80% .2 200);--color-secondary-content:oklch(15% .04 305);--color-accent:oklch(90% .2 95);--color-accent-content:oklch(15% .04 305);--color-neutral:oklch(25% .05 305);--color-neutral-content:oklch(92% .18 95);--color-info:oklch(75% .2 220);--color-info-content:oklch(15% .04 305);--color-success:oklch(78% .2 145);--color-success-content:oklch(15% .04 305);--color-warning:oklch(85% .18 80);--color-warning-content:oklch(15% .04 305);--color-error:oklch(70% .25 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=retro-dark]:checked),[data-theme=retro-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(22% .03 60);--color-base-200:oklch(27% .03 60);--color-base-300:oklch(33% .035 60);--color-base-content:oklch(88% .05 70);--color-primary:oklch(62% .16 30);--color-primary-content:oklch(95% .04 70);--color-secondary:oklch(66% .1 80);--color-secondary-content:oklch(15% .03 60);--color-accent:oklch(72% .13 60);--color-accent-content:oklch(15% .03 60);--color-neutral:oklch(28% .03 60);--color-neutral-content:oklch(88% .05 70);--color-info:oklch(70% .14 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(72% .15 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(80% .15 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(65% .2 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=lemonade-dark]:checked),[data-theme=lemonade-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(20% .05 140);--color-base-200:oklch(25% .05 140);--color-base-300:oklch(31% .06 140);--color-base-content:oklch(94% .1 100);--color-primary:oklch(85% .18 95);--color-primary-content:oklch(15% .05 140);--color-secondary:oklch(75% .2 130);--color-secondary-content:oklch(15% .05 140);--color-accent:oklch(85% .15 110);--color-accent-content:oklch(15% .05 140);--color-neutral:oklch(28% .05 140);--color-neutral-content:oklch(94% .1 100);--color-info:oklch(72% .18 220);--color-info-content:oklch(15% .05 140);--color-success:oklch(76% .2 145);--color-success-content:oklch(15% .05 140);--color-warning:oklch(86% .18 80);--color-warning-content:oklch(15% .05 140);--color-error:oklch(65% .22 25);--color-error-content:oklch(95% .02 25)}}@layer components;@layer utilities{.\\@container\\/conversation{container:conversation/inline-size}.\\@container\\/pip{container:pip/inline-size}@layer daisyui.l1.l2.l3{.modal{pointer-events:none;visibility:hidden;width:100%;max-width:none;height:100%;max-height:none;color:inherit;transition:visibility .3s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;overscroll-behavior:contain;z-index:999;scrollbar-gutter:auto;background-color:#0000;place-items:center;margin:0;padding:0;display:grid;position:fixed;inset:0;overflow:clip}.modal::backdrop{display:none}.tooltip{--tt-bg:var(--color-neutral);--tt-off:calc(100% + .5rem);--tt-tail:calc(100% + 1px + .25rem);display:inline-block;position:relative}.tooltip>.tooltip-content,.tooltip[data-tip]:before{border-radius:var(--radius-field);text-align:center;white-space:normal;max-width:20rem;color:var(--color-neutral-content);opacity:0;background-color:var(--tt-bg);pointer-events:none;z-index:2;--tw-content:attr(data-tip);content:var(--tw-content);width:max-content;padding-block:.25rem;padding-inline:.5rem;font-size:.875rem;line-height:1.25;position:absolute}.tooltip:after{opacity:0;background-color:var(--tt-bg);content:"";pointer-events:none;--mask-tooltip:url("data:image/svg+xml,%3Csvg width='10' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.500009 1C3.5 1 3.00001 4 5.00001 4C7 4 6.5 1 9.5 1C10 1 10 0.499897 10 0H0C-1.99338e-08 0.5 0 1 0.500009 1Z' fill='black'/%3E%3C/svg%3E%0A");width:.625rem;height:.25rem;-webkit-mask-position:-1px 0;mask-position:-1px 0;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-image:var(--mask-tooltip);-webkit-mask-image:var(--mask-tooltip);-webkit-mask-image:var(--mask-tooltip);mask-image:var(--mask-tooltip);display:block;position:absolute}@media (prefers-reduced-motion:no-preference){.tooltip>.tooltip-content,.tooltip[data-tip]:before,.tooltip:after{transition:opacity .2s cubic-bezier(.4,0,.2,1) 75ms,transform .2s cubic-bezier(.4,0,.2,1) 75ms}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{opacity:1;--tt-pos:0rem}@media (prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}.tab{cursor:pointer;appearance:none;text-align:center;webkit-user-select:none;-webkit-user-select:none;user-select:none;flex-wrap:wrap;justify-content:center;align-items:center;display:inline-flex;position:relative}@media (hover:hover){.tab:hover{color:var(--color-base-content)}}.tab{--tab-p:.75rem;--tab-bg:var(--color-base-100);--tab-border-color:var(--color-base-300);--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:0;--tab-radius-ee:0;--tab-order:0;--tab-radius-min:calc(.75rem - var(--border));--tab-radius-limit:min(var(--radius-field), var(--tab-radius-min));--tab-radius-grad:#0000 calc(69% - var(--border)), var(--tab-border-color) calc(69% - var(--border) + .25px), var(--tab-border-color) 69%, var(--tab-bg) calc(69% + .25px);order:var(--tab-order);height:var(--tab-height);padding-inline:var(--tab-p);border-color:#0000;font-size:.875rem}.tab:is(input[type=radio]){min-width:fit-content}.tab:is(input[type=radio]):after{--tw-content:attr(aria-label);content:var(--tw-content)}.tab:is(label){position:relative}.tab:is(label) input{cursor:pointer;appearance:none;opacity:0;position:absolute;inset:0}:is(.tab:checked,.tab:is(label:has(:checked)),.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]))+.tab-content{display:block}.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.tab:not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}.tab:not(input):empty{cursor:default;flex-grow:1}.tab:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.tab:focus{outline-offset:2px;outline:2px solid #0000}}.tab:focus-visible,.tab:is(label:has(:checked:focus-visible)){outline-offset:-5px;outline:2px solid}.tab[disabled]{pointer-events:none;opacity:.4}.menu{--menu-active-fg:var(--color-neutral-content);--menu-active-bg:var(--color-neutral);flex-flow:column wrap;width:fit-content;padding:.5rem;font-size:.875rem;display:flex}.menu :where(li ul){white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem;position:relative}.menu :where(li ul):before{background-color:var(--color-base-content);opacity:.1;width:var(--border);content:"";inset-inline-start:0;position:absolute;top:.75rem;bottom:.75rem}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}.menu :where(li:not(.menu-title)>:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--radius-field);text-align:start;text-wrap:balance;-webkit-user-select:none;user-select:none;grid-auto-columns:minmax(auto,max-content) auto max-content;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;padding-block:.375rem;padding-inline:.75rem;transition-property:color,background-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:grid}.menu :where(li>details>summary){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li>details>summary){outline-offset:2px;outline:2px solid #0000}}.menu :where(li>details>summary)::-webkit-details-marker{display:none}:is(.menu :where(li>details>summary),.menu :where(li>.menu-dropdown-toggle)):after{content:"";transform-origin:50%;pointer-events:none;justify-self:flex-end;width:.375rem;height:.375rem;transition-property:rotate,translate;transition-duration:.2s;display:block;translate:0 -1px;rotate:-135deg;box-shadow:inset 2px 2px}.menu details{interpolate-size:allow-keywords;overflow:hidden}.menu details::details-content{block-size:0}@media (prefers-reduced-motion:no-preference){.menu details::details-content{transition-behavior:allow-discrete;transition-property:block-size,content-visibility;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}}.menu details[open]::details-content{block-size:auto}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{translate:0 1px;rotate:45deg}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{color:var(--color-base-content);--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus,.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){box-shadow:inset 0 1px oklch(0% 0 0/.01),inset 0 -1px oklch(100% 0 0/.01)}.menu :where(li:empty){background-color:var(--color-base-content);opacity:.1;height:1px;margin:.5rem 1rem}.menu :where(li){flex-flow:column wrap;flex-shrink:0;align-items:stretch;display:flex;position:relative}.menu :where(li) .badge{justify-self:flex-end}.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{outline-offset:2px;outline:2px solid #0000}}.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{color:var(--menu-active-fg);background-color:var(--menu-active-bg);background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise)}:is(.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):not(:is(.menu :where(li)>:not(ul,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):active){box-shadow:0 2px calc(var(--depth) * 3px) -2px var(--menu-active-bg)}.menu :where(li).menu-disabled{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li).menu-disabled{color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.menu .dropdown:focus-within .menu-dropdown-toggle:after{translate:0 1px;rotate:45deg}.menu .dropdown-content{margin-top:.5rem;padding:.5rem}.menu .dropdown-content:before{display:none}.dock{z-index:1;background-color:var(--color-base-100);color:currentColor;border-top:.5px solid var(--color-base-content);flex-direction:row;justify-content:space-around;align-items:center;width:100%;padding:.5rem;display:flex;position:fixed;bottom:0;left:0;right:0}@supports (color:color-mix(in lab, red, red)){.dock{border-top:.5px solid color-mix(in oklab, var(--color-base-content) 5%, #0000)}}.dock{height:4rem;height:calc(4rem + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}.dock>*{cursor:pointer;border-radius:var(--radius-box);background-color:#0000;flex-direction:column;flex-shrink:1;flex-basis:100%;justify-content:center;align-items:center;gap:1px;max-width:8rem;height:100%;margin-bottom:.5rem;transition:opacity .2s ease-out;display:flex;position:relative}@media (hover:hover){.dock>:hover{opacity:.8}}:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{opacity:1}.dock>* .dock-label{font-size:.6875rem}.dock>:after{content:"";background-color:#0000;border-top:3px solid #0000;border-radius:3.40282e38px;width:1.5rem;height:.25rem;transition:background-color .1s ease-out,text-color .1s ease-out,width .1s ease-out;position:absolute;bottom:.2rem}.dropdown{position-area:var(--anchor-v,bottom) var(--anchor-h,span-right);display:inline-block;position:relative}.dropdown>:not(:has(~[class*=dropdown-content])):focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.dropdown>:not(:has(~[class*=dropdown-content])):focus{outline-offset:2px;outline:2px solid #0000}}.dropdown .dropdown-content{position:absolute}.dropdown.dropdown-close .dropdown-content,.dropdown:not(details,.dropdown-open,.dropdown-hover:hover,:focus-within) .dropdown-content,.dropdown.dropdown-hover:not(:hover) [tabindex]:first-child:focus:not(:focus-visible)~.dropdown-content{transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover],.dropdown .dropdown-content{z-index:999}@media (prefers-reduced-motion:no-preference){.dropdown[popover],.dropdown .dropdown-content{transition-behavior:allow-discrete;transition-property:opacity,scale,display;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s dropdown}}@starting-style{.dropdown[popover],.dropdown .dropdown-content{opacity:0;scale:.95}}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within)>[tabindex]:first-child{pointer-events:none}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within) .dropdown-content,.dropdown:not(.dropdown-close).dropdown-hover:hover .dropdown-content{opacity:1;scale:1}.dropdown:is(details) summary::-webkit-details-marker{display:none}.dropdown:where([popover]){background:0 0}.dropdown[popover]{color:inherit;position:fixed}@supports not (position-area:bottom){.dropdown[popover]{margin:auto}.dropdown[popover].dropdown-close{transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover].dropdown-open:not(:popover-open){transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover]::backdrop{background-color:oklab(0% none none/.3)}}:is(.dropdown[popover].dropdown-close,.dropdown[popover]:not(.dropdown-open,:popover-open)){transform-origin:top;opacity:0;display:none;scale:.95}:where(.btn){width:unset}.btn{cursor:pointer;text-align:center;vertical-align:middle;outline-offset:2px;webkit-user-select:none;-webkit-user-select:none;user-select:none;padding-inline:var(--btn-p);color:var(--btn-fg);--tw-prose-links:var(--btn-fg);height:var(--size);font-size:var(--fontsize,.875rem);outline-color:var(--btn-color,var(--color-base-content));background-color:var(--btn-bg);background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--btn-noise);border-width:var(--border);border-style:solid;border-color:var(--btn-border);text-shadow:0 .5px oklch(100% 0 0 / calc(var(--depth) * .15));touch-action:manipulation;box-shadow:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%)) inset, var(--btn-shadow);--size:calc(var(--size-field,.25rem) * 10);--btn-bg:var(--btn-color,var(--color-base-200));--btn-fg:var(--color-base-content);--btn-p:1rem;--btn-border:var(--btn-bg);border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-wrap:nowrap;flex-shrink:0;justify-content:center;align-items:center;gap:.375rem;font-weight:600;transition-property:color,background-color,border-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:inline-flex}@supports (color:color-mix(in lab, red, red)){.btn{--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn{--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn{--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}.btn{--btn-noise:var(--fx-noise)}@media (hover:hover){.btn:hover{--btn-bg:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab, red, red)){.btn:hover{--btn-bg:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 7%)}}}.btn:focus-visible{isolation:isolate;outline-width:2px;outline-style:solid}.btn:has(:focus-visible){isolation:isolate;outline-width:2px;outline-style:solid}.btn:active:not(.btn-active){--btn-bg:var(--btn-color,var(--color-base-200));translate:0 .5px}@supports (color:color-mix(in lab, red, red)){.btn:active:not(.btn-active){--btn-bg:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 5%)}}.btn:active:not(.btn-active){--btn-border:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab, red, red)){.btn:active:not(.btn-active){--btn-border:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 7%)}}.btn:active:not(.btn-active){--btn-shadow:0 0 0 0 oklch(0% 0 0/0), 0 0 0 0 oklch(0% 0 0/0)}.btn:is(input[type=checkbox],input[type=radio]){appearance:none}.btn:is(input[type=checkbox],input[type=radio])[aria-label]:after{--tw-content:attr(aria-label);content:var(--tw-content)}.btn:where(input:checked:not(.filter .btn)){--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content);isolation:isolate}.loading{pointer-events:none;aspect-ratio:1;vertical-align:middle;width:calc(var(--size-selector,.25rem) * 6);background-color:currentColor;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.collapse{border-radius:var(--radius-box,1rem);isolation:isolate;grid-template-rows:max-content 0fr;grid-template-columns:minmax(0,1fr);width:100%;display:grid;position:relative;overflow:hidden}@media (prefers-reduced-motion:no-preference){.collapse{transition:grid-template-rows .2s}}.collapse>input:is([type=checkbox],[type=radio]){appearance:none;opacity:0;z-index:1;grid-row-start:1;grid-column-start:1;width:100%;min-height:1lh;padding:1rem;padding-inline-end:3rem;transition:background-color .2s ease-out}.collapse:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close)){grid-template-rows:max-content 1fr}.collapse:not(.collapse-close):has(>input:is([type=checkbox],[type=radio]):checked){grid-template-rows:max-content 1fr}.collapse:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){content-visibility:visible;min-height:fit-content}@supports not (content-visibility:visible){.collapse:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){visibility:visible}}.collapse:focus-visible{outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:has(>input:is([type=checkbox],[type=radio]):focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:has(summary:focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(.collapse-close)>input[type=checkbox],.collapse:not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(.collapse-close)>.collapse-title{cursor:pointer}:is(.collapse[tabindex]:focus:not(.collapse-close,.collapse[open]),.collapse[tabindex]:focus-within:not(.collapse-close,.collapse[open]))>.collapse-title{cursor:unset}.collapse:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>:where(.collapse-content),.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){padding-bottom:1rem}.collapse:is(details){width:100%}@media (prefers-reduced-motion:no-preference){.collapse:is(details)::details-content{transition:content-visibility .2s allow-discrete, visibility .2s allow-discrete, min-height .2s ease-out allow-discrete, padding .1s ease-out 20ms, background-color .2s ease-out, height .2s;interpolate-size:allow-keywords;height:0}.collapse:is(details):where([open])::details-content{height:auto}}.collapse:is(details) summary{display:block;position:relative}.collapse:is(details) summary::-webkit-details-marker{display:none}.collapse:is(details)>.collapse-content{content-visibility:visible}.collapse:is(details) summary{outline:none}.validator:user-valid{--input-color:var(--color-success)}.validator:user-valid:focus{--input-color:var(--color-success)}.validator:user-valid:checked{--input-color:var(--color-success)}.validator:user-valid[aria-checked=true]{--input-color:var(--color-success)}.validator:user-valid:focus-within{--input-color:var(--color-success)}.validator:has(:user-valid){--input-color:var(--color-success)}.validator:has(:user-valid):focus{--input-color:var(--color-success)}.validator:has(:user-valid):checked{--input-color:var(--color-success)}.validator:has(:user-valid)[aria-checked=true]{--input-color:var(--color-success)}.validator:has(:user-valid):focus-within{--input-color:var(--color-success)}.validator:user-invalid{--input-color:var(--color-error)}.validator:user-invalid:focus{--input-color:var(--color-error)}.validator:user-invalid:checked{--input-color:var(--color-error)}.validator:user-invalid[aria-checked=true]{--input-color:var(--color-error)}.validator:user-invalid:focus-within{--input-color:var(--color-error)}.validator:user-invalid~.validator-hint{visibility:visible;color:var(--color-error)}.validator:has(:user-invalid){--input-color:var(--color-error)}.validator:has(:user-invalid):focus{--input-color:var(--color-error)}.validator:has(:user-invalid):checked{--input-color:var(--color-error)}.validator:has(:user-invalid)[aria-checked=true]{--input-color:var(--color-error)}.validator:has(:user-invalid):focus-within{--input-color:var(--color-error)}.validator:has(:user-invalid)~.validator-hint{visibility:visible;color:var(--color-error)}:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))),:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))):focus,:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))):checked,:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false])))[aria-checked=true],:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))):focus-within{--input-color:var(--color-error)}:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false])))~.validator-hint{visibility:visible;color:var(--color-error)}.list{flex-direction:column;font-size:.875rem;display:flex}.list .list-row{--list-grid-cols:minmax(0, auto) 1fr;border-radius:var(--radius-box);word-break:break-word;grid-auto-flow:column;grid-template-columns:var(--list-grid-cols);gap:1rem;padding:1rem;display:grid;position:relative}:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{content:"";border-bottom:var(--border) solid;inset-inline:var(--radius-box);border-color:var(--color-base-content);position:absolute;bottom:0}@supports (color:color-mix(in lab, red, red)){:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{border-color:color-mix(in oklab, var(--color-base-content) 5%, transparent)}}.toggle{border:var(--border) solid currentColor;color:var(--input-color);cursor:pointer;appearance:none;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--toggle-p), var(--radius-selector-max)) + min(var(--border), var(--radius-selector-max)));padding:var(--toggle-p);flex-shrink:0;grid-template-columns:0fr 1fr 1fr;place-content:center;display:inline-grid;position:relative;box-shadow:inset 0 1px}@supports (color:color-mix(in lab, red, red)){.toggle{box-shadow:0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000) inset}}.toggle{--input-color:var(--color-base-content);transition:color .3s,grid-template-columns .2s}@supports (color:color-mix(in lab, red, red)){.toggle{--input-color:color-mix(in oklab, var(--color-base-content) 50%, #0000)}}.toggle{--toggle-p:calc(var(--size) * .125);--size:calc(var(--size-selector,.25rem) * 6);width:calc((var(--size) * 2) - (var(--border) + var(--toggle-p)) * 2);height:var(--size)}.toggle>*{z-index:1;cursor:pointer;appearance:none;background-color:#0000;border:none;grid-column:2/span 1;grid-row-start:1;height:100%;padding:.125rem;transition:opacity .2s,rotate .4s}.toggle>:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.toggle>:focus{outline-offset:2px;outline:2px solid #0000}}.toggle>:nth-child(2){color:var(--color-base-100);rotate:0deg}.toggle>:nth-child(3){color:var(--color-base-100);opacity:0;rotate:-15deg}.toggle:has(:checked)>:nth-child(2){opacity:0;rotate:15deg}.toggle:has(:checked)>:nth-child(3){opacity:1;rotate:0deg}.toggle:before{aspect-ratio:1;border-radius:var(--radius-selector);--tw-content:"";content:var(--tw-content);width:100%;height:100%;box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor;background-color:currentColor;grid-row-start:1;grid-column-start:2;transition:background-color .1s,translate .2s,inset-inline-start .2s;position:relative;inset-inline-start:0;translate:0}@supports (color:color-mix(in lab, red, red)){.toggle:before{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000)}}.toggle:before{background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise)}@media (forced-colors:active){.toggle:before{outline-style:var(--tw-outline-style);outline-offset:calc(1px * -1);outline-width:1px}}@media print{.toggle:before{outline-offset:-1rem;outline:.25rem solid}}.toggle:focus-visible{outline-offset:2px;outline:2px solid}.toggle:has(:focus-visible){outline-offset:2px;outline:2px solid}.toggle:checked,.toggle[aria-checked=true]{background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle:has(>input:checked){background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}:is(.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked)):before{background-color:currentColor}@starting-style{:is(.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked)):before{opacity:0}}.toggle:indeterminate{grid-template-columns:.5fr 1fr .5fr}.toggle:disabled{cursor:not-allowed;opacity:.3}.toggle:disabled:before{border:var(--border) solid currentColor;background-color:#0000}.input{cursor:text;border:var(--border) solid #0000;appearance:none;background-color:var(--color-base-100);vertical-align:middle;white-space:nowrap;width:clamp(3rem,20rem,100%);height:var(--size);font-size:max(var(--font-size,.875rem), .875rem);touch-action:manipulation;border-color:var(--input-color);box-shadow:0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-shrink:1;align-items:center;gap:.5rem;padding-inline:.75rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab, red, red)){.input{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}}.input{--size:calc(var(--size-field,.25rem) * 10);--input-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.input{--input-color:color-mix(in oklab, var(--color-base-content) 20%, #0000)}}.input:where(input){display:inline-flex}.input :where(input){appearance:none;background-color:#0000;border:none;width:100%;height:100%;display:inline-flex}.input :where(input):focus,.input :where(input):focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.input :where(input):focus,.input :where(input):focus-within{outline-offset:2px;outline:2px solid #0000}}.input :where(input[type=url]),.input :where(input[type=email]){direction:ltr}.input :where(input[type=date]){display:inline-flex}.input:focus,.input:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.input:focus,.input:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.input:focus,.input:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.input:focus,.input:focus-within{--font-size:1rem}}}.input:is(:disabled,[disabled]),fieldset:disabled .input{cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}.input:has(>input[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.input:is(:disabled,[disabled]),fieldset:disabled .input{color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}.input:has(>input[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input)::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input)::placeholder{color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.input:is(:disabled,[disabled]),fieldset:disabled .input{box-shadow:none}.input:has(>input[disabled]){box-shadow:none}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.input[type=number]::-webkit-inner-spin-button{margin-block:-.75rem;margin-inline-end:-.75rem}.input::-webkit-calendar-picker-indicator{position:absolute;inset-inline-end:.75em}.input:has(>input[type=date]) :where(input[type=date]){webkit-appearance:none;appearance:none;display:inline-flex}.input:has(>input[type=date]) input[type=date]::-webkit-calendar-picker-indicator{cursor:pointer;width:1em;height:1em;position:absolute;inset-inline-end:.75em}.indicator{width:max-content;display:inline-flex;position:relative}.indicator :where(.indicator-item){z-index:1;white-space:nowrap;top:var(--indicator-t,0);bottom:var(--indicator-b,auto);left:var(--indicator-s,auto);right:var(--indicator-e,0);translate:var(--indicator-x,50%) var(--indicator-y,-50%);position:absolute}.range{appearance:none;webkit-appearance:none;--range-thumb:var(--color-base-100);--range-thumb-size:calc(var(--size-selector,.25rem) * 6);--range-progress:currentColor;--range-fill:1;--range-p:.25rem;--range-bg:currentColor}@supports (color:color-mix(in lab, red, red)){.range{--range-bg:color-mix(in oklab, currentColor 10%, #0000)}}.range{cursor:pointer;vertical-align:middle;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));width:clamp(3rem,20rem,100%);height:var(--range-thumb-size);background-color:#0000;border:none;overflow:hidden}[dir=rtl] .range{--range-dir:-1}.range:focus{outline:none}.range:focus-visible{outline-offset:2px;outline:2px solid}.range::-webkit-slider-runnable-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size) * .5)}@media (forced-colors:active){.range::-webkit-slider-runnable-track{border:1px solid}.range::-moz-range-track{border:1px solid}}.range::-webkit-slider-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));background-color:var(--range-thumb);height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p) solid;appearance:none;webkit-appearance:none;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor, 0 0 0 2rem var(--range-thumb) inset, calc((var(--range-dir,1) * -100cqw) - (var(--range-dir,1) * var(--range-thumb-size) / 2)) 0 0 calc(100cqw * var(--range-fill));position:relative;top:50%;transform:translateY(-50%)}@supports (color:color-mix(in lab, red, red)){.range::-webkit-slider-thumb{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000), 0 0 0 2rem var(--range-thumb) inset, calc((var(--range-dir,1) * -100cqw) - (var(--range-dir,1) * var(--range-thumb-size) / 2)) 0 0 calc(100cqw * var(--range-fill))}}.range::-moz-range-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size) * .5)}.range::-moz-range-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p) solid;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor, 0 0 0 2rem var(--range-thumb) inset, calc((var(--range-dir,1) * -100cqw) - (var(--range-dir,1) * var(--range-thumb-size) / 2)) 0 0 calc(100cqw * var(--range-fill));background-color:currentColor;position:relative;top:50%}@supports (color:color-mix(in lab, red, red)){.range::-moz-range-thumb{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000), 0 0 0 2rem var(--range-thumb) inset, calc((var(--range-dir,1) * -100cqw) - (var(--range-dir,1) * var(--range-thumb-size) / 2)) 0 0 calc(100cqw * var(--range-fill))}}.range:disabled{cursor:not-allowed;opacity:.3}.swap{cursor:pointer;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;place-content:center;display:inline-grid;position:relative}.swap input{appearance:none;border:none}.swap>*{grid-row-start:1;grid-column-start:1}@media (prefers-reduced-motion:no-preference){.swap>*{transition-property:transform,rotate,opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}}.swap .swap-on,.swap .swap-indeterminate,.swap input:indeterminate~.swap-on,.swap input:is(:checked,:indeterminate)~.swap-off{opacity:0}.swap input:checked~.swap-on,.swap input:indeterminate~.swap-indeterminate{opacity:1;backface-visibility:visible}.avatar{vertical-align:middle;display:inline-flex;position:relative}.avatar>div{aspect-ratio:1;display:block;overflow:hidden}.avatar img{object-fit:cover;width:100%;height:100%}.checkbox{border:var(--border) solid var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox{border:var(--border) solid var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox{cursor:pointer;appearance:none;border-radius:var(--radius-selector);vertical-align:middle;color:var(--color-base-content);box-shadow:0 1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 0 #0000 inset, 0 0 #0000;--size:calc(var(--size-selector,.25rem) * 6);width:var(--size);height:var(--size);background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise);flex-shrink:0;padding:.25rem;transition:background-color .2s,box-shadow .2s;display:inline-block;position:relative}.checkbox:before{--tw-content:"";content:var(--tw-content);opacity:0;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,70% 80%,70% 100%);width:100%;height:100%;box-shadow:0px 3px 0 0px oklch(100% 0 0 / calc(var(--depth) * .1)) inset;background-color:currentColor;font-size:1rem;line-height:.75;transition:clip-path .3s .1s,opacity .1s .1s,rotate .3s .1s,translate .3s .1s;display:block;rotate:45deg}.checkbox:focus-visible{outline:2px solid var(--input-color,currentColor);outline-offset:2px}.checkbox:checked,.checkbox[aria-checked=true]{background-color:var(--input-color,#0000);box-shadow:0 0 #0000 inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px oklch(0% 0 0 / calc(var(--depth) * .1))}:is(.checkbox:checked,.checkbox[aria-checked=true]):before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media (forced-colors:active){:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}@media print{:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}.checkbox:indeterminate{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox:indeterminate{background-color:var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox:indeterminate:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:0deg}.card{border-radius:var(--radius-box);outline-offset:2px;outline:0 solid #0000;flex-direction:column;transition:outline .2s ease-in-out;display:flex;position:relative}.card:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.card:focus{outline-offset:2px;outline:2px solid #0000}}.card:focus-visible{outline-color:currentColor}.card :where(figure:first-child){border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-end-radius:unset;border-end-start-radius:unset;overflow:hidden}.card :where(figure:last-child){border-start-start-radius:unset;border-start-end-radius:unset;border-end-end-radius:inherit;border-end-start-radius:inherit;overflow:hidden}.card figure{justify-content:center;align-items:center;display:flex}.card:has(>input:is(input[type=checkbox],input[type=radio])){cursor:pointer;-webkit-user-select:none;user-select:none}.card:has(>:checked){outline:2px solid}.textarea{border:var(--border) solid #0000;appearance:none;border-radius:var(--radius-field);background-color:var(--color-base-100);vertical-align:middle;width:clamp(3rem,20rem,100%);min-height:5rem;font-size:max(var(--font-size,.875rem), .875rem);touch-action:manipulation;border-color:var(--input-color);box-shadow:0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset;flex-shrink:1;padding-block:.5rem;padding-inline:.75rem}@supports (color:color-mix(in lab, red, red)){.textarea{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}}.textarea{--input-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.textarea{--input-color:color-mix(in oklab, var(--color-base-content) 20%, #0000)}}.textarea textarea{appearance:none;background-color:#0000;border:none}.textarea textarea:focus,.textarea textarea:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.textarea textarea:focus,.textarea textarea:focus-within{outline-offset:2px;outline:2px solid #0000}}.textarea:focus,.textarea:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.textarea:focus,.textarea:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.textarea:focus,.textarea:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.textarea:focus,.textarea:focus-within{--font-size:1rem}}}.textarea:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}.textarea:has(>textarea[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.textarea:is(:disabled,[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}.textarea:has(>textarea[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder{color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.textarea:is(:disabled,[disabled]){box-shadow:none}.textarea:has(>textarea[disabled]){box-shadow:none}.textarea:has(>textarea[disabled])>textarea[disabled]{cursor:not-allowed}.stack{grid-template-rows:3px 4px 1fr 4px 3px;grid-template-columns:3px 4px 1fr 4px 3px;display:inline-grid}.stack>*{width:100%;height:100%}.stack>:nth-child(n+2){opacity:.7;width:100%}.stack>:nth-child(2){z-index:2;opacity:.9}.stack>:first-child{z-index:3;width:100%}.filter{flex-wrap:wrap;display:flex}.filter input[type=radio]{width:auto}.filter input{opacity:1;transition:margin .1s,opacity .3s,padding .3s,border-width .1s;overflow:hidden;scale:1}.filter input:not(:last-child){margin-inline-end:.25rem}.filter input.filter-reset{aspect-ratio:1}.filter input.filter-reset:after{--tw-content:"×";content:var(--tw-content)}.filter:not(:has(input:checked:not(.filter-reset))) .filter-reset{opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}.filter:not(:has(input:checked:not(.filter-reset))) input[type=reset]{opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}.filter:has(input:checked:not(.filter-reset)) input:not(:checked,.filter-reset,input[type=reset]){opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}.label{white-space:nowrap;color:currentColor;align-items:center;gap:.375rem;display:inline-flex}@supports (color:color-mix(in lab, red, red)){.label{color:color-mix(in oklab, currentcolor 60%, transparent)}}.label:has(input){cursor:pointer}.label:is(.input>*,.select>*){white-space:nowrap;height:calc(100% - .5rem);font-size:inherit;align-items:center;padding-inline:.75rem;display:flex}.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid currentColor;margin-inline:-.75rem .75rem}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid currentColor;margin-inline:.75rem -.75rem}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.status{aspect-ratio:1;border-radius:var(--radius-selector);background-color:var(--color-base-content);width:.5rem;height:.5rem;display:inline-block}@supports (color:color-mix(in lab, red, red)){.status{background-color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.status{vertical-align:middle;color:#0000004d;background-position:50%;background-repeat:no-repeat}@supports (color:color-mix(in lab, red, red)){.status{color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.status{background-image:radial-gradient(circle at 35% 30%, oklch(1 0 0 / calc(var(--depth) * .5)), #0000);box-shadow:0 2px 3px -1px}@supports (color:color-mix(in lab, red, red)){.status{box-shadow:0 2px 3px -1px color-mix(in oklab, currentColor calc(var(--depth) * 100%), #0000)}}.badge{border-radius:var(--radius-selector);vertical-align:middle;color:var(--badge-fg);border:var(--border) solid var(--badge-color,var(--color-base-200));background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise);background-color:var(--badge-bg);--badge-bg:var(--badge-color,var(--color-base-100));--badge-fg:var(--color-base-content);--size:calc(var(--size-selector,.25rem) * 6);width:fit-content;height:var(--size);padding-inline:calc(var(--size) / 2 - var(--border));justify-content:center;align-items:center;gap:.5rem;font-size:.875rem;display:inline-flex}.tabs{--tabs-height:auto;--tabs-direction:row;--tab-height:calc(var(--size-field,.25rem) * 10);height:var(--tabs-height);flex-wrap:wrap;flex-direction:var(--tabs-direction);display:flex}.card-body{padding:var(--card-p,1.5rem);font-size:var(--card-fs,.875rem);flex-direction:column;flex:auto;gap:.5rem;display:flex}.card-body :where(p){flex-grow:1}.alert{--alert-border-color:var(--color-base-200);border-radius:var(--radius-box);color:var(--color-base-content);background-color:var(--alert-color,var(--color-base-200));text-align:start;background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise);box-shadow:0 3px 0 -2px oklch(100% 0 0 / calc(var(--depth) * .08)) inset, 0 1px #000, 0 4px 3px -2px oklch(0% 0 0 / calc(var(--depth) * .08));border-style:solid;grid-template-columns:auto;grid-auto-flow:column;justify-content:start;place-items:center start;gap:1rem;padding-block:.75rem;padding-inline:1rem;font-size:.875rem;line-height:1.25rem;display:grid}@supports (color:color-mix(in lab, red, red)){.alert{box-shadow:0 3px 0 -2px oklch(100% 0 0 / calc(var(--depth) * .08)) inset, 0 1px color-mix(in oklab, color-mix(in oklab, #000 20%, var(--alert-color,var(--color-base-200))) calc(var(--depth) * 20%), #0000), 0 4px 3px -2px oklch(0% 0 0 / calc(var(--depth) * .08))}}.alert:has(:nth-child(2)){grid-template-columns:auto minmax(auto,1fr)}.chat{--mask-chat:url("data:image/svg+xml,%3csvg width='13' height='13' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='M0 11.5004C0 13.0004 2 13.0004 2 13.0004H12H13V0.00036329L12.5 0C12.5 0 11.977 2.09572 11.8581 2.50033C11.6075 3.35237 10.9149 4.22374 9 5.50036C6 7.50036 0 10.0004 0 11.5004Z'/%3e%3c/svg%3e");grid-auto-rows:min-content;column-gap:.75rem;padding-block:.25rem;display:grid}.card-title{font-size:var(--cardtitle-fs,1.125rem);align-items:center;gap:.5rem;font-weight:600;display:flex}.mask{vertical-align:middle;display:inline-block;-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.link{cursor:pointer;text-decoration-line:underline}.link:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.link:focus{outline-offset:2px;outline:2px solid #0000}}.link:focus-visible{outline-offset:2px;outline:2px solid}.btn-accent{--btn-color:var(--color-accent);--btn-fg:var(--color-accent-content)}.btn-error{--btn-color:var(--color-error);--btn-fg:var(--color-error-content)}.btn-info{--btn-color:var(--color-info);--btn-fg:var(--color-info-content)}.btn-neutral{--btn-color:var(--color-neutral);--btn-fg:var(--color-neutral-content)}.btn-primary{--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content)}}@layer daisyui.l1.l2{.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}:is(.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal) .modal-box{opacity:1;translate:0;scale:1}:host:has(:is(.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal)){--page-has-backdrop:1;--page-overflow:hidden;--page-scroll-bg:var(--page-scroll-bg-on);--page-scroll-gutter:stable;--page-scroll-transition:var(--page-scroll-transition-on);animation:forwards set-page-has-scroll;animation-timeline:scroll()}@starting-style{.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal{opacity:0}}.tooltip>.tooltip-content,.tooltip[data-tip]:before{transform:translateX(-50%) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-off) 50%}.tooltip:after{transform:translateX(-50%) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-tail) 50%}.btn:disabled:not(.btn-link,.btn-ghost){background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.btn:disabled:not(.btn-link,.btn-ghost){background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.btn:disabled:not(.btn-link,.btn-ghost){box-shadow:none}.btn:disabled{pointer-events:none;--btn-border:#0000;--btn-noise:none;--btn-fg:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.btn:disabled{--btn-fg:color-mix(in oklch, var(--color-base-content) 20%, #0000)}}.btn[disabled]:not(.btn-link,.btn-ghost){background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.btn[disabled]:not(.btn-link,.btn-ghost){background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.btn[disabled]:not(.btn-link,.btn-ghost){box-shadow:none}.btn[disabled]{pointer-events:none;--btn-border:#0000;--btn-noise:none;--btn-fg:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.btn[disabled]{--btn-fg:color-mix(in oklch, var(--color-base-content) 20%, #0000)}}@media (prefers-reduced-motion:no-preference){.collapse[open].collapse-arrow>.collapse-title:after,.collapse.collapse-open.collapse-arrow>.collapse-title:after{transform:translateY(-50%)rotate(225deg)}}.collapse.collapse-open.collapse-plus>.collapse-title:after{--tw-content:"−";content:var(--tw-content)}:is(.collapse[tabindex].collapse-arrow:focus:not(.collapse-close),.collapse.collapse-arrow[tabindex]:focus-within:not(.collapse-close))>.collapse-title:after,.collapse.collapse-arrow:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{transform:translateY(-50%)rotate(225deg)}.collapse[open].collapse-plus>.collapse-title:after,.collapse[tabindex].collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse.collapse-plus:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{--tw-content:"−";content:var(--tw-content)}.list .list-row:has(.list-col-grow:first-child){--list-grid-cols:1fr}.list .list-row:has(.list-col-grow:nth-child(2)){--list-grid-cols:minmax(0, auto) 1fr}.list .list-row:has(.list-col-grow:nth-child(3)){--list-grid-cols:minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(.list-col-grow:nth-child(4)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(.list-col-grow:nth-child(5)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(.list-col-grow:nth-child(6)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row>*{grid-row-start:1}.checkbox:disabled{cursor:not-allowed;opacity:.2}:is(.stack,.stack.stack-bottom)>*{grid-area:3/3/6/4}:is(.stack,.stack.stack-bottom)>:nth-child(2){grid-area:2/2/5/5}:is(.stack,.stack.stack-bottom)>:first-child{grid-area:1/1/4/6}.stack.stack-top>*{grid-area:1/3/4/4}.stack.stack-top>:nth-child(2){grid-area:2/2/5/5}.stack.stack-top>:first-child{grid-area:3/1/6/6}.stack.stack-start>*{grid-area:3/1/4/4}.stack.stack-start>:nth-child(2){grid-area:2/2/5/5}.stack.stack-start>:first-child{grid-area:1/3/6/6}.stack.stack-end>*{grid-area:3/3/4/6}.stack.stack-end>:nth-child(2){grid-area:2/2/5/5}.stack.stack-end>:first-child{grid-area:1/1/6/4}.btn-circle{width:var(--size);height:var(--size);border-radius:3.40282e38px;padding-inline:0}.loading-md{width:calc(var(--size-selector,.25rem) * 6)}.loading-sm{width:calc(var(--size-selector,.25rem) * 5)}.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}.checkbox-sm{--size:calc(var(--size-selector,.25rem) * 5);padding:.1875rem}.checkbox-xs{--size:calc(var(--size-selector,.25rem) * 4);padding:.125rem}.textarea-sm{font-size:max(var(--font-size,.75rem), .75rem)}.checkbox-secondary{color:var(--color-secondary-content);--input-color:var(--color-secondary)}.btn-sm{--fontsize:.75rem;--btn-p:.75rem;--size:calc(var(--size-field,.25rem) * 8)}.btn-xs{--fontsize:.6875rem;--btn-p:.5rem;--size:calc(var(--size-field,.25rem) * 6)}}.prose :where(a.btn:not(.btn-link)):not(:where([class~=not-prose],[class~=not-prose] *)){text-decoration-line:none}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse:not(td,tr,colgroup){visibility:revert-layer}.validator:user-invalid~.validator-hint{display:revert-layer}.validator:has(:user-invalid)~.validator-hint{display:revert-layer}:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false])))~.validator-hint{display:revert-layer}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.inset-4{inset:calc(var(--spacing) * 4)}.inset-\\[12\\%\\]{inset:12%}.inset-\\[28\\%\\]{inset:28%}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.-top-0\\.5{top:calc(var(--spacing) * -.5)}.-top-2{top:calc(var(--spacing) * -2)}.top-0{top:calc(var(--spacing) * 0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing) * -.5)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:calc(var(--spacing) * 0)}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.right-\\[-6px\\]{right:-6px}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-6{bottom:calc(var(--spacing) * 6)}.bottom-24{bottom:calc(var(--spacing) * 24)}.bottom-full{bottom:100%}.-left-2{left:calc(var(--spacing) * -2)}.left-0{left:calc(var(--spacing) * 0)}.left-1\\/2{left:50%}.left-4{left:calc(var(--spacing) * 4)}.left-\\[-6px\\]{left:-6px}.join{--join-ss:0;--join-se:0;--join-es:0;--join-ee:0;align-items:stretch;display:inline-flex}.join :where(.join-item){border-start-start-radius:var(--join-ss,0);border-start-end-radius:var(--join-se,0);border-end-end-radius:var(--join-ee,0);border-end-start-radius:var(--join-es,0)}.join :where(.join-item) *{--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}.join>.join-item:where(:first-child),.join :first-child:not(:last-child) :where(.join-item){--join-ss:var(--radius-field);--join-se:0;--join-es:var(--radius-field);--join-ee:0}.join>.join-item:where(:last-child),.join :last-child:not(:first-child) :where(.join-item){--join-ss:0;--join-se:var(--radius-field);--join-es:0;--join-ee:var(--radius-field)}.join>.join-item:where(:only-child),.join :only-child :where(.join-item){--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}.join>:where(:focus,:has(:focus)){z-index:1}@media (hover:hover){.join>:where(.btn:hover,:has(.btn:hover)){isolation:isolate}}.z-0{z-index:0}.z-2{z-index:2}.z-5{z-index:5}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\\[5\\]{z-index:5}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mx-0\\.5{margin-inline:calc(var(--spacing) * .5)}.mx-auto{margin-inline:auto}.my-auto{margin-block:auto}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.alert{border-width:var(--border);border-color:var(--alert-border-color,var(--color-base-200))}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.aspect-9\\/16{aspect-ratio:9/16}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.select-control-pill{--size:calc(var(--size-field,.25rem) * 10);--icon-size:calc(var(--size-field,.25rem) * 5);--chevron-size:calc(var(--size-field,.25rem) * 3);width:calc(var(--size) + 1.25rem);height:var(--size);border-radius:var(--radius-field)}.btn-control{--icon-size:calc(var(--size-field,.25rem) * 5);width:var(--size);height:var(--size);padding-inline:0}.size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.h-0{height:calc(var(--spacing) * 0)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-16{height:calc(var(--spacing) * 16)}.h-\\[100dvh\\]{height:100dvh}.h-\\[min\\(34rem\\,calc\\(100dvh-3rem\\)\\)\\]{height:min(34rem,100dvh - 3rem)}.h-auto{height:auto}.h-full{height:100%}.max-h-15{max-height:calc(var(--spacing) * 15)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-screen{max-height:100vh}.min-h-0{min-height:calc(var(--spacing) * 0)}.w-0{width:calc(var(--spacing) * 0)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-32{width:calc(var(--spacing) * 32)}.w-64{width:calc(var(--spacing) * 64)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[3px\\]{width:3px}.w-\\[22rem\\]{width:22rem}.w-\\[100vw\\]{width:100vw}.w-\\[min\\(28rem\\,calc\\(100vw_-_2rem\\)\\)\\]{width:min(28rem,100vw - 2rem)}.w-full{width:100%}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-\\[80\\%\\]{max-width:80%}.max-w-\\[90\\%\\]{max-width:90%}.max-w-\\[min\\(20rem\\,90\\%\\)\\]{max-width:min(20rem,90%)}.max-w-\\[min\\(48cqi\\,16rem\\)\\]{max-width:min(48cqi,16rem)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-5{--tw-translate-y:calc(var(--spacing) * 5);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-\\[0\\.98\\]{scale:.98}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[tavusFadeUp_180ms_ease-out\\]{animation:.18s ease-out tavusFadeUp}.animate-\\[tavusFadeUp_240ms_ease-out\\]{animation:.24s ease-out tavusFadeUp}.animate-\\[tavusPopIn_180ms_ease-out\\]{animation:.18s ease-out tavusPopIn}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.appearance-none{appearance:none}.grid-rows-\\[1fr_auto\\]{grid-template-rows:1fr auto}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-stretch{justify-content:stretch}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-\\[2px\\]{gap:2px}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-box{border-radius:var(--radius-box);border-radius:var(--radius-box)}.rounded-field{border-radius:var(--radius-field);border-radius:var(--radius-field)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-base-300{border-color:var(--color-base-300)}.bg-base-100,.bg-base-100\\/70{background-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.bg-base-100\\/70{background-color:color-mix(in oklab, var(--color-base-100) 70%, transparent)}}.bg-base-100\\/95{background-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.bg-base-100\\/95{background-color:color-mix(in oklab, var(--color-base-100) 95%, transparent)}}.bg-base-200{background-color:var(--color-base-200)}.bg-base-300{background-color:var(--color-base-300)}.bg-black{background-color:var(--color-black)}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\\/45{background-color:#00000073}@supports (color:color-mix(in lab, red, red)){.bg-black\\/45{background-color:color-mix(in oklab, var(--color-black) 45%, transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-neutral{background-color:var(--color-neutral)}.bg-primary,.bg-primary\\/15{background-color:var(--color-primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\\/15{background-color:color-mix(in oklab, var(--color-primary) 15%, transparent)}}.bg-transparent{background-color:#0000}.bg-warning{background-color:var(--color-warning)}.bg-linear-to-br{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-br{--tw-gradient-position:to bottom right in oklab}}.bg-linear-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-t{--tw-gradient-position:to top}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-t{--tw-gradient-position:to top in oklab}}.bg-linear-to-t{background-image:linear-gradient(var(--tw-gradient-stops))}.from-base-300{--tw-gradient-from:var(--color-base-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/30{--tw-gradient-from:#0000004d}@supports (color:color-mix(in lab, red, red)){.from-black\\/30{--tw-gradient-from:color-mix(in oklab, var(--color-black) 30%, transparent)}}.from-black\\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-black\\/10{--tw-gradient-via:#0000001a}@supports (color:color-mix(in lab, red, red)){.via-black\\/10{--tw-gradient-via:color-mix(in oklab, var(--color-black) 10%, transparent)}}.via-black\\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-base-200{--tw-gradient-to:var(--color-base-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-cover\\!{object-fit:cover!important}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-2\\.5{padding-left:calc(var(--spacing) * 2.5)}.text-center{text-align:center}.text-left{text-align:left}.align-text-bottom{vertical-align:text-bottom}.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-\\[0\\.6rem\\]{font-size:.6rem}.text-\\[10px\\]{font-size:10px}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.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)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.text-base-content,.text-base-content\\/40{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/40{color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.text-base-content\\/50{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/50{color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}.text-base-content\\/60{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/60{color:color-mix(in oklab, var(--color-base-content) 60%, transparent)}}.text-base-content\\/70{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/70{color:color-mix(in oklab, var(--color-base-content) 70%, transparent)}}.text-error{color:var(--color-error)}.text-info{color:var(--color-info)}.text-neutral{color:var(--color-neutral)}.text-neutral-content{color:var(--color-neutral-content)}.text-primary{color:var(--color-primary)}.text-primary-content{color:var(--color-primary-content)}.text-secondary{color:var(--color-secondary)}.text-warning-content{color:var(--color-warning-content)}.text-white{color:var(--color-white)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-100{opacity:1}.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-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)}.shadow-sm{--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-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px 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)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-base-100{--tw-ring-color:var(--color-base-100)}@layer daisyui.l1{.btn-ghost:not(.btn-active,:hover,:active:focus,:focus-visible,input:checked:not(.filter .btn)){--btn-shadow:"";--btn-bg:#0000;--btn-border:#0000;--btn-noise:none}.btn-ghost:not(.btn-active,:hover,:active:focus,:focus-visible,input:checked:not(.filter .btn)):not(:disabled,[disabled],.btn-disabled){--btn-fg:var(--btn-color,currentColor);outline-color:currentColor}@media (hover:none){.btn-ghost:not(.btn-active,:active,:focus-visible,input:checked:not(.filter .btn)):hover{--btn-shadow:"";--btn-bg:#0000;--btn-fg:var(--btn-color,currentColor);--btn-border:#0000;--btn-noise:none;outline-color:currentColor}}.btn-outline:not(.btn-active,:hover,:active:focus,:focus-visible,input:checked:not(.filter .btn),:disabled,[disabled],.btn-disabled){--btn-shadow:"";--btn-bg:#0000;--btn-fg:var(--btn-color);--btn-border:var(--btn-color);--btn-noise:none}@media (hover:none){.btn-outline:not(.btn-active,:active,:focus-visible,input:checked:not(.filter .btn)):hover{--btn-shadow:"";--btn-bg:#0000;--btn-fg:var(--btn-color);--btn-border:var(--btn-color);--btn-noise:none}}}.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{--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-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-xs{--tw-backdrop-blur:blur(var(--blur-xs));-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-\\[opacity\\,transform\\]{transition-property:opacity,transform;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))}.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))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-transform{will-change:transform}.btn{--icon-size:calc(var(--size-field,.25rem) * 5)}@media (hover:hover){.hover\\:bg-base-200:hover{background-color:var(--color-base-200)}.hover\\:text-base-content\\/80:hover{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-base-content\\/80:hover{color:color-mix(in oklab, var(--color-base-content) 80%, transparent)}}.hover\\:shadow-2xl:hover{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px 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)}}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){.motion-safe\\:animate-\\[tavusFadeOut_280ms_ease-out_forwards\\]{animation:.28s ease-out forwards tavusFadeOut}.motion-safe\\:animate-\\[tavusFadeUp_180ms_ease-out\\]{animation:.18s ease-out tavusFadeUp}.motion-safe\\:animate-\\[tavusFadeUp_280ms_ease-out\\]{animation:.28s ease-out tavusFadeUp}}@container not (width>=56.25rem){.\\@max-mobile\\:right-3{right:calc(var(--spacing) * 3)}.\\@max-mobile\\:bottom-20{bottom:calc(var(--spacing) * 20)}.\\@max-mobile\\:left-3{left:calc(var(--spacing) * 3)}.\\@max-mobile\\:aspect-9\\/16{aspect-ratio:9/16}.\\@max-mobile\\:w-24{width:calc(var(--spacing) * 24)}.\\@max-mobile\\:w-full{width:100%}.\\@max-mobile\\:gap-1{gap:calc(var(--spacing) * 1)}}@container not (width>=28rem){.\\@max-md\\:hidden{display:none}.\\@max-md\\:p-4{padding:calc(var(--spacing) * 4)}}@container (width>=48rem){.\\@3xl\\:grid-cols-\\[1fr_1\\.2fr\\]{grid-template-columns:1fr 1.2fr}}}.btn:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){background-color:var(--btn-bg);box-shadow:var(--btn-shadow);--btn-border:var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){--btn-noise:var(--fx-noise);--btn-fg:var(--color-base-content);opacity:.9}.btn-primary:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn-primary[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn-primary.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){--btn-fg:var(--color-primary-content)}.btn-accent:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn-accent[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn-accent.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){--btn-fg:var(--color-accent-content)}.btn-info:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn-info[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn-info.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){--btn-fg:var(--color-info-content)}.btn-error:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn-error[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn-error.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){--btn-fg:var(--color-error-content)}.btn-neutral:disabled:not(.btn-link,.btn-ghost,.btn-outline),.btn-neutral[disabled]:not(.btn-link,.btn-ghost,.btn-outline),.btn-neutral.btn-disabled:not(.btn-link,.btn-ghost,.btn-outline){--btn-fg:var(--color-neutral-content)}.embed-loading-screen{isolation:isolate;background-color:var(--color-base-200);color:var(--color-base-content);flex-direction:column;justify-content:center;align-items:center;display:flex}.embed-loading-screen:before{content:"";z-index:0;pointer-events:none;opacity:.42;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'><rect x='0' y='0' width='1' height='1' fill='white' fill-opacity='0.55'/><rect x='2' y='1' width='1' height='1' fill='white' fill-opacity='0.24'/><rect x='1' y='3' width='1' height='1' fill='white' fill-opacity='0.36'/></svg>");background-size:4px 4px;position:absolute;inset:-2rem;-webkit-mask-image:radial-gradient(circle at 50% 48%,#000,#0000 72%);mask-image:radial-gradient(circle at 50% 48%,#000,#0000 72%)}.embed-loading-dot-field{z-index:1;grid-template-columns:repeat(var(--dot-columns,21), minmax(0, 1fr));grid-template-rows:repeat(var(--dot-rows,13), minmax(0, 1fr));pointer-events:none;grid-auto-rows:0;place-items:center;display:grid;position:absolute;inset:0;overflow:hidden}.embed-loading-field-dot{aspect-ratio:1;width:clamp(2px,.28vw,4px);opacity:var(--dot-opacity,.54);animation:embed-loading-field-dot 2.1s steps(5, end) var(--dot-delay,0s) infinite;background:currentColor;border-radius:999px;transform:scale(1)}@container conversation (width<=899.98px){.embed-loading-dot-field{inset:0}}@keyframes embed-loading-field-dot{0%,16%{opacity:var(--dot-opacity,.54);transform:scale(1)}42%,74%{opacity:0;transform:scale(.35)}to{opacity:var(--dot-opacity,.54);transform:scale(1)}}@media (prefers-reduced-motion:reduce){.embed-loading-field-dot{animation:none}}.cs-dot{opacity:0;animation:1.4s ease-in-out infinite cs-dot-fade;display:inline-block}.cs-dot:first-child{animation-delay:0s}.cs-dot:nth-child(2){animation-delay:.2s}.cs-dot:nth-child(3){animation-delay:.4s}@keyframes cs-dot-fade{0%,80%,to{opacity:0}40%{opacity:1}}@keyframes tavusFadeUp{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes tavusFadeOut{0%{opacity:1}to{opacity:0}}@keyframes tavusPopIn{0%{opacity:0;transform:scale(.92)translateY(8px)}to{opacity:1;transform:scale(1)translateY(0)}}@keyframes tavusOrbSpin{to{transform:rotate(360deg)}}@keyframes tavusOrbPulse{0%,to{opacity:.18;transform:scale(1)}50%{opacity:.34;transform:scale(1.18)}}.tavus-mesh-bg{isolation:isolate;background-color:var(--color-base-200);background-image:radial-gradient(ellipse 90% 90% at 18% 14%, var(--color-primary), transparent 55%), radial-gradient(ellipse 95% 90% at 82% 18%, var(--color-secondary), transparent 55%), radial-gradient(ellipse 95% 90% at 22% 88%, var(--color-accent), transparent 55%), radial-gradient(ellipse 90% 95% at 80% 84%, var(--color-info,var(--color-secondary)), transparent 55%), radial-gradient(circle at 52% 48%, var(--color-primary), transparent 60%);width:100%;height:100%;position:relative;overflow:hidden}@supports (color:color-mix(in lab, red, red)){.tavus-mesh-bg{background-image:radial-gradient(ellipse 90% 90% at 18% 14%, color-mix(in oklab, var(--color-primary) 90%, transparent), transparent 55%), radial-gradient(ellipse 95% 90% at 82% 18%, color-mix(in oklab, var(--color-secondary) 90%, transparent), transparent 55%), radial-gradient(ellipse 95% 90% at 22% 88%, color-mix(in oklab, var(--color-accent) 90%, transparent), transparent 55%), radial-gradient(ellipse 90% 95% at 80% 84%, color-mix(in oklab, var(--color-info,var(--color-secondary)) 90%, transparent), transparent 55%), radial-gradient(circle at 52% 48%, color-mix(in oklab, var(--color-primary) 35%, transparent), transparent 60%)}}.tavus-mesh-bg>.tavus-mesh-blob{filter:blur(60px);will-change:transform;pointer-events:none;opacity:.65;border-radius:50%;position:absolute}.tavus-mesh-bg>.tavus-mesh-blob-1{background-color:var(--color-primary);width:55%;height:60%;animation:23s ease-in-out infinite tavusMeshFlow1;top:6%;left:4%}.tavus-mesh-bg>.tavus-mesh-blob-2{background-color:var(--color-secondary);width:50%;height:55%;animation:28s ease-in-out infinite tavusMeshFlow2;top:10%;right:6%}.tavus-mesh-bg>.tavus-mesh-blob-3{background-color:var(--color-accent);width:58%;height:50%;animation:21s ease-in-out infinite tavusMeshFlow3;bottom:8%;left:6%}.tavus-mesh-bg>.tavus-mesh-blob-4{background-color:var(--color-info,var(--color-secondary));width:52%;height:55%;animation:26s ease-in-out infinite tavusMeshFlow4;bottom:6%;right:8%}.tavus-mesh-bg>.tavus-mesh-blob-5{background-color:var(--color-primary);opacity:.45;width:42%;height:46%;animation:19s ease-in-out infinite tavusMeshFlow5;top:28%;left:30%}@keyframes tavusMeshFlow1{0%,to{transform:translate(0%)scale(1)}20%{transform:translate(18%,10%)scale(1.08)}45%{transform:translate(10%,24%)scale(1.14)}70%{transform:translate(24%,18%)scale(1.06)}}@keyframes tavusMeshFlow2{0%,to{transform:translate(0%)scale(1)}30%{transform:translate(-22%,14%)scale(1.1)}55%{transform:translate(-30%,6%)scale(1.05)}80%{transform:translate(-12%,22%)scale(1.12)}}@keyframes tavusMeshFlow3{0%,to{transform:translate(0%)scale(1)}25%{transform:translate(20%,-14%)scale(1.06)}60%{transform:translate(28%,-22%)scale(1.14)}85%{transform:translate(14%,-10%)scale(1.04)}}@keyframes tavusMeshFlow4{0%,to{transform:translate(0%)scale(1)}35%{transform:translate(-18%,-22%)scale(1.12)}60%{transform:translate(-26%,-12%)scale(1.06)}85%{transform:translate(-8%,-26%)scale(1.1)}}@keyframes tavusMeshFlow5{0%,to{transform:translate(0%)scale(1)rotate(0)}25%{transform:translate(28%,-12%)scale(1.18)rotate(90deg)}50%{transform:translate(-6%,26%)scale(.85)rotate(180deg)}75%{transform:translate(-26%,-8%)scale(1.08)rotate(270deg)}}@media (prefers-reduced-motion:reduce){.tavus-mesh-bg>.tavus-mesh-blob{animation:none}}@keyframes rating{0%,40%{filter:brightness(1.05)contrast(1.05);scale:1.1}}@keyframes dropdown{0%{opacity:0}}@keyframes radio{0%{padding:5px}50%{padding:3px}}@keyframes toast{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes rotator{89.9999%,to{--first-item-position:0 0%}90%,99.9999%{--first-item-position:0 calc(var(--items) * 100%)}to{translate:0 -100%}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@keyframes menu{0%{opacity:0}}@keyframes progress{50%{background-position-x:-115%}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@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-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{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-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}`,Xe,Ze,Qe,$e,et=0,tt=[],nt=d,rt=nt.__b,it=nt.__r,at=nt.diffed,ot=nt.__c,st=nt.unmount,ct=nt.__;function lt(e,t){nt.__h&&nt.__h(Ze,e,et||t),et=0;var n=Ze.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function T(e){return et=1,ut(St,e)}function ut(e,t,n){var r=lt(Xe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):St(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Ze,!Ze.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.some(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,t,n)||o};Ze.__f=!0;var a=Ze.shouldComponentUpdate,o=Ze.componentWillUpdate;Ze.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},Ze.shouldComponentUpdate=i}return r.__N||r.__}function E(e,t){var n=lt(Xe++,3);!nt.__s&&xt(n.__H,t)&&(n.__=e,n.u=t,Ze.__H.__h.push(n))}function dt(e,t){var n=lt(Xe++,4);!nt.__s&&xt(n.__H,t)&&(n.__=e,n.u=t,Ze.__h.push(n))}function D(e){return et=5,O(function(){return{current:e}},[])}function ft(e,t,n){et=6,dt(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function O(e,t){var n=lt(Xe++,7);return xt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function k(e,t){return et=8,O(function(){return e},t)}function pt(e){var t=Ze.context[e.__c],n=lt(Xe++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(Ze)),t.props.value):e.__}function mt(e,t){nt.useDebugValue&&nt.useDebugValue(t?t(e):e)}function ht(){var e=lt(Xe++,11);if(!e.__){for(var t=Ze.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||=[0,0];e.__=`P`+n[0]+`-`+ n[1]++}return e.__}function gt(){for(var e;e=tt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(yt),t.__h.some(bt),t.__h=[]}catch(n){t.__h=[],nt.__e(n,e.__v)}}}nt.__b=function(e){Ze=null,rt&&rt(e)},nt.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ct&&ct(e,t)},nt.__r=function(e){it&&it(e),Xe=0;var t=(Ze=e.__c).__H;t&&(Qe===Ze?(t.__h=[],Ze.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(yt),t.__h.some(bt),t.__h=[],Xe=0)),Qe=Ze},nt.diffed=function(e){at&&at(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(tt.push(t)!==1&&$e===nt.requestAnimationFrame||(($e=nt.requestAnimationFrame)||vt)(gt)),t.__H.__.some(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Qe=Ze=null},nt.__c=function(e,t){t.some(function(e){try{e.__h.some(yt),e.__h=e.__h.filter(function(e){return!e.__||bt(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],nt.__e(n,e.__v)}}),ot&&ot(e,t)},nt.unmount=function(e){st&&st(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{yt(e)}catch(e){t=e}}),n.__H=void 0,t&&nt.__e(t,n.__v))};var _t=typeof requestAnimationFrame==`function`;function vt(e){var t,n=function(){clearTimeout(r),_t&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);_t&&(t=requestAnimationFrame(n))}function yt(e){var t=Ze,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),Ze=t}function bt(e){var t=Ze;e.__c=e.__(),Ze=t}function xt(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function St(e,t){return typeof t==`function`?t(e):t}var Ct=0;Array.isArray;function A(e,t,n,r,i,a){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:--Ct,__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 d.vnode&&d.vnode(l),l}var wt=Ie(null);function Tt(e){let t;if(e[`override-config`])try{t=JSON.parse(e[`override-config`])}catch{}let n=!!e.token;return{deploymentId:e[`deployment-id`],conversationUrl:e[`conversation-url`],previewToken:e.token,baseUrl:e[`base-url`],conversationalContext:Dt(e[`conversational-context`]),customGreeting:Dt(e[`custom-greeting`]),memoryStores:Ot(e[`memory-stores`]),overrideConfig:t,mode:n?`preview`:`production`}}function Et(e){let t=O(()=>Tt({"deployment-id":e[`deployment-id`],"conversation-url":e[`conversation-url`],"override-config":e[`override-config`],"conversational-context":e[`conversational-context`],"custom-greeting":e[`custom-greeting`],"memory-stores":e[`memory-stores`],"base-url":e[`base-url`],token:e.token}),[e[`deployment-id`],e[`conversation-url`],e[`override-config`],e[`conversational-context`],e[`custom-greeting`],e[`memory-stores`],e[`base-url`],e.token]);return A(wt.Provider,{value:t,children:e.children})}function Dt(e){return e?.trim()||void 0}function Ot(e){let t=e?.split(`,`).map(e=>e.trim()).filter(Boolean);return t&&t.length?t:void 0}var kt=Symbol.for(`preact-signals`);function At(){if(It>1)It--;else{var e,t=!1;for((function(){var e=Bt;for(Bt=void 0;e!==void 0;)e.S.v===e.v&&(e.S.i=e.i),e=e.o})();Ft!==void 0;){var n=Ft;for(Ft=void 0,Lt++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Gt(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(Lt=0,It--,t)throw e}}function jt(e){if(It>0)return e();zt=++Rt,It++;try{return e()}finally{At()}}var Mt=void 0;function Nt(e){var t=Mt;Mt=void 0;try{return e()}finally{Mt=t}}var Pt,Ft=void 0,It=0,Lt=0,Rt=0,zt=0,Bt=void 0,Vt=0;function Ht(e){if(Mt!==void 0){var t=e.n;if(t===void 0||t.t!==Mt)return t={i:0,S:e,p:Mt.s,n:void 0,t:Mt,e:void 0,x:void 0,r:t},Mt.s!==void 0&&(Mt.s.n=t),Mt.s=t,e.n=t,32&Mt.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Mt.s,t.n=void 0,Mt.s.n=t,Mt.s=t),t}}function Ut(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}Ut.prototype.brand=kt,Ut.prototype.h=function(){return!0},Ut.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n===void 0?Nt(function(){var e;(e=t.W)==null||e.call(t)}):n.e=e)},Ut.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&Nt(function(){var e;(e=t.Z)==null||e.call(t)}))}},Ut.prototype.subscribe=function(e){var t=this;return en(function(){var n=t.value,r=Mt;Mt=void 0;try{e(n)}finally{Mt=r}},{name:`sub`})},Ut.prototype.valueOf=function(){return this.value},Ut.prototype.toString=function(){return this.value+``},Ut.prototype.toJSON=function(){return this.value},Ut.prototype.peek=function(){var e=this;return Nt(function(){return e.value})},Object.defineProperty(Ut.prototype,"value",{get:function(){var e=Ht(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Lt>100)throw Error(`Cycle detected`);(function(e){It!==0&&Lt===0&&e.l!==zt&&(e.l=zt,Bt={S:e,v:e.v,i:e.i,o:Bt})})(this),this.v=e,this.i++,Vt++,It++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{At()}}}});function Wt(e,t){return new Ut(e,t)}function Gt(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Kt(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function qt(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Jt(e,t){Ut.call(this,void 0),this.x=e,this.s=void 0,this.g=Vt-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}Jt.prototype=new Ut,Jt.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Vt))return!0;if(this.g=Vt,this.f|=1,this.i>0&&!Gt(this))return this.f&=-2,!0;var e=Mt;try{Kt(this),Mt=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return Mt=e,qt(this),this.f&=-2,!0},Jt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Ut.prototype.S.call(this,e)},Jt.prototype.U=function(e){if(this.t!==void 0&&(Ut.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Jt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Jt.prototype,"value",{get:function(){if(1&this.f)throw Error(`Cycle detected`);var e=Ht(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Yt(e,t){return new Jt(e,t)}function Xt(e){var t=e.m;if(e.m=void 0,typeof t==`function`){It++;var n=Mt;Mt=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Zt(e),t}finally{Mt=n,At()}}}function Zt(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Xt(e)}function Qt(e){if(Mt!==this)throw Error(`Out-of-order effect`);qt(this),Mt=e,this.f&=-2,8&this.f&&Zt(this),At()}function $t(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,Pt&&Pt.push(this)}$t.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t==`function`&&(this.m=t)}finally{e()}},$t.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,Xt(this),Kt(this),It++;var e=Mt;return Mt=this,Qt.bind(this,e)},$t.prototype.N=function(){2&this.f||(this.f|=2,this.u=Ft,Ft=this)},$t.prototype.d=function(){this.f|=8,1&this.f||Zt(this)},$t.prototype.dispose=function(){this.d()};function en(e,t){var n=new $t(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var tn,nn,rn=typeof window<`u`&&!!window.__PREACT_SIGNALS_DEVTOOLS__,an=[],on=[];en(function(){tn=this.N})();function sn(e,t){d[e]=t.bind(null,d[e]||function(){})}function cn(e){if(nn){var t=nn;nn=void 0,t()}nn=e&&e.S()}function ln(e){var t=this,n=e.data,r=dn(n);r.value=n;var i=O(function(){for(var e=t,n=t.__v;n=n.__;)if(n.__c){n.__c.__$f|=4;break}var i=Yt(function(){var e=r.value.value;return e===0?0:!0===e?``:e||``}),a=Yt(function(){return!Array.isArray(i.value)&&!p(i.value)}),o=en(function(){if(this.N=_n,a.value){var t=i.value;e.__v&&e.__v.__e&&e.__v.__e.nodeType===3&&(e.__v.__e.data=t)}}),s=t.__$u.d;return t.__$u.d=function(){o(),s.call(this)},[a,i]},[]),a=i[0],o=i[1];return a.value?o.peek():o.value}ln.displayName=`ReactiveTextNode`,Object.defineProperties(Ut.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ln},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}}),sn(`__b`,function(e,t){if(typeof t.type==`string`){var n,r=t.props;for(var i in r)if(i!==`children`){var a=r[i];a instanceof Ut&&(n||(t.__np=n={}),n[i]=a,r[i]=a.peek())}}e(t)}),sn(`__r`,function(e,t){if(e(t),t.type!==ue){cn();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(e,t){var n;return en(function(){n=this},{name:t}),n.c=e,n}(function(){var e;rn&&((e=n.y)==null||e.call(n)),r.__$f|=1,r.setState({})},typeof t.type==`function`?t.type.displayName||t.type.name:``))),cn(n)}}),sn(`__e`,function(e,t,n,r){cn(),e(t,n,r)}),sn(`diffed`,function(e,t){cn();var n;if(typeof t.type==`string`&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var a=n.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in r)&&(s.d(),a[o]=void 0)}else a={},n.U=a;for(var c in r){var l=a[c],u=r[c];l===void 0?(l=un(n,c,u),a[c]=l):l.o(u,i)}for(var d in r)i[d]=r[d]}}e(t)});function un(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,a=Wt(n),o=n.peek();return{o:function(e,t){a.value=e,o=e.peek()},d:en(function(){this.N=_n;var n=a.value.value;o===n?o=void 0:(o=void 0,i?e[t]=n:n!=null&&(!1!==n||t[4]===`-`)?e.setAttribute(t,n):e.removeAttribute(t))})}}sn(`unmount`,function(e,t){if(typeof t.type==`string`){var n=t.__e;if(n){var r=n.U;if(r)for(var i in n.U=void 0,r){var a=r[i];a&&a.d()}}t.__np=void 0}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),sn(`__h`,function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)}),de.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u==`boolean`&&!0===this.u){var a=2&this.__$f;if(!(r||a||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in e)if(o!==`__source`&&e[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};function dn(e,t){return O(function(){return Wt(e,t)},[])}var fn=typeof requestAnimationFrame>`u`?setTimeout:function(e){var t=function(){clearTimeout(n),cancelAnimationFrame(r),e()},n=setTimeout(t,35),r=requestAnimationFrame(t)},pn=function(e){queueMicrotask(function(){queueMicrotask(e)})};function mn(){jt(function(){for(var e;e=an.shift();)tn.call(e)})}function hn(){an.push(this)===1&&(d.requestAnimationFrame||fn)(mn)}function gn(){jt(function(){for(var e;e=on.shift();)tn.call(e)})}function _n(){on.push(this)===1&&(d.requestAnimationFrame||pn)(gn)}function vn(e,t){var n=D(e);n.current=e,E(function(){return en(function(){return this.N=hn,n.current()},t)},[])}function yn(e){let t=`[Tavus:${e}]`;return{info:(...e)=>{},warn:(...e)=>console.warn(t,...e),error:(...e)=>console.error(t,...e)}}var bn=yn(`API`);function xn(e={}){let t=(e.baseUrl??`https://tavusapi.com`).replace(/\/+$/,``),n=e.token;async function r(e,r,i,a){let o={"Content-Type":`application/json`};n&&(o.Authorization=`Bearer ${n}`);let s=`${t}${r}`;bn.info(e,s);let c=await fetch(s,{method:e,headers:o,body:i==null?void 0:JSON.stringify(i),signal:a?.signal});if(!c.ok){let t=await c.text().catch(()=>``);throw bn.error(`${e} ${s} → ${c.status}`,t),new Sn(c.status,t||c.statusText,c.headers)}if(c.headers.get(`content-type`)?.includes(`application/json`))return await c.json()}return{get:(e,t)=>r(`GET`,e,void 0,t),post:(e,t,n)=>r(`POST`,e,t,n)}}var Sn=class extends Error{status;body;headers;constructor(e,t,n){super(`API error ${e}: ${t}`),this.status=e,this.body=t,this.headers=n,this.name=`ApiError`}};function Cn(e,t,n){return e.get(`/v2/deployments/${t}/init`,n)}function wn(e,t,n={},r){return e.post(`/v2/deployments/${t}/start`,n,r)}function Tn(e,t,n){return e.post(`/v2/deployments/${t}/conversations/${n}/end`)}function En(e,t,n,r){let i=`/v2/conversations/${t}/canvas/interactions`;return r?e.post(i,n,r):e.post(i,n)}function Dn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function On(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(Dn(a)&&Dn(i)?n[r]=On(a,i):n[r]=i)}return n}var kn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),An=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=kn(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),j=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=kn(),n=An(),r=kn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=An();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=ie(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=ie(this.rhs,e,n),this}get names(){return re(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=ie(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(ae(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>ne(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(oe(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=ie(this.condition,e,t),this}get names(){let e=super.names;return re(e,this.condition),this.else&&ne(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=ie(this.iteration,e,t),this}get names(){return ne(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return re(re(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=ie(this.iterable,e,t),this}get names(){return ne(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&ne(e,this.catch.names),this.finally&&ne(e,this.finally.names),e}},ee=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};ee.kind=`catch`;var te=class extends m{render(e){return`finally`+super.render(e)}};te.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
3
+ `:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new ee(e),t(e)}return n&&(this._currNode=r.finally=new te,this.code(n)),this._endBlockNode(ee,te)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function ne(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function re(e,n){return n instanceof t._CodeOrName?ne(e,n.names):e}function ie(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function ae(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function oe(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${fe(e)}`}e.not=oe;var se=de(e.operators.AND);function ce(...e){return e.reduce(se)}e.and=ce;var le=de(e.operators.OR);function ue(...e){return e.reduce(le)}e.or=ue;function de(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${fe(n)} ${e} ${fe(r)}`}function fe(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),M=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=j(),n=kn();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0?!0:(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0?!0:(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),jn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),Mn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=j(),n=M(),r=jn();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),Nn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=Mn(),n=j(),r=jn(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),Pn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),Fn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),In=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=Pn(),n=Fn(),r=Mn(),i=j(),a=M(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
4
4
  || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
5
5
  || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
6
- || ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function p({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function m(e,t,n,r=o.Correct){let a=r===o.Correct?i.operators.EQ:i.operators.NEQ,s;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:s=(0,i._)`Array.isArray(${t})`;break;case`object`:s=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:s=c((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:s=c();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===o.Correct?s:(0,i.not)(s);function c(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=m;function h(e,t,n,r){if(e.length===1)return m(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(let e in s)o=(0,i.and)(o,m(e,t,n,r));return o}e.checkDataTypes=h;var g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function _(e){let t=v(e);(0,r.reportError)(t,g)}e.reportTypeError=_;function v(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),In=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;var t=M(),n=kn();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),Ln=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=M(),n=kn(),r=An(),i=kn();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(d(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function o({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(d(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=o;function s(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=s;function c(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(e,n,r){return(0,t._)`${c(e)}.call(${n}, ${r})`}e.isOwnProperty=l;function u(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${l(e,n,r)}`:a}e.propertyInData=u;function d(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(l(e,n,r))):a}e.noPropertyInData=d;function f(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=f;function p(e,t){return f(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=p;function m({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=m;var h=(0,t._)`new RegExp`;function g({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?h:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=g;function _(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=_;function v(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=v})),Rn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=M(),n=An(),r=Ln(),i=jn();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=u(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let d=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}e.macroKeywordCode=a;function o(e,i){let{gen:a,keyword:o,schema:d,parentSchema:f,$data:p,it:m}=e;l(m,i);let h=u(a,o,!p&&i.compile?i.compile.call(m.self,d,f,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&s(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&s(e),x(()=>c(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!p||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=o;function s(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function c(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function l({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function u(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function d(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=d;function f({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=f})),zn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=M(),n=kn();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),Bn=o(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),Vn=o(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else (p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),Hn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=kn(),n=Bn(),r=Vn(),i=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!s(e):t?c(e)<=t:!1}e.inlineRef=a;var o=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function s(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(s)||typeof n==`object`&&s(n))return!0}return!1}function c(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=c(e)),n===1/0)))return 1/0;return n}function l(e,t=``,n){return n!==!1&&(t=f(t)),u(e,e.parse(t))}e.getFullPath=l;function u(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=u;var d=/#\/?$/;function f(e){return e?e.replace(d,``):``}e.normalizeId=f;function p(e,t,n){return n=f(n),e.resolve(t,n)}e.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function h(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=f(e[i]||t),s={"":o},c=l(a,o,!1),u={},d=new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=l.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function l(t){let n=this.opts.uriResolver.resolve;if(t=f(o?n(o,t):t),d.has(t))throw h(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?p(e,r.schema,t):t!==f(a)&&(t[0]===`#`?(p(e,u[t],t),u[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!m.test(e))throw Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}}),u;function p(e,t,r){if(t!==void 0&&!n(e,t))throw h(r)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=h})),Un=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=Mn(),n=Fn(),r=Pn(),i=Fn(),a=In(),o=Rn(),s=zn(),c=M(),l=An(),u=Hn(),d=kn(),f=jn();function p(e){if(S(e)&&(w(e),x(e))){_(e);return}m(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=p;function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,c._)`${l.default.data}, ${l.default.valCxt}`,r.$async,()=>{e.code((0,c._)`"use strict"; ${y(n,i)}`),g(e,i),e.code(a)}):e.func(t,(0,c._)`${l.default.data}, ${h(i)}`,r.$async,()=>e.code(y(n,i)).code(a))}function h(e){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function g(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,(0,c._)`""`),e.var(l.default.parentData,(0,c._)`undefined`),e.var(l.default.parentDataProperty,(0,c._)`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function _(e){let{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&ie(e),te(e),r.let(l.default.vErrors,null),r.let(l.default.errors,0),n.unevaluated&&v(e),ee(e),ae(e)})}function v(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,c._)`${n}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}function y(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${n} */`:c.nil}function b(e,n){if(S(e)&&(w(e),x(e))){C(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function x({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function S(e){return typeof e.schema!=`boolean`}function C(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&ie(e),ne(e),re(e);let a=r.const(`_errs`,l.default.errors);ee(e,a),r.var(t,(0,c._)`${a} === ${l.default.errors}`)}function w(e){(0,d.checkUnknownRules)(e),T(e)}function ee(e,t){if(e.opts.jtd)return se(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);se(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function T(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function te(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,d.checkStrictMode)(e,`default is ignored in the schema root`)}function ne(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function re(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function ie({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,c._)`${l.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,c.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,c._)`${l.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function ae(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,c._)`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw((0,c._)`new ${i}(${l.default.vErrors})`)):(t.assign((0,c._)`${r}.errors`,l.default.vErrors),a.unevaluated&&oe(e),t.return((0,c._)`${l.default.errors} === 0`))}function oe({gen:e,evaluated:t,props:n,items:r}){n instanceof c.Name&&e.assign((0,c._)`${t}.props`,n),r instanceof c.Name&&e.assign((0,c._)`${t}.items`,r)}function se(e,t,n,a){let{gen:o,schema:s,data:u,allErrors:f,opts:p,self:m}=e,{RULES:h}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(s,h))){o.block(()=>ve(e,`$ref`,h.all.$ref.definition));return}p.jtd||le(e,t),o.block(()=>{for(let e of h.rules)g(e);g(h.post)});function g(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,u,p.strictNumbers)),ce(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):ce(e,d),f||o.if((0,c._)`${l.default.errors} === ${a||0}`))}}function ce(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&ve(e,n.keyword,n.definition,t.type)})}function le(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(ue(e,t),e.opts.allowUnionTypes||de(e,t),fe(e,e.dataTypes))}function ue(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{me(e.dataTypes,t)||ge(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),he(e,t)}}function de(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&ge(e,`use allowUnionTypes to allow union type keyword`)}function fe(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>pe(t,e))&&ge(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function pe(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function me(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function he(e,t){let n=[];for(let r of e.dataTypes)me(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function ge(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var _e=class{constructor(e,t,n){if((0,o.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,xe(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,l.default.errors))}result(e,t,n){this.failResult((0,c.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=c.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,c.or)((0,c._)`${r} === undefined`,t)),e!==c.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,c.or)(o(),s());function o(){if(n.length){if(!(t instanceof c.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,c._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,c._)`!${n}(${t})`}return c.nil}}subschema(e,t){let n=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(n,this.it,e),(0,s.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return b(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=d.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=d.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}};e.KeywordCxt=_e;function ve(e,t,n,r){let i=new _e(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):`macro`in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}var ye=/^\/(?:[^~]|~0|~1)*$/,be=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function xe(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!ye.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=be.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(u(`property/index`,s));return r[t-s]}if(s>t)throw Error(u(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,c._)`${a}${(0,c.getProperty)((0,d.unescapeJsonPointer)(e))}`,o=(0,c._)`${o} && ${a}`);return o;function u(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=xe})),Wn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),Gn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Hn();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),Kn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=M(),n=Wn(),r=An(),i=Hn(),a=kn(),o=Un(),s=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=s;function c(e){let a=d.call(this,e);if(a)return a;let s=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:u}=this.opts,f=new t.CodeGen(this.scope,{es5:c,lines:l,ownProperties:u}),p;e.$async&&(p=f.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let m=f.scopeName(`validate`);e.validateName=m;let h={gen:f,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:s,baseId:e.baseId||s,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,o.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);let n=f.toString();g=`${f.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:m,validateCode:n,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=c;function l(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=p.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new s({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=u.call(this,a)}e.resolveRef=l;function u(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:c.call(this,e)}function d(e){for(let t of this._compilations)if(f(t,e))return t}e.getCompilingSchema=d;function f(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return g.call(this,n,e);let o=(0,i.normalizeId)(r),l=this.refs[o]||this.schemas[o];if(typeof l==`string`){let t=m.call(this,e,l);return typeof t?.schema==`object`?g.call(this,n,t):void 0}if(typeof l?.schema==`object`){if(l.validate||c.call(this,l),o===(0,i.normalizeId)(t)){let{schema:t}=l,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new s({schema:t,schemaId:n,root:e,baseId:a})}return g.call(this,n,l)}}e.resolveSchema=m;var h=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function g(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!h.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=m.call(this,r,e)}let{schemaId:c}=this.opts;if(o||=new s({schema:n,schemaId:c,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),qn=s({$id:()=>Jn,additionalProperties:()=>!1,default:()=>$n,description:()=>Yn,properties:()=>Qn,required:()=>Zn,type:()=>Xn}),Jn,Yn,Xn,Zn,Qn,$n,er=a((()=>{Jn=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,Yn=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,Xn=`object`,Zn=[`$data`],Qn={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},$n={$id:Jn,description:Yn,type:Xn,required:Zn,properties:Qn,additionalProperties:!1}})),tr=o(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),i=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var c=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function l(e){return e.length=0,!0}function u(e,t,n){if(e.length){let r=s(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function d(e){let t=0,n={error:!1,address:``,zone:``},r=[],i=[],a=!1,o=!1,c=u;for(let s=0;s<e.length;s++){let u=e[s];if(!(u===`[`||u===`]`))if(u===`:`){if(a===!0&&(o=!0),!c(i,r,n))break;if(++t>7){n.error=!0;break}s>0&&e[s-1]===`:`&&(a=!0),r.push(`:`);continue}else if(u===`%`){if(!c(i,r,n))break;c=l}else{i.push(u);continue}}return i.length&&(c===l?n.zone=i.join(``):o?r.push(i.join(``)):r.push(s(i))),n.address=r.join(``),n}function f(e){if(p(e,`:`)<2)return{host:e,isIPV6:!1};let t=d(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+=`%`+t.zone,n+=`%25`+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}function p(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function m(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}else{n.push(t);break}}else if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}else if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}else n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}var h={"@":`%40`,"/":`%2F`,"?":`%3F`,"#":`%23`,":":`%3A`},g=/[@/?#:]/g,_=/[@/?#]/g;function v(e,t){let n=t?_:g;return n.lastIndex=0,e.replace(n,e=>h[e])}function y(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r<e.length;r++){if(e[r]===`%`&&r+2<e.length){let o=e.slice(r+1,r+3);if(i(o)){let e=o.toUpperCase(),i=String.fromCharCode(parseInt(e,16));t&&a(i)?n+=i:n+=`%`+e,r+=2;continue}}n+=e[r]}return n}function b(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));i!==`.`&&a(i)?t+=i:t+=`%`+e,n+=2;continue}}o(e[n])?t+=e[n]:t+=escape(e[n])}return t}function x(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){t+=`%`+r.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t}function S(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push(`@`)),e.host!==void 0){let n=unescape(e.host);if(!r(n)){let e=f(n);n=e.isIPV6===!0?`[${e.escapedHost}]`:v(n,!1)}t.push(n)}return(typeof e.port==`number`||typeof e.port==`string`)&&(t.push(`:`),t.push(String(e.port))),t.length?t.join(``):void 0}t.exports={nonSimpleDomain:c,recomposeAuthority:S,reescapeHostDelimiters:v,normalizePercentEncoding:y,normalizePathEncoding:b,escapePreservingEscapes:x,removeDotSegments:m,isIPv4:r,isUUID:n,normalizeIPv6:f,stringArrayToHexStripped:s}})),nr=o(((e,t)=>{var{isUUID:n}=tr(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split(`?`);e.path=t&&t!==`/`?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),rr=o(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,escapePreservingEscapes:s,reescapeHostDelimiters:c,isIPv4:l,nonSimpleDomain:u}=tr(),{SCHEMES:d,getSchemeHandler:f}=nr();function p(e,t){return typeof e==`string`?e=S(e,t):typeof e==`object`&&(e=x(_(e,t),t)),e}function m(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=h(x(e,r),x(t,r),r,!0);return r.skipEscape=!0,_(i,r)}function h(e,t,n,i){let a={};return i||(e=x(_(e,n),n),t=x(_(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path=`/`+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:a.path=t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,t.query===void 0?a.query=e.query:a.query=t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function g(e,t,n){let r=w(e,n),i=w(t,n);return r!==void 0&&i!==void 0&&r.toLowerCase()===i.toLowerCase()}function _(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},o=Object.assign({},t),c=[],l=f(o.scheme||n.scheme);l&&l.serialize&&l.serialize(n,o),n.path!==void 0&&(o.skipEscape?n.path=a(n.path):(n.path=s(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),o.reference!==`suffix`&&n.scheme&&c.push(n.scheme,`:`);let u=i(n);if(u!==void 0&&(o.reference!==`suffix`&&c.push(`//`),c.push(u),n.path&&n.path[0]!==`/`&&c.push(`/`)),n.path!==void 0){let e=n.path;!o.absolutePath&&(!l||!l.absolutePath)&&(e=r(e)),u===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),c.push(e)}return n.query!==void 0&&c.push(`?`,n.query),n.fragment!==void 0&&c.push(`#`,n.fragment),c.join(``)}var v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function b(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1,s=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let d=e.match(v);if(d){i.scheme=d[1],i.userinfo=d[3],i.host=d[4],i.port=parseInt(d[5],10),i.path=d[6]||``,i.query=d[7],i.fragment=d[8],isNaN(i.port)&&(i.port=d[5]);let t=y(i,d);if(t!==void 0&&(i.error=i.error||t,a=!0),i.host)if(l(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),s=e.isIPV6}else s=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference=`same-document`:i.scheme===void 0?i.reference=`relative`:i.fragment===void 0?i.reference=`absolute`:i.reference=`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let p=f(r.scheme||i.scheme);if(!r.unicodeSupport&&(!p||!p.unicodeSupport)&&i.host&&(r.domainHost||p&&p.domainHost)&&s===!1&&u(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}if((!p||p&&!p.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=c(unescape(i.host),s))),i.path&&=o(i.path),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||`URI malformed`}p&&p.parse&&p.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:a}}function x(e,t){return b(e,t).parsed}function S(e,t){return C(e,t).normalized}function C(e,t){let{parsed:n,malformedAuthorityOrPort:r}=b(e,t);return{normalized:r?e:_(n,t),malformedAuthorityOrPort:r}}function w(e,t){if(typeof e==`string`){let{normalized:n,malformedAuthorityOrPort:r}=C(e,t);return r?void 0:n}if(typeof e==`object`)return _(e,t)}var ee={SCHEMES:d,normalize:p,resolve:m,resolveComponent:h,equal:g,serialize:_,parse:x};t.exports=ee,t.exports.default=ee,t.exports.fastUri=ee})),ir=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=rr();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),ar=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Un();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=M();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});var r=Wn(),i=Gn(),a=Nn(),o=Kn(),s=M(),c=Hn(),u=Fn(),d=kn(),f=(er(),l(qn).default),p=ir(),m=(e,t)=>new RegExp(e,t);m.code=`new RegExp`;var h=[`removeAdditional`,`useDefaults`,`coerceTypes`],g=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),_={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},v={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},y=200;function b(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??m,a=e.uriResolver??p.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??y,loopEnum:e.loopEnum??y,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var x=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:t,lines:n}),this.logger=re(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,_,e,`NOT SUPPORTED`),S.call(this,v,e,`DEPRECATED`,`warn`),this._metaOpts=te.call(this),e.formats&&ee.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&T.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;n===`id`&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await a.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function a(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await a.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=C.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:n});if(t=o.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=C.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,c.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(ae.call(this,n,t),!t)return(0,d.eachItem)(n,e=>oe.call(this,e)),this;ce.call(this,t);let r={...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)};return(0,d.eachItem)(n,r.type.length===0?e=>oe.call(this,e,r):e=>r.type.forEach(t=>oe.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=ue(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e==`object`)a=e[s];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let l=this._cache.get(e);if(l!==void 0)return l;n=(0,c.normalizeId)(a||n);let u=c.getSchemaRefs.call(this,e,n);return l=new o.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}};x.ValidationError=r.default,x.MissingRefError=i.default,e.default=x;function S(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function C(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function ee(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function T(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||=t,this.addKeyword(n)}}function te(){let e={...this.opts};for(let t of h)delete e[t];return e}var ne={log(){},warn(){},error(){}};function re(e){if(e===!1)return ne;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var ie=/^[a-z_$][a-z0-9_$:-]*$/i;function ae(e,t){let{RULES:n}=this;if((0,d.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!ie.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function oe(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)}};t.before?se.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function se(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function ce(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=ue(t)),e.validateSchema=this.compile(t,!0))}var le={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function ue(e){return{anyOf:[e,le]}}})),or=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),sr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;var t=Gn(),n=Ln(),r=M(),i=An(),a=Kn(),o=kn(),s={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:u,validateName:d,opts:f,self:p}=o,{root:m}=u;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);if(h instanceof a.SchemaEnv)return _(h);return v(h);function g(){if(u===m)return l(e,d,u,u.$async);let t=n.scopeValue(`root`,{ref:m});return l(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){l(e,c(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,f.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function c(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=c;function l(e,t,a,s){let{gen:c,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?i.default.this:r.nil;s?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=c.let(`valid`);c.try(()=>{c.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||c.assign(i,!0)},e=>{c.if((0,r._)`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),g(e),u||c.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;c.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),c.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!l.opts.unevaluated)return;let t=a?.validate?.evaluated;if(l.props!==!0)if(t&&!t.dynamicProps)t.props!==void 0&&(l.props=o.mergeEvaluated.props(c,t.props,l.props));else{let t=c.var(`props`,(0,r._)`${e}.evaluated.props`);l.props=o.mergeEvaluated.props(c,t,l.props,r.Name)}if(l.items!==!0)if(t&&!t.dynamicItems)t.items!==void 0&&(l.items=o.mergeEvaluated.items(c,t.items,l.items));else{let t=c.var(`items`,(0,r._)`${e}.evaluated.items`);l.items=o.mergeEvaluated.items(c,t,l.items,r.Name)}}}e.callRef=l,e.default=s})),cr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=or(),n=sr();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),lr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),ur=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),dr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),fr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M(),n=kn(),r=dr();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),pr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ln(),n=kn(),r=M();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,r._)`{pattern: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e,u=l.opts.unicodeRegExp?`u`:``;if(o){let{regExp:t}=l.opts.code,o=t.code===`new RegExp`?(0,r._)`new RegExp`:(0,n.useFunc)(i,t),s=i.let(`valid`);i.try(()=>i.assign(s,(0,r._)`${o}(${c}, ${u}).test(${a})`),()=>i.assign(s,!1)),e.fail$data((0,r._)`!${s}`)}else{let n=(0,t.usePattern)(e,s);e.fail$data((0,r._)`!${n}.test(${a})`)}}}})),mr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),hr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ln(),n=M(),r=kn();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),gr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),_r=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Bn();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),vr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Fn(),n=M(),r=kn(),i=_r();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),yr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M(),n=kn(),r=_r();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),br=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M(),n=kn(),r=_r();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??=(0,n.useFunc)(i,r.default),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),xr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=lr(),n=ur(),r=fr(),i=pr(),a=mr(),o=hr(),s=gr(),c=vr(),l=yr(),u=br();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),Sr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;var t=M(),n=kn(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),Cr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;var t=M(),n=kn(),r=Ln(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),wr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Cr();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),Tr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M(),n=kn(),r=Ln(),i=Sr();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),Er=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M(),n=kn();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),Dr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=M(),n=kn(),r=Ln();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
6
+ || ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function p({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function m(e,t,n,r=o.Correct){let a=r===o.Correct?i.operators.EQ:i.operators.NEQ,s;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:s=(0,i._)`Array.isArray(${t})`;break;case`object`:s=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:s=c((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:s=c();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===o.Correct?s:(0,i.not)(s);function c(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=m;function h(e,t,n,r){if(e.length===1)return m(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(let e in s)o=(0,i.and)(o,m(e,t,n,r));return o}e.checkDataTypes=h;var g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function _(e){let t=v(e);(0,r.reportError)(t,g)}e.reportTypeError=_;function v(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),Ln=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;var t=j(),n=M();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),Rn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=j(),n=M(),r=jn(),i=M();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(d(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function o({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(d(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=o;function s(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=s;function c(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(e,n,r){return(0,t._)`${c(e)}.call(${n}, ${r})`}e.isOwnProperty=l;function u(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${l(e,n,r)}`:a}e.propertyInData=u;function d(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(l(e,n,r))):a}e.noPropertyInData=d;function f(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=f;function p(e,t){return f(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=p;function m({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=m;var h=(0,t._)`new RegExp`;function g({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?h:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=g;function _(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=_;function v(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=v})),zn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=j(),n=jn(),r=Rn(),i=Mn();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=u(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let d=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}e.macroKeywordCode=a;function o(e,i){let{gen:a,keyword:o,schema:d,parentSchema:f,$data:p,it:m}=e;l(m,i);let h=u(a,o,!p&&i.compile?i.compile.call(m.self,d,f,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&s(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&s(e),x(()=>c(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!p||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=o;function s(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function c(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function l({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function u(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function d(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=d;function f({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=f})),Bn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=j(),n=M();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),Vn=o(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),Hn=o(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else (p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),Un=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=M(),n=Vn(),r=Hn(),i=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!s(e):t?c(e)<=t:!1}e.inlineRef=a;var o=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function s(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(s)||typeof n==`object`&&s(n))return!0}return!1}function c(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=c(e)),n===1/0)))return 1/0;return n}function l(e,t=``,n){return n!==!1&&(t=f(t)),u(e,e.parse(t))}e.getFullPath=l;function u(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=u;var d=/#\/?$/;function f(e){return e?e.replace(d,``):``}e.normalizeId=f;function p(e,t,n){return n=f(n),e.resolve(t,n)}e.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function h(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=f(e[i]||t),s={"":o},c=l(a,o,!1),u={},d=new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=l.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function l(t){let n=this.opts.uriResolver.resolve;if(t=f(o?n(o,t):t),d.has(t))throw h(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?p(e,r.schema,t):t!==f(a)&&(t[0]===`#`?(p(e,u[t],t),u[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!m.test(e))throw Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}}),u;function p(e,t,r){if(t!==void 0&&!n(e,t))throw h(r)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=h})),Wn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=Nn(),n=In(),r=Fn(),i=In(),a=Ln(),o=zn(),s=Bn(),c=j(),l=jn(),u=Un(),d=M(),f=Mn();function p(e){if(S(e)&&(w(e),x(e))){_(e);return}m(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=p;function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,c._)`${l.default.data}, ${l.default.valCxt}`,r.$async,()=>{e.code((0,c._)`"use strict"; ${y(n,i)}`),g(e,i),e.code(a)}):e.func(t,(0,c._)`${l.default.data}, ${h(i)}`,r.$async,()=>e.code(y(n,i)).code(a))}function h(e){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function g(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,(0,c._)`""`),e.var(l.default.parentData,(0,c._)`undefined`),e.var(l.default.parentDataProperty,(0,c._)`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function _(e){let{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&ae(e),ne(e),r.let(l.default.vErrors,null),r.let(l.default.errors,0),n.unevaluated&&v(e),ee(e),oe(e)})}function v(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,c._)`${n}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}function y(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${n} */`:c.nil}function b(e,n){if(S(e)&&(w(e),x(e))){C(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function x({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function S(e){return typeof e.schema!=`boolean`}function C(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&ae(e),re(e),ie(e);let a=r.const(`_errs`,l.default.errors);ee(e,a),r.var(t,(0,c._)`${a} === ${l.default.errors}`)}function w(e){(0,d.checkUnknownRules)(e),te(e)}function ee(e,t){if(e.opts.jtd)return ce(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);ce(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function te(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function ne(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,d.checkStrictMode)(e,`default is ignored in the schema root`)}function re(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function ie(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function ae({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,c._)`${l.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,c.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,c._)`${l.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function oe(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,c._)`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw((0,c._)`new ${i}(${l.default.vErrors})`)):(t.assign((0,c._)`${r}.errors`,l.default.vErrors),a.unevaluated&&se(e),t.return((0,c._)`${l.default.errors} === 0`))}function se({gen:e,evaluated:t,props:n,items:r}){n instanceof c.Name&&e.assign((0,c._)`${t}.props`,n),r instanceof c.Name&&e.assign((0,c._)`${t}.items`,r)}function ce(e,t,n,a){let{gen:o,schema:s,data:u,allErrors:f,opts:p,self:m}=e,{RULES:h}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(s,h))){o.block(()=>ye(e,`$ref`,h.all.$ref.definition));return}p.jtd||ue(e,t),o.block(()=>{for(let e of h.rules)g(e);g(h.post)});function g(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,u,p.strictNumbers)),le(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):le(e,d),f||o.if((0,c._)`${l.default.errors} === ${a||0}`))}}function le(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&ye(e,n.keyword,n.definition,t.type)})}function ue(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(de(e,t),e.opts.allowUnionTypes||fe(e,t),pe(e,e.dataTypes))}function de(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{he(e.dataTypes,t)||_e(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),ge(e,t)}}function fe(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&_e(e,`use allowUnionTypes to allow union type keyword`)}function pe(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>me(t,e))&&_e(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function me(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function he(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function ge(e,t){let n=[];for(let r of e.dataTypes)he(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function _e(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var ve=class{constructor(e,t,n){if((0,o.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,Se(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,l.default.errors))}result(e,t,n){this.failResult((0,c.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=c.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,c.or)((0,c._)`${r} === undefined`,t)),e!==c.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,c.or)(o(),s());function o(){if(n.length){if(!(t instanceof c.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,c._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,c._)`!${n}(${t})`}return c.nil}}subschema(e,t){let n=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(n,this.it,e),(0,s.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return b(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=d.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=d.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}};e.KeywordCxt=ve;function ye(e,t,n,r){let i=new ve(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):`macro`in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}var be=/^\/(?:[^~]|~0|~1)*$/,xe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Se(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!be.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=xe.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(u(`property/index`,s));return r[t-s]}if(s>t)throw Error(u(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,c._)`${a}${(0,c.getProperty)((0,d.unescapeJsonPointer)(e))}`,o=(0,c._)`${o} && ${a}`);return o;function u(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=Se})),Gn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),Kn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Un();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),qn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=j(),n=Gn(),r=jn(),i=Un(),a=M(),o=Wn(),s=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=s;function c(e){let a=d.call(this,e);if(a)return a;let s=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:u}=this.opts,f=new t.CodeGen(this.scope,{es5:c,lines:l,ownProperties:u}),p;e.$async&&(p=f.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let m=f.scopeName(`validate`);e.validateName=m;let h={gen:f,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:s,baseId:e.baseId||s,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,o.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);let n=f.toString();g=`${f.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:m,validateCode:n,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=c;function l(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=p.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new s({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=u.call(this,a)}e.resolveRef=l;function u(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:c.call(this,e)}function d(e){for(let t of this._compilations)if(f(t,e))return t}e.getCompilingSchema=d;function f(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return g.call(this,n,e);let o=(0,i.normalizeId)(r),l=this.refs[o]||this.schemas[o];if(typeof l==`string`){let t=m.call(this,e,l);return typeof t?.schema==`object`?g.call(this,n,t):void 0}if(typeof l?.schema==`object`){if(l.validate||c.call(this,l),o===(0,i.normalizeId)(t)){let{schema:t}=l,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new s({schema:t,schemaId:n,root:e,baseId:a})}return g.call(this,n,l)}}e.resolveSchema=m;var h=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function g(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!h.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=m.call(this,r,e)}let{schemaId:c}=this.opts;if(o||=new s({schema:n,schemaId:c,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),Jn=s({$id:()=>Yn,additionalProperties:()=>!1,default:()=>er,description:()=>Xn,properties:()=>$n,required:()=>Qn,type:()=>Zn}),Yn,Xn,Zn,Qn,$n,er,tr=a((()=>{Yn=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,Xn=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,Zn=`object`,Qn=[`$data`],$n={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},er={$id:Yn,description:Xn,type:Zn,required:Qn,properties:$n,additionalProperties:!1}})),nr=o(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),i=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var c=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function l(e){return e.length=0,!0}function u(e,t,n){if(e.length){let r=s(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function d(e){let t=0,n={error:!1,address:``,zone:``},r=[],i=[],a=!1,o=!1,c=u;for(let s=0;s<e.length;s++){let u=e[s];if(!(u===`[`||u===`]`))if(u===`:`){if(a===!0&&(o=!0),!c(i,r,n))break;if(++t>7){n.error=!0;break}s>0&&e[s-1]===`:`&&(a=!0),r.push(`:`);continue}else if(u===`%`){if(!c(i,r,n))break;c=l}else{i.push(u);continue}}return i.length&&(c===l?n.zone=i.join(``):o?r.push(i.join(``)):r.push(s(i))),n.address=r.join(``),n}function f(e){if(p(e,`:`)<2)return{host:e,isIPV6:!1};let t=d(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+=`%`+t.zone,n+=`%25`+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}function p(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function m(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}else{n.push(t);break}}else if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}else if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}else n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}var h={"@":`%40`,"/":`%2F`,"?":`%3F`,"#":`%23`,":":`%3A`},g=/[@/?#:]/g,_=/[@/?#]/g;function v(e,t){let n=t?_:g;return n.lastIndex=0,e.replace(n,e=>h[e])}function y(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r<e.length;r++){if(e[r]===`%`&&r+2<e.length){let o=e.slice(r+1,r+3);if(i(o)){let e=o.toUpperCase(),i=String.fromCharCode(parseInt(e,16));t&&a(i)?n+=i:n+=`%`+e,r+=2;continue}}n+=e[r]}return n}function b(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));i!==`.`&&a(i)?t+=i:t+=`%`+e,n+=2;continue}}o(e[n])?t+=e[n]:t+=escape(e[n])}return t}function x(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){t+=`%`+r.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t}function S(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push(`@`)),e.host!==void 0){let n=unescape(e.host);if(!r(n)){let e=f(n);n=e.isIPV6===!0?`[${e.escapedHost}]`:v(n,!1)}t.push(n)}return(typeof e.port==`number`||typeof e.port==`string`)&&(t.push(`:`),t.push(String(e.port))),t.length?t.join(``):void 0}t.exports={nonSimpleDomain:c,recomposeAuthority:S,reescapeHostDelimiters:v,normalizePercentEncoding:y,normalizePathEncoding:b,escapePreservingEscapes:x,removeDotSegments:m,isIPv4:r,isUUID:n,normalizeIPv6:f,stringArrayToHexStripped:s}})),rr=o(((e,t)=>{var{isUUID:n}=nr(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split(`?`);e.path=t&&t!==`/`?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),ir=o(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,escapePreservingEscapes:s,reescapeHostDelimiters:c,isIPv4:l,nonSimpleDomain:u}=nr(),{SCHEMES:d,getSchemeHandler:f}=rr();function p(e,t){return typeof e==`string`?e=S(e,t):typeof e==`object`&&(e=x(_(e,t),t)),e}function m(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=h(x(e,r),x(t,r),r,!0);return r.skipEscape=!0,_(i,r)}function h(e,t,n,i){let a={};return i||(e=x(_(e,n),n),t=x(_(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path=`/`+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:a.path=t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,t.query===void 0?a.query=e.query:a.query=t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function g(e,t,n){let r=w(e,n),i=w(t,n);return r!==void 0&&i!==void 0&&r.toLowerCase()===i.toLowerCase()}function _(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},o=Object.assign({},t),c=[],l=f(o.scheme||n.scheme);l&&l.serialize&&l.serialize(n,o),n.path!==void 0&&(o.skipEscape?n.path=a(n.path):(n.path=s(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),o.reference!==`suffix`&&n.scheme&&c.push(n.scheme,`:`);let u=i(n);if(u!==void 0&&(o.reference!==`suffix`&&c.push(`//`),c.push(u),n.path&&n.path[0]!==`/`&&c.push(`/`)),n.path!==void 0){let e=n.path;!o.absolutePath&&(!l||!l.absolutePath)&&(e=r(e)),u===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),c.push(e)}return n.query!==void 0&&c.push(`?`,n.query),n.fragment!==void 0&&c.push(`#`,n.fragment),c.join(``)}var v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function b(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1,s=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let d=e.match(v);if(d){i.scheme=d[1],i.userinfo=d[3],i.host=d[4],i.port=parseInt(d[5],10),i.path=d[6]||``,i.query=d[7],i.fragment=d[8],isNaN(i.port)&&(i.port=d[5]);let t=y(i,d);if(t!==void 0&&(i.error=i.error||t,a=!0),i.host)if(l(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),s=e.isIPV6}else s=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference=`same-document`:i.scheme===void 0?i.reference=`relative`:i.fragment===void 0?i.reference=`absolute`:i.reference=`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let p=f(r.scheme||i.scheme);if(!r.unicodeSupport&&(!p||!p.unicodeSupport)&&i.host&&(r.domainHost||p&&p.domainHost)&&s===!1&&u(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}if((!p||p&&!p.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=c(unescape(i.host),s))),i.path&&=o(i.path),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||`URI malformed`}p&&p.parse&&p.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:a}}function x(e,t){return b(e,t).parsed}function S(e,t){return C(e,t).normalized}function C(e,t){let{parsed:n,malformedAuthorityOrPort:r}=b(e,t);return{normalized:r?e:_(n,t),malformedAuthorityOrPort:r}}function w(e,t){if(typeof e==`string`){let{normalized:n,malformedAuthorityOrPort:r}=C(e,t);return r?void 0:n}if(typeof e==`object`)return _(e,t)}var ee={SCHEMES:d,normalize:p,resolve:m,resolveComponent:h,equal:g,serialize:_,parse:x};t.exports=ee,t.exports.default=ee,t.exports.fastUri=ee})),ar=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ir();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),or=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Wn();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=j();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});var r=Gn(),i=Kn(),a=Pn(),o=qn(),s=j(),c=Un(),u=In(),d=M(),f=(tr(),l(Jn).default),p=ar(),m=(e,t)=>new RegExp(e,t);m.code=`new RegExp`;var h=[`removeAdditional`,`useDefaults`,`coerceTypes`],g=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),_={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},v={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},y=200;function b(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??m,a=e.uriResolver??p.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??y,loopEnum:e.loopEnum??y,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var x=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:t,lines:n}),this.logger=ie(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,_,e,`NOT SUPPORTED`),S.call(this,v,e,`DEPRECATED`,`warn`),this._metaOpts=ne.call(this),e.formats&&ee.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&te.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;n===`id`&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await a.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function a(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await a.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=C.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:n});if(t=o.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=C.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,c.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(oe.call(this,n,t),!t)return(0,d.eachItem)(n,e=>se.call(this,e)),this;le.call(this,t);let r={...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)};return(0,d.eachItem)(n,r.type.length===0?e=>se.call(this,e,r):e=>r.type.forEach(t=>se.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=de(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e==`object`)a=e[s];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let l=this._cache.get(e);if(l!==void 0)return l;n=(0,c.normalizeId)(a||n);let u=c.getSchemaRefs.call(this,e,n);return l=new o.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}};x.ValidationError=r.default,x.MissingRefError=i.default,e.default=x;function S(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function C(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function ee(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function te(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||=t,this.addKeyword(n)}}function ne(){let e={...this.opts};for(let t of h)delete e[t];return e}var re={log(){},warn(){},error(){}};function ie(e){if(e===!1)return re;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var ae=/^[a-z_$][a-z0-9_$:-]*$/i;function oe(e,t){let{RULES:n}=this;if((0,d.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!ae.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function se(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)}};t.before?ce.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function ce(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function le(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=de(t)),e.validateSchema=this.compile(t,!0))}var ue={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function de(e){return{anyOf:[e,ue]}}})),sr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),cr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;var t=Kn(),n=Rn(),r=j(),i=jn(),a=qn(),o=M(),s={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:u,validateName:d,opts:f,self:p}=o,{root:m}=u;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);if(h instanceof a.SchemaEnv)return _(h);return v(h);function g(){if(u===m)return l(e,d,u,u.$async);let t=n.scopeValue(`root`,{ref:m});return l(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){l(e,c(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,f.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function c(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=c;function l(e,t,a,s){let{gen:c,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?i.default.this:r.nil;s?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=c.let(`valid`);c.try(()=>{c.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||c.assign(i,!0)},e=>{c.if((0,r._)`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),g(e),u||c.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;c.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),c.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!l.opts.unevaluated)return;let t=a?.validate?.evaluated;if(l.props!==!0)if(t&&!t.dynamicProps)t.props!==void 0&&(l.props=o.mergeEvaluated.props(c,t.props,l.props));else{let t=c.var(`props`,(0,r._)`${e}.evaluated.props`);l.props=o.mergeEvaluated.props(c,t,l.props,r.Name)}if(l.items!==!0)if(t&&!t.dynamicItems)t.items!==void 0&&(l.items=o.mergeEvaluated.items(c,t.items,l.items));else{let t=c.var(`items`,(0,r._)`${e}.evaluated.items`);l.items=o.mergeEvaluated.items(c,t,l.items,r.Name)}}}e.callRef=l,e.default=s})),lr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=sr(),n=cr();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),ur=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),dr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),fr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),pr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j(),n=M(),r=fr();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),mr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Rn(),n=M(),r=j();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,r._)`{pattern: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e,u=l.opts.unicodeRegExp?`u`:``;if(o){let{regExp:t}=l.opts.code,o=t.code===`new RegExp`?(0,r._)`new RegExp`:(0,n.useFunc)(i,t),s=i.let(`valid`);i.try(()=>i.assign(s,(0,r._)`${o}(${c}, ${u}).test(${a})`),()=>i.assign(s,!1)),e.fail$data((0,r._)`!${s}`)}else{let n=(0,t.usePattern)(e,s);e.fail$data((0,r._)`!${n}.test(${a})`)}}}})),hr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),gr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Rn(),n=j(),r=M();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),_r=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),vr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Vn();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),yr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=In(),n=j(),r=M(),i=vr();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),br=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j(),n=M(),r=vr();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),xr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j(),n=M(),r=vr();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??=(0,n.useFunc)(i,r.default),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),Sr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ur(),n=dr(),r=pr(),i=mr(),a=hr(),o=gr(),s=_r(),c=yr(),l=br(),u=xr();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),Cr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;var t=j(),n=M(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),wr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;var t=j(),n=M(),r=Rn(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),Tr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=wr();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),Er=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j(),n=M(),r=Rn(),i=Cr();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),Dr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j(),n=M();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),Or=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=j(),n=M(),r=Rn();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
7
7
  missingProperty: ${i},
8
8
  depsCount: ${n},
9
- deps: ${r}}`};var i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);o(e,t),s(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function o(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=o;function s(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=s,e.default=i})),Or=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M(),n=kn();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),kr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ln(),n=M(),r=An(),i=kn();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),Ar=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Un(),n=Ln(),r=kn(),i=kr();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),jr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ln(),n=M(),r=kn(),i=kn();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),Mr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=kn();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),Nr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:Ln().validateUnion,error:{message:`must match a schema in anyOf`}}})),Pr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M(),n=kn();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),Fr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=kn();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),Ir=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M(),n=kn(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),Lr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=kn();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),Rr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Sr(),n=wr(),r=Cr(),i=Tr(),a=Er(),o=Dr(),s=Or(),c=kr(),l=Ar(),u=jr(),d=Mr(),f=Nr(),p=Pr(),m=Fr(),h=Ir(),g=Lr();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),zr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),Br=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[zr().default]})),Vr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),Hr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=cr(),n=xr(),r=Rr(),i=Br(),a=Vr();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),Ur=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),Wr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M(),n=Ur(),r=Kn(),i=Gn(),a=kn();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();o.if(!1);for(let e in r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n&&=t||o(c),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),Gr=s({$id:()=>qr,$schema:()=>Kr,default:()=>Qr,definitions:()=>Yr,properties:()=>Zr,title:()=>Jr,type:()=>Xr}),Kr,qr,Jr,Yr,Xr,Zr,Qr,$r=a((()=>{Kr=`http://json-schema.org/draft-07/schema#`,qr=`http://json-schema.org/draft-07/schema#`,Jr=`Core schema meta-schema`,Yr={schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:`#/definitions/nonNegativeInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},Xr=[`object`,`boolean`],Zr={$id:{type:`string`,format:`uri-reference`},$schema:{type:`string`,format:`uri`},$ref:{type:`string`,format:`uri-reference`},$comment:{type:`string`},title:{type:`string`},description:{type:`string`},default:!0,readOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/definitions/nonNegativeInteger`},minLength:{$ref:`#/definitions/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{$ref:`#`},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:!0},maxItems:{$ref:`#/definitions/nonNegativeInteger`},minItems:{$ref:`#/definitions/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},contains:{$ref:`#`},maxProperties:{$ref:`#/definitions/nonNegativeInteger`},minProperties:{$ref:`#/definitions/nonNegativeIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{$ref:`#`},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},propertyNames:{format:`regex`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},propertyNames:{$ref:`#`},const:!0,enum:{type:`array`,items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},format:{type:`string`},contentMediaType:{type:`string`},contentEncoding:{type:`string`},if:{$ref:`#`},then:{$ref:`#`},else:{$ref:`#`},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},Qr={$schema:Kr,$id:qr,title:Jr,definitions:Yr,type:Xr,properties:Zr,default:!0}})),ei=o(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;var n=ar(),r=Hr(),i=Wr(),a=($r(),l(Gr).default),o=[`/properties`],s=`http://json-schema.org/draft-07/schema`,c=class extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(e,s,!1),this.refs[`http://json-schema.org/schema`]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var u=Un();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=M();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var f=Wn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=Gn();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}))(),ti=[0,1,2,3,4],ni=[1,2,3],ri={type:`object`,default:{},properties:{mode:{type:`string`,enum:[`system`,`light`,`dark`],default:`system`},style:{type:`string`,enum:[`basic`,`wireframe`,`silk`,`cyberpunk`,`retro`,`lemonade`],default:`basic`},boxes_radius:{type:`integer`,enum:ti,default:1},field_radius:{type:`integer`,enum:ti,default:1},selectors_radius:{type:`integer`,enum:ti,default:1},border_width:{type:`integer`,enum:ti,default:0},depth_effect:{type:`boolean`,default:!1},noise_effect:{type:`boolean`,default:!1},fields_size:{type:`integer`,enum:ni,default:2},selectors_size:{type:`integer`,enum:ni,default:2},icon_library:{type:`string`,enum:[`pixelarticons`,`lucide`],default:`pixelarticons`}}},ii={type:`object`,default:{},properties:{modality:{type:`string`,enum:[`audio`,`video`,`chat`],default:`video`},enable_chat:{type:`boolean`,default:!1},enable_closed_captions:{type:`boolean`,default:!1},enable_picture_in_picture:{type:`boolean`,default:!1},unique_memory_tag:{type:`boolean`,default:!0},context:{type:`string`,default:``}}},ai={type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]},oi={type:`object`,default:{},properties:{title:{type:`string`,default:``},description:{type:`string`,default:``},btn_title:{type:`string`,default:``},background:{type:`object`,default:{},properties:{type:{type:[`string`,`null`],enum:[`replica`,`background-gradient`,`custom-image`,null],default:null},url:{type:`string`,default:``}}}}},si={type:`object`,default:{},properties:{permission_request_title:{type:`string`,default:``},permission_request_description:{type:`string`,default:``},permission_granted_title:{type:`string`,default:``},permission_granted_description:{type:`string`,default:``},permission_denied_title:{type:`string`,default:``},permission_denied_description:{type:`string`,default:``},join_button:{type:`string`,default:``},cancel_btn:{type:`string`,default:``}}},ci={type:`object`,default:{},properties:{title:{type:`string`,default:``},description:{type:`string`,default:``},cta:{type:`array`,items:ai,default:[]}}},li={type:`object`,default:{},properties:{hide_tavus_badge:{type:`boolean`,default:!1},logo:{type:`string`,default:``},text:{type:`string`,default:``}}},ui={type:`object`,default:{},properties:{template:{type:`string`,enum:[`1`,`2`,`3`,`4`,`5`],default:`1`},access:{type:`string`,enum:[`public`,`auth_required`],default:`public`},logo:{type:`string`,default:``},title:{type:`string`,default:``},description:{type:`string`,default:``},cta:{type:`array`,items:ai,default:[]},background:{type:[`object`,`null`],default:null,properties:{type:{type:`string`,enum:[`default`,`image`],default:`default`},url:{type:[`string`,`null`],default:null}}}}},di={type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},fi={type:`object`,properties:{schema_version:{type:`integer`,const:1,default:1},terms_content:{type:`string`,default:``},terms_enabled:{type:`boolean`,default:!1},show_haircheck:{type:`boolean`,default:!0},language_selector:{type:`boolean`,default:!1},conversation:ii,style:ri,widget:{type:`object`,default:{},properties:{variant:{type:`string`,enum:[`tiny`,`compact`,`full`],default:`compact`},position:{type:`string`,enum:[`bottom-left`,`bottom-right`,`top-left`,`top-right`,`top`,`bottom`],default:`bottom-right`},expandable:{type:`string`,enum:[`default`,`always`,`start-expanded`],default:`default`},avatar:{type:`object`,default:{},properties:{type:{type:`string`,enum:[`orb`,`image`],default:`orb`}}},text:{type:`object`,default:{},properties:{title:{type:`string`,default:``},btn_title:{type:`string`,default:``}}}}},landing_page:ui,preview:oi,haircheck:si,after_call:ci,branding:li,unavailable_screen:{type:`object`,properties:{daily_limit:di,total_limit:di,busy:di,cta:{type:`array`,items:ai}}}}},pi=_n(`Config`),mi=new ei.Ajv({useDefaults:!0,removeAdditional:`all`,strict:!1}).compile(fi);function hi(e){let t=e.customization??{};return t.widget===null&&delete t.widget,t.landing_page===null&&delete t.landing_page,mi(t)||pi.warn(`Customization validation failed`,mi.errors),{...e,customization:t}}var gi=_n(`Config`);function _i(){return{is_available:!1}}var vi=280,yi=Fe(null);function bi({children:e,fallback:t}){let n=ft(Ct),r=n.deploymentId??``,i=n.overrideConfig,a=n.baseUrl,o=n.previewToken,s=k(()=>yn({baseUrl:a??`https://tavusapi.com`,token:o}),[a,o]),c=k(()=>Ht(null),[]),l=k(()=>Ht(null),[]),u=k(()=>Ht(!1),[]);gn(()=>{if(!r){l.value=null,u.value=!1,c.value=i||null;return}let e=new AbortController;return xn(s,r).then(t=>{e.signal.aborted||(l.value=null,u.value=!1,c.value=t,gi.info(`Deployment initialized`,t.deployment_id))}).catch(t=>{e.signal.aborted||(gi.error(`Init failed:`,t),l.value=t,u.value=!i,c.value=i||_i())}),()=>{e.abort()}});let d=k(()=>Ht(null),[]);D(()=>{let e=e=>{if(!e){d.value=null;return}d.value=hi(i?En(e,i):e)};return e(c.peek()),c.subscribe(e)},[d,c,i]);let f=d.value!==null,[p,m]=E(`pending`);if(D(()=>{if(!f){m(`pending`);return}if(!t){m(`done`);return}if(globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1){m(`done`);return}m(`fading`);let e=setTimeout(()=>m(`done`),vi);return()=>clearTimeout(e)},[f]),!t){if(!f)return j(le,{});let t={deploymentId:r,config:d,initError:l,configError:u,client:s};return j(yi.Provider,{value:t,children:e})}let h=f?{deploymentId:r,config:d,initError:l,configError:u,client:s}:null;return j(`div`,{class:`relative w-full h-full`,children:[h&&j(yi.Provider,{value:h,children:e}),p!==`done`&&j(`div`,{class:`absolute inset-0 z-10${p===`fading`?` pointer-events-none motion-safe:animate-[tavusFadeOut_280ms_ease-out_forwards]`:``}`,"aria-hidden":p===`fading`?`true`:void 0,children:t})]})}var xi=Fe(null);function Si({children:e}){let{client:t}=ft(yi),n=k(()=>({client:t}),[t]);return j(xi.Provider,{value:n,children:e})}function Ci(e){return`init`in e}function wi(e){return typeof e.write==`function`}function Ti(e){return!!e.onMount}function Ei(e){return`v`in e||`e`in e}function Di(e){if(`e`in e)throw e.e;return e.v}function Oi(e){return typeof e?.then==`function`}function ki(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}function Ai(e,t,n){let r=n.get(e)?.t,i=t.p;if(!r?.size)return i;if(!i.size)return r;let a=new Set(r);for(let e of i)a.add(e);return a}function ji(e){return!!e.INTERNAL_onInit}var Mi=(e,t,n,...r)=>n.read(...r),Ni=(e,t,n,...r)=>n.write(...r),Pi=(e,t,n)=>n.INTERNAL_onInit(t),Fi=(e,t,n,r)=>n.onMount?.call(n,r),Ii=(e,t,n)=>{var r;let i=e[0],a=i.get(n);if(!a){let o=e[6],s=e[9];a={d:new Map,p:new Set,n:0},i.set(n,a),(r=o.i)==null||r.call(o,n),ji(n)&&s(e,t,n)}return a},Li=(e,t)=>{let n=e[1],r=e[3],i=e[4],a=e[5],o=e[6],s=e[13];if(!o.f&&!r.size&&!i.size&&!a.size)return;let c=[],l=e=>{try{e()}catch(e){c.push(e)}};do{o.f&&l(o.f);let c=new Set;for(let e of r){let t=n.get(e)?.l;if(t)for(let e of t)c.add(e)}r.clear();for(let e of a)c.add(e);a.clear();for(let e of i)c.add(e);i.clear();for(let e of c)l(e);r.size&&s(e,t)}while(r.size||a.size||i.size);if(c.length)throw AggregateError(c)},Ri=(e,t)=>{let n=e[1],r=e[2],i=e[3],a=e[11],o=e[14],s=e[17];if(!i.size)return;let c=[],l=[],u=new WeakSet,d=new WeakSet,f=[],p=[];for(let n of i)f.push(n),p.push(a(e,t,n));for(;f.length;){let i=f.length-1,o=f[i],s=p[i];if(d.has(o)){f.pop(),p.pop();continue}if(u.has(o)){r.get(o)===s.n&&(c.push(o),l.push(s)),d.add(o),f.pop(),p.pop();continue}u.add(o);for(let r of Ai(o,s,n))u.has(r)||(f.push(r),p.push(a(e,t,r)))}for(let n=c.length-1;n>=0;--n){let a=c[n],u=l[n],d=!1;for(let e of u.d.keys())if(e!==a&&i.has(e)){d=!0;break}d&&(r.set(a,u.n),o(e,t,a),s(e,t,a)),r.delete(a)}},zi=(e,t,n)=>{var r,i;let a=e[1],o=e[2],s=e[3],c=e[6],l=e[7],u=e[11],d=e[12],f=e[13],p=e[14],m=e[16],h=e[17],g=e[20],_=e[26],v=e[28],y=u(e,t,n),b=v[0];if(Ei(y)){if(a.has(n)&&o.get(n)!==y.n||y.m===b)return y.m=b,y;let r=!1;for(let[n,i]of y.d)if(p(e,t,n).n!==i){r=!0;break}if(!r)return y.m=b,y}let x=!0,S=new Set(y.d.keys()),C=()=>{for(let e of S)y.d.delete(e)},w=()=>{if(a.has(n)){let r=!s.size;h(e,t,n),r&&(f(e,t),d(e,t))}},ee=r=>{var i;if(r===n){let n=u(e,t,r);if(!Ei(n))if(Ci(r))g(e,t,r,r.init);else throw Error(`no atom init`);return Di(n)}let o=p(e,t,r);try{return Di(o)}finally{S.delete(r),y.d.set(r,o.n),Oi(y.v)&&ki(n,y.v,o),a.has(n)&&((i=a.get(r))==null||i.t.add(n)),x||w()}},T,te,ne={get signal(){return T||=new AbortController,T.signal},get setSelf(){return!te&&wi(n)&&(te=(...r)=>{if(!x)try{return m(e,t,n,r)}finally{f(e,t),d(e,t)}}),te}},re=y.n,ie=o.get(n)===re;try{let i=l(e,t,n,ee,ne);if(g(e,t,n,i),Oi(i)){_(e,t,i,()=>T?.abort());let n=()=>{C(),w()};i.then(n,n)}else C();return(r=c.r)==null||r.call(c,n),y.m=b,y}catch(e){return delete y.v,y.e=e,++y.n,y.m=b,y}finally{x=!1,y.n!==re&&ie&&(o.set(n,y.n),s.add(n),(i=c.c)==null||i.call(c,n))}},Bi=(e,t,n)=>{let r=e[1],i=e[2],a=e[11],o=[n];for(;o.length;){let n=o.pop(),s=a(e,t,n);for(let c of Ai(n,s,r)){let n=a(e,t,c);i.get(c)!==n.n&&(i.set(c,n.n),o.push(c))}}},Vi=(e,t,n,r)=>{let i=e[3],a=e[6],o=e[8],s=e[11],c=e[12],l=e[13],u=e[14],d=e[15],f=e[16],p=e[17],m=e[20],h=e[28],g=!0,_=n=>Di(u(e,t,n)),v=(r,...o)=>{var u;let _=s(e,t,r);try{if(r===n){if(!Ci(r))throw Error(`atom not writable`);let n=_.n,s=o[0];m(e,t,r,s),p(e,t,r),n!==_.n&&(++h[0],i.add(r),d(e,t,r),(u=a.c)==null||u.call(a,r));return}else return f(e,t,r,o)}finally{g||(l(e,t),c(e,t))}};try{return o(e,t,n,_,v,...r)}finally{g=!1}},Hi=(e,t,n)=>{var r;let i=e[1],a=e[3],o=e[6],s=e[11],c=e[15],l=e[18],u=e[19],d=s(e,t,n),f=i.get(n);if(f&&d.d.size>0){for(let[i,u]of d.d)if(!f.d.has(i)){let d=s(e,t,i);l(e,t,i).t.add(n),f.d.add(i),u!==d.n&&(a.add(i),c(e,t,i),(r=o.c)==null||r.call(o,i))}for(let r of f.d)d.d.has(r)||(f.d.delete(r),u(e,t,r)?.t.delete(n))}},Ui=(e,t,n)=>{var r;let i=e[1],a=e[4],o=e[6],s=e[10],c=e[11],l=e[12],u=e[13],d=e[14],f=e[16],p=e[18],m=c(e,t,n),h=i.get(n);if(!h){d(e,t,n);for(let r of m.d.keys())p(e,t,r).t.add(n);h={l:new Set,d:new Set(m.d.keys()),t:new Set},i.set(n,h),wi(n)&&Ti(n)&&a.add(()=>{let r=!0,i=(...i)=>{try{return f(e,t,n,i)}finally{r||(u(e,t),l(e,t))}};try{let a=s(e,t,n,i);a&&(h.u=()=>{r=!0;try{a()}finally{r=!1}})}finally{r=!1}}),(r=o.m)==null||r.call(o,n)}return h},Wi=(e,t,n)=>{var r;let i=e[1],a=e[5],o=e[6],s=e[11],c=e[19],l=s(e,t,n),u=i.get(n);if(!u||u.l.size)return u;let d=!1;for(let e of u.t)if(i.get(e)?.d.has(n)){d=!0;break}if(!d){u.u&&a.add(u.u),u=void 0,i.delete(n);for(let r of l.d.keys())c(e,t,r)?.t.delete(n);(r=o.u)==null||r.call(o,n);return}return u},Gi=(e,t,n,r)=>{let i=e[11],a=e[27],o=i(e,t,n),s=`v`in o,c=o.v;if(Oi(r))for(let a of o.d.keys())ki(n,r,i(e,t,a));o.v=r,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,Oi(c)&&a(e,t,c))},Ki=(e,t,n)=>{let r=e[14];return Di(r(e,t,n))},qi=(e,t,n,...r)=>{let i=e[3],a=e[12],o=e[13],s=e[16],c=i.size;try{return s(e,t,n,r)}finally{i.size!==c&&(o(e,t),a(e,t))}},Ji=(e,t,n,r)=>{let i=e[12],a=e[18],o=e[19],s=a(e,t,n).l;return s.add(r),i(e,t),()=>{s.delete(r),o(e,t,n),i(e,t)}},Yi=(e,t,n,r)=>{let i=e[25],a=i.get(n);if(!a){a=new Set,i.set(n,a);let e=()=>i.delete(n);n.then(e,e)}a.add(r)},Xi=(e,t,n)=>{e[25].get(n)?.forEach(e=>e())},Zi=new WeakMap;function Qi(e){let t=Zi.get(e),n=t[24];return n?n(t,e):t}function $i(...e){let t={get(e){return r(n,t,e)},set(e,...r){return i(n,t,e,...r)},sub(e,r){return a(n,t,e,r)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,void 0,new WeakMap,Yi,Xi,[0]].map((t,n)=>e[n]||t);Zi.set(t,Object.freeze(n));let r=n[21],i=n[22],a=n[23];return t}var ea=0;function N(e,t){let n=`atom${++ea}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=ta,r.write=na),t&&(r.write=t),r}function ta(e){return e(this)}function na(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}var ra;function ia(){return ra?ra():$i()}var aa;function oa(){return aa||=ia(),aa}function sa(e,t){let n=null,r=new Map,i=new Set,a=i=>{let s;if(t===void 0)s=r.get(i);else for(let[e,n]of r)if(t(e,i)){s=n;break}if(s!==void 0)if(n?.(s[1],i))a.remove(i);else return s[0];let c=e(i);return r.set(i,[c,Date.now()]),o(`CREATE`,i,c),c},o=(e,t,n)=>{for(let r of i)r({type:e,param:t,atom:n})};return a.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),a.getParams=()=>r.keys(),a.remove=e=>{if(t===void 0){if(!r.has(e))return;let[t]=r.get(e);r.delete(e),o(`REMOVE`,e,t)}else for(let[n,[i]]of r)if(t(n,e)){r.delete(n),o(`REMOVE`,n,i);break}},a.setShouldRemove=e=>{if(n=e,n)for(let[e,[t,i]]of r)n(i,e)&&(r.delete(e),o(`REMOVE`,e,t))},a}var ca=e=>typeof e?.then==`function`;function la(e=()=>{try{return window.localStorage}catch{return}},t){let n,r,i={getItem:(i,a)=>{let o=e=>{if(e||=``,n!==e){try{r=JSON.parse(e,t?.reviver)}catch{return a}n=e}return r},s=e()?.getItem(i)??null;return ca(s)?s.then(o):o(s)},setItem:(n,r)=>e()?.setItem(n,JSON.stringify(r,t?.replacer)),removeItem:t=>e()?.removeItem(t)},a=e=>(t,n,r)=>e(t,e=>{let t;try{t=JSON.parse(e||``)}catch{t=r}n(t)}),o;try{o=e()?.subscribe}catch{}return!o&&typeof window<`u`&&typeof window.addEventListener==`function`&&window.Storage&&(o=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};let r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener(`storage`,r),()=>{window.removeEventListener(`storage`,r)}}),o&&(i.subscribe=a(o)),i}la();function ua(e,t){for(var n in t)e[n]=t[n];return e}function da(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 fa(e,t){var n=t(),r=E({t:{__:n,u:t}}),i=r[0].t,a=r[1];return ut(function(){i.__=n,i.u=t,pa(i)&&a({t:i})},[e,n,t]),D(function(){return pa(i)&&a({t:i}),e(function(){pa(i)&&a({t:i})})},[e]),n}function pa(e){try{return!((t=e.__)===(n=e.u())&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}var t,n}function ma(e){e()}function ha(e){return e}function ga(){return[!1,ma]}var _a=ut;function va(e,t){this.props=e,this.context=t}function ya(e,t){function n(e){var n=this.props.ref;return n!=e.ref&&n&&(typeof n==`function`?n(null):n.current=null),t?!t(this.props,e)||n!=e.ref:da(this.props,e)}function r(t){return this.shouldComponentUpdate=n,oe(e,t)}return r.displayName=`Memo(`+(e.displayName||e.name)+`)`,r.__f=r.prototype.isReactComponent=!0,r.type=e,r}(va.prototype=new ue).isPureReactComponent=!0,va.prototype.shouldComponentUpdate=function(e,t){return da(this.props,e)||da(this.state,t)};var ba=d.__b;d.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ba&&ba(e)};var xa=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.forward_ref`)||3911;function Sa(e){function t(t){var n=ua({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=xa,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}var Ca=function(e,t){return e==null?null:ye(ye(e).map(t))},wa={map:Ca,forEach:Ca,count:function(e){return e?ye(e).length:0},only:function(e){var t=ye(e);if(t.length!==1)throw`Children.only`;return t[0]},toArray:ye},Ta=d.__e;d.__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??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Ta(e,t,n,r)};var Ea=d.unmount;function Da(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=ua({},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(e){return Da(e,t,n)})),e}function Oa(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return Oa(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ka(){this.__u=0,this.o=null,this.__b=null}function Aa(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function ja(e){var t,n,r,i=null;function a(a){if(t||(t=e()).then(function(e){e&&(i=e.default||e),r=!0},function(e){n=e,r=!0}),n)throw n;if(!r)throw t;return i?oe(i,a):null}return a.displayName=`Lazy`,a.__f=!0,a}function Ma(){this.i=null,this.l=null}d.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ea&&Ea(e)},(ka.prototype=new ue).__c=function(e,t){var n=t.__c,r=this;r.o??=[],r.o.push(n);var i=Aa(r.__v),a=!1,o=function(){a||r.__z||(a=!0,n.__R=null,i?i(c):c())};n.__R=o;var s=n.__P;n.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Oa(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=s,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},ka.prototype.componentWillUnmount=function(){this.o=[]},ka.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]=Da(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&oe(le,null,e.fallback);return i&&(i.__u&=-33),[oe(le,null,t.__a?null:e.children),i]};var Na=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 Pa(e){return this.getChildContext=function(){return e.context},e.children}function Fa(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){Me(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},namespaceURI:n.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}Me(oe(Pa,{context:t.context},e.__v),t.v)}function Ia(e,t){var n=oe(Fa,{__v:e,h:t});return n.containerInfo=t,n}(Ma.prototype=new ue).__a=function(e){var t=this,n=Aa(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),Na(t,e,r)):i()};n?n(a):a()}},Ma.prototype.render=function(e){this.i=null,this.l=new Map;var t=ye(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},Ma.prototype.componentDidUpdate=Ma.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Na(e,n,t)})};var La=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,Ra=/^(?: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]/,za=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ba=/[A-Z0-9]/g,Va=typeof document<`u`,Ha=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/:/fil|che|ra/).test(e)};function Ua(e,t,n){return t.__k??(t.textContent=``),Me(e,t),typeof n==`function`&&n(),e?e.__c:null}function Wa(e,t,n){return Ne(e,t),typeof n==`function`&&n(),e?e.__c:null}ue.prototype.isReactComponent=!0,[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(ue.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ga=d.event;d.event=function(e){return Ga&&(e=Ga(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var Ka,qa={configurable:!0,get:function(){return this.class}},Ja=d.vnode;d.vnode=function(e){typeof e.type==`string`&&function(e){var t=e.props,n=e.type,r={},i=n.indexOf(`-`)==-1;for(var a in t){var o=t[a];if(!(a===`value`&&`defaultValue`in t&&o==null||Va&&a===`children`&&n===`noscript`||a===`class`||a===`className`)){var s=a.toLowerCase();a===`defaultValue`&&`value`in t&&t.value==null?a=`value`:a===`download`&&!0===o?o=``:s===`translate`&&o===`no`?o=!1:s[0]===`o`&&s[1]===`n`?s===`ondoubleclick`?a=`ondblclick`:s!==`onchange`||n!==`input`&&n!==`textarea`||Ha(t.type)?s===`onfocus`?a=`onfocusin`:s===`onblur`?a=`onfocusout`:za.test(a)&&(a=s):s=a=`oninput`:i&&Ra.test(a)?a=a.replace(Ba,`-$&`).toLowerCase():o===null&&(o=void 0),s===`oninput`&&r[a=s]&&(a=`oninputCapture`),r[a]=o}}n==`select`&&(r.multiple&&Array.isArray(r.value)&&(r.value=ye(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),r.defaultValue!=null&&(r.value=ye(t.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",qa)):t.className&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=La,Ja&&Ja(e)};var Ya=d.__r;d.__r=function(e){Ya&&Ya(e),Ka=e.__c};var Xa=d.diffed;d.diffed=function(e){Xa&&Xa(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),Ka=null};var Za={ReactCurrentDispatcher:{current:{readContext:function(e){return Ka.__n[e.__c].props.value},useCallback:A,useContext:ft,useDebugValue:pt,useDeferredValue:ha,useEffect:D,useId:mt,useImperativeHandle:dt,useInsertionEffect:_a,useLayoutEffect:ut,useMemo:k,useReducer:lt,useRef:O,useState:E,useSyncExternalStore:fa,useTransition:ga}}};function Qa(e){return oe.bind(null,e)}function $a(e){return!!e&&e.$$typeof===La}function eo(e){return $a(e)&&e.type===le}function to(e){return!!e&&typeof e.displayName==`string`&&e.displayName.indexOf(`Memo(`)==0}function no(e){return $a(e)?Pe.apply(null,arguments):e}function ro(e){return!!e.__k&&(Me(null,e),!0)}function io(e){return e&&(e.base||e.nodeType===1&&e)||null}var P={useState:E,useId:mt,useReducer:lt,useEffect:D,useLayoutEffect:ut,useInsertionEffect:_a,useTransition:ga,useDeferredValue:ha,useSyncExternalStore:fa,startTransition:ma,useRef:O,useImperativeHandle:dt,useMemo:k,useCallback:A,useContext:ft,useDebugValue:pt,version:`18.3.1`,Children:wa,render:Ua,hydrate:Wa,unmountComponentAtNode:ro,createPortal:Ia,createElement:oe,createContext:Fe,createFactory:Qa,cloneElement:no,createRef:ce,Fragment:le,isValidElement:$a,isElement:$a,isFragment:eo,isMemo:to,findDOMNode:io,Component:ue,PureComponent:va,memo:ya,forwardRef:Sa,flushSync:function(e,t){var n=d.debounceRendering;d.debounceRendering=function(e){return e()};var r=e(t);return d.debounceRendering=n,r},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:le,Suspense:ka,SuspenseList:Ma,lazy:ja,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Za},ao=Fe(void 0);function oo(e){let t=ft(ao);return e?.store||t||oa()}function so({children:e,store:t}){let n=O(null);return t?oe(ao.Provider,{value:t},e):(n.current===null&&(n.current=ia()),oe(ao.Provider,{value:n.current},e))}var co=e=>typeof e?.then==`function`,lo=e=>{e.status||(e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}))},uo=P.use||(e=>{if(e.status===`pending`)throw e;if(e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:(lo(e),e)}),fo=new WeakMap,po=(e,t,n)=>{let r=Qi(e),i=r[26],a=fo.get(t);return a||(a=new Promise((o,s)=>{let c=t,l=e=>t=>{c===e&&o(t)},u=e=>t=>{c===e&&s(t)},d=()=>{try{let t=n();co(t)?(fo.set(t,a),c=t,t.then(l(t),u(t)),i(r,e,t,d)):o(t)}catch(e){s(e)}};t.then(l(t),u(t)),i(r,e,t,d)}),fo.set(t,a)),a};function mo(e,t){let{delay:n,unstable_promiseStatus:r=!P.use}=t||{},i=oo(t),[[a,o,s],c]=lt(t=>{let n=i.get(e);return Object.is(t[0],n)&&t[1]===i&&t[2]===e?t:[n,i,e]},void 0,()=>[i.get(e),i,e]),l=a;if((o!==i||s!==e)&&(c(),l=i.get(e)),D(()=>{let t=i.sub(e,()=>{if(r)try{let t=i.get(e);co(t)&&lo(po(i,t,()=>i.get(e)))}catch{}if(typeof n==`number`){console.warn(`[DEPRECATED] delay option is deprecated and will be removed in v3.
9
+ deps: ${r}}`};var i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);o(e,t),s(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function o(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=o;function s(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=s,e.default=i})),kr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j(),n=M();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),Ar=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Rn(),n=j(),r=jn(),i=M();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),jr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Wn(),n=Rn(),r=M(),i=Ar();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),Mr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Rn(),n=j(),r=M(),i=M();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),Nr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),Pr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:Rn().validateUnion,error:{message:`must match a schema in anyOf`}}})),Fr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j(),n=M();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),Ir=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),Lr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j(),n=M(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),Rr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),zr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Cr(),n=Tr(),r=wr(),i=Er(),a=Dr(),o=Or(),s=kr(),c=Ar(),l=jr(),u=Mr(),d=Nr(),f=Pr(),p=Fr(),m=Ir(),h=Lr(),g=Rr();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),Br=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),Vr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[Br().default]})),Hr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),Ur=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=lr(),n=Sr(),r=zr(),i=Vr(),a=Hr();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),Wr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),Gr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j(),n=Wr(),r=qn(),i=Kn(),a=M();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();o.if(!1);for(let e in r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n&&=t||o(c),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),Kr=s({$id:()=>Jr,$schema:()=>qr,default:()=>$r,definitions:()=>Xr,properties:()=>Qr,title:()=>Yr,type:()=>Zr}),qr,Jr,Yr,Xr,Zr,Qr,$r,ei=a((()=>{qr=`http://json-schema.org/draft-07/schema#`,Jr=`http://json-schema.org/draft-07/schema#`,Yr=`Core schema meta-schema`,Xr={schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:`#/definitions/nonNegativeInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},Zr=[`object`,`boolean`],Qr={$id:{type:`string`,format:`uri-reference`},$schema:{type:`string`,format:`uri`},$ref:{type:`string`,format:`uri-reference`},$comment:{type:`string`},title:{type:`string`},description:{type:`string`},default:!0,readOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/definitions/nonNegativeInteger`},minLength:{$ref:`#/definitions/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{$ref:`#`},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:!0},maxItems:{$ref:`#/definitions/nonNegativeInteger`},minItems:{$ref:`#/definitions/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},contains:{$ref:`#`},maxProperties:{$ref:`#/definitions/nonNegativeInteger`},minProperties:{$ref:`#/definitions/nonNegativeIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{$ref:`#`},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},propertyNames:{format:`regex`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},propertyNames:{$ref:`#`},const:!0,enum:{type:`array`,items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},format:{type:`string`},contentMediaType:{type:`string`},contentEncoding:{type:`string`},if:{$ref:`#`},then:{$ref:`#`},else:{$ref:`#`},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},$r={$schema:qr,$id:Jr,title:Yr,definitions:Xr,type:Zr,properties:Qr,default:!0}})),ti=o(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;var n=or(),r=Ur(),i=Gr(),a=(ei(),l(Kr).default),o=[`/properties`],s=`http://json-schema.org/draft-07/schema`,c=class extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(e,s,!1),this.refs[`http://json-schema.org/schema`]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var u=Wn();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=j();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var f=Gn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=Kn();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}))(),ni=[0,1,2,3,4],ri=[1,2,3],ii={type:`object`,default:{},properties:{mode:{type:`string`,enum:[`system`,`light`,`dark`],default:`system`},style:{type:`string`,enum:[`basic`,`wireframe`,`silk`,`cyberpunk`,`retro`,`lemonade`],default:`basic`},boxes_radius:{type:`integer`,enum:ni,default:1},field_radius:{type:`integer`,enum:ni,default:1},selectors_radius:{type:`integer`,enum:ni,default:1},border_width:{type:`integer`,enum:ni,default:0},depth_effect:{type:`boolean`,default:!1},noise_effect:{type:`boolean`,default:!1},fields_size:{type:`integer`,enum:ri,default:2},selectors_size:{type:`integer`,enum:ri,default:2},icon_library:{type:`string`,enum:[`pixelarticons`,`lucide`],default:`pixelarticons`}}},ai={type:`object`,default:{},properties:{modality:{type:`string`,enum:[`audio`,`video`,`chat`],default:`video`},enable_chat:{type:`boolean`,default:!1},enable_closed_captions:{type:`boolean`,default:!1},enable_picture_in_picture:{type:`boolean`,default:!1},unique_memory_tag:{type:`boolean`,default:!0},context:{type:`string`,default:``}}},oi={type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]},si={type:`object`,default:{},properties:{title:{type:`string`,default:``},description:{type:`string`,default:``},btn_title:{type:`string`,default:``},background:{type:`object`,default:{},properties:{type:{type:[`string`,`null`],enum:[`replica`,`background-gradient`,`custom-image`,null],default:null},url:{type:`string`,default:``}}}}},ci={type:`object`,default:{},properties:{permission_request_title:{type:`string`,default:``},permission_request_description:{type:`string`,default:``},permission_granted_title:{type:`string`,default:``},permission_granted_description:{type:`string`,default:``},permission_denied_title:{type:`string`,default:``},permission_denied_description:{type:`string`,default:``},join_button:{type:`string`,default:``},cancel_btn:{type:`string`,default:``}}},li={type:`object`,default:{},properties:{title:{type:`string`,default:``},description:{type:`string`,default:``},cta:{type:`array`,items:oi,default:[]}}},ui={type:`object`,default:{},properties:{hide_tavus_badge:{type:`boolean`,default:!1},logo:{type:`string`,default:``},text:{type:`string`,default:``}}},di={type:`object`,default:{},properties:{template:{type:`string`,enum:[`1`,`2`,`3`,`4`,`5`],default:`1`},access:{type:`string`,enum:[`public`,`auth_required`],default:`public`},logo:{type:`string`,default:``},title:{type:`string`,default:``},description:{type:`string`,default:``},cta:{type:`array`,items:oi,default:[]},background:{type:[`object`,`null`],default:null,properties:{type:{type:`string`,enum:[`default`,`image`],default:`default`},url:{type:[`string`,`null`],default:null}}}}},fi={type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},pi={type:`object`,properties:{schema_version:{type:`integer`,const:1,default:1},terms_content:{type:`string`,default:``},terms_enabled:{type:`boolean`,default:!1},show_haircheck:{type:`boolean`,default:!0},language_selector:{type:`boolean`,default:!1},conversation:ai,style:ii,widget:{type:`object`,default:{},properties:{variant:{type:`string`,enum:[`tiny`,`compact`,`full`],default:`compact`},position:{type:`string`,enum:[`bottom-left`,`bottom-right`,`top-left`,`top-right`,`top`,`bottom`],default:`bottom-right`},expandable:{type:`string`,enum:[`default`,`always`,`start-expanded`],default:`default`},avatar:{type:`object`,default:{},properties:{type:{type:`string`,enum:[`orb`,`image`],default:`orb`}}},text:{type:`object`,default:{},properties:{title:{type:`string`,default:``},btn_title:{type:`string`,default:``}}}}},landing_page:di,preview:si,haircheck:ci,after_call:li,branding:ui,unavailable_screen:{type:`object`,properties:{daily_limit:fi,total_limit:fi,busy:fi,cta:{type:`array`,items:oi}}}}},mi=yn(`Config`),hi=new ti.Ajv({useDefaults:!0,removeAdditional:`all`,strict:!1}).compile(pi);function gi(e){let t=e.customization??{};return t.widget===null&&delete t.widget,t.landing_page===null&&delete t.landing_page,hi(t)||mi.warn(`Customization validation failed`,hi.errors),{...e,customization:t}}var _i=yn(`Config`);function vi(){return{is_available:!1}}var yi=280,bi=Ie(null);function xi({children:e,fallback:t}){let n=pt(wt),r=n.deploymentId??``,i=n.overrideConfig,a=n.baseUrl,o=n.previewToken,s=O(()=>xn({baseUrl:a??`https://tavusapi.com`,token:o}),[a,o]),c=O(()=>Wt(null),[]),l=O(()=>Wt(null),[]),u=O(()=>Wt(!1),[]);vn(()=>{if(!r){l.value=null,u.value=!1,c.value=i||null;return}let e=new AbortController;return Cn(s,r).then(t=>{e.signal.aborted||(l.value=null,u.value=!1,c.value=t,_i.info(`Deployment initialized`,t.deployment_id))}).catch(t=>{e.signal.aborted||(_i.error(`Init failed:`,t),l.value=t,u.value=!i,c.value=i||vi())}),()=>{e.abort()}});let d=O(()=>Wt(null),[]);E(()=>{let e=e=>{if(!e){d.value=null;return}d.value=gi(i?On(e,i):e)};return e(c.peek()),c.subscribe(e)},[d,c,i]);let f=d.value!==null,[p,m]=T(`pending`);if(E(()=>{if(!f){m(`pending`);return}if(!t){m(`done`);return}if(globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1){m(`done`);return}m(`fading`);let e=setTimeout(()=>m(`done`),yi);return()=>clearTimeout(e)},[f]),!t){if(!f)return A(ue,{});let t={deploymentId:r,config:d,initError:l,configError:u,client:s};return A(bi.Provider,{value:t,children:e})}let h=f?{deploymentId:r,config:d,initError:l,configError:u,client:s}:null;return A(`div`,{class:`relative w-full h-full`,children:[h&&A(bi.Provider,{value:h,children:e}),p!==`done`&&A(`div`,{class:`absolute inset-0 z-10${p===`fading`?` pointer-events-none motion-safe:animate-[tavusFadeOut_280ms_ease-out_forwards]`:``}`,"aria-hidden":p===`fading`?`true`:void 0,children:t})]})}var Si=Ie(null);function Ci({children:e}){let{client:t}=pt(bi),n=O(()=>({client:t}),[t]);return A(Si.Provider,{value:n,children:e})}function wi(e){return`init`in e}function Ti(e){return typeof e.write==`function`}function Ei(e){return!!e.onMount}function Di(e){return`v`in e||`e`in e}function Oi(e){if(`e`in e)throw e.e;return e.v}function ki(e){return typeof e?.then==`function`}function Ai(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}function ji(e,t,n){let r=n.get(e)?.t,i=t.p;if(!r?.size)return i;if(!i.size)return r;let a=new Set(r);for(let e of i)a.add(e);return a}function Mi(e){return!!e.INTERNAL_onInit}var Ni=(e,t,n,...r)=>n.read(...r),Pi=(e,t,n,...r)=>n.write(...r),Fi=(e,t,n)=>n.INTERNAL_onInit(t),Ii=(e,t,n,r)=>n.onMount?.call(n,r),Li=(e,t,n)=>{var r;let i=e[0],a=i.get(n);if(!a){let o=e[6],s=e[9];a={d:new Map,p:new Set,n:0},i.set(n,a),(r=o.i)==null||r.call(o,n),Mi(n)&&s(e,t,n)}return a},Ri=(e,t)=>{let n=e[1],r=e[3],i=e[4],a=e[5],o=e[6],s=e[13];if(!o.f&&!r.size&&!i.size&&!a.size)return;let c=[],l=e=>{try{e()}catch(e){c.push(e)}};do{o.f&&l(o.f);let c=new Set;for(let e of r){let t=n.get(e)?.l;if(t)for(let e of t)c.add(e)}r.clear();for(let e of a)c.add(e);a.clear();for(let e of i)c.add(e);i.clear();for(let e of c)l(e);r.size&&s(e,t)}while(r.size||a.size||i.size);if(c.length)throw AggregateError(c)},zi=(e,t)=>{let n=e[1],r=e[2],i=e[3],a=e[11],o=e[14],s=e[17];if(!i.size)return;let c=[],l=[],u=new WeakSet,d=new WeakSet,f=[],p=[];for(let n of i)f.push(n),p.push(a(e,t,n));for(;f.length;){let i=f.length-1,o=f[i],s=p[i];if(d.has(o)){f.pop(),p.pop();continue}if(u.has(o)){r.get(o)===s.n&&(c.push(o),l.push(s)),d.add(o),f.pop(),p.pop();continue}u.add(o);for(let r of ji(o,s,n))u.has(r)||(f.push(r),p.push(a(e,t,r)))}for(let n=c.length-1;n>=0;--n){let a=c[n],u=l[n],d=!1;for(let e of u.d.keys())if(e!==a&&i.has(e)){d=!0;break}d&&(r.set(a,u.n),o(e,t,a),s(e,t,a)),r.delete(a)}},Bi=(e,t,n)=>{var r,i;let a=e[1],o=e[2],s=e[3],c=e[6],l=e[7],u=e[11],d=e[12],f=e[13],p=e[14],m=e[16],h=e[17],g=e[20],_=e[26],v=e[28],y=u(e,t,n),b=v[0];if(Di(y)){if(a.has(n)&&o.get(n)!==y.n||y.m===b)return y.m=b,y;let r=!1;for(let[n,i]of y.d)if(p(e,t,n).n!==i){r=!0;break}if(!r)return y.m=b,y}let x=!0,S=new Set(y.d.keys()),C=()=>{for(let e of S)y.d.delete(e)},w=()=>{if(a.has(n)){let r=!s.size;h(e,t,n),r&&(f(e,t),d(e,t))}},ee=r=>{var i;if(r===n){let n=u(e,t,r);if(!Di(n))if(wi(r))g(e,t,r,r.init);else throw Error(`no atom init`);return Oi(n)}let o=p(e,t,r);try{return Oi(o)}finally{S.delete(r),y.d.set(r,o.n),ki(y.v)&&Ai(n,y.v,o),a.has(n)&&((i=a.get(r))==null||i.t.add(n)),x||w()}},te,ne,re={get signal(){return te||=new AbortController,te.signal},get setSelf(){return!ne&&Ti(n)&&(ne=(...r)=>{if(!x)try{return m(e,t,n,r)}finally{f(e,t),d(e,t)}}),ne}},ie=y.n,ae=o.get(n)===ie;try{let i=l(e,t,n,ee,re);if(g(e,t,n,i),ki(i)){_(e,t,i,()=>te?.abort());let n=()=>{C(),w()};i.then(n,n)}else C();return(r=c.r)==null||r.call(c,n),y.m=b,y}catch(e){return delete y.v,y.e=e,++y.n,y.m=b,y}finally{x=!1,y.n!==ie&&ae&&(o.set(n,y.n),s.add(n),(i=c.c)==null||i.call(c,n))}},Vi=(e,t,n)=>{let r=e[1],i=e[2],a=e[11],o=[n];for(;o.length;){let n=o.pop(),s=a(e,t,n);for(let c of ji(n,s,r)){let n=a(e,t,c);i.get(c)!==n.n&&(i.set(c,n.n),o.push(c))}}},Hi=(e,t,n,r)=>{let i=e[3],a=e[6],o=e[8],s=e[11],c=e[12],l=e[13],u=e[14],d=e[15],f=e[16],p=e[17],m=e[20],h=e[28],g=!0,_=n=>Oi(u(e,t,n)),v=(r,...o)=>{var u;let _=s(e,t,r);try{if(r===n){if(!wi(r))throw Error(`atom not writable`);let n=_.n,s=o[0];m(e,t,r,s),p(e,t,r),n!==_.n&&(++h[0],i.add(r),d(e,t,r),(u=a.c)==null||u.call(a,r));return}else return f(e,t,r,o)}finally{g||(l(e,t),c(e,t))}};try{return o(e,t,n,_,v,...r)}finally{g=!1}},Ui=(e,t,n)=>{var r;let i=e[1],a=e[3],o=e[6],s=e[11],c=e[15],l=e[18],u=e[19],d=s(e,t,n),f=i.get(n);if(f&&d.d.size>0){for(let[i,u]of d.d)if(!f.d.has(i)){let d=s(e,t,i);l(e,t,i).t.add(n),f.d.add(i),u!==d.n&&(a.add(i),c(e,t,i),(r=o.c)==null||r.call(o,i))}for(let r of f.d)d.d.has(r)||(f.d.delete(r),u(e,t,r)?.t.delete(n))}},Wi=(e,t,n)=>{var r;let i=e[1],a=e[4],o=e[6],s=e[10],c=e[11],l=e[12],u=e[13],d=e[14],f=e[16],p=e[18],m=c(e,t,n),h=i.get(n);if(!h){d(e,t,n);for(let r of m.d.keys())p(e,t,r).t.add(n);h={l:new Set,d:new Set(m.d.keys()),t:new Set},i.set(n,h),Ti(n)&&Ei(n)&&a.add(()=>{let r=!0,i=(...i)=>{try{return f(e,t,n,i)}finally{r||(u(e,t),l(e,t))}};try{let a=s(e,t,n,i);a&&(h.u=()=>{r=!0;try{a()}finally{r=!1}})}finally{r=!1}}),(r=o.m)==null||r.call(o,n)}return h},Gi=(e,t,n)=>{var r;let i=e[1],a=e[5],o=e[6],s=e[11],c=e[19],l=s(e,t,n),u=i.get(n);if(!u||u.l.size)return u;let d=!1;for(let e of u.t)if(i.get(e)?.d.has(n)){d=!0;break}if(!d){u.u&&a.add(u.u),u=void 0,i.delete(n);for(let r of l.d.keys())c(e,t,r)?.t.delete(n);(r=o.u)==null||r.call(o,n);return}return u},Ki=(e,t,n,r)=>{let i=e[11],a=e[27],o=i(e,t,n),s=`v`in o,c=o.v;if(ki(r))for(let a of o.d.keys())Ai(n,r,i(e,t,a));o.v=r,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,ki(c)&&a(e,t,c))},qi=(e,t,n)=>{let r=e[14];return Oi(r(e,t,n))},Ji=(e,t,n,...r)=>{let i=e[3],a=e[12],o=e[13],s=e[16],c=i.size;try{return s(e,t,n,r)}finally{i.size!==c&&(o(e,t),a(e,t))}},Yi=(e,t,n,r)=>{let i=e[12],a=e[18],o=e[19],s=a(e,t,n).l;return s.add(r),i(e,t),()=>{s.delete(r),o(e,t,n),i(e,t)}},Xi=(e,t,n,r)=>{let i=e[25],a=i.get(n);if(!a){a=new Set,i.set(n,a);let e=()=>i.delete(n);n.then(e,e)}a.add(r)},Zi=(e,t,n)=>{e[25].get(n)?.forEach(e=>e())},Qi=new WeakMap;function $i(e){let t=Qi.get(e),n=t[24];return n?n(t,e):t}function ea(...e){let t={get(e){return r(n,t,e)},set(e,...r){return i(n,t,e,...r)},sub(e,r){return a(n,t,e,r)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,void 0,new WeakMap,Xi,Zi,[0]].map((t,n)=>e[n]||t);Qi.set(t,Object.freeze(n));let r=n[21],i=n[22],a=n[23];return t}var ta=0;function N(e,t){let n=`atom${++ta}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=na,r.write=ra),t&&(r.write=t),r}function na(e){return e(this)}function ra(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}var ia;function aa(){return ia?ia():ea()}var oa;function sa(){return oa||=aa(),oa}function ca(e,t){let n=null,r=new Map,i=new Set,a=i=>{let s;if(t===void 0)s=r.get(i);else for(let[e,n]of r)if(t(e,i)){s=n;break}if(s!==void 0)if(n?.(s[1],i))a.remove(i);else return s[0];let c=e(i);return r.set(i,[c,Date.now()]),o(`CREATE`,i,c),c},o=(e,t,n)=>{for(let r of i)r({type:e,param:t,atom:n})};return a.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),a.getParams=()=>r.keys(),a.remove=e=>{if(t===void 0){if(!r.has(e))return;let[t]=r.get(e);r.delete(e),o(`REMOVE`,e,t)}else for(let[n,[i]]of r)if(t(n,e)){r.delete(n),o(`REMOVE`,n,i);break}},a.setShouldRemove=e=>{if(n=e,n)for(let[e,[t,i]]of r)n(i,e)&&(r.delete(e),o(`REMOVE`,e,t))},a}var la=e=>typeof e?.then==`function`;function ua(e=()=>{try{return window.localStorage}catch{return}},t){let n,r,i={getItem:(i,a)=>{let o=e=>{if(e||=``,n!==e){try{r=JSON.parse(e,t?.reviver)}catch{return a}n=e}return r},s=e()?.getItem(i)??null;return la(s)?s.then(o):o(s)},setItem:(n,r)=>e()?.setItem(n,JSON.stringify(r,t?.replacer)),removeItem:t=>e()?.removeItem(t)},a=e=>(t,n,r)=>e(t,e=>{let t;try{t=JSON.parse(e||``)}catch{t=r}n(t)}),o;try{o=e()?.subscribe}catch{}return!o&&typeof window<`u`&&typeof window.addEventListener==`function`&&window.Storage&&(o=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};let r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener(`storage`,r),()=>{window.removeEventListener(`storage`,r)}}),o&&(i.subscribe=a(o)),i}ua();function da(e,t){for(var n in t)e[n]=t[n];return e}function fa(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 pa(e,t){var n=t(),r=T({t:{__:n,u:t}}),i=r[0].t,a=r[1];return dt(function(){i.__=n,i.u=t,ma(i)&&a({t:i})},[e,n,t]),E(function(){return ma(i)&&a({t:i}),e(function(){ma(i)&&a({t:i})})},[e]),n}function ma(e){try{return!((t=e.__)===(n=e.u())&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}var t,n}function ha(e){e()}function ga(e){return e}function _a(){return[!1,ha]}var va=dt;function ya(e,t){this.props=e,this.context=t}function ba(e,t){function n(e){var n=this.props.ref;return n!=e.ref&&n&&(typeof n==`function`?n(null):n.current=null),t?!t(this.props,e)||n!=e.ref:fa(this.props,e)}function r(t){return this.shouldComponentUpdate=n,se(e,t)}return r.displayName=`Memo(`+(e.displayName||e.name)+`)`,r.__f=r.prototype.isReactComponent=!0,r.type=e,r}(ya.prototype=new de).isPureReactComponent=!0,ya.prototype.shouldComponentUpdate=function(e,t){return fa(this.props,e)||fa(this.state,t)};var xa=d.__b;d.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xa&&xa(e)};var Sa=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.forward_ref`)||3911;function Ca(e){function t(t){var n=da({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Sa,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}var wa=function(e,t){return e==null?null:be(be(e).map(t))},Ta={map:wa,forEach:wa,count:function(e){return e?be(e).length:0},only:function(e){var t=be(e);if(t.length!==1)throw`Children.only`;return t[0]},toArray:be},Ea=d.__e;d.__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??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Ea(e,t,n,r)};var Da=d.unmount;function Oa(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=da({},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(e){return Oa(e,t,n)})),e}function ka(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return ka(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Aa(){this.__u=0,this.o=null,this.__b=null}function ja(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function Ma(e){var t,n,r,i=null;function a(a){if(t||(t=e()).then(function(e){e&&(i=e.default||e),r=!0},function(e){n=e,r=!0}),n)throw n;if(!r)throw t;return i?se(i,a):null}return a.displayName=`Lazy`,a.__f=!0,a}function Na(){this.i=null,this.l=null}d.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Da&&Da(e)},(Aa.prototype=new de).__c=function(e,t){var n=t.__c,r=this;r.o??=[],r.o.push(n);var i=ja(r.__v),a=!1,o=function(){a||r.__z||(a=!0,n.__R=null,i?i(c):c())};n.__R=o;var s=n.__P;n.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=ka(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=s,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},Aa.prototype.componentWillUnmount=function(){this.o=[]},Aa.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]=Oa(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&se(ue,null,e.fallback);return i&&(i.__u&=-33),[se(ue,null,t.__a?null:e.children),i]};var Pa=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 Fa(e){return this.getChildContext=function(){return e.context},e.children}function Ia(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){Ne(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},namespaceURI:n.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}Ne(se(Fa,{context:t.context},e.__v),t.v)}function La(e,t){var n=se(Ia,{__v:e,h:t});return n.containerInfo=t,n}(Na.prototype=new de).__a=function(e){var t=this,n=ja(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),Pa(t,e,r)):i()};n?n(a):a()}},Na.prototype.render=function(e){this.i=null,this.l=new Map;var t=be(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},Na.prototype.componentDidUpdate=Na.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Pa(e,n,t)})};var Ra=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,za=/^(?: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]/,Ba=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Va=/[A-Z0-9]/g,Ha=typeof document<`u`,Ua=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/:/fil|che|ra/).test(e)};function Wa(e,t,n){return t.__k??(t.textContent=``),Ne(e,t),typeof n==`function`&&n(),e?e.__c:null}function Ga(e,t,n){return Pe(e,t),typeof n==`function`&&n(),e?e.__c:null}de.prototype.isReactComponent=!0,[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(de.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ka=d.event;d.event=function(e){return Ka&&(e=Ka(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var qa,Ja={configurable:!0,get:function(){return this.class}},Ya=d.vnode;d.vnode=function(e){typeof e.type==`string`&&function(e){var t=e.props,n=e.type,r={},i=n.indexOf(`-`)==-1;for(var a in t){var o=t[a];if(!(a===`value`&&`defaultValue`in t&&o==null||Ha&&a===`children`&&n===`noscript`||a===`class`||a===`className`)){var s=a.toLowerCase();a===`defaultValue`&&`value`in t&&t.value==null?a=`value`:a===`download`&&!0===o?o=``:s===`translate`&&o===`no`?o=!1:s[0]===`o`&&s[1]===`n`?s===`ondoubleclick`?a=`ondblclick`:s!==`onchange`||n!==`input`&&n!==`textarea`||Ua(t.type)?s===`onfocus`?a=`onfocusin`:s===`onblur`?a=`onfocusout`:Ba.test(a)&&(a=s):s=a=`oninput`:i&&za.test(a)?a=a.replace(Va,`-$&`).toLowerCase():o===null&&(o=void 0),s===`oninput`&&r[a=s]&&(a=`oninputCapture`),r[a]=o}}n==`select`&&(r.multiple&&Array.isArray(r.value)&&(r.value=be(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),r.defaultValue!=null&&(r.value=be(t.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Ja)):t.className&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=Ra,Ya&&Ya(e)};var Xa=d.__r;d.__r=function(e){Xa&&Xa(e),qa=e.__c};var Za=d.diffed;d.diffed=function(e){Za&&Za(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),qa=null};var Qa={ReactCurrentDispatcher:{current:{readContext:function(e){return qa.__n[e.__c].props.value},useCallback:k,useContext:pt,useDebugValue:mt,useDeferredValue:ga,useEffect:E,useId:ht,useImperativeHandle:ft,useInsertionEffect:va,useLayoutEffect:dt,useMemo:O,useReducer:ut,useRef:D,useState:T,useSyncExternalStore:pa,useTransition:_a}}};function $a(e){return se.bind(null,e)}function eo(e){return!!e&&e.$$typeof===Ra}function to(e){return eo(e)&&e.type===ue}function no(e){return!!e&&typeof e.displayName==`string`&&e.displayName.indexOf(`Memo(`)==0}function ro(e){return eo(e)?Fe.apply(null,arguments):e}function io(e){return!!e.__k&&(Ne(null,e),!0)}function ao(e){return e&&(e.base||e.nodeType===1&&e)||null}var P={useState:T,useId:ht,useReducer:ut,useEffect:E,useLayoutEffect:dt,useInsertionEffect:va,useTransition:_a,useDeferredValue:ga,useSyncExternalStore:pa,startTransition:ha,useRef:D,useImperativeHandle:ft,useMemo:O,useCallback:k,useContext:pt,useDebugValue:mt,version:`18.3.1`,Children:Ta,render:Wa,hydrate:Ga,unmountComponentAtNode:io,createPortal:La,createElement:se,createContext:Ie,createFactory:$a,cloneElement:ro,createRef:le,Fragment:ue,isValidElement:eo,isElement:eo,isFragment:to,isMemo:no,findDOMNode:ao,Component:de,PureComponent:ya,memo:ba,forwardRef:Ca,flushSync:function(e,t){var n=d.debounceRendering;d.debounceRendering=function(e){return e()};var r=e(t);return d.debounceRendering=n,r},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:ue,Suspense:Aa,SuspenseList:Na,lazy:Ma,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Qa},oo=Ie(void 0);function so(e){let t=pt(oo);return e?.store||t||sa()}function co({children:e,store:t}){let n=D(null);return t?se(oo.Provider,{value:t},e):(n.current===null&&(n.current=aa()),se(oo.Provider,{value:n.current},e))}var lo=e=>typeof e?.then==`function`,uo=e=>{e.status||(e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}))},fo=P.use||(e=>{if(e.status===`pending`)throw e;if(e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:(uo(e),e)}),po=new WeakMap,mo=(e,t,n)=>{let r=$i(e),i=r[26],a=po.get(t);return a||(a=new Promise((o,s)=>{let c=t,l=e=>t=>{c===e&&o(t)},u=e=>t=>{c===e&&s(t)},d=()=>{try{let t=n();lo(t)?(po.set(t,a),c=t,t.then(l(t),u(t)),i(r,e,t,d)):o(t)}catch(e){s(e)}};t.then(l(t),u(t)),i(r,e,t,d)}),po.set(t,a)),a};function ho(e,t){let{delay:n,unstable_promiseStatus:r=!P.use}=t||{},i=so(t),[[a,o,s],c]=ut(t=>{let n=i.get(e);return Object.is(t[0],n)&&t[1]===i&&t[2]===e?t:[n,i,e]},void 0,()=>[i.get(e),i,e]),l=a;if((o!==i||s!==e)&&(c(),l=i.get(e)),E(()=>{let t=i.sub(e,()=>{if(r)try{let t=i.get(e);lo(t)&&uo(mo(i,t,()=>i.get(e)))}catch{}if(typeof n==`number`){console.warn(`[DEPRECATED] delay option is deprecated and will be removed in v3.
10
10
 
11
11
  Migration guide:
12
12
 
@@ -27,17 +27,17 @@ function useAtomValueWithDelay<Value>(
27
27
  }, [store, atom, delay])
28
28
  return value
29
29
  }
30
- `),setTimeout(c,n);return}c()});return c(),t},[i,e,n,r]),pt(l),co(l)){let t=po(i,l,()=>i.get(e));return r&&lo(t),uo(t)}return l}function ho(e,t){let n=oo(t);return A((...t)=>n.set(e,...t),[n,e])}function F(e,t){return ho(k(()=>N(null,(t,n,...r)=>e(t,n,...r)),[e]),t)}function go(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}(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 _o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function I(e){return I=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},I(e)}function vo(e){var t=function(e,t){if(I(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(I(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return I(t)==`symbol`?t:t+``}function yo(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,vo(r.key),r)}}function bo(e,t,n){return t&&yo(e.prototype,t),n&&yo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xo(e,t){if(t&&(I(t)==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e)}function So(e){return So=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},So(e)}function Co(e,t){return Co=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Co(e,t)}function wo(e,t){if(typeof t!=`function`&&t!==null)throw 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&&Co(e,t)}function To(e,t,n){return(t=vo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eo(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function L(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){Eo(a,r,i,o,s,`next`,e)}function s(e){Eo(a,r,i,o,s,`throw`,e)}o(void 0)}))}}function Do(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 Oo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if(typeof e==`string`)return Do(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Do(e,t):void 0}}(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
31
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ko(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Ao,jo={exports:{}},Mo=function(){if(Ao)return jo.exports;Ao=1;var e,t=typeof Reflect==`object`?Reflect:null,n=t&&typeof t.apply==`function`?t.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};e=t&&typeof t.ownKeys==`function`?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}jo.exports=i,jo.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}m(e,t,a,{once:!0}),t!==`error`&&function(e,t,n){typeof e.on==`function`&&m(e,`error`,t,n)}(e,i,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function o(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}function s(e){return e._maxListeners===void 0?i.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,a,c,l;if(o(n),(a=e._events)===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),a=e._events),c=a[t]),c===void 0)c=a[t]=n,++e._eventsCount;else if(typeof c==`function`?c=a[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),(i=s(e))>0&&c.length>i&&!c.warned){c.warned=!0;var u=Error(`Possible EventEmitter memory leak detected. `+c.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);u.name=`MaxListenersExceededWarning`,u.emitter=e,u.type=t,u.count=c.length,l=u,console&&console.warn&&console.warn(l)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):p(i,i.length)}function f(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}function p(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else{if(typeof e.addEventListener!=`function`)throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e);e.addEventListener(t,(function i(a){r.once&&e.removeEventListener(t,i),n(a)}))}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if(typeof e!=`number`||e<0||r(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);a=e}}),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(e){if(typeof e!=`number`||e<0||r(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)n(c,this,t);else{var l=c.length,u=p(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return o(t),this.on(e,u(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,u(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,i,a,s;if(o(t),(r=this._events)===void 0||(n=r[e])===void 0)return this;if(n===t||n.listener===t)--this._eventsCount==0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if((n=this._events)===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i,a=Object.keys(n);for(r=0;r<a.length;++r)(i=a[r])!==`removeListener`&&this.removeAllListeners(i);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(t=n[e])==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):f.call(e,t)},i.prototype.listenerCount=f,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},jo.exports}(),No=ko(Mo),Po=Object.prototype.hasOwnProperty;function Fo(e,t,n){for(n of e.keys())if(Io(n,t))return n}function Io(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--&&Io(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=Fo(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=Fo(t,i))||!Io(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(Po.call(e,n)&&++r&&!Po.call(t,n)||!(n in t)||!Io(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}var Lo={"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`},Ro={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`},zo={tablet:`tablet`,mobile:`mobile`,desktop:`desktop`,tv:`tv`},Bo={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`},Vo={EdgeHTML:`EdgeHTML`,Blink:`Blink`,Trident:`Trident`,Presto:`Presto`,Gecko:`Gecko`,WebKit:`WebKit`},R=class e{static getFirstMatch(e,t){let n=t.match(e);return n&&n.length>0&&n[1]||``}static getSecondMatch(e,t){let n=t.match(e);return n&&n.length>1&&n[2]||``}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case`NT`:return`NT`;case`XP`:case`NT 5.1`:return`XP`;case`NT 5.0`:return`2000`;case`NT 5.2`:return`2003`;case`NT 6.0`:return`Vista`;case`NT 6.1`:return`7`;case`NT 6.2`:return`8`;case`NT 6.3`:return`8.1`;case`NT 10.0`:return`10`;default:return}}static getMacOSVersionName(e){let t=e.split(`.`).splice(0,2).map((e=>parseInt(e,10)||0));if(t.push(0),t[0]===10)switch(t[1]){case 5:return`Leopard`;case 6:return`Snow Leopard`;case 7:return`Lion`;case 8:return`Mountain Lion`;case 9:return`Mavericks`;case 10:return`Yosemite`;case 11:return`El Capitan`;case 12:return`Sierra`;case 13:return`High Sierra`;case 14:return`Mojave`;case 15:return`Catalina`;default:return}}static getAndroidVersionName(e){let t=e.split(`.`).splice(0,2).map((e=>parseInt(e,10)||0));if(t.push(0),!(t[0]===1&&t[1]<5))return t[0]===1&&t[1]<6?`Cupcake`:t[0]===1&&t[1]>=6?`Donut`:t[0]===2&&t[1]<2?`Eclair`:t[0]===2&&t[1]===2?`Froyo`:t[0]===2&&t[1]>2?`Gingerbread`:t[0]===3?`Honeycomb`:t[0]===4&&t[1]<1?`Ice Cream Sandwich`:t[0]===4&&t[1]<4?`Jelly Bean`:t[0]===4&&t[1]>=4?`KitKat`:t[0]===5?`Lollipop`:t[0]===6?`Marshmallow`:t[0]===7?`Nougat`:t[0]===8?`Oreo`:t[0]===9?`Pie`:void 0}static getVersionPrecision(e){return e.split(`.`).length}static compareVersions(t,n,r=!1){let i=e.getVersionPrecision(t),a=e.getVersionPrecision(n),o=Math.max(i,a),s=0,c=e.map([t,n],(t=>{let n=o-e.getVersionPrecision(t),r=t+Array(n+1).join(`.0`);return e.map(r.split(`.`),(e=>Array(20-e.length).join(`0`)+e)).reverse()}));for(r&&(s=o-Math.min(i,a)),--o;o>=s;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===s)return 0;--o}else if(c[0][o]<c[1][o])return-1}}static map(e,t){let n=[],r;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n}static find(e,t){let n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){let r=e[n];if(t(r,n))return r}}static assign(e,...t){let n=e,r,i;if(Object.assign)return Object.assign(e,...t);for(r=0,i=t.length;r<i;r+=1){let e=t[r];typeof e==`object`&&e&&Object.keys(e).forEach((t=>{n[t]=e[t]}))}return e}static getBrowserAlias(e){return Lo[e]}static getBrowserTypeByAlias(e){return Ro[e]||``}},Ho=/version\/(\d+(\.?_?\d+)+)/i,Uo=[{test:[/googlebot/i],describe(e){let t={name:`Googlebot`},n=R.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||R.getFirstMatch(Ho,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){let t={name:`Opera`},n=R.getFirstMatch(Ho,e)||R.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){let t={name:`Opera`},n=R.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||R.getFirstMatch(Ho,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:`Samsung Internet for Android`},n=R.getFirstMatch(Ho,e)||R.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){let t={name:`NAVER Whale Browser`},n=R.getFirstMatch(Ho,e)||R.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){let t={name:`MZ Browser`},n=R.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||R.getFirstMatch(Ho,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){let t={name:`Focus`},n=R.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||R.getFirstMatch(Ho,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){let t={name:`Swing`},n=R.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||R.getFirstMatch(Ho,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){let t={name:`Opera Coast`},n=R.getFirstMatch(Ho,e)||R.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){let t={name:`Opera Touch`},n=R.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||R.getFirstMatch(Ho,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){let t={name:`Yandex Browser`},n=R.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||R.getFirstMatch(Ho,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){let t={name:`UC Browser`},n=R.getFirstMatch(Ho,e)||R.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:`Maxthon`},n=R.getFirstMatch(Ho,e)||R.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){let t={name:`Epiphany`},n=R.getFirstMatch(Ho,e)||R.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){let t={name:`Puffin`},n=R.getFirstMatch(Ho,e)||R.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){let t={name:`Sleipnir`},n=R.getFirstMatch(Ho,e)||R.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){let t={name:`K-Meleon`},n=R.getFirstMatch(Ho,e)||R.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){let t={name:`WeChat`},n=R.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||R.getFirstMatch(Ho,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){let t={name:/qqbrowserlite/i.test(e)?`QQ Browser Lite`:`QQ Browser`},n=R.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||R.getFirstMatch(Ho,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){let t={name:`Internet Explorer`},n=R.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){let t={name:`Microsoft Edge`},n=R.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){let t={name:`Microsoft Edge`},n=R.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){let t={name:`Vivaldi`},n=R.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){let t={name:`SeaMonkey`},n=R.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){let t={name:`Sailfish`},n=R.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){let t={name:`Amazon Silk`},n=R.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){let t={name:`PhantomJS`},n=R.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){let t={name:`SlimerJS`},n=R.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t={name:`BlackBerry`},n=R.getFirstMatch(Ho,e)||R.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){let t={name:`WebOS Browser`},n=R.getFirstMatch(Ho,e)||R.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){let t={name:`Bada`},n=R.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){let t={name:`Tizen`},n=R.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||R.getFirstMatch(Ho,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){let t={name:`QupZilla`},n=R.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||R.getFirstMatch(Ho,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){let t={name:`Firefox`},n=R.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){let t={name:`Electron`},n=R.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){let t={name:`Miui`},n=R.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){let t={name:`Chromium`},n=R.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||R.getFirstMatch(Ho,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:`Chrome`},n=R.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){let t={name:`Google Search`},n=R.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t={name:`Android Browser`},n=R.getFirstMatch(Ho,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){let t={name:`PlayStation 4`},n=R.getFirstMatch(Ho,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:`Safari`},n=R.getFirstMatch(Ho,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){let t=e.search(`\\(`)===-1?/^(.*)\/(.*) /:/^(.*)\/(.*)[ \t]\((.*)/;return{name:R.getFirstMatch(t,e),version:R.getSecondMatch(t,e)}}}],Wo=[{test:[/Roku\/DVP/],describe(e){let t=R.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Bo.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=R.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Bo.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=R.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=R.getWindowsVersionName(t);return{name:Bo.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:Bo.iOS},n=R.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){let t=R.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,`.`),n=R.getMacOSVersionName(t),r={name:Bo.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=R.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,`.`);return{name:Bo.iOS,version:t}}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t=R.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=R.getAndroidVersionName(t),r={name:Bo.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=R.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Bo.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=R.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||R.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||R.getFirstMatch(/\bbb(\d+)/i,e);return{name:Bo.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=R.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Bo.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=R.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Bo.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:Bo.Linux})},{test:[/CrOS/],describe:()=>({name:Bo.ChromeOS})},{test:[/PlayStation 4/],describe(e){let t=R.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Bo.PlayStation4,version:t}}}],Go=[{test:[/googlebot/i],describe:()=>({type:`bot`,vendor:`Google`})},{test:[/huawei/i],describe(e){let t=R.getFirstMatch(/(can-l01)/i,e)&&`Nova`,n={type:zo.mobile,vendor:`Huawei`};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:zo.tablet,vendor:`Nexus`})},{test:[/ipad/i],describe:()=>({type:zo.tablet,vendor:`Apple`,model:`iPad`})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:zo.tablet,vendor:`Apple`,model:`iPad`})},{test:[/kftt build/i],describe:()=>({type:zo.tablet,vendor:`Amazon`,model:`Kindle Fire HD 7`})},{test:[/silk/i],describe:()=>({type:zo.tablet,vendor:`Amazon`})},{test:[/tablet(?! pc)/i],describe:()=>({type:zo.tablet})},{test(e){let t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){let t=R.getFirstMatch(/(ipod|iphone)/i,e);return{type:zo.mobile,vendor:`Apple`,model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:zo.mobile,vendor:`Nexus`})},{test:[/[^-]mobi/i],describe:()=>({type:zo.mobile})},{test:e=>e.getBrowserName(!0)===`blackberry`,describe:()=>({type:zo.mobile,vendor:`BlackBerry`})},{test:e=>e.getBrowserName(!0)===`bada`,describe:()=>({type:zo.mobile})},{test:e=>e.getBrowserName()===`windows phone`,describe:()=>({type:zo.mobile,vendor:`Microsoft`})},{test(e){let t=Number(String(e.getOSVersion()).split(`.`)[0]);return e.getOSName(!0)===`android`&&t>=3},describe:()=>({type:zo.tablet})},{test:e=>e.getOSName(!0)===`android`,describe:()=>({type:zo.mobile})},{test:e=>e.getOSName(!0)===`macos`,describe:()=>({type:zo.desktop,vendor:`Apple`})},{test:e=>e.getOSName(!0)===`windows`,describe:()=>({type:zo.desktop})},{test:e=>e.getOSName(!0)===`linux`,describe:()=>({type:zo.desktop})},{test:e=>e.getOSName(!0)===`playstation 4`,describe:()=>({type:zo.tv})},{test:e=>e.getOSName(!0)===`roku`,describe:()=>({type:zo.tv})}],Ko=[{test:e=>e.getBrowserName(!0)===`microsoft edge`,describe(e){if(/\sedg\//i.test(e))return{name:Vo.Blink};let t=R.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Vo.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:Vo.Trident},n=R.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){let t={name:Vo.Presto},n=R.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){let t={name:Vo.Gecko},n=R.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:Vo.Blink})},{test:[/(apple)?webkit/i],describe(e){let t={name:Vo.WebKit},n=R.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],qo=class{constructor(e,t=!1){if(e==null||e===``)throw Error(`UserAgent parameter can't be empty`);this._ua=e,this.parsedResult={},!0!==t&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let e=R.find(Uo,(e=>{if(typeof e.test==`function`)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw Error(`Browser's test function is not valid`)}));return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||``:this.getBrowser().name||``}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let e=R.find(Wo,(e=>{if(typeof e.test==`function`)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw Error(`Browser's test function is not valid`)}));return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){let{name:t}=this.getOS();return e?String(t).toLowerCase()||``:t||``}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){let{type:t}=this.getPlatform();return e?String(t).toLowerCase()||``:t||``}parsePlatform(){this.parsedResult.platform={};let e=R.find(Go,(e=>{if(typeof e.test==`function`)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw Error(`Browser's test function is not valid`)}));return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||``:this.getEngine().name||``}parseEngine(){this.parsedResult.engine={};let e=R.find(Ko,(e=>{if(typeof e.test==`function`)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw Error(`Browser's test function is not valid`)}));return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return R.assign({},this.parsedResult)}satisfies(e){let t={},n=0,r={},i=0;if(Object.keys(e).forEach((a=>{let o=e[a];typeof o==`string`?(r[a]=o,i+=1):typeof o==`object`&&(t[a]=o,n+=1)})),n>0){let e=Object.keys(t),n=R.find(e,(e=>this.isOS(e)));if(n){let e=this.satisfies(t[n]);if(e!==void 0)return e}let r=R.find(e,(e=>this.isPlatform(e)));if(r){let e=this.satisfies(t[r]);if(e!==void 0)return e}}if(i>0){let e=Object.keys(r),t=R.find(e,(e=>this.isBrowser(e,!0)));if(t!==void 0)return this.compareVersion(r[t])}}isBrowser(e,t=!1){let n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=R.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1,i=this.getBrowserVersion();if(typeof i==`string`)return e[0]===`>`||e[0]===`<`?(n=e.substr(1),e[1]===`=`?(r=!0,n=e.substr(2)):t=[],e[0]===`>`?t.push(1):t.push(-1)):e[0]===`=`?n=e.substr(1):e[0]===`~`&&(r=!0,n=e.substr(1)),t.indexOf(R.compareVersions(i,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some((e=>this.is(e)))}},Jo=class{static getParser(e,t=!1){if(typeof e!=`string`)throw Error(`UserAgent should be a string`);return new qo(e,t)}static parse(e){return new qo(e).getResult()}static get BROWSER_MAP(){return Ro}static get ENGINE_MAP(){return Vo}static get OS_MAP(){return Bo}static get PLATFORMS_MAP(){return zo}};function Yo(){return Date.now()+Math.random().toString()}function Xo(){throw Error(`Method must be implemented in subclass`)}function Zo(e,t){return t!=null&&t.proxyUrl?t.proxyUrl+(t.proxyUrl.slice(-1)===`/`?``:`/`)+e.substring(8):e}function Qo(e){return e!=null&&e.callObjectBundleUrlOverride?(console.warn(`The callObjectBundleUrlOverride property is deprecated and will be removed. Please use bundlePathOverride instead. When providing a bundlePathOverride, the URL should point to the directory containing all Daily bundles (call-machine-object-bundle.js and audio-processor-bundle.js).`),e.callObjectBundleUrlOverride):function(e){if(e!=null&&e.bundlePathOverride){var t=e.bundlePathOverride;return t.endsWith(`/`)?t.slice(0,-1):t}if(e!=null&&e.callObjectBundleUrlOverride){var n=e.callObjectBundleUrlOverride,r=n.substring(0,n.lastIndexOf(`/`));return r.endsWith(`/`)?r.slice(0,-1):r}var i=Zo(`https://c.daily.co/call-machine/versioned/0.89.1/static`,e);return i.endsWith(`/`)?i.slice(0,-1):i}(e)+`/call-machine-object-bundle.js`}function $o(e){try{new URL(e)}catch{return!1}return!0}var es=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,ts=`8.55.0`,ns=globalThis;function rs(e,t,n){let r=n||ns,i=r.__SENTRY__=r.__SENTRY__||{},a=i[ts]=i[ts]||{};return a[e]||(a[e]=t())}var is=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,as=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],os={};function ss(e){if(!(`console`in ns))return e();let t=ns.console,n={},r=Object.keys(os);r.forEach((e=>{let r=os[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}var z=rs(`logger`,(function(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return is?as.forEach((n=>{t[n]=(...t)=>{e&&ss((()=>{ns.console[n](`Sentry Logger [${n}]:`,...t)}))}})):as.forEach((e=>{t[e]=()=>{}})),t})),cs=`?`,ls=/\(error: (.*)\)/,us=/captureMessage|captureException/;function ds(e){return e[e.length-1]||{}}var fs=`<anonymous>`;function ps(e){try{return e&&typeof e==`function`&&e.name||fs}catch{return fs}}function ms(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch{return}}}var hs={},gs={};function _s(e,t){hs[e]=hs[e]||[],hs[e].push(t)}function vs(e,t){if(!gs[e]){gs[e]=!0;try{t()}catch(t){is&&z.error(`Error while instrumenting ${e}`,t)}}}function ys(e,t){let n=e&&hs[e];if(n)for(let r of n)try{r(t)}catch(t){is&&z.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ps(r)}\nError:`,t)}}var bs=null;function xs(){bs=ns.onerror,ns.onerror=function(e,t,n,r,i){return ys(`error`,{column:r,error:i,line:n,msg:e,url:t}),!!bs&&bs.apply(this,arguments)},ns.onerror.__SENTRY_INSTRUMENTED__=!0}var Ss=null;function Cs(){Ss=ns.onunhandledrejection,ns.onunhandledrejection=function(e){return ys(`unhandledrejection`,e),!Ss||Ss.apply(this,arguments)},ns.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function ws(){return Ts(ns),ns}function Ts(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ts,t[ts]=t[ts]||{}}var Es=Object.prototype.toString;function Ds(e){switch(Es.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return Ls(e,Error)}}function Os(e,t){return Es.call(e)===`[object ${t}]`}function ks(e){return Os(e,`ErrorEvent`)}function As(e){return Os(e,`DOMError`)}function js(e){return Os(e,`String`)}function Ms(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function Ns(e){return e===null||Ms(e)||typeof e!=`object`&&typeof e!=`function`}function Ps(e){return Os(e,`Object`)}function Fs(e){return typeof Event<`u`&&Ls(e,Event)}function Is(e){return!!(e&&e.then&&typeof e.then==`function`)}function Ls(e,t){try{return e instanceof t}catch{return!1}}function Rs(e){return!(typeof e!=`object`||!e||!e.__isVue&&!e._isVue)}var zs=ns;function Bs(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&i++<5&&(o=Vs(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=n.parentNode;return r.reverse().join(` > `)}catch{return`<unknown>`}}function Vs(e,t){let n=e,r=[];if(!n||!n.tagName)return``;if(zs.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());let i=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(i&&i.length)i.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);let e=n.className;if(e&&js(e)){let t=e.split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let e of[`aria-label`,`type`,`name`,`title`,`alt`]){let t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join(``)}function Hs(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Us(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{Rs(r)?n.push(`[VueViewModel]`):n.push(String(r))}catch{n.push(`[value cannot be serialized]`)}}return n.join(t)}function Ws(e,t,n=!1){return!!js(e)&&(Os(t,`RegExp`)?t.test(e):!!js(t)&&(n?e===t:e.includes(t)))}function Gs(e,t=[],n=!1){return t.some((t=>Ws(e,t,n)))}function Ks(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i==`function`&&Js(i,r);try{e[t]=i}catch{is&&z.log(`Failed to replace method "${t}" in object`,e)}}function qs(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{is&&z.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Js(e,t){try{e.prototype=t.prototype=t.prototype||{},qs(e,`__sentry_original__`,t)}catch{}}function Ys(e){return e.__sentry_original__}function Xs(e){if(Ds(e))return{message:e.message,name:e.name,stack:e.stack,...Qs(e)};if(Fs(e)){let t={type:e.type,target:Zs(e.target),currentTarget:Zs(e.currentTarget),...Qs(e)};return typeof CustomEvent<`u`&&Ls(e,CustomEvent)&&(t.detail=e.detail),t}return e}function Zs(e){try{return t=e,typeof Element<`u`&&Ls(t,Element)?Bs(e):Object.prototype.toString.call(e)}catch{return`<unknown>`}var t}function Qs(e){if(typeof e==`object`&&e){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function $s(e){return ec(e,new Map)}function ec(e,t){if(function(e){if(!Ps(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t===`Object`}catch{return!0}}(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let n of Object.getOwnPropertyNames(e))e[n]!==void 0&&(r[n]=ec(e[n],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach((e=>{r.push(ec(e,t))})),r}return e}function tc(){return Date.now()/1e3}var nc=function(){let{performance:e}=ns;if(!e||!e.now)return tc;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/1e3}();function rc(){let e=ns,t=e.crypto||e.msCrypto,n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,``);t&&t.getRandomValues&&(n=()=>{let e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return`10000000100040008000100000000000`.replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function ic(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ac(e){let{message:t,event_id:n}=e;if(t)return t;let r=ic(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function oc(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function sc(e,t){let n=ic(e);if(!n)return;let r=n.mechanism;if(n.mechanism={type:`generic`,handled:!0,...r,...t},t&&`data`in t){let e={...r&&r.data,...t.data};n.mechanism.data=e}}function cc(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{qs(e,`__sentry_captured__`,!0)}catch{}return!1}var lc;function uc(e){return new fc((t=>{t(e)}))}function dc(e){return new fc(((t,n)=>{n(e)}))}(()=>{let{performance:e}=ns;if(!e||!e.now)return;let t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=i<t,o=e.timing&&e.timing.navigationStart,s=typeof o==`number`?Math.abs(o+n-r):t;(a||s<t)&&i<=s&&e.timeOrigin})(),function(e){e[e.PENDING=0]=`PENDING`,e[e.RESOLVED=1]=`RESOLVED`,e[e.REJECTED=2]=`REJECTED`}(lc||={});var fc=class e{constructor(t){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._state=lc.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(e){this._reject(e)}}then(t,n){return new e(((e,r)=>{this._handlers.push([!1,n=>{if(t)try{e(t(n))}catch(e){r(e)}else e(n)},t=>{if(n)try{e(n(t))}catch(e){r(e)}else r(t)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(t){return new e(((e,n)=>{let r,i;return this.then((e=>{i=!1,r=e,t&&t()}),(e=>{i=!0,r=e,t&&t()})).then((()=>{i?n(r):e(r)}))}))}__init(){this._resolve=e=>{this._setResult(lc.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(lc.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===lc.PENDING&&(Is(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===lc.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||=(this._state===lc.RESOLVED&&e[1](this._value),this._state===lc.REJECTED&&e[2](this._value),!0)}))}}};function pc(e){let t=nc(),n={sid:rc(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>function(e){return $s({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&mc(n,e),n}function mc(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||nc(),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:rc()),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{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function hc(){return rc()}function gc(){return rc().substring(16)}function _c(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=_c(r[e],t[e],n-1));return r}var vc=`_sentrySpan`;function yc(e,t){t?qs(e,vc,t):delete e[vc]}function bc(e){return e[vc]}var xc=class e{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:hc(),spanId:gc()}}clone(){let t=new e;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,yc(t,bc(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&mc(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let t=typeof e==`function`?e(this):e,[n,r]=t instanceof xc?[t.getScopeData(),t.getRequestSession()]:Ps(t)?[e,e.requestSession]:[],{tags:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,yc(this,void 0),this._attachments=[],this.setPropagationContext({traceId:hc()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:100;if(n<=0)return this;let r={timestamp:tc(),...e};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:bc(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=_c(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:gc(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t&&t.event_id?t.event_id:rc();if(!this._client)return z.warn(`No client configured on scope - will not capture exception!`),n;let r=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n&&n.event_id?n.event_id:rc();if(!this._client)return z.warn(`No client configured on scope - will not capture message!`),r;let i=Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:rc();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(z.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),!1)}},Sc=class{constructor(e,t){let n,r;n=e||new xc,r=t||new xc,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return Is(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}};function Cc(){let e=Ts(ws());return e.stack=e.stack||new Sc(rs(`defaultCurrentScope`,(()=>new xc)),rs(`defaultIsolationScope`,(()=>new xc)))}function wc(e){return Cc().withScope(e)}function Tc(e,t){let n=Cc();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function Ec(e){return Cc().withScope((()=>e(Cc().getIsolationScope())))}function Dc(e){let t=Ts(e);return t.acs?t.acs:{withIsolationScope:Ec,withScope:wc,withSetScope:Tc,withSetIsolationScope:(e,t)=>Ec(t),getCurrentScope:()=>Cc().getScope(),getIsolationScope:()=>Cc().getIsolationScope()}}function Oc(){return Dc(ws()).getCurrentScope()}function kc(){return Dc(ws()).getIsolationScope()}function Ac(){return Oc().getClient()}function jc(e){let{traceId:t,spanId:n,parentSpanId:r}=e.getPropagationContext();return $s({trace_id:t,span_id:n,parent_span_id:r})}function Mc(e){let t=e._sentryMetrics;if(!t)return;let n={};for(let[,[e,r]]of t)(n[e]||(n[e]=[])).push($s(r));return n}var Nc=/^sentry-/;function Pc(e){let t=function(e){if(!(!e||!js(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce(((e,t)=>{let n=Fc(t);return Object.entries(n).forEach((([t,n])=>{e[t]=n})),e}),{}):Fc(e)}(e);if(!t)return;let n=Object.entries(t).reduce(((e,[t,n])=>(t.match(Nc)&&(e[t.slice(7)]=n),e)),{});return Object.keys(n).length>0?n:void 0}function Fc(e){return e.split(`,`).map((e=>e.split(`=`).map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(t&&n&&(e[t]=n),e)),{})}var Ic=!1;function Lc(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext();return $s({parent_span_id:r?t:Bc(e).parent_span_id,span_id:r?gc():t,trace_id:n})}function Rc(e){return typeof e==`number`?zc(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?zc(e.getTime()):nc()}function zc(e){return e>9999999999?e/1e3:e}function Bc(e){if(function(e){return typeof e.getSpanJSON==`function`}(e))return e.getSpanJSON();try{let{spanId:t,traceId:n}=e.spanContext();if(function(e){let t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){let{attributes:r,startTime:i,name:a,endTime:o,parentSpanId:s,status:c}=e;return $s({span_id:t,trace_id:n,data:r,description:a,parent_span_id:s,start_timestamp:Rc(i),timestamp:Rc(o)||void 0,status:Vc(c),op:r[`sentry.op`],origin:r[`sentry.origin`],_metrics_summary:Mc(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function Vc(e){if(e&&e.code!==0)return e.code===1?`ok`:e.message||`unknown_error`}function Hc(e){return e._sentryRootSpan||e}function Uc(){Ic||=(ss((()=>{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.")})),!0)}var Wc=`production`;function Gc(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=$s({environment:n.environment||Wc,release:n.release,public_key:r,trace_id:e});return t.emit(`createDsc`,i),i}function Kc(e){let t=Ac();if(!t)return{};let n=Hc(e),r=n._frozenDsc;if(r)return r;let i=n.spanContext().traceState,a=i&&i.get(`sentry.dsc`),o=a&&Pc(a);if(o)return o;let s=Gc(e.spanContext().traceId,t),c=Bc(n),l=c.data||{},u=l[`sentry.sample_rate`];u!=null&&(s.sample_rate=`${u}`);let d=l[`sentry.source`],f=c.description;return d!==`url`&&f&&(s.transaction=f),function(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=Ac(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||`tracesSampleRate`in n||`tracesSampler`in n)}()&&(s.sampled=String(function(e){let{traceFlags:t}=e.spanContext();return t===1}(n))),t.emit(`createDsc`,s,n),s}var qc=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Jc(e,t=!1){let{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 Yc(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function Xc(e){let t=typeof e==`string`?function(e){let t=qc.exec(e);if(!t)return void ss((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return Yc({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}(e):Yc(e);if(t&&function(e){if(!is)return!0;let{port:t,projectId:n,protocol:r}=e;return!([`protocol`,`publicKey`,`host`,`projectId`].find((t=>!e[t]&&(z.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return e===`http`||e===`https`}(r)?t&&isNaN(parseInt(t,10))&&(z.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(z.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(z.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function Zc(e,t=100,n=1/0){try{return $c(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Qc(e,t=3,n=102400){let r=Zc(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?Qc(e,t-1,n):r;var i}function $c(e,t,n=1/0,r=1/0,i=function(){let e=typeof WeakSet==`function`,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=function(e,t){try{if(e===`domain`&&t&&typeof t==`object`&&t._events)return`[Domain]`;if(e===`domainEmitter`)return`[DomainEmitter]`;if(typeof global<`u`&&t===global)return`[Global]`;if(typeof window<`u`&&t===window)return`[Window]`;if(typeof document<`u`&&t===document)return`[Document]`;if(Rs(t))return`[VueViewModel]`;if(Ps(n=t)&&`nativeEvent`in n&&`preventDefault`in n&&`stopPropagation`in n)return`[SyntheticEvent]`;if(typeof t==`number`&&!Number.isFinite(t))return`[${t}]`;if(typeof t==`function`)return`[Function: ${ps(t)}]`;if(typeof t==`symbol`)return`[${String(t)}]`;if(typeof t==`bigint`)return`[BigInt: ${String(t)}]`;let r=function(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:`null prototype`}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!s.startsWith(`[object `))return s;if(t.__sentry_skip_normalization__)return t;let 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 ~]`;let l=t;if(l&&typeof l.toJSON==`function`)try{return $c(``,l.toJSON(),c-1,r,i)}catch{}let u=Array.isArray(t)?[]:{},d=0,f=Xs(t);for(let e in f){if(!Object.prototype.hasOwnProperty.call(f,e))continue;if(d>=r){u[e]=`[MaxProperties ~]`;break}let t=f[e];u[e]=$c(e,t,c-1,r,i),d++}return o(t),u}function el(e,t=[]){return[e,t]}function tl(e,t){let[n,r]=e;return[n,[...r,t]]}function nl(e,t){let n=e[1];for(let e of n)if(t(e,e[0].type))return!0;return!1}function rl(e){return ns.__SENTRY__&&ns.__SENTRY__.encodePolyfill?ns.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function il(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[rl(r),e]:r.push(typeof e==`string`?rl(e):e)}for(let e of n){let[t,n]=e;if(i(`\n${JSON.stringify(t)}\n`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(Zc(n))}i(e)}}return typeof r==`string`?r:function(e){let t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}(r)}function al(e){let t=typeof e.data==`string`?rl(e.data):e.data;return[$s({type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var ol={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 sl(e){return ol[e]}function cl(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function ll(e,t,n,r){let i=cl(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;(function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])})(e,n&&n.sdk);let o=function(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Jc(r)},...i&&{trace:$s({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,el(o,[[{type:a},e]])}function ul(e,t,n,r=0){return new fc(((i,a)=>{let o=e[r];if(t===null||typeof o!=`function`)i(t);else{let s=o({...t},n);es&&o.id&&s===null&&z.log(`Event processor "${o.id}" dropped event`),Is(s)?s.then((t=>ul(e,t,n,r+1).then(i))).then(null,a):ul(e,s,n,r+1).then(i).then(null,a)}}))}var dl,fl,pl;function ml(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;(function(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t,c=$s(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});let l=$s(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});let u=$s(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});let d=$s(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)})(e,t),r&&function(e,t){e.contexts={trace:Lc(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Kc(t),...e.sdkProcessingMetadata};let n=Bc(Hc(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,a)}function hl(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:f,transactionName:p,span:m}=t;gl(e,`extra`,n),gl(e,`tags`,r),gl(e,`user`,i),gl(e,`contexts`,a),e.sdkProcessingMetadata=_c(e.sdkProcessingMetadata,s,2),o&&(e.level=o),p&&(e.transactionName=p),m&&(e.span=m),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function gl(e,t,n){e[t]=_c(e[t],n,1)}function _l(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||rc(),timestamp:t.timestamp||tc()},l=n.integrations||e.integrations.map((e=>e.name));(function(e,t){let{environment:n,release:r,dist:i,maxValueLength:a=250}=t;e.environment=e.environment||n||Wc,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i),e.message&&=Hs(e.message,a);let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=Hs(o.value,a));let s=e.request;s&&s.url&&(s.url=Hs(s.url,a))})(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&function(e,t){let n=function(e){let t=ns._sentryDebugIds;if(!t)return{};let n=Object.keys(t);return pl&&n.length===fl||(fl=n.length,pl=n.reduce(((n,r)=>{dl||={};let i=dl[r];if(i)n[i[0]]=i[1];else{let i=e(r);for(let e=i.length-1;e>=0;e--){let a=i[e],o=a&&a.filename,s=t[r];if(o&&s){n[o]=s,dl[r]=[o,s];break}}}return n}),{})),pl}(t);try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{n&&e.filename&&(e.debug_id=n[e.filename])}))}))}catch{}}(c,e.stackParser);let u=function(e,t){if(!t)return e;let n=e?e.clone():new xc;return n.update(t),n}(r,n.captureContext);n.mechanism&&sc(c,n.mechanism);let d=i?i.getEventProcessors():[],f=rs(`globalScope`,(()=>new xc)).getScopeData();a&&hl(f,a.getScopeData()),u&&hl(f,u.getScopeData());let p=[...n.attachments||[],...f.attachments];return p.length&&(n.attachments=p),ml(c,f),ul([...d,...f.eventProcessors],c,n).then((e=>(e&&function(e){let t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})}))}(e),typeof o==`number`&&o>0?function(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:Zc(e.data,t,n)}})))},...e.user&&{user:Zc(e.user,t,n)},...e.contexts&&{contexts:Zc(e.contexts,t,n)},...e.extra&&{extra:Zc(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Zc(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:Zc(e.data,t,n)}})))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=Zc(e.contexts.flags,3,n)),r}(e,o,s):e)))}function vl(e){if(e)return function(e){return e instanceof xc||typeof e==`function`}(e)||function(e){return Object.keys(e).some((e=>yl.includes(e)))}(e)?{captureContext:e}:e}var yl=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`requestSession`,`propagationContext`];function bl(e,t){return Oc().captureEvent(e,t)}function xl(e){let t=Ac(),n=kc(),r=Oc(),{release:i,environment:a=Wc}=t&&t.getOptions()||{},{userAgent:o}=ns.navigator||{},s=pc({release:i,environment:a,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession();return c&&c.status===`ok`&&mc(c,{status:`exited`}),Sl(),n.setSession(s),r.setSession(s),s}function Sl(){let e=kc(),t=Oc(),n=t.getSession()||e.getSession();n&&function(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),mc(e,n)}(n),Cl(),e.setSession(),t.setSession()}function Cl(){let e=kc(),t=Oc(),n=Ac(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function wl(e=!1){e?Sl():Cl()}function Tl(e,t,n){return t||`${function(e){return`${function(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}var El=[];function Dl(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Ol(e,t,n){if(n[t.name])es&&z.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,El.indexOf(t.name)===-1&&typeof t.setupOnce==`function`&&(t.setupOnce(),El.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,((t,r)=>n(t,r,e)))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}es&&z.log(`Integration installed: ${t.name}`)}}var kl=class extends Error{constructor(e,t=`warn`){super(e),this.message=e,this.logLevel=t}},Al=`Not capturing exception because it's already been captured.`,jl=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Xc(e.dsn):es&&z.warn(`No DSN provided, client will not send events.`),this._dsn){let t=Tl(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}let t=[`enableTracing`,`tracesSampleRate`,`tracesSampler`].find((t=>t in e&&e[t]==null));t&&ss((()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(e,t,n){let r=rc();if(cc(e))return es&&z.log(Al),r;let i={event_id:r,...t};return this._process(this.eventFromException(e,i).then((e=>this._captureEvent(e,i,n)))),i.event_id}captureMessage(e,t,n,r){let i={event_id:rc(),...n},a=Ms(e)?e:String(e),o=Ns(e)?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(o.then((e=>this._captureEvent(e,i,r)))),i.event_id}captureEvent(e,t,n){let r=rc();if(t&&t.originalException&&cc(t.originalException))return es&&z.log(Al),r;let i={event_id:r,...t},a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,a||n)),i.event_id}captureSession(e){typeof e.release==`string`?(this.sendSession(e),mc(e,{init:!1})):es&&z.warn(`Discarded session because of missing or non-string release`)}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.emit(`flush`),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):uc(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit(`close`),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith(`Spotlight`))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];Ol(this,e,this._integrations),t||Dl(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=ll(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=tl(n,al(e));let r=this.sendEnvelope(n);r&&r.then((t=>this.emit(`afterSendEvent`,e,t)),null)}sendSession(e){let t=function(e,t,n,r){let i=cl(n);return el({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Jc(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=typeof n==`number`?n:1,i=`${e}:${t}`;es&&z.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,t){let n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{let e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(es&&z.error(`Error while sending envelope:`,e),e))):(es&&z.error(`Transport disabled`),uc({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=function(e,t){let n={};return t.forEach((t=>{t&&Ol(e,t,n)})),n}(this,e),Dl(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;for(let e of i){let t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(mc(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new fc((t=>{let n=0,r=setInterval((()=>{this._numProcessing==0?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&this._transport!==void 0}_prepareEvent(e,t,n=Oc(),r=kc()){let i=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a.length>0&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),_l(i,e,t,n,this,r).then((e=>e===null?e:(e.contexts={trace:jc(n),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:function(e,t){let n=t.getPropagationContext();return n.dsc||Gc(n.traceId,e)}(this,n),...e.sdkProcessingMetadata},e)))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{es&&(e instanceof kl&&e.logLevel===`log`?z.log(e.message):z.warn(e))}))}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,a=Nl(e),o=Ml(e),s=e.type||`error`,c=`before send for type \`${s}\``,l=i===void 0?void 0:function(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t;es&&z.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}(i);if(o&&typeof l==`number`&&Math.random()>l)return this.recordDroppedEvent(`sample_rate`,`error`,e),dc(new kl(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,`log`));let u=s===`replay_event`?`replay`:s,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then((n=>{if(n===null)throw this.recordDroppedEvent(`event_processor`,u,e),new kl("An event processor returned `null`, will not send event.",`log`);return t.data&&!0===t.data.__sentry__?n:function(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Is(e))return e.then((e=>{if(!Ps(e)&&e!==null)throw new kl(n);return e}),(e=>{throw new kl(`${t} rejected with ${e}`)}));if(!Ps(e)&&e!==null)throw new kl(n);return e}(function(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,beforeSendSpan:o}=t;if(Ml(n)&&i)return i(n,r);if(Nl(n)){if(n.spans&&o){let t=[];for(let r of n.spans){let n=o(r);n?t.push(n):(Uc(),e.recordDroppedEvent(`before_send`,`span`))}n.spans=t}if(a){if(n.spans){let e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(n,r)}}return n}(this,r,n,t),c)})).then((r=>{if(r===null){if(this.recordDroppedEvent(`before_send`,u,e),a){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw new kl(`${c} returned \`null\`, will not send event.`,`log`)}let i=n&&n.getSession();if(!a&&i&&this._updateSessionFromEvent(i,r),a){let e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let o=r.transaction_info;return a&&o&&r.transaction!==e.transaction&&(r.transaction_info={...o,source:`custom`}),this.sendEvent(r,t),r})).then(null,(e=>{throw e instanceof kl?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new kl(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}}))}_flushOutcomes(){es&&z.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0)return void(es&&z.log(`No outcomes to send`));if(!this._dsn)return void(es&&z.log(`No dsn provided, will not send outcomes`));es&&z.log(`Sending outcomes:`,e);let t=(n=e,el((r=this._options.tunnel&&Jc(this._dsn))?{dsn:r}:{},[[{type:`client_report`},{timestamp:i||tc(),discarded_events:n}]]));var n,r,i;this.sendEnvelope(t)}};function Ml(e){return e.type===void 0}function Nl(e){return e.type===`transaction`}function Pl(e){let t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(e===void 0||t.length<e))return dc(new kl(`Not adding Promise because buffer limit was reached.`));let i=r();return t.indexOf(i)===-1&&t.push(i),i.then((()=>n(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(e){return new fc(((n,r)=>{let i=t.length;if(!i)return n(!0);let a=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{uc(e).then((()=>{--i||(clearTimeout(a),n(!0))}),r)}))}))}}}function Fl(e,{statusCode:t,headers:n},r=Date.now()){let i={...e},a=n&&n[`x-sentry-rate-limits`],o=n&&n[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=1e3*(isNaN(o)?60:o);if(n)for(let e of n.split(`;`))e===`metric_bucket`&&a&&!a.split(`;`).includes(`custom`)||(i[e]=r+s);else i.all=r+s}else o?i.all=r+function(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(o,r):t===429&&(i.all=r+6e4);return i}function Il(e,t,n=Pl(e.bufferSize||64)){let r={};return{send:function(i){let a=[];if(nl(i,((t,n)=>{let i=sl(n);if(function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)){let r=Ll(t,n);e.recordDroppedEvent(`ratelimit_backoff`,i,r)}else a.push(t)})),a.length===0)return uc({});let o=el(i[0],a),s=t=>{nl(o,((n,r)=>{let i=Ll(n,r);e.recordDroppedEvent(t,sl(r),i)}))};return n.add((()=>t({body:il(o)}).then((e=>(e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&es&&z.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Fl(r,e),e)),(e=>{throw s(`network_error`),e})))).then((e=>e),(e=>{if(e instanceof kl)return es&&z.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),uc({});throw e}))},flush:e=>n.drain(e)}}function Ll(e,t){if(t===`event`||t===`transaction`)return Array.isArray(e)?e[1]:void 0}var Rl=100;function zl(e,t){let n=Ac(),r=kc();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Rl}=n.getOptions();if(a<=0)return;let o={timestamp:tc(),...e},s=i?ss((()=>i(o,t))):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var Bl,Vl=new WeakMap,Hl=()=>({name:`FunctionToString`,setupOnce(){Bl=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Ys(this),n=Vl.has(Ac())&&t!==void 0?t:this;return Bl.apply(n,e)}}catch{}},setup(e){Vl.set(e,!0)}}),Ul=[/^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+$/],Wl=(e={})=>({name:`InboundFilters`,processEvent(t,n,r){return function(e,t){return t.ignoreInternal&&function(e){try{return e.exception.values[0].type===`SentryError`}catch{}return!1}(e)?(es&&z.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${ac(e)}`),!0):function(e,t){return e.type||!t||!t.length?!1:function(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}(e).some((e=>Gs(e,t)))}(e,t.ignoreErrors)?(es&&z.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${ac(e)}`),!0):function(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&e.type!==`Error`||e.value))}(e)?(es&&z.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${ac(e)}`),!0):function(e,t){if(e.type!==`transaction`||!t||!t.length)return!1;let n=e.transaction;return!!n&&Gs(n,t)}(e,t.ignoreTransactions)?(es&&z.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${ac(e)}`),!0):function(e,t){if(!t||!t.length)return!1;let n=Gl(e);return!!n&&Gs(n,t)}(e,t.denyUrls)?(es&&z.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${ac(e)}.\nUrl: ${Gl(e)}`),!0):function(e,t){if(!t||!t.length)return!0;let n=Gl(e);return!n||Gs(n,t)}(e,t.allowUrls)?!1:(es&&z.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${ac(e)}.\nUrl: ${Gl(e)}`),!0)}(t,function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Ul],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal===void 0||e.ignoreInternal}}(e,r.getOptions()))?null:t}});function Gl(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}(t):null}catch{return es&&z.error(`Cannot extract url for event ${ac(e)}`),null}}function Kl(e,t,n=250,r,i,a,o){if(!(a.exception&&a.exception.values&&o&&Ls(o.originalException,Error)))return;let s=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;var c,l;s&&(a.exception.values=(c=ql(e,t,i,o.originalException,r,a.exception.values,s,0),l=n,c.map((e=>(e.value&&=Hs(e.value,l),e)))))}function ql(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(Ls(r[i],Error)){Jl(o,s);let a=e(t,r[i]),l=c.length;Yl(a,i,l,s),c=ql(e,t,n,r[i],i,[a,...c],a,l)}return Array.isArray(r.errors)&&r.errors.forEach(((r,a)=>{if(Ls(r,Error)){Jl(o,s);let l=e(t,r),u=c.length;Yl(l,`errors[${a}]`,u,s),c=ql(e,t,n,r,i,[l,...c],l,u)}})),c}function Jl(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 Yl(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 Xl(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let 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 Zl(){`console`in ns&&as.forEach((function(e){e in ns.console&&Ks(ns.console,e,(function(t){return os[e]=t,function(...t){ys(`console`,{args:t,level:e});let n=os[e];n&&n.apply(ns.console,t)}}))}))}function Ql(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var $l=()=>{let e;return{name:`Dedupe`,processEvent(t){if(t.type)return t;try{if(function(e,t){return t?!!(function(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!tu(e,t)||!eu(e,t))}(e,t)||function(e,t){let n=nu(t),r=nu(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!tu(e,t)||!eu(e,t))}(e,t)):!1}(t,e))return es&&z.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}};function eu(e,t){let n=ms(e),r=ms(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function tu(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 nu(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ru(e){return e===void 0?void 0:e>=400&&e<500?`warning`:e>=500?`error`:void 0}var iu=ns;function au(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function ou(){if(typeof EdgeRuntime==`string`)return!0;if(!function(){if(!(`fetch`in iu))return!1;try{return new Headers,new Request(`http://www.example.com`),new Response,!0}catch{return!1}}())return!1;if(au(iu.fetch))return!0;let e=!1,t=iu.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=au(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){is&&z.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function su(e,t){let n=`fetch`;_s(n,e),vs(n,(()=>function(e,t=!1){t&&!ou()||Ks(ns,`fetch`,(function(t){return function(...n){let r=Error(),{method:i,url:a}=function(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:lu(t),method:cu(n,`method`)?String(n.method).toUpperCase():`GET`}}let t=e[0];return{url:lu(t),method:cu(t,`method`)?String(t.method).toUpperCase():`GET`}}(n),o={args:n,fetchData:{method:i,url:a},startTimestamp:1e3*nc(),virtualError:r};return e||ys(`fetch`,{...o}),t.apply(ns,n).then((async t=>(e?e(t):ys(`fetch`,{...o,endTimestamp:1e3*nc(),response:t}),t)),(e=>{throw ys(`fetch`,{...o,endTimestamp:1e3*nc(),error:e}),Ds(e)&&e.stack===void 0&&(e.stack=r.stack,qs(e,`framesToPop`,1)),e}))}}))}(void 0,t)))}function cu(e,t){return!!e&&typeof e==`object`&&!!e[t]}function lu(e){return typeof e==`string`?e:e?cu(e,`url`)?e.url:e.toString?e.toString():``:``}var uu=ns,du=ns,fu=0;function pu(){return fu>0}function mu(e,t={}){if(!function(e){return typeof e==`function`}(e))return e;try{let t=e.__sentry_wrapped__;if(t)return typeof t==`function`?t:e;if(Ys(e))return e}catch{return e}let n=function(...n){try{let r=n.map((e=>mu(e,t)));return e.apply(this,r)}catch(e){throw fu++,setTimeout((()=>{fu--})),function(...e){let t=Dc(ws());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}((r=>{var i,a;r.addEventProcessor((e=>(t.mechanism&&(oc(e,void 0,void 0),sc(e,t.mechanism)),e.extra={...e.extra,arguments:n},e))),i=e,Oc().captureException(i,vl(a))})),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}Js(n,e),qs(e,`__sentry_wrapped__`,n);try{Object.getOwnPropertyDescriptor(n,`name`).configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}var hu=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function gu(e,t){let n=yu(e,t),r={type:Su(t),value:Cu(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function _u(e,t,n,r){let i=Ac(),a=i&&i.getOptions().normalizeDepth,o=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}(t),s={__serialized__:Qc(t,a)};if(o)return{exception:{values:[gu(e,o)]},extra:s};let c={exception:{values:[{type:Fs(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:Eu(t,{isUnhandledRejection:r})}]},extra:s};if(n){let t=yu(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function vu(e,t){return{exception:{values:[gu(e,t)]}}}function yu(e,t){let n=t.stacktrace||t.stack||``,r=function(e){return e&&bu.test(e.message)?1:0}(t),i=function(e){return typeof e.framesToPop==`number`?e.framesToPop:0}(t);try{return e(n,r,i)}catch{}return[]}var bu=/Minified React error #\d+;/i;function xu(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function Su(e){let 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 Cu(e){let 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 wu(e,t,n,r,i){let a;if(ks(t)&&t.error)return vu(e,t.error);if(As(t)||Os(t,`DOMException`)){let i=t;if(`stack`in t)a=vu(e,t);else{let t=i.name||(As(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=Tu(e,o,n,r),oc(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return Ds(t)?vu(e,t):Ps(t)||Fs(t)?(a=_u(e,t,n,i),sc(a,{synthetic:!0}),a):(a=Tu(e,t,n,r),oc(a,`${t}`,void 0),sc(a,{synthetic:!0}),a)}function Tu(e,t,n,r){let i={};if(r&&n){let r=yu(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),sc(i,{synthetic:!0})}if(Ms(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function Eu(e,{isUnhandledRejection:t}){let n=function(e,t=40){let n=Object.keys(Xs(e));n.sort();let r=n[0];if(!r)return`[object has no keys]`;if(r.length>=t)return Hs(r,t);for(let e=n.length;e>0;e--){let r=n.slice(0,e).join(`, `);if(!(r.length>t))return e===n.length?r:Hs(r,t)}return``}(e),r=t?`promise rejection`:`exception`;return ks(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Fs(e)?`Event \`${function(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}var Du=class extends jl{constructor(e){let t={parentSpanIsAlwaysRootSpan:!0,...e};(function(e,t,n=[t],r=`npm`){let i=e._metadata||{};i.sdk||={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:ts}))),version:ts},e._metadata=i})(t,`browser`,[`browser`],du.SENTRY_SDK_SOURCE||`npm`),super(t),t.sendClientReports&&du.document&&du.document.addEventListener(`visibilitychange`,(()=>{du.document.visibilityState===`hidden`&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){let i=wu(e,t,n&&n.syntheticException||void 0,r);return sc(i),i.level=`error`,n&&n.event_id&&(i.event_id=n.event_id),uc(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return function(e,t,n=`info`,r,i){let a=Tu(e,t,r&&r.syntheticException||void 0,i);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),uc(a)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(hu&&z.warn(`SDK not enabled, will not capture user feedback.`));let t=function(e,{metadata:t,tunnel:n,dsn:r}){return el({event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Jc(r)}},[function(e){return[{type:`user_report`},e]}(e)])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n)}},Ou=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,ku=ns,Au,ju,Mu,Nu;function Pu(){if(!ku.document)return;let e=ys.bind(null,`dom`),t=Fu(e,!0);ku.document.addEventListener(`click`,t,!1),ku.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach((t=>{let n=ku[t],r=n&&n.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty(`addEventListener`)&&(Ks(r,`addEventListener`,(function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=Fu(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}})),Ks(r,`removeEventListener`,(function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}})))}))}function Fu(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return e===`keypress`&&(!t||!t.tagName||t.tagName!==`INPUT`&&t.tagName!==`TEXTAREA`&&!t.isContentEditable)}(n.type,r))return;qs(n,`_sentryCaptured`,!0),r&&!r._sentryId&&qs(r,`_sentryId`,rc());let i=n.type===`keypress`?`input`:n.type;(function(e){if(e.type!==ju)return!1;try{if(!e.target||e.target._sentryId!==Mu)return!1}catch{}return!0})(n)||(e({event:n,name:i,global:t}),ju=n.type,Mu=r?r._sentryId:void 0),clearTimeout(Au),Au=ku.setTimeout((()=>{Mu=void 0,ju=void 0}),1e3)}}function Iu(e){let t=`history`;_s(t,e),vs(t,Lu)}function Lu(){if(!function(){let e=uu.chrome,t=e&&e.app&&e.app.runtime,n=`history`in uu&&!!uu.history.pushState&&!!uu.history.replaceState;return!t&&n}())return;let e=ku.onpopstate;function t(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let e=Nu,t=String(n);Nu=t,ys(`history`,{from:e,to:t})}return e.apply(this,t)}}ku.onpopstate=function(...t){let n=ku.location.href,r=Nu;if(Nu=n,ys(`history`,{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},Ks(ku.history,`pushState`,t),Ks(ku.history,`replaceState`,t)}var Ru={};function zu(e){Ru[e]=void 0}var Bu=`__sentry_xhr_v3__`;function Vu(){if(!ku.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=1e3*nc(),a=js(n[0])?n[0].toUpperCase():void 0,o=function(e){if(js(e))return e;try{return e.toString()}catch{}}(n[1]);if(!a||!o)return e.apply(t,n);t[Bu]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[Bu];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}ys(`xhr`,{endTimestamp:1e3*nc(),startTimestamp:i,xhr:t,virtualError:r})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(s(),e.apply(t,n))}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[Bu];return a&&js(r)&&js(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[Bu];return r?(n[0]!==void 0&&(r.body=n[0]),ys(`xhr`,{startTimestamp:1e3*nc(),xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function Hu(e,t=function(e){let t=Ru[e];if(t)return t;let n=ku[e];if(au(n))return Ru[e]=n.bind(ku);let r=ku.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){Ou&&z.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(Ru[e]=n.bind(ku))}(`fetch`)){let n=0,r=0;return Il(e,(function(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return zu(`fetch`),dc(`No fetch implementation available`);try{return t(e.url,o).then((e=>(n-=a,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get(`X-Sentry-Rate-Limits`),"retry-after":e.headers.get(`Retry-After`)}})))}catch(e){return zu(`fetch`),n-=a,r--,dc(e)}}))}function Uu(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?cs:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var Wu=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Gu=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ku=/\((\S*)(?::(\d+))(?::(\d+))\)/,qu=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ju=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Yu=function(...e){let t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0,r=0)=>{let i=[],a=e.split(`
32
- `);for(let e=n;e<a.length;e++){let n=a[e];if(n.length>1024)continue;let o=ls.test(n)?n.replace(ls,`$1`):n;if(!o.match(/\S*Error: /)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=50+r)break}}return function(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ds(t).function||``)&&t.pop(),t.reverse(),us.test(ds(t).function||``)&&(t.pop(),us.test(ds(t).function||``)&&t.pop()),t.slice(0,50).map((e=>({...e,filename:e.filename||ds(t).filename,function:e.function||cs})))}(i.slice(r))}}([30,e=>{let t=Wu.exec(e);if(t){let[,e,n,r]=t;return Uu(e,cs,+n,+r)}let n=Gu.exec(e);if(n){if(n[2]&&n[2].indexOf(`eval`)===0){let e=Ku.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}let[e,t]=Xu(n[1]||cs,n[2]);return Uu(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{let t=qu.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=Ju.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||cs;return[n,e]=Xu(n,e),Uu(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Xu=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?cs:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Zu=1024,Qu=(e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:`Breadcrumbs`,setup(e){var n;t.console&&function(e){let t=`console`;_s(t,e),vs(t,Zl)}(function(e){return function(t){if(Ac()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:Ql(t.level),message:Us(t.args,` `)};if(t.level===`assert`){if(!1!==t.args[0])return;n.message=`Assertion failed: ${Us(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1)}zl(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(Ac()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>Zu&&(hu&&z.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${o} was configured. Sentry will use 1024 instead.`),o=Zu),typeof a==`string`&&(a=[a]);try{let e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=Bs(t,{keyAttrs:a,maxStringLength:o}),i=function(e){if(!zs.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),zl(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),_s(`dom`,n),vs(`dom`,Pu)),t.xhr&&function(e){_s(`xhr`,e),vs(`xhr`,Vu)}(function(e){return function(t){if(Ac()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Bu];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};zl({category:`xhr`,data:l,type:`http`,level:ru(s)},u)}}(e)),t.fetch&&su(function(e){return function(t){if(Ac()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||t.fetchData.method!==`POST`))if(t.error)zl({category:`fetch`,data:t.fetchData,level:`error`,type:`http`},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r});else{let e=t.response,i={...t.fetchData,status_code:e&&e.status},a={input:t.args,response:e,startTimestamp:n,endTimestamp:r};zl({category:`fetch`,data:i,type:`http`,level:ru(i.status_code)},a)}}}(e)),t.history&&Iu(function(e){return function(t){if(Ac()!==e)return;let n=t.from,r=t.to,i=Xl(du.location.href),a=n?Xl(n):void 0,o=Xl(r);a&&a.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),zl({category:`navigation`,data:{from:n,to:r}})}}(e)),t.sentry&&e.on(`beforeSendEvent`,function(e){return function(t){Ac()===e&&zl({category:`sentry.`+(t.type===`transaction`?`transaction`:`event`),event_id:t.event_id,level:t.level,message:ac(t)},{event:t})}}(e))}}},$u=`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`.split(`.`),ed=(e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:`BrowserApiErrors`,setupOnce(){t.setTimeout&&Ks(du,`setTimeout`,td),t.setInterval&&Ks(du,`setInterval`,td),t.requestAnimationFrame&&Ks(du,`requestAnimationFrame`,nd),t.XMLHttpRequest&&`XMLHttpRequest`in du&&Ks(XMLHttpRequest.prototype,`send`,rd);let e=t.eventTarget;e&&(Array.isArray(e)?e:$u).forEach(id)}}};function td(e){return function(...t){let n=t[0];return t[0]=mu(n,{mechanism:{data:{function:ps(e)},handled:!1,type:`instrument`}}),e.apply(this,t)}}function nd(e){return function(t){return e.apply(this,[mu(t,{mechanism:{data:{function:`requestAnimationFrame`,handler:ps(e)},handled:!1,type:`instrument`}})])}}function rd(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach((e=>{e in n&&typeof n[e]==`function`&&Ks(n,e,(function(t){let n={mechanism:{data:{function:e,handler:ps(t)},handled:!1,type:`instrument`}},r=Ys(t);return r&&(n.mechanism.data.handler=ps(r)),mu(t,n)}))})),e.apply(this,t)}}function id(e){let t=du[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty(`addEventListener`)&&(Ks(n,`addEventListener`,(function(t){return function(n,r,i){try{typeof r.handleEvent==`function`&&(r.handleEvent=mu(r.handleEvent,{mechanism:{data:{function:`handleEvent`,handler:ps(r),target:e},handled:!1,type:`instrument`}}))}catch{}return t.apply(this,[n,mu(r,{mechanism:{data:{function:`addEventListener`,handler:ps(r),target:e},handled:!1,type:`instrument`}}),i])}})),Ks(n,`removeEventListener`,(function(e){return function(t,n,r){try{let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch{}return e.call(this,t,n,r)}})))}var ad=()=>({name:`BrowserSession`,setupOnce(){du.document===void 0?hu&&z.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."):(xl({ignoreDuration:!0}),wl(),Iu((({from:e,to:t})=>{e!==void 0&&e!==t&&(xl({ignoreDuration:!0}),wl())})))}}),od=(e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:`GlobalHandlers`,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(function(e){(function(e){let t=`error`;_s(t,e),vs(t,xs)})((t=>{let{stackParser:n,attachStacktrace:r}=cd();if(Ac()!==e||pu())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=function(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[],l=r,u=n,d=js(t)&&t.length>0?t:function(){try{return zs.document.location.href}catch{return``}}();return c.length===0&&c.push({colno:l,filename:d,function:cs,in_app:!0,lineno:u}),e}(wu(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,bl(l,{originalException:c,mechanism:{handled:!1,type:`onerror`}})}))}(e),sd(`onerror`)),t.onunhandledrejection&&(function(e){(function(e){let t=`unhandledrejection`;_s(t,e),vs(t,Cs)})((t=>{let{stackParser:n,attachStacktrace:r}=cd();if(Ac()!==e||pu())return;let i=function(e){if(Ns(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}(t),a=Ns(i)?{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:wu(n,i,void 0,r,!0);a.level=`error`,bl(a,{originalException:i,mechanism:{handled:!1,type:`onunhandledrejection`}})}))}(e),sd(`onunhandledrejection`))}}};function sd(e){hu&&z.log(`Global Handler attached: ${e}`)}function cd(){let e=Ac();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var ld=()=>({name:`HttpContext`,preprocessEvent(e){if(!du.navigator&&!du.location&&!du.document)return;let t=e.request&&e.request.url||du.location&&du.location.href,{referrer:n}=du.document||{},{userAgent:r}=du.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}};e.request={...e.request,...t&&{url:t},headers:i}}}),ud=(e={})=>{let t=e.limit||5,n=e.key||`cause`;return{name:`LinkedErrors`,preprocessEvent(e,r,i){let a=i.getOptions();Kl(gu,a.stackParser,a.maxValueLength,n,t,e,r)}}},dd=`loading`,fd=`loaded`,pd=`joining-meeting`,md=`joined-meeting`,hd=`left-meeting`,gd=`error`,_d=`unknown`,vd=`full`,yd=`base`,bd=`iframe-ready-for-launch-config`,xd=`iframe-launch-config`,Sd=`theme-updated`,Cd=`loading`,wd=`loaded`,Td=`started-camera`,Ed=`camera-error`,Dd=`joining-meeting`,Od=`joined-meeting`,kd=`left-meeting`,Ad=`participant-joined`,jd=`participant-updated`,Md=`participant-left`,Nd=`participant-counts-updated`,Pd=`access-state-updated`,Fd=`meeting-session-summary-updated`,Id=`meeting-session-state-updated`,Ld=`waiting-participant-added`,Rd=`waiting-participant-updated`,zd=`waiting-participant-removed`,Bd=`transcription-started`,Vd=`transcription-stopped`,Hd=`transcription-error`,Ud=`recording-started`,Wd=`recording-stopped`,Gd=`recording-stats`,Kd=`recording-error`,qd=`recording-upload-completed`,Jd=`recording-data`,Yd=`app-message`,Xd=`transcription-message`,Zd=`remote-media-player-started`,Qd=`remote-media-player-updated`,$d=`remote-media-player-stopped`,ef=`local-screen-share-started`,tf=`local-screen-share-stopped`,nf=`local-screen-share-canceled`,rf=`active-speaker-change`,af=`active-speaker-mode-change`,of=`network-quality-change`,sf=`network-connection`,cf=`cpu-load-change`,lf=`face-counts-updated`,uf=`live-streaming-started`,df=`live-streaming-updated`,ff=`live-streaming-stopped`,pf=`live-streaming-error`,mf=`lang-updated`,hf=`receive-settings-updated`,gf=`input-settings-updated`,_f=`nonfatal-error`,vf=`error`,yf=4096,bf=102400,xf=`iframe-call-message`,Sf=`local-screen-start`,Cf=`daily-method-update-live-streaming-endpoints`,wf=`transmit-log`,Tf=`daily-custom-track`,Ef={NONE:`none`,BGBLUR:`background-blur`,BGIMAGE:`background-image`,FACE_DETECTION:`face-detection`},Df={NONE:`none`,NOISE_CANCELLATION:`noise-cancellation`},Of={PLAY:`play`,PAUSE:`pause`},kf=[`jpg`,`png`,`jpeg`],Af=`add-endpoints`,jf=`remove-endpoints`,Mf=`sip-call-transfer`;function Nf(){return!B()&&typeof window<`u`&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:``}function B(){return typeof navigator<`u`&&navigator.product&&navigator.product===`ReactNative`}function Pf(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function Ff(){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}(Kf(),qf())||B())}function If(){if(B()||!document)return!1;var e=document.createElement(`iframe`);return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var Lf=`none`,Rf=`software`,zf=`hardware`,Bf=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?Rf:zf:Lf}catch{return Lf}}();function Vf(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!B()&&Bf!==Lf&&(e?function(){return Gf()?!1:[`Chrome`,`Firefox`].includes(Kf())}():function(){if(Gf())return!1;var e=Kf();if(e===`Safari`){var t=Zf();if(t.major<15||t.major===15&&t.minor<4)return!1}return e===`Chrome`?Jf().major>=77:e===`Firefox`?Qf().major>=97:[`Chrome`,`Firefox`,`Safari`].includes(e)}())}function Hf(){if(B()||Wf()||typeof AudioWorkletNode>`u`)return!1;switch(Kf()){case`Chrome`:case`Firefox`:return!0;case`Safari`:var e=qf();return e.major>17||e.major===17&&e.minor>=4}return!1}function Uf(){return Pf()&&typeof MediaStreamTrack<`u`&&!function(){var e,t=Kf();if(!Nf())return!0;switch(t){case`Chrome`:return(e=Jf()).major&&e.major>0&&e.major<75;case`Firefox`:return(e=Qf()).major<91;case`Safari`:return(e=Zf()).major<13||e.major===13&&e.minor<1;default:return!0}}()}function Wf(){return Nf().match(/Linux; Android/)}function Gf(){var e,t=Nf(),n=t.match(/Mac/)&&(!B()&&typeof window<`u`&&(e=window)!=null&&(e=e.navigator)!=null&&e.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(t.match(/Mobi/)||t.match(/Android/)||n)||!!Nf().match(/DailyAnd\//)||void 0}function Kf(){if(typeof window<`u`){var e=Nf();return Yf()?`Safari`:e.indexOf(`Edge`)>-1?`Edge`:e.match(/Chrome\//)?`Chrome`:e.indexOf(`Safari`)>-1||Xf()?`Safari`:e.indexOf(`Firefox`)>-1?`Firefox`:e.indexOf(`MSIE`)>-1||e.indexOf(`.NET`)>-1?`IE`:`Unknown Browser`}}function qf(){switch(Kf()){case`Chrome`:return Jf();case`Safari`:return Zf();case`Firefox`:return Qf();case`Edge`:return function(){var e=0,t=0;if(typeof window<`u`){var n=Nf().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}()}}function Jf(){var e=0,t=0,n=0,r=0,i=!1;if(typeof window<`u`){var a=Nf(),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 Yf(){return!!Nf().match(/iPad|iPhone|iPod/i)&&Pf()}function Xf(){return Nf().indexOf(`AppleWebKit/605.1.15`)>-1}function Zf(){var e=0,t=0,n=0;if(typeof window<`u`){var r=Nf().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch{}else (Yf()||Xf())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function Qf(){var e=0,t=0;if(typeof window<`u`){var n=Nf().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}var $f=function(){return bo((function e(){_o(this,e)}),[{key:`addListenerForMessagesFromCallMachine`,value:function(e,t,n){Xo()}},{key:`addListenerForMessagesFromDailyJs`,value:function(e,t,n){Xo()}},{key:`sendMessageToCallMachine`,value:function(e,t,n,r){Xo()}},{key:`sendMessageToDailyJs`,value:function(e,t){Xo()}},{key:`removeListener`,value:function(e){Xo()}}])}();function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ep(Object(n),!0).forEach((function(t){To(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ep(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function np(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(np=function(){return!!e})()}var rp=function(){function e(){var t,n,r,i;return _o(this,e),n=this,r=So(r=e),(t=xo(n,np()?Reflect.construct(r,i||[],So(n).constructor):r.apply(n,i)))._wrappedListeners={},t._messageCallbacks={},t}return wo(e,$f),bo(e,[{key:`addListenerForMessagesFromCallMachine`,value:function(e,t,n){var r=this,i=function(i){if(i.data&&i.data.what===`iframe-call-message`&&(!i.data.callClientId||i.data.callClientId===t)&&(!i.data.from||i.data.from!==`module`)){var a=tp({},i.data);if(delete a.from,a.callbackStamp&&r._messageCallbacks[a.callbackStamp]){var o=a.callbackStamp;r._messageCallbacks[o].call(n,a),delete r._messageCallbacks[o]}delete a.what,delete a.callbackStamp,e.call(n,a)}};this._wrappedListeners[e]=i,window.addEventListener(`message`,i)}},{key:`addListenerForMessagesFromDailyJs`,value:function(e,t,n){var r=function(r){var i;if(!(!r.data||r.data.what!==xf||!r.data.action||r.data.from&&r.data.from!==`module`||r.data.callClientId&&t&&r.data.callClientId!==t||r!=null&&(i=r.data)!=null&&i.callFrameId)){var a=r.data;e.call(n,a)}};this._wrappedListeners[e]=r,window.addEventListener(`message`,r)}},{key:`sendMessageToCallMachine`,value:function(e,t,n,r){if(!n)throw Error(`undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?`);var i=tp({},e);if(i.what=xf,i.from=`module`,i.callClientId=n,t){var a=Yo();this._messageCallbacks[a]=t,i.callbackStamp=a}var o=r?r.contentWindow:window,s=this._callMachineTargetOrigin(r);s&&o.postMessage(i,s)}},{key:`sendMessageToDailyJs`,value:function(e,t){e.what=xf,e.callClientId=t,e.from=`embedded`,window.postMessage(e,this._targetOriginFromWindowLocation())}},{key:`removeListener`,value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener(`message`,t),delete this._wrappedListeners[e])}},{key:`forwardPackagedMessageToCallMachine`,value:function(e,t,n){var r=tp({},e);r.callClientId=n;var i=t?t.contentWindow:window,a=this._callMachineTargetOrigin(t);a&&i.postMessage(r,a)}},{key:`addListenerForPackagedMessagesFromCallMachine`,value:function(e,t){var n=function(n){if(n.data&&n.data.what===`iframe-call-message`&&(!n.data.callClientId||n.data.callClientId===t)&&(!n.data.from||n.data.from!==`module`)){var r=n.data;e(r)}};return this._wrappedListeners[e]=n,window.addEventListener(`message`,n),e}},{key:`removeListenerForPackagedMessagesFromCallMachine`,value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener(`message`,t),delete this._wrappedListeners[e])}},{key:`_callMachineTargetOrigin`,value:function(e){return e?e.src?new URL(e.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:`_targetOriginFromWindowLocation`,value:function(){return window.location.protocol===`file:`?`*`:window.location.origin}}])}();function ip(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ap(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(ap=function(){return!!e})()}var op=function(){function e(){var t,n,r,i;return _o(this,e),n=this,r=So(r=e),t=xo(n,ap()?Reflect.construct(r,i||[],So(n).constructor):r.apply(n,i)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new Mo.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new Mo.EventEmitter,t._wrappedListeners={},t._messageCallbacks={},t}return wo(e,$f),bo(e,[{key:`addListenerForMessagesFromCallMachine`,value:function(e,t,n){this._addListener(e,global.callMachineToDailyJsEmitter,t,n,`received call machine message`)}},{key:`addListenerForMessagesFromDailyJs`,value:function(e,t,n){this._addListener(e,global.dailyJsToCallMachineEmitter,t,n,`received daily-js message`)}},{key:`sendMessageToCallMachine`,value:function(e,t,n){this._sendMessage(e,global.dailyJsToCallMachineEmitter,n,t,`sending message to call machine`)}},{key:`sendMessageToDailyJs`,value:function(e,t){this._sendMessage(e,global.callMachineToDailyJsEmitter,t,null,`sending message to daily-js`)}},{key:`removeListener`,value:function(e){var t=this._wrappedListeners[e];t&&(global.callMachineToDailyJsEmitter.removeListener(`message`,t),global.dailyJsToCallMachineEmitter.removeListener(`message`,t),delete this._wrappedListeners[e])}},{key:`_addListener`,value:function(e,t,n,r,i){var a=this,o=function(t){if(t.callClientId===n){if(t.callbackStamp&&a._messageCallbacks[t.callbackStamp]){var i=t.callbackStamp;a._messageCallbacks[i].call(r,t),delete a._messageCallbacks[i]}e.call(r,t)}};this._wrappedListeners[e]=o,t.addListener(`message`,o)}},{key:`_sendMessage`,value:function(e,t,n,r,i){var a=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ip(Object(n),!0).forEach((function(t){To(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ip(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);if(a.callClientId=n,r){var o=Yo();this._messageCallbacks[o]=r,a.callbackStamp=o}t.emit(`message`,a)}}])}(),sp=`replace`,cp=`shallow-merge`,lp=[sp,cp],up=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.data,r=t.mergeStrategy,i=r===void 0?sp:r;_o(this,e),e._validateMergeStrategy(i),e._validateData(n,i),this.mergeStrategy=i,this.data=n}return bo(e,[{key:`isNoOp`,value:function(){return e.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:`isNoOpUpdate`,value:function(e,t){return Object.keys(e).length===0&&t===cp}},{key:`_validateMergeStrategy`,value:function(e){if(!lp.includes(e))throw Error(`Unrecognized mergeStrategy provided. Options are: [${lp}]`)}},{key:`_validateData`,value:function(e,t){if(!function(e){if(e==null||I(e)!==`object`)return!1;var t=Object.getPrototypeOf(e);return t==null||t===Object.prototype}(e))throw Error(`Meeting session data must be a plain (map-like) object`);var n;try{if(n=JSON.stringify(e),t===sp){var r=JSON.parse(n);Io(r,e)||console.warn(`The meeting session data provided will be modified when serialized.`,r,e)}else if(t===cp){for(var i in e)if(Object.hasOwnProperty.call(e,i)&&e[i]!==void 0){var a=JSON.parse(JSON.stringify(e[i]));Io(e[i],a)||console.warn(`At least one key in the meeting session data provided will be modified when serialized.`,a,e[i])}}}catch(e){throw Error(`Meeting session data must be serializable to JSON: ${e}`)}if(n.length>bf)throw Error(`Meeting session data is too large (${n.length} characters). Maximum size suppported is ${bf}.`)}}])}();function dp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(dp=function(){return!!e})()}function fp(e){var t=typeof Map==`function`?new Map:void 0;return fp=function(e){if(e===null||!function(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(dp())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&Co(i,n.prototype),i}(e,arguments,So(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Co(n,e)},fp(e)}function pp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(pp=function(){return!!e})()}function mp(e){var t=window._daily?.pendings;if(t){var n=t.indexOf(e);n!==-1&&t.splice(n,1)}}var hp=function(){return bo((function e(t){_o(this,e),this._currentLoad=null,this._callClientId=t,this._publicPath=null}),[{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(),window._daily.instances[this._callClientId].publicPath=this._publicPath,void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new gp(n,(function(e){var n=e.substring(0,e.lastIndexOf(`/`));n.length&&n.slice(-1)!==`/`&&(n+=`/`),t._publicPath=n,window._daily.instances[t._callClientId].publicPath=n,r(!1)}),(function(e,n){n||mp(t._callClientId),i(e,n)})),this._currentLoad.start()}},{key:`cancel`,value:function(){this._currentLoad&&this._currentLoad.cancel(),mp(this._callClientId)}},{key:`loaded`,get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])}(),gp=function(){return bo((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;_o(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 yp(e._dailyConfig,e._successCallback,t),e._currentAttempt.start())}),3e3))};this._currentAttempt=new yp(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}}])}(),_p=function(){function e(){return _o(this,e),t=this,r=arguments,n=So(n=e),xo(t,pp()?Reflect.construct(n,r||[],So(t).constructor):n.apply(t,r));var t,n,r}return wo(e,fp(Error)),bo(e)}(),vp=2e4,yp=function(){return bo((function e(t,n,r){_o(this,e),this._loadAttemptImpl=B()||!t.avoidEval?new bp(t,n,r):new xp(t,n,r)}),[{key:`start`,value:(e=L((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}(),bp=function(){return bo((function e(t,n,r){_o(this,e),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache=typeof iOSCallObjectBundleCache<`u`&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r}),[{key:`start`,value:(r=L((function*(){var e=Qo(this._dailyConfig);!(yield this._tryLoadFromIOSCache(e))&&this._loadFromNetwork(e)})),function(){return r.apply(this,arguments)})},{key:`cancel`,value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:`_tryLoadFromIOSCache`,value:(n=L((function*(e){if(!this._iosCache)return!1;try{var t=yield this._iosCache.get(e);return!!this.cancelled||!!t&&(t.code?(Function(`"use strict";`+t.code)(),this.succeeded=!0,this._successCallback(e),!0):(this._refetchHeaders=t.refetchHeaders,!1))}catch{return!1}})),function(e){return n.apply(this,arguments)})},{key:`_loadFromNetwork`,value:(t=L((function*(e){var t=this;this._networkTimeout=setTimeout((function(){t._networkTimedOut=!0,t._failureCallback({msg:`Timed out (>${vp} ms) when loading call object bundle ${e}`,type:`timeout`})}),vp);try{var n=this._refetchHeaders?{headers:this._refetchHeaders}:{},r=yield fetch(e,n);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new _p;var i=yield this._getBundleCodeFromResponse(e,r);if(this.cancelled)throw new _p;Function(`"use strict";`+i)(),this._iosCache&&this._iosCache.set(e,i,r.headers),this.succeeded=!0,this._successCallback(e)}catch(t){if(clearTimeout(this._networkTimeout),t instanceof _p||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:`Failed to load call object bundle ${e}: ${t}`,type:t.message})}})),function(e){return t.apply(this,arguments)})},{key:`_getBundleCodeFromResponse`,value:(e=L((function*(e,t){if(t.ok)return yield t.text();if(this._iosCache&&t.status===304)return(yield this._iosCache.renew(e,t.headers)).code;throw Error(`Received ${t.status} response`)})),function(t,n){return e.apply(this,arguments)})}]);var e,t,n,r}(),xp=function(){return bo((function e(t,n,r){_o(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r,this._attemptId=Yo(),this._networkTimeout=null,this._scriptElement=null}),[{key:`start`,value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=Qo(this._dailyConfig);(typeof document>`u`?`undefined`:I(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 (>${vp} ms) when loading call object bundle ${e}`,type:`timeout`})}),vp);var n=document.getElementsByTagName(`head`)[0],r=document.createElement(`script`);this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback(e)},r.onerror=function(e){t._stopLoading(),t._failureCallback({msg:`Failed to load call object bundle ${e.target.src}`,type:e.message})},r.src=e,n.appendChild(r)}},{key:`_stopLoading`,value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:`_signUpForCallMachineLoadWaitlist`,value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:`_withdrawFromCallMachineLoadWaitlist`,value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}])}(),Sp=function(e,t,n){return!0===Tp(e.local,t,n)},Cp=function(e,t,n){return e.local.streams&&e.local.streams[t]&&e.local.streams[t].stream&&e.local.streams[t].stream[`get${n===`video`?`Video`:`Audio`}Tracks`]()[0]},wp=function(e,t,n,r){var i=Ep(e,t,n,r);return i&&i.pendingTrack},Tp=function(e,t,n){if(!e)return!1;var r=function(e){switch(e){case`avatar`:return!0;case`staged`:return e;default:return!!e}},i=e.public.subscribedTracks;return i&&i[t]?[`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)},Ep=function(e,t,n,r){var i=Object.values(e.streams||{}).filter((function(e){return e.participantId===t&&e.type===n&&e.pendingTrack&&e.pendingTrack.kind===r})).sort((function(e,t){return new Date(t.starttime)-new Date(e.starttime)}));return i&&i[0]},Dp=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function Op(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${c.charAt(0).toUpperCase()+c.slice(1)}`,u=e.tracks[l];if(u){var d=e.local?Cp(n,a,c):wp(n,e.session_id,a,c);u.state===`playable`&&(u.track=d),u.persistentTrack=d}}}function kp(e,t){try{var n=t.getState();for(var r in e.tracks)if(!Ap(r)){var i=e.tracks[r].kind;if(i){var a=e.tracks[r];if(a){var o=e.local?Dp(n,r):wp(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(e){console.error(e)}}function Ap(e){return[`video`,`audio`,`screenVideo`,`screenAudio`].includes(e)}function jp(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(e){console.error(e)}if(!i)return e.audio=!1,e.audioTrack=!1,e.video=!1,e.videoTrack=!1,e.screen=!1,void(e.screenTrack=!1);try{if(r.streams,e.audio&&Sp(r,e.session_id,`cam-audio`)){var o=wp(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&&Sp(r,e.session_id,`cam-video`)){var s=wp(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&&Sp(r,e.session_id,`screen-audio`)){var c=wp(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&&Sp(r,e.session_id,`screen-video`)){var l=wp(r,e.session_id,`screen`,`video`);l&&(t&&t.screenVideoTrack&&t.screenVideoTrack.id===l.id?e.screenVideoTrack=l:l.muted||(e.screenVideoTrack=l))}e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch(e){console.error(`unexpected error matching up tracks`,e)}}}function Mp(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return Np(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Np(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
33
- 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 e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function Np(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 Pp=new Map,Fp=null;function Ip(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return Lp(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lp(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
34
- 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 e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function Lp(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 Rp=new Map,zp=null;function Bp(e){Hp()?function(e){Pp.has(e)||(Pp.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(t){Pp.has(e)&&(Pp.get(e).lastDevicesString=JSON.stringify(t),Fp||(Fp=function(){var e=L((function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=Mp(Pp.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==Pp.get(r).lastDevicesString&&(Pp.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}}));return function(){return e.apply(this,arguments)}}(),navigator.mediaDevices.addEventListener(`devicechange`,Fp)))})).catch((function(){})))}(e):function(e){Rp.has(e)||(Rp.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(t){Rp.has(e)&&(Rp.get(e).lastDevicesString=JSON.stringify(t),zp||=setInterval(L((function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=Ip(Rp.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==Rp.get(r).lastDevicesString&&(Rp.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}})),3e3))})))}(e)}function Vp(e){Hp()?function(e){Pp.has(e)&&(Pp.delete(e),Pp.size===0&&Fp&&(navigator.mediaDevices.removeEventListener(`devicechange`,Fp),Fp=null))}(e):function(e){Rp.has(e)&&(Rp.delete(e),Rp.size===0&&zp&&(clearInterval(zp),zp=null))}(e)}function Hp(){return B()||navigator.mediaDevices?.ondevicechange!==void 0}var Up=new Set;function Wp(e,t){var n=t.isLocalScreenVideo;return e&&e.readyState===`live`&&!function(e,t){return(!t.isLocalScreenVideo||Kf()!==`Chrome`)&&e.muted&&!Up.has(e.id)}(e,{isLocalScreenVideo:n})}function Gp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Gp(Object(n),!0).forEach((function(t){To(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qp=Object.freeze({VIDEO:`video`,AUDIO:`audio`,SCREEN_VIDEO:`screenVideo`,SCREEN_AUDIO:`screenAudio`,CUSTOM_VIDEO:`customVideo`,CUSTOM_AUDIO:`customAudio`}),Jp=Object.freeze({PARTICIPANTS:`participants`,STREAMING:`streaming`,TRANSCRIPTION:`transcription`}),Yp=Object.values(qp),Xp=[`v`,`a`,`sv`,`sa`,`cv`,`ca`];Object.freeze(Yp.reduce((function(e,t,n){return e[t]=Xp[n],e}),{})),Object.freeze(Xp.reduce((function(e,t,n){return e[t]=Yp[n],e}),{}));var Zp=[qp.VIDEO,qp.AUDIO,qp.SCREEN_VIDEO,qp.SCREEN_AUDIO],Qp=Object.values(Jp),$p=[`p`,`s`,`t`];Object.freeze(Qp.reduce((function(e,t,n){return e[t]=$p[n],e}),{})),Object.freeze($p.reduce((function(e,t,n){return e[t]=Qp[n],e}),{}));var em=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.base,r=t.byUserId,i=t.byParticipantId;_o(this,e),this.base=n,this.byUserId=r,this.byParticipantId=i}return bo(e,[{key:`clone`,value:function(){var t=new e;if(this.base instanceof tm?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 tm?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 tm?a.clone():a}return t}},{key:`toJSONObject`,value:function(){var e={};if(typeof this.base==`boolean`?e.base=this.base:this.base instanceof tm&&(e.base=this.base.toJSONObject()),this.byUserId!==void 0)for(var t in e.byUserId={},this.byUserId){var n=this.byUserId[t];e.byUserId[t]=n instanceof tm?n.toJSONObject():n}if(this.byParticipantId!==void 0)for(var r in e.byParticipantId={},this.byParticipantId){var i=this.byParticipantId[r];e.byParticipantId[r]=i instanceof tm?i.toJSONObject():i}return e}},{key:`toMinifiedJSONObject`,value:function(){var e={};if(this.base!==void 0&&(typeof this.base==`boolean`?e.b=this.base:e.b=this.base.toMinifiedJSONObject()),this.byUserId!==void 0)for(var t in e.u={},this.byUserId){var n=this.byUserId[t];e.u[t]=typeof n==`boolean`?n:n.toMinifiedJSONObject()}if(this.byParticipantId!==void 0)for(var r in e.p={},this.byParticipantId){var i=this.byParticipantId[r];e.p[r]=typeof i==`boolean`?i:i.toMinifiedJSONObject()}return e}},{key:`normalize`,value:function(){return this.base instanceof tm&&(this.base=this.base.normalize()),this.byUserId&&=Object.fromEntries(Object.entries(this.byUserId).map((function(e){var t=Oo(e,2),n=t[0],r=t[1];return[n,r instanceof tm?r.normalize():r]}))),this.byParticipantId&&=Object.fromEntries(Object.entries(this.byParticipantId).map((function(e){var t=Oo(e,2),n=t[0],r=t[1];return[n,r instanceof tm?r.normalize():r]}))),this}}],[{key:`fromJSONObject`,value:function(t){var n,r,i;if(t.base!==void 0&&(n=typeof t.base==`boolean`?t.base:tm.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:tm.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:tm.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:tm.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:tm.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:tm.fromMinifiedJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:`validateJSONObject`,value:function(e){if(I(e)!==`object`)return[!1,`canReceive must be an object`];for(var t=[`base`,`byUserId`,`byParticipantId`],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!t.includes(i))return[!1,`canReceive can only contain keys (${t.join(`, `)})`];if(i===`base`){var a=Oo(tm.validateJSONObject(e.base,!0),2),o=a[0],s=a[1];if(!o)return[!1,s]}else{if(I(e[i])!==`object`)return[!1,`invalid (non-object) value for field '${i}' in canReceive`];for(var c=0,l=Object.values(e[i]);c<l.length;c++){var u=l[c],d=Oo(tm.validateJSONObject(u),2),f=d[0],p=d[1];if(!f)return[!1,p]}}}return[!0]}}])}(),tm=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;_o(this,e),this.video=n,this.audio=r,this.screenVideo=i,this.screenAudio=a,this.customVideo=o,this.customAudio=s}return bo(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=Kp({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=Kp({},this.customAudio)),t}},{key:`toJSONObject`,value:function(){var e={};return this.video!==void 0&&(e.video=this.video),this.audio!==void 0&&(e.audio=this.audio),this.screenVideo!==void 0&&(e.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(e.screenAudio=this.screenAudio),this.customVideo!==void 0&&(e.customVideo=Kp({},this.customVideo)),this.customAudio!==void 0&&(e.customAudio=Kp({},this.customAudio)),e}},{key:`toMinifiedJSONObject`,value:function(){var e={};return this.video!==void 0&&(e.v=this.video),this.audio!==void 0&&(e.a=this.audio),this.screenVideo!==void 0&&(e.sv=this.screenVideo),this.screenAudio!==void 0&&(e.sa=this.screenAudio),this.customVideo!==void 0&&(e.cv=Kp({},this.customVideo)),this.customAudio!==void 0&&(e.ca=Kp({},this.customAudio)),e}},{key:`normalize`,value:function(){function e(e,t){return e&&Object.keys(e).length===1&&e[`*`]===t}return!(!0!==this.video||!0!==this.audio||!0!==this.screenVideo||!0!==this.screenAudio||!e(this.customVideo,!0)||!e(this.customAudio,!0))||(!1!==this.video||!1!==this.audio||!1!==this.screenVideo||!1!==this.screenAudio||!e(this.customVideo,!1)||!e(this.customAudio,!1))&&this}}],[{key:`fromBoolean`,value:function(t){return new e({video:t,audio:t,screenVideo:t,screenAudio:t,customVideo:{"*":t},customAudio:{"*":t}})}},{key:`fromJSONObject`,value:function(t){return new e({video:t.video,audio:t.audio,screenVideo:t.screenVideo,screenAudio:t.screenAudio,customVideo:t.customVideo===void 0?void 0:Kp({},t.customVideo),customAudio:t.customAudio===void 0?void 0:Kp({},t.customAudio)})}},{key:`fromMinifiedJSONObject`,value:function(t){return new e({video:t.v,audio:t.a,screenVideo:t.sv,screenAudio:t.sa,customVideo:t.cv,customAudio:t.ca})}},{key:`validateJSONObject`,value:function(e,t){if(typeof e==`boolean`)return[!0];if(I(e)!==`object`)return[!1,`invalid (non-object, non-boolean) value in canReceive`];for(var n=Object.keys(e),r=0,i=n;r<i.length;r++){var a=i[r];if(!Yp.includes(a))return[!1,`invalid media type '${a}' in canReceive`];if(Zp.includes(a)){if(typeof e[a]!=`boolean`)return[!1,`invalid (non-boolean) value for media type '${a}' in canReceive`]}else{if(I(e[a])!==`object`)return[!1,`invalid (non-object) value for media type '${a}' in canReceive`];for(var o=0,s=Object.values(e[a]);o<s.length;o++)if(typeof s[o]!=`boolean`)return[!1,`invalid (non-boolean) value for entry within '${a}' in canReceive`];if(t&&e[a][`*`]===void 0)return[!1,`canReceive "base" permission must specify "*" as an entry within '${a}'`]}}return t&&n.length!==Yp.length?[!1,`canReceive "base" permission must specify all media types: ${Yp.join(`, `)} (or be set to a boolean shorthand)`]:[!0]}}])}(),nm=[`result`],rm=[`preserveIframe`];function im(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?im(Object(n),!0).forEach((function(t){To(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):im(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function am(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(am=function(){return!!e})()}function om(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return sm(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sm(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
35
- 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 e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function sm(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 cm={},lm=`video`,um=`voice`,dm=B()?{data:{}}:{data:{},topology:`none`},fm={present:0,hidden:0},pm={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},mm=Object.keys(pm),hm=[`state`,`volume`,`simulcastEncodings`],gm={androidInCallNotification:{title:`string`,subtitle:`string`,iconName:`string`,disableForCustomOverride:`boolean`},disableAutoDeviceManagement:{audio:`boolean`,video:`boolean`}},_m={id:{iconPath:`string`,iconPathDarkMode:`string`,label:`string`,tooltip:`string`,visualState:`'default' | 'sidebar-open' | 'active'`}},vm={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`}},ym=/^[a-zA-Z0-9_-]+$/;function bm(e){if(e!=null&&I(e)===`object`&&!Array.isArray(e)){var t,n={},r=om(Object.entries(e).slice(0,10));try{for(r.s();!(t=r.n()).done;){var i=Oo(t.value,2),a=i[0],o=i[1];typeof a!=`string`||a.length>64||ym.test(a)&&typeof o==`string`&&(n[a]=o.slice(0,256))}}catch(e){r.e(e)}finally{r.f()}return Object.keys(n).length?n:void 0}}var xm={customIntegrations:{validate:Gm,help:Um()},customTrayButtons:{validate:Wm,help:`customTrayButtons should be a dictionary of the type ${JSON.stringify(_m)}`},url:{validate:function(e){return typeof e==`string`},help:`url should be a string`},baseUrl:{validate:function(e){return console.warn(`baseUrl is deprecated and has no effect`),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(e){console.error(`Failed to validate dailyConfig`,e)}return!1},help:`Unsupported dailyConfig. Check error logs for detailed info.`},reactNativeConfig:{validate:function(e){return Km(e,gm)},help:`reactNativeConfig should look like ${JSON.stringify(gm)}, 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 Pm(e),!0}catch(e){return console.error(e),!1}},help:`invalid userData type provided`},startVideoOff:!0,startAudioOff:!0,allowLocalVideo:!0,allowLocalAudio:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(e,t){if(typeof e==`boolean`)return t._preloadCache.allowLocalVideo=e,!0;var n;if(e instanceof MediaStreamTrack)t._sharedTracks.videoTrack=e,n={customTrack:Tf};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:Tf};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(e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!t.includes(i))return console.error(`unsupported color "${i}". Valid colors: ${t.join(`, `)}`),!1;if(!e[i].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error(`${i} theme color should be provided in valid hex color format. Received: "${e[i]}"`),!1}return!0};return I(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 ${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 ${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 Fm(e,{allowAllParticipantsKey:!1})},help:Hm({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!function(e,t){try{return t.validateUpdateSendSettings(e),!0}catch(e){return console.error(`Failed to validate send settings`,e),!1}}(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:`Invalid sendSettings provided. Check error logs for detailed info.`},inputSettings:{validate:function(e,t){return!!Im(e)&&(t._inputSettings||={},Lm(e,t.properties?.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:Vm()},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`},aboutClient:{validate:function(e){if(e==null)return!0;if(I(e)!==`object`||Array.isArray(e))return!1;var t=Object.entries(e);if(t.length>10)return!1;for(var n=0,r=t;n<r.length;n++){var i=Oo(r[n],2),a=i[0],o=i[1];if(typeof a!=`string`||a.length>64||!ym.test(a)||typeof o!=`string`||o.length>256)return!1}return!0},help:`aboutClient must be an object with up to 10 entries; keys must be strings made up of characters (a-z, 0-9, _, -) and a max length of 64; values must be strings with a max length of 256`},proxy:{queryString:`proxy`},strictMode:!0,allowMultipleCallInstances:!0},Sm={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)||!B()&&e===`avatar`)return!0;var r=[`audio`,`video`,`screenAudio`,`screenVideo`,`rmpAudio`,`rmpVideo`],i=function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var a in e)if(a===`custom`){if(!n.includes(e[a])&&!i(e[a],!0))return!1}else{var o=!t&&!r.includes(a),s=!n.includes(e[a]);if(o||s)return!1}return!0};return i(e)},help:`setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: true${B()?``:` | 'avatar'`} | false | 'staged' | { [audio: true|false|'staged'], [video: true|false|'staged'], [screenAudio: true|false|'staged'], [screenVideo: true|false|'staged'] }`},setAudio:!0,setVideo:!0,setScreenShare:{validate:function(e){return!1===e},help:`setScreenShare must be false, as it's only meant for stopping remote participants' screen shares`},eject:!0,updatePermissions:{validate:function(e){for(var t=0,n=Object.entries(e);t<n.length;t++){var r=Oo(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=om(a);try{for(c.s();!(o=c.n()).done;){var l=o.value;if(!s.includes(l))return!1}}catch(e){c.e(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 u=Oo(em.validateJSONObject(a),2),d=u[0],f=u[1];if(!d)return console.error(f),!1;break;case`canAdmin`:if(a instanceof Set||a instanceof Array||Array.isArray(a)){var p,m=[`participants`,`streaming`,`transcription`],h=om(a);try{for(h.s();!(p=h.n()).done;){var g=p.value;if(!m.includes(g))return!1}}catch(e){h.e(e)}finally{h.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=L((function*(e){return new Promise((function(t,n){var r=[];e.forEach((function(i){return Promise.resolve(i).then((function(e){t(e)})).catch((function(t){r.push(t),r.length===e.length&&n(r)}))}))}))}));return function(t){return e.apply(this,arguments)}}());var Cm=function(){function e(t){var n,r,i,a,o,s,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(_o(this,e),i=this,a=So(a=e),To(r=xo(i,am()?Reflect.construct(a,o||[],So(i).constructor):a.apply(i,o)),`startListeningForDeviceChanges`,(function(){Bp(r.handleDeviceChange)})),To(r,`stopListeningForDeviceChanges`,(function(){Vp(r.handleDeviceChange)})),To(r,`handleDeviceChange`,(function(e){e=e.map((function(e){return JSON.parse(JSON.stringify(e))})),r.emitDailyJSEvent({action:`available-devices-updated`,availableDevices:e})})),To(r,`handleNativeAppStateChange`,function(){var e=L((function*(e){if(e===`destroyed`)return console.warn(`App has been destroyed before leaving the meeting. Cleaning up all the resources!`),void(yield r.destroy());var t=e===`active`;r.disableReactNativeAutoDeviceManagement(`video`)||(t?r.camUnmutedBeforeLosingNativeActiveState&&r.setLocalVideo(!0):(r.camUnmutedBeforeLosingNativeActiveState=r.localVideo(),r.camUnmutedBeforeLosingNativeActiveState&&r.setLocalVideo(!1)))}));return function(t){return e.apply(this,arguments)}}()),To(r,`handleNativeAudioFocusChange`,(function(e){r.disableReactNativeAutoDeviceManagement(`audio`)||(r._hasNativeAudioFocus=e,r.toggleParticipantAudioBasedOnNativeAudioFocus(),r._hasNativeAudioFocus?r.micUnmutedBeforeLosingNativeAudioFocus&&r.setLocalAudio(!0):(r.micUnmutedBeforeLosingNativeAudioFocus=r.localAudio(),r.setLocalAudio(!1)))})),To(r,`handleNativeSystemScreenCaptureStop`,(function(){r.stopScreenShare()})),!Uf()&&!B())throw Error(`WebRTC not supported or suppressed`);if(r.strictMode=c.strictMode===void 0||c.strictMode,r.allowMultipleCallInstances=(n=c.allowMultipleCallInstances)!=null&&n,Object.keys(cm).length&&(r._logDuplicateInstanceAttempt(),!r.allowMultipleCallInstances)){if(r.strictMode)throw 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:{}}),r.callClientId=Yo(),cm[(s=r).callClientId]=s,window._daily.instances[r.callClientId]={},r._sharedTracks={},window._daily.instances[r.callClientId].tracks=r._sharedTracks,c.dailyJsVersion=e.version(),c.aboutClient!==void 0&&(c.aboutClient=bm(c.aboutClient)),r._iframe=t,r._callObjectMode=c.layout===`none`&&!r._iframe,r._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},c.showLocalVideo===void 0?r._showLocalVideo=!0:r._callObjectMode?console.error(`showLocalVideo is not available in call object mode`):r._showLocalVideo=!!c.showLocalVideo,c.showParticipantsBar===void 0?r._showParticipantsBar=!0:r._callObjectMode?console.error(`showParticipantsBar is not available in call object mode`):r._showParticipantsBar=!!c.showParticipantsBar,c.customIntegrations===void 0?r._customIntegrations={}:r._callObjectMode?console.error(`customIntegrations is not available in call object mode`):r._customIntegrations=c.customIntegrations,c.customTrayButtons===void 0?r._customTrayButtons={}:r._callObjectMode?console.error(`customTrayButtons is not available in call object mode`):r._customTrayButtons=c.customTrayButtons,c.activeSpeakerMode===void 0?r._activeSpeakerMode=!1:r._callObjectMode?console.error(`activeSpeakerMode is not available in call object mode`):r._activeSpeakerMode=!!c.activeSpeakerMode,c.receiveSettings?r._callObjectMode?r._receiveSettings=c.receiveSettings:console.error(`receiveSettings is only available in call object mode`):r._receiveSettings={},r.validateProperties(c),r.properties=V({},c),r.properties.aboutClient!==void 0&&(r.properties.aboutClient=bm(r.properties.aboutClient)),r._inputSettings||={},r._callObjectLoader=r._callObjectMode?new hp(r.callClientId):null,r._callState=`new`,r._isPreparingToJoin=!1,r._accessState={access:`unknown`},r._meetingSessionSummary={},r._finalSummaryOfPrevSession={},r._meetingSessionState=Xm(dm,r._callObjectMode),r._nativeInCallAudioMode=lm,r._participants={},r._isScreenSharing=!1,r._participantCounts=fm,r._rmpPlayerState={},r._waitingParticipants={},r._network={threshold:`good`,quality:100,networkState:`unknown`,stats:{}},r._activeSpeaker={},r._localAudioLevel=0,r._isLocalAudioLevelObserverRunning=!1,r._remoteParticipantsAudioLevel={},r._isRemoteParticipantsAudioLevelObserverRunning=!1,r._maxAppMessageSize=yf,r._messageChannel=B()?new op:new rp,r._iframe&&(r._iframe.requestFullscreen?r._iframe.addEventListener(`fullscreenchange`,(function(){document.fullscreenElement===r._iframe?(r.emitDailyJSEvent({action:`fullscreen`}),r.sendMessageToCallMachine({action:`fullscreen`})):(r.emitDailyJSEvent({action:`exited-fullscreen`}),r.sendMessageToCallMachine({action:`exited-fullscreen`}))})):r._iframe.webkitRequestFullscreen&&r._iframe.addEventListener(`webkitfullscreenchange`,(function(){document.webkitFullscreenElement===r._iframe?(r.emitDailyJSEvent({action:`fullscreen`}),r.sendMessageToCallMachine({action:`fullscreen`})):(r.emitDailyJSEvent({action:`exited-fullscreen`}),r.sendMessageToCallMachine({action:`exited-fullscreen`}))}))),B()){var l=r.nativeUtils();l.addAudioFocusChangeListener&&l.removeAudioFocusChangeListener&&l.addAppStateChangeListener&&l.removeAppStateChangeListener&&l.addSystemScreenCaptureStopListener&&l.removeSystemScreenCaptureStopListener||console.warn(`expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native`),r._hasNativeAudioFocus=!0,l.addAudioFocusChangeListener(r.handleNativeAudioFocusChange),l.addAppStateChangeListener(r.handleNativeAppStateChange),l.addSystemScreenCaptureStopListener(r.handleNativeSystemScreenCaptureStop)}return r._callObjectMode&&r.startListeningForDeviceChanges(),r._messageChannel.addListenerForMessagesFromCallMachine(r.handleMessageFromCallMachine,r.callClientId,r),r}return wo(e,No),bo(e,[{key:`destroy`,value:(fe=L((function*(){var e;try{yield this.leave()}catch{}var t=this._iframe;if(t){var n=t.parentElement;n&&n.removeChild(t)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),B()){var r=this.nativeUtils();r.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),r.removeAppStateChangeListener(this.handleNativeAppStateChange),r.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:`call-instance-destroyed`}),delete cm[this.callClientId],!((e=window)==null||(e=e._daily)==null)&&e.instances&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)})),function(){return fe.apply(this,arguments)})},{key:`isDestroyed`,value:function(){return!!this._destroyed}},{key:`loadCss`,value:function(e){var t=e.bodyClass,n=e.cssFile,r=e.cssText;return H(),this.sendMessageToCallMachine({action:`load-css`,cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:`iframe`,value:function(){return H(),this._iframe}},{key:`meetingState`,value:function(){return this._callState}},{key:`accessState`,value:function(){return jm(this._callObjectMode,`accessState()`),this._accessState}},{key:`participants`,value:function(){return this._participants}},{key:`participantCounts`,value:function(){return this._participantCounts}},{key:`waitingParticipants`,value:function(){return jm(this._callObjectMode,`waitingParticipants()`),this._waitingParticipants}},{key:`validateParticipantProperties`,value:function(e,t){for(var n in t){if(!Sm[n])throw Error(`unrecognized updateParticipant property ${n}`);if(Sm[n].validate&&!Sm[n].validate(t[n],this,this._participants[e]))throw Error(Sm[n].help)}}},{key:`updateParticipant`,value:function(e,t){return this._participants.local&&this._participants.local.session_id===e&&(e=`local`),e&&t&&(this.validateParticipantProperties(e,t),this.sendMessageToCallMachine({action:`update-participant`,id:e,properties:t})),this}},{key:`updateParticipants`,value:function(e){var t=this._participants.local&&this._participants.local.session_id;for(var n in e)n===t&&(n=`local`),n&&e[n]&&this.validateParticipantProperties(n,e[n]);return this.sendMessageToCallMachine({action:`update-participants`,participants:e}),this}},{key:`updateWaitingParticipant`,value:(de=L((function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(jm(this._callObjectMode,`updateWaitingParticipant()`),Em(this._callState,`updateWaitingParticipant()`),typeof t!=`string`||I(n)!==`object`)throw Error(`updateWaitingParticipant() must take an id string and a updates object`);return new Promise((function(r,i){e.sendMessageToCallMachine({action:`daily-method-update-waiting-participant`,id:t,updates:n},(function(e){e.error&&i(e.error),e.id||i(Error(`unknown error in updateWaitingParticipant()`)),r({id:e.id})}))}))})),function(){return de.apply(this,arguments)})},{key:`updateWaitingParticipants`,value:(ue=L((function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(jm(this._callObjectMode,`updateWaitingParticipants()`),Em(this._callState,`updateWaitingParticipants()`),I(t)!==`object`)throw Error(`updateWaitingParticipants() must take a mapping between ids and update objects`);return new Promise((function(n,r){e.sendMessageToCallMachine({action:`daily-method-update-waiting-participants`,updatesById:t},(function(e){e.error&&r(e.error),e.ids||r(Error(`unknown error in updateWaitingParticipants()`)),n({ids:e.ids})}))}))})),function(){return ue.apply(this,arguments)})},{key:`requestAccess`,value:(le=L((function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.access,r=n===void 0?{level:vd}:n,i=t.name,a=i===void 0?``:i;return jm(this._callObjectMode,`requestAccess()`),Em(this._callState,`requestAccess()`),new Promise((function(t,n){e.sendMessageToCallMachine({action:`daily-method-request-access`,access:r,name:a},(function(e){e.error&&n(e.error),e.access||n(Error(`unknown error in requestAccess()`)),t({access:e.access,granted:e.granted})}))}))})),function(){return le.apply(this,arguments)})},{key:`localAudio`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.audio.state):null}},{key:`localVideo`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.video.state):null}},{key:`setLocalAudio`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return`forceDiscardTrack`in t&&(B()?(console.warn(`forceDiscardTrack option not supported in React Native; ignoring`),t={}):e&&(console.warn(`forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring`),t={})),this.sendMessageToCallMachine({action:`local-audio`,state:e,options:t}),this}},{key:`localScreenAudio`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.screenAudio.state):null}},{key:`localScreenVideo`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.screenVideo.state):null}},{key:`updateScreenShare`,value:function(e){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:`local-screen-update`,options:e}),this;console.warn(`There is no screen share in progress. Try calling startScreenShare first.`)}},{key:`setLocalVideo`,value:function(e){return this.sendMessageToCallMachine({action:`local-video`,state:e}),this}},{key:`_setAllowLocalAudio`,value:function(e){if(this._preloadCache.allowLocalAudio=e,this._callMachineInitialized)return this.sendMessageToCallMachine({action:`set-allow-local-audio`,state:e}),this}},{key:`_setAllowLocalVideo`,value:function(e){if(this._preloadCache.allowLocalVideo=e,this._callMachineInitialized)return this.sendMessageToCallMachine({action:`set-allow-local-video`,state:e}),this}},{key:`getReceiveSettings`,value:(ce=L((function*(e){var t=this,n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,r=n!==void 0&&n;if(jm(this._callObjectMode,`getReceiveSettings()`),!this._callMachineInitialized)return this._receiveSettings;switch(I(e)){case`string`:return new Promise((function(n){t.sendMessageToCallMachine({action:`get-single-participant-receive-settings`,id:e,showInheritedValues:r},(function(e){n(e.receiveSettings)}))}));case`undefined`:return this._receiveSettings;default:throw Error(`first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments`)}})),function(e){return ce.apply(this,arguments)})},{key:`updateReceiveSettings`,value:(se=L((function*(e){var t=this;if(jm(this._callObjectMode,`updateReceiveSettings()`),!Fm(e,{allowAllParticipantsKey:!0}))throw Error(Hm({allowAllParticipantsKey:!0}));return Em(this._callState,`updateReceiveSettings()`,`To specify receive settings earlier, use the receiveSettings config property.`),new Promise((function(n){t.sendMessageToCallMachine({action:`update-receive-settings`,receiveSettings:e},(function(e){n({receiveSettings:e.receiveSettings})}))}))})),function(e){return se.apply(this,arguments)})},{key:`_prepInputSettingsForSharing`,value:function(e,t){if(e){var n={};if(e.audio){var r;e.audio.settings&&(!Object.keys(e.audio.settings).length&&t||(n.audio={settings:V({},e.audio.settings)})),t&&(r=n.audio)!=null&&(r=r.settings)!=null&&r.customTrack&&(n.audio.settings={customTrack:this._sharedTracks.audioTrack});var i=e.audio.processor?.type===`none`&&e.audio.processor?._isDefaultWhenNone;if(e.audio.processor&&!i){var a=V({},e.audio.processor);delete a._isDefaultWhenNone,n.audio=V(V({},n.audio),{},{processor:a})}}if(e.video){var o;e.video.settings&&(!Object.keys(e.video.settings).length&&t||(n.video={settings:V({},e.video.settings)})),t&&(o=n.video)!=null&&(o=o.settings)!=null&&o.customTrack&&(n.video.settings={customTrack:this._sharedTracks.videoTrack});var s=e.video.processor?.type===`none`&&e.video.processor?._isDefaultWhenNone;if(e.video.processor&&!s){var c=V({},e.video.processor);delete c._isDefaultWhenNone,n.video=V(V({},n.video),{},{processor:c})}}return n}}},{key:`getInputSettings`,value:function(){var e=this;return H(),new Promise((function(t){t(e._getInputSettings())}))}},{key:`_getInputSettings`,value:function(){var e,t,n,r,i={processor:{type:`none`,_isDefaultWhenNone:!0}};this._inputSettings?(e=this._inputSettings?.video||i,t=this._inputSettings?.audio||i):(e=((n=this._preloadCache)==null||(n=n.inputSettings)==null?void 0:n.video)||i,t=((r=this._preloadCache)==null||(r=r.inputSettings)==null?void 0:r.audio)||i);var a={audio:t,video:e};return this._prepInputSettingsForSharing(a,!0)}},{key:`_updatePreloadCacheInputSettings`,value:function(e,t){var n=this._inputSettings||{},r={};if(e.video){var i,a,o;r.video={},e.video.settings?(r.video.settings={},t||e.video.settings.customTrack||(o=n.video)==null||!o.settings?r.video.settings=e.video.settings:r.video.settings=V(V({},n.video.settings),e.video.settings),Object.keys(r.video.settings).length||delete r.video.settings):(i=n.video)!=null&&i.settings&&(r.video.settings=n.video.settings),e.video.processor?r.video.processor=e.video.processor:(a=n.video)!=null&&a.processor&&(r.video.processor=n.video.processor)}else n.video&&(r.video=n.video);if(e.audio){var s,c,l;r.audio={},e.audio.settings?(r.audio.settings={},t||e.audio.settings.customTrack||(l=n.audio)==null||!l.settings?r.audio.settings=e.audio.settings:r.audio.settings=V(V({},n.audio.settings),e.audio.settings),Object.keys(r.audio.settings).length||delete r.audio.settings):(s=n.audio)!=null&&s.settings&&(r.audio.settings=n.audio.settings),e.audio.processor?r.audio.processor=e.audio.processor:(c=n.audio)!=null&&c.processor&&(r.audio.processor=n.audio.processor)}else n.audio&&(r.audio=n.audio);this._maybeUpdateInputSettings(r)}},{key:`_devicesFromInputSettings`,value:function(e){var t,n,r=(e==null||(t=e.video)==null||(t=t.settings)==null?void 0:t.deviceId)||null,i=(e==null||(n=e.audio)==null||(n=n.settings)==null?void 0:n.deviceId)||null,a=this._preloadCache.outputDeviceId||null;return{camera:r?{deviceId:r}:{},mic:i?{deviceId:i}:{},speaker:a?{deviceId:a}:{}}}},{key:`updateInputSettings`,value:(oe=L((function*(e){var t=this;return H(),Im(e)?e.video||e.audio?(Lm(e,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(e,!0),this._getInputSettings()):new Promise((function(n,r){t.sendMessageToCallMachine({action:`update-input-settings`,inputSettings:e},(function(i){if(i.error)r(i.error);else{if(i.returnPreloadCache)return t._updatePreloadCacheInputSettings(e,!0),void n(t._getInputSettings());t._maybeUpdateInputSettings(i.inputSettings),n(t._prepInputSettingsForSharing(i.inputSettings,!0))}}))}))):this._getInputSettings():(console.error(Vm()),Promise.reject(Vm()))})),function(e){return oe.apply(this,arguments)})},{key:`setBandwidth`,value:function(e){var t=e.kbs,n=e.trackConstraints;if(H(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:`set-bandwidth`,kbs:t,trackConstraints:n}),this}},{key:`getDailyLang`,value:function(){var e=this;if(H(),this._callMachineInitialized)return new Promise((function(t){e.sendMessageToCallMachine({action:`get-daily-lang`},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))}},{key:`setDailyLang`,value:function(e){return H(),this.sendMessageToCallMachine({action:`set-daily-lang`,lang:e}),this}},{key:`setProxyUrl`,value:function(e){return this.sendMessageToCallMachine({action:`set-proxy-url`,proxyUrl:e}),this}},{key:`setIceConfig`,value:function(e){return this.sendMessageToCallMachine({action:`set-ice-config`,iceConfig:e}),this}},{key:`meetingSessionSummary`,value:function(){return[`left-meeting`,`error`].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:`getMeetingSession`,value:(ae=L((function*(){var e=this;return console.warn(`getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately`),Em(this._callState,`getMeetingSession()`),new Promise((function(t){e.sendMessageToCallMachine({action:`get-meeting-session`},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return ae.apply(this,arguments)})},{key:`meetingSessionState`,value:function(){return Em(this._callState,`meetingSessionState`),this._meetingSessionState}},{key:`setMeetingSessionData`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`replace`;jm(this._callObjectMode,`setMeetingSessionData()`),Em(this._callState,`setMeetingSessionData`);try{(function(e,t){new up({data:e,mergeStrategy:t})})(e,t)}catch(e){throw console.error(e),e}try{this.sendMessageToCallMachine({action:`set-session-data`,data:e,mergeStrategy:t})}catch(e){throw Error(`Error setting meeting session data: ${e}`)}}},{key:`setUserName`,value:function(e,t){var n=this;return this.properties.userName=e,new Promise((function(r){n.sendMessageToCallMachine({action:`set-user-name`,name:e??``,thisMeetingOnly:B()||!!t&&!!t.thisMeetingOnly},(function(e){delete e.action,delete e.callbackStamp,r(e)}))}))}},{key:`setUserData`,value:(ie=L((function*(e){var t=this;try{Pm(e)}catch(e){throw console.error(e),e}if(this.properties.userData=e,this._callMachineInitialized)return new Promise((function(n){try{t.sendMessageToCallMachine({action:`set-user-data`,userData:e},(function(e){delete e.action,delete e.callbackStamp,n(e)}))}catch(e){throw Error(`Error setting user data: ${e}`)}}))})),function(e){return ie.apply(this,arguments)})},{key:`validateAudioLevelInterval`,value:function(e){if(e&&(e<100||typeof e!=`number`))throw Error(`The interval must be a number greater than or equal to 100 milliseconds.`)}},{key:`startLocalAudioLevelObserver`,value:function(e){var t=this;if(typeof AudioWorkletNode>`u`&&!B())throw Error(`startLocalAudioLevelObserver() is not supported on this browser`);if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:`start-local-audio-level-observer`,interval:e},(function(e){t._isLocalAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.localAudioLevelObserver={enabled:!0,interval:e}}},{key:`isLocalAudioLevelObserverRunning`,value:function(){return this._isLocalAudioLevelObserverRunning}},{key:`stopLocalAudioLevelObserver`,value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:`stop-local-audio-level-observer`})}},{key:`startRemoteParticipantsAudioLevelObserver`,value:function(e){var t=this;if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:`start-remote-participants-audio-level-observer`,interval:e},(function(e){t._isRemoteParticipantsAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:e}}},{key:`isRemoteParticipantsAudioLevelObserverRunning`,value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:`stopRemoteParticipantsAudioLevelObserver`,value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:`stop-remote-participants-audio-level-observer`})}},{key:`startCamera`,value:(re=L((function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(jm(this._callObjectMode,`startCamera()`),Om(this._callState,this._isPreparingToJoin,`startCamera()`,`Did you mean to use setLocalAudio() and/or setLocalVideo() instead?`),this.needsLoad())try{yield this.load(t)}catch(e){return Promise.reject(e)}else{if(this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error(`url in startCamera() is different than the one used in preAuth()`),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error(`token in startCamera() is different than the one used in preAuth()`),Promise.reject()}this.validateProperties(t),this.properties=V(V({},this.properties),t)}return new Promise((function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:`start-camera`,properties:Tm(e.properties,e.callClientId),preloadCache:Tm(e._preloadCache,e.callClientId)},(function(e){e.error?n(e.error):t({camera:e.camera,mic:e.mic,speaker:e.speaker})}))}))})),function(){return re.apply(this,arguments)})},{key:`validateCustomTrack`,value:function(e,t,n){if(n&&n.length>50)throw Error("Custom track `trackName` must not be more than 50 characters");if(t&&t!==`music`&&t!==`speech`&&!(t instanceof Object))throw Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(n&&[`cam-audio`,`cam-video`,`screen-video`,`screen-audio`,`rmpAudio`,`rmpVideo`,`customVideoDefaults`].includes(n))throw Error("Custom track `trackName` must not match a track name already used by daily: cam-audio, cam-video, customVideoDefaults, screen-video, screen-audio, rmpAudio, rmpVideo");if(!(e instanceof MediaStreamTrack))throw Error(`Custom tracks provided must be instances of MediaStreamTrack`)}},{key:`startCustomTrack`,value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{track,mode,trackName,ignoreAudioLevel};return H(),Em(this._callState,`startCustomTrack()`),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise((function(n,r){e._sharedTracks.customTrack=t.track,t.track=Tf,e.sendMessageToCallMachine({action:`start-custom-track`,properties:t},(function(e){e.error?r({error:e.error}):n(e.mediaTag)}))}))}},{key:`stopCustomTrack`,value:function(e){var t=this;return H(),Em(this._callState,`stopCustomTrack()`),new Promise((function(n){t.sendMessageToCallMachine({action:`stop-custom-track`,mediaTag:e},(function(e){n(e.mediaTag)}))}))}},{key:`setCamera`,value:function(e){var t=this;return Nm(),km(this._callMachineInitialized,`setCamera()`),new Promise((function(n){t.sendMessageToCallMachine({action:`set-camera`,cameraDeviceId:e},(function(e){n({device:e.device})}))}))}},{key:`setAudioDevice`,value:(ne=L((function*(e){return Nm(),this.nativeUtils().setAudioDevice(e),{deviceId:yield this.nativeUtils().getAudioDevice()}})),function(e){return ne.apply(this,arguments)})},{key:`cycleCamera`,value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise((function(n){e.sendMessageToCallMachine({action:`cycle-camera`,properties:t},(function(e){n({device:e.device})}))}))}},{key:`cycleMic`,value:function(){var e=this;return H(),new Promise((function(t){e.sendMessageToCallMachine({action:`cycle-mic`},(function(e){t({device:e.device})}))}))}},{key:`getCameraFacingMode`,value:function(){var e=this;return Nm(),new Promise((function(t){e.sendMessageToCallMachine({action:`get-camera-facing-mode`},(function(e){t(e.facingMode)}))}))}},{key:`setInputDevicesAsync`,value:(te=L((function*(e){var t=this,n=e.audioDeviceId,r=e.videoDeviceId,i=e.audioSource,a=e.videoSource;if(H(),i!==void 0&&(n=i),a!==void 0&&(r=a),typeof n==`boolean`&&(this._setAllowLocalAudio(n),n=void 0),typeof r==`boolean`&&(this._setAllowLocalVideo(r),r=void 0),!n&&!r)return yield this.getInputDevices();var o={};return n&&(n instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=n,n=Tf,o.audio={settings:{customTrack:n}}):(delete this._sharedTracks.audioTrack,o.audio={settings:{deviceId:n}})),r&&(r instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=r,r=Tf,o.video={settings:{customTrack:r}}):(delete this._sharedTracks.videoTrack,o.video={settings:{deviceId:r}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(o,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise((function(e){t.sendMessageToCallMachine({action:`set-input-devices`,audioDeviceId:n,videoDeviceId:r},(function(n){if(delete n.action,delete n.callbackStamp,n.returnPreloadCache)return t._updatePreloadCacheInputSettings(o,!1),void e(t._devicesFromInputSettings(t._inputSettings));e(n)}))}))})),function(e){return te.apply(this,arguments)})},{key:`setOutputDeviceAsync`,value:(T=L((function*(e){var t=this,n=e.outputDeviceId;if(H(),!n||typeof n!=`string`)throw Error(`outputDeviceId must be provided and must be a valid device id`);return this._preloadCache.outputDeviceId=n,this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(e,r){t.sendMessageToCallMachine({action:`set-output-device`,outputDeviceId:n},(function(n){if(delete n.action,delete n.callbackStamp,n.error){var i=Error(n.error.message);i.type=n.error.type,r(i);return}n.returnPreloadCache?e(t._devicesFromInputSettings(t._inputSettings)):e(n)}))}))})),function(e){return T.apply(this,arguments)})},{key:`getInputDevices`,value:(ee=L((function*(){var e=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(t){e.sendMessageToCallMachine({action:`get-input-devices`},(function(n){n.returnPreloadCache?t(e._devicesFromInputSettings(e._inputSettings)):t({camera:n.camera,mic:n.mic,speaker:n.speaker})}))}))})),function(){return ee.apply(this,arguments)})},{key:`nativeInCallAudioMode`,value:function(){return Nm(),this._nativeInCallAudioMode}},{key:`setNativeInCallAudioMode`,value:function(e){if(Nm(),[lm,um].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement(`audio`)&&Dm(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error(`invalid in-call audio mode specified: `,e)}},{key:`preAuth`,value:(w=L((function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(jm(this._callObjectMode,`preAuth()`),Om(this._callState,this._isPreparingToJoin,`preAuth()`),this.needsLoad()&&(yield this.load(t)),!t.url)throw Error(`preAuth() requires at least a url to be provided`);return this.validateProperties(t),this.properties=V(V({},this.properties),t),new Promise((function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:`daily-method-preauth`,properties:Tm(e.properties,e.callClientId),preloadCache:Tm(e._preloadCache,e.callClientId)},(function(r){return r.error?n(r.error):r.access?(e._didPreAuth=!0,void t({access:r.access})):n(Error(`unknown error in preAuth()`))}))}))})),function(){return w.apply(this,arguments)})},{key:`load`,value:(C=L((function*(e){var t=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw Error(`Use after destroy`);if(e&&(this.validateProperties(e),this.properties=V(V({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw Error(`can't load iframe meeting because url property isn't set`);return this._updateCallState(dd),this.emitDailyJSEvent({action:Cd}),this._callObjectMode?new Promise((function(e,n){t._callObjectLoader.cancel();var r=Date.now();t._callObjectLoader.load(t.properties.dailyConfig,(function(n){t._bundleLoadTime=n?`no-op`:Date.now()-r,t._updateCallState(fd),n&&t.emitDailyJSEvent({action:`loaded`}),e()}),(function(e,r){if(t.emitDailyJSEvent({action:`load-attempt-failed`}),!r){t._updateCallState(gd),t.resetMeetingDependentVars();var i={action:vf,errorMsg:e.msg,error:{type:`connection-error`,msg:`Failed to load call object bundle.`,details:{on:`load`,sourceError:e,bundleUrl:Qo(t.properties.dailyConfig)}}};t._maybeSendToSentry(i),t.emitDailyJSEvent(i),n(e.msg)}}))})):(this._iframe.src=Zo(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise((function(e,n){t._loadedCallback=function(r){t._callState===`error`?n(r):(t._updateCallState(fd),(t.properties.cssFile||t.properties.cssText)&&t.loadCss(t.properties),e())}})))}})),function(e){return C.apply(this,arguments)})},{key:`join`,value:(S=L((function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this._testCallInProgress&&this.stopTestCallQuality(),!t.url&&!this.properties.url){var n=`No room URL has been provided`;return console.error(n),Promise.reject(Error(n))}var r=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(t)}catch(e){return this.updateIsPreparingToJoin(!1),Promise.reject(e)}}else{if(r=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error(`url in join() is different than the one used in preAuth()`),this.updateIsPreparingToJoin(!1),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error(`token in join() is different than the one used in preAuth()`),this.updateIsPreparingToJoin(!1),Promise.reject()}if(t.url&&!this._callObjectMode&&t.url&&t.url!==this.properties.url)return console.error(`url in join() is different than the one used in load() (${this.properties.url} -> ${t.url})`),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(t),this.properties=V(V({},this.properties),t)}return t.showLocalVideo!==void 0&&(this._callObjectMode?console.error(`showLocalVideo is not available in callObject mode`):this._showLocalVideo=!!t.showLocalVideo),t.showParticipantsBar!==void 0&&(this._callObjectMode?console.error(`showParticipantsBar is not available in callObject mode`):this._showParticipantsBar=!!t.showParticipantsBar),this._callState===`joined-meeting`||this._callState===`joining-meeting`?(console.warn(`already joined meeting, call leave() before joining again`),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(pd,!1),this.emitDailyJSEvent({action:Dd}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:`join-meeting`,properties:Tm(this.properties,this.callClientId),preloadCache:Tm(this._preloadCache,this.callClientId)},(function(t){t.error&&e._joinedCallback&&(e._joinedCallback(null,t.error),e._joinedCallback=null)})),new Promise((function(t,n){e._joinedCallback=function(i,a){if(e._callState!==`error`){if(a)return e._updateCallState(hd),void n(a);if(e._updateCallState(`joined-meeting`),i)for(var o in i){if(e._callObjectMode){var s=e._callMachine().store;Op(i[o],s),kp(i[o],s),jp(i[o],e._participants[o],s)}e._participants[o]=V({},i[o]),e.toggleParticipantAudioBasedOnNativeAudioFocus()}r&&e.loadCss(e.properties),t(i)}else n(a)}})))})),function(){return S.apply(this,arguments)})},{key:`leave`,value:(x=L((function*(){var e=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise((function(t){e._callState===`left-meeting`||e._callState===`error`?t():e._callObjectLoader&&!e._callObjectLoader.loaded?(e._callObjectLoader.cancel(),e._updateCallState(hd),e.resetMeetingDependentVars(),e.emitDailyJSEvent({action:hd}),t()):(e._resolveLeave=t,e.sendMessageToCallMachine({action:`leave-meeting`}))}))})),function(){return x.apply(this,arguments)})},{key:`startScreenShare`,value:(b=L((function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(km(this._callMachineInitialized,`startScreenShare()`),t.screenVideoSendSettings&&this._validateVideoSendSettings(`screenVideo`,t.screenVideoSendSettings),t.mediaStream&&=(this._sharedTracks.screenMediaStream=t.mediaStream,Tf),typeof DailyNativeUtils<`u`&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var n=this.nativeUtils();if(yield n.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:_f,type:`screen-share-error`,errorMsg:`Could not start the screen sharing. The screen is already been captured!`});n.setSystemScreenCaptureStartCallback((function(){n.setSystemScreenCaptureStartCallback(null),e.sendMessageToCallMachine({action:Sf,captureOptions:t})})),n.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:Sf,captureOptions:t})})),function(){return b.apply(this,arguments)})},{key:`stopScreenShare`,value:function(){km(this._callMachineInitialized,`stopScreenShare()`),this.sendMessageToCallMachine({action:`local-screen-stop`})}},{key:`startRecording`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.type;if(t&&t!==`cloud`&&t!==`cloud-audio-only`&&t!==`raw-tracks`&&t!==`local`)throw Error(`invalid type: ${t}, allowed values 'cloud', 'cloud-audio-only', 'raw-tracks', or 'local'`);this.sendMessageToCallMachine(V({action:`local-recording-start`},e))}},{key:`updateRecording`,value:function(e){var t=e.layout,n=t===void 0?{preset:`default`}:t,r=e.instanceId;this.sendMessageToCallMachine({action:`daily-method-update-recording`,layout:n,instanceId:r})}},{key:`stopRecording`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(V({action:`local-recording-stop`},e))}},{key:`startLiveStreaming`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(V({action:`daily-method-start-live-streaming`},e))}},{key:`updateLiveStreaming`,value:function(e){var t=e.layout,n=t===void 0?{preset:`default`}:t,r=e.instanceId;this.sendMessageToCallMachine({action:`daily-method-update-live-streaming`,layout:n,instanceId:r})}},{key:`addLiveStreamingEndpoints`,value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:Cf,endpointsOp:Af,endpoints:t,instanceId:n})}},{key:`removeLiveStreamingEndpoints`,value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:Cf,endpointsOp:jf,endpoints:t,instanceId:n})}},{key:`stopLiveStreaming`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(V({action:`daily-method-stop-live-streaming`},e))}},{key:`validateDailyConfig`,value:function(e){e.camSimulcastEncodings&&(console.warn(`camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings.`),this.validateSimulcastEncodings(e.camSimulcastEncodings)),e.screenSimulcastEncodings&&console.warn(`screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings.`),Wf()&&e.noAutoDefaultDeviceChange&&console.warn(`noAutoDefaultDeviceChange is not supported on Android, and will be ignored.`)}},{key:`validateSimulcastEncodings`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(e){if(!(e instanceof Array||Array.isArray(e)))throw Error(`encodings must be an Array`);if(!Ym(e.length,1,3))throw Error(`encodings must be an Array with between 1 to 3 layers`);for(var r=0;r<e.length;r++){var i=e[r];for(var a in this._validateEncodingLayerHasValidProperties(i),i)if(mm.includes(a)){if(typeof i[a]!=`number`)throw Error(`${a} must be a number`);if(t){var o=t[a],s=o.min,c=o.max;if(!Ym(i[a],s,c))throw Error(`${a} value not in range. valid range: ${s} to ${c}`)}}else if(![`active`,`scalabilityMode`].includes(a))throw Error(`Invalid key ${a}, valid keys are:`+Object.values(mm));if(n&&!i.hasOwnProperty(`maxBitrate`))throw Error(`maxBitrate is not specified`)}}}},{key:`startRemoteMediaPlayer`,value:(y=L((function*(e){var t=this,n=e.url,r=e.settings,i=r===void 0?{state:Of.PLAY}:r;try{(function(e){if(typeof e!=`string`)throw Error(`url parameter must be "string" type`)})(n),Jm(i),function(e){for(var t in e)if(!hm.includes(t))throw Error(`Invalid key ${t}, valid keys are: ${hm}`);e.simulcastEncodings&&this.validateSimulcastEncodings(e.simulcastEncodings,pm,!0)}(i)}catch(e){throw console.error(`invalid argument Error: ${e}`),console.error(`startRemoteMediaPlayer arguments must be of the form:
30
+ `),setTimeout(c,n);return}c()});return c(),t},[i,e,n,r]),mt(l),lo(l)){let t=mo(i,l,()=>i.get(e));return r&&uo(t),fo(t)}return l}function go(e,t){let n=so(t);return k((...t)=>n.set(e,...t),[n,e])}function F(e,t){return go(O(()=>N(null,(t,n,...r)=>e(t,n,...r)),[e]),t)}function _o(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}(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 vo(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function I(e){return I=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},I(e)}function yo(e){var t=function(e,t){if(I(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(I(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return I(t)==`symbol`?t:t+``}function bo(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,yo(r.key),r)}}function xo(e,t,n){return t&&bo(e.prototype,t),n&&bo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function So(e,t){if(t&&(I(t)==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e)}function Co(e){return Co=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Co(e)}function wo(e,t){return wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wo(e,t)}function To(e,t){if(typeof t!=`function`&&t!==null)throw 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&&wo(e,t)}function Eo(e,t,n){return(t=yo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Do(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function L(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){Do(a,r,i,o,s,`next`,e)}function s(e){Do(a,r,i,o,s,`throw`,e)}o(void 0)}))}}function Oo(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 ko(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if(typeof e==`string`)return Oo(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Oo(e,t):void 0}}(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
31
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ao(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var jo,Mo={exports:{}},No=function(){if(jo)return Mo.exports;jo=1;var e,t=typeof Reflect==`object`?Reflect:null,n=t&&typeof t.apply==`function`?t.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};e=t&&typeof t.ownKeys==`function`?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}Mo.exports=i,Mo.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}m(e,t,a,{once:!0}),t!==`error`&&function(e,t,n){typeof e.on==`function`&&m(e,`error`,t,n)}(e,i,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function o(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}function s(e){return e._maxListeners===void 0?i.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,a,c,l;if(o(n),(a=e._events)===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),a=e._events),c=a[t]),c===void 0)c=a[t]=n,++e._eventsCount;else if(typeof c==`function`?c=a[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),(i=s(e))>0&&c.length>i&&!c.warned){c.warned=!0;var u=Error(`Possible EventEmitter memory leak detected. `+c.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);u.name=`MaxListenersExceededWarning`,u.emitter=e,u.type=t,u.count=c.length,l=u,console&&console.warn&&console.warn(l)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):p(i,i.length)}function f(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}function p(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else{if(typeof e.addEventListener!=`function`)throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e);e.addEventListener(t,(function i(a){r.once&&e.removeEventListener(t,i),n(a)}))}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if(typeof e!=`number`||e<0||r(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);a=e}}),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(e){if(typeof e!=`number`||e<0||r(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)n(c,this,t);else{var l=c.length,u=p(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return o(t),this.on(e,u(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,u(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,i,a,s;if(o(t),(r=this._events)===void 0||(n=r[e])===void 0)return this;if(n===t||n.listener===t)--this._eventsCount==0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if((n=this._events)===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i,a=Object.keys(n);for(r=0;r<a.length;++r)(i=a[r])!==`removeListener`&&this.removeAllListeners(i);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(t=n[e])==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):f.call(e,t)},i.prototype.listenerCount=f,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},Mo.exports}(),Po=Ao(No),Fo=Object.prototype.hasOwnProperty;function Io(e,t,n){for(n of e.keys())if(Lo(n,t))return n}function Lo(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--&&Lo(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=Io(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=Io(t,i))||!Lo(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(Fo.call(e,n)&&++r&&!Fo.call(t,n)||!(n in t)||!Lo(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}var Ro={"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`},zo={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`},Bo={tablet:`tablet`,mobile:`mobile`,desktop:`desktop`,tv:`tv`},Vo={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`},Ho={EdgeHTML:`EdgeHTML`,Blink:`Blink`,Trident:`Trident`,Presto:`Presto`,Gecko:`Gecko`,WebKit:`WebKit`},R=class e{static getFirstMatch(e,t){let n=t.match(e);return n&&n.length>0&&n[1]||``}static getSecondMatch(e,t){let n=t.match(e);return n&&n.length>1&&n[2]||``}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case`NT`:return`NT`;case`XP`:case`NT 5.1`:return`XP`;case`NT 5.0`:return`2000`;case`NT 5.2`:return`2003`;case`NT 6.0`:return`Vista`;case`NT 6.1`:return`7`;case`NT 6.2`:return`8`;case`NT 6.3`:return`8.1`;case`NT 10.0`:return`10`;default:return}}static getMacOSVersionName(e){let t=e.split(`.`).splice(0,2).map((e=>parseInt(e,10)||0));if(t.push(0),t[0]===10)switch(t[1]){case 5:return`Leopard`;case 6:return`Snow Leopard`;case 7:return`Lion`;case 8:return`Mountain Lion`;case 9:return`Mavericks`;case 10:return`Yosemite`;case 11:return`El Capitan`;case 12:return`Sierra`;case 13:return`High Sierra`;case 14:return`Mojave`;case 15:return`Catalina`;default:return}}static getAndroidVersionName(e){let t=e.split(`.`).splice(0,2).map((e=>parseInt(e,10)||0));if(t.push(0),!(t[0]===1&&t[1]<5))return t[0]===1&&t[1]<6?`Cupcake`:t[0]===1&&t[1]>=6?`Donut`:t[0]===2&&t[1]<2?`Eclair`:t[0]===2&&t[1]===2?`Froyo`:t[0]===2&&t[1]>2?`Gingerbread`:t[0]===3?`Honeycomb`:t[0]===4&&t[1]<1?`Ice Cream Sandwich`:t[0]===4&&t[1]<4?`Jelly Bean`:t[0]===4&&t[1]>=4?`KitKat`:t[0]===5?`Lollipop`:t[0]===6?`Marshmallow`:t[0]===7?`Nougat`:t[0]===8?`Oreo`:t[0]===9?`Pie`:void 0}static getVersionPrecision(e){return e.split(`.`).length}static compareVersions(t,n,r=!1){let i=e.getVersionPrecision(t),a=e.getVersionPrecision(n),o=Math.max(i,a),s=0,c=e.map([t,n],(t=>{let n=o-e.getVersionPrecision(t),r=t+Array(n+1).join(`.0`);return e.map(r.split(`.`),(e=>Array(20-e.length).join(`0`)+e)).reverse()}));for(r&&(s=o-Math.min(i,a)),--o;o>=s;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===s)return 0;--o}else if(c[0][o]<c[1][o])return-1}}static map(e,t){let n=[],r;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n}static find(e,t){let n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){let r=e[n];if(t(r,n))return r}}static assign(e,...t){let n=e,r,i;if(Object.assign)return Object.assign(e,...t);for(r=0,i=t.length;r<i;r+=1){let e=t[r];typeof e==`object`&&e&&Object.keys(e).forEach((t=>{n[t]=e[t]}))}return e}static getBrowserAlias(e){return Ro[e]}static getBrowserTypeByAlias(e){return zo[e]||``}},Uo=/version\/(\d+(\.?_?\d+)+)/i,Wo=[{test:[/googlebot/i],describe(e){let t={name:`Googlebot`},n=R.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||R.getFirstMatch(Uo,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){let t={name:`Opera`},n=R.getFirstMatch(Uo,e)||R.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){let t={name:`Opera`},n=R.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||R.getFirstMatch(Uo,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:`Samsung Internet for Android`},n=R.getFirstMatch(Uo,e)||R.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){let t={name:`NAVER Whale Browser`},n=R.getFirstMatch(Uo,e)||R.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){let t={name:`MZ Browser`},n=R.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||R.getFirstMatch(Uo,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){let t={name:`Focus`},n=R.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||R.getFirstMatch(Uo,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){let t={name:`Swing`},n=R.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||R.getFirstMatch(Uo,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){let t={name:`Opera Coast`},n=R.getFirstMatch(Uo,e)||R.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){let t={name:`Opera Touch`},n=R.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||R.getFirstMatch(Uo,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){let t={name:`Yandex Browser`},n=R.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||R.getFirstMatch(Uo,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){let t={name:`UC Browser`},n=R.getFirstMatch(Uo,e)||R.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:`Maxthon`},n=R.getFirstMatch(Uo,e)||R.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){let t={name:`Epiphany`},n=R.getFirstMatch(Uo,e)||R.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){let t={name:`Puffin`},n=R.getFirstMatch(Uo,e)||R.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){let t={name:`Sleipnir`},n=R.getFirstMatch(Uo,e)||R.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){let t={name:`K-Meleon`},n=R.getFirstMatch(Uo,e)||R.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){let t={name:`WeChat`},n=R.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||R.getFirstMatch(Uo,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){let t={name:/qqbrowserlite/i.test(e)?`QQ Browser Lite`:`QQ Browser`},n=R.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||R.getFirstMatch(Uo,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){let t={name:`Internet Explorer`},n=R.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){let t={name:`Microsoft Edge`},n=R.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){let t={name:`Microsoft Edge`},n=R.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){let t={name:`Vivaldi`},n=R.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){let t={name:`SeaMonkey`},n=R.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){let t={name:`Sailfish`},n=R.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){let t={name:`Amazon Silk`},n=R.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){let t={name:`PhantomJS`},n=R.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){let t={name:`SlimerJS`},n=R.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t={name:`BlackBerry`},n=R.getFirstMatch(Uo,e)||R.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){let t={name:`WebOS Browser`},n=R.getFirstMatch(Uo,e)||R.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){let t={name:`Bada`},n=R.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){let t={name:`Tizen`},n=R.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||R.getFirstMatch(Uo,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){let t={name:`QupZilla`},n=R.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||R.getFirstMatch(Uo,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){let t={name:`Firefox`},n=R.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){let t={name:`Electron`},n=R.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){let t={name:`Miui`},n=R.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){let t={name:`Chromium`},n=R.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||R.getFirstMatch(Uo,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:`Chrome`},n=R.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){let t={name:`Google Search`},n=R.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t={name:`Android Browser`},n=R.getFirstMatch(Uo,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){let t={name:`PlayStation 4`},n=R.getFirstMatch(Uo,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:`Safari`},n=R.getFirstMatch(Uo,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){let t=e.search(`\\(`)===-1?/^(.*)\/(.*) /:/^(.*)\/(.*)[ \t]\((.*)/;return{name:R.getFirstMatch(t,e),version:R.getSecondMatch(t,e)}}}],Go=[{test:[/Roku\/DVP/],describe(e){let t=R.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Vo.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=R.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Vo.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=R.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=R.getWindowsVersionName(t);return{name:Vo.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:Vo.iOS},n=R.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){let t=R.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,`.`),n=R.getMacOSVersionName(t),r={name:Vo.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=R.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,`.`);return{name:Vo.iOS,version:t}}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t=R.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=R.getAndroidVersionName(t),r={name:Vo.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=R.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Vo.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=R.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||R.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||R.getFirstMatch(/\bbb(\d+)/i,e);return{name:Vo.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=R.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Vo.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=R.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Vo.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:Vo.Linux})},{test:[/CrOS/],describe:()=>({name:Vo.ChromeOS})},{test:[/PlayStation 4/],describe(e){let t=R.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Vo.PlayStation4,version:t}}}],Ko=[{test:[/googlebot/i],describe:()=>({type:`bot`,vendor:`Google`})},{test:[/huawei/i],describe(e){let t=R.getFirstMatch(/(can-l01)/i,e)&&`Nova`,n={type:Bo.mobile,vendor:`Huawei`};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:Bo.tablet,vendor:`Nexus`})},{test:[/ipad/i],describe:()=>({type:Bo.tablet,vendor:`Apple`,model:`iPad`})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:Bo.tablet,vendor:`Apple`,model:`iPad`})},{test:[/kftt build/i],describe:()=>({type:Bo.tablet,vendor:`Amazon`,model:`Kindle Fire HD 7`})},{test:[/silk/i],describe:()=>({type:Bo.tablet,vendor:`Amazon`})},{test:[/tablet(?! pc)/i],describe:()=>({type:Bo.tablet})},{test(e){let t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){let t=R.getFirstMatch(/(ipod|iphone)/i,e);return{type:Bo.mobile,vendor:`Apple`,model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:Bo.mobile,vendor:`Nexus`})},{test:[/[^-]mobi/i],describe:()=>({type:Bo.mobile})},{test:e=>e.getBrowserName(!0)===`blackberry`,describe:()=>({type:Bo.mobile,vendor:`BlackBerry`})},{test:e=>e.getBrowserName(!0)===`bada`,describe:()=>({type:Bo.mobile})},{test:e=>e.getBrowserName()===`windows phone`,describe:()=>({type:Bo.mobile,vendor:`Microsoft`})},{test(e){let t=Number(String(e.getOSVersion()).split(`.`)[0]);return e.getOSName(!0)===`android`&&t>=3},describe:()=>({type:Bo.tablet})},{test:e=>e.getOSName(!0)===`android`,describe:()=>({type:Bo.mobile})},{test:e=>e.getOSName(!0)===`macos`,describe:()=>({type:Bo.desktop,vendor:`Apple`})},{test:e=>e.getOSName(!0)===`windows`,describe:()=>({type:Bo.desktop})},{test:e=>e.getOSName(!0)===`linux`,describe:()=>({type:Bo.desktop})},{test:e=>e.getOSName(!0)===`playstation 4`,describe:()=>({type:Bo.tv})},{test:e=>e.getOSName(!0)===`roku`,describe:()=>({type:Bo.tv})}],qo=[{test:e=>e.getBrowserName(!0)===`microsoft edge`,describe(e){if(/\sedg\//i.test(e))return{name:Ho.Blink};let t=R.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Ho.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:Ho.Trident},n=R.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){let t={name:Ho.Presto},n=R.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){let t={name:Ho.Gecko},n=R.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:Ho.Blink})},{test:[/(apple)?webkit/i],describe(e){let t={name:Ho.WebKit},n=R.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],Jo=class{constructor(e,t=!1){if(e==null||e===``)throw Error(`UserAgent parameter can't be empty`);this._ua=e,this.parsedResult={},!0!==t&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let e=R.find(Wo,(e=>{if(typeof e.test==`function`)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw Error(`Browser's test function is not valid`)}));return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||``:this.getBrowser().name||``}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let e=R.find(Go,(e=>{if(typeof e.test==`function`)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw Error(`Browser's test function is not valid`)}));return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){let{name:t}=this.getOS();return e?String(t).toLowerCase()||``:t||``}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){let{type:t}=this.getPlatform();return e?String(t).toLowerCase()||``:t||``}parsePlatform(){this.parsedResult.platform={};let e=R.find(Ko,(e=>{if(typeof e.test==`function`)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw Error(`Browser's test function is not valid`)}));return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||``:this.getEngine().name||``}parseEngine(){this.parsedResult.engine={};let e=R.find(qo,(e=>{if(typeof e.test==`function`)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw Error(`Browser's test function is not valid`)}));return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return R.assign({},this.parsedResult)}satisfies(e){let t={},n=0,r={},i=0;if(Object.keys(e).forEach((a=>{let o=e[a];typeof o==`string`?(r[a]=o,i+=1):typeof o==`object`&&(t[a]=o,n+=1)})),n>0){let e=Object.keys(t),n=R.find(e,(e=>this.isOS(e)));if(n){let e=this.satisfies(t[n]);if(e!==void 0)return e}let r=R.find(e,(e=>this.isPlatform(e)));if(r){let e=this.satisfies(t[r]);if(e!==void 0)return e}}if(i>0){let e=Object.keys(r),t=R.find(e,(e=>this.isBrowser(e,!0)));if(t!==void 0)return this.compareVersion(r[t])}}isBrowser(e,t=!1){let n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=R.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1,i=this.getBrowserVersion();if(typeof i==`string`)return e[0]===`>`||e[0]===`<`?(n=e.substr(1),e[1]===`=`?(r=!0,n=e.substr(2)):t=[],e[0]===`>`?t.push(1):t.push(-1)):e[0]===`=`?n=e.substr(1):e[0]===`~`&&(r=!0,n=e.substr(1)),t.indexOf(R.compareVersions(i,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some((e=>this.is(e)))}},Yo=class{static getParser(e,t=!1){if(typeof e!=`string`)throw Error(`UserAgent should be a string`);return new Jo(e,t)}static parse(e){return new Jo(e).getResult()}static get BROWSER_MAP(){return zo}static get ENGINE_MAP(){return Ho}static get OS_MAP(){return Vo}static get PLATFORMS_MAP(){return Bo}};function Xo(){return Date.now()+Math.random().toString()}function Zo(){throw Error(`Method must be implemented in subclass`)}function Qo(e,t){return t!=null&&t.proxyUrl?t.proxyUrl+(t.proxyUrl.slice(-1)===`/`?``:`/`)+e.substring(8):e}function $o(e){return e!=null&&e.callObjectBundleUrlOverride?(console.warn(`The callObjectBundleUrlOverride property is deprecated and will be removed. Please use bundlePathOverride instead. When providing a bundlePathOverride, the URL should point to the directory containing all Daily bundles (call-machine-object-bundle.js and audio-processor-bundle.js).`),e.callObjectBundleUrlOverride):function(e){if(e!=null&&e.bundlePathOverride){var t=e.bundlePathOverride;return t.endsWith(`/`)?t.slice(0,-1):t}if(e!=null&&e.callObjectBundleUrlOverride){var n=e.callObjectBundleUrlOverride,r=n.substring(0,n.lastIndexOf(`/`));return r.endsWith(`/`)?r.slice(0,-1):r}var i=Qo(`https://c.daily.co/call-machine/versioned/0.89.1/static`,e);return i.endsWith(`/`)?i.slice(0,-1):i}(e)+`/call-machine-object-bundle.js`}function es(e){try{new URL(e)}catch{return!1}return!0}var ts=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,ns=`8.55.0`,rs=globalThis;function is(e,t,n){let r=n||rs,i=r.__SENTRY__=r.__SENTRY__||{},a=i[ns]=i[ns]||{};return a[e]||(a[e]=t())}var as=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,os=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],ss={};function cs(e){if(!(`console`in rs))return e();let t=rs.console,n={},r=Object.keys(ss);r.forEach((e=>{let r=ss[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}var z=is(`logger`,(function(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return as?os.forEach((n=>{t[n]=(...t)=>{e&&cs((()=>{rs.console[n](`Sentry Logger [${n}]:`,...t)}))}})):os.forEach((e=>{t[e]=()=>{}})),t})),ls=`?`,us=/\(error: (.*)\)/,ds=/captureMessage|captureException/;function fs(e){return e[e.length-1]||{}}var ps=`<anonymous>`;function ms(e){try{return e&&typeof e==`function`&&e.name||ps}catch{return ps}}function hs(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch{return}}}var gs={},_s={};function vs(e,t){gs[e]=gs[e]||[],gs[e].push(t)}function ys(e,t){if(!_s[e]){_s[e]=!0;try{t()}catch(t){as&&z.error(`Error while instrumenting ${e}`,t)}}}function bs(e,t){let n=e&&gs[e];if(n)for(let r of n)try{r(t)}catch(t){as&&z.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ms(r)}\nError:`,t)}}var xs=null;function Ss(){xs=rs.onerror,rs.onerror=function(e,t,n,r,i){return bs(`error`,{column:r,error:i,line:n,msg:e,url:t}),!!xs&&xs.apply(this,arguments)},rs.onerror.__SENTRY_INSTRUMENTED__=!0}var Cs=null;function ws(){Cs=rs.onunhandledrejection,rs.onunhandledrejection=function(e){return bs(`unhandledrejection`,e),!Cs||Cs.apply(this,arguments)},rs.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Ts(){return Es(rs),rs}function Es(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ns,t[ns]=t[ns]||{}}var Ds=Object.prototype.toString;function Os(e){switch(Ds.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return Rs(e,Error)}}function ks(e,t){return Ds.call(e)===`[object ${t}]`}function As(e){return ks(e,`ErrorEvent`)}function js(e){return ks(e,`DOMError`)}function Ms(e){return ks(e,`String`)}function Ns(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function Ps(e){return e===null||Ns(e)||typeof e!=`object`&&typeof e!=`function`}function Fs(e){return ks(e,`Object`)}function Is(e){return typeof Event<`u`&&Rs(e,Event)}function Ls(e){return!!(e&&e.then&&typeof e.then==`function`)}function Rs(e,t){try{return e instanceof t}catch{return!1}}function zs(e){return!(typeof e!=`object`||!e||!e.__isVue&&!e._isVue)}var Bs=rs;function Vs(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&i++<5&&(o=Hs(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=n.parentNode;return r.reverse().join(` > `)}catch{return`<unknown>`}}function Hs(e,t){let n=e,r=[];if(!n||!n.tagName)return``;if(Bs.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());let i=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(i&&i.length)i.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);let e=n.className;if(e&&Ms(e)){let t=e.split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let e of[`aria-label`,`type`,`name`,`title`,`alt`]){let t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join(``)}function Us(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Ws(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{zs(r)?n.push(`[VueViewModel]`):n.push(String(r))}catch{n.push(`[value cannot be serialized]`)}}return n.join(t)}function Gs(e,t,n=!1){return!!Ms(e)&&(ks(t,`RegExp`)?t.test(e):!!Ms(t)&&(n?e===t:e.includes(t)))}function Ks(e,t=[],n=!1){return t.some((t=>Gs(e,t,n)))}function qs(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i==`function`&&Ys(i,r);try{e[t]=i}catch{as&&z.log(`Failed to replace method "${t}" in object`,e)}}function Js(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{as&&z.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Ys(e,t){try{e.prototype=t.prototype=t.prototype||{},Js(e,`__sentry_original__`,t)}catch{}}function Xs(e){return e.__sentry_original__}function Zs(e){if(Os(e))return{message:e.message,name:e.name,stack:e.stack,...$s(e)};if(Is(e)){let t={type:e.type,target:Qs(e.target),currentTarget:Qs(e.currentTarget),...$s(e)};return typeof CustomEvent<`u`&&Rs(e,CustomEvent)&&(t.detail=e.detail),t}return e}function Qs(e){try{return t=e,typeof Element<`u`&&Rs(t,Element)?Vs(e):Object.prototype.toString.call(e)}catch{return`<unknown>`}var t}function $s(e){if(typeof e==`object`&&e){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function ec(e){return tc(e,new Map)}function tc(e,t){if(function(e){if(!Fs(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t===`Object`}catch{return!0}}(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let n of Object.getOwnPropertyNames(e))e[n]!==void 0&&(r[n]=tc(e[n],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach((e=>{r.push(tc(e,t))})),r}return e}function nc(){return Date.now()/1e3}var rc=function(){let{performance:e}=rs;if(!e||!e.now)return nc;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/1e3}();function ic(){let e=rs,t=e.crypto||e.msCrypto,n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,``);t&&t.getRandomValues&&(n=()=>{let e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return`10000000100040008000100000000000`.replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function ac(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function oc(e){let{message:t,event_id:n}=e;if(t)return t;let r=ac(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function sc(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function cc(e,t){let n=ac(e);if(!n)return;let r=n.mechanism;if(n.mechanism={type:`generic`,handled:!0,...r,...t},t&&`data`in t){let e={...r&&r.data,...t.data};n.mechanism.data=e}}function lc(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{Js(e,`__sentry_captured__`,!0)}catch{}return!1}var uc;function dc(e){return new pc((t=>{t(e)}))}function fc(e){return new pc(((t,n)=>{n(e)}))}(()=>{let{performance:e}=rs;if(!e||!e.now)return;let t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=i<t,o=e.timing&&e.timing.navigationStart,s=typeof o==`number`?Math.abs(o+n-r):t;(a||s<t)&&i<=s&&e.timeOrigin})(),function(e){e[e.PENDING=0]=`PENDING`,e[e.RESOLVED=1]=`RESOLVED`,e[e.REJECTED=2]=`REJECTED`}(uc||={});var pc=class e{constructor(t){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._state=uc.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(e){this._reject(e)}}then(t,n){return new e(((e,r)=>{this._handlers.push([!1,n=>{if(t)try{e(t(n))}catch(e){r(e)}else e(n)},t=>{if(n)try{e(n(t))}catch(e){r(e)}else r(t)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(t){return new e(((e,n)=>{let r,i;return this.then((e=>{i=!1,r=e,t&&t()}),(e=>{i=!0,r=e,t&&t()})).then((()=>{i?n(r):e(r)}))}))}__init(){this._resolve=e=>{this._setResult(uc.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(uc.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===uc.PENDING&&(Ls(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===uc.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||=(this._state===uc.RESOLVED&&e[1](this._value),this._state===uc.REJECTED&&e[2](this._value),!0)}))}}};function mc(e){let t=rc(),n={sid:ic(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>function(e){return ec({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&hc(n,e),n}function hc(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||rc(),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:ic()),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{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function gc(){return ic()}function _c(){return ic().substring(16)}function vc(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=vc(r[e],t[e],n-1));return r}var yc=`_sentrySpan`;function bc(e,t){t?Js(e,yc,t):delete e[yc]}function xc(e){return e[yc]}var Sc=class e{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:gc(),spanId:_c()}}clone(){let t=new e;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,bc(t,xc(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&hc(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let t=typeof e==`function`?e(this):e,[n,r]=t instanceof Sc?[t.getScopeData(),t.getRequestSession()]:Fs(t)?[e,e.requestSession]:[],{tags:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,bc(this,void 0),this._attachments=[],this.setPropagationContext({traceId:gc()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:100;if(n<=0)return this;let r={timestamp:nc(),...e};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:xc(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=vc(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:_c(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t&&t.event_id?t.event_id:ic();if(!this._client)return z.warn(`No client configured on scope - will not capture exception!`),n;let r=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n&&n.event_id?n.event_id:ic();if(!this._client)return z.warn(`No client configured on scope - will not capture message!`),r;let i=Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:ic();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(z.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),!1)}},Cc=class{constructor(e,t){let n,r;n=e||new Sc,r=t||new Sc,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return Ls(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}};function wc(){let e=Es(Ts());return e.stack=e.stack||new Cc(is(`defaultCurrentScope`,(()=>new Sc)),is(`defaultIsolationScope`,(()=>new Sc)))}function Tc(e){return wc().withScope(e)}function Ec(e,t){let n=wc();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function Dc(e){return wc().withScope((()=>e(wc().getIsolationScope())))}function Oc(e){let t=Es(e);return t.acs?t.acs:{withIsolationScope:Dc,withScope:Tc,withSetScope:Ec,withSetIsolationScope:(e,t)=>Dc(t),getCurrentScope:()=>wc().getScope(),getIsolationScope:()=>wc().getIsolationScope()}}function kc(){return Oc(Ts()).getCurrentScope()}function Ac(){return Oc(Ts()).getIsolationScope()}function jc(){return kc().getClient()}function Mc(e){let{traceId:t,spanId:n,parentSpanId:r}=e.getPropagationContext();return ec({trace_id:t,span_id:n,parent_span_id:r})}function Nc(e){let t=e._sentryMetrics;if(!t)return;let n={};for(let[,[e,r]]of t)(n[e]||(n[e]=[])).push(ec(r));return n}var Pc=/^sentry-/;function Fc(e){let t=function(e){if(!(!e||!Ms(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce(((e,t)=>{let n=Ic(t);return Object.entries(n).forEach((([t,n])=>{e[t]=n})),e}),{}):Ic(e)}(e);if(!t)return;let n=Object.entries(t).reduce(((e,[t,n])=>(t.match(Pc)&&(e[t.slice(7)]=n),e)),{});return Object.keys(n).length>0?n:void 0}function Ic(e){return e.split(`,`).map((e=>e.split(`=`).map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(t&&n&&(e[t]=n),e)),{})}var Lc=!1;function Rc(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext();return ec({parent_span_id:r?t:Vc(e).parent_span_id,span_id:r?_c():t,trace_id:n})}function zc(e){return typeof e==`number`?Bc(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Bc(e.getTime()):rc()}function Bc(e){return e>9999999999?e/1e3:e}function Vc(e){if(function(e){return typeof e.getSpanJSON==`function`}(e))return e.getSpanJSON();try{let{spanId:t,traceId:n}=e.spanContext();if(function(e){let t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){let{attributes:r,startTime:i,name:a,endTime:o,parentSpanId:s,status:c}=e;return ec({span_id:t,trace_id:n,data:r,description:a,parent_span_id:s,start_timestamp:zc(i),timestamp:zc(o)||void 0,status:Hc(c),op:r[`sentry.op`],origin:r[`sentry.origin`],_metrics_summary:Nc(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function Hc(e){if(e&&e.code!==0)return e.code===1?`ok`:e.message||`unknown_error`}function Uc(e){return e._sentryRootSpan||e}function Wc(){Lc||=(cs((()=>{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.")})),!0)}var Gc=`production`;function Kc(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=ec({environment:n.environment||Gc,release:n.release,public_key:r,trace_id:e});return t.emit(`createDsc`,i),i}function qc(e){let t=jc();if(!t)return{};let n=Uc(e),r=n._frozenDsc;if(r)return r;let i=n.spanContext().traceState,a=i&&i.get(`sentry.dsc`),o=a&&Fc(a);if(o)return o;let s=Kc(e.spanContext().traceId,t),c=Vc(n),l=c.data||{},u=l[`sentry.sample_rate`];u!=null&&(s.sample_rate=`${u}`);let d=l[`sentry.source`],f=c.description;return d!==`url`&&f&&(s.transaction=f),function(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=jc(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||`tracesSampleRate`in n||`tracesSampler`in n)}()&&(s.sampled=String(function(e){let{traceFlags:t}=e.spanContext();return t===1}(n))),t.emit(`createDsc`,s,n),s}var Jc=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Yc(e,t=!1){let{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 Xc(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function Zc(e){let t=typeof e==`string`?function(e){let t=Jc.exec(e);if(!t)return void cs((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return Xc({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}(e):Xc(e);if(t&&function(e){if(!as)return!0;let{port:t,projectId:n,protocol:r}=e;return!([`protocol`,`publicKey`,`host`,`projectId`].find((t=>!e[t]&&(z.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return e===`http`||e===`https`}(r)?t&&isNaN(parseInt(t,10))&&(z.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(z.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(z.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function Qc(e,t=100,n=1/0){try{return el(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function $c(e,t=3,n=102400){let r=Qc(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?$c(e,t-1,n):r;var i}function el(e,t,n=1/0,r=1/0,i=function(){let e=typeof WeakSet==`function`,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=function(e,t){try{if(e===`domain`&&t&&typeof t==`object`&&t._events)return`[Domain]`;if(e===`domainEmitter`)return`[DomainEmitter]`;if(typeof global<`u`&&t===global)return`[Global]`;if(typeof window<`u`&&t===window)return`[Window]`;if(typeof document<`u`&&t===document)return`[Document]`;if(zs(t))return`[VueViewModel]`;if(Fs(n=t)&&`nativeEvent`in n&&`preventDefault`in n&&`stopPropagation`in n)return`[SyntheticEvent]`;if(typeof t==`number`&&!Number.isFinite(t))return`[${t}]`;if(typeof t==`function`)return`[Function: ${ms(t)}]`;if(typeof t==`symbol`)return`[${String(t)}]`;if(typeof t==`bigint`)return`[BigInt: ${String(t)}]`;let r=function(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:`null prototype`}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!s.startsWith(`[object `))return s;if(t.__sentry_skip_normalization__)return t;let 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 ~]`;let l=t;if(l&&typeof l.toJSON==`function`)try{return el(``,l.toJSON(),c-1,r,i)}catch{}let u=Array.isArray(t)?[]:{},d=0,f=Zs(t);for(let e in f){if(!Object.prototype.hasOwnProperty.call(f,e))continue;if(d>=r){u[e]=`[MaxProperties ~]`;break}let t=f[e];u[e]=el(e,t,c-1,r,i),d++}return o(t),u}function tl(e,t=[]){return[e,t]}function nl(e,t){let[n,r]=e;return[n,[...r,t]]}function rl(e,t){let n=e[1];for(let e of n)if(t(e,e[0].type))return!0;return!1}function il(e){return rs.__SENTRY__&&rs.__SENTRY__.encodePolyfill?rs.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function al(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[il(r),e]:r.push(typeof e==`string`?il(e):e)}for(let e of n){let[t,n]=e;if(i(`\n${JSON.stringify(t)}\n`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(Qc(n))}i(e)}}return typeof r==`string`?r:function(e){let t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}(r)}function ol(e){let t=typeof e.data==`string`?il(e.data):e.data;return[ec({type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var sl={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 cl(e){return sl[e]}function ll(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function ul(e,t,n,r){let i=ll(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;(function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])})(e,n&&n.sdk);let o=function(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Yc(r)},...i&&{trace:ec({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,tl(o,[[{type:a},e]])}function dl(e,t,n,r=0){return new pc(((i,a)=>{let o=e[r];if(t===null||typeof o!=`function`)i(t);else{let s=o({...t},n);ts&&o.id&&s===null&&z.log(`Event processor "${o.id}" dropped event`),Ls(s)?s.then((t=>dl(e,t,n,r+1).then(i))).then(null,a):dl(e,s,n,r+1).then(i).then(null,a)}}))}var fl,pl,ml;function hl(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;(function(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t,c=ec(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});let l=ec(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});let u=ec(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});let d=ec(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)})(e,t),r&&function(e,t){e.contexts={trace:Rc(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:qc(t),...e.sdkProcessingMetadata};let n=Vc(Uc(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,a)}function gl(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:f,transactionName:p,span:m}=t;_l(e,`extra`,n),_l(e,`tags`,r),_l(e,`user`,i),_l(e,`contexts`,a),e.sdkProcessingMetadata=vc(e.sdkProcessingMetadata,s,2),o&&(e.level=o),p&&(e.transactionName=p),m&&(e.span=m),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function _l(e,t,n){e[t]=vc(e[t],n,1)}function vl(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ic(),timestamp:t.timestamp||nc()},l=n.integrations||e.integrations.map((e=>e.name));(function(e,t){let{environment:n,release:r,dist:i,maxValueLength:a=250}=t;e.environment=e.environment||n||Gc,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i),e.message&&=Us(e.message,a);let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=Us(o.value,a));let s=e.request;s&&s.url&&(s.url=Us(s.url,a))})(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&function(e,t){let n=function(e){let t=rs._sentryDebugIds;if(!t)return{};let n=Object.keys(t);return ml&&n.length===pl||(pl=n.length,ml=n.reduce(((n,r)=>{fl||={};let i=fl[r];if(i)n[i[0]]=i[1];else{let i=e(r);for(let e=i.length-1;e>=0;e--){let a=i[e],o=a&&a.filename,s=t[r];if(o&&s){n[o]=s,fl[r]=[o,s];break}}}return n}),{})),ml}(t);try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{n&&e.filename&&(e.debug_id=n[e.filename])}))}))}catch{}}(c,e.stackParser);let u=function(e,t){if(!t)return e;let n=e?e.clone():new Sc;return n.update(t),n}(r,n.captureContext);n.mechanism&&cc(c,n.mechanism);let d=i?i.getEventProcessors():[],f=is(`globalScope`,(()=>new Sc)).getScopeData();a&&gl(f,a.getScopeData()),u&&gl(f,u.getScopeData());let p=[...n.attachments||[],...f.attachments];return p.length&&(n.attachments=p),hl(c,f),dl([...d,...f.eventProcessors],c,n).then((e=>(e&&function(e){let t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})}))}(e),typeof o==`number`&&o>0?function(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:Qc(e.data,t,n)}})))},...e.user&&{user:Qc(e.user,t,n)},...e.contexts&&{contexts:Qc(e.contexts,t,n)},...e.extra&&{extra:Qc(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Qc(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:Qc(e.data,t,n)}})))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=Qc(e.contexts.flags,3,n)),r}(e,o,s):e)))}function yl(e){if(e)return function(e){return e instanceof Sc||typeof e==`function`}(e)||function(e){return Object.keys(e).some((e=>bl.includes(e)))}(e)?{captureContext:e}:e}var bl=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`requestSession`,`propagationContext`];function xl(e,t){return kc().captureEvent(e,t)}function Sl(e){let t=jc(),n=Ac(),r=kc(),{release:i,environment:a=Gc}=t&&t.getOptions()||{},{userAgent:o}=rs.navigator||{},s=mc({release:i,environment:a,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession();return c&&c.status===`ok`&&hc(c,{status:`exited`}),Cl(),n.setSession(s),r.setSession(s),s}function Cl(){let e=Ac(),t=kc(),n=t.getSession()||e.getSession();n&&function(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),hc(e,n)}(n),wl(),e.setSession(),t.setSession()}function wl(){let e=Ac(),t=kc(),n=jc(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Tl(e=!1){e?Cl():wl()}function El(e,t,n){return t||`${function(e){return`${function(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}var Dl=[];function Ol(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function kl(e,t,n){if(n[t.name])ts&&z.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,Dl.indexOf(t.name)===-1&&typeof t.setupOnce==`function`&&(t.setupOnce(),Dl.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,((t,r)=>n(t,r,e)))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}ts&&z.log(`Integration installed: ${t.name}`)}}var Al=class extends Error{constructor(e,t=`warn`){super(e),this.message=e,this.logLevel=t}},jl=`Not capturing exception because it's already been captured.`,Ml=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Zc(e.dsn):ts&&z.warn(`No DSN provided, client will not send events.`),this._dsn){let t=El(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}let t=[`enableTracing`,`tracesSampleRate`,`tracesSampler`].find((t=>t in e&&e[t]==null));t&&cs((()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(e,t,n){let r=ic();if(lc(e))return ts&&z.log(jl),r;let i={event_id:r,...t};return this._process(this.eventFromException(e,i).then((e=>this._captureEvent(e,i,n)))),i.event_id}captureMessage(e,t,n,r){let i={event_id:ic(),...n},a=Ns(e)?e:String(e),o=Ps(e)?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(o.then((e=>this._captureEvent(e,i,r)))),i.event_id}captureEvent(e,t,n){let r=ic();if(t&&t.originalException&&lc(t.originalException))return ts&&z.log(jl),r;let i={event_id:r,...t},a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,a||n)),i.event_id}captureSession(e){typeof e.release==`string`?(this.sendSession(e),hc(e,{init:!1})):ts&&z.warn(`Discarded session because of missing or non-string release`)}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.emit(`flush`),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):dc(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit(`close`),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith(`Spotlight`))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];kl(this,e,this._integrations),t||Ol(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=ul(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=nl(n,ol(e));let r=this.sendEnvelope(n);r&&r.then((t=>this.emit(`afterSendEvent`,e,t)),null)}sendSession(e){let t=function(e,t,n,r){let i=ll(n);return tl({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Yc(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=typeof n==`number`?n:1,i=`${e}:${t}`;ts&&z.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,t){let n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{let e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(ts&&z.error(`Error while sending envelope:`,e),e))):(ts&&z.error(`Transport disabled`),dc({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=function(e,t){let n={};return t.forEach((t=>{t&&kl(e,t,n)})),n}(this,e),Ol(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;for(let e of i){let t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(hc(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new pc((t=>{let n=0,r=setInterval((()=>{this._numProcessing==0?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&this._transport!==void 0}_prepareEvent(e,t,n=kc(),r=Ac()){let i=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a.length>0&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),vl(i,e,t,n,this,r).then((e=>e===null?e:(e.contexts={trace:Mc(n),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:function(e,t){let n=t.getPropagationContext();return n.dsc||Kc(n.traceId,e)}(this,n),...e.sdkProcessingMetadata},e)))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{ts&&(e instanceof Al&&e.logLevel===`log`?z.log(e.message):z.warn(e))}))}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,a=Pl(e),o=Nl(e),s=e.type||`error`,c=`before send for type \`${s}\``,l=i===void 0?void 0:function(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t;ts&&z.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}(i);if(o&&typeof l==`number`&&Math.random()>l)return this.recordDroppedEvent(`sample_rate`,`error`,e),fc(new Al(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,`log`));let u=s===`replay_event`?`replay`:s,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then((n=>{if(n===null)throw this.recordDroppedEvent(`event_processor`,u,e),new Al("An event processor returned `null`, will not send event.",`log`);return t.data&&!0===t.data.__sentry__?n:function(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Ls(e))return e.then((e=>{if(!Fs(e)&&e!==null)throw new Al(n);return e}),(e=>{throw new Al(`${t} rejected with ${e}`)}));if(!Fs(e)&&e!==null)throw new Al(n);return e}(function(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,beforeSendSpan:o}=t;if(Nl(n)&&i)return i(n,r);if(Pl(n)){if(n.spans&&o){let t=[];for(let r of n.spans){let n=o(r);n?t.push(n):(Wc(),e.recordDroppedEvent(`before_send`,`span`))}n.spans=t}if(a){if(n.spans){let e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(n,r)}}return n}(this,r,n,t),c)})).then((r=>{if(r===null){if(this.recordDroppedEvent(`before_send`,u,e),a){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw new Al(`${c} returned \`null\`, will not send event.`,`log`)}let i=n&&n.getSession();if(!a&&i&&this._updateSessionFromEvent(i,r),a){let e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let o=r.transaction_info;return a&&o&&r.transaction!==e.transaction&&(r.transaction_info={...o,source:`custom`}),this.sendEvent(r,t),r})).then(null,(e=>{throw e instanceof Al?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Al(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}}))}_flushOutcomes(){ts&&z.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0)return void(ts&&z.log(`No outcomes to send`));if(!this._dsn)return void(ts&&z.log(`No dsn provided, will not send outcomes`));ts&&z.log(`Sending outcomes:`,e);let t=(n=e,tl((r=this._options.tunnel&&Yc(this._dsn))?{dsn:r}:{},[[{type:`client_report`},{timestamp:i||nc(),discarded_events:n}]]));var n,r,i;this.sendEnvelope(t)}};function Nl(e){return e.type===void 0}function Pl(e){return e.type===`transaction`}function Fl(e){let t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(e===void 0||t.length<e))return fc(new Al(`Not adding Promise because buffer limit was reached.`));let i=r();return t.indexOf(i)===-1&&t.push(i),i.then((()=>n(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(e){return new pc(((n,r)=>{let i=t.length;if(!i)return n(!0);let a=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{dc(e).then((()=>{--i||(clearTimeout(a),n(!0))}),r)}))}))}}}function Il(e,{statusCode:t,headers:n},r=Date.now()){let i={...e},a=n&&n[`x-sentry-rate-limits`],o=n&&n[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=1e3*(isNaN(o)?60:o);if(n)for(let e of n.split(`;`))e===`metric_bucket`&&a&&!a.split(`;`).includes(`custom`)||(i[e]=r+s);else i.all=r+s}else o?i.all=r+function(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(o,r):t===429&&(i.all=r+6e4);return i}function Ll(e,t,n=Fl(e.bufferSize||64)){let r={};return{send:function(i){let a=[];if(rl(i,((t,n)=>{let i=cl(n);if(function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)){let r=Rl(t,n);e.recordDroppedEvent(`ratelimit_backoff`,i,r)}else a.push(t)})),a.length===0)return dc({});let o=tl(i[0],a),s=t=>{rl(o,((n,r)=>{let i=Rl(n,r);e.recordDroppedEvent(t,cl(r),i)}))};return n.add((()=>t({body:al(o)}).then((e=>(e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&ts&&z.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Il(r,e),e)),(e=>{throw s(`network_error`),e})))).then((e=>e),(e=>{if(e instanceof Al)return ts&&z.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),dc({});throw e}))},flush:e=>n.drain(e)}}function Rl(e,t){if(t===`event`||t===`transaction`)return Array.isArray(e)?e[1]:void 0}var zl=100;function Bl(e,t){let n=jc(),r=Ac();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=zl}=n.getOptions();if(a<=0)return;let o={timestamp:nc(),...e},s=i?cs((()=>i(o,t))):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var Vl,Hl=new WeakMap,Ul=()=>({name:`FunctionToString`,setupOnce(){Vl=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Xs(this),n=Hl.has(jc())&&t!==void 0?t:this;return Vl.apply(n,e)}}catch{}},setup(e){Hl.set(e,!0)}}),Wl=[/^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+$/],Gl=(e={})=>({name:`InboundFilters`,processEvent(t,n,r){return function(e,t){return t.ignoreInternal&&function(e){try{return e.exception.values[0].type===`SentryError`}catch{}return!1}(e)?(ts&&z.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${oc(e)}`),!0):function(e,t){return e.type||!t||!t.length?!1:function(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}(e).some((e=>Ks(e,t)))}(e,t.ignoreErrors)?(ts&&z.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${oc(e)}`),!0):function(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&e.type!==`Error`||e.value))}(e)?(ts&&z.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${oc(e)}`),!0):function(e,t){if(e.type!==`transaction`||!t||!t.length)return!1;let n=e.transaction;return!!n&&Ks(n,t)}(e,t.ignoreTransactions)?(ts&&z.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${oc(e)}`),!0):function(e,t){if(!t||!t.length)return!1;let n=Kl(e);return!!n&&Ks(n,t)}(e,t.denyUrls)?(ts&&z.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${oc(e)}.\nUrl: ${Kl(e)}`),!0):function(e,t){if(!t||!t.length)return!0;let n=Kl(e);return!n||Ks(n,t)}(e,t.allowUrls)?!1:(ts&&z.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${oc(e)}.\nUrl: ${Kl(e)}`),!0)}(t,function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Wl],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal===void 0||e.ignoreInternal}}(e,r.getOptions()))?null:t}});function Kl(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}(t):null}catch{return ts&&z.error(`Cannot extract url for event ${oc(e)}`),null}}function ql(e,t,n=250,r,i,a,o){if(!(a.exception&&a.exception.values&&o&&Rs(o.originalException,Error)))return;let s=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;var c,l;s&&(a.exception.values=(c=Jl(e,t,i,o.originalException,r,a.exception.values,s,0),l=n,c.map((e=>(e.value&&=Us(e.value,l),e)))))}function Jl(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(Rs(r[i],Error)){Yl(o,s);let a=e(t,r[i]),l=c.length;Xl(a,i,l,s),c=Jl(e,t,n,r[i],i,[a,...c],a,l)}return Array.isArray(r.errors)&&r.errors.forEach(((r,a)=>{if(Rs(r,Error)){Yl(o,s);let l=e(t,r),u=c.length;Xl(l,`errors[${a}]`,u,s),c=Jl(e,t,n,r,i,[l,...c],l,u)}})),c}function Yl(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 Xl(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 Zl(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let 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 Ql(){`console`in rs&&os.forEach((function(e){e in rs.console&&qs(rs.console,e,(function(t){return ss[e]=t,function(...t){bs(`console`,{args:t,level:e});let n=ss[e];n&&n.apply(rs.console,t)}}))}))}function $l(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var eu=()=>{let e;return{name:`Dedupe`,processEvent(t){if(t.type)return t;try{if(function(e,t){return t?!!(function(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!nu(e,t)||!tu(e,t))}(e,t)||function(e,t){let n=ru(t),r=ru(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!nu(e,t)||!tu(e,t))}(e,t)):!1}(t,e))return ts&&z.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}};function tu(e,t){let n=hs(e),r=hs(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function nu(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 ru(e){return e.exception&&e.exception.values&&e.exception.values[0]}function iu(e){return e===void 0?void 0:e>=400&&e<500?`warning`:e>=500?`error`:void 0}var au=rs;function ou(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function su(){if(typeof EdgeRuntime==`string`)return!0;if(!function(){if(!(`fetch`in au))return!1;try{return new Headers,new Request(`http://www.example.com`),new Response,!0}catch{return!1}}())return!1;if(ou(au.fetch))return!0;let e=!1,t=au.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=ou(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){as&&z.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function cu(e,t){let n=`fetch`;vs(n,e),ys(n,(()=>function(e,t=!1){t&&!su()||qs(rs,`fetch`,(function(t){return function(...n){let r=Error(),{method:i,url:a}=function(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:uu(t),method:lu(n,`method`)?String(n.method).toUpperCase():`GET`}}let t=e[0];return{url:uu(t),method:lu(t,`method`)?String(t.method).toUpperCase():`GET`}}(n),o={args:n,fetchData:{method:i,url:a},startTimestamp:1e3*rc(),virtualError:r};return e||bs(`fetch`,{...o}),t.apply(rs,n).then((async t=>(e?e(t):bs(`fetch`,{...o,endTimestamp:1e3*rc(),response:t}),t)),(e=>{throw bs(`fetch`,{...o,endTimestamp:1e3*rc(),error:e}),Os(e)&&e.stack===void 0&&(e.stack=r.stack,Js(e,`framesToPop`,1)),e}))}}))}(void 0,t)))}function lu(e,t){return!!e&&typeof e==`object`&&!!e[t]}function uu(e){return typeof e==`string`?e:e?lu(e,`url`)?e.url:e.toString?e.toString():``:``}var du=rs,fu=rs,pu=0;function mu(){return pu>0}function hu(e,t={}){if(!function(e){return typeof e==`function`}(e))return e;try{let t=e.__sentry_wrapped__;if(t)return typeof t==`function`?t:e;if(Xs(e))return e}catch{return e}let n=function(...n){try{let r=n.map((e=>hu(e,t)));return e.apply(this,r)}catch(e){throw pu++,setTimeout((()=>{pu--})),function(...e){let t=Oc(Ts());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}((r=>{var i,a;r.addEventProcessor((e=>(t.mechanism&&(sc(e,void 0,void 0),cc(e,t.mechanism)),e.extra={...e.extra,arguments:n},e))),i=e,kc().captureException(i,yl(a))})),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}Ys(n,e),Js(e,`__sentry_wrapped__`,n);try{Object.getOwnPropertyDescriptor(n,`name`).configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}var gu=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function _u(e,t){let n=bu(e,t),r={type:Cu(t),value:wu(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function vu(e,t,n,r){let i=jc(),a=i&&i.getOptions().normalizeDepth,o=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}(t),s={__serialized__:$c(t,a)};if(o)return{exception:{values:[_u(e,o)]},extra:s};let c={exception:{values:[{type:Is(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:Du(t,{isUnhandledRejection:r})}]},extra:s};if(n){let t=bu(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function yu(e,t){return{exception:{values:[_u(e,t)]}}}function bu(e,t){let n=t.stacktrace||t.stack||``,r=function(e){return e&&xu.test(e.message)?1:0}(t),i=function(e){return typeof e.framesToPop==`number`?e.framesToPop:0}(t);try{return e(n,r,i)}catch{}return[]}var xu=/Minified React error #\d+;/i;function Su(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function Cu(e){let t=e&&e.name;return!t&&Su(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function wu(e){let t=e&&e.message;return t?t.error&&typeof t.error.message==`string`?t.error.message:Su(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:`No error message`}function Tu(e,t,n,r,i){let a;if(As(t)&&t.error)return yu(e,t.error);if(js(t)||ks(t,`DOMException`)){let i=t;if(`stack`in t)a=yu(e,t);else{let t=i.name||(js(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=Eu(e,o,n,r),sc(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return Os(t)?yu(e,t):Fs(t)||Is(t)?(a=vu(e,t,n,i),cc(a,{synthetic:!0}),a):(a=Eu(e,t,n,r),sc(a,`${t}`,void 0),cc(a,{synthetic:!0}),a)}function Eu(e,t,n,r){let i={};if(r&&n){let r=bu(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),cc(i,{synthetic:!0})}if(Ns(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function Du(e,{isUnhandledRejection:t}){let n=function(e,t=40){let n=Object.keys(Zs(e));n.sort();let r=n[0];if(!r)return`[object has no keys]`;if(r.length>=t)return Us(r,t);for(let e=n.length;e>0;e--){let r=n.slice(0,e).join(`, `);if(!(r.length>t))return e===n.length?r:Us(r,t)}return``}(e),r=t?`promise rejection`:`exception`;return As(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Is(e)?`Event \`${function(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}var Ou=class extends Ml{constructor(e){let t={parentSpanIsAlwaysRootSpan:!0,...e};(function(e,t,n=[t],r=`npm`){let i=e._metadata||{};i.sdk||={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:ns}))),version:ns},e._metadata=i})(t,`browser`,[`browser`],fu.SENTRY_SDK_SOURCE||`npm`),super(t),t.sendClientReports&&fu.document&&fu.document.addEventListener(`visibilitychange`,(()=>{fu.document.visibilityState===`hidden`&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){let i=Tu(e,t,n&&n.syntheticException||void 0,r);return cc(i),i.level=`error`,n&&n.event_id&&(i.event_id=n.event_id),dc(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return function(e,t,n=`info`,r,i){let a=Eu(e,t,r&&r.syntheticException||void 0,i);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),dc(a)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(gu&&z.warn(`SDK not enabled, will not capture user feedback.`));let t=function(e,{metadata:t,tunnel:n,dsn:r}){return tl({event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Yc(r)}},[function(e){return[{type:`user_report`},e]}(e)])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n)}},ku=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Au=rs,ju,Mu,Nu,Pu;function Fu(){if(!Au.document)return;let e=bs.bind(null,`dom`),t=Iu(e,!0);Au.document.addEventListener(`click`,t,!1),Au.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach((t=>{let n=Au[t],r=n&&n.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty(`addEventListener`)&&(qs(r,`addEventListener`,(function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=Iu(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}})),qs(r,`removeEventListener`,(function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}})))}))}function Iu(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return e===`keypress`&&(!t||!t.tagName||t.tagName!==`INPUT`&&t.tagName!==`TEXTAREA`&&!t.isContentEditable)}(n.type,r))return;Js(n,`_sentryCaptured`,!0),r&&!r._sentryId&&Js(r,`_sentryId`,ic());let i=n.type===`keypress`?`input`:n.type;(function(e){if(e.type!==Mu)return!1;try{if(!e.target||e.target._sentryId!==Nu)return!1}catch{}return!0})(n)||(e({event:n,name:i,global:t}),Mu=n.type,Nu=r?r._sentryId:void 0),clearTimeout(ju),ju=Au.setTimeout((()=>{Nu=void 0,Mu=void 0}),1e3)}}function Lu(e){let t=`history`;vs(t,e),ys(t,Ru)}function Ru(){if(!function(){let e=du.chrome,t=e&&e.app&&e.app.runtime,n=`history`in du&&!!du.history.pushState&&!!du.history.replaceState;return!t&&n}())return;let e=Au.onpopstate;function t(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let e=Pu,t=String(n);Pu=t,bs(`history`,{from:e,to:t})}return e.apply(this,t)}}Au.onpopstate=function(...t){let n=Au.location.href,r=Pu;if(Pu=n,bs(`history`,{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},qs(Au.history,`pushState`,t),qs(Au.history,`replaceState`,t)}var zu={};function Bu(e){zu[e]=void 0}var Vu=`__sentry_xhr_v3__`;function Hu(){if(!Au.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=1e3*rc(),a=Ms(n[0])?n[0].toUpperCase():void 0,o=function(e){if(Ms(e))return e;try{return e.toString()}catch{}}(n[1]);if(!a||!o)return e.apply(t,n);t[Vu]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[Vu];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}bs(`xhr`,{endTimestamp:1e3*rc(),startTimestamp:i,xhr:t,virtualError:r})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(s(),e.apply(t,n))}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[Vu];return a&&Ms(r)&&Ms(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[Vu];return r?(n[0]!==void 0&&(r.body=n[0]),bs(`xhr`,{startTimestamp:1e3*rc(),xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function Uu(e,t=function(e){let t=zu[e];if(t)return t;let n=Au[e];if(ou(n))return zu[e]=n.bind(Au);let r=Au.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){ku&&z.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(zu[e]=n.bind(Au))}(`fetch`)){let n=0,r=0;return Ll(e,(function(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Bu(`fetch`),fc(`No fetch implementation available`);try{return t(e.url,o).then((e=>(n-=a,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get(`X-Sentry-Rate-Limits`),"retry-after":e.headers.get(`Retry-After`)}})))}catch(e){return Bu(`fetch`),n-=a,r--,fc(e)}}))}function Wu(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?ls:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var Gu=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ku=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,qu=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ju=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Yu=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Xu=function(...e){let t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0,r=0)=>{let i=[],a=e.split(`
32
+ `);for(let e=n;e<a.length;e++){let n=a[e];if(n.length>1024)continue;let o=us.test(n)?n.replace(us,`$1`):n;if(!o.match(/\S*Error: /)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=50+r)break}}return function(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(fs(t).function||``)&&t.pop(),t.reverse(),ds.test(fs(t).function||``)&&(t.pop(),ds.test(fs(t).function||``)&&t.pop()),t.slice(0,50).map((e=>({...e,filename:e.filename||fs(t).filename,function:e.function||ls})))}(i.slice(r))}}([30,e=>{let t=Gu.exec(e);if(t){let[,e,n,r]=t;return Wu(e,ls,+n,+r)}let n=Ku.exec(e);if(n){if(n[2]&&n[2].indexOf(`eval`)===0){let e=qu.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}let[e,t]=Zu(n[1]||ls,n[2]);return Wu(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{let t=Ju.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=Yu.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||ls;return[n,e]=Zu(n,e),Wu(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Zu=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?ls:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Qu=1024,$u=(e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:`Breadcrumbs`,setup(e){var n;t.console&&function(e){let t=`console`;vs(t,e),ys(t,Ql)}(function(e){return function(t){if(jc()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:$l(t.level),message:Ws(t.args,` `)};if(t.level===`assert`){if(!1!==t.args[0])return;n.message=`Assertion failed: ${Ws(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1)}Bl(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(jc()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>Qu&&(gu&&z.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${o} was configured. Sentry will use 1024 instead.`),o=Qu),typeof a==`string`&&(a=[a]);try{let e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=Vs(t,{keyAttrs:a,maxStringLength:o}),i=function(e){if(!Bs.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),Bl(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),vs(`dom`,n),ys(`dom`,Fu)),t.xhr&&function(e){vs(`xhr`,e),ys(`xhr`,Hu)}(function(e){return function(t){if(jc()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Vu];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};Bl({category:`xhr`,data:l,type:`http`,level:iu(s)},u)}}(e)),t.fetch&&cu(function(e){return function(t){if(jc()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||t.fetchData.method!==`POST`))if(t.error)Bl({category:`fetch`,data:t.fetchData,level:`error`,type:`http`},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r});else{let e=t.response,i={...t.fetchData,status_code:e&&e.status},a={input:t.args,response:e,startTimestamp:n,endTimestamp:r};Bl({category:`fetch`,data:i,type:`http`,level:iu(i.status_code)},a)}}}(e)),t.history&&Lu(function(e){return function(t){if(jc()!==e)return;let n=t.from,r=t.to,i=Zl(fu.location.href),a=n?Zl(n):void 0,o=Zl(r);a&&a.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),Bl({category:`navigation`,data:{from:n,to:r}})}}(e)),t.sentry&&e.on(`beforeSendEvent`,function(e){return function(t){jc()===e&&Bl({category:`sentry.`+(t.type===`transaction`?`transaction`:`event`),event_id:t.event_id,level:t.level,message:oc(t)},{event:t})}}(e))}}},ed=`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`.split(`.`),td=(e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:`BrowserApiErrors`,setupOnce(){t.setTimeout&&qs(fu,`setTimeout`,nd),t.setInterval&&qs(fu,`setInterval`,nd),t.requestAnimationFrame&&qs(fu,`requestAnimationFrame`,rd),t.XMLHttpRequest&&`XMLHttpRequest`in fu&&qs(XMLHttpRequest.prototype,`send`,id);let e=t.eventTarget;e&&(Array.isArray(e)?e:ed).forEach(ad)}}};function nd(e){return function(...t){let n=t[0];return t[0]=hu(n,{mechanism:{data:{function:ms(e)},handled:!1,type:`instrument`}}),e.apply(this,t)}}function rd(e){return function(t){return e.apply(this,[hu(t,{mechanism:{data:{function:`requestAnimationFrame`,handler:ms(e)},handled:!1,type:`instrument`}})])}}function id(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach((e=>{e in n&&typeof n[e]==`function`&&qs(n,e,(function(t){let n={mechanism:{data:{function:e,handler:ms(t)},handled:!1,type:`instrument`}},r=Xs(t);return r&&(n.mechanism.data.handler=ms(r)),hu(t,n)}))})),e.apply(this,t)}}function ad(e){let t=fu[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty(`addEventListener`)&&(qs(n,`addEventListener`,(function(t){return function(n,r,i){try{typeof r.handleEvent==`function`&&(r.handleEvent=hu(r.handleEvent,{mechanism:{data:{function:`handleEvent`,handler:ms(r),target:e},handled:!1,type:`instrument`}}))}catch{}return t.apply(this,[n,hu(r,{mechanism:{data:{function:`addEventListener`,handler:ms(r),target:e},handled:!1,type:`instrument`}}),i])}})),qs(n,`removeEventListener`,(function(e){return function(t,n,r){try{let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch{}return e.call(this,t,n,r)}})))}var od=()=>({name:`BrowserSession`,setupOnce(){fu.document===void 0?gu&&z.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."):(Sl({ignoreDuration:!0}),Tl(),Lu((({from:e,to:t})=>{e!==void 0&&e!==t&&(Sl({ignoreDuration:!0}),Tl())})))}}),sd=(e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:`GlobalHandlers`,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(function(e){(function(e){let t=`error`;vs(t,e),ys(t,Ss)})((t=>{let{stackParser:n,attachStacktrace:r}=ld();if(jc()!==e||mu())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=function(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[],l=r,u=n,d=Ms(t)&&t.length>0?t:function(){try{return Bs.document.location.href}catch{return``}}();return c.length===0&&c.push({colno:l,filename:d,function:ls,in_app:!0,lineno:u}),e}(Tu(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,xl(l,{originalException:c,mechanism:{handled:!1,type:`onerror`}})}))}(e),cd(`onerror`)),t.onunhandledrejection&&(function(e){(function(e){let t=`unhandledrejection`;vs(t,e),ys(t,ws)})((t=>{let{stackParser:n,attachStacktrace:r}=ld();if(jc()!==e||mu())return;let i=function(e){if(Ps(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}(t),a=Ps(i)?{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:Tu(n,i,void 0,r,!0);a.level=`error`,xl(a,{originalException:i,mechanism:{handled:!1,type:`onunhandledrejection`}})}))}(e),cd(`onunhandledrejection`))}}};function cd(e){gu&&z.log(`Global Handler attached: ${e}`)}function ld(){let e=jc();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var ud=()=>({name:`HttpContext`,preprocessEvent(e){if(!fu.navigator&&!fu.location&&!fu.document)return;let t=e.request&&e.request.url||fu.location&&fu.location.href,{referrer:n}=fu.document||{},{userAgent:r}=fu.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}};e.request={...e.request,...t&&{url:t},headers:i}}}),dd=(e={})=>{let t=e.limit||5,n=e.key||`cause`;return{name:`LinkedErrors`,preprocessEvent(e,r,i){let a=i.getOptions();ql(_u,a.stackParser,a.maxValueLength,n,t,e,r)}}},fd=`loading`,pd=`loaded`,md=`joining-meeting`,hd=`joined-meeting`,gd=`left-meeting`,_d=`error`,vd=`unknown`,yd=`full`,bd=`base`,xd=`iframe-ready-for-launch-config`,Sd=`iframe-launch-config`,Cd=`theme-updated`,wd=`loading`,Td=`loaded`,Ed=`started-camera`,Dd=`camera-error`,Od=`joining-meeting`,kd=`joined-meeting`,Ad=`left-meeting`,jd=`participant-joined`,Md=`participant-updated`,Nd=`participant-left`,Pd=`participant-counts-updated`,Fd=`access-state-updated`,Id=`meeting-session-summary-updated`,Ld=`meeting-session-state-updated`,Rd=`waiting-participant-added`,zd=`waiting-participant-updated`,Bd=`waiting-participant-removed`,Vd=`transcription-started`,Hd=`transcription-stopped`,Ud=`transcription-error`,Wd=`recording-started`,Gd=`recording-stopped`,Kd=`recording-stats`,qd=`recording-error`,Jd=`recording-upload-completed`,Yd=`recording-data`,Xd=`app-message`,Zd=`transcription-message`,Qd=`remote-media-player-started`,$d=`remote-media-player-updated`,ef=`remote-media-player-stopped`,tf=`local-screen-share-started`,nf=`local-screen-share-stopped`,rf=`local-screen-share-canceled`,af=`active-speaker-change`,of=`active-speaker-mode-change`,sf=`network-quality-change`,cf=`network-connection`,lf=`cpu-load-change`,uf=`face-counts-updated`,df=`live-streaming-started`,ff=`live-streaming-updated`,pf=`live-streaming-stopped`,mf=`live-streaming-error`,hf=`lang-updated`,gf=`receive-settings-updated`,_f=`input-settings-updated`,vf=`nonfatal-error`,yf=`error`,bf=4096,xf=102400,Sf=`iframe-call-message`,Cf=`local-screen-start`,wf=`daily-method-update-live-streaming-endpoints`,Tf=`transmit-log`,Ef=`daily-custom-track`,Df={NONE:`none`,BGBLUR:`background-blur`,BGIMAGE:`background-image`,FACE_DETECTION:`face-detection`},Of={NONE:`none`,NOISE_CANCELLATION:`noise-cancellation`},kf={PLAY:`play`,PAUSE:`pause`},Af=[`jpg`,`png`,`jpeg`],jf=`add-endpoints`,Mf=`remove-endpoints`,Nf=`sip-call-transfer`;function Pf(){return!B()&&typeof window<`u`&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:``}function B(){return typeof navigator<`u`&&navigator.product&&navigator.product===`ReactNative`}function Ff(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function If(){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}(qf(),Jf())||B())}function Lf(){if(B()||!document)return!1;var e=document.createElement(`iframe`);return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var Rf=`none`,zf=`software`,Bf=`hardware`,Vf=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?zf:Bf:Rf}catch{return Rf}}();function Hf(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!B()&&Vf!==Rf&&(e?function(){return Kf()?!1:[`Chrome`,`Firefox`].includes(qf())}():function(){if(Kf())return!1;var e=qf();if(e===`Safari`){var t=Qf();if(t.major<15||t.major===15&&t.minor<4)return!1}return e===`Chrome`?Yf().major>=77:e===`Firefox`?$f().major>=97:[`Chrome`,`Firefox`,`Safari`].includes(e)}())}function Uf(){if(B()||Gf()||typeof AudioWorkletNode>`u`)return!1;switch(qf()){case`Chrome`:case`Firefox`:return!0;case`Safari`:var e=Jf();return e.major>17||e.major===17&&e.minor>=4}return!1}function Wf(){return Ff()&&typeof MediaStreamTrack<`u`&&!function(){var e,t=qf();if(!Pf())return!0;switch(t){case`Chrome`:return(e=Yf()).major&&e.major>0&&e.major<75;case`Firefox`:return(e=$f()).major<91;case`Safari`:return(e=Qf()).major<13||e.major===13&&e.minor<1;default:return!0}}()}function Gf(){return Pf().match(/Linux; Android/)}function Kf(){var e,t=Pf(),n=t.match(/Mac/)&&(!B()&&typeof window<`u`&&(e=window)!=null&&(e=e.navigator)!=null&&e.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(t.match(/Mobi/)||t.match(/Android/)||n)||!!Pf().match(/DailyAnd\//)||void 0}function qf(){if(typeof window<`u`){var e=Pf();return Xf()?`Safari`:e.indexOf(`Edge`)>-1?`Edge`:e.match(/Chrome\//)?`Chrome`:e.indexOf(`Safari`)>-1||Zf()?`Safari`:e.indexOf(`Firefox`)>-1?`Firefox`:e.indexOf(`MSIE`)>-1||e.indexOf(`.NET`)>-1?`IE`:`Unknown Browser`}}function Jf(){switch(qf()){case`Chrome`:return Yf();case`Safari`:return Qf();case`Firefox`:return $f();case`Edge`:return function(){var e=0,t=0;if(typeof window<`u`){var n=Pf().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}()}}function Yf(){var e=0,t=0,n=0,r=0,i=!1;if(typeof window<`u`){var a=Pf(),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 Xf(){return!!Pf().match(/iPad|iPhone|iPod/i)&&Ff()}function Zf(){return Pf().indexOf(`AppleWebKit/605.1.15`)>-1}function Qf(){var e=0,t=0,n=0;if(typeof window<`u`){var r=Pf().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch{}else (Xf()||Zf())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function $f(){var e=0,t=0;if(typeof window<`u`){var n=Pf().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}var ep=function(){return xo((function e(){vo(this,e)}),[{key:`addListenerForMessagesFromCallMachine`,value:function(e,t,n){Zo()}},{key:`addListenerForMessagesFromDailyJs`,value:function(e,t,n){Zo()}},{key:`sendMessageToCallMachine`,value:function(e,t,n,r){Zo()}},{key:`sendMessageToDailyJs`,value:function(e,t){Zo()}},{key:`removeListener`,value:function(e){Zo()}}])}();function tp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function np(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?tp(Object(n),!0).forEach((function(t){Eo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(rp=function(){return!!e})()}var ip=function(){function e(){var t,n,r,i;return vo(this,e),n=this,r=Co(r=e),(t=So(n,rp()?Reflect.construct(r,i||[],Co(n).constructor):r.apply(n,i)))._wrappedListeners={},t._messageCallbacks={},t}return To(e,ep),xo(e,[{key:`addListenerForMessagesFromCallMachine`,value:function(e,t,n){var r=this,i=function(i){if(i.data&&i.data.what===`iframe-call-message`&&(!i.data.callClientId||i.data.callClientId===t)&&(!i.data.from||i.data.from!==`module`)){var a=np({},i.data);if(delete a.from,a.callbackStamp&&r._messageCallbacks[a.callbackStamp]){var o=a.callbackStamp;r._messageCallbacks[o].call(n,a),delete r._messageCallbacks[o]}delete a.what,delete a.callbackStamp,e.call(n,a)}};this._wrappedListeners[e]=i,window.addEventListener(`message`,i)}},{key:`addListenerForMessagesFromDailyJs`,value:function(e,t,n){var r=function(r){var i;if(!(!r.data||r.data.what!==Sf||!r.data.action||r.data.from&&r.data.from!==`module`||r.data.callClientId&&t&&r.data.callClientId!==t||r!=null&&(i=r.data)!=null&&i.callFrameId)){var a=r.data;e.call(n,a)}};this._wrappedListeners[e]=r,window.addEventListener(`message`,r)}},{key:`sendMessageToCallMachine`,value:function(e,t,n,r){if(!n)throw Error(`undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?`);var i=np({},e);if(i.what=Sf,i.from=`module`,i.callClientId=n,t){var a=Xo();this._messageCallbacks[a]=t,i.callbackStamp=a}var o=r?r.contentWindow:window,s=this._callMachineTargetOrigin(r);s&&o.postMessage(i,s)}},{key:`sendMessageToDailyJs`,value:function(e,t){e.what=Sf,e.callClientId=t,e.from=`embedded`,window.postMessage(e,this._targetOriginFromWindowLocation())}},{key:`removeListener`,value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener(`message`,t),delete this._wrappedListeners[e])}},{key:`forwardPackagedMessageToCallMachine`,value:function(e,t,n){var r=np({},e);r.callClientId=n;var i=t?t.contentWindow:window,a=this._callMachineTargetOrigin(t);a&&i.postMessage(r,a)}},{key:`addListenerForPackagedMessagesFromCallMachine`,value:function(e,t){var n=function(n){if(n.data&&n.data.what===`iframe-call-message`&&(!n.data.callClientId||n.data.callClientId===t)&&(!n.data.from||n.data.from!==`module`)){var r=n.data;e(r)}};return this._wrappedListeners[e]=n,window.addEventListener(`message`,n),e}},{key:`removeListenerForPackagedMessagesFromCallMachine`,value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener(`message`,t),delete this._wrappedListeners[e])}},{key:`_callMachineTargetOrigin`,value:function(e){return e?e.src?new URL(e.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:`_targetOriginFromWindowLocation`,value:function(){return window.location.protocol===`file:`?`*`:window.location.origin}}])}();function ap(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function op(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(op=function(){return!!e})()}var sp=function(){function e(){var t,n,r,i;return vo(this,e),n=this,r=Co(r=e),t=So(n,op()?Reflect.construct(r,i||[],Co(n).constructor):r.apply(n,i)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new No.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new No.EventEmitter,t._wrappedListeners={},t._messageCallbacks={},t}return To(e,ep),xo(e,[{key:`addListenerForMessagesFromCallMachine`,value:function(e,t,n){this._addListener(e,global.callMachineToDailyJsEmitter,t,n,`received call machine message`)}},{key:`addListenerForMessagesFromDailyJs`,value:function(e,t,n){this._addListener(e,global.dailyJsToCallMachineEmitter,t,n,`received daily-js message`)}},{key:`sendMessageToCallMachine`,value:function(e,t,n){this._sendMessage(e,global.dailyJsToCallMachineEmitter,n,t,`sending message to call machine`)}},{key:`sendMessageToDailyJs`,value:function(e,t){this._sendMessage(e,global.callMachineToDailyJsEmitter,t,null,`sending message to daily-js`)}},{key:`removeListener`,value:function(e){var t=this._wrappedListeners[e];t&&(global.callMachineToDailyJsEmitter.removeListener(`message`,t),global.dailyJsToCallMachineEmitter.removeListener(`message`,t),delete this._wrappedListeners[e])}},{key:`_addListener`,value:function(e,t,n,r,i){var a=this,o=function(t){if(t.callClientId===n){if(t.callbackStamp&&a._messageCallbacks[t.callbackStamp]){var i=t.callbackStamp;a._messageCallbacks[i].call(r,t),delete a._messageCallbacks[i]}e.call(r,t)}};this._wrappedListeners[e]=o,t.addListener(`message`,o)}},{key:`_sendMessage`,value:function(e,t,n,r,i){var a=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ap(Object(n),!0).forEach((function(t){Eo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ap(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);if(a.callClientId=n,r){var o=Xo();this._messageCallbacks[o]=r,a.callbackStamp=o}t.emit(`message`,a)}}])}(),cp=`replace`,lp=`shallow-merge`,up=[cp,lp],dp=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.data,r=t.mergeStrategy,i=r===void 0?cp:r;vo(this,e),e._validateMergeStrategy(i),e._validateData(n,i),this.mergeStrategy=i,this.data=n}return xo(e,[{key:`isNoOp`,value:function(){return e.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:`isNoOpUpdate`,value:function(e,t){return Object.keys(e).length===0&&t===lp}},{key:`_validateMergeStrategy`,value:function(e){if(!up.includes(e))throw Error(`Unrecognized mergeStrategy provided. Options are: [${up}]`)}},{key:`_validateData`,value:function(e,t){if(!function(e){if(e==null||I(e)!==`object`)return!1;var t=Object.getPrototypeOf(e);return t==null||t===Object.prototype}(e))throw Error(`Meeting session data must be a plain (map-like) object`);var n;try{if(n=JSON.stringify(e),t===cp){var r=JSON.parse(n);Lo(r,e)||console.warn(`The meeting session data provided will be modified when serialized.`,r,e)}else if(t===lp){for(var i in e)if(Object.hasOwnProperty.call(e,i)&&e[i]!==void 0){var a=JSON.parse(JSON.stringify(e[i]));Lo(e[i],a)||console.warn(`At least one key in the meeting session data provided will be modified when serialized.`,a,e[i])}}}catch(e){throw Error(`Meeting session data must be serializable to JSON: ${e}`)}if(n.length>xf)throw Error(`Meeting session data is too large (${n.length} characters). Maximum size suppported is ${xf}.`)}}])}();function fp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(fp=function(){return!!e})()}function pp(e){var t=typeof Map==`function`?new Map:void 0;return pp=function(e){if(e===null||!function(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(fp())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&wo(i,n.prototype),i}(e,arguments,Co(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),wo(n,e)},pp(e)}function mp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(mp=function(){return!!e})()}function hp(e){var t=window._daily?.pendings;if(t){var n=t.indexOf(e);n!==-1&&t.splice(n,1)}}var gp=function(){return xo((function e(t){vo(this,e),this._currentLoad=null,this._callClientId=t,this._publicPath=null}),[{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(),window._daily.instances[this._callClientId].publicPath=this._publicPath,void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new _p(n,(function(e){var n=e.substring(0,e.lastIndexOf(`/`));n.length&&n.slice(-1)!==`/`&&(n+=`/`),t._publicPath=n,window._daily.instances[t._callClientId].publicPath=n,r(!1)}),(function(e,n){n||hp(t._callClientId),i(e,n)})),this._currentLoad.start()}},{key:`cancel`,value:function(){this._currentLoad&&this._currentLoad.cancel(),hp(this._callClientId)}},{key:`loaded`,get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])}(),_p=function(){return xo((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;vo(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 bp(e._dailyConfig,e._successCallback,t),e._currentAttempt.start())}),3e3))};this._currentAttempt=new bp(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}}])}(),vp=function(){function e(){return vo(this,e),t=this,r=arguments,n=Co(n=e),So(t,mp()?Reflect.construct(n,r||[],Co(t).constructor):n.apply(t,r));var t,n,r}return To(e,pp(Error)),xo(e)}(),yp=2e4,bp=function(){return xo((function e(t,n,r){vo(this,e),this._loadAttemptImpl=B()||!t.avoidEval?new xp(t,n,r):new Sp(t,n,r)}),[{key:`start`,value:(e=L((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}(),xp=function(){return xo((function e(t,n,r){vo(this,e),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache=typeof iOSCallObjectBundleCache<`u`&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r}),[{key:`start`,value:(r=L((function*(){var e=$o(this._dailyConfig);!(yield this._tryLoadFromIOSCache(e))&&this._loadFromNetwork(e)})),function(){return r.apply(this,arguments)})},{key:`cancel`,value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:`_tryLoadFromIOSCache`,value:(n=L((function*(e){if(!this._iosCache)return!1;try{var t=yield this._iosCache.get(e);return!!this.cancelled||!!t&&(t.code?(Function(`"use strict";`+t.code)(),this.succeeded=!0,this._successCallback(e),!0):(this._refetchHeaders=t.refetchHeaders,!1))}catch{return!1}})),function(e){return n.apply(this,arguments)})},{key:`_loadFromNetwork`,value:(t=L((function*(e){var t=this;this._networkTimeout=setTimeout((function(){t._networkTimedOut=!0,t._failureCallback({msg:`Timed out (>${yp} ms) when loading call object bundle ${e}`,type:`timeout`})}),yp);try{var n=this._refetchHeaders?{headers:this._refetchHeaders}:{},r=yield fetch(e,n);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new vp;var i=yield this._getBundleCodeFromResponse(e,r);if(this.cancelled)throw new vp;Function(`"use strict";`+i)(),this._iosCache&&this._iosCache.set(e,i,r.headers),this.succeeded=!0,this._successCallback(e)}catch(t){if(clearTimeout(this._networkTimeout),t instanceof vp||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:`Failed to load call object bundle ${e}: ${t}`,type:t.message})}})),function(e){return t.apply(this,arguments)})},{key:`_getBundleCodeFromResponse`,value:(e=L((function*(e,t){if(t.ok)return yield t.text();if(this._iosCache&&t.status===304)return(yield this._iosCache.renew(e,t.headers)).code;throw Error(`Received ${t.status} response`)})),function(t,n){return e.apply(this,arguments)})}]);var e,t,n,r}(),Sp=function(){return xo((function e(t,n,r){vo(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r,this._attemptId=Xo(),this._networkTimeout=null,this._scriptElement=null}),[{key:`start`,value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=$o(this._dailyConfig);(typeof document>`u`?`undefined`:I(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 (>${yp} ms) when loading call object bundle ${e}`,type:`timeout`})}),yp);var n=document.getElementsByTagName(`head`)[0],r=document.createElement(`script`);this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback(e)},r.onerror=function(e){t._stopLoading(),t._failureCallback({msg:`Failed to load call object bundle ${e.target.src}`,type:e.message})},r.src=e,n.appendChild(r)}},{key:`_stopLoading`,value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:`_signUpForCallMachineLoadWaitlist`,value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:`_withdrawFromCallMachineLoadWaitlist`,value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}])}(),Cp=function(e,t,n){return!0===Ep(e.local,t,n)},wp=function(e,t,n){return e.local.streams&&e.local.streams[t]&&e.local.streams[t].stream&&e.local.streams[t].stream[`get${n===`video`?`Video`:`Audio`}Tracks`]()[0]},Tp=function(e,t,n,r){var i=Dp(e,t,n,r);return i&&i.pendingTrack},Ep=function(e,t,n){if(!e)return!1;var r=function(e){switch(e){case`avatar`:return!0;case`staged`:return e;default:return!!e}},i=e.public.subscribedTracks;return i&&i[t]?[`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)},Dp=function(e,t,n,r){var i=Object.values(e.streams||{}).filter((function(e){return e.participantId===t&&e.type===n&&e.pendingTrack&&e.pendingTrack.kind===r})).sort((function(e,t){return new Date(t.starttime)-new Date(e.starttime)}));return i&&i[0]},Op=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function kp(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${c.charAt(0).toUpperCase()+c.slice(1)}`,u=e.tracks[l];if(u){var d=e.local?wp(n,a,c):Tp(n,e.session_id,a,c);u.state===`playable`&&(u.track=d),u.persistentTrack=d}}}function Ap(e,t){try{var n=t.getState();for(var r in e.tracks)if(!jp(r)){var i=e.tracks[r].kind;if(i){var a=e.tracks[r];if(a){var o=e.local?Op(n,r):Tp(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(e){console.error(e)}}function jp(e){return[`video`,`audio`,`screenVideo`,`screenAudio`].includes(e)}function Mp(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(e){console.error(e)}if(!i)return e.audio=!1,e.audioTrack=!1,e.video=!1,e.videoTrack=!1,e.screen=!1,void(e.screenTrack=!1);try{if(r.streams,e.audio&&Cp(r,e.session_id,`cam-audio`)){var o=Tp(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&&Cp(r,e.session_id,`cam-video`)){var s=Tp(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&&Cp(r,e.session_id,`screen-audio`)){var c=Tp(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&&Cp(r,e.session_id,`screen-video`)){var l=Tp(r,e.session_id,`screen`,`video`);l&&(t&&t.screenVideoTrack&&t.screenVideoTrack.id===l.id?e.screenVideoTrack=l:l.muted||(e.screenVideoTrack=l))}e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch(e){console.error(`unexpected error matching up tracks`,e)}}}function Np(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return Pp(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pp(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
33
+ 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 e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function Pp(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 Fp=new Map,Ip=null;function Lp(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return Rp(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rp(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
34
+ 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 e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function Rp(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 zp=new Map,Bp=null;function Vp(e){Up()?function(e){Fp.has(e)||(Fp.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(t){Fp.has(e)&&(Fp.get(e).lastDevicesString=JSON.stringify(t),Ip||(Ip=function(){var e=L((function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=Np(Fp.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==Fp.get(r).lastDevicesString&&(Fp.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}}));return function(){return e.apply(this,arguments)}}(),navigator.mediaDevices.addEventListener(`devicechange`,Ip)))})).catch((function(){})))}(e):function(e){zp.has(e)||(zp.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(t){zp.has(e)&&(zp.get(e).lastDevicesString=JSON.stringify(t),Bp||=setInterval(L((function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=Lp(zp.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==zp.get(r).lastDevicesString&&(zp.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}})),3e3))})))}(e)}function Hp(e){Up()?function(e){Fp.has(e)&&(Fp.delete(e),Fp.size===0&&Ip&&(navigator.mediaDevices.removeEventListener(`devicechange`,Ip),Ip=null))}(e):function(e){zp.has(e)&&(zp.delete(e),zp.size===0&&Bp&&(clearInterval(Bp),Bp=null))}(e)}function Up(){return B()||navigator.mediaDevices?.ondevicechange!==void 0}var Wp=new Set;function Gp(e,t){var n=t.isLocalScreenVideo;return e&&e.readyState===`live`&&!function(e,t){return(!t.isLocalScreenVideo||qf()!==`Chrome`)&&e.muted&&!Wp.has(e.id)}(e,{isLocalScreenVideo:n})}function Kp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Kp(Object(n),!0).forEach((function(t){Eo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Jp=Object.freeze({VIDEO:`video`,AUDIO:`audio`,SCREEN_VIDEO:`screenVideo`,SCREEN_AUDIO:`screenAudio`,CUSTOM_VIDEO:`customVideo`,CUSTOM_AUDIO:`customAudio`}),Yp=Object.freeze({PARTICIPANTS:`participants`,STREAMING:`streaming`,TRANSCRIPTION:`transcription`}),Xp=Object.values(Jp),Zp=[`v`,`a`,`sv`,`sa`,`cv`,`ca`];Object.freeze(Xp.reduce((function(e,t,n){return e[t]=Zp[n],e}),{})),Object.freeze(Zp.reduce((function(e,t,n){return e[t]=Xp[n],e}),{}));var Qp=[Jp.VIDEO,Jp.AUDIO,Jp.SCREEN_VIDEO,Jp.SCREEN_AUDIO],$p=Object.values(Yp),em=[`p`,`s`,`t`];Object.freeze($p.reduce((function(e,t,n){return e[t]=em[n],e}),{})),Object.freeze(em.reduce((function(e,t,n){return e[t]=$p[n],e}),{}));var tm=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.base,r=t.byUserId,i=t.byParticipantId;vo(this,e),this.base=n,this.byUserId=r,this.byParticipantId=i}return xo(e,[{key:`clone`,value:function(){var t=new e;if(this.base instanceof nm?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 nm?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 nm?a.clone():a}return t}},{key:`toJSONObject`,value:function(){var e={};if(typeof this.base==`boolean`?e.base=this.base:this.base instanceof nm&&(e.base=this.base.toJSONObject()),this.byUserId!==void 0)for(var t in e.byUserId={},this.byUserId){var n=this.byUserId[t];e.byUserId[t]=n instanceof nm?n.toJSONObject():n}if(this.byParticipantId!==void 0)for(var r in e.byParticipantId={},this.byParticipantId){var i=this.byParticipantId[r];e.byParticipantId[r]=i instanceof nm?i.toJSONObject():i}return e}},{key:`toMinifiedJSONObject`,value:function(){var e={};if(this.base!==void 0&&(typeof this.base==`boolean`?e.b=this.base:e.b=this.base.toMinifiedJSONObject()),this.byUserId!==void 0)for(var t in e.u={},this.byUserId){var n=this.byUserId[t];e.u[t]=typeof n==`boolean`?n:n.toMinifiedJSONObject()}if(this.byParticipantId!==void 0)for(var r in e.p={},this.byParticipantId){var i=this.byParticipantId[r];e.p[r]=typeof i==`boolean`?i:i.toMinifiedJSONObject()}return e}},{key:`normalize`,value:function(){return this.base instanceof nm&&(this.base=this.base.normalize()),this.byUserId&&=Object.fromEntries(Object.entries(this.byUserId).map((function(e){var t=ko(e,2),n=t[0],r=t[1];return[n,r instanceof nm?r.normalize():r]}))),this.byParticipantId&&=Object.fromEntries(Object.entries(this.byParticipantId).map((function(e){var t=ko(e,2),n=t[0],r=t[1];return[n,r instanceof nm?r.normalize():r]}))),this}}],[{key:`fromJSONObject`,value:function(t){var n,r,i;if(t.base!==void 0&&(n=typeof t.base==`boolean`?t.base:nm.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:nm.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:nm.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:nm.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:nm.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:nm.fromMinifiedJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:`validateJSONObject`,value:function(e){if(I(e)!==`object`)return[!1,`canReceive must be an object`];for(var t=[`base`,`byUserId`,`byParticipantId`],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!t.includes(i))return[!1,`canReceive can only contain keys (${t.join(`, `)})`];if(i===`base`){var a=ko(nm.validateJSONObject(e.base,!0),2),o=a[0],s=a[1];if(!o)return[!1,s]}else{if(I(e[i])!==`object`)return[!1,`invalid (non-object) value for field '${i}' in canReceive`];for(var c=0,l=Object.values(e[i]);c<l.length;c++){var u=l[c],d=ko(nm.validateJSONObject(u),2),f=d[0],p=d[1];if(!f)return[!1,p]}}}return[!0]}}])}(),nm=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;vo(this,e),this.video=n,this.audio=r,this.screenVideo=i,this.screenAudio=a,this.customVideo=o,this.customAudio=s}return xo(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=qp({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=qp({},this.customAudio)),t}},{key:`toJSONObject`,value:function(){var e={};return this.video!==void 0&&(e.video=this.video),this.audio!==void 0&&(e.audio=this.audio),this.screenVideo!==void 0&&(e.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(e.screenAudio=this.screenAudio),this.customVideo!==void 0&&(e.customVideo=qp({},this.customVideo)),this.customAudio!==void 0&&(e.customAudio=qp({},this.customAudio)),e}},{key:`toMinifiedJSONObject`,value:function(){var e={};return this.video!==void 0&&(e.v=this.video),this.audio!==void 0&&(e.a=this.audio),this.screenVideo!==void 0&&(e.sv=this.screenVideo),this.screenAudio!==void 0&&(e.sa=this.screenAudio),this.customVideo!==void 0&&(e.cv=qp({},this.customVideo)),this.customAudio!==void 0&&(e.ca=qp({},this.customAudio)),e}},{key:`normalize`,value:function(){function e(e,t){return e&&Object.keys(e).length===1&&e[`*`]===t}return!(!0!==this.video||!0!==this.audio||!0!==this.screenVideo||!0!==this.screenAudio||!e(this.customVideo,!0)||!e(this.customAudio,!0))||(!1!==this.video||!1!==this.audio||!1!==this.screenVideo||!1!==this.screenAudio||!e(this.customVideo,!1)||!e(this.customAudio,!1))&&this}}],[{key:`fromBoolean`,value:function(t){return new e({video:t,audio:t,screenVideo:t,screenAudio:t,customVideo:{"*":t},customAudio:{"*":t}})}},{key:`fromJSONObject`,value:function(t){return new e({video:t.video,audio:t.audio,screenVideo:t.screenVideo,screenAudio:t.screenAudio,customVideo:t.customVideo===void 0?void 0:qp({},t.customVideo),customAudio:t.customAudio===void 0?void 0:qp({},t.customAudio)})}},{key:`fromMinifiedJSONObject`,value:function(t){return new e({video:t.v,audio:t.a,screenVideo:t.sv,screenAudio:t.sa,customVideo:t.cv,customAudio:t.ca})}},{key:`validateJSONObject`,value:function(e,t){if(typeof e==`boolean`)return[!0];if(I(e)!==`object`)return[!1,`invalid (non-object, non-boolean) value in canReceive`];for(var n=Object.keys(e),r=0,i=n;r<i.length;r++){var a=i[r];if(!Xp.includes(a))return[!1,`invalid media type '${a}' in canReceive`];if(Qp.includes(a)){if(typeof e[a]!=`boolean`)return[!1,`invalid (non-boolean) value for media type '${a}' in canReceive`]}else{if(I(e[a])!==`object`)return[!1,`invalid (non-object) value for media type '${a}' in canReceive`];for(var o=0,s=Object.values(e[a]);o<s.length;o++)if(typeof s[o]!=`boolean`)return[!1,`invalid (non-boolean) value for entry within '${a}' in canReceive`];if(t&&e[a][`*`]===void 0)return[!1,`canReceive "base" permission must specify "*" as an entry within '${a}'`]}}return t&&n.length!==Xp.length?[!1,`canReceive "base" permission must specify all media types: ${Xp.join(`, `)} (or be set to a boolean shorthand)`]:[!0]}}])}(),rm=[`result`],im=[`preserveIframe`];function am(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?am(Object(n),!0).forEach((function(t){Eo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):am(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function om(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(om=function(){return!!e})()}function sm(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return cm(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cm(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
35
+ 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 e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function cm(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 lm={},um=`video`,dm=`voice`,fm=B()?{data:{}}:{data:{},topology:`none`},pm={present:0,hidden:0},mm={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},hm=Object.keys(mm),gm=[`state`,`volume`,`simulcastEncodings`],_m={androidInCallNotification:{title:`string`,subtitle:`string`,iconName:`string`,disableForCustomOverride:`boolean`},disableAutoDeviceManagement:{audio:`boolean`,video:`boolean`}},vm={id:{iconPath:`string`,iconPathDarkMode:`string`,label:`string`,tooltip:`string`,visualState:`'default' | 'sidebar-open' | 'active'`}},ym={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`}},bm=/^[a-zA-Z0-9_-]+$/;function xm(e){if(e!=null&&I(e)===`object`&&!Array.isArray(e)){var t,n={},r=sm(Object.entries(e).slice(0,10));try{for(r.s();!(t=r.n()).done;){var i=ko(t.value,2),a=i[0],o=i[1];typeof a!=`string`||a.length>64||bm.test(a)&&typeof o==`string`&&(n[a]=o.slice(0,256))}}catch(e){r.e(e)}finally{r.f()}return Object.keys(n).length?n:void 0}}var Sm={customIntegrations:{validate:Km,help:Wm()},customTrayButtons:{validate:Gm,help:`customTrayButtons should be a dictionary of the type ${JSON.stringify(vm)}`},url:{validate:function(e){return typeof e==`string`},help:`url should be a string`},baseUrl:{validate:function(e){return console.warn(`baseUrl is deprecated and has no effect`),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(e){console.error(`Failed to validate dailyConfig`,e)}return!1},help:`Unsupported dailyConfig. Check error logs for detailed info.`},reactNativeConfig:{validate:function(e){return qm(e,_m)},help:`reactNativeConfig should look like ${JSON.stringify(_m)}, 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 Fm(e),!0}catch(e){return console.error(e),!1}},help:`invalid userData type provided`},startVideoOff:!0,startAudioOff:!0,allowLocalVideo:!0,allowLocalAudio:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(e,t){if(typeof e==`boolean`)return t._preloadCache.allowLocalVideo=e,!0;var n;if(e instanceof MediaStreamTrack)t._sharedTracks.videoTrack=e,n={customTrack:Ef};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:Ef};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(e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!t.includes(i))return console.error(`unsupported color "${i}". Valid colors: ${t.join(`, `)}`),!1;if(!e[i].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error(`${i} theme color should be provided in valid hex color format. Received: "${e[i]}"`),!1}return!0};return I(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 ${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 ${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 Im(e,{allowAllParticipantsKey:!1})},help:Um({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!function(e,t){try{return t.validateUpdateSendSettings(e),!0}catch(e){return console.error(`Failed to validate send settings`,e),!1}}(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:`Invalid sendSettings provided. Check error logs for detailed info.`},inputSettings:{validate:function(e,t){return!!Lm(e)&&(t._inputSettings||={},Rm(e,t.properties?.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:Hm()},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`},aboutClient:{validate:function(e){if(e==null)return!0;if(I(e)!==`object`||Array.isArray(e))return!1;var t=Object.entries(e);if(t.length>10)return!1;for(var n=0,r=t;n<r.length;n++){var i=ko(r[n],2),a=i[0],o=i[1];if(typeof a!=`string`||a.length>64||!bm.test(a)||typeof o!=`string`||o.length>256)return!1}return!0},help:`aboutClient must be an object with up to 10 entries; keys must be strings made up of characters (a-z, 0-9, _, -) and a max length of 64; values must be strings with a max length of 256`},proxy:{queryString:`proxy`},strictMode:!0,allowMultipleCallInstances:!0},Cm={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)||!B()&&e===`avatar`)return!0;var r=[`audio`,`video`,`screenAudio`,`screenVideo`,`rmpAudio`,`rmpVideo`],i=function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var a in e)if(a===`custom`){if(!n.includes(e[a])&&!i(e[a],!0))return!1}else{var o=!t&&!r.includes(a),s=!n.includes(e[a]);if(o||s)return!1}return!0};return i(e)},help:`setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: true${B()?``:` | 'avatar'`} | false | 'staged' | { [audio: true|false|'staged'], [video: true|false|'staged'], [screenAudio: true|false|'staged'], [screenVideo: true|false|'staged'] }`},setAudio:!0,setVideo:!0,setScreenShare:{validate:function(e){return!1===e},help:`setScreenShare must be false, as it's only meant for stopping remote participants' screen shares`},eject:!0,updatePermissions:{validate:function(e){for(var t=0,n=Object.entries(e);t<n.length;t++){var r=ko(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=sm(a);try{for(c.s();!(o=c.n()).done;){var l=o.value;if(!s.includes(l))return!1}}catch(e){c.e(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 u=ko(tm.validateJSONObject(a),2),d=u[0],f=u[1];if(!d)return console.error(f),!1;break;case`canAdmin`:if(a instanceof Set||a instanceof Array||Array.isArray(a)){var p,m=[`participants`,`streaming`,`transcription`],h=sm(a);try{for(h.s();!(p=h.n()).done;){var g=p.value;if(!m.includes(g))return!1}}catch(e){h.e(e)}finally{h.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=L((function*(e){return new Promise((function(t,n){var r=[];e.forEach((function(i){return Promise.resolve(i).then((function(e){t(e)})).catch((function(t){r.push(t),r.length===e.length&&n(r)}))}))}))}));return function(t){return e.apply(this,arguments)}}());var wm=function(){function e(t){var n,r,i,a,o,s,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(vo(this,e),i=this,a=Co(a=e),Eo(r=So(i,om()?Reflect.construct(a,o||[],Co(i).constructor):a.apply(i,o)),`startListeningForDeviceChanges`,(function(){Vp(r.handleDeviceChange)})),Eo(r,`stopListeningForDeviceChanges`,(function(){Hp(r.handleDeviceChange)})),Eo(r,`handleDeviceChange`,(function(e){e=e.map((function(e){return JSON.parse(JSON.stringify(e))})),r.emitDailyJSEvent({action:`available-devices-updated`,availableDevices:e})})),Eo(r,`handleNativeAppStateChange`,function(){var e=L((function*(e){if(e===`destroyed`)return console.warn(`App has been destroyed before leaving the meeting. Cleaning up all the resources!`),void(yield r.destroy());var t=e===`active`;r.disableReactNativeAutoDeviceManagement(`video`)||(t?r.camUnmutedBeforeLosingNativeActiveState&&r.setLocalVideo(!0):(r.camUnmutedBeforeLosingNativeActiveState=r.localVideo(),r.camUnmutedBeforeLosingNativeActiveState&&r.setLocalVideo(!1)))}));return function(t){return e.apply(this,arguments)}}()),Eo(r,`handleNativeAudioFocusChange`,(function(e){r.disableReactNativeAutoDeviceManagement(`audio`)||(r._hasNativeAudioFocus=e,r.toggleParticipantAudioBasedOnNativeAudioFocus(),r._hasNativeAudioFocus?r.micUnmutedBeforeLosingNativeAudioFocus&&r.setLocalAudio(!0):(r.micUnmutedBeforeLosingNativeAudioFocus=r.localAudio(),r.setLocalAudio(!1)))})),Eo(r,`handleNativeSystemScreenCaptureStop`,(function(){r.stopScreenShare()})),!Wf()&&!B())throw Error(`WebRTC not supported or suppressed`);if(r.strictMode=c.strictMode===void 0||c.strictMode,r.allowMultipleCallInstances=(n=c.allowMultipleCallInstances)!=null&&n,Object.keys(lm).length&&(r._logDuplicateInstanceAttempt(),!r.allowMultipleCallInstances)){if(r.strictMode)throw 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:{}}),r.callClientId=Xo(),lm[(s=r).callClientId]=s,window._daily.instances[r.callClientId]={},r._sharedTracks={},window._daily.instances[r.callClientId].tracks=r._sharedTracks,c.dailyJsVersion=e.version(),c.aboutClient!==void 0&&(c.aboutClient=xm(c.aboutClient)),r._iframe=t,r._callObjectMode=c.layout===`none`&&!r._iframe,r._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},c.showLocalVideo===void 0?r._showLocalVideo=!0:r._callObjectMode?console.error(`showLocalVideo is not available in call object mode`):r._showLocalVideo=!!c.showLocalVideo,c.showParticipantsBar===void 0?r._showParticipantsBar=!0:r._callObjectMode?console.error(`showParticipantsBar is not available in call object mode`):r._showParticipantsBar=!!c.showParticipantsBar,c.customIntegrations===void 0?r._customIntegrations={}:r._callObjectMode?console.error(`customIntegrations is not available in call object mode`):r._customIntegrations=c.customIntegrations,c.customTrayButtons===void 0?r._customTrayButtons={}:r._callObjectMode?console.error(`customTrayButtons is not available in call object mode`):r._customTrayButtons=c.customTrayButtons,c.activeSpeakerMode===void 0?r._activeSpeakerMode=!1:r._callObjectMode?console.error(`activeSpeakerMode is not available in call object mode`):r._activeSpeakerMode=!!c.activeSpeakerMode,c.receiveSettings?r._callObjectMode?r._receiveSettings=c.receiveSettings:console.error(`receiveSettings is only available in call object mode`):r._receiveSettings={},r.validateProperties(c),r.properties=V({},c),r.properties.aboutClient!==void 0&&(r.properties.aboutClient=xm(r.properties.aboutClient)),r._inputSettings||={},r._callObjectLoader=r._callObjectMode?new gp(r.callClientId):null,r._callState=`new`,r._isPreparingToJoin=!1,r._accessState={access:`unknown`},r._meetingSessionSummary={},r._finalSummaryOfPrevSession={},r._meetingSessionState=Zm(fm,r._callObjectMode),r._nativeInCallAudioMode=um,r._participants={},r._isScreenSharing=!1,r._participantCounts=pm,r._rmpPlayerState={},r._waitingParticipants={},r._network={threshold:`good`,quality:100,networkState:`unknown`,stats:{}},r._activeSpeaker={},r._localAudioLevel=0,r._isLocalAudioLevelObserverRunning=!1,r._remoteParticipantsAudioLevel={},r._isRemoteParticipantsAudioLevelObserverRunning=!1,r._maxAppMessageSize=bf,r._messageChannel=B()?new sp:new ip,r._iframe&&(r._iframe.requestFullscreen?r._iframe.addEventListener(`fullscreenchange`,(function(){document.fullscreenElement===r._iframe?(r.emitDailyJSEvent({action:`fullscreen`}),r.sendMessageToCallMachine({action:`fullscreen`})):(r.emitDailyJSEvent({action:`exited-fullscreen`}),r.sendMessageToCallMachine({action:`exited-fullscreen`}))})):r._iframe.webkitRequestFullscreen&&r._iframe.addEventListener(`webkitfullscreenchange`,(function(){document.webkitFullscreenElement===r._iframe?(r.emitDailyJSEvent({action:`fullscreen`}),r.sendMessageToCallMachine({action:`fullscreen`})):(r.emitDailyJSEvent({action:`exited-fullscreen`}),r.sendMessageToCallMachine({action:`exited-fullscreen`}))}))),B()){var l=r.nativeUtils();l.addAudioFocusChangeListener&&l.removeAudioFocusChangeListener&&l.addAppStateChangeListener&&l.removeAppStateChangeListener&&l.addSystemScreenCaptureStopListener&&l.removeSystemScreenCaptureStopListener||console.warn(`expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native`),r._hasNativeAudioFocus=!0,l.addAudioFocusChangeListener(r.handleNativeAudioFocusChange),l.addAppStateChangeListener(r.handleNativeAppStateChange),l.addSystemScreenCaptureStopListener(r.handleNativeSystemScreenCaptureStop)}return r._callObjectMode&&r.startListeningForDeviceChanges(),r._messageChannel.addListenerForMessagesFromCallMachine(r.handleMessageFromCallMachine,r.callClientId,r),r}return To(e,Po),xo(e,[{key:`destroy`,value:(pe=L((function*(){var e;try{yield this.leave()}catch{}var t=this._iframe;if(t){var n=t.parentElement;n&&n.removeChild(t)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),B()){var r=this.nativeUtils();r.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),r.removeAppStateChangeListener(this.handleNativeAppStateChange),r.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:`call-instance-destroyed`}),delete lm[this.callClientId],!((e=window)==null||(e=e._daily)==null)&&e.instances&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)})),function(){return pe.apply(this,arguments)})},{key:`isDestroyed`,value:function(){return!!this._destroyed}},{key:`loadCss`,value:function(e){var t=e.bodyClass,n=e.cssFile,r=e.cssText;return H(),this.sendMessageToCallMachine({action:`load-css`,cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:`iframe`,value:function(){return H(),this._iframe}},{key:`meetingState`,value:function(){return this._callState}},{key:`accessState`,value:function(){return Mm(this._callObjectMode,`accessState()`),this._accessState}},{key:`participants`,value:function(){return this._participants}},{key:`participantCounts`,value:function(){return this._participantCounts}},{key:`waitingParticipants`,value:function(){return Mm(this._callObjectMode,`waitingParticipants()`),this._waitingParticipants}},{key:`validateParticipantProperties`,value:function(e,t){for(var n in t){if(!Cm[n])throw Error(`unrecognized updateParticipant property ${n}`);if(Cm[n].validate&&!Cm[n].validate(t[n],this,this._participants[e]))throw Error(Cm[n].help)}}},{key:`updateParticipant`,value:function(e,t){return this._participants.local&&this._participants.local.session_id===e&&(e=`local`),e&&t&&(this.validateParticipantProperties(e,t),this.sendMessageToCallMachine({action:`update-participant`,id:e,properties:t})),this}},{key:`updateParticipants`,value:function(e){var t=this._participants.local&&this._participants.local.session_id;for(var n in e)n===t&&(n=`local`),n&&e[n]&&this.validateParticipantProperties(n,e[n]);return this.sendMessageToCallMachine({action:`update-participants`,participants:e}),this}},{key:`updateWaitingParticipant`,value:(fe=L((function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Mm(this._callObjectMode,`updateWaitingParticipant()`),Dm(this._callState,`updateWaitingParticipant()`),typeof t!=`string`||I(n)!==`object`)throw Error(`updateWaitingParticipant() must take an id string and a updates object`);return new Promise((function(r,i){e.sendMessageToCallMachine({action:`daily-method-update-waiting-participant`,id:t,updates:n},(function(e){e.error&&i(e.error),e.id||i(Error(`unknown error in updateWaitingParticipant()`)),r({id:e.id})}))}))})),function(){return fe.apply(this,arguments)})},{key:`updateWaitingParticipants`,value:(de=L((function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Mm(this._callObjectMode,`updateWaitingParticipants()`),Dm(this._callState,`updateWaitingParticipants()`),I(t)!==`object`)throw Error(`updateWaitingParticipants() must take a mapping between ids and update objects`);return new Promise((function(n,r){e.sendMessageToCallMachine({action:`daily-method-update-waiting-participants`,updatesById:t},(function(e){e.error&&r(e.error),e.ids||r(Error(`unknown error in updateWaitingParticipants()`)),n({ids:e.ids})}))}))})),function(){return de.apply(this,arguments)})},{key:`requestAccess`,value:(ue=L((function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.access,r=n===void 0?{level:yd}:n,i=t.name,a=i===void 0?``:i;return Mm(this._callObjectMode,`requestAccess()`),Dm(this._callState,`requestAccess()`),new Promise((function(t,n){e.sendMessageToCallMachine({action:`daily-method-request-access`,access:r,name:a},(function(e){e.error&&n(e.error),e.access||n(Error(`unknown error in requestAccess()`)),t({access:e.access,granted:e.granted})}))}))})),function(){return ue.apply(this,arguments)})},{key:`localAudio`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.audio.state):null}},{key:`localVideo`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.video.state):null}},{key:`setLocalAudio`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return`forceDiscardTrack`in t&&(B()?(console.warn(`forceDiscardTrack option not supported in React Native; ignoring`),t={}):e&&(console.warn(`forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring`),t={})),this.sendMessageToCallMachine({action:`local-audio`,state:e,options:t}),this}},{key:`localScreenAudio`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.screenAudio.state):null}},{key:`localScreenVideo`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.screenVideo.state):null}},{key:`updateScreenShare`,value:function(e){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:`local-screen-update`,options:e}),this;console.warn(`There is no screen share in progress. Try calling startScreenShare first.`)}},{key:`setLocalVideo`,value:function(e){return this.sendMessageToCallMachine({action:`local-video`,state:e}),this}},{key:`_setAllowLocalAudio`,value:function(e){if(this._preloadCache.allowLocalAudio=e,this._callMachineInitialized)return this.sendMessageToCallMachine({action:`set-allow-local-audio`,state:e}),this}},{key:`_setAllowLocalVideo`,value:function(e){if(this._preloadCache.allowLocalVideo=e,this._callMachineInitialized)return this.sendMessageToCallMachine({action:`set-allow-local-video`,state:e}),this}},{key:`getReceiveSettings`,value:(le=L((function*(e){var t=this,n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,r=n!==void 0&&n;if(Mm(this._callObjectMode,`getReceiveSettings()`),!this._callMachineInitialized)return this._receiveSettings;switch(I(e)){case`string`:return new Promise((function(n){t.sendMessageToCallMachine({action:`get-single-participant-receive-settings`,id:e,showInheritedValues:r},(function(e){n(e.receiveSettings)}))}));case`undefined`:return this._receiveSettings;default:throw Error(`first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments`)}})),function(e){return le.apply(this,arguments)})},{key:`updateReceiveSettings`,value:(ce=L((function*(e){var t=this;if(Mm(this._callObjectMode,`updateReceiveSettings()`),!Im(e,{allowAllParticipantsKey:!0}))throw Error(Um({allowAllParticipantsKey:!0}));return Dm(this._callState,`updateReceiveSettings()`,`To specify receive settings earlier, use the receiveSettings config property.`),new Promise((function(n){t.sendMessageToCallMachine({action:`update-receive-settings`,receiveSettings:e},(function(e){n({receiveSettings:e.receiveSettings})}))}))})),function(e){return ce.apply(this,arguments)})},{key:`_prepInputSettingsForSharing`,value:function(e,t){if(e){var n={};if(e.audio){var r;e.audio.settings&&(!Object.keys(e.audio.settings).length&&t||(n.audio={settings:V({},e.audio.settings)})),t&&(r=n.audio)!=null&&(r=r.settings)!=null&&r.customTrack&&(n.audio.settings={customTrack:this._sharedTracks.audioTrack});var i=e.audio.processor?.type===`none`&&e.audio.processor?._isDefaultWhenNone;if(e.audio.processor&&!i){var a=V({},e.audio.processor);delete a._isDefaultWhenNone,n.audio=V(V({},n.audio),{},{processor:a})}}if(e.video){var o;e.video.settings&&(!Object.keys(e.video.settings).length&&t||(n.video={settings:V({},e.video.settings)})),t&&(o=n.video)!=null&&(o=o.settings)!=null&&o.customTrack&&(n.video.settings={customTrack:this._sharedTracks.videoTrack});var s=e.video.processor?.type===`none`&&e.video.processor?._isDefaultWhenNone;if(e.video.processor&&!s){var c=V({},e.video.processor);delete c._isDefaultWhenNone,n.video=V(V({},n.video),{},{processor:c})}}return n}}},{key:`getInputSettings`,value:function(){var e=this;return H(),new Promise((function(t){t(e._getInputSettings())}))}},{key:`_getInputSettings`,value:function(){var e,t,n,r,i={processor:{type:`none`,_isDefaultWhenNone:!0}};this._inputSettings?(e=this._inputSettings?.video||i,t=this._inputSettings?.audio||i):(e=((n=this._preloadCache)==null||(n=n.inputSettings)==null?void 0:n.video)||i,t=((r=this._preloadCache)==null||(r=r.inputSettings)==null?void 0:r.audio)||i);var a={audio:t,video:e};return this._prepInputSettingsForSharing(a,!0)}},{key:`_updatePreloadCacheInputSettings`,value:function(e,t){var n=this._inputSettings||{},r={};if(e.video){var i,a,o;r.video={},e.video.settings?(r.video.settings={},t||e.video.settings.customTrack||(o=n.video)==null||!o.settings?r.video.settings=e.video.settings:r.video.settings=V(V({},n.video.settings),e.video.settings),Object.keys(r.video.settings).length||delete r.video.settings):(i=n.video)!=null&&i.settings&&(r.video.settings=n.video.settings),e.video.processor?r.video.processor=e.video.processor:(a=n.video)!=null&&a.processor&&(r.video.processor=n.video.processor)}else n.video&&(r.video=n.video);if(e.audio){var s,c,l;r.audio={},e.audio.settings?(r.audio.settings={},t||e.audio.settings.customTrack||(l=n.audio)==null||!l.settings?r.audio.settings=e.audio.settings:r.audio.settings=V(V({},n.audio.settings),e.audio.settings),Object.keys(r.audio.settings).length||delete r.audio.settings):(s=n.audio)!=null&&s.settings&&(r.audio.settings=n.audio.settings),e.audio.processor?r.audio.processor=e.audio.processor:(c=n.audio)!=null&&c.processor&&(r.audio.processor=n.audio.processor)}else n.audio&&(r.audio=n.audio);this._maybeUpdateInputSettings(r)}},{key:`_devicesFromInputSettings`,value:function(e){var t,n,r=(e==null||(t=e.video)==null||(t=t.settings)==null?void 0:t.deviceId)||null,i=(e==null||(n=e.audio)==null||(n=n.settings)==null?void 0:n.deviceId)||null,a=this._preloadCache.outputDeviceId||null;return{camera:r?{deviceId:r}:{},mic:i?{deviceId:i}:{},speaker:a?{deviceId:a}:{}}}},{key:`updateInputSettings`,value:(se=L((function*(e){var t=this;return H(),Lm(e)?e.video||e.audio?(Rm(e,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(e,!0),this._getInputSettings()):new Promise((function(n,r){t.sendMessageToCallMachine({action:`update-input-settings`,inputSettings:e},(function(i){if(i.error)r(i.error);else{if(i.returnPreloadCache)return t._updatePreloadCacheInputSettings(e,!0),void n(t._getInputSettings());t._maybeUpdateInputSettings(i.inputSettings),n(t._prepInputSettingsForSharing(i.inputSettings,!0))}}))}))):this._getInputSettings():(console.error(Hm()),Promise.reject(Hm()))})),function(e){return se.apply(this,arguments)})},{key:`setBandwidth`,value:function(e){var t=e.kbs,n=e.trackConstraints;if(H(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:`set-bandwidth`,kbs:t,trackConstraints:n}),this}},{key:`getDailyLang`,value:function(){var e=this;if(H(),this._callMachineInitialized)return new Promise((function(t){e.sendMessageToCallMachine({action:`get-daily-lang`},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))}},{key:`setDailyLang`,value:function(e){return H(),this.sendMessageToCallMachine({action:`set-daily-lang`,lang:e}),this}},{key:`setProxyUrl`,value:function(e){return this.sendMessageToCallMachine({action:`set-proxy-url`,proxyUrl:e}),this}},{key:`setIceConfig`,value:function(e){return this.sendMessageToCallMachine({action:`set-ice-config`,iceConfig:e}),this}},{key:`meetingSessionSummary`,value:function(){return[`left-meeting`,`error`].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:`getMeetingSession`,value:(oe=L((function*(){var e=this;return console.warn(`getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately`),Dm(this._callState,`getMeetingSession()`),new Promise((function(t){e.sendMessageToCallMachine({action:`get-meeting-session`},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return oe.apply(this,arguments)})},{key:`meetingSessionState`,value:function(){return Dm(this._callState,`meetingSessionState`),this._meetingSessionState}},{key:`setMeetingSessionData`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`replace`;Mm(this._callObjectMode,`setMeetingSessionData()`),Dm(this._callState,`setMeetingSessionData`);try{(function(e,t){new dp({data:e,mergeStrategy:t})})(e,t)}catch(e){throw console.error(e),e}try{this.sendMessageToCallMachine({action:`set-session-data`,data:e,mergeStrategy:t})}catch(e){throw Error(`Error setting meeting session data: ${e}`)}}},{key:`setUserName`,value:function(e,t){var n=this;return this.properties.userName=e,new Promise((function(r){n.sendMessageToCallMachine({action:`set-user-name`,name:e??``,thisMeetingOnly:B()||!!t&&!!t.thisMeetingOnly},(function(e){delete e.action,delete e.callbackStamp,r(e)}))}))}},{key:`setUserData`,value:(ae=L((function*(e){var t=this;try{Fm(e)}catch(e){throw console.error(e),e}if(this.properties.userData=e,this._callMachineInitialized)return new Promise((function(n){try{t.sendMessageToCallMachine({action:`set-user-data`,userData:e},(function(e){delete e.action,delete e.callbackStamp,n(e)}))}catch(e){throw Error(`Error setting user data: ${e}`)}}))})),function(e){return ae.apply(this,arguments)})},{key:`validateAudioLevelInterval`,value:function(e){if(e&&(e<100||typeof e!=`number`))throw Error(`The interval must be a number greater than or equal to 100 milliseconds.`)}},{key:`startLocalAudioLevelObserver`,value:function(e){var t=this;if(typeof AudioWorkletNode>`u`&&!B())throw Error(`startLocalAudioLevelObserver() is not supported on this browser`);if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:`start-local-audio-level-observer`,interval:e},(function(e){t._isLocalAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.localAudioLevelObserver={enabled:!0,interval:e}}},{key:`isLocalAudioLevelObserverRunning`,value:function(){return this._isLocalAudioLevelObserverRunning}},{key:`stopLocalAudioLevelObserver`,value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:`stop-local-audio-level-observer`})}},{key:`startRemoteParticipantsAudioLevelObserver`,value:function(e){var t=this;if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:`start-remote-participants-audio-level-observer`,interval:e},(function(e){t._isRemoteParticipantsAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:e}}},{key:`isRemoteParticipantsAudioLevelObserverRunning`,value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:`stopRemoteParticipantsAudioLevelObserver`,value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:`stop-remote-participants-audio-level-observer`})}},{key:`startCamera`,value:(ie=L((function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Mm(this._callObjectMode,`startCamera()`),km(this._callState,this._isPreparingToJoin,`startCamera()`,`Did you mean to use setLocalAudio() and/or setLocalVideo() instead?`),this.needsLoad())try{yield this.load(t)}catch(e){return Promise.reject(e)}else{if(this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error(`url in startCamera() is different than the one used in preAuth()`),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error(`token in startCamera() is different than the one used in preAuth()`),Promise.reject()}this.validateProperties(t),this.properties=V(V({},this.properties),t)}return new Promise((function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:`start-camera`,properties:Em(e.properties,e.callClientId),preloadCache:Em(e._preloadCache,e.callClientId)},(function(e){e.error?n(e.error):t({camera:e.camera,mic:e.mic,speaker:e.speaker})}))}))})),function(){return ie.apply(this,arguments)})},{key:`validateCustomTrack`,value:function(e,t,n){if(n&&n.length>50)throw Error("Custom track `trackName` must not be more than 50 characters");if(t&&t!==`music`&&t!==`speech`&&!(t instanceof Object))throw Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(n&&[`cam-audio`,`cam-video`,`screen-video`,`screen-audio`,`rmpAudio`,`rmpVideo`,`customVideoDefaults`].includes(n))throw Error("Custom track `trackName` must not match a track name already used by daily: cam-audio, cam-video, customVideoDefaults, screen-video, screen-audio, rmpAudio, rmpVideo");if(!(e instanceof MediaStreamTrack))throw Error(`Custom tracks provided must be instances of MediaStreamTrack`)}},{key:`startCustomTrack`,value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{track,mode,trackName,ignoreAudioLevel};return H(),Dm(this._callState,`startCustomTrack()`),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise((function(n,r){e._sharedTracks.customTrack=t.track,t.track=Ef,e.sendMessageToCallMachine({action:`start-custom-track`,properties:t},(function(e){e.error?r({error:e.error}):n(e.mediaTag)}))}))}},{key:`stopCustomTrack`,value:function(e){var t=this;return H(),Dm(this._callState,`stopCustomTrack()`),new Promise((function(n){t.sendMessageToCallMachine({action:`stop-custom-track`,mediaTag:e},(function(e){n(e.mediaTag)}))}))}},{key:`setCamera`,value:function(e){var t=this;return Pm(),Am(this._callMachineInitialized,`setCamera()`),new Promise((function(n){t.sendMessageToCallMachine({action:`set-camera`,cameraDeviceId:e},(function(e){n({device:e.device})}))}))}},{key:`setAudioDevice`,value:(re=L((function*(e){return Pm(),this.nativeUtils().setAudioDevice(e),{deviceId:yield this.nativeUtils().getAudioDevice()}})),function(e){return re.apply(this,arguments)})},{key:`cycleCamera`,value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise((function(n){e.sendMessageToCallMachine({action:`cycle-camera`,properties:t},(function(e){n({device:e.device})}))}))}},{key:`cycleMic`,value:function(){var e=this;return H(),new Promise((function(t){e.sendMessageToCallMachine({action:`cycle-mic`},(function(e){t({device:e.device})}))}))}},{key:`getCameraFacingMode`,value:function(){var e=this;return Pm(),new Promise((function(t){e.sendMessageToCallMachine({action:`get-camera-facing-mode`},(function(e){t(e.facingMode)}))}))}},{key:`setInputDevicesAsync`,value:(ne=L((function*(e){var t=this,n=e.audioDeviceId,r=e.videoDeviceId,i=e.audioSource,a=e.videoSource;if(H(),i!==void 0&&(n=i),a!==void 0&&(r=a),typeof n==`boolean`&&(this._setAllowLocalAudio(n),n=void 0),typeof r==`boolean`&&(this._setAllowLocalVideo(r),r=void 0),!n&&!r)return yield this.getInputDevices();var o={};return n&&(n instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=n,n=Ef,o.audio={settings:{customTrack:n}}):(delete this._sharedTracks.audioTrack,o.audio={settings:{deviceId:n}})),r&&(r instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=r,r=Ef,o.video={settings:{customTrack:r}}):(delete this._sharedTracks.videoTrack,o.video={settings:{deviceId:r}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(o,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise((function(e){t.sendMessageToCallMachine({action:`set-input-devices`,audioDeviceId:n,videoDeviceId:r},(function(n){if(delete n.action,delete n.callbackStamp,n.returnPreloadCache)return t._updatePreloadCacheInputSettings(o,!1),void e(t._devicesFromInputSettings(t._inputSettings));e(n)}))}))})),function(e){return ne.apply(this,arguments)})},{key:`setOutputDeviceAsync`,value:(te=L((function*(e){var t=this,n=e.outputDeviceId;if(H(),!n||typeof n!=`string`)throw Error(`outputDeviceId must be provided and must be a valid device id`);return this._preloadCache.outputDeviceId=n,this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(e,r){t.sendMessageToCallMachine({action:`set-output-device`,outputDeviceId:n},(function(n){if(delete n.action,delete n.callbackStamp,n.error){var i=Error(n.error.message);i.type=n.error.type,r(i);return}n.returnPreloadCache?e(t._devicesFromInputSettings(t._inputSettings)):e(n)}))}))})),function(e){return te.apply(this,arguments)})},{key:`getInputDevices`,value:(ee=L((function*(){var e=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(t){e.sendMessageToCallMachine({action:`get-input-devices`},(function(n){n.returnPreloadCache?t(e._devicesFromInputSettings(e._inputSettings)):t({camera:n.camera,mic:n.mic,speaker:n.speaker})}))}))})),function(){return ee.apply(this,arguments)})},{key:`nativeInCallAudioMode`,value:function(){return Pm(),this._nativeInCallAudioMode}},{key:`setNativeInCallAudioMode`,value:function(e){if(Pm(),[um,dm].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement(`audio`)&&Om(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error(`invalid in-call audio mode specified: `,e)}},{key:`preAuth`,value:(w=L((function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Mm(this._callObjectMode,`preAuth()`),km(this._callState,this._isPreparingToJoin,`preAuth()`),this.needsLoad()&&(yield this.load(t)),!t.url)throw Error(`preAuth() requires at least a url to be provided`);return this.validateProperties(t),this.properties=V(V({},this.properties),t),new Promise((function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:`daily-method-preauth`,properties:Em(e.properties,e.callClientId),preloadCache:Em(e._preloadCache,e.callClientId)},(function(r){return r.error?n(r.error):r.access?(e._didPreAuth=!0,void t({access:r.access})):n(Error(`unknown error in preAuth()`))}))}))})),function(){return w.apply(this,arguments)})},{key:`load`,value:(C=L((function*(e){var t=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw Error(`Use after destroy`);if(e&&(this.validateProperties(e),this.properties=V(V({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw Error(`can't load iframe meeting because url property isn't set`);return this._updateCallState(fd),this.emitDailyJSEvent({action:wd}),this._callObjectMode?new Promise((function(e,n){t._callObjectLoader.cancel();var r=Date.now();t._callObjectLoader.load(t.properties.dailyConfig,(function(n){t._bundleLoadTime=n?`no-op`:Date.now()-r,t._updateCallState(pd),n&&t.emitDailyJSEvent({action:`loaded`}),e()}),(function(e,r){if(t.emitDailyJSEvent({action:`load-attempt-failed`}),!r){t._updateCallState(_d),t.resetMeetingDependentVars();var i={action:yf,errorMsg:e.msg,error:{type:`connection-error`,msg:`Failed to load call object bundle.`,details:{on:`load`,sourceError:e,bundleUrl:$o(t.properties.dailyConfig)}}};t._maybeSendToSentry(i),t.emitDailyJSEvent(i),n(e.msg)}}))})):(this._iframe.src=Qo(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise((function(e,n){t._loadedCallback=function(r){t._callState===`error`?n(r):(t._updateCallState(pd),(t.properties.cssFile||t.properties.cssText)&&t.loadCss(t.properties),e())}})))}})),function(e){return C.apply(this,arguments)})},{key:`join`,value:(S=L((function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this._testCallInProgress&&this.stopTestCallQuality(),!t.url&&!this.properties.url){var n=`No room URL has been provided`;return console.error(n),Promise.reject(Error(n))}var r=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(t)}catch(e){return this.updateIsPreparingToJoin(!1),Promise.reject(e)}}else{if(r=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error(`url in join() is different than the one used in preAuth()`),this.updateIsPreparingToJoin(!1),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error(`token in join() is different than the one used in preAuth()`),this.updateIsPreparingToJoin(!1),Promise.reject()}if(t.url&&!this._callObjectMode&&t.url&&t.url!==this.properties.url)return console.error(`url in join() is different than the one used in load() (${this.properties.url} -> ${t.url})`),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(t),this.properties=V(V({},this.properties),t)}return t.showLocalVideo!==void 0&&(this._callObjectMode?console.error(`showLocalVideo is not available in callObject mode`):this._showLocalVideo=!!t.showLocalVideo),t.showParticipantsBar!==void 0&&(this._callObjectMode?console.error(`showParticipantsBar is not available in callObject mode`):this._showParticipantsBar=!!t.showParticipantsBar),this._callState===`joined-meeting`||this._callState===`joining-meeting`?(console.warn(`already joined meeting, call leave() before joining again`),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(md,!1),this.emitDailyJSEvent({action:Od}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:`join-meeting`,properties:Em(this.properties,this.callClientId),preloadCache:Em(this._preloadCache,this.callClientId)},(function(t){t.error&&e._joinedCallback&&(e._joinedCallback(null,t.error),e._joinedCallback=null)})),new Promise((function(t,n){e._joinedCallback=function(i,a){if(e._callState!==`error`){if(a)return e._updateCallState(gd),void n(a);if(e._updateCallState(`joined-meeting`),i)for(var o in i){if(e._callObjectMode){var s=e._callMachine().store;kp(i[o],s),Ap(i[o],s),Mp(i[o],e._participants[o],s)}e._participants[o]=V({},i[o]),e.toggleParticipantAudioBasedOnNativeAudioFocus()}r&&e.loadCss(e.properties),t(i)}else n(a)}})))})),function(){return S.apply(this,arguments)})},{key:`leave`,value:(x=L((function*(){var e=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise((function(t){e._callState===`left-meeting`||e._callState===`error`?t():e._callObjectLoader&&!e._callObjectLoader.loaded?(e._callObjectLoader.cancel(),e._updateCallState(gd),e.resetMeetingDependentVars(),e.emitDailyJSEvent({action:gd}),t()):(e._resolveLeave=t,e.sendMessageToCallMachine({action:`leave-meeting`}))}))})),function(){return x.apply(this,arguments)})},{key:`startScreenShare`,value:(b=L((function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Am(this._callMachineInitialized,`startScreenShare()`),t.screenVideoSendSettings&&this._validateVideoSendSettings(`screenVideo`,t.screenVideoSendSettings),t.mediaStream&&=(this._sharedTracks.screenMediaStream=t.mediaStream,Ef),typeof DailyNativeUtils<`u`&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var n=this.nativeUtils();if(yield n.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:vf,type:`screen-share-error`,errorMsg:`Could not start the screen sharing. The screen is already been captured!`});n.setSystemScreenCaptureStartCallback((function(){n.setSystemScreenCaptureStartCallback(null),e.sendMessageToCallMachine({action:Cf,captureOptions:t})})),n.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:Cf,captureOptions:t})})),function(){return b.apply(this,arguments)})},{key:`stopScreenShare`,value:function(){Am(this._callMachineInitialized,`stopScreenShare()`),this.sendMessageToCallMachine({action:`local-screen-stop`})}},{key:`startRecording`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.type;if(t&&t!==`cloud`&&t!==`cloud-audio-only`&&t!==`raw-tracks`&&t!==`local`)throw Error(`invalid type: ${t}, allowed values 'cloud', 'cloud-audio-only', 'raw-tracks', or 'local'`);this.sendMessageToCallMachine(V({action:`local-recording-start`},e))}},{key:`updateRecording`,value:function(e){var t=e.layout,n=t===void 0?{preset:`default`}:t,r=e.instanceId;this.sendMessageToCallMachine({action:`daily-method-update-recording`,layout:n,instanceId:r})}},{key:`stopRecording`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(V({action:`local-recording-stop`},e))}},{key:`startLiveStreaming`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(V({action:`daily-method-start-live-streaming`},e))}},{key:`updateLiveStreaming`,value:function(e){var t=e.layout,n=t===void 0?{preset:`default`}:t,r=e.instanceId;this.sendMessageToCallMachine({action:`daily-method-update-live-streaming`,layout:n,instanceId:r})}},{key:`addLiveStreamingEndpoints`,value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:wf,endpointsOp:jf,endpoints:t,instanceId:n})}},{key:`removeLiveStreamingEndpoints`,value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:wf,endpointsOp:Mf,endpoints:t,instanceId:n})}},{key:`stopLiveStreaming`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(V({action:`daily-method-stop-live-streaming`},e))}},{key:`validateDailyConfig`,value:function(e){e.camSimulcastEncodings&&(console.warn(`camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings.`),this.validateSimulcastEncodings(e.camSimulcastEncodings)),e.screenSimulcastEncodings&&console.warn(`screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings.`),Gf()&&e.noAutoDefaultDeviceChange&&console.warn(`noAutoDefaultDeviceChange is not supported on Android, and will be ignored.`)}},{key:`validateSimulcastEncodings`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(e){if(!(e instanceof Array||Array.isArray(e)))throw Error(`encodings must be an Array`);if(!Xm(e.length,1,3))throw Error(`encodings must be an Array with between 1 to 3 layers`);for(var r=0;r<e.length;r++){var i=e[r];for(var a in this._validateEncodingLayerHasValidProperties(i),i)if(hm.includes(a)){if(typeof i[a]!=`number`)throw Error(`${a} must be a number`);if(t){var o=t[a],s=o.min,c=o.max;if(!Xm(i[a],s,c))throw Error(`${a} value not in range. valid range: ${s} to ${c}`)}}else if(![`active`,`scalabilityMode`].includes(a))throw Error(`Invalid key ${a}, valid keys are:`+Object.values(hm));if(n&&!i.hasOwnProperty(`maxBitrate`))throw Error(`maxBitrate is not specified`)}}}},{key:`startRemoteMediaPlayer`,value:(y=L((function*(e){var t=this,n=e.url,r=e.settings,i=r===void 0?{state:kf.PLAY}:r;try{(function(e){if(typeof e!=`string`)throw Error(`url parameter must be "string" type`)})(n),Ym(i),function(e){for(var t in e)if(!gm.includes(t))throw Error(`Invalid key ${t}, valid keys are: ${gm}`);e.simulcastEncodings&&this.validateSimulcastEncodings(e.simulcastEncodings,mm,!0)}(i)}catch(e){throw console.error(`invalid argument Error: ${e}`),console.error(`startRemoteMediaPlayer arguments must be of the form:
36
36
  { url: "playback url",
37
37
  settings?:
38
- {state: "play"|"pause", simulcastEncodings?: [{}] } }`),e}return new Promise((function(e,r){t.sendMessageToCallMachine({action:`daily-method-start-remote-media-player`,url:n,settings:i},(function(t){t.error?r({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})}))}))})),function(e){return y.apply(this,arguments)})},{key:`stopRemoteMediaPlayer`,value:(v=L((function*(e){var t=this;if(typeof e!=`string`)throw Error(` remotePlayerID must be of type string`);return new Promise((function(n,r){t.sendMessageToCallMachine({action:`daily-method-stop-remote-media-player`,session_id:e},(function(e){e.error?r({error:e.error,errorMsg:e.errorMsg}):n()}))}))})),function(e){return v.apply(this,arguments)})},{key:`updateRemoteMediaPlayer`,value:(_=L((function*(e){var t=this,n=e.session_id,r=e.settings;try{Jm(r)}catch(e){throw console.error(`invalid argument Error: ${e}`),console.error(`updateRemoteMediaPlayer arguments must be of the form:
38
+ {state: "play"|"pause", simulcastEncodings?: [{}] } }`),e}return new Promise((function(e,r){t.sendMessageToCallMachine({action:`daily-method-start-remote-media-player`,url:n,settings:i},(function(t){t.error?r({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})}))}))})),function(e){return y.apply(this,arguments)})},{key:`stopRemoteMediaPlayer`,value:(v=L((function*(e){var t=this;if(typeof e!=`string`)throw Error(` remotePlayerID must be of type string`);return new Promise((function(n,r){t.sendMessageToCallMachine({action:`daily-method-stop-remote-media-player`,session_id:e},(function(e){e.error?r({error:e.error,errorMsg:e.errorMsg}):n()}))}))})),function(e){return v.apply(this,arguments)})},{key:`updateRemoteMediaPlayer`,value:(_=L((function*(e){var t=this,n=e.session_id,r=e.settings;try{Ym(r)}catch(e){throw console.error(`invalid argument Error: ${e}`),console.error(`updateRemoteMediaPlayer arguments must be of the form:
39
39
  session_id: "participant session",
40
- { settings?: {state: "play"|"pause"} }`),e}return new Promise((function(e,i){t.sendMessageToCallMachine({action:`daily-method-update-remote-media-player`,session_id:n,settings:r},(function(t){t.error?i({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})}))}))})),function(e){return _.apply(this,arguments)})},{key:`startTranscription`,value:function(e){Em(this._callState,`startTranscription()`),this.sendMessageToCallMachine(V({action:`daily-method-start-transcription`},e))}},{key:`updateTranscription`,value:function(e){if(Em(this._callState,`updateTranscription()`),!e)throw Error(`updateTranscription Error: options is mandatory`);if(I(e)!==`object`)throw Error(`updateTranscription Error: options must be object type`);if(e.participants&&!Array.isArray(e.participants))throw Error(`updateTranscription Error: participants must be an array`);this.sendMessageToCallMachine(V({action:`daily-method-update-transcription`},e))}},{key:`stopTranscription`,value:function(e){if(Em(this._callState,`stopTranscription()`),e&&I(e)!==`object`)throw Error(`stopTranscription Error: options must be object type`);if(e&&!e.instanceId)throw Error(`"instanceId" not provided`);this.sendMessageToCallMachine(V({action:`daily-method-stop-transcription`},e))}},{key:`startDialOut`,value:(g=L((function*(e){var t=this;Em(this._callState,`startDialOut()`);var n=function(e){if(e){if(!Array.isArray(e))throw Error(`Error starting dial out: audio codec must be an array`);if(e.length<=0)throw Error(`Error starting dial out: audio codec array specified but empty`);e.forEach((function(e){if(typeof e!=`string`)throw Error(`Error starting dial out: audio codec must be a string`);if(e!==`OPUS`&&e!==`PCMU`&&e!==`PCMA`&&e!==`G722`)throw Error(`Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722`)}))}};if(!e.sipUri&&!e.phoneNumber)throw Error(`Error starting dial out: either a sip uri or phone number must be provided`);if(e.sipUri&&e.phoneNumber)throw Error(`Error starting dial out: only one of sip uri or phone number must be provided`);if(e.sipUri){if(typeof e.sipUri!=`string`)throw Error(`Error starting dial out: sipUri must be a string`);if(!e.sipUri.startsWith(`sip:`))throw Error(`Error starting dial out: Invalid SIP URI, must start with 'sip:'`);if(e.video&&typeof e.video!=`boolean`)throw Error(`Error starting dial out: video must be a boolean value`);(function(e){if(e&&(n(e.audio),e.video)){if(!Array.isArray(e.video))throw Error(`Error starting dial out: video codec must be an array`);if(e.video.length<=0)throw Error(`Error starting dial out: video codec array specified but empty`);e.video.forEach((function(e){if(typeof e!=`string`)throw Error(`Error starting dial out: video codec must be a string`);if(e!==`H264`&&e!==`VP8`)throw Error(`Error starting dial out: video codec must be H264 or VP8`)}))}})(e.codecs)}if(e.phoneNumber){if(typeof e.phoneNumber!=`string`)throw Error(`Error starting dial out: phoneNumber must be a string`);if(!/^\+\d{1,}$/.test(e.phoneNumber))throw Error(`Error starting dial out: Invalid phone number, must be valid phone number as per E.164`);e.codecs&&n(e.codecs.audio)}if(e.callerId){if(typeof e.callerId!=`string`)throw Error(`Error starting dial out: callerId must be a string`);if(e.sipUri)throw Error(`Error starting dial out: callerId not allowed with sipUri`)}if(e.displayName){if(typeof e.displayName!=`string`)throw Error(`Error starting dial out: displayName must be a string`);if(e.displayName.length>=200)throw Error(`Error starting dial out: displayName length must be less than 200`)}if(e.userId){if(typeof e.userId!=`string`)throw Error(`Error starting dial out: userId must be a string`);if(e.userId.length>36)throw Error(`Error starting dial out: userId length must be less than or equal to 36`)}if(wm(e),e.permissions&&e.permissions.canReceive){var r=Oo(em.validateJSONObject(e.permissions.canReceive),2),i=r[0],a=r[1];if(!i)throw Error(a)}if(e.provider){if(e.provider!==`daily`)throw Error(`Error: provider can be set only to 'daily', got: ${e.provider}`);if(e.phoneNumber)throw 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(n,r){t.sendMessageToCallMachine(V({action:`dialout-start`},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return g.apply(this,arguments)})},{key:`stopDialOut`,value:function(e){var t=this;return Em(this._callState,`stopDialOut()`),new Promise((function(n,r){t.sendMessageToCallMachine(V({action:`dialout-stop`},e),(function(e){e.error?r(e.error):n(e)}))}))}},{key:`sipCallTransfer`,value:(h=L((function*(e){var t=this;if(Em(this._callState,`sipCallTransfer()`),!e)throw Error(`sipCallTransfer() requires a sessionId and toEndPoint`);return e.useSipRefer=!1,qm(e,`sipCallTransfer`),wm(e),new Promise((function(n,r){t.sendMessageToCallMachine(V({action:Mf},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return h.apply(this,arguments)})},{key:`sipRefer`,value:(m=L((function*(e){var t=this;if(Em(this._callState,`sipRefer()`),!e)throw Error(`sessionId and toEndPoint are mandatory parameter`);return e.useSipRefer=!0,qm(e,`sipRefer`),new Promise((function(n,r){t.sendMessageToCallMachine(V({action:Mf},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return m.apply(this,arguments)})},{key:`sendDTMF`,value:(p=L((function*(e){var t=this;return Em(this._callState,`sendDTMF()`),function(e){var t=e.sessionId,n=e.tones,r=e.method,i=e.digitDurationMs;if(!t||!n)throw Error(`sessionId and tones are mandatory parameter`);if(typeof t!=`string`||typeof n!=`string`)throw Error(`sessionId and tones should be of string type`);if(n.length>20)throw Error(`tones string must be upto 20 characters`);var a=n.match(/[^0-9A-D*#]/g);if(a&&a[0])throw Error(`${a[0]} is not valid DTMF tone`);if(r&&![`sip-info`,`telephone-event`,`auto`].includes(r))throw Error(`method must be one of 'sip-info', 'telephone-event', or 'auto'`);if(i!==void 0){if(typeof i!=`number`)throw Error(`digitDurationMs must be a number`);if(!Number.isFinite(i)||!Number.isInteger(i))throw Error(`digitDurationMs must be a finite integer number`);if(i<50||i>2e3)throw Error(`digitDurationMs must be between 50ms and 2000ms`)}}(e),e.method=e.method||`auto`,e.digitDurationMs=e.digitDurationMs||500,new Promise((function(n,r){t.sendMessageToCallMachine(V({action:`send-dtmf`},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return p.apply(this,arguments)})},{key:`getNetworkStats`,value:function(){var e=this;return this._callState===`joined-meeting`?new Promise((function(t){e.sendMessageToCallMachine({action:`get-calc-stats`},(function(n){t(V(V({},e._network),{},{stats:n.stats}))}))})):Promise.resolve(V({stats:{latest:{}}},this._network))}},{key:`testWebsocketConnectivity`,value:(f=L((function*(){var e=this;if(Am(this._testCallInProgress,`testWebsocketConnectivity()`),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}return new Promise((function(t,n){e.sendMessageToCallMachine({action:`test-websocket-connectivity`},(function(e){e.error?n(e.error):t(e.results)}))}))})),function(){return f.apply(this,arguments)})},{key:`abortTestWebsocketConnectivity`,value:function(){this.sendMessageToCallMachine({action:`abort-test-websocket-connectivity`})}},{key:`_validateVideoTrackForNetworkTests`,value:function(e){return e?e instanceof MediaStreamTrack?!!Wp(e,{isLocalScreenVideo:!1})||(console.error(`Video track is not playable. This test needs a live video track.`),!1):(console.error("Video track needs to be of type `MediaStreamTrack`."),!1):(console.error(`Missing video track. You must provide a video track in order to run this test.`),!1)}},{key:`testCallQuality`,value:(d=L((function*(){var e=this;H(),jm(this._callObjectMode,`testCallQuality()`),km(this._callMachineInitialized,`testCallQuality()`,null,!0),Om(this._callState,this._isPreparingToJoin,`testCallQuality()`);var t=this._testCallAlreadyInProgress,n=function(n){t||(e._testCallInProgress=n)};if(n(!0),this.needsLoad())try{var r=this._callState;yield this.load(),this._callState=r}catch(e){return n(!1),Promise.reject(e)}return new Promise((function(t){e.sendMessageToCallMachine({action:`test-call-quality`,dailyJsVersion:e.properties.dailyJsVersion},(function(r){var i=r.results,a=i.result,o=go(i,nm);if(a===`failed`){var s,c=V({},o);(s=o.error)!=null&&s.details?(o.error.details=JSON.parse(o.error.details),c.error=V(V({},c.error),{},{details:V({},c.error.details)}),c.error.details.duringTest=`testCallQuality`):(c.error=c.error?V({},c.error):{},c.error.details={duringTest:`testCallQuality`}),e._maybeSendToSentry(c)}n(!1),t(V({result:a},o))}))}))})),function(){return d.apply(this,arguments)})},{key:`stopTestCallQuality`,value:function(){this.sendMessageToCallMachine({action:`stop-test-call-quality`})}},{key:`testConnectionQuality`,value:(u=L((function*(e){var t;B()?(console.warn(`testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead`),t=yield this.testPeerToPeerCallQuality(e)):(console.warn(`testConnectionQuality() is deprecated: use testCallQuality() instead`),t=yield this.testCallQuality());var n={result:t.result,secondsElapsed:t.secondsElapsed};return t.data&&(n.data={maxRTT:t.data.maxRoundTripTime,packetLoss:t.data.avgRecvPacketLoss}),n})),function(e){return u.apply(this,arguments)})},{key:`testPeerToPeerCallQuality`,value:(l=L((function*(e){var t=this;if(Am(this._testCallInProgress,`testPeerToPeerCallQuality()`),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}var n=e.videoTrack,r=e.duration;if(!this._validateVideoTrackForNetworkTests(n))throw Error(`Video track error`);return this._sharedTracks.videoTrackForConnectionQualityTest=n,new Promise((function(e,n){t.sendMessageToCallMachine({action:`test-p2p-call-quality`,duration:r},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return l.apply(this,arguments)})},{key:`stopTestConnectionQuality`,value:function(){B()?(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=L((function*(e){var t=this;if(Am(this._testCallInProgress,`testNetworkConnectivity()`),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}if(!this._validateVideoTrackForNetworkTests(e))throw Error(`Video track error`);return this._sharedTracks.videoTrackForNetworkConnectivityTest=e,new Promise((function(e,n){t.sendMessageToCallMachine({action:`test-network-connectivity`},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return c.apply(this,arguments)})},{key:`abortTestNetworkConnectivity`,value:function(){this.sendMessageToCallMachine({action:`abort-test-network-connectivity`})}},{key:`getCpuLoadStats`,value:function(){var e=this;return new Promise((function(t){e._callState===`joined-meeting`?e.sendMessageToCallMachine({action:`get-cpu-load-stats`},(function(e){t(e.cpuStats)})):t({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})}))}},{key:`_validateEncodingLayerHasValidProperties`,value:function(e){if(!(Object.keys(e)?.length>0))throw Error(`Empty encoding is not allowed. At least one of these valid keys should be specified:`+Object.values(mm))}},{key:`_validateVideoSendSettings`,value:function(e,t){var n=e===`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`],r=`Video send settings should be either an object or one of the supported presets: ${n.join()}`;if(typeof t==`string`){if(!n.includes(t))throw Error(r)}else{if(I(t)!==`object`)throw Error(r);if(!t.maxQuality&&!t.encodings&&t.allowAdaptiveLayers===void 0)throw Error(`Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute`);if(t.maxQuality&&[`low`,`medium`,`high`].indexOf(t.maxQuality)===-1)throw Error(`maxQuality must be either low, medium or high`);if(t.encodings){var i=!1;switch(Object.keys(t.encodings).length){case 1:i=!t.encodings.low;break;case 2:i=!t.encodings.low||!t.encodings.medium;break;case 3:i=!t.encodings.low||!t.encodings.medium||!t.encodings.high;break;default:i=!0}if(i)throw Error(`Encodings must be defined as: low, low and medium, or low, medium and high.`);t.encodings.low&&this._validateEncodingLayerHasValidProperties(t.encodings.low),t.encodings.medium&&this._validateEncodingLayerHasValidProperties(t.encodings.medium),t.encodings.high&&this._validateEncodingLayerHasValidProperties(t.encodings.high)}}}},{key:`validateUpdateSendSettings`,value:function(e){var t=this;if(!e||Object.keys(e).length===0)throw Error(`Send settings must contain at least information for one track!`);Object.entries(e).forEach((function(e){var n=Oo(e,2),r=n[0],i=n[1];t._validateVideoSendSettings(r,i)}))}},{key:`updateSendSettings`,value:function(e){var t=this;return this.validateUpdateSendSettings(e),this.needsLoad()?(this._preloadCache.sendSettings=e,{sendSettings:this._preloadCache.sendSettings}):new Promise((function(n,r){t.sendMessageToCallMachine({action:`update-send-settings`,sendSettings:e},(function(e){e.error?r(e.error):n(e.sendSettings)}))}))}},{key:`getSendSettings`,value:function(){return this._sendSettings||this._preloadCache.sendSettings}},{key:`getLocalAudioLevel`,value:function(){return this._localAudioLevel}},{key:`getRemoteParticipantsAudioLevel`,value:function(){return this._remoteParticipantsAudioLevel}},{key:`getActiveSpeaker`,value:function(){return H(),this._activeSpeaker}},{key:`setActiveSpeakerMode`,value:function(e){return H(),this.sendMessageToCallMachine({action:`set-active-speaker-mode`,enabled:e}),this}},{key:`activeSpeakerMode`,value:function(){return H(),this._activeSpeakerMode}},{key:`subscribeToTracksAutomatically`,value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:`setSubscribeToTracksAutomatically`,value:function(e){return Em(this._callState,`setSubscribeToTracksAutomatically()`,`Use the subscribeToTracksAutomatically configuration property.`),this._preloadCache.subscribeToTracksAutomatically=e,this.sendMessageToCallMachine({action:`daily-method-subscribe-to-tracks-automatically`,enabled:e}),this}},{key:`enumerateDevices`,value:(s=L((function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return Kf()===`Firefox`&&qf().major>115&&qf().major<123&&(t=t.filter((function(e){return e.kind!==`audiooutput`}))),{devices:t.map((function(e){var t=JSON.parse(JSON.stringify(e));if(!B()&&e.kind===`videoinput`&&e.getCapabilities){var n,r=e.getCapabilities();t.facing=(r==null||(n=r.facingMode)==null?void 0:n.length)>=1?r.facingMode[0]:void 0}return t}))}}return new Promise((function(t){e.sendMessageToCallMachine({action:`enumerate-devices`},(function(e){t({devices:e.devices})}))}))})),function(){return s.apply(this,arguments)})},{key:`sendAppMessage`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`*`;if(Em(this._callState,`sendAppMessage()`),JSON.stringify(e).length>this._maxAppMessageSize)throw Error(`Message data too large. Max size is `+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:`app-msg`,data:e,to:t}),this}},{key:`addFakeParticipant`,value:function(e){return H(),Em(this._callState,`addFakeParticipant()`),this.sendMessageToCallMachine(V({action:`add-fake-participant`},e)),this}},{key:`setShowNamesMode`,value:function(e){return Mm(this._callObjectMode,`setShowNamesMode()`),H(),e&&e!==`always`&&e!==`never`?(console.error(`setShowNamesMode argument should be "always", "never", or false`),this):(this.sendMessageToCallMachine({action:`set-show-names`,mode:e}),this)}},{key:`setShowLocalVideo`,value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return Mm(this._callObjectMode,`setShowLocalVideo()`),H(),Em(this._callState,`setShowLocalVideo()`),typeof e==`boolean`?(this.sendMessageToCallMachine({action:`set-show-local-video`,show:e}),this._showLocalVideo=e,this):(console.error(`setShowLocalVideo only accepts a boolean value`),this)}},{key:`showLocalVideo`,value:function(){return Mm(this._callObjectMode,`showLocalVideo()`),H(),this._showLocalVideo}},{key:`setShowParticipantsBar`,value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return Mm(this._callObjectMode,`setShowParticipantsBar()`),H(),Em(this._callState,`setShowParticipantsBar()`),typeof e==`boolean`?(this.sendMessageToCallMachine({action:`set-show-participants-bar`,show:e}),this._showParticipantsBar=e,this):(console.error(`setShowParticipantsBar only accepts a boolean value`),this)}},{key:`showParticipantsBar`,value:function(){return Mm(this._callObjectMode,`showParticipantsBar()`),H(),this._showParticipantsBar}},{key:`customIntegrations`,value:function(){return H(),Mm(this._callObjectMode,`customIntegrations()`),this._customIntegrations}},{key:`setCustomIntegrations`,value:function(e){return H(),Mm(this._callObjectMode,`setCustomIntegrations()`),Em(this._callState,`setCustomIntegrations()`),Gm(e)?(this.sendMessageToCallMachine({action:`set-custom-integrations`,integrations:e}),this._customIntegrations=e,this):this}},{key:`startCustomIntegrations`,value:function(e){var t=this;if(H(),Mm(this._callObjectMode,`startCustomIntegrations()`),Em(this._callState,`startCustomIntegrations()`),Array.isArray(e)&&e.some((function(e){return typeof e!=`string`}))||!Array.isArray(e)&&typeof e!=`string`)return console.error(`startCustomIntegrations() only accepts string | string[]`),this;var n=typeof e==`string`?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error(`Can't find custom integration(s): "${r.join(`, `)}"`),this):(this.sendMessageToCallMachine({action:`start-custom-integrations`,ids:n}),this)}},{key:`stopCustomIntegrations`,value:function(e){var t=this;if(H(),Mm(this._callObjectMode,`stopCustomIntegrations()`),Em(this._callState,`stopCustomIntegrations()`),Array.isArray(e)&&e.some((function(e){return typeof e!=`string`}))||!Array.isArray(e)&&typeof e!=`string`)return console.error(`stopCustomIntegrations() only accepts string | string[]`),this;var n=typeof e==`string`?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error(`Can't find custom integration(s): "${r.join(`, `)}"`),this):(this.sendMessageToCallMachine({action:`stop-custom-integrations`,ids:n}),this)}},{key:`customTrayButtons`,value:function(){return Mm(this._callObjectMode,`customTrayButtons()`),H(),this._customTrayButtons}},{key:`updateCustomTrayButtons`,value:function(e){return Mm(this._callObjectMode,`updateCustomTrayButtons()`),H(),Em(this._callState,`updateCustomTrayButtons()`),Wm(e)?(this.sendMessageToCallMachine({action:`update-custom-tray-buttons`,btns:e}),this._customTrayButtons=e,this):(console.error(`updateCustomTrayButtons only accepts a dictionary of the type ${JSON.stringify(_m)}`),this)}},{key:`theme`,value:function(){return Mm(this._callObjectMode,`theme()`),this.properties.theme}},{key:`setTheme`,value:function(e){var t=this;return Mm(this._callObjectMode,`setTheme()`),new Promise((function(n,r){try{t.validateProperties({theme:e}),t.properties.theme=V({},e),t.sendMessageToCallMachine({action:`set-theme`,theme:t.properties.theme});try{t.emitDailyJSEvent({action:Sd,theme:t.properties.theme})}catch(e){console.log(`could not emit 'theme-updated'`,e)}n(t.properties.theme)}catch(e){r(e)}}))}},{key:`requestFullscreen`,value:(o=L((function*(){if(H(),this._iframe&&!document.fullscreenElement&&If())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(e){console.log(`could not make video call fullscreen`,e)}})),function(){return o.apply(this,arguments)})},{key:`exitFullscreen`,value:function(){H(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:`getSidebarView`,value:(a=L((function*(){var e=this;return this._callObjectMode?(console.error(`getSidebarView is not available in callObject mode`),Promise.resolve(null)):new Promise((function(t){e.sendMessageToCallMachine({action:`get-sidebar-view`},(function(e){t(e.view)}))}))})),function(){return a.apply(this,arguments)})},{key:`setSidebarView`,value:function(e){return this._callObjectMode?(console.error(`setSidebarView is not available in callObject mode`),this):(this.sendMessageToCallMachine({action:`set-sidebar-view`,view:e}),this)}},{key:`room`,value:(i=L((function*(){var e=this,t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeRoomConfigDefaults,n=t===void 0||t;return this._accessState.access===`unknown`||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise((function(t){e.sendMessageToCallMachine({action:`lib-room-info`,includeRoomConfigDefaults:n},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return i.apply(this,arguments)})},{key:`geo`,value:(r=L((function*(){try{return{current:(yield(yield fetch(`https://gs.daily.co/_ks_/x-swsl/:`)).json()).geo}}catch(e){return console.error(`geo lookup failed`,e),{current:``}}})),function(){return r.apply(this,arguments)})},{key:`setNetworkTopology`,value:(n=L((function*(e){var t=this;return H(),Em(this._callState,`setNetworkTopology()`),new Promise((function(n,r){t.sendMessageToCallMachine({action:`set-network-topology`,opts:e},(function(e){e.error?r({error:e.error}):n({workerId:e.workerId})}))}))})),function(e){return n.apply(this,arguments)})},{key:`getNetworkTopology`,value:(t=L((function*(){var e=this;return new Promise((function(t,n){e.needsLoad()&&t({topology:`none`}),e.sendMessageToCallMachine({action:`get-network-topology`},(function(e){e.error?n({error:e.error}):t({topology:e.topology})}))}))})),function(){return t.apply(this,arguments)})},{key:`setPlayNewParticipantSound`,value:function(e){if(H(),typeof e!=`number`&&!0!==e&&!1!==e)throw Error(`argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ${e}`);this.sendMessageToCallMachine({action:`daily-method-set-play-ding`,arg:e})}},{key:`on`,value:function(e,t){return No.prototype.on.call(this,e,t)}},{key:`once`,value:function(e,t){return No.prototype.once.call(this,e,t)}},{key:`off`,value:function(e,t){return No.prototype.off.call(this,e,t)}},{key:`validateProperties`,value:function(e){var t,n;if(e!=null&&(t=e.dailyConfig)!=null&&t.userMediaAudioConstraints){var r;B()||console.warn(`userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.`);var i=e.inputSettings||{};i.audio=e.inputSettings?.audio||{},i.audio.settings=((r=e.inputSettings)==null||(r=r.audio)==null?void 0:r.settings)||{},i.audio.settings=V(V({},i.audio.settings),e.dailyConfig.userMediaAudioConstraints),e.inputSettings=i,delete e.dailyConfig.userMediaAudioConstraints}if(e!=null&&(n=e.dailyConfig)!=null&&n.userMediaVideoConstraints){var a;B()||console.warn(`userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.`);var o=e.inputSettings||{};o.video=e.inputSettings?.video||{},o.video.settings=((a=e.inputSettings)==null||(a=a.video)==null?void 0:a.settings)||{},o.video.settings=V(V({},o.video.settings),e.dailyConfig.userMediaVideoConstraints),e.inputSettings=o,delete e.dailyConfig.userMediaVideoConstraints}for(var s in e)if(xm[s]){if(xm[s].validate&&!xm[s].validate(e[s],this))throw Error(`property '${s}': ${xm[s].help}`)}else console.warn(`Ignoring unrecognized property '${s}'`),delete e[s]}},{key:`assembleMeetingUrl`,value:function(){var e,t=V(V({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:(e=this.properties.dailyConfig)!=null&&e.proxyUrl?encodeURIComponent(this.properties.dailyConfig?.proxyUrl):void 0}),n=t.url.match(/\?/)?`&`:`?`;return t.url+n+Object.keys(xm).filter((function(e){return xm[e].queryString&&t[e]!==void 0})).map((function(e){return`${xm[e].queryString}=${t[e]}`})).join(`&`)}},{key:`needsLoad`,value:function(){return[`new`,dd,hd,gd].includes(this._callState)}},{key:`sendMessageToCallMachine`,value:function(e,t){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw Error(`Use after destroy`);this._messageChannel.sendMessageToCallMachine(e,t,this.callClientId,this._iframe)}},{key:`forwardPackagedMessageToCallMachine`,value:function(e){this._messageChannel.forwardPackagedMessageToCallMachine(e,this._iframe,this.callClientId)}},{key:`addListenerForPackagedMessagesFromCallMachine`,value:function(e){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(e,this.callClientId)}},{key:`removeListenerForPackagedMessagesFromCallMachine`,value:function(e){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(e)}},{key:`handleMessageFromCallMachine`,value:function(e){switch(e.action){case bd:this.sendMessageToCallMachine(V({action:xd},this.properties));break;case`call-machine-initialized`:this._callMachineInitialized=!0;var t={action:wf,level:`log`,code:1011,stats:{event:`bundle load`,time:this._bundleLoadTime===`no-op`?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime===`no-op`,url:Qo(this.properties.dailyConfig)}};this.sendMessageToCallMachine(t),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case wd:this._loadedCallback&&=(this._loadedCallback(),null),this.emitDailyJSEvent(e);break;case Od:var n=V({},e);delete n.internal,this._maxAppMessageSize=e.internal?._maxAppMessageSize||yf,this._joinedCallback&&=(this._joinedCallback(e.participants),null),this.emitDailyJSEvent(n);break;case Ad:case jd:if(this._callState===`left-meeting`)return;if(e.participant&&e.participant.session_id){var r=e.participant.local?`local`:e.participant.session_id;if(this._callObjectMode){var i=this._callMachine().store;Op(e.participant,i),kp(e.participant,i),jp(e.participant,this._participants[r],i)}try{this.maybeParticipantTracksStopped(this._participants[r],e.participant),this.maybeParticipantTracksStarted(this._participants[r],e.participant),this.maybeEventRecordingStopped(this._participants[r],e.participant),this.maybeEventRecordingStarted(this._participants[r],e.participant)}catch(e){console.error(`track events error`,e)}this.compareEqualForParticipantUpdateEvent(e.participant,this._participants[r])||(this._participants[r]=V({},e.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(e))}break;case Md:if(e.participant&&e.participant.session_id){var a=this._participants[e.participant.session_id];a&&this.maybeParticipantTracksStopped(a,null),delete this._participants[e.participant.session_id],this.emitDailyJSEvent(e)}break;case Nd:Io(this._participantCounts,e.participantCounts)||(this._participantCounts=e.participantCounts,this.emitDailyJSEvent(e));break;case Pd:var o={access:e.access};e.awaitingAccess&&(o.awaitingAccess=e.awaitingAccess),Io(this._accessState,o)||(this._accessState=o,this.emitDailyJSEvent(e));break;case Fd:if(e.meetingSession){this._meetingSessionSummary=e.meetingSession,this.emitDailyJSEvent(e);var s=V(V({},e),{},{action:`meeting-session-updated`});this.emitDailyJSEvent(s)}break;case vf:var c;this._iframe&&!e.preserveIframe&&(this._iframe.src=``),this._updateCallState(gd),this.resetMeetingDependentVars(),this._loadedCallback&&=(this._loadedCallback(e.errorMsg),null),e.preserveIframe;var l=go(e,rm);l!=null&&(c=l.error)!=null&&c.details&&(l.error.details=JSON.parse(l.error.details)),this._maybeSendToSentry(e),this._joinedCallback&&=(this._joinedCallback(null,l),null),this.emitDailyJSEvent(l);break;case kd:this._callState!==`error`&&this._updateCallState(`left-meeting`),this.resetMeetingDependentVars(),this._resolveLeave&&=(this._resolveLeave(),null),this.emitDailyJSEvent(e);break;case`selected-devices-updated`:e.devices&&this.emitDailyJSEvent(e);break;case of:var u=e.state,d=e.threshold,f=e.quality,p=u.state,m=u.reasons;p===this._network.networkState&&Io(m,this._network.networkStateReasons)&&d===this._network.threshold&&f===this._network.quality||(this._network.networkState=p,this._network.networkStateReasons=m,this._network.quality=f,this._network.threshold=d,e.networkState=p,m.length&&(e.networkStateReasons=m),delete e.state,this.emitDailyJSEvent(e));break;case cf:e&&e.cpuLoadState&&this.emitDailyJSEvent(e);break;case lf:e&&e.faceCounts!==void 0&&this.emitDailyJSEvent(e);break;case rf:var h=e.activeSpeaker;this._activeSpeaker.peerId!==h.peerId&&(this._activeSpeaker.peerId=h.peerId,this.emitDailyJSEvent({action:e.action,activeSpeaker:this._activeSpeaker}));break;case`show-local-video-changed`:if(this._callObjectMode)return;var g=e.show;this._showLocalVideo=g,this.emitDailyJSEvent({action:e.action,show:g});break;case af:var _=e.enabled;this._activeSpeakerMode!==_&&(this._activeSpeakerMode=_,this.emitDailyJSEvent({action:e.action,enabled:this._activeSpeakerMode}));break;case Ld:case Rd:case zd:this._waitingParticipants=e.allWaitingParticipants,this.emitDailyJSEvent({action:e.action,participant:e.participant});break;case hf:Io(this._receiveSettings,e.receiveSettings)||(this._receiveSettings=e.receiveSettings,this.emitDailyJSEvent({action:e.action,receiveSettings:e.receiveSettings}));break;case gf:this._maybeUpdateInputSettings(e.inputSettings);break;case`send-settings-updated`:Io(this._sendSettings,e.sendSettings)||(this._sendSettings=e.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:e.action,sendSettings:e.sendSettings}));break;case`local-audio-level`:this._localAudioLevel=e.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case`remote-participants-audio-level`:this._remoteParticipantsAudioLevel=e.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case Zd:var v=e.session_id;this._rmpPlayerState[v]=e.playerState,this.emitDailyJSEvent(e);break;case $d:delete this._rmpPlayerState[e.session_id],this.emitDailyJSEvent(e);break;case Qd:var y=e.session_id,b=this._rmpPlayerState[y];b&&this.compareEqualForRMPUpdateEvent(b,e.remoteMediaPlayerState)||(this._rmpPlayerState[y]=e.remoteMediaPlayerState,this.emitDailyJSEvent(e));break;case`custom-button-click`:case`sidebar-view-changed`:case`pip-started`:case`pip-stopped`:this.emitDailyJSEvent(e);break;case Id:var x=this._meetingSessionState.topology!==(e.meetingSessionState&&e.meetingSessionState.topology);this._meetingSessionState=Xm(e.meetingSessionState,this._callObjectMode),(this._callObjectMode||x)&&this.emitDailyJSEvent(e);break;case ef:this._isScreenSharing=!0,this.emitDailyJSEvent(e);break;case tf:case nf:this._isScreenSharing=!1,this.emitDailyJSEvent(e);break;case Ud:case Wd:case Gd:case Kd:case qd:case Bd:case Vd:case Hd:case Td:case Ed:case Yd:case Xd:case`test-completed`:case sf:case Jd:case uf:case df:case ff:case pf:case _f:case mf:case`dialin-ready`:case`dialin-connected`:case`dialin-error`:case`dialin-stopped`:case`dialin-warning`:case`dialout-connected`:case`dtmf-event`:case`dialout-answered`:case`dialout-error`:case`dialout-stopped`:case`dialout-warning`:this.emitDailyJSEvent(e);break;case`request-fullscreen`:this.requestFullscreen();break;case`request-exit-fullscreen`:this.exitFullscreen()}}},{key:`maybeEventRecordingStopped`,value:function(e,t){var n=`record`;e&&(t.local||!1!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:`recording-stopped`}))}},{key:`maybeEventRecordingStarted`,value:function(e,t){var n=`record`;e&&(t.local||!0!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:`recording-started`}))}},{key:`_trackStatePlayable`,value:function(e){return!(!e||e.state!==`playable`)}},{key:`_trackChanged`,value:function(e,t){return e?.id!==t?.id}},{key:`maybeEventTrackStopped`,value:function(e,t,n){var r=t?.tracks[e]??null,i=n?.tracks[e]??null,a=r?.track;if(a){var o=this._trackStatePlayable(r),s=this._trackStatePlayable(i),c=this._trackChanged(a,i?.track);o&&(s&&!c||this.emitDailyJSEvent({action:`track-stopped`,track:a,participant:n??t,type:e}))}}},{key:`maybeEventTrackStarted`,value:function(e,t,n){var r=t?.tracks[e]??null,i=n?.tracks[e]??null,a=i?.track;if(a){var o=this._trackStatePlayable(r),s=this._trackStatePlayable(i),c=this._trackChanged(r?.track,a);s&&(o&&!c||this.emitDailyJSEvent({action:`track-started`,track:a,participant:n,type:e}))}}},{key:`maybeParticipantTracksStopped`,value:function(e,t){if(e)for(var n in e.tracks)this.maybeEventTrackStopped(n,e,t)}},{key:`maybeParticipantTracksStarted`,value:function(e,t){if(t)for(var n in t.tracks)this.maybeEventTrackStarted(n,e,t)}},{key:`compareEqualForRMPUpdateEvent`,value:function(e,t){return e.state===t.state&&e.settings?.volume===t.settings?.volume}},{key:`emitDailyJSEvent`,value:function(e){try{e.callClientId=this.callClientId,this.emit(e.action,e)}catch(t){console.log(`could not emit`,e,t)}}},{key:`compareEqualForParticipantUpdateEvent`,value:function(e,t){return!!Io(e,t)&&(!e.videoTrack||!t.videoTrack||e.videoTrack.id===t.videoTrack.id&&e.videoTrack.muted===t.videoTrack.muted&&e.videoTrack.enabled===t.videoTrack.enabled)&&(!e.audioTrack||!t.audioTrack||e.audioTrack.id===t.audioTrack.id&&e.audioTrack.muted===t.audioTrack.muted&&e.audioTrack.enabled===t.audioTrack.enabled)}},{key:`nativeUtils`,value:function(){return B()?typeof DailyNativeUtils>`u`?(console.warn(`in React Native, DailyNativeUtils is expected to be available`),null):DailyNativeUtils:null}},{key:`updateIsPreparingToJoin`,value:function(e){this._updateCallState(this._callState,e)}},{key:`_updateCallState`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._isPreparingToJoin;if(e!==this._callState||t!==this._isPreparingToJoin){var n=this._callState,r=this._isPreparingToJoin;this._callState=e,this._isPreparingToJoin=t;var i=this._callState===md;this.updateShowAndroidOngoingMeetingNotification(i);var a=Dm(n,r),o=Dm(this._callState,this._isPreparingToJoin);a!==o&&(this.updateKeepDeviceAwake(o),this.updateDeviceAudioMode(o),this.updateNoOpRecordingEnsuringBackgroundContinuity(o))}}},{key:`resetMeetingDependentVars`,value:function(){this._participants={},this._participantCounts=fm,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:_d},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Xm(dm,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=yf,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:`updateKeepDeviceAwake`,value:function(e){B()&&this.nativeUtils().setKeepDeviceAwake(e,this.callClientId)}},{key:`updateDeviceAudioMode`,value:function(e){if(B()&&!this.disableReactNativeAutoDeviceManagement(`audio`)){var t=e?this._nativeInCallAudioMode:`idle`;this.nativeUtils().setAudioMode(t)}}},{key:`updateShowAndroidOngoingMeetingNotification`,value:function(e){if(B()&&this.nativeUtils().setShowOngoingMeetingNotification){var t,n,r,i;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var a=this.properties.reactNativeConfig.androidInCallNotification;t=a.title,n=a.subtitle,r=a.iconName,i=a.disableForCustomOverride}i&&(e=!1),this.nativeUtils().setShowOngoingMeetingNotification(e,t,n,r,this.callClientId)}}},{key:`updateNoOpRecordingEnsuringBackgroundContinuity`,value:function(e){B()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:`toggleParticipantAudioBasedOnNativeAudioFocus`,value:function(){var e;if(B()){var t=(e=this._callMachine())==null||(e=e.store)==null?void 0:e.getState();for(var n in t?.streams){var r=t.streams[n];r&&r.pendingTrack&&r.pendingTrack.kind===`audio`&&(r.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:`disableReactNativeAutoDeviceManagement`,value:function(e){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[e]}},{key:`absoluteUrl`,value:function(e){if(e!==void 0){var t=document.createElement(`a`);return t.href=e,t.href}}},{key:`sayHello`,value:function(){var e=`hello, world.`;return console.log(e),e}},{key:`_logUseAfterDestroy`,value:function(){var e=Object.values(cm)[0];if(this.needsLoad())if(e&&!e.needsLoad()){var t={action:wf,level:`error`,code:this.strictMode?9995:9997};e.sendMessageToCallMachine(t)}else this.strictMode||console.error("You are are attempting to use a call instance that was previously destroyed, which is unsupported. Please remove `strictMode: false` from your constructor properties to enable strict mode to track down and fix this unsupported usage.");else{var n={action:wf,level:`error`,code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(n,null,this.callClientId,this._iframe)}}},{key:`_logDuplicateInstanceAttempt`,value:function(){for(var e=0,t=Object.values(cm);e<t.length;e++){var n=t[e];n._callMachineInitialized?(n.sendMessageToCallMachine({action:wf,level:`warn`,code:this.allowMultipleCallInstances?9993:9992}),n._delayDuplicateInstanceLog=!1):n._delayDuplicateInstanceLog=!0}}},{key:`_maybeSendToSentry`,value:function(t){var n,r,i,a;if(!((n=t.error)!=null&&n.type&&(![`connection-error`,`end-of-life`,`no-room`].includes(t.error.type)||t.error.type===`no-room`&&t.error.msg.includes(`deleted`)))){var o=(r=this.properties)!=null&&r.url?new URL(this.properties.url):void 0,s=`production`;o&&o.host.includes(`.staging.daily`)&&(s=`staging`);var c,l,u,d,f,p=new Du({dsn:`https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844`,transport:Hu,stackParser:Yu,integrations:function(e){let t=[Wl(),Hl(),ed(),Qu(),od(),ud(),$l(),ld()];return!1!==e.autoSessionTracking&&t.push(ad()),t}({}).filter((function(e){return![`BrowserApiErrors`,`Breadcrumbs`,`GlobalHandlers`].includes(e.name)})),environment:s}),m=new xc;if(m.setClient(p),p.init(),!((i=this._participants)==null||(i=i.local)==null)&&i.session_id&&m.setExtra(`sessionId`,this._participants.local.session_id),this.properties){var h=V({},this.properties);h.userName=h.userName?`[Filtered]`:void 0,h.userData=h.userData?`[Filtered]`:void 0,h.token=h.token?`[Filtered]`:void 0,m.setExtra(`properties`,h)}if(o){var g=o.searchParams.get(`domain`);if(!g){var _=o.host.match(/(.*?)\./);g=_&&_[1]||``}g&&m.setTag(`domain`,g)}t.error&&(m.setTag(`fatalErrorType`,t.error.type),m.setExtra(`errorDetails`,t.error.details),(c=t.error.details)!=null&&c.uri&&m.setTag(`serverAddress`,t.error.details.uri),(l=t.error.details)!=null&&l.workerGroup&&m.setTag(`workerGroup`,t.error.details.workerGroup),(u=t.error.details)!=null&&u.geoGroup&&m.setTag(`geoGroup`,t.error.details.geoGroup),(d=t.error.details)!=null&&d.on&&m.setTag(`connectionAttempt`,t.error.details.on),(f=t.error.details)!=null&&f.bundleUrl&&(m.setTag(`bundleUrl`,t.error.details.bundleUrl),m.setTag(`bundleError`,t.error.details.sourceError.type))),m.setTags({callMode:this._callObjectMode?B()?`reactNative`:(a=this.properties)!=null&&(a=a.dailyConfig)!=null&&(a=a.callMode)!=null&&a.includes(`prebuilt`)?this.properties.dailyConfig.callMode:`custom`:`prebuilt-frame`,version:e.version()});var v=t.error?.msg||t.errorMsg;m.captureException(Error(v))}}},{key:`_callMachine`,value:function(){var e;return(e=window._daily)==null||(e=e.instances)==null||(e=e[this.callClientId])==null?void 0:e.callMachine}},{key:`_maybeUpdateInputSettings`,value:function(e){if(!Io(this._inputSettings,e)){var t=this._getInputSettings();this._inputSettings=e;var n=this._getInputSettings();Io(t,n)||this.emitDailyJSEvent({action:`input-settings-updated`,inputSettings:n})}}}],[{key:`supportedBrowser`,value:function(){if(B())return{supported:!0,mobile:!0,name:`React Native`,version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var e=Jo.getParser(Nf());return{supported:!!Uf(),mobile:e.getPlatformType()===`mobile`,name:e.getBrowserName(),version:e.getBrowserVersion(),supportsFullscreen:!!If(),supportsScreenShare:!!Ff(),supportsSfu:!!Uf(),supportsVideoProcessing:Vf(),supportsAudioProcessing:Hf()}}},{key:`version`,value:function(){return`0.89.1`}},{key:`createCallObject`,value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t.layout=`none`,new e(null,t)}},{key:`wrap`,value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(H(),!t||!t.contentWindow||typeof t.src!=`string`)throw Error(`DailyIframe::Wrap needs an iframe-like first argument`);return n.layout||(n.customLayout?n.layout=`custom-v1`:n.layout=`browser`),new e(t,n)}},{key:`createFrame`,value:function(t,n){var r,i;H(),t&&n?(r=t,i=n):t&&t.append?(r=t,i={}):(r=document.body,i=t||{});var a=i.iframeStyle;a||=r===document.body?{position:`fixed`,border:`1px solid black`,backgroundColor:`white`,width:`375px`,height:`450px`,right:`1em`,bottom:`1em`}:{border:0,width:`100%`,height:`100%`};var o=document.createElement(`iframe`);window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?o.allow=`microphone, camera`:o.allow=`microphone; camera; autoplay; display-capture; screen-wake-lock; compute-pressure;`,o.style.visibility=`hidden`,r.appendChild(o),o.style.visibility=null,Object.keys(a).forEach((function(e){return o.style[e]=a[e]})),i.layout||(i.customLayout?i.layout=`custom-v1`:i.layout=`browser`);try{return new e(o,i)}catch(e){throw r.removeChild(o),e}}},{key:`createTransparentFrame`,value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};H();var n=document.createElement(`iframe`);return n.allow=`microphone; camera; autoplay`,n.style.cssText=`
40
+ { settings?: {state: "play"|"pause"} }`),e}return new Promise((function(e,i){t.sendMessageToCallMachine({action:`daily-method-update-remote-media-player`,session_id:n,settings:r},(function(t){t.error?i({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})}))}))})),function(e){return _.apply(this,arguments)})},{key:`startTranscription`,value:function(e){Dm(this._callState,`startTranscription()`),this.sendMessageToCallMachine(V({action:`daily-method-start-transcription`},e))}},{key:`updateTranscription`,value:function(e){if(Dm(this._callState,`updateTranscription()`),!e)throw Error(`updateTranscription Error: options is mandatory`);if(I(e)!==`object`)throw Error(`updateTranscription Error: options must be object type`);if(e.participants&&!Array.isArray(e.participants))throw Error(`updateTranscription Error: participants must be an array`);this.sendMessageToCallMachine(V({action:`daily-method-update-transcription`},e))}},{key:`stopTranscription`,value:function(e){if(Dm(this._callState,`stopTranscription()`),e&&I(e)!==`object`)throw Error(`stopTranscription Error: options must be object type`);if(e&&!e.instanceId)throw Error(`"instanceId" not provided`);this.sendMessageToCallMachine(V({action:`daily-method-stop-transcription`},e))}},{key:`startDialOut`,value:(g=L((function*(e){var t=this;Dm(this._callState,`startDialOut()`);var n=function(e){if(e){if(!Array.isArray(e))throw Error(`Error starting dial out: audio codec must be an array`);if(e.length<=0)throw Error(`Error starting dial out: audio codec array specified but empty`);e.forEach((function(e){if(typeof e!=`string`)throw Error(`Error starting dial out: audio codec must be a string`);if(e!==`OPUS`&&e!==`PCMU`&&e!==`PCMA`&&e!==`G722`)throw Error(`Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722`)}))}};if(!e.sipUri&&!e.phoneNumber)throw Error(`Error starting dial out: either a sip uri or phone number must be provided`);if(e.sipUri&&e.phoneNumber)throw Error(`Error starting dial out: only one of sip uri or phone number must be provided`);if(e.sipUri){if(typeof e.sipUri!=`string`)throw Error(`Error starting dial out: sipUri must be a string`);if(!e.sipUri.startsWith(`sip:`))throw Error(`Error starting dial out: Invalid SIP URI, must start with 'sip:'`);if(e.video&&typeof e.video!=`boolean`)throw Error(`Error starting dial out: video must be a boolean value`);(function(e){if(e&&(n(e.audio),e.video)){if(!Array.isArray(e.video))throw Error(`Error starting dial out: video codec must be an array`);if(e.video.length<=0)throw Error(`Error starting dial out: video codec array specified but empty`);e.video.forEach((function(e){if(typeof e!=`string`)throw Error(`Error starting dial out: video codec must be a string`);if(e!==`H264`&&e!==`VP8`)throw Error(`Error starting dial out: video codec must be H264 or VP8`)}))}})(e.codecs)}if(e.phoneNumber){if(typeof e.phoneNumber!=`string`)throw Error(`Error starting dial out: phoneNumber must be a string`);if(!/^\+\d{1,}$/.test(e.phoneNumber))throw Error(`Error starting dial out: Invalid phone number, must be valid phone number as per E.164`);e.codecs&&n(e.codecs.audio)}if(e.callerId){if(typeof e.callerId!=`string`)throw Error(`Error starting dial out: callerId must be a string`);if(e.sipUri)throw Error(`Error starting dial out: callerId not allowed with sipUri`)}if(e.displayName){if(typeof e.displayName!=`string`)throw Error(`Error starting dial out: displayName must be a string`);if(e.displayName.length>=200)throw Error(`Error starting dial out: displayName length must be less than 200`)}if(e.userId){if(typeof e.userId!=`string`)throw Error(`Error starting dial out: userId must be a string`);if(e.userId.length>36)throw Error(`Error starting dial out: userId length must be less than or equal to 36`)}if(Tm(e),e.permissions&&e.permissions.canReceive){var r=ko(tm.validateJSONObject(e.permissions.canReceive),2),i=r[0],a=r[1];if(!i)throw Error(a)}if(e.provider){if(e.provider!==`daily`)throw Error(`Error: provider can be set only to 'daily', got: ${e.provider}`);if(e.phoneNumber)throw 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(n,r){t.sendMessageToCallMachine(V({action:`dialout-start`},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return g.apply(this,arguments)})},{key:`stopDialOut`,value:function(e){var t=this;return Dm(this._callState,`stopDialOut()`),new Promise((function(n,r){t.sendMessageToCallMachine(V({action:`dialout-stop`},e),(function(e){e.error?r(e.error):n(e)}))}))}},{key:`sipCallTransfer`,value:(h=L((function*(e){var t=this;if(Dm(this._callState,`sipCallTransfer()`),!e)throw Error(`sipCallTransfer() requires a sessionId and toEndPoint`);return e.useSipRefer=!1,Jm(e,`sipCallTransfer`),Tm(e),new Promise((function(n,r){t.sendMessageToCallMachine(V({action:Nf},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return h.apply(this,arguments)})},{key:`sipRefer`,value:(m=L((function*(e){var t=this;if(Dm(this._callState,`sipRefer()`),!e)throw Error(`sessionId and toEndPoint are mandatory parameter`);return e.useSipRefer=!0,Jm(e,`sipRefer`),new Promise((function(n,r){t.sendMessageToCallMachine(V({action:Nf},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return m.apply(this,arguments)})},{key:`sendDTMF`,value:(p=L((function*(e){var t=this;return Dm(this._callState,`sendDTMF()`),function(e){var t=e.sessionId,n=e.tones,r=e.method,i=e.digitDurationMs;if(!t||!n)throw Error(`sessionId and tones are mandatory parameter`);if(typeof t!=`string`||typeof n!=`string`)throw Error(`sessionId and tones should be of string type`);if(n.length>20)throw Error(`tones string must be upto 20 characters`);var a=n.match(/[^0-9A-D*#]/g);if(a&&a[0])throw Error(`${a[0]} is not valid DTMF tone`);if(r&&![`sip-info`,`telephone-event`,`auto`].includes(r))throw Error(`method must be one of 'sip-info', 'telephone-event', or 'auto'`);if(i!==void 0){if(typeof i!=`number`)throw Error(`digitDurationMs must be a number`);if(!Number.isFinite(i)||!Number.isInteger(i))throw Error(`digitDurationMs must be a finite integer number`);if(i<50||i>2e3)throw Error(`digitDurationMs must be between 50ms and 2000ms`)}}(e),e.method=e.method||`auto`,e.digitDurationMs=e.digitDurationMs||500,new Promise((function(n,r){t.sendMessageToCallMachine(V({action:`send-dtmf`},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return p.apply(this,arguments)})},{key:`getNetworkStats`,value:function(){var e=this;return this._callState===`joined-meeting`?new Promise((function(t){e.sendMessageToCallMachine({action:`get-calc-stats`},(function(n){t(V(V({},e._network),{},{stats:n.stats}))}))})):Promise.resolve(V({stats:{latest:{}}},this._network))}},{key:`testWebsocketConnectivity`,value:(f=L((function*(){var e=this;if(jm(this._testCallInProgress,`testWebsocketConnectivity()`),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}return new Promise((function(t,n){e.sendMessageToCallMachine({action:`test-websocket-connectivity`},(function(e){e.error?n(e.error):t(e.results)}))}))})),function(){return f.apply(this,arguments)})},{key:`abortTestWebsocketConnectivity`,value:function(){this.sendMessageToCallMachine({action:`abort-test-websocket-connectivity`})}},{key:`_validateVideoTrackForNetworkTests`,value:function(e){return e?e instanceof MediaStreamTrack?!!Gp(e,{isLocalScreenVideo:!1})||(console.error(`Video track is not playable. This test needs a live video track.`),!1):(console.error("Video track needs to be of type `MediaStreamTrack`."),!1):(console.error(`Missing video track. You must provide a video track in order to run this test.`),!1)}},{key:`testCallQuality`,value:(d=L((function*(){var e=this;H(),Mm(this._callObjectMode,`testCallQuality()`),Am(this._callMachineInitialized,`testCallQuality()`,null,!0),km(this._callState,this._isPreparingToJoin,`testCallQuality()`);var t=this._testCallAlreadyInProgress,n=function(n){t||(e._testCallInProgress=n)};if(n(!0),this.needsLoad())try{var r=this._callState;yield this.load(),this._callState=r}catch(e){return n(!1),Promise.reject(e)}return new Promise((function(t){e.sendMessageToCallMachine({action:`test-call-quality`,dailyJsVersion:e.properties.dailyJsVersion},(function(r){var i=r.results,a=i.result,o=_o(i,rm);if(a===`failed`){var s,c=V({},o);(s=o.error)!=null&&s.details?(o.error.details=JSON.parse(o.error.details),c.error=V(V({},c.error),{},{details:V({},c.error.details)}),c.error.details.duringTest=`testCallQuality`):(c.error=c.error?V({},c.error):{},c.error.details={duringTest:`testCallQuality`}),e._maybeSendToSentry(c)}n(!1),t(V({result:a},o))}))}))})),function(){return d.apply(this,arguments)})},{key:`stopTestCallQuality`,value:function(){this.sendMessageToCallMachine({action:`stop-test-call-quality`})}},{key:`testConnectionQuality`,value:(u=L((function*(e){var t;B()?(console.warn(`testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead`),t=yield this.testPeerToPeerCallQuality(e)):(console.warn(`testConnectionQuality() is deprecated: use testCallQuality() instead`),t=yield this.testCallQuality());var n={result:t.result,secondsElapsed:t.secondsElapsed};return t.data&&(n.data={maxRTT:t.data.maxRoundTripTime,packetLoss:t.data.avgRecvPacketLoss}),n})),function(e){return u.apply(this,arguments)})},{key:`testPeerToPeerCallQuality`,value:(l=L((function*(e){var t=this;if(jm(this._testCallInProgress,`testPeerToPeerCallQuality()`),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}var n=e.videoTrack,r=e.duration;if(!this._validateVideoTrackForNetworkTests(n))throw Error(`Video track error`);return this._sharedTracks.videoTrackForConnectionQualityTest=n,new Promise((function(e,n){t.sendMessageToCallMachine({action:`test-p2p-call-quality`,duration:r},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return l.apply(this,arguments)})},{key:`stopTestConnectionQuality`,value:function(){B()?(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=L((function*(e){var t=this;if(jm(this._testCallInProgress,`testNetworkConnectivity()`),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}if(!this._validateVideoTrackForNetworkTests(e))throw Error(`Video track error`);return this._sharedTracks.videoTrackForNetworkConnectivityTest=e,new Promise((function(e,n){t.sendMessageToCallMachine({action:`test-network-connectivity`},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return c.apply(this,arguments)})},{key:`abortTestNetworkConnectivity`,value:function(){this.sendMessageToCallMachine({action:`abort-test-network-connectivity`})}},{key:`getCpuLoadStats`,value:function(){var e=this;return new Promise((function(t){e._callState===`joined-meeting`?e.sendMessageToCallMachine({action:`get-cpu-load-stats`},(function(e){t(e.cpuStats)})):t({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})}))}},{key:`_validateEncodingLayerHasValidProperties`,value:function(e){if(!(Object.keys(e)?.length>0))throw Error(`Empty encoding is not allowed. At least one of these valid keys should be specified:`+Object.values(hm))}},{key:`_validateVideoSendSettings`,value:function(e,t){var n=e===`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`],r=`Video send settings should be either an object or one of the supported presets: ${n.join()}`;if(typeof t==`string`){if(!n.includes(t))throw Error(r)}else{if(I(t)!==`object`)throw Error(r);if(!t.maxQuality&&!t.encodings&&t.allowAdaptiveLayers===void 0)throw Error(`Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute`);if(t.maxQuality&&[`low`,`medium`,`high`].indexOf(t.maxQuality)===-1)throw Error(`maxQuality must be either low, medium or high`);if(t.encodings){var i=!1;switch(Object.keys(t.encodings).length){case 1:i=!t.encodings.low;break;case 2:i=!t.encodings.low||!t.encodings.medium;break;case 3:i=!t.encodings.low||!t.encodings.medium||!t.encodings.high;break;default:i=!0}if(i)throw Error(`Encodings must be defined as: low, low and medium, or low, medium and high.`);t.encodings.low&&this._validateEncodingLayerHasValidProperties(t.encodings.low),t.encodings.medium&&this._validateEncodingLayerHasValidProperties(t.encodings.medium),t.encodings.high&&this._validateEncodingLayerHasValidProperties(t.encodings.high)}}}},{key:`validateUpdateSendSettings`,value:function(e){var t=this;if(!e||Object.keys(e).length===0)throw Error(`Send settings must contain at least information for one track!`);Object.entries(e).forEach((function(e){var n=ko(e,2),r=n[0],i=n[1];t._validateVideoSendSettings(r,i)}))}},{key:`updateSendSettings`,value:function(e){var t=this;return this.validateUpdateSendSettings(e),this.needsLoad()?(this._preloadCache.sendSettings=e,{sendSettings:this._preloadCache.sendSettings}):new Promise((function(n,r){t.sendMessageToCallMachine({action:`update-send-settings`,sendSettings:e},(function(e){e.error?r(e.error):n(e.sendSettings)}))}))}},{key:`getSendSettings`,value:function(){return this._sendSettings||this._preloadCache.sendSettings}},{key:`getLocalAudioLevel`,value:function(){return this._localAudioLevel}},{key:`getRemoteParticipantsAudioLevel`,value:function(){return this._remoteParticipantsAudioLevel}},{key:`getActiveSpeaker`,value:function(){return H(),this._activeSpeaker}},{key:`setActiveSpeakerMode`,value:function(e){return H(),this.sendMessageToCallMachine({action:`set-active-speaker-mode`,enabled:e}),this}},{key:`activeSpeakerMode`,value:function(){return H(),this._activeSpeakerMode}},{key:`subscribeToTracksAutomatically`,value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:`setSubscribeToTracksAutomatically`,value:function(e){return Dm(this._callState,`setSubscribeToTracksAutomatically()`,`Use the subscribeToTracksAutomatically configuration property.`),this._preloadCache.subscribeToTracksAutomatically=e,this.sendMessageToCallMachine({action:`daily-method-subscribe-to-tracks-automatically`,enabled:e}),this}},{key:`enumerateDevices`,value:(s=L((function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return qf()===`Firefox`&&Jf().major>115&&Jf().major<123&&(t=t.filter((function(e){return e.kind!==`audiooutput`}))),{devices:t.map((function(e){var t=JSON.parse(JSON.stringify(e));if(!B()&&e.kind===`videoinput`&&e.getCapabilities){var n,r=e.getCapabilities();t.facing=(r==null||(n=r.facingMode)==null?void 0:n.length)>=1?r.facingMode[0]:void 0}return t}))}}return new Promise((function(t){e.sendMessageToCallMachine({action:`enumerate-devices`},(function(e){t({devices:e.devices})}))}))})),function(){return s.apply(this,arguments)})},{key:`sendAppMessage`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`*`;if(Dm(this._callState,`sendAppMessage()`),JSON.stringify(e).length>this._maxAppMessageSize)throw Error(`Message data too large. Max size is `+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:`app-msg`,data:e,to:t}),this}},{key:`addFakeParticipant`,value:function(e){return H(),Dm(this._callState,`addFakeParticipant()`),this.sendMessageToCallMachine(V({action:`add-fake-participant`},e)),this}},{key:`setShowNamesMode`,value:function(e){return Nm(this._callObjectMode,`setShowNamesMode()`),H(),e&&e!==`always`&&e!==`never`?(console.error(`setShowNamesMode argument should be "always", "never", or false`),this):(this.sendMessageToCallMachine({action:`set-show-names`,mode:e}),this)}},{key:`setShowLocalVideo`,value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return Nm(this._callObjectMode,`setShowLocalVideo()`),H(),Dm(this._callState,`setShowLocalVideo()`),typeof e==`boolean`?(this.sendMessageToCallMachine({action:`set-show-local-video`,show:e}),this._showLocalVideo=e,this):(console.error(`setShowLocalVideo only accepts a boolean value`),this)}},{key:`showLocalVideo`,value:function(){return Nm(this._callObjectMode,`showLocalVideo()`),H(),this._showLocalVideo}},{key:`setShowParticipantsBar`,value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return Nm(this._callObjectMode,`setShowParticipantsBar()`),H(),Dm(this._callState,`setShowParticipantsBar()`),typeof e==`boolean`?(this.sendMessageToCallMachine({action:`set-show-participants-bar`,show:e}),this._showParticipantsBar=e,this):(console.error(`setShowParticipantsBar only accepts a boolean value`),this)}},{key:`showParticipantsBar`,value:function(){return Nm(this._callObjectMode,`showParticipantsBar()`),H(),this._showParticipantsBar}},{key:`customIntegrations`,value:function(){return H(),Nm(this._callObjectMode,`customIntegrations()`),this._customIntegrations}},{key:`setCustomIntegrations`,value:function(e){return H(),Nm(this._callObjectMode,`setCustomIntegrations()`),Dm(this._callState,`setCustomIntegrations()`),Km(e)?(this.sendMessageToCallMachine({action:`set-custom-integrations`,integrations:e}),this._customIntegrations=e,this):this}},{key:`startCustomIntegrations`,value:function(e){var t=this;if(H(),Nm(this._callObjectMode,`startCustomIntegrations()`),Dm(this._callState,`startCustomIntegrations()`),Array.isArray(e)&&e.some((function(e){return typeof e!=`string`}))||!Array.isArray(e)&&typeof e!=`string`)return console.error(`startCustomIntegrations() only accepts string | string[]`),this;var n=typeof e==`string`?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error(`Can't find custom integration(s): "${r.join(`, `)}"`),this):(this.sendMessageToCallMachine({action:`start-custom-integrations`,ids:n}),this)}},{key:`stopCustomIntegrations`,value:function(e){var t=this;if(H(),Nm(this._callObjectMode,`stopCustomIntegrations()`),Dm(this._callState,`stopCustomIntegrations()`),Array.isArray(e)&&e.some((function(e){return typeof e!=`string`}))||!Array.isArray(e)&&typeof e!=`string`)return console.error(`stopCustomIntegrations() only accepts string | string[]`),this;var n=typeof e==`string`?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error(`Can't find custom integration(s): "${r.join(`, `)}"`),this):(this.sendMessageToCallMachine({action:`stop-custom-integrations`,ids:n}),this)}},{key:`customTrayButtons`,value:function(){return Nm(this._callObjectMode,`customTrayButtons()`),H(),this._customTrayButtons}},{key:`updateCustomTrayButtons`,value:function(e){return Nm(this._callObjectMode,`updateCustomTrayButtons()`),H(),Dm(this._callState,`updateCustomTrayButtons()`),Gm(e)?(this.sendMessageToCallMachine({action:`update-custom-tray-buttons`,btns:e}),this._customTrayButtons=e,this):(console.error(`updateCustomTrayButtons only accepts a dictionary of the type ${JSON.stringify(vm)}`),this)}},{key:`theme`,value:function(){return Nm(this._callObjectMode,`theme()`),this.properties.theme}},{key:`setTheme`,value:function(e){var t=this;return Nm(this._callObjectMode,`setTheme()`),new Promise((function(n,r){try{t.validateProperties({theme:e}),t.properties.theme=V({},e),t.sendMessageToCallMachine({action:`set-theme`,theme:t.properties.theme});try{t.emitDailyJSEvent({action:Cd,theme:t.properties.theme})}catch(e){console.log(`could not emit 'theme-updated'`,e)}n(t.properties.theme)}catch(e){r(e)}}))}},{key:`requestFullscreen`,value:(o=L((function*(){if(H(),this._iframe&&!document.fullscreenElement&&Lf())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(e){console.log(`could not make video call fullscreen`,e)}})),function(){return o.apply(this,arguments)})},{key:`exitFullscreen`,value:function(){H(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:`getSidebarView`,value:(a=L((function*(){var e=this;return this._callObjectMode?(console.error(`getSidebarView is not available in callObject mode`),Promise.resolve(null)):new Promise((function(t){e.sendMessageToCallMachine({action:`get-sidebar-view`},(function(e){t(e.view)}))}))})),function(){return a.apply(this,arguments)})},{key:`setSidebarView`,value:function(e){return this._callObjectMode?(console.error(`setSidebarView is not available in callObject mode`),this):(this.sendMessageToCallMachine({action:`set-sidebar-view`,view:e}),this)}},{key:`room`,value:(i=L((function*(){var e=this,t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeRoomConfigDefaults,n=t===void 0||t;return this._accessState.access===`unknown`||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise((function(t){e.sendMessageToCallMachine({action:`lib-room-info`,includeRoomConfigDefaults:n},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return i.apply(this,arguments)})},{key:`geo`,value:(r=L((function*(){try{return{current:(yield(yield fetch(`https://gs.daily.co/_ks_/x-swsl/:`)).json()).geo}}catch(e){return console.error(`geo lookup failed`,e),{current:``}}})),function(){return r.apply(this,arguments)})},{key:`setNetworkTopology`,value:(n=L((function*(e){var t=this;return H(),Dm(this._callState,`setNetworkTopology()`),new Promise((function(n,r){t.sendMessageToCallMachine({action:`set-network-topology`,opts:e},(function(e){e.error?r({error:e.error}):n({workerId:e.workerId})}))}))})),function(e){return n.apply(this,arguments)})},{key:`getNetworkTopology`,value:(t=L((function*(){var e=this;return new Promise((function(t,n){e.needsLoad()&&t({topology:`none`}),e.sendMessageToCallMachine({action:`get-network-topology`},(function(e){e.error?n({error:e.error}):t({topology:e.topology})}))}))})),function(){return t.apply(this,arguments)})},{key:`setPlayNewParticipantSound`,value:function(e){if(H(),typeof e!=`number`&&!0!==e&&!1!==e)throw Error(`argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ${e}`);this.sendMessageToCallMachine({action:`daily-method-set-play-ding`,arg:e})}},{key:`on`,value:function(e,t){return Po.prototype.on.call(this,e,t)}},{key:`once`,value:function(e,t){return Po.prototype.once.call(this,e,t)}},{key:`off`,value:function(e,t){return Po.prototype.off.call(this,e,t)}},{key:`validateProperties`,value:function(e){var t,n;if(e!=null&&(t=e.dailyConfig)!=null&&t.userMediaAudioConstraints){var r;B()||console.warn(`userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.`);var i=e.inputSettings||{};i.audio=e.inputSettings?.audio||{},i.audio.settings=((r=e.inputSettings)==null||(r=r.audio)==null?void 0:r.settings)||{},i.audio.settings=V(V({},i.audio.settings),e.dailyConfig.userMediaAudioConstraints),e.inputSettings=i,delete e.dailyConfig.userMediaAudioConstraints}if(e!=null&&(n=e.dailyConfig)!=null&&n.userMediaVideoConstraints){var a;B()||console.warn(`userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.`);var o=e.inputSettings||{};o.video=e.inputSettings?.video||{},o.video.settings=((a=e.inputSettings)==null||(a=a.video)==null?void 0:a.settings)||{},o.video.settings=V(V({},o.video.settings),e.dailyConfig.userMediaVideoConstraints),e.inputSettings=o,delete e.dailyConfig.userMediaVideoConstraints}for(var s in e)if(Sm[s]){if(Sm[s].validate&&!Sm[s].validate(e[s],this))throw Error(`property '${s}': ${Sm[s].help}`)}else console.warn(`Ignoring unrecognized property '${s}'`),delete e[s]}},{key:`assembleMeetingUrl`,value:function(){var e,t=V(V({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:(e=this.properties.dailyConfig)!=null&&e.proxyUrl?encodeURIComponent(this.properties.dailyConfig?.proxyUrl):void 0}),n=t.url.match(/\?/)?`&`:`?`;return t.url+n+Object.keys(Sm).filter((function(e){return Sm[e].queryString&&t[e]!==void 0})).map((function(e){return`${Sm[e].queryString}=${t[e]}`})).join(`&`)}},{key:`needsLoad`,value:function(){return[`new`,fd,gd,_d].includes(this._callState)}},{key:`sendMessageToCallMachine`,value:function(e,t){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw Error(`Use after destroy`);this._messageChannel.sendMessageToCallMachine(e,t,this.callClientId,this._iframe)}},{key:`forwardPackagedMessageToCallMachine`,value:function(e){this._messageChannel.forwardPackagedMessageToCallMachine(e,this._iframe,this.callClientId)}},{key:`addListenerForPackagedMessagesFromCallMachine`,value:function(e){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(e,this.callClientId)}},{key:`removeListenerForPackagedMessagesFromCallMachine`,value:function(e){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(e)}},{key:`handleMessageFromCallMachine`,value:function(e){switch(e.action){case xd:this.sendMessageToCallMachine(V({action:Sd},this.properties));break;case`call-machine-initialized`:this._callMachineInitialized=!0;var t={action:Tf,level:`log`,code:1011,stats:{event:`bundle load`,time:this._bundleLoadTime===`no-op`?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime===`no-op`,url:$o(this.properties.dailyConfig)}};this.sendMessageToCallMachine(t),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case Td:this._loadedCallback&&=(this._loadedCallback(),null),this.emitDailyJSEvent(e);break;case kd:var n=V({},e);delete n.internal,this._maxAppMessageSize=e.internal?._maxAppMessageSize||bf,this._joinedCallback&&=(this._joinedCallback(e.participants),null),this.emitDailyJSEvent(n);break;case jd:case Md:if(this._callState===`left-meeting`)return;if(e.participant&&e.participant.session_id){var r=e.participant.local?`local`:e.participant.session_id;if(this._callObjectMode){var i=this._callMachine().store;kp(e.participant,i),Ap(e.participant,i),Mp(e.participant,this._participants[r],i)}try{this.maybeParticipantTracksStopped(this._participants[r],e.participant),this.maybeParticipantTracksStarted(this._participants[r],e.participant),this.maybeEventRecordingStopped(this._participants[r],e.participant),this.maybeEventRecordingStarted(this._participants[r],e.participant)}catch(e){console.error(`track events error`,e)}this.compareEqualForParticipantUpdateEvent(e.participant,this._participants[r])||(this._participants[r]=V({},e.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(e))}break;case Nd:if(e.participant&&e.participant.session_id){var a=this._participants[e.participant.session_id];a&&this.maybeParticipantTracksStopped(a,null),delete this._participants[e.participant.session_id],this.emitDailyJSEvent(e)}break;case Pd:Lo(this._participantCounts,e.participantCounts)||(this._participantCounts=e.participantCounts,this.emitDailyJSEvent(e));break;case Fd:var o={access:e.access};e.awaitingAccess&&(o.awaitingAccess=e.awaitingAccess),Lo(this._accessState,o)||(this._accessState=o,this.emitDailyJSEvent(e));break;case Id:if(e.meetingSession){this._meetingSessionSummary=e.meetingSession,this.emitDailyJSEvent(e);var s=V(V({},e),{},{action:`meeting-session-updated`});this.emitDailyJSEvent(s)}break;case yf:var c;this._iframe&&!e.preserveIframe&&(this._iframe.src=``),this._updateCallState(_d),this.resetMeetingDependentVars(),this._loadedCallback&&=(this._loadedCallback(e.errorMsg),null),e.preserveIframe;var l=_o(e,im);l!=null&&(c=l.error)!=null&&c.details&&(l.error.details=JSON.parse(l.error.details)),this._maybeSendToSentry(e),this._joinedCallback&&=(this._joinedCallback(null,l),null),this.emitDailyJSEvent(l);break;case Ad:this._callState!==`error`&&this._updateCallState(`left-meeting`),this.resetMeetingDependentVars(),this._resolveLeave&&=(this._resolveLeave(),null),this.emitDailyJSEvent(e);break;case`selected-devices-updated`:e.devices&&this.emitDailyJSEvent(e);break;case sf:var u=e.state,d=e.threshold,f=e.quality,p=u.state,m=u.reasons;p===this._network.networkState&&Lo(m,this._network.networkStateReasons)&&d===this._network.threshold&&f===this._network.quality||(this._network.networkState=p,this._network.networkStateReasons=m,this._network.quality=f,this._network.threshold=d,e.networkState=p,m.length&&(e.networkStateReasons=m),delete e.state,this.emitDailyJSEvent(e));break;case lf:e&&e.cpuLoadState&&this.emitDailyJSEvent(e);break;case uf:e&&e.faceCounts!==void 0&&this.emitDailyJSEvent(e);break;case af:var h=e.activeSpeaker;this._activeSpeaker.peerId!==h.peerId&&(this._activeSpeaker.peerId=h.peerId,this.emitDailyJSEvent({action:e.action,activeSpeaker:this._activeSpeaker}));break;case`show-local-video-changed`:if(this._callObjectMode)return;var g=e.show;this._showLocalVideo=g,this.emitDailyJSEvent({action:e.action,show:g});break;case of:var _=e.enabled;this._activeSpeakerMode!==_&&(this._activeSpeakerMode=_,this.emitDailyJSEvent({action:e.action,enabled:this._activeSpeakerMode}));break;case Rd:case zd:case Bd:this._waitingParticipants=e.allWaitingParticipants,this.emitDailyJSEvent({action:e.action,participant:e.participant});break;case gf:Lo(this._receiveSettings,e.receiveSettings)||(this._receiveSettings=e.receiveSettings,this.emitDailyJSEvent({action:e.action,receiveSettings:e.receiveSettings}));break;case _f:this._maybeUpdateInputSettings(e.inputSettings);break;case`send-settings-updated`:Lo(this._sendSettings,e.sendSettings)||(this._sendSettings=e.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:e.action,sendSettings:e.sendSettings}));break;case`local-audio-level`:this._localAudioLevel=e.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case`remote-participants-audio-level`:this._remoteParticipantsAudioLevel=e.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case Qd:var v=e.session_id;this._rmpPlayerState[v]=e.playerState,this.emitDailyJSEvent(e);break;case ef:delete this._rmpPlayerState[e.session_id],this.emitDailyJSEvent(e);break;case $d:var y=e.session_id,b=this._rmpPlayerState[y];b&&this.compareEqualForRMPUpdateEvent(b,e.remoteMediaPlayerState)||(this._rmpPlayerState[y]=e.remoteMediaPlayerState,this.emitDailyJSEvent(e));break;case`custom-button-click`:case`sidebar-view-changed`:case`pip-started`:case`pip-stopped`:this.emitDailyJSEvent(e);break;case Ld:var x=this._meetingSessionState.topology!==(e.meetingSessionState&&e.meetingSessionState.topology);this._meetingSessionState=Zm(e.meetingSessionState,this._callObjectMode),(this._callObjectMode||x)&&this.emitDailyJSEvent(e);break;case tf:this._isScreenSharing=!0,this.emitDailyJSEvent(e);break;case nf:case rf:this._isScreenSharing=!1,this.emitDailyJSEvent(e);break;case Wd:case Gd:case Kd:case qd:case Jd:case Vd:case Hd:case Ud:case Ed:case Dd:case Xd:case Zd:case`test-completed`:case cf:case Yd:case df:case ff:case pf:case mf:case vf:case hf:case`dialin-ready`:case`dialin-connected`:case`dialin-error`:case`dialin-stopped`:case`dialin-warning`:case`dialout-connected`:case`dtmf-event`:case`dialout-answered`:case`dialout-error`:case`dialout-stopped`:case`dialout-warning`:this.emitDailyJSEvent(e);break;case`request-fullscreen`:this.requestFullscreen();break;case`request-exit-fullscreen`:this.exitFullscreen()}}},{key:`maybeEventRecordingStopped`,value:function(e,t){var n=`record`;e&&(t.local||!1!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:`recording-stopped`}))}},{key:`maybeEventRecordingStarted`,value:function(e,t){var n=`record`;e&&(t.local||!0!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:`recording-started`}))}},{key:`_trackStatePlayable`,value:function(e){return!(!e||e.state!==`playable`)}},{key:`_trackChanged`,value:function(e,t){return e?.id!==t?.id}},{key:`maybeEventTrackStopped`,value:function(e,t,n){var r=t?.tracks[e]??null,i=n?.tracks[e]??null,a=r?.track;if(a){var o=this._trackStatePlayable(r),s=this._trackStatePlayable(i),c=this._trackChanged(a,i?.track);o&&(s&&!c||this.emitDailyJSEvent({action:`track-stopped`,track:a,participant:n??t,type:e}))}}},{key:`maybeEventTrackStarted`,value:function(e,t,n){var r=t?.tracks[e]??null,i=n?.tracks[e]??null,a=i?.track;if(a){var o=this._trackStatePlayable(r),s=this._trackStatePlayable(i),c=this._trackChanged(r?.track,a);s&&(o&&!c||this.emitDailyJSEvent({action:`track-started`,track:a,participant:n,type:e}))}}},{key:`maybeParticipantTracksStopped`,value:function(e,t){if(e)for(var n in e.tracks)this.maybeEventTrackStopped(n,e,t)}},{key:`maybeParticipantTracksStarted`,value:function(e,t){if(t)for(var n in t.tracks)this.maybeEventTrackStarted(n,e,t)}},{key:`compareEqualForRMPUpdateEvent`,value:function(e,t){return e.state===t.state&&e.settings?.volume===t.settings?.volume}},{key:`emitDailyJSEvent`,value:function(e){try{e.callClientId=this.callClientId,this.emit(e.action,e)}catch(t){console.log(`could not emit`,e,t)}}},{key:`compareEqualForParticipantUpdateEvent`,value:function(e,t){return!!Lo(e,t)&&(!e.videoTrack||!t.videoTrack||e.videoTrack.id===t.videoTrack.id&&e.videoTrack.muted===t.videoTrack.muted&&e.videoTrack.enabled===t.videoTrack.enabled)&&(!e.audioTrack||!t.audioTrack||e.audioTrack.id===t.audioTrack.id&&e.audioTrack.muted===t.audioTrack.muted&&e.audioTrack.enabled===t.audioTrack.enabled)}},{key:`nativeUtils`,value:function(){return B()?typeof DailyNativeUtils>`u`?(console.warn(`in React Native, DailyNativeUtils is expected to be available`),null):DailyNativeUtils:null}},{key:`updateIsPreparingToJoin`,value:function(e){this._updateCallState(this._callState,e)}},{key:`_updateCallState`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._isPreparingToJoin;if(e!==this._callState||t!==this._isPreparingToJoin){var n=this._callState,r=this._isPreparingToJoin;this._callState=e,this._isPreparingToJoin=t;var i=this._callState===hd;this.updateShowAndroidOngoingMeetingNotification(i);var a=Om(n,r),o=Om(this._callState,this._isPreparingToJoin);a!==o&&(this.updateKeepDeviceAwake(o),this.updateDeviceAudioMode(o),this.updateNoOpRecordingEnsuringBackgroundContinuity(o))}}},{key:`resetMeetingDependentVars`,value:function(){this._participants={},this._participantCounts=pm,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:vd},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Zm(fm,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=bf,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:`updateKeepDeviceAwake`,value:function(e){B()&&this.nativeUtils().setKeepDeviceAwake(e,this.callClientId)}},{key:`updateDeviceAudioMode`,value:function(e){if(B()&&!this.disableReactNativeAutoDeviceManagement(`audio`)){var t=e?this._nativeInCallAudioMode:`idle`;this.nativeUtils().setAudioMode(t)}}},{key:`updateShowAndroidOngoingMeetingNotification`,value:function(e){if(B()&&this.nativeUtils().setShowOngoingMeetingNotification){var t,n,r,i;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var a=this.properties.reactNativeConfig.androidInCallNotification;t=a.title,n=a.subtitle,r=a.iconName,i=a.disableForCustomOverride}i&&(e=!1),this.nativeUtils().setShowOngoingMeetingNotification(e,t,n,r,this.callClientId)}}},{key:`updateNoOpRecordingEnsuringBackgroundContinuity`,value:function(e){B()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:`toggleParticipantAudioBasedOnNativeAudioFocus`,value:function(){var e;if(B()){var t=(e=this._callMachine())==null||(e=e.store)==null?void 0:e.getState();for(var n in t?.streams){var r=t.streams[n];r&&r.pendingTrack&&r.pendingTrack.kind===`audio`&&(r.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:`disableReactNativeAutoDeviceManagement`,value:function(e){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[e]}},{key:`absoluteUrl`,value:function(e){if(e!==void 0){var t=document.createElement(`a`);return t.href=e,t.href}}},{key:`sayHello`,value:function(){var e=`hello, world.`;return console.log(e),e}},{key:`_logUseAfterDestroy`,value:function(){var e=Object.values(lm)[0];if(this.needsLoad())if(e&&!e.needsLoad()){var t={action:Tf,level:`error`,code:this.strictMode?9995:9997};e.sendMessageToCallMachine(t)}else this.strictMode||console.error("You are are attempting to use a call instance that was previously destroyed, which is unsupported. Please remove `strictMode: false` from your constructor properties to enable strict mode to track down and fix this unsupported usage.");else{var n={action:Tf,level:`error`,code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(n,null,this.callClientId,this._iframe)}}},{key:`_logDuplicateInstanceAttempt`,value:function(){for(var e=0,t=Object.values(lm);e<t.length;e++){var n=t[e];n._callMachineInitialized?(n.sendMessageToCallMachine({action:Tf,level:`warn`,code:this.allowMultipleCallInstances?9993:9992}),n._delayDuplicateInstanceLog=!1):n._delayDuplicateInstanceLog=!0}}},{key:`_maybeSendToSentry`,value:function(t){var n,r,i,a;if(!((n=t.error)!=null&&n.type&&(![`connection-error`,`end-of-life`,`no-room`].includes(t.error.type)||t.error.type===`no-room`&&t.error.msg.includes(`deleted`)))){var o=(r=this.properties)!=null&&r.url?new URL(this.properties.url):void 0,s=`production`;o&&o.host.includes(`.staging.daily`)&&(s=`staging`);var c,l,u,d,f,p=new Ou({dsn:`https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844`,transport:Uu,stackParser:Xu,integrations:function(e){let t=[Gl(),Ul(),td(),$u(),sd(),dd(),eu(),ud()];return!1!==e.autoSessionTracking&&t.push(od()),t}({}).filter((function(e){return![`BrowserApiErrors`,`Breadcrumbs`,`GlobalHandlers`].includes(e.name)})),environment:s}),m=new Sc;if(m.setClient(p),p.init(),!((i=this._participants)==null||(i=i.local)==null)&&i.session_id&&m.setExtra(`sessionId`,this._participants.local.session_id),this.properties){var h=V({},this.properties);h.userName=h.userName?`[Filtered]`:void 0,h.userData=h.userData?`[Filtered]`:void 0,h.token=h.token?`[Filtered]`:void 0,m.setExtra(`properties`,h)}if(o){var g=o.searchParams.get(`domain`);if(!g){var _=o.host.match(/(.*?)\./);g=_&&_[1]||``}g&&m.setTag(`domain`,g)}t.error&&(m.setTag(`fatalErrorType`,t.error.type),m.setExtra(`errorDetails`,t.error.details),(c=t.error.details)!=null&&c.uri&&m.setTag(`serverAddress`,t.error.details.uri),(l=t.error.details)!=null&&l.workerGroup&&m.setTag(`workerGroup`,t.error.details.workerGroup),(u=t.error.details)!=null&&u.geoGroup&&m.setTag(`geoGroup`,t.error.details.geoGroup),(d=t.error.details)!=null&&d.on&&m.setTag(`connectionAttempt`,t.error.details.on),(f=t.error.details)!=null&&f.bundleUrl&&(m.setTag(`bundleUrl`,t.error.details.bundleUrl),m.setTag(`bundleError`,t.error.details.sourceError.type))),m.setTags({callMode:this._callObjectMode?B()?`reactNative`:(a=this.properties)!=null&&(a=a.dailyConfig)!=null&&(a=a.callMode)!=null&&a.includes(`prebuilt`)?this.properties.dailyConfig.callMode:`custom`:`prebuilt-frame`,version:e.version()});var v=t.error?.msg||t.errorMsg;m.captureException(Error(v))}}},{key:`_callMachine`,value:function(){var e;return(e=window._daily)==null||(e=e.instances)==null||(e=e[this.callClientId])==null?void 0:e.callMachine}},{key:`_maybeUpdateInputSettings`,value:function(e){if(!Lo(this._inputSettings,e)){var t=this._getInputSettings();this._inputSettings=e;var n=this._getInputSettings();Lo(t,n)||this.emitDailyJSEvent({action:`input-settings-updated`,inputSettings:n})}}}],[{key:`supportedBrowser`,value:function(){if(B())return{supported:!0,mobile:!0,name:`React Native`,version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var e=Yo.getParser(Pf());return{supported:!!Wf(),mobile:e.getPlatformType()===`mobile`,name:e.getBrowserName(),version:e.getBrowserVersion(),supportsFullscreen:!!Lf(),supportsScreenShare:!!If(),supportsSfu:!!Wf(),supportsVideoProcessing:Hf(),supportsAudioProcessing:Uf()}}},{key:`version`,value:function(){return`0.89.1`}},{key:`createCallObject`,value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t.layout=`none`,new e(null,t)}},{key:`wrap`,value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(H(),!t||!t.contentWindow||typeof t.src!=`string`)throw Error(`DailyIframe::Wrap needs an iframe-like first argument`);return n.layout||(n.customLayout?n.layout=`custom-v1`:n.layout=`browser`),new e(t,n)}},{key:`createFrame`,value:function(t,n){var r,i;H(),t&&n?(r=t,i=n):t&&t.append?(r=t,i={}):(r=document.body,i=t||{});var a=i.iframeStyle;a||=r===document.body?{position:`fixed`,border:`1px solid black`,backgroundColor:`white`,width:`375px`,height:`450px`,right:`1em`,bottom:`1em`}:{border:0,width:`100%`,height:`100%`};var o=document.createElement(`iframe`);window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?o.allow=`microphone, camera`:o.allow=`microphone; camera; autoplay; display-capture; screen-wake-lock; compute-pressure;`,o.style.visibility=`hidden`,r.appendChild(o),o.style.visibility=null,Object.keys(a).forEach((function(e){return o.style[e]=a[e]})),i.layout||(i.customLayout?i.layout=`custom-v1`:i.layout=`browser`);try{return new e(o,i)}catch(e){throw r.removeChild(o),e}}},{key:`createTransparentFrame`,value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};H();var n=document.createElement(`iframe`);return n.allow=`microphone; camera; autoplay`,n.style.cssText=`
41
41
  position: fixed;
42
42
  top: 0;
43
43
  left: 0;
@@ -45,11 +45,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
45
45
  height: 100%;
46
46
  border: 0;
47
47
  pointer-events: none;
48
- `,document.body.appendChild(n),t.layout||=`custom-v1`,e.wrap(n,t)}},{key:`getCallInstance`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return e?cm[e]:Object.values(cm)[0]}}]);var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,ee,T,te,ne,re,ie,ae,oe,se,ce,le,ue,de,fe}();function wm(e){if(e.extension){if(typeof e.extension!=`string`)throw Error(`Error starting dial out: extension must be a string`);if(e.extension.length>20)throw Error(`Error starting dial out: extension length must be less than or equal to 20`)}if(e.waitBeforeExtensionDialSec){if(typeof e.waitBeforeExtensionDialSec!=`number`)throw Error(`Error starting dial out: waitBeforeExtensionDialSec must be a number`);if(e.waitBeforeExtensionDialSec>60)throw Error(`Error starting dial out: waitBeforeExtensionDialSec must be less than or equal to 60`);if(!e.extension)throw Error(`Error starting dial out: waitBeforeExtensionDialSec requires a phoneNumber and extension`)}}function Tm(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]=Tf;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 Em(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==`joined-meeting`){var n=`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} only supported after join.`;throw t&&(n+=` ${t}`),console.error(n),Error(n)}}function Dm(e,t){return[`joining-meeting`,`joined-meeting`].includes(e)||t}function Om(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(Dm(e,t)){var i=`${n} not supported after joining a meeting.`;throw r&&(i+=` ${r}`),console.error(i),Error(i)}}function km(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=`${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+=` ${n}`),console.error(r),Error(r)}}function Am(e){if(e){var t=`A pre-call quality test is in progress. Please try ${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),Error(t)}}function jm(e){if(!e){var t=`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} is only supported on custom callObject instances`;throw console.error(t),Error(t)}}function Mm(e){if(e){var t=`${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),Error(t)}}function H(){if(B())throw Error(`This daily-js method is not currently supported in React Native`)}function Nm(){if(!B())throw Error(`This daily-js method is only supported in React Native`)}function Pm(e){if(e===void 0)return!0;var t;if(typeof e==`string`)t=e;else try{t=JSON.stringify(e),Io(JSON.parse(t),e)||console.warn(`The userData provided will be modified when serialized.`)}catch(e){throw Error(`userData must be serializable to JSON: ${e}`)}if(t.length>4096)throw Error(`userData is too large (${t.length} characters). Maximum size suppported is 4096.`);return!0}function Fm(e,t){for(var n=t.allowAllParticipantsKey,r=function(e){var t=[`local`];return n||t.push(`*`),e&&!t.includes(e)},i=function(e){return!!(e.layer===void 0||Number.isInteger(e.layer)&&e.layer>=0||e.layer===`inherit`)},a=function(e){return!!e&&!(e.video&&!i(e.video))&&!(e.screenVideo&&!i(e.screenVideo))},o=0,s=Object.entries(e);o<s.length;o++){var c=Oo(s[o],2),l=c[0],u=c[1];if(!r(l)||!a(u))return!1}return!0}function Im(e){if(I(e)!==`object`)return!1;for(var t=0,n=Object.entries(e);t<n.length;t++){var r=Oo(n[t],2),i=r[0],a=r[1];switch(i){case`video`:if(I(a)!==`object`)return!1;for(var o=0,s=Object.entries(a);o<s.length;o++){var c=Oo(s[o],2),l=c[0],u=c[1];switch(l){case`processor`:if(!zm(u))return!1;break;case`settings`:if(!Bm(u))return!1;break;default:return!1}}break;case`audio`:if(I(a)!==`object`)return!1;for(var d=0,f=Object.entries(a);d<f.length;d++){var p=Oo(f[d],2),m=p[0],h=p[1];switch(m){case`processor`:if(!Rm(h))return!1;break;case`settings`:if(!Bm(h))return!1;break;default:return!1}}break;default:return!1}}return!0}function Lm(e,t,n){var r,i=[];e.video&&e.video.processor&&(Vf((r=t?.useLegacyVideoProcessor)!=null&&r)||(e.video.settings?delete e.video.processor:delete e.video,i.push(`video`))),e.audio&&e.audio.processor&&(Hf()||(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): ${i.join(`, `)}`),e.audio&&e.audio.settings&&(e.audio.settings.customTrack?(n.audioTrack=e.audio.settings.customTrack,e.audio.settings={customTrack:Tf}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:Tf}):delete n.videoTrack)}function Rm(e){if(B())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`];return!!e&&I(e)===`object`&&(Object.keys(e).filter((function(e){return!t.includes(e)})).forEach((function(t){console.warn(`invalid key inputSettings -> audio -> processor : ${t}`),delete e[t]})),!!function(e){return typeof e==`string`?Object.values(Df).includes(e)?!0:(console.error(`inputSettings audio processor type invalid`),!1):!1}(e.type))}function zm(e){if(B())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`,`config`];return!e||I(e)!==`object`||!function(e){return typeof e==`string`?Object.values(Ef).includes(e)?!0:(console.error(`inputSettings video processor type invalid`),!1):!1}(e.type)||e.config&&(I(e.config)!==`object`||!function(e,t){var n=Object.keys(t);if(n.length===0)return!0;var r=`invalid object in inputSettings -> video -> processor -> config`;switch(e){case Ef.BGBLUR:return n.length>1||n[0]!==`strength`?(console.error(r),!1):!(typeof t.strength!=`number`||t.strength<=0||t.strength>1||isNaN(t.strength))||(console.error(`${r}; expected: {0 < strength <= 1}, got: ${t.strength}`),!1);case Ef.BGIMAGE:return!(t.source!==void 0&&!function(e){if(e.source==="default")return e.type=`default`,!0;if(e.source instanceof ArrayBuffer)return!0;if($o(e.source))return e.type=`url`,!!function(e){var t=new URL(e),n=t.pathname;if(t.protocol===`data:`)try{var r=n.substring(n.indexOf(`:`)+1,n.indexOf(`;`)).split(`/`)[1];return kf.includes(r)}catch(e){return console.error(`failed to deduce blob content type`,e),!1}var i=n.split(`.`).at(-1).toLowerCase().trim();return kf.includes(i)}(e.source)||(console.error(`invalid image type; supported types: [${kf.join(`, `)}]`),!1);return t=e.source,n=Number(t),isNaN(n)||!Number.isInteger(n)||n<=0||n>10?(console.error(`invalid image selection; must be an int, > 0, <= 10`),!1):(e.type=`daily-preselect`,!0);var t,n}(t));default:return!0}}(e.type,e.config))?!1:(Object.keys(e).filter((function(e){return!t.includes(e)})).forEach((function(t){console.warn(`invalid key inputSettings -> video -> processor : ${t}`),delete e[t]})),!0)}function Bm(e){return I(e)===`object`&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function Vm(){return`inputSettings must be of the form: { video?: { processor?: { type: [ ${Object.values(Ef).join(` | `)} ], config?: {} } }, audio?: { processor: {type: [ ${Object.values(Df).join(` | `)} ] } } }`}function Hm(e){return`receiveSettings must be of the form { [<remote participant id> | ${yd}${e.allowAllParticipantsKey?` | "*"`:``}]: { [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}`}function Um(){return`customIntegrations should be an object of type ${JSON.stringify(vm)}.`}function Wm(e){if(e&&I(e)!==`object`||Array.isArray(e))return console.error(`customTrayButtons should be an Object of the type ${JSON.stringify(_m)}.`),!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=Oo(n[t],1)[0],i=0,a=Object.entries(e[r]);i<a.length;i++){var o=Oo(a[i],2),s=o[0],c=o[1],l=_m.id[s];if(!l)return console.error(`customTrayButton does not support key ${s}`),!1;switch(s){case`iconPath`:case`iconPathDarkMode`:if(!$o(c))return console.error(`customTrayButton ${s} should be a url.`),!1;break;case`visualState`:if(![`default`,`sidebar-open`,`active`].includes(c))return console.error(`customTrayButton ${s} should be ${l}. Got: ${c}`),!1;break;default:if(I(c)!==l)return console.error(`customTrayButton ${s} should be a ${l}.`),!1}}return!0}function Gm(e){if(!e||e&&I(e)!==`object`||Array.isArray(e))return console.error(Um()),!1;for(var t=function(e){return`${e} should be ${vm.id[e]}`},n=function(e,t){return console.error(`customIntegration ${e}: ${t}`)},r=0,i=Object.entries(e);r<i.length;r++){var a=Oo(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=Oo(s[o],2),l=c[0],u=c[1];switch(l){case`allow`:case`csp`:case`name`:case`referrerPolicy`:case`sandbox`:if(typeof u!=`string`)return n(a,t(l)),!1;break;case`iconURL`:if(!$o(u))return n(a,`${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(!$o(u))return n(a,`src "${u}" 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 u!=`string`)return n(a,t(l)),!1;break;case`location`:if(![`main`,`sidebar`].includes(u))return n(a,t(l)),!1;break;case`controlledBy`:if(u!==`*`&&u!==`owners`&&(!Array.isArray(u)||u.some((function(e){return typeof e!=`string`}))))return n(a,t(l)),!1;break;case`shared`:if((!Array.isArray(u)||u.some((function(e){return typeof e!=`string`})))&&u!==`owners`&&typeof u!=`boolean`)return n(a,t(l)),!1;break;default:if(!vm.id[l])return console.error(`customIntegration does not support key ${l}`),!1}}}return!0}function Km(e,t){if(t===void 0)return!1;switch(I(t)){case`string`:return I(e)===t;case`object`:if(I(e)!==`object`)return!1;for(var n in e)if(!Km(e[n],t[n]))return!1;return!0;default:return!1}}function qm(e,t){var n=e.sessionId,r=e.toEndPoint,i=e.callerId,a=e.useSipRefer;if(!n||!r)throw Error(`${t}() requires a sessionId and toEndPoint`);if(typeof n!=`string`||typeof r!=`string`)throw Error(`Invalid paramater: sessionId and toEndPoint must be of type string`);if(a&&!r.startsWith(`sip:`))throw Error(`"toEndPoint" must be a "sip" address`);if(!r.startsWith(`sip:`)&&!r.startsWith(`+`))throw Error(`toEndPoint: ${r} must starts with either "sip:" or "+"`);if(i&&typeof i!=`string`)throw Error(`callerId must be of type string`);if(i&&!r.startsWith(`+`))throw Error(`callerId is only valid when transferring to a PSTN number`)}function Jm(e){if(I(e)!==`object`)throw Error(`RemoteMediaPlayerSettings: must be "object" type`);if(e.state&&!Object.values(Of).includes(e.state))throw Error(`Invalid value for RemoteMediaPlayerSettings.state, valid values are: `+JSON.stringify(Of));if(e.volume){if(typeof e.volume!=`number`)throw Error(`RemoteMediaPlayerSettings.volume: must be "number" type`);if(e.volume<0||e.volume>2)throw Error(`RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0`)}}function Ym(e,t,n){return!(typeof e!=`number`||e<t||e>n)}function Xm(e,t){return e&&!t&&delete e.data,e}function Zm(e){"@babel/helpers - typeof";return Zm=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Zm(e)}var U=function(){return U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},U.apply(this,arguments)};function Qm(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 $m(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function eh(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(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function th(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 TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function nh(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(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function rh(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var ih=Fe(null),ah=function(){var e=ft(ih);return pt(e),e},oh=Fe({on:function(){},off:function(){}}),sh=-1,ch=function(){return sh--},lh=1,uh=function(){return lh++},W=function(e,t,n){n===void 0&&(n=!1);var r=ft(oh),i=r.off,a=r.on,o=nh(E(!1),2),s=o[0],c=o[1],l=O(0),u=k(function(){return n?ch():uh()},[n]);D(function(){if(!(!e||s)){if(l.current>1e5){console.error(`useDailyEvent called with potentially non-memoized event callback or due to too many re-renders.
48
+ `,document.body.appendChild(n),t.layout||=`custom-v1`,e.wrap(n,t)}},{key:`getCallInstance`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return e?lm[e]:Object.values(lm)[0]}}]);var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,ee,te,ne,re,ie,ae,oe,se,ce,le,ue,de,fe,pe}();function Tm(e){if(e.extension){if(typeof e.extension!=`string`)throw Error(`Error starting dial out: extension must be a string`);if(e.extension.length>20)throw Error(`Error starting dial out: extension length must be less than or equal to 20`)}if(e.waitBeforeExtensionDialSec){if(typeof e.waitBeforeExtensionDialSec!=`number`)throw Error(`Error starting dial out: waitBeforeExtensionDialSec must be a number`);if(e.waitBeforeExtensionDialSec>60)throw Error(`Error starting dial out: waitBeforeExtensionDialSec must be less than or equal to 60`);if(!e.extension)throw Error(`Error starting dial out: waitBeforeExtensionDialSec requires a phoneNumber and extension`)}}function Em(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]=Ef;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 Dm(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==`joined-meeting`){var n=`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} only supported after join.`;throw t&&(n+=` ${t}`),console.error(n),Error(n)}}function Om(e,t){return[`joining-meeting`,`joined-meeting`].includes(e)||t}function km(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(Om(e,t)){var i=`${n} not supported after joining a meeting.`;throw r&&(i+=` ${r}`),console.error(i),Error(i)}}function Am(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=`${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+=` ${n}`),console.error(r),Error(r)}}function jm(e){if(e){var t=`A pre-call quality test is in progress. Please try ${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),Error(t)}}function Mm(e){if(!e){var t=`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} is only supported on custom callObject instances`;throw console.error(t),Error(t)}}function Nm(e){if(e){var t=`${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),Error(t)}}function H(){if(B())throw Error(`This daily-js method is not currently supported in React Native`)}function Pm(){if(!B())throw Error(`This daily-js method is only supported in React Native`)}function Fm(e){if(e===void 0)return!0;var t;if(typeof e==`string`)t=e;else try{t=JSON.stringify(e),Lo(JSON.parse(t),e)||console.warn(`The userData provided will be modified when serialized.`)}catch(e){throw Error(`userData must be serializable to JSON: ${e}`)}if(t.length>4096)throw Error(`userData is too large (${t.length} characters). Maximum size suppported is 4096.`);return!0}function Im(e,t){for(var n=t.allowAllParticipantsKey,r=function(e){var t=[`local`];return n||t.push(`*`),e&&!t.includes(e)},i=function(e){return!!(e.layer===void 0||Number.isInteger(e.layer)&&e.layer>=0||e.layer===`inherit`)},a=function(e){return!!e&&!(e.video&&!i(e.video))&&!(e.screenVideo&&!i(e.screenVideo))},o=0,s=Object.entries(e);o<s.length;o++){var c=ko(s[o],2),l=c[0],u=c[1];if(!r(l)||!a(u))return!1}return!0}function Lm(e){if(I(e)!==`object`)return!1;for(var t=0,n=Object.entries(e);t<n.length;t++){var r=ko(n[t],2),i=r[0],a=r[1];switch(i){case`video`:if(I(a)!==`object`)return!1;for(var o=0,s=Object.entries(a);o<s.length;o++){var c=ko(s[o],2),l=c[0],u=c[1];switch(l){case`processor`:if(!Bm(u))return!1;break;case`settings`:if(!Vm(u))return!1;break;default:return!1}}break;case`audio`:if(I(a)!==`object`)return!1;for(var d=0,f=Object.entries(a);d<f.length;d++){var p=ko(f[d],2),m=p[0],h=p[1];switch(m){case`processor`:if(!zm(h))return!1;break;case`settings`:if(!Vm(h))return!1;break;default:return!1}}break;default:return!1}}return!0}function Rm(e,t,n){var r,i=[];e.video&&e.video.processor&&(Hf((r=t?.useLegacyVideoProcessor)!=null&&r)||(e.video.settings?delete e.video.processor:delete e.video,i.push(`video`))),e.audio&&e.audio.processor&&(Uf()||(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): ${i.join(`, `)}`),e.audio&&e.audio.settings&&(e.audio.settings.customTrack?(n.audioTrack=e.audio.settings.customTrack,e.audio.settings={customTrack:Ef}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:Ef}):delete n.videoTrack)}function zm(e){if(B())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`];return!!e&&I(e)===`object`&&(Object.keys(e).filter((function(e){return!t.includes(e)})).forEach((function(t){console.warn(`invalid key inputSettings -> audio -> processor : ${t}`),delete e[t]})),!!function(e){return typeof e==`string`?Object.values(Of).includes(e)?!0:(console.error(`inputSettings audio processor type invalid`),!1):!1}(e.type))}function Bm(e){if(B())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`,`config`];return!e||I(e)!==`object`||!function(e){return typeof e==`string`?Object.values(Df).includes(e)?!0:(console.error(`inputSettings video processor type invalid`),!1):!1}(e.type)||e.config&&(I(e.config)!==`object`||!function(e,t){var n=Object.keys(t);if(n.length===0)return!0;var r=`invalid object in inputSettings -> video -> processor -> config`;switch(e){case Df.BGBLUR:return n.length>1||n[0]!==`strength`?(console.error(r),!1):!(typeof t.strength!=`number`||t.strength<=0||t.strength>1||isNaN(t.strength))||(console.error(`${r}; expected: {0 < strength <= 1}, got: ${t.strength}`),!1);case Df.BGIMAGE:return!(t.source!==void 0&&!function(e){if(e.source==="default")return e.type=`default`,!0;if(e.source instanceof ArrayBuffer)return!0;if(es(e.source))return e.type=`url`,!!function(e){var t=new URL(e),n=t.pathname;if(t.protocol===`data:`)try{var r=n.substring(n.indexOf(`:`)+1,n.indexOf(`;`)).split(`/`)[1];return Af.includes(r)}catch(e){return console.error(`failed to deduce blob content type`,e),!1}var i=n.split(`.`).at(-1).toLowerCase().trim();return Af.includes(i)}(e.source)||(console.error(`invalid image type; supported types: [${Af.join(`, `)}]`),!1);return t=e.source,n=Number(t),isNaN(n)||!Number.isInteger(n)||n<=0||n>10?(console.error(`invalid image selection; must be an int, > 0, <= 10`),!1):(e.type=`daily-preselect`,!0);var t,n}(t));default:return!0}}(e.type,e.config))?!1:(Object.keys(e).filter((function(e){return!t.includes(e)})).forEach((function(t){console.warn(`invalid key inputSettings -> video -> processor : ${t}`),delete e[t]})),!0)}function Vm(e){return I(e)===`object`&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function Hm(){return`inputSettings must be of the form: { video?: { processor?: { type: [ ${Object.values(Df).join(` | `)} ], config?: {} } }, audio?: { processor: {type: [ ${Object.values(Of).join(` | `)} ] } } }`}function Um(e){return`receiveSettings must be of the form { [<remote participant id> | ${bd}${e.allowAllParticipantsKey?` | "*"`:``}]: { [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}`}function Wm(){return`customIntegrations should be an object of type ${JSON.stringify(ym)}.`}function Gm(e){if(e&&I(e)!==`object`||Array.isArray(e))return console.error(`customTrayButtons should be an Object of the type ${JSON.stringify(vm)}.`),!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=ko(n[t],1)[0],i=0,a=Object.entries(e[r]);i<a.length;i++){var o=ko(a[i],2),s=o[0],c=o[1],l=vm.id[s];if(!l)return console.error(`customTrayButton does not support key ${s}`),!1;switch(s){case`iconPath`:case`iconPathDarkMode`:if(!es(c))return console.error(`customTrayButton ${s} should be a url.`),!1;break;case`visualState`:if(![`default`,`sidebar-open`,`active`].includes(c))return console.error(`customTrayButton ${s} should be ${l}. Got: ${c}`),!1;break;default:if(I(c)!==l)return console.error(`customTrayButton ${s} should be a ${l}.`),!1}}return!0}function Km(e){if(!e||e&&I(e)!==`object`||Array.isArray(e))return console.error(Wm()),!1;for(var t=function(e){return`${e} should be ${ym.id[e]}`},n=function(e,t){return console.error(`customIntegration ${e}: ${t}`)},r=0,i=Object.entries(e);r<i.length;r++){var a=ko(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=ko(s[o],2),l=c[0],u=c[1];switch(l){case`allow`:case`csp`:case`name`:case`referrerPolicy`:case`sandbox`:if(typeof u!=`string`)return n(a,t(l)),!1;break;case`iconURL`:if(!es(u))return n(a,`${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(!es(u))return n(a,`src "${u}" 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 u!=`string`)return n(a,t(l)),!1;break;case`location`:if(![`main`,`sidebar`].includes(u))return n(a,t(l)),!1;break;case`controlledBy`:if(u!==`*`&&u!==`owners`&&(!Array.isArray(u)||u.some((function(e){return typeof e!=`string`}))))return n(a,t(l)),!1;break;case`shared`:if((!Array.isArray(u)||u.some((function(e){return typeof e!=`string`})))&&u!==`owners`&&typeof u!=`boolean`)return n(a,t(l)),!1;break;default:if(!ym.id[l])return console.error(`customIntegration does not support key ${l}`),!1}}}return!0}function qm(e,t){if(t===void 0)return!1;switch(I(t)){case`string`:return I(e)===t;case`object`:if(I(e)!==`object`)return!1;for(var n in e)if(!qm(e[n],t[n]))return!1;return!0;default:return!1}}function Jm(e,t){var n=e.sessionId,r=e.toEndPoint,i=e.callerId,a=e.useSipRefer;if(!n||!r)throw Error(`${t}() requires a sessionId and toEndPoint`);if(typeof n!=`string`||typeof r!=`string`)throw Error(`Invalid paramater: sessionId and toEndPoint must be of type string`);if(a&&!r.startsWith(`sip:`))throw Error(`"toEndPoint" must be a "sip" address`);if(!r.startsWith(`sip:`)&&!r.startsWith(`+`))throw Error(`toEndPoint: ${r} must starts with either "sip:" or "+"`);if(i&&typeof i!=`string`)throw Error(`callerId must be of type string`);if(i&&!r.startsWith(`+`))throw Error(`callerId is only valid when transferring to a PSTN number`)}function Ym(e){if(I(e)!==`object`)throw Error(`RemoteMediaPlayerSettings: must be "object" type`);if(e.state&&!Object.values(kf).includes(e.state))throw Error(`Invalid value for RemoteMediaPlayerSettings.state, valid values are: `+JSON.stringify(kf));if(e.volume){if(typeof e.volume!=`number`)throw Error(`RemoteMediaPlayerSettings.volume: must be "number" type`);if(e.volume<0||e.volume>2)throw Error(`RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0`)}}function Xm(e,t,n){return!(typeof e!=`number`||e<t||e>n)}function Zm(e,t){return e&&!t&&delete e.data,e}function Qm(e){"@babel/helpers - typeof";return Qm=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Qm(e)}var U=function(){return U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},U.apply(this,arguments)};function $m(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 eh(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function th(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(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function nh(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 TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function rh(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(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function ih(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var ah=Ie(null),oh=function(){var e=pt(ah);return mt(e),e},sh=Ie({on:function(){},off:function(){}}),ch=-1,lh=function(){return ch--},uh=1,dh=function(){return uh++},W=function(e,t,n){n===void 0&&(n=!1);var r=pt(sh),i=r.off,a=r.on,o=rh(T(!1),2),s=o[0],c=o[1],l=D(0),u=O(function(){return n?lh():dh()},[n]);E(function(){if(!(!e||s)){if(l.current>1e5){console.error(`useDailyEvent called with potentially non-memoized event callback or due to too many re-renders.
49
49
  Memoize using useCallback to avoid re-render loop or reduce the amount of state transitions the callback depends on.
50
- Passed callback for '${e}' event is NOT registered.`,t),c(!0);return}l.current++;var n=setTimeout(function(){l.current=0},50);return a(e,t,u),function(){clearTimeout(n),i(e,u)}}},[t,e,u,s,i,a]),pt({event:e,eventId:u,isBlocked:s,callback:t})};function dh(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(!dh(e[i],t[i]))return!1;return!0}if(MediaStream&&e instanceof MediaStream&&t instanceof MediaStream)return e.id===t.id&&e.active===t.active&&e.getTracks().length===t.getTracks().length&&e.getTracks().every(function(e,n){return dh(e,t.getTracks()[n])});if(MediaStreamTrack&&e instanceof MediaStreamTrack&&t instanceof MediaStreamTrack)return e.id===t.id&&e.kind===t.kind&&e.readyState===t.readyState;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;var a=Array.from(e).sort(),o=Array.from(t).sort();return a.every(function(e,t){return dh(e,o[t])})}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;try{for(var s=th(e.entries()),c=s.next();!c.done;c=s.next()){var l=nh(c.value,2),u=l[0],d=l[1];if(!t.has(u)||!dh(d,t.get(u)))return!1}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return!0}if(Zm(e)!==`object`||e===null||Zm(t)!==`object`||t===null)return!1;var f=Object.keys(e),p=Object.keys(t);if(f.length!==p.length)return!1;for(var i=0;i<f.length;i++){var u=f[i];if(!Object.prototype.hasOwnProperty.call(t,u)||!dh(e[u],t[u]))return!1}return!0}function fh(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&&Zm(r)===`object`,o=i!==null&&Zm(i)===`object`;if(a||o){if(!dh(r,i))return!1}else if(r!==i)return!1}return!0}function G(e){return`daily-react-`+e}function ph(e){var t=new Map,n=new Map;return function(r){if(!t.has(r)){var i=N(function(t){var i=e.get(r)(t),a=n.get(r);return a!=null&&e.equals(i,a)?a:(n.set(r,i),i)});t.set(r,i)}return t.get(r)}}var mh=`::`,hh=`;`,gh=function(e,t){return e+mh+t},_h=function(e,t){return e+mh+t.join(hh)},vh=function(e,t){return bh(gh(e,t))},yh=sa(function(e){var t=N([]);return t.debugLabel=G(`participant-property-paths-${e}`),t}),bh=sa(function(e){var t=N(null);return t.debugLabel=G(`participant-property-${e}`),t}),xh=ph({equals:fh,get:function(e){return function(t){var n=nh(e.split(mh),2),r=n[0];return n[1].split(hh).map(function(e){return t(vh(r,e))})}}}),Sh=function(e,t){var n,r=mo(Array.isArray(t)?xh(_h(e,t)):bh(gh(e,t)));return pt(Array.isArray(t)?t.reduce(function(e,t,n){return e[t]=r[n],e},{}):(n={},n[t]=r,n)),r},Ch=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function wh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Th,Eh;function Dh(){if(Eh)return Th;Eh=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=Zm(Ch)==`object`&&Ch&&Ch.Object===Object&&Ch,l=(typeof self>`u`?`undefined`:Zm(self))==`object`&&self&&self.Object===Object&&self,u=c||l||Function(`return this`)(),d=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function h(t,n,r){var i,a,o,s,c,l,u=0,d=!1,h=!1,g=!0;if(typeof t!=`function`)throw TypeError(e);n=b(n)||0,_(r)&&(d=!!r.leading,h=`maxWait`in r,o=h?f(b(r.maxWait)||0,n):o,g=`trailing`in r?!!r.trailing:g);function v(e){var n=i,r=a;return i=a=void 0,u=e,s=t.apply(r,n),s}function y(e){return u=e,c=setTimeout(C,n),d?v(e):s}function x(e){var t=e-l,r=e-u,i=n-t;return h?p(i,o-r):i}function S(e){var t=e-l,r=e-u;return l===void 0||t>=n||t<0||h&&r>=o}function C(){var e=m();if(S(e))return w(e);c=setTimeout(C,x(e))}function w(e){return c=void 0,g&&i?v(e):(i=a=void 0,s)}function ee(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function T(){return c===void 0?s:w(m())}function te(){var e=m(),t=S(e);if(i=arguments,a=this,l=e,t){if(c===void 0)return y(l);if(h)return c=setTimeout(C,n),v(l)}return c===void 0&&(c=setTimeout(C,n)),s}return te.cancel=ee,te.flush=T,te}function g(t,n,r){var i=!0,a=!0;if(typeof t!=`function`)throw TypeError(e);return _(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),h(t,n,{leading:i,maxWait:n,trailing:a})}function _(e){var t=Zm(e);return!!e&&(t==`object`||t==`function`)}function v(e){return!!e&&Zm(e)==`object`}function y(e){return Zm(e)==`symbol`||v(e)&&d.call(e)==n}function b(e){if(typeof e==`number`)return e;if(y(e))return t;if(_(e)){var n=typeof e.valueOf==`function`?e.valueOf():e;e=_(n)?n+``:n}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(r,``);var c=a.test(e);return c||o.test(e)?s(e.slice(2),c?2:8):i.test(e)?t:+e}return Th=g,Th}var Oh=wh(Dh()),kh=function(e,t,n,r){n===void 0&&(n=500),r===void 0&&(r=!1);var i=ft(oh),a=i.off,o=i.on,s=k(function(){var t;return Array.isArray(e)?e.reduce(function(e,t){return e[t]=r?ch():uh(),e},{}):(t={},t[e]=r?ch():uh(),t)},[e,r]),c=O([]);W(`call-instance-destroyed`,A(function(){c.current.length=0},[]));var l=k(function(){return Oh(function(){c.current.length!==0&&(t(c.current),c.current.length=0)},n,{trailing:!0})},[t,n]);D(function(){if(e){var t=function(e){c.current.push(e),l()};return Array.isArray(e)?e.forEach(function(e){return o(e,t,s[e])}):o(e,t,s[e]),function(){Array.isArray(e)?e.forEach(function(e){return a(e,s[e])}):a(e,s[e])}}},[l,e,s,a,o]),pt({event:e,eventId:s})},Ah=function(e,t,n){if(t===void 0&&(t=``),n===void 0&&(n=new Set),Zm(e)!==`object`||e===null||n.has(e))return[t];n.add(e);var r=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=t?`${t}.${i}`:i;r.push.apply(r,rh([a],nh(Ah(e[i],a,n)),!1))}return n.delete(e),r},jh=function(e){return Ah(e)},Mh=function(e,t){return String(t).split(`.`).filter(function(e){return e.length}).reduce(function(e,t){return e&&e[t]},e)},Nh=function(e,t){return t.map(function(t){return Mh(e,t)})},Ph=N(null);Ph.debugLabel=G(`active-id`);var Fh=N(``);Fh.debugLabel=G(`local-id`);var Ih=N(null);Ih.debugLabel=G(`local-join-date`);var Lh=N([]);Lh.debugLabel=G(`participant-ids`);var Rh=sa(function(e){var t=N(null);return t.debugLabel=G(`participant-${e}`),t}),zh=N([]);zh.debugLabel=G(`waiting-participants`);var Bh=sa(function(e){var t=N({awaitingAccess:{level:`full`},id:e,name:``});return t.debugLabel=G(`waiting-participant-${e}`),t}),Vh=function(e){var t=e.children,n=ah(),r=nh(E(!1),2),i=r[0],a=r[1],o=F(A(function(e,t,n){t(Fh,n.local.session_id);var r=Object.values(n);t(Lh,r.map(function(e){return e.session_id})),r.forEach(function(e){t(Rh(e.session_id),e);var n=jh(e);t(yh(e.session_id),n),n.forEach(function(n){var r=nh(Nh(e,[n]),1)[0];t(vh(e.session_id,n),r)})}),a(!0)},[]));D(function(){if(!(!n||i)){var e=setInterval(function(){var t=n.participants();`local`in t&&(o(t),clearInterval(e))},100);return function(){clearInterval(e)}}},[n,i,o]);var s=A(function(){if(n){var e=n?.participants();e.local&&o(e)}},[n,o]);W(`started-camera`,s,!0),W(`access-state-updated`,s,!0),W(`joining-meeting`,F(A(function(e,t){t(Ih,new Date),s()},[s])),!0),W(`joined-meeting`,A(function(e){o(e.participants)},[o]),!0);var c=F(A(function(e,t){t(Fh,``),t(Ph,null),e(Lh).forEach(function(e){return Rh.remove(e)}),t(Lh,[])},[]));return W(`call-instance-destroyed`,c,!0),W(`left-meeting`,c,!0),kh([`active-speaker-change`,`participant-joined`,`participant-updated`,`participant-left`],F(A(function(e,t,n){n.length&&n.forEach(function(n){switch(n.action){case`active-speaker-change`:t(Ph,n.activeSpeaker.peerId),t(Rh(n.activeSpeaker.peerId),function(e){return e?U(U({},e),{last_active:new Date}):null});break;case`participant-joined`:t(Lh,function(e){return e.includes(n.participant.session_id)?e:rh(rh([],nh(e),!1),[n.participant.session_id],!1)}),t(Rh(n.participant.session_id),n.participant);var r=jh(n.participant);t(yh(n.participant.session_id),r),r.forEach(function(e){var r=nh(Nh(n.participant,[e]),1)[0];t(vh(n.participant.session_id,e),r)});break;case`participant-updated`:t(Rh(n.participant.session_id),n.participant),n.participant.local&&t(Fh,n.participant.session_id);var r=jh(n.participant),i=e(yh(n.participant.session_id));(r.length!==i.length||r.some(function(e){return!i.includes(e)}))&&t(yh(n.participant.session_id),r);var a=new Set(i),o=Nh(n.participant,r);r.forEach(function(e,r){var i=o[r];a.delete(e),t(vh(n.participant.session_id,e),function(e){return dh(e,i)?e:i})}),a.forEach(function(e){t(vh(n.participant.session_id,e),null)});break;case`participant-left`:t(Lh,function(e){return e.includes(n.participant.session_id)?e.filter(function(e){return e!==n.participant.session_id}):e}),Rh.remove(n.participant.session_id),e(yh(n.participant.session_id)).forEach(function(e){bh.remove(gh(n.participant.session_id,e))}),yh.remove(n.participant.session_id);break}})},[])),100,!0),kh([`waiting-participant-added`,`waiting-participant-updated`,`waiting-participant-removed`],F(A(function(e,t,n){n.forEach(function(e){switch(e.action){case`waiting-participant-added`:t(zh,function(t){return t.includes(e.participant.id)?t:rh(rh([],nh(t),!1),[e.participant.id],!1)}),t(Bh(e.participant.id),e.participant);break;case`waiting-participant-updated`:t(Bh(e.participant.id),e.participant);break;case`waiting-participant-removed`:t(zh,function(t){return t.filter(function(t){return t!==e.participant.id})}),Bh.remove(e.participant.id);break}})},[])),100,!0),P.createElement(P.Fragment,null,t)},Hh=function(){var e=mo(Fh);return pt(e),e},Uh=function(){return!0},Wh=function(e){var t=e===void 0?{}:e,n=t.filter,r=n===void 0?Uh:n,i=t.ignoreLocal,a=i===void 0?!1:i,o=Hh(),s=mo(Ph),c=a&&s===o,l=!r?.(s),u=nh(E(!c&&!l?s:null),2),d=u[0],f=u[1];return D(function(){c||l||f(s)},[l,c,s]),pt(d),d},Gh=function(e){return[`blocked`,`off`].includes(e)},Kh=`;`,qh=function(e,t){return`${e}${Kh}${t}`},Jh=ph({equals:dh,get:function(e){return function(t){var n=nh(e.split(Kh),2),r=n[0],i=n[1];return t(Lh).filter(function(e){switch(r){case`local`:case`owner`:case`record`:return t(vh(e,r));case`remote`:return!t(vh(e,`local`));case`screen`:var n=t(vh(e,`tracks.screenAudio.state`)),i=t(vh(e,`tracks.screenVideo.state`));return!Gh(n)||!Gh(i);default:return!0}}).sort(function(e,n){switch(i){case`joined_at`:case`session_id`:case`user_id`:case`user_name`:var r=t(vh(e,i)),a=t(vh(n,i));if(r!==void 0||a!==void 0){if(r===void 0)return-1;if(a===void 0||r>a)return 1;if(r<a)return-1}return 0;default:return 0}})}}}),Yh=function(e){var t=e===void 0?{}:e,n=t.filter,r=t.onActiveSpeakerChange,i=t.onParticipantJoined,a=t.onParticipantLeft,o=t.onParticipantUpdated,s=t.sort,c=mo(Jh(qh(typeof n==`string`?n:null,typeof s==`string`?s:null))),l=typeof n==`function`||typeof s==`function`,u=A(function(e){return typeof n!=`function`&&typeof s!=`function`?[]:c.map(function(t){return e(Rh(t))}).filter(function(e){return!!e}).filter(typeof n==`function`?n:function(){return!0}).sort(typeof s==`function`?s:function(){return 0}).map(function(e){return e.session_id}).filter(Boolean)},[n,c,s]),d=nh(E([]),2),f=d[0],p=d[1],m=F(A(function(e){if(l){var t=u(e);dh(t,f)||p(t)}},[f,u,l]));D(function(){m()},[m]),kh([`participant-joined`,`participant-updated`,`active-speaker-change`,`participant-left`],A(function(e){e.length&&(e.forEach(function(e){switch(e.action){case`participant-joined`:i?.(e);break;case`participant-updated`:o?.(e);break;case`active-speaker-change`:r?.(e);break;case`participant-left`:a?.(e);break}}),m())},[m,r,i,a,o]));var h=typeof n==`function`||typeof s==`function`?f:c;return pt(h),h},Xh=ph({equals:fh,get:function(){return function(e){return e(Jh(qh(`screen`,null))).map(function(t){return{local:e(vh(t,`local`)),screenAudio:e(vh(t,`tracks.screenAudio`)),screenVideo:e(vh(t,`tracks.screenVideo`)),screenId:`${t}-screen`,session_id:t}})}}}),Zh=function(e){var t=e===void 0?{}:e,n=t.onError,r=t.onLocalScreenShareStarted,i=t.onLocalScreenShareStopped,a=ah(),o=A(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a?.startScreenShare.apply(a,rh([],nh(e),!1))},[a]),s=A(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a?.stopScreenShare.apply(a,rh([],nh(e),!1))},[a]);W(`local-screen-share-started`,A(function(){return r?.()},[r])),W(`local-screen-share-stopped`,A(function(){return i?.()},[i])),W(`nonfatal-error`,A(function(e){e.type===`screen-share-error`&&n?.(e)},[n]));var c=mo(Xh(void 0)),l={isSharingScreen:c.some(function(e){return e.local}),screens:c,startScreenShare:o,stopScreenShare:s};return pt(l),l},Qh=function(e,t){t===void 0&&(t=`video`);var n=Sh(e,`tracks.${t}`),r=n?U(U({},n),{isOff:Gh(n.state)}):{isOff:!0,persistentTrack:void 0,state:`off`,subscribed:!1};return pt(r),r};function $h(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A(function(t){for(var n=0;n<e.length;n++){var r=e[n];typeof r==`function`?r(t):r&&Zm(r)===`object`&&(r.current=t)}},e)}var eg=ya(Sa(function(e,t){var n=e.onPlayFailed,r=e.sessionId,i=e.type,a=i===void 0?`audio`:i,o=Qm(e,[`onPlayFailed`,`sessionId`,`type`]),s=O(null),c=Qh(r,a),l=$h(s,t),u=c?.subscribed;return D(function(){var e=s.current;if(!(!e||!c?.persistentTrack)){if(!MediaStream){console.warn(`MediaStream API not available. Can't setup ${a} for ${r}`),n?.({sessionId:r,target:e,type:a,message:`MediaStream API not available`,name:`MediaStream API not available`});return}var t=function(){e.play().catch(function(t){n?.({sessionId:r,target:e,type:a,message:t.message,name:t.name})})};return e.addEventListener(`loadedmetadata`,t),e.srcObject=new MediaStream([c.persistentTrack]),e.load(),function(){e.removeEventListener(`loadedmetadata`,t)}}},[c?.persistentTrack,n,r,a]),W(`participant-left`,A(function(e){var t=s.current;e.participant.session_id!==r||!t||(t.srcObject=null)},[r])),W(`left-meeting`,A(function(){var e=s.current;e&&(e.pause(),e.srcObject=null)},[])),P.createElement(`audio`,U({autoPlay:!0,ref:l},o,{"data-session-id":r,"data-audio-type":a,"data-subscribed":u}))}));eg.displayName=`DailyAudioTrack`;var tg=ya(Sa(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=ah(),u=nh(E(Array(a).fill(``)),2),d=u[0],f=u[1],p=Zh().screens,m=Hh(),h=Wh({ignoreLocal:!0}),g=O(null);dt(t,function(){return{getActiveSpeakerAudio:function(){return g.current?.querySelector(`audio[data-session-id="${h}"][data-audio-type="audio"]`)??null},getAllAudio:function(){return Array.from(g.current?.querySelectorAll(`audio`)??[])},getAudioBySessionId:function(e){return g.current?.querySelector(`audio[data-session-id="${e}"][data-audio-type="audio"]`)??null},getRmpAudio:function(){return Array.from(g.current?.querySelectorAll(`audio[data-audio-type="rmpAudio"]`)??[])},getScreenAudio:function(){return Array.from(g.current?.querySelectorAll(`audio[data-audio-type="screenAudio"]`)??[])},getRmpAudioBySessionId:function(e){return g.current?.querySelector(`audio[data-session-id="${e}"][data-audio-type="rmpAudio"]`)??null},getScreenAudioBySessionId:function(e){return g.current?.querySelector(`audio[data-session-id="${e}"][data-audio-type="screenAudio"]`)??null}}},[h]);var _=F(A(function(e,t,n){return $m(void 0,void 0,void 0,function(){var t,i;return eh(this,function(a){if(t=Object.values(l?.participants()??{}).filter(function(e){return!e.local&&!!e.tracks.audio.subscribed}),i=function(e){return t.some(function(t){return t.session_id===e})},!i(n))if(l&&!l.isDestroyed()&&r&&!l.subscribeToTracksAutomatically())l.updateParticipant(n,{setSubscribedTracks:{audio:!0}});else return[2];return f(function(r){if(r.includes(n))return r;var a=function(e){return!e||!i(e)};if(r.some(a)){var o=r.findIndex(a);return r[o]=n,rh([],nh(r),!1)}var s=r.findIndex(function(e){return t.some(function(t){return t.session_id===e&&Gh(t.tracks.audio.state)})});if(s>=0)return r[s]=n,rh([],nh(r),!1);var c=t.filter(function(e){return r.includes(e.session_id)&&e.session_id!==h}).sort(function(t,n){var r=e(vh(t.session_id,`last_active`))??new Date(`1970-01-01`),i=e(vh(n.session_id,`last_active`))??new Date(`1970-01-01`);return r>i?1:r<i?-1:0});if(!c.length){var l=r.findIndex(function(e){return e!==h});return r[l]=n,rh([],nh(r),!1)}var u=r.indexOf(c[0]?.session_id);return r[u]=n,rh([],nh(r),!1)}),[2]})})},[h,r,l])),v=A(function(e){f(function(t){if(!t.includes(e))return t;var n=rh([],nh(t),!1),r=n.indexOf(e);return n[r]=``,n})},[]);kh([`active-speaker-change`,`track-started`,`participant-left`],A(function(e){e.forEach(function(e){switch(e.action){case`active-speaker-change`:if(e.activeSpeaker.peerId===m)return;_(e.activeSpeaker.peerId);break;case`track-started`:e.track.kind===`audio`&&e.participant&&!e.participant.local&&_(e.participant.session_id);break;case`participant-left`:v(e.participant.session_id);break}})},[_,m,v]),200);var y=Yh({filter:A(function(e){return!!e?.tracks?.rmpAudio},[])});return P.createElement(`div`,{ref:g},d.map(function(e,t){return P.createElement(eg,{key:`speaker-slot-${t}`,onPlayFailed:o,sessionId:e,type:`audio`})}),p.filter(function(e){return c?!0:!e.local}).map(function(e){return P.createElement(eg,{key:e.screenId,onPlayFailed:o,sessionId:e.session_id,type:`screenAudio`})}),y.map(function(e){return P.createElement(eg,{key:`${e}-rmp`,onPlayFailed:o,sessionId:e,type:`rmpAudio`})}))}));tg.displayName=`DailyAudio`;var ng=Sa(function(e,t){var n=e.automirror,r=e.fit,i=r===void 0?`contain`:r,a=e.mirror,o=e.onResize,s=e.playableStyle,c=s===void 0?{}:s,l=e.sessionId,u=e.style,d=u===void 0?{}:u,f=e.type,p=f===void 0?`video`:f,m=Qm(e,[`automirror`,`fit`,`mirror`,`onResize`,`playableStyle`,`sessionId`,`style`,`type`]),h=Hh()===l,g=p===`screenVideo`,_=h&&!g,v=O(null),y=$h(v,t),b=Qh(l,p),x=b.persistentTrack,S=_||g||!b.isOff,C=Sh(l,`tracks.${p}`)?.subscribed,w=k(function(){if(typeof a==`boolean`)return a;if(!n)return!1;if(!x)return _;var e=x.getSettings();return`facingMode`in e?_&&e.facingMode===`user`:_},[n,_,a,x]);return D(function(){var e=v.current;if(e){var t=function(){var t=e.play();t!==void 0&&t.then(function(){e.controls=!1}).catch(function(t){e.controls=!0,console.warn(`Failed to play video`,t)})},n=function(){e.paused&&t()},r=function(){e.style.transform=`scale(1)`},i=function(){e.style.transform=``,setTimeout(function(){e.paused&&t()},100)},a=function(){document.visibilityState!==`hidden`&&e.paused&&t()};return e.addEventListener(`canplay`,n),e.addEventListener(`enterpictureinpicture`,r),e.addEventListener(`leavepictureinpicture`,i),document.addEventListener(`visibilitychange`,a),function(){e.removeEventListener(`canplay`,n),e.removeEventListener(`enterpictureinpicture`,r),e.removeEventListener(`leavepictureinpicture`,i),document.removeEventListener(`visibilitychange`,a)}}},[]),D(function(){var e=v.current;if(!(!e||!x)){if(!MediaStream){console.warn(`MediaStream API not available. Can't setup ${p} for ${l}`);return}return e.srcObject=new MediaStream([x]),e.load(),function(){e.srcObject=null,e.load()}}},[l,p,x,x?.id]),D(function(){var e=v.current;if(!o||!e)return;var t;function n(){t&&cancelAnimationFrame(t),t=requestAnimationFrame(function(){var e=v.current;if(!(!e||document.hidden)){var t=e.videoWidth,n=e.videoHeight;t&&n&&o?.({aspectRatio:t/n,height:n,width:t})}})}return n(),e.addEventListener(`loadedmetadata`,n),e.addEventListener(`resize`,n),function(){t&&cancelAnimationFrame(t),e.removeEventListener(`loadedmetadata`,n),e.removeEventListener(`resize`,n)}},[o]),P.createElement(`video`,U({autoPlay:!0,muted:!0,playsInline:!0,ref:y,"data-local":h,"data-mirrored":w||void 0,"data-playable":S||void 0,"data-session-id":l,"data-subscribed":C,"data-video-type":p,style:U(U({objectFit:i,transform:w?`scale(-1, 1)`:``},d),S?c:{})},m))});ng.displayName=`DailyVideo`;var rg=Fe({refreshDevices:function(){return Promise.resolve()}}),ig=N(`idle`);ig.debugLabel=G(`camera-state`);var ag=N(`idle`);ag.debugLabel=G(`microphone-state`);var og=N([]);og.debugLabel=G(`camera-devices`);var sg=N([]);sg.debugLabel=G(`microphone-devices`);var cg=N([]);cg.debugLabel=G(`speaker-devices`);var lg=N(null);lg.debugLabel=G(`last-camera-error`);var ug=function(e){var t=e.children,n=ah(),r=F(A(function(e,t){return $m(void 0,void 0,void 0,function(){var e,r,i,a,o,s,c,l,u,d;return eh(this,function(f){switch(f.label){case 0:if((navigator==null?void 0:navigator.mediaDevices)?.getUserMedia===void 0||(navigator==null?void 0:navigator.mediaDevices)?.enumerateDevices===void 0)return t(ig,`not-supported`),t(ag,`not-supported`),[2];if(!n)return[2];f.label=1;case 1:return f.trys.push([1,4,,5]),[4,n.enumerateDevices()];case 2:return e=f.sent().devices,r=e.filter(function(e){return e.kind===`videoinput`&&e.deviceId!==``}),i=e.filter(function(e){return e.kind===`audioinput`&&e.deviceId!==``}),a=e.filter(function(e){return e.kind===`audiooutput`&&e.deviceId!==``}),[4,n.getInputDevices()];case 3:return o=f.sent(),s=o.camera,c=o.mic,l=o.speaker,u=function(e,t,n){var r=n.find(function(e){return e.device.deviceId===t.deviceId}),i=`deviceId`in e&&t.deviceId===e.deviceId,a=!(`deviceId`in e)&&r?.selected;return{device:t,selected:i||!!a,state:r?.state??`granted`}},d=function(e,t){return e.device.deviceId==="default"?-1:t.device.deviceId==="default"?1:e.device.label<t.device.label?-1:+(e.device.label>t.device.label)},t(og,function(e){return r.filter(Boolean).map(function(t){return u(s,t,e)}).sort(d)}),t(sg,function(e){return i.filter(Boolean).map(function(t){return u(c,t,e)}).sort(d)}),t(cg,function(e){return a.filter(Boolean).map(function(t){return u(l,t,e)}).sort(d)}),[3,5];case 4:return f.sent(),t(ig,`not-supported`),t(ag,`not-supported`),[3,5];case 5:return[2]}})})},[n])),i=F(A(function(e,t){return $m(void 0,void 0,void 0,function(){var i,a,o,s,c,l,u,d,f,p,m,h;return eh(this,function(g){switch(g.label){case 0:if(!n||(i=e(ig),a=e(ag),o=n.participants(),!o.local))return[2];if(s=o.local.tracks,c=`prompt`,l=`prompt`,!navigator.permissions)return[3,5];g.label=1;case 1:return g.trys.push([1,4,,5]),[4,navigator.permissions.query({name:`camera`})];case 2:return u=g.sent(),c=u.state,[4,navigator.permissions.query({name:`microphone`})];case 3:return d=g.sent(),l=d.state,[3,5];case 4:return g.sent(),[3,5];case 5:return f=c===`prompt`&&[`idle`,`pending`].includes(i)&&s.video.state===`interrupted`&&!s.video.persistentTrack,p=[`idle`,`pending`].includes(i)&&!s.video.persistentTrack&&!!s.video.off?.byUser,m=l===`prompt`&&[`idle`,`pending`].includes(a)&&s.audio.state===`interrupted`&&!s.audio.persistentTrack,h=[`idle`,`pending`].includes(a)&&!s.audio.persistentTrack&&!!s.audio.off?.byUser,s.audio?.blocked?.byDeviceInUse?(t(ag,`in-use`),t(sg,function(e){return e.map(function(e){return e.selected?U(U({},e),{state:`in-use`}):e})})):s.audio?.blocked?.byDeviceMissing?t(ag,`not-found`):s.audio?.blocked?.byPermissions||l===`denied`?t(ag,`blocked`):m?t(ag,`pending`):h?t(ag,`idle`):(t(ag,`granted`),t(sg,function(e){return e.map(function(e){return e.selected?U(U({},e),{state:`granted`}):e})})),s.video?.blocked?.byDeviceInUse?(t(ig,`in-use`),t(og,function(e){return e.map(function(e){return e.selected?U(U({},e),{state:`in-use`}):e})})):s.video?.blocked?.byDeviceMissing?t(ig,`not-found`):s.video?.blocked?.byPermissions||c===`denied`?t(ig,`blocked`):f?t(ig,`pending`):p?t(ig,`idle`):(t(ig,`granted`),t(og,function(e){return e.map(function(e){return e.selected?U(U({},e),{state:`granted`}):e})})),r(),[2]}})})},[n,r]));return W(`participant-updated`,A(function(e){e.participant.local&&i()},[i])),W(`available-devices-updated`,r),W(`selected-devices-updated`,r),W(`camera-error`,F(A(function(e,t,n){switch(t(lg,n.error),n.error?.type){case`cam-in-use`:t(ig,`in-use`);break;case`mic-in-use`:t(ag,`in-use`);break;case`cam-mic-in-use`:t(ig,`in-use`),t(ag,`in-use`);break;case`not-found`:n.error?.missingMedia.includes(`video`)&&t(ig,`not-found`),n.error?.missingMedia.includes(`audio`)&&t(ag,`not-found`);break;case`permissions`:n.error?.blockedMedia.includes(`video`)&&t(ig,`blocked`),n.error?.blockedMedia.includes(`audio`)&&t(ag,`blocked`);break;case`constraints`:n.error?.reason===`invalid`?(t(ig,`constraints-invalid`),t(ag,`constraints-invalid`)):n.error?.reason===`none-specified`&&(t(ig,`constraints-none-specified`),t(ag,`constraints-none-specified`));break;case`undefined-mediadevices`:t(ig,`undefined-mediadevices`),t(ag,`undefined-mediadevices`);break;default:t(ig,`unknown`),t(ag,`unknown`);break}},[]))),W(`started-camera`,F(A(function(e,t){t(ig,`granted`),t(ag,`granted`),i()},[i]))),P.createElement(rg.Provider,{value:{refreshDevices:r}},t)};function dg(e){return e.instanceId??`__default__`}var fg=N({});fg.debugLabel=G(`live-streaming-instances`);var pg=N(function(e){var t=e(fg),n=Object.values(t),r=n.filter(function(e){return e.isLiveStreaming}),i=r[0]??n[n.length-1];return{errorMsg:n.find(function(e){return e.errorMsg})?.errorMsg,isLiveStreaming:r.length>0,layout:i?.layout}});pg.debugLabel=G(`live-streaming`);var mg=function(e){var t=e.children;return W(`live-streaming-started`,F(A(function(e,t,n){var r=dg(n);t(fg,function(e){var t;return U(U({},e),(t={},t[r]={instanceId:r,isLiveStreaming:!0,layout:n?.layout},t))})},[]))),W(`live-streaming-stopped`,F(A(function(e,t,n){var r=dg(n);t(fg,function(e){var t;return e[r]?U(U({},e),(t={},t[r]=U(U({},e[r]),{isLiveStreaming:!1,layout:void 0}),t)):e})},[]))),W(`live-streaming-error`,F(A(function(e,t,n){var r=dg(n);t(fg,function(e){var t;return U(U({},e),(t={},t[r]=U(U({},e[r]??{instanceId:r,isLiveStreaming:!1}),{errorMsg:n.errorMsg}),t))})},[]))),W(`left-meeting`,F(A(function(e,t){t(fg,{})},[]))),P.createElement(P.Fragment,null,t)},hg=N(`new`);hg.debugLabel=G(`meeting-state`);var gg=N(null);gg.debugLabel=G(`meeting-error`);var _g=N(null);_g.debugLabel=G(`non-fatal-error`);var vg=N({data:void 0,topology:`none`});vg.debugLabel=G(`meeting-session-data`);var yg=function(e){var t=e.children,n=ah(),r=F(A(function(e,t){if(n){var r=n.meetingState();return t(hg,r),r}},[n]));return W(`loading`,r),W(`loaded`,r),W(`joining-meeting`,r),W(`joined-meeting`,r),W(`left-meeting`,r),W(`error`,F(A(function(e,t,n){t(gg,n),r()},[r]))),W(`nonfatal-error`,F(A(function(e,t,n){t(_g,n)},[]))),W(`joined-meeting`,F(A(function(e,t){n&&t(vg,n.meetingSessionState())},[n]))),W(`meeting-session-state-updated`,F(A(function(e,t,n){t(vg,n.meetingSessionState)},[]))),W(`left-meeting`,F(A(function(e,t){t(vg,{data:void 0,topology:`none`})},[]))),W(`call-instance-destroyed`,F(A(function(e,t){t(hg,`new`),t(gg,null),t(_g,null),t(vg,{data:void 0,topology:`none`})},[]))),P.createElement(P.Fragment,null,t)},bg=N(`none`);bg.debugLabel=G(`topology`);var xg=N(`unknown`),Sg=N([]),Cg=N(`interrupted`),wg=N(100);wg.debugLabel=G(`network-quality`);var Tg=N(`good`);Tg.debugLabel=G(`network-threshold`);var Eg=function(e){var t=e.children,n=ah(),r=mo(bg),i=F(A(function(e,t){return $m(void 0,void 0,void 0,function(){var e;return eh(this,function(r){switch(r.label){case 0:return n?[4,n.getNetworkTopology()]:[2];case 1:return e=r.sent(),!e||e?.topology===`none`||t(bg,e.topology),[2]}})})},[n]));return W(`joined-meeting`,i),W(`network-connection`,F(A(function(e,t,n){switch(t(Cg,n.event),n.event){case`connected`:n.type===`peer-to-peer`&&t(bg,`peer`),n.type===`sfu`&&t(bg,`sfu`);break}},[]))),W(`network-quality-change`,F(A(function(e,t,n){t(xg,function(e){return e===n.networkState?e:n.networkState}),t(Sg,function(e){var t=n.networkStateReasons??[];return fh(e,t)?e:t}),t(wg,function(e){return e===n.quality?e:n.quality}),t(Tg,function(e){return e===n.threshold?e:n.threshold})},[]))),W(`left-meeting`,F(A(function(e,t){t(bg,`none`),t(xg,`unknown`),t(Sg,[]),t(Cg,`interrupted`),t(wg,100),t(Tg,`good`)},[]))),D(function(){!n||r!==`none`||i()},[n,i,r]),P.createElement(P.Fragment,null,t)};function Dg(e){return e.instanceId?e.instanceId:e.type===`local`||e.local?`__local__`:`__default__`}var Og=N({});Og.debugLabel=G(`recording-instances`);var kg=N(function(e){var t=e(Og),n=Object.values(t),r=n.filter(function(e){return e.isRecording}),i=r[0]??n[n.length-1];return{error:n.some(function(e){return e.error}),isLocalParticipantRecorded:n.some(function(e){return e.isLocalParticipantRecorded}),isRecording:r.length>0,layout:i?.layout,local:i?.local,recordingId:i?.recordingId,recordingStartedDate:i?.recordingStartedDate,startedBy:i?.startedBy,type:i?.type}});kg.debugLabel=G(`recording-state`);var Ag=function(e){var t=e.children,n=Hh(),r=Yh({filter:`record`}),i=F(A(function(e,t,n,r){var i=e(Og).__local__,a={instanceId:`__local__`,isLocalParticipantRecorded:n,isRecording:n,local:n?r:i?.local,type:n?`local`:i?.type};i&&dh(i,a)||!n&&!i||(n?t(Og,function(e){return U(U({},e),{__local__:a})}):i&&t(Og,function(e){return U(U({},e),{__local__:U(U({},i),{isLocalParticipantRecorded:!1,isRecording:!1})})}))},[]));return D(function(){i(r.length>0,r.includes(n||`local`))},[n,i,r]),W(`recording-started`,F(A(function(e,t,r){var i=Dg(r),a=!0;switch(r.type){case`cloud-audio-only`:case`cloud-beta`:case`cloud`:n&&r.layout?.preset===`single-participant`&&r.layout.session_id!==n&&(a=!1);break}t(Og,function(e){var t;return U(U({},e),(t={},t[i]={error:!1,instanceId:i,isLocalParticipantRecorded:a,isRecording:!0,layout:r?.layout,local:r?.local,recordingId:r?.recordingId,recordingStartedDate:new Date,startedBy:r?.startedBy,type:r?.type},t))})},[n]))),W(`recording-stopped`,F(A(function(e,t,n){var r=Dg(n);t(Og,function(e){var t;return e[r]?U(U({},e),(t={},t[r]=U(U({},e[r]),{isLocalParticipantRecorded:!1,isRecording:!1}),t)):e})},[]))),W(`recording-error`,F(A(function(e,t,n){var r=Dg(n);t(Og,function(e){var t,i=e[r];return U(U({},e),(t={},t[r]=U(U({},i??{instanceId:r}),{error:!0,errorMsg:n.errorMsg,isLocalParticipantRecorded:!1,isRecording:!1}),t))})},[]))),W(`left-meeting`,F(A(function(e,t){t(Og,{})},[]))),P.createElement(P.Fragment,null,t)},jg=function(){var e=mo(hg);return pt(e),e},Mg=N(null);Mg.debugLabel=G(`room-state`);var Ng=function(e){var t=e.children,n=ah(),r=jg();return W(`access-state-updated`,F(A(function(e,t){return $m(void 0,void 0,void 0,function(){var e;return eh(this,function(i){switch(i.label){case 0:return!n||r===`left-meeting`?[2]:[4,n.room()];case 1:return e=i.sent(),e&&`id`in e&&t(Mg,e),[2,e]}})})},[n,r]))),W(`left-meeting`,F(A(function(e,t){return function(){t(Mg,null)}},[]))),P.createElement(P.Fragment,null,t)},Pg=N({isTranscribing:!1,model:`general`,language:`en`,transcriptions:[]});Pg.debugLabel=G(`transcription-state`);var Fg=function(e){var t=e.children;return W(`transcription-started`,F(A(function(e,t,n){t(Pg,{error:!1,transcriptionStartDate:new Date,isTranscribing:!0,transcriptions:[],endpointing:n.endpointing,extra:n.extra,includeRawResponse:n.includeRawResponse,instanceId:n.instanceId,language:n.language,model:n.model,profanity_filter:n.profanity_filter,punctuate:n.punctuate,redact:n.redact,startedBy:n.startedBy,tier:n.tier})},[]))),W(`transcription-stopped`,F(A(function(e,t,n){t(Pg,function(e){return U(U({},e),{updatedBy:n.updatedBy,isTranscribing:!1})})},[]))),W(`transcription-error`,F(A(function(e,t){t(Pg,function(e){return U(U({},e),{error:!0,isTranscribing:!1})})},[]))),W(`left-meeting`,F(A(function(e,t){t(Pg,function(e){return U(U({},e),{isTranscribing:!1})})},[]))),W(`app-message`,F(A(function(e,t,n){n?.fromId===`transcription`&&t(Pg,function(e){return U(U({},e),{isTranscribing:!0,transcriptions:rh(rh([],nh(e.transcriptions),!1),[n.data],!1)})})},[]))),P.createElement(P.Fragment,null,t)},Ig=`0.25.2`,Lg={strictMode:!0},Rg=function(){return!0},zg={options:Lg,shouldCreateInstance:Rg},Bg=function(e,t){var n=t===void 0?zg:t,r=n.parentElRef,i=n.options,a=i===void 0?Lg:i,o=n.shouldCreateInstance,s=o===void 0?Rg:o,c=nh(E(null),2),l=c[0],u=c[1],d=O();return D(function(){if(e===`callFrame`&&r?.current===null||!s())return;function t(e){return $m(this,void 0,void 0,function(){return eh(this,function(t){switch(t.label){case 0:return[4,e.destroy()];case 1:return t.sent(),[2]}})})}var n=function(){setTimeout(function(){return u(null)},0)},i=Cm.getCallInstance();if(!l&&i&&!i.isDestroyed()){i.once(`call-instance-destroyed`,n),u(i);return}if(l){dh(d.current,a)||t(l);return}if(!i||i.isDestroyed())try{var o=U(U({},a),{aboutClient:U(U({},a.aboutClient??{}),{"daily-react":Ig})});switch(e){case`callFrame`:i=r?.current?Cm.createFrame(r.current,o):Cm.createFrame(o);break;case`callObject`:i=Cm.createCallObject(o);break}d.current=a,u(i),i.once(`call-instance-destroyed`,n)}catch(e){if(console.error(`Error creating call instance:`,e),a.strictMode)throw e}},[l,a,r,s,e]),l},Vg=function(e){return Bg(`callObject`,e)},Hg=function(e){var t=e.children,n=e.jotaiStore,r=Qm(e,[`children`,`jotaiStore`]),i=O({}),a=A(function(e){var t,n;if(`action`in e){var r=e.action,a=Array.from(i.current?.[r]??[]),o=a.filter(function(e){return nh(e,1)[0]<0}),s=a.filter(function(e){return nh(e,1)[0]>0}),c=rh(rh([],nh(o),!1),nh(s),!1);try{for(var l=th(c),u=l.next();!u.done;u=l.next()){var d=nh(u.value,2)[1];d(e)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}}},[]),o=A(function(e){e&&Object.keys(i.current).forEach(function(t){e.off(t,a),e.isDestroyed()||e.on(t,a)})},[a]),s=`callObject`in r?r.callObject:null,c=Vg({options:k(function(){return`callObject`in r?{}:r},[r]),shouldCreateInstance:A(function(){return!(`callObject`in r)},[r])}),l=s??c;D(function(){l&&o(l)},[l,o]);var u=A(function(e,t,n){var r;i.current[e]||(i.current[e]=new Map,l&&(l.off(e,a),l.isDestroyed()||l.on(e,a))),i.current[e]?.has(n)||(r=i.current[e])==null||r.set(n,t)},[l,a]),d=A(function(e,t){var n;(n=i.current[e])==null||n.delete(t),i.current[e]?.size===0&&(l?.off(e,a),delete i.current[e])},[l,a]);return P.createElement(so,{store:n},P.createElement(ih.Provider,{value:l},P.createElement(oh.Provider,{value:{on:u,off:d}},P.createElement(Ng,null,P.createElement(yg,null,P.createElement(Eg,null,P.createElement(Vh,null,P.createElement(Ag,null,P.createElement(mg,null,P.createElement(Fg,null,P.createElement(ug,null,t)))))))))))},Ug=function(e){var t=(e===void 0?{}:e).onAppMessage,n=ah(),r=A(function(e,t){t===void 0&&(t=`*`),n&&n.sendAppMessage(e,t)},[n]);return W(`app-message`,A(function(e){t?.(e,r)},[t,r])),r},Wg=function(e,t,n,r){var i=ah(),a=e===Hh();W(`local-audio-level`,A(function(e){a&&t(e.audioLevel)},[t,a])),W(`remote-participants-audio-level`,A(function(n){a||t(n.participantsAudioLevel[e])},[t,e,a])),D(function(){if(!(!i||i.isDestroyed()||!a)&&!i.isLocalAudioLevelObserverRunning())try{i.startLocalAudioLevelObserver(r)}catch{n?.(`Local audio level observer not supported in this browser`)}},[i,n,r,a]),D(function(){!i||i.isDestroyed()||a||i.isRemoteParticipantsAudioLevelObserverRunning()||i.startRemoteParticipantsAudioLevelObserver(r)},[i,r,a])},Gg=function(e){return Qh(e,`audio`)},Kg,qg;function Jg(){return qg?Kg:(qg=1,Kg=function e(t,n){if(t===n)return!0;if(t&&n&&Zm(t)==`object`&&Zm(n)==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n},Kg)}Jg();var Yg=N({state:`low`,reason:`none`});Yg.debugLabel=G(`cpu-load`);var Xg=function(){var e=ah(),t=mo(ig),n=mo(ag),r=mo(og),i=mo(sg),a=mo(cg),o=mo(lg),s=ft(rg).refreshDevices,c=A(function(t){return $m(void 0,void 0,void 0,function(){return eh(this,function(n){switch(n.label){case 0:return[4,e?.setInputDevicesAsync({audioDeviceId:null,videoDeviceId:t})];case 1:return n.sent(),[2]}})})},[e]),l=A(function(t){return $m(void 0,void 0,void 0,function(){return eh(this,function(n){switch(n.label){case 0:return[4,e?.setInputDevicesAsync({audioDeviceId:t,videoDeviceId:null})];case 1:return n.sent(),[2]}})})},[e]),u=A(function(t){return $m(void 0,void 0,void 0,function(){return eh(this,function(n){switch(n.label){case 0:return[4,e?.setOutputDeviceAsync({outputDeviceId:t})];case 1:return n.sent(),[2]}})})},[e]),d=[`blocked`,`in-use`,`not-found`,`constraints-invalid`,`constraints-none-specified`,`undefined-mediadevices`,`unknown`],f={cameraError:o,cameras:r,camState:t,currentCam:r.find(function(e){return e.selected}),currentMic:i.find(function(e){return e.selected}),currentSpeaker:a.find(function(e){return e.selected}),hasCamError:d.includes(t),hasMicError:d.includes(n),microphones:i,micState:n,refreshDevices:s,setCamera:c,setMicrophone:l,setSpeaker:u,speakers:a};return pt(f),f},Zg=N(null);Zg.debugLabel=G(`input-settings`);var Qg=N({hidden:0,present:0});Qg.debugLabel=G(`participant-counts`);var $g=sa(function(e){var t=N({},function(t,n,r){n($g(e),r)});return t.debugLabel=G(`participant-receive-settings-${e}`),t}),e_=function(e){return Qh(e,`screenVideo`)},t_=N(null);t_.debugLabel=G(`send-settings`);var n_=function(e){return Qh(e,`video`)};function r_({children:e}){return j(Hg,{children:e})}var i_=Fe(null),a_=`tavus:memory-user-id:`,o_=new Map;function s_(e){return`${a_}${e}`}function c_(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function l_(e){if(!e)return``;let t=s_(e);try{let e=window.localStorage.getItem(t);if(e)return e;let n=c_();return window.localStorage.setItem(t,n),n}catch{}let n=o_.get(t);if(n)return n;let r=c_();return o_.set(t,r),r}var u_=`tavus:terms-accepted:`;function d_(e){let t=5381;for(let n=0;n<e.length;n++)t=(t*33^e.charCodeAt(n))>>>0;return t.toString(36)}function f_(e,t){return`${u_}${e}:${d_(t)}`}function p_(e,t){if(!e||!t)return!1;try{return globalThis.localStorage?.getItem(f_(e,t))===`1`}catch{return!1}}function m_(e,t){if(!(!e||!t))try{globalThis.localStorage?.setItem(f_(e,t),`1`)}catch{}}var h_=null;function g_(e,t){!e||!t||(h_={deploymentId:e,content:t})}function __(){h_&&=(m_(h_.deploymentId,h_.content),null)}function v_(e){return e===`replica`||e===`user`?e:null}function y_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function b_(e){if(!y_(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!y_(e.properties))return null;if(e.event_type===`conversation.utterance`){let t=e.properties;return typeof t.speech==`string`?{kind:`chat-message`,sender:t.role===`replica`?`agent`:`user`,text:t.speech}:null}if(e.event_type===`conversation.utterance.streaming`){let t=e.properties;if(typeof t.speech!=`string`)return null;let n=t.final===!0||t.is_interrupted===!0;return{kind:`caption-update`,text:t.speech,final:n,role:v_(t.role)}}return null}function x_(e,t){return{message_type:`conversation`,event_type:`conversation.respond`,conversation_id:e,properties:{text:t}}}function S_(e,t){return typeof e[t]==`number`?{[t]:e[t]}:{}}function C_(e){let t=e.role===`user`||e.role===`replica`?e.role:null;return!t||typeof e.speech!=`string`?null:{kind:`utterance`,event_type:`conversation.utterance`,properties:{role:t,speech:e.speech,...S_(e,`seq`),...S_(e,`turn_idx`)}}}function w_(e){let t=e.role===`user`||e.role===`replica`?e.role:null;return!t||typeof e.speech!=`string`?null:{kind:`utterance.streaming`,event_type:`conversation.utterance.streaming`,properties:{role:t,speech:e.speech,...typeof e.final==`boolean`?{final:e.final}:{},...typeof e.is_interrupted==`boolean`?{is_interrupted:e.is_interrupted}:{},...S_(e,`seq`)}}}function T_(e){return typeof e.name!=`string`||typeof e.arguments!=`string`?null:{kind:`tool_call`,event_type:`conversation.tool_call`,properties:{name:e.name,arguments:e.arguments,...S_(e,`seq`),...S_(e,`turn_idx`)}}}function E_(e){if(typeof e.name!=`string`||typeof e.arguments!=`string`)return null;let t=e.modality===`vision`||e.modality===`audio`?e.modality:null;return t?{kind:`perception_tool_call`,event_type:`conversation.perception_tool_call`,properties:{name:e.name,arguments:e.arguments,modality:t}}:null}function D_(e){return{kind:`perception_analysis`,event_type:`conversation.perception_analysis`,properties:e}}function O_(e,t){return{kind:`speaking`,event_type:t,properties:{...S_(e,`seq`),...S_(e,`turn_idx`)}}}var k_={"conversation.utterance":C_,"conversation.utterance.streaming":w_,"conversation.tool_call":T_,"conversation.perception_tool_call":E_,"conversation.perception_analysis":D_,"conversation.replica_started_speaking":O_,"conversation.replica_stopped_speaking":O_,"conversation.user_started_speaking":O_,"conversation.user_stopped_speaking":O_};function A_(e){if(!y_(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!y_(e.properties))return null;let t=k_[e.event_type];return t?t(e.properties,e.event_type):{kind:`unknown`,event_type:e.event_type,properties:e.properties}}function j_(e,t){return{message_type:`conversation`,event_type:t.event_type,conversation_id:e,properties:t.properties??{}}}function M_(e,t){let n=b_(e);return n?n.kind===`chat-message`?(t.appendChatMessage(n.sender,n.text),!0):(t.setCaption(n.text,n.final,n.role),!0):!1}function N_(e=5e3){let t=[],n=n=>{for(;t.length>0&&n-t[0].ts>e;)t.shift()};return{markSent(e){t.push({text:e,ts:Date.now()})},consumeMatch(e){n(Date.now());let r=t.findIndex(t=>t.text===e);return r===-1?!1:(t.splice(r,1),!0)}}}var P_=_n(`Conversation`),F_=1500,I_=Fe(null);function L_({children:e}){return j(r_,{children:j(W_,{children:e})})}function R_(e,t,n){let{role:r,speech:i}=e.properties;if(!(r===`user`&&n.consumeMatch(i)))for(let n of t)n.onUtterance?.({...e.properties})}function z_(e,t){for(let n of t)n.onToolCall?.({...e.properties})}function B_(e,t){for(let n of t)n.onPerception?.(e)}function V_(e,t){let n=e.event_type,r=n.startsWith(`conversation.replica`)?`replica`:`user`,i=n.endsWith(`started_speaking`)?`started`:`stopped`;for(let n of t)n.onSpeakingState?.({who:r,state:i,...e.properties})}function H_(e,t){for(let n of t)n.onMessage?.(e)}function U_(e,t,n){switch(e.kind){case`utterance`:case`utterance.streaming`:R_(e,t,n);return;case`tool_call`:z_(e,t);return;case`perception_tool_call`:case`perception_analysis`:B_(e,t);return;case`speaking`:V_(e,t);return;case`unknown`:H_(e,t);return}}function W_({children:e}){let{deploymentId:t,client:n,config:r}=ft(yi),i=ah(),a=jg(),o=ft(i_),s=k(()=>Ht(`idle`),[]),c=k(()=>Ht(null),[]),l=k(()=>Ht([]),[]),u=k(()=>Ht(``),[]),d=k(()=>Ht(null),[]),f=k(()=>Ht(null),[]),p=k(()=>Ht(null),[]),m=k(()=>Ht(null),[]),h=O(null),g=k(()=>N_(),[]),_=k(()=>new Set,[]),v=k(()=>Ht(`idle`),[]),y=o?.flowSignal??v,b=A(e=>{p.value=e},[p]),x=A(e=>{m.value=e},[m]),[,S]=E(a);D(()=>{S(a),a===`joined-meeting`?(s.value=`connected`,P_.info(`Connected to meeting`)):a===`left-meeting`?(s.value=`ended`,__(),P_.info(`Left meeting`)):a===`error`&&(f.value=`Meeting error`,s.value=`error`)},[a,s,f]),gn(()=>{let e=s.value;if(e===`connected`)for(let e of _)e.onConnect?.();else if(e===`ended`||e===`disconnecting`)for(let e of _)e.onDisconnect?.();else if(e===`error`){let e=f.peek()??`Unknown error`;for(let t of _)t.onError?.({code:`CONVERSATION_ERROR`,message:e})}}),gn(()=>{let e=y.value;for(let t of _)t.onModeChange?.(e)}),Ug({onAppMessage:A(e=>{M_(e?.data,{appendChatMessage(e,t){e===`user`&&g.consumeMatch(t)||(l.value=[...l.peek(),{id:crypto.randomUUID(),sender:e,text:t,timestamp:Date.now()}])},setCaption(e,t,n){u.value=e,d.value=n,h.current!==null&&(clearTimeout(h.current),h.current=null),t&&(h.current=setTimeout(()=>{u.value=``,d.value=null,h.current=null},F_))}});let t=A_(e?.data);t&&U_(t,_,g)},[l,u,d,g,_])}),D(()=>()=>{h.current!==null&&(clearTimeout(h.current),h.current=null)},[]);let C=A(async(e,a)=>{try{s.value=`connecting`,f.value=null;let o=e,l=p.peek();l&&o?.password==null&&(o={...o,password:l}),r.value.customization.conversation.unique_memory_tag===!0&&!o?.memory_stores&&(o={...o,memory_stores:[l_(t)]});let u=m.peek();m.value=null,u&&o?.captcha_token==null&&(o={...o,captcha_token:u});let d=await Sn(n,t,o,a);c.value={conversationId:d.conversation_id,conversationName:d.conversation_name,conversationUrl:d.conversation_url,callbackUrl:d.callback_url,createdAt:d.created_at},await i?.join({url:d.conversation_url})}catch(e){throw e instanceof bn&&(e.status===401||e.status===403)&&r.value.has_password===!0&&(p.value=null),P_.error(`Start failed`,e),f.value=String(e),s.value=`error`,e}},[n,t,i,s,f,c,p,m,r]),w=A(async()=>{let e=c.peek();s.value=`disconnecting`,e&&await Cn(n,t,e.conversationId).catch(e=>P_.error(`End conversation API failed`,e)),await i?.leave(),s.value=`ended`},[n,t,i,s,c]),ee=A(e=>{if(!i)return;let t=c.peek();if(!t){P_.warn(`sendChat called before session was established; dropping message`);return}g.markSent(e),i.sendAppMessage(x_(t.conversationId,e),`*`),l.value=[...l.peek(),{id:crypto.randomUUID(),sender:`user`,text:e,timestamp:Date.now()}]},[i,l,c,g]),T=A(e=>{if(!i){P_.warn(`sendMessage called before Daily was ready; dropping message`);return}let t=c.peek();if(!t){P_.warn(`sendMessage called before session was established; dropping message`);return}e.event_type===`conversation.respond`&&g.markSent(e.properties.text),i.sendAppMessage(j_(t.conversationId,e),`*`)},[i,c,g]),te=A(e=>{_.add(e)},[_]),ne=A(e=>{_.delete(e)},[_]),re=k(()=>({state:s,session:c,chatMessages:l,captionText:u,captionRole:d,error:f,password:p,setPassword:b,captchaToken:m,setCaptchaToken:x,mode:y,start:C,end:w,sendChat:ee,sendMessage:T,conversation:{start:C,end:w,sendMessage:T},__registerSubscriber:te,__unregisterSubscriber:ne}),[s,c,l,u,d,f,p,b,m,x,y,C,w,ee,T,te,ne]);return j(I_.Provider,{value:re,children:e})}function G_(){let e=ft(yi);if(!e)throw Error(`useConfig must be used within ConfigProvider`);return e}var K_=new Set([`network`,`server`,`unavailable`,`busy`,`rate_limited`]);function q_(e){return e===401||e===403?`forbidden`:e===402?`limit_exceeded`:e===423?`busy`:e===429?`rate_limited`:e===409?`concurrency`:e===503?`unavailable`:e>=500?`server`:`unknown`}function J_(e){if(!e)return;let t=e.get(`Retry-After`);if(!t)return;let n=Number.parseInt(t,10);if(!Number.isNaN(n)&&n>=0)return n;let r=Date.parse(t);if(!Number.isNaN(r)){let e=Math.floor((r-Date.now())/1e3);return e>0?e:0}}function Y_(e){if(e instanceof bn){let t=q_(e.status);return{kind:t,status:e.status,raw:e.body,retryable:K_.has(t),retryAfterSec:J_(e.headers)}}return e instanceof TypeError?{kind:`network`,raw:String(e),retryable:!0}:{kind:`unknown`,raw:String(e),retryable:!1}}function X_(e){return e===`limit_exceeded`?`daily_limit`:e===`forbidden`||e===`concurrency`?null:`busy`}var Z_=`tavus_pudl_`,Q_=3600*48,$_=new Map;function ev(){let e=new Date;return`${e.getUTCFullYear()}${String(e.getUTCMonth()+1).padStart(2,`0`)}${String(e.getUTCDate()).padStart(2,`0`)}`}function tv(e){return`${Z_}${e}`}function nv(e){try{let t=`${tv(e)}=`,n=document.cookie.split(`; `).find(e=>e.startsWith(t));if(!n)return 0;let[r,i]=decodeURIComponent(n.slice(t.length)).split(`.`);if(r!==ev())return 0;let a=Number.parseInt(i,10);return Number.isFinite(a)&&a>0?a:0}catch{return 0}}function rv(e,t){try{let n=encodeURIComponent(`${ev()}.${t}`);document.cookie=`${tv(e)}=${n}; max-age=${Q_}; path=/; SameSite=Lax`}catch{return}}function iv(e){let t=$_.get(e);return t||(t=Ht(e?nv(e):0),$_.set(e,t)),t}function av(e){if(!e)return;rv(e,nv(e)+1);let t=nv(e),n=$_.get(e);n?n.value=t:$_.set(e,Ht(t))}var ov=new Set([`Captcha token required`,`Captcha verification failed`]);function sv(e){if(!(e instanceof bn)||e.status!==403)return!1;try{let t=JSON.parse(e.body.trim());return typeof t.error==`string`&&ov.has(t.error)}catch{return!1}}function cv(e,t){let n=e!==null,r=(t?.captchaToken.peek()??null)!==null,[i,a]=E(!n||r),[o,s]=E(0);D(()=>{n||a(!0)},[n]);let c=A(e=>{t?.setCaptchaToken(e),a(!0)},[t]),l=A(()=>{a(!0)},[]),u=t?.captchaToken.value??null,d=O(null);return D(()=>{let e=d.current!==null;d.current=u,n&&u===null&&(a(!1),e&&s(e=>e+1))},[n,u]),{captchaReady:i,captchaEpoch:o,handleCaptchaToken:c,handleCaptchaFallback:l}}function lv({children:e}){let{config:t}=G_(),{start:n}=ft(I_),r=t.value.deployment_id??``,i=iv(r),a=A(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;return n==null||e.channel!==`widget`&&e.channel!==`embed`?null:n},[t]),[o,s]=E(`idle`),[c,l]=E(!1),[u,d]=E(null),[f,p]=E(!1),m=k(()=>Ht(`idle`),[]);D(()=>{m.value=o},[o,m]),gn(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;n!=null&&(e.channel!==`widget`&&e.channel!==`embed`||m.value===`idle`&&i.value>=n&&(d(`daily_limit`),p(!1),s(`unavailable`)))});let h=t.value.customization.show_haircheck,g=t.value.customization.conversation.modality,_=h&&g!==`chat`,v=O(!1),y=A(async()=>{l(!0);try{await n(),v.current=!1,a()!=null&&av(r),s(`call`)}catch(e){let n=Y_(e);if(sv(e)&&!v.current){v.current=!0,l(!1),s(`idle`);return}if(v.current=!1,n.kind===`forbidden`&&t.value.has_password===!0){s(`idle`);return}d(X_(n.kind)??`busy`),p(n.retryable),s(`unavailable`)}finally{l(!1)}},[n,t,a,r]),b=A(async()=>{if(o!==`idle`&&o!==`unavailable`)return;let e=a();if(e!=null&&i.value>=e){d(`daily_limit`),p(!1),s(`unavailable`);return}if(d(null),p(!1),_){s(`haircheck`);return}return y()},[o,_,y,a,i]),x=A(async()=>{o===`haircheck`&&await y()},[o,y]),S=A(()=>{o===`haircheck`&&s(`idle`)},[o]),C=A(()=>{o===`call`&&s(`ended`)},[o]),w=A(()=>{d(null),p(!1),s(`idle`)},[]),ee=k(()=>({flowSignal:m,setFlowState:s,isStarting:c,unavailableCause:u,canRetry:f,start:b,join:x,cancel:S,leave:C,restart:w}),[m,c,u,f,b,x,S,C,w]);return j(i_.Provider,{value:ee,children:e})}var uv=_n(`HostBridge`),dv=Fe(null);function fv(e){if(!e)return null;let t=e.getRootNode();return t instanceof ShadowRoot&&t.host instanceof HTMLElement?t.host:e.parentElement}function pv({children:e}){let t=ft(I_),n=ft(i_),r=ln(null),i=A(e=>{r.value=fv(e)},[r]),a=A((e,t)=>{let n=r.peek();n&&n.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0})),uv.info(`Event:`,e,t)},[r]);D(()=>{let e=r.value;if(e)return e.tavus={start:t.start,end:t.end,sendChat:t.sendChat,sendMessage:t.sendMessage},()=>{delete e.tavus}},[r.value,t]),D(()=>t.state.subscribe(e=>{switch(e){case`connected`:a(`tavus:conversation-started`,{conversationId:t.session.peek()?.conversationId??``}),a(`tavus:state-change`,{state:e});break;case`ended`:a(`tavus:conversation-ended`,{conversationId:t.session.peek()?.conversationId??``}),a(`tavus:state-change`,{state:e});break;case`error`:a(`tavus:error`,{code:`CONVERSATION_ERROR`,message:t.error.peek()??`Unknown error`}),a(`tavus:state-change`,{state:e});break;default:a(`tavus:state-change`,{state:e})}}),[t,a]),gn(()=>{if(!n)return;let e=n.flowSignal.value;a(`tavus:mode-change`,{mode:e})}),D(()=>{let e={onUtterance(e){a(`tavus:protocol-message`,{kind:`utterance`,event_type:`conversation.utterance`,properties:e})},onToolCall(e){a(`tavus:tool-call`,e),a(`tavus:protocol-message`,{kind:`tool_call`,event_type:`conversation.tool_call`,properties:e})},onPerception(e){a(`tavus:protocol-message`,e)},onSpeakingState({who:e,state:t,seq:n,turn_idx:r}){let i={state:t,...n===void 0?{}:{seq:n},...r===void 0?{}:{turn_idx:r}};a(`tavus:protocol-message`,{kind:`speaking`,event_type:e===`replica`?t===`started`?`conversation.replica_started_speaking`:`conversation.replica_stopped_speaking`:t===`started`?`conversation.user_started_speaking`:`conversation.user_stopped_speaking`,properties:i})},onMessage(e){a(`tavus:protocol-message`,e)}};return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[t,a]);let o=k(()=>({shadowHost:r,dispatchEvent:a}),[r,a]);return j(dv.Provider,{value:o,children:[j(`div`,{ref:i,style:`display:contents`}),e]})}var mv=Fe(null);function hv({children:e}){let{config:t}=ft(yi),n=k(()=>qt(()=>{let e=t.value.customization.style;return e.mode===`dark`||e.mode===`system`&&(globalThis.matchMedia?.(`(prefers-color-scheme: dark)`).matches??!1)}),[t]),r=k(()=>qt(()=>{let e=t.value.customization.style;return e.style===`basic`?n.value?`white-black`:`black-white`:n.value?`${e.style}-dark`:e.style}),[t,n]),i=k(()=>qt(()=>yv(t.value.customization.style)),[t]),a=k(()=>({dataTheme:r,isDark:n,cssVars:i}),[r,n,i]);return j(mv.Provider,{value:a,children:j(`div`,{"data-theme":r.value,style:bv(i.value),class:`contents`,children:e})})}var gv=[0,.125,.25,.5,.75],_v=[0,1,2,3,4],vv=[0,.2,.25,.3];function yv(e){return{"--radius-box":`${gv[e.boxes_radius]??.5}rem`,"--radius-field":`${gv[e.field_radius]??.25}rem`,"--radius-selector":`${gv[e.selectors_radius]??.5}rem`,"--border":`${_v[e.border_width]??1}px`,"--size-field":`${vv[e.fields_size]??.25}rem`,"--size-selector":`${vv[e.selectors_size]??.25}rem`,"--depth":e.depth_effect?`1`:`0`,"--noise":e.noise_effect?`1`:`0`}}function bv(e){return Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `)}Fe(null);var xv=41/2,Sv=23/2,Cv=Math.hypot(xv,Sv);Array.from({length:1008},(e,t)=>{let n=t%42,r=Math.floor(t/42),i=Math.hypot(n-xv,r-Sv)/Cv*.82,a=.34+(n*13+r*7)%34/100;return{delay:`${i.toFixed(3)}s`,opacity:a.toFixed(2)}});var wv=Fe(null);function Tv({children:e}){let t=O(null);return j(wv.Provider,{value:{frameRef:t},children:j(`div`,{class:`@container/conversation w-full h-full`,children:j(`div`,{ref:t,class:`relative w-full h-full max-h-screen aspect-video @max-mobile:aspect-9/16 overflow-hidden rounded-box bg-base-100`,children:e})})})}var Ev=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Dv=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Ov=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),kv=e=>{let t=Ov(e);return t.charAt(0).toUpperCase()+t.slice(1)},Av={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},jv=Fe({size:24,color:`currentColor`,strokeWidth:2,absoluteStrokeWidth:!1,class:``}),Mv=()=>ft(jv),Nv=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Pv=({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,children:i,iconNode:a,class:o=``,...s})=>{let{size:c=24,strokeWidth:l=2,absoluteStrokeWidth:u=!1,color:d=`currentColor`,class:f=``}=Mv()??{},p=r??u?Number(n??l)*24/Number(t??c):n??l;return oe(`svg`,{...Av,width:t??c??24,height:t??c??24,stroke:e??d,"stroke-width":p,class:Ev(`lucide`,f,o),...!i&&!Nv(s)&&{"aria-hidden":`true`},...s},[...a.map(([e,t])=>oe(e,t)),...ye(i)])},Fv=(e,t)=>{let n=({class:n=``,className:r=``,children:i,...a})=>oe(Pv,{...a,iconNode:t,class:Ev(`lucide-${Dv(kv(e))}`,`lucide-${Dv(e)}`,n,r)},i);return n.displayName=kv(e),n},Iv=Fv(`camera-off`,[[`path`,{d:`M14.564 14.558a3 3 0 1 1-4.122-4.121`,key:`1rnrzw`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M20 20H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 .819-.175`,key:`1x3arw`}],[`path`,{d:`M9.695 4.024A2 2 0 0 1 10.004 4h3.993a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v7.344`,key:`1i84u0`}]]),Lv=Fv(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),Rv=Fv(`captions`,[[`rect`,{width:`18`,height:`14`,x:`3`,y:`5`,rx:`2`,ry:`2`,key:`12ruh7`}],[`path`,{d:`M7 15h4M15 15h2M7 11h2M13 11h4`,key:`1ueiar`}]]),zv=Fv(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),Bv=Fv(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),Vv=Fv(`expand`,[[`path`,{d:`m15 15 6 6`,key:`1s409w`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}],[`path`,{d:`M21 16v5h-5`,key:`1ck2sf`}],[`path`,{d:`M21 8V3h-5`,key:`1qoq8a`}],[`path`,{d:`M3 16v5h5`,key:`1t08am`}],[`path`,{d:`m3 21 6-6`,key:`wwnumi`}],[`path`,{d:`M3 8V3h5`,key:`1ln10m`}],[`path`,{d:`M9 9 3 3`,key:`v551iv`}]]),Hv=Fv(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Uv=Fv(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),Wv=Fv(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),Gv=Fv(`mic-off`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M15 9.34V5a3 3 0 0 0-5.68-1.33`,key:`1gzdoj`}],[`path`,{d:`M16.95 16.95A7 7 0 0 1 5 12v-2`,key:`cqa7eg`}],[`path`,{d:`M18.89 13.23A7 7 0 0 0 19 12v-2`,key:`16hl24`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v3a3 3 0 0 0 5.12 2.12`,key:`r2i35w`}]]),Kv=Fv(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),qv=Fv(`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`}]]),Jv=Fv(`monitor-up`,[[`path`,{d:`m9 10 3-3 3 3`,key:`11gsxs`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}]]),Yv=Fv(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Xv=Fv(`phone-off`,[[`path`,{d:`M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272`,key:`1wngk7`}],[`path`,{d:`M22 2 2 22`,key:`y4kqgn`}],[`path`,{d:`M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473`,key:`10hv5p`}]]),Zv=Fv(`picture-in-picture-2`,[[`path`,{d:`M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4`,key:`daa4of`}],[`rect`,{width:`10`,height:`7`,x:`12`,y:`13`,rx:`2`,key:`1nb8gs`}]]),Qv=Fv(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),$v=Fv(`shrink`,[[`path`,{d:`m15 15 6 6m-6-6v4.8m0-4.8h4.8`,key:`17vawe`}],[`path`,{d:`M9 19.8V15m0 0H4.2M9 15l-6 6`,key:`chjx8e`}],[`path`,{d:`M15 4.2V9m0 0h4.8M15 9l6-6`,key:`lav6yq`}],[`path`,{d:`M9 4.2V9m0 0H4.2M9 9 3 3`,key:`1pxi2q`}]]),ey=Fv(`smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),ty=Fv(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ny=Fv(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),ry=Fv(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),iy=Fv(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function ay(e,t){return({size:n=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i})=>j(`span`,{class:r,role:`img`,"aria-label":i??t,children:j(e,{size:n})})}var oy={close:ay(iy,`Close`),leave:ay(Xv,`Leave call`),more:ay(Bv,`More`),error:ay(ty,`Error`),mic:ay(Kv,`Microphone`),"mic-off":ay(Gv,`Microphone muted`),cam:ay(Lv,`Camera`),"cam-off":ay(Iv,`Camera off`),"screen-share":ay(Jv,`Screen share`),pip:ay(Zv,`Picture in picture`),user:ay(ny,`User`),"face-smile":ay(ey,`Camera off`),captions:ay(Rv,`Closed captions`),chat:ay(Wv,`Chat`),fullscreen:ay(Uv,`Enter fullscreen`),"fullscreen-exit":ay(qv,`Exit fullscreen`),expand:ay(Vv,`Expand`),collapse:ay($v,`Collapse`),send:ay(Qv,`Send`),"external-link":ay(Hv,`External link`),clock:ay(zv,`Clock`),moon:ay(Yv,`Unavailable`),users:ay(ry,`Busy`)},sy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M16 19H4v-2h12v2ZM4 17H2V7h2v10Zm14-8h2V7h2v10h-2v-2h-2v2h-2V7h2v2Zm-2-2H4V5h12v2Z"/></svg>`,cy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 21h-2v-2h2v2Zm-6-2H4v-2h10v2Zm4 0h-2v-2h2v2Zm4 0h-2v-2h-2v-2h-2v-2h-2V7h2v2h2V7h2V5h2v14ZM4 17H2V7h2v10Zm12 0h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2H8V9h2v2ZM8 9H6V7h2v2ZM6 7H4V5h2v2Zm8 0h-4V5h4v2ZM4 5H2V3h2v2Z"/></svg>`,ly=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M3 4h18v2H3zm0 14h18v2H3zM1 6h2v12H1zm20 0h2v12h-2zM5 10h2v4H5zm8 0h2v4h-2zM7 8h4v2H7zm0 6h4v2H7zm8 0h4v2h-4zm0-6h4v2h-4z"/></svg>`,uy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M22 22h-2v-2h-2v-2h2v-8h2v12Zm-4-4h-8v-2h8v2ZM4 12h2v2H4v2H2V4h2v8Zm6 4H8v-6h2v6Zm10-6H10V8h10v2Zm-4-4h-2V4h2v2Zm-2-2H4V2h10v2Z"/></svg>`,dy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H6v-2h12v2ZM6 20H4v-2h2v2Zm14 0h-2v-2h2v2ZM4 18H2V6h2v12Zm18 0h-2V6h2v12Zm-5-1h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2h-2V6h2v7ZM6 6H4V4h2v2Zm14 0h-2V4h2v2Zm-2-2H6V2h12v2Z"/></svg>`,fy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H6v-2h12v2ZM6 20H4v-2h2v2Zm14 0h-2v-2h2v2ZM4 18H2V6h2v12Zm4 0H6v-2h2v2Zm14 0h-2V6h2v12Zm-12-2H8v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2V8h2v2Zm2-2h-2V6h2v2ZM6 6H4V4h2v2Zm14 0h-2V4h2v2Zm-2-2H6V2h12v2Z"/></svg>`,py=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M7 19h2v-2h2v-2h2v2h2v2h2v2H7v-2Zm13-6H4v-2h16v2Zm-3-8h-2v2h-2v2h-2V7H9V5H7V3h10v2Z"/></svg>`,my=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 22H4v-2h16v2ZM4 20H2V4h2v16Zm18 0h-2V4h2v16Zm-9-2h-2v-2h2v2Zm0-4h-2V6h2v8Zm7-10H4V2h16v2Z"/></svg>`,hy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M15 19h-2v2h-2v-2H9v-2H7v-2h10v2h-2v2Zm5-6H4v-2h16v2Zm-7-8h2v2h2v2H7V7h2V5h2V3h2v2Z"/></svg>`,gy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M8 22H4v-2h4v2Zm12 0h-4v-2h4v2ZM4 20H2v-4h2v4Zm18 0h-2v-4h2v4Zm-6-3H8v-2h8v2Zm-8-2H6V9h2v6Zm10 0h-2V9h2v6Zm-2-6H8V7h8v2ZM4 8H2V4h2v4Zm18 0h-2V4h2v4ZM8 4H4V2h4v2Zm12 0h-4V2h4v2Z"/></svg>`,_y=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H6v-2h12v2ZM6 20H4V4h2v16Zm14 0h-2v-3h2v3ZM16 9h2v2h2v2h-2v2h-2v2h-2v-4H8v-2h6V7h2v2Zm4-2h-2V4h2v3Zm-2-3H6V2h12v2Z"/></svg>`,vy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M13 22h-2v-2H8v-2h8v2h-3v2Zm-5-4H6v-2h2v2Zm10 0h-2v-2h2v2ZM6 16H4v-6h2v6Zm8 0h-4v-2h4v2Zm6 0h-2v-6h2v6Zm-10-2H8V4h2v10Zm6 0h-2V4h2v10ZM14 4h-4V2h4v2Z"/></svg>`,yy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M13 22h-2v-2H8v-2h8v2h-3v2Zm9 0h-2v-2h2v2Zm-2-2h-2v-2h2v2ZM8 18H6v-2h2v2Zm10 0h-2v-2h2v2ZM6 16H4v-6h2v6Zm8-2h2v2h-6v-2h2v-2h2v2Zm-4-4h2v2h-2v2H8V8h2v2Zm10 4h-2v-4h2v4Zm-4-4h-2V4h2v6ZM8 8H6V6h2v2ZM6 6H4V4h2v2ZM4 4H2V2h2v2Zm10 0h-4V2h4v2Z"/></svg>`,by=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H8v-2h10v2ZM8 20H6v-2h2v2Zm12 0h-2v-2h2v2ZM6 18H4v-2h2v2Zm16 0h-2v-4h-2v-2h2v-2h2v8ZM4 16H2V6h2v10Zm14 0h-6v-2h6v2Zm-6-2h-2v-2h2v2Zm-2-2H8V6h2v6ZM6 6H4V4h2v2Zm8-2h-2v2h-2V4H6V2h8v2Z"/></svg>`,xy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M5 15H3v-2h2v2Zm8 0h-2v-2h2v2Zm8 0h-2v-2h2v2ZM3 13H1v-2h2v2Zm4 0H5v-2h2v2Zm4 0H9v-2h2v2Zm4 0h-2v-2h2v2Zm4 0h-2v-2h2v2Zm4 0h-2v-2h2v2ZM5 11H3V9h2v2Zm8 0h-2V9h2v2Zm8 0h-2V9h2v2Z"/></svg>`,Sy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 20H4v-2h16v2ZM4 18H2V6h2v12Zm18 0h-2V6h2v12ZM18 8v6h-8V8h8Zm2-2H4V4h16v2Zm-4 4h-4v2h4v-2Z"/></svg>`,Cy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 18h-7v2h3v2H8v-2h3v-2H4v-2h16v2ZM4 16H2V4h2v12Zm18 0h-2v-6h2v6Zm-6-6h-2V8h2v2Zm2-2h-2V6h2v2Zm4-6v6h-2V6h-2V4h-2V2h6Zm-8 2H4V2h10v2Z"/></svg>`,wy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M4 19h4v2H2v-8h2v6Zm8 0H8v-2h4v2Zm4-2h-4v-2h4v2Zm4-2h-4v-2h4v2Zm-10-2H4v-2h6v2Zm12 0h-2v-2h2v2ZM8 5H4v6H2V3h6v2Zm12 6h-4V9h4v2Zm-4-2h-4V7h4v2Zm-4-2H8V5h4v2Z"/></svg>`,Ty=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M6 22H4v-4h2v4Zm14 0h-2v-4h2v4ZM8 18H6v-2h2v2Zm10 0h-2v-2h2v2Zm-2-2H8v-2h8v2Zm-1-4H9v-2h6v2Zm-6-2H7V4h2v6Zm8 0h-2V4h2v6Zm-2-6H9V2h6v2Z"/></svg>`,Ey=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M2 22H0v-4h2v4Zm14 0h-2v-4h2v4Zm8 0h-2v-4h2v4ZM4 18H2v-2h2v2Zm10 0h-2v-2h2v2Zm8 0h-2v-2h2v2Zm-10-2H4v-2h8v2Zm8 0h-4v-2h4v2Zm-9-4H5v-2h6v2Zm8 0h-4v-2h4v2ZM5 10H3V4h2v6Zm8 0h-2V4h2v6Zm8 0h-2V4h2v6ZM11 4H5V2h6v2Zm8 0h-4V2h4v2Z"/></svg>`,Dy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 22H4v-2h16v2ZM4 20H2v-6H0v-2h2V8h2v12Zm18-8h2v2h-2v6h-2V8h2v4Zm-8 6h-4v-2h4v2Zm-4-2H8v-2h2v2Zm6 0h-2v-2h2v2Zm-6-4H8v-2h2v2Zm6 0h-2v-2h2v2Zm-3-6h7v2H4V6h7V4h2v2Zm4-2h-4V2h4v2Z"/></svg>`,Oy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M17 21H5v-2h12v2ZM5 19H3V7h2v12Zm14 0h-2v-6h2v6Zm-8-4H9v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2V9h2v2Zm6 0h-2V7h-2V5h-4V3h8v8Zm-4-2h-2V7h2v2Zm-6-2H5V5h6v2Z"/></svg>`;function ky(e){return e.replace(/\s(width|height)="\d+"/g,``)}function Ay(e,t){let n=ky(e);return({size:e=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i})=>j(`span`,{class:r,role:`img`,"aria-label":i??t,style:{display:`inline-flex`,width:e,height:e},dangerouslySetInnerHTML:{__html:n.replace(`<svg`,`<svg width="100%" height="100%"`)}})}var jy={pixelarticons:{close:Ay(fy,`Close`),leave:Ay(_y,`Leave call`),more:Ay(xy,`More`),error:Ay(my,`Error`),mic:Ay(vy,`Microphone`),"mic-off":Ay(yy,`Microphone muted`),cam:Ay(sy,`Camera`),"cam-off":Ay(cy,`Camera off`),"screen-share":Ay(Cy,`Screen share`),pip:Ay(Sy,`Picture in picture`),user:Ay(Ty,`User`),"face-smile":Ay(Dy,`Camera off`),captions:Ay(ly,`Closed captions`),chat:Ay(uy,`Chat`),fullscreen:Ay(gy,`Enter fullscreen`),"fullscreen-exit":Ay(py,`Exit fullscreen`),expand:Ay(hy,`Expand`),collapse:Ay(py,`Collapse`),send:Ay(wy,`Send`),"external-link":Ay(Oy,`External link`),clock:Ay(dy,`Clock`),moon:Ay(by,`Unavailable`),users:Ay(Ey,`Busy`)},lucide:oy};function My({name:e,...t}){let{config:n}=G_(),r=(jy[n.value.customization.style.icon_library]??jy.pixelarticons)[e];return j(r,{...t})}var Ny=`Ready when you are`,Py=`Start the conversation`;function Fy(e){return typeof e==`string`&&e.length>0?e:``}function Iy(e){let t=Fy(e.replica_thumbnail_image_url);if(t)return{url:t,kind:`image`};let n=Fy(e.replica_thumbnail_video_url);return n?{url:n,kind:`video`}:null}function Ly(e){let{preview:t}=e.customization,{background:n}=t,r=Iy(e),i;i=n.type?n.type:r?`replica`:`background-gradient`;let a=Fy(n.url);return{title:t.title||Ny,description:t.description||``,btn_title:t.btn_title||Py,background:{type:i,url:a}}}var Ry={backgroundImage:`linear-gradient(to bottom right, var(--color-primary), var(--color-base-300))`};function zy({variant:e,replica:t}){let[n,r]=E(!1);return D(()=>{r(!1)},[e.url]),e.type===`replica`&&t?t.kind===`image`?j(`img`,{class:`absolute inset-0 w-full h-full object-cover`,src:t.url,loading:`lazy`,alt:``}):j(`video`,{class:`absolute inset-0 w-full h-full object-cover`,src:t.url,muted:!0,autoplay:!0,loop:!0,playsinline:!0}):e.type===`custom-image`&&e.url&&!n?j(`img`,{class:`absolute inset-0 w-full h-full object-cover`,src:e.url,loading:`lazy`,alt:``,onError:()=>r(!0)}):j(`div`,{class:`absolute inset-0`,style:Ry})}function By({className:e=``}){let{config:t}=G_(),n=Ly(t.value),r=Iy(t.value);return j(`div`,{class:`relative size-16 shrink-0 rounded-box overflow-hidden bg-base-300 ${e}`,children:j(zy,{variant:n.background,replica:r})})}var Vy=`absolute inset-0 bg-base-100 text-base-content flex flex-col items-center justify-center gap-6 px-6 py-8 text-center overflow-y-auto motion-safe:animate-[tavusFadeUp_280ms_ease-out]`;function Hy({children:e,class:t,role:n,"aria-live":r}){return j(`div`,{class:t?`${Vy} ${t}`:Vy,role:n,"aria-live":r,children:e})}function Uy({title:e,description:t,media:n,children:r,overlay:i}){return j(Hy,{children:[n===void 0?j(By,{}):n,(e||t)&&j(`div`,{class:`flex flex-col items-center gap-3 max-w-sm`,children:[e&&j(`h2`,{class:`text-lg font-medium leading-snug`,children:e}),t&&j(`p`,{class:`text-base text-base-content/60 tracking-wide leading-snug`,children:t})]}),r&&j(`div`,{class:`flex flex-col items-center gap-3`,children:r}),i]})}var Wy={daily_limit:{title:`Agent is at today's limit`,description:`This Agent can take more conversations tomorrow.`},total_limit:{title:`Agent is unavailable`,description:`This Agent isn't available right now. Please check back later.`},busy:{title:`Agent is in another conversation`,description:`Please try again in a moment.`},error:{title:`Couldn't load this Agent`,description:`This Agent couldn't be loaded. Please try again later.`}};function Gy(e,t){let n=t?.[e];return{title:n?.title||Wy[e].title,description:n?.description||Wy[e].description}}var Ky={daily_limit:`clock`,total_limit:`moon`,busy:`users`,error:`error`};function qy({cause:e}){return j(`div`,{class:`flex size-16 shrink-0 items-center justify-center rounded-box bg-base-200 text-base-content/70`,children:j(My,{name:Ky[e],size:`2rem`})})}function Jy({cause:e,canRetry:t,onRetry:n,onCancel:r}){let{config:i}=G_(),a=i.value.customization?.unavailable_screen,o=Gy(e,a),s=a?.cta??[],c=e===`busy`||s.length>0||!!r;return j(Uy,{media:j(qy,{cause:e}),title:o.title,description:o.description,children:c&&j(`div`,{class:`flex flex-wrap items-center justify-center gap-2`,children:[e===`busy`&&j(`button`,{type:`button`,class:`btn btn-neutral rounded-box`,disabled:!t,onClick:n,children:`Try again`}),s.map(e=>j(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`btn btn-outline rounded-box`,children:e.title},e.url)),r&&j(`button`,{type:`button`,class:`btn btn-ghost`,onClick:r,children:`Close`})]})})}function Yy(){let e=ft(i_);return{state:e.flowSignal.value,isStarting:e.isStarting,unavailableCause:e.unavailableCause,canRetry:e.canRetry,start:e.start,join:e.join,cancel:e.cancel,leave:e.leave,restart:e.restart}}var Xy=`Thanks for joining`,Zy=`You can start a new conversation whenever you're ready.`,Qy=`Start a new conversation`;function $y(e){try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`||t.protocol===`mailto:`}catch{return!1}}function eb({text:e,onRestart:t}){let{config:n}=G_(),r=n.value.customization.after_call,i=r.cta.filter(e=>$y(e.url));return j(Uy,{title:r.title||e?.title||Xy,description:r.description||e?.description||Zy,children:[j(`button`,{type:`button`,class:`btn btn-neutral rounded-box`,onClick:t,children:e?.restart||Qy}),i.length>0&&j(`div`,{class:`flex flex-wrap items-center justify-center gap-2`,children:i.map(e=>j(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`btn btn-outline rounded-box`,children:e.title},e.url))})]})}function tb(){let e=ah(),t=Hh(),{isOff:n}=n_(t),{camState:r}=Xg();return{isCamReady:k(()=>r===`granted`,[r]),isCamMuted:n,localSessionId:t,onToggleCamera:A(()=>{e?.setLocalVideo(n)},[e,n])}}function nb(){let e=ah(),t=Hh(),{isOff:n}=Gg(t),{micState:r}=Xg();return{isMicReady:k(()=>r===`granted`,[r]),isMicMuted:n,localSessionId:t,onToggleMicrophone:A(()=>{e?.setLocalAudio(n)},[e,n])}}function rb(){let e=ah(),t=Hh(),{isOff:n}=e_(t),r=!n;return{isScreenSharing:r,localSessionId:t,onToggleScreenshare:A(()=>{r?e?.stopScreenShare():e?.startScreenShare({displayMediaOptions:{audio:!1,selfBrowserSurface:`exclude`,surfaceSwitching:`include`,video:{width:1920,height:1080}}})},[e,r])}}var ib=`select-control-pill relative inline-flex items-center bg-neutral text-neutral-content`,ab=`absolute inset-0 w-full h-full opacity-0 cursor-pointer appearance-none disabled:cursor-not-allowed`,ob=`absolute right-1.5 top-1/2 -translate-y-1/2 pointer-events-none flex items-center`,sb=`absolute left-0 top-0 h-full aspect-square flex items-center justify-center pointer-events-none`,cb=`absolute left-0 top-0 z-10 btn btn-control btn-neutral`;function lb(){return j(`svg`,{style:{width:`var(--chevron-size, 0.75rem)`,height:`var(--chevron-size, 0.75rem)`},viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:j(`path`,{d:`M4 6L8 10L12 6`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`})})}function ub({value:e,devices:t,disabled:n,onChange:r,label:i}){return j(le,{children:[j(`select`,{class:ab,value:e,onChange:e=>r(e.target.value),disabled:n,"aria-label":i,children:t.map(({device:e})=>j(`option`,{value:e.deviceId,children:e.label},e.deviceId))}),j(`span`,{class:ob,children:j(lb,{})})]})}function db(e){return j(`div`,{class:ib,children:j(ub,{...e})})}function fb({iconName:e,...t}){return j(`div`,{class:ib,children:[j(`span`,{class:sb,"aria-hidden":`true`,children:j(My,{name:e})}),j(ub,{...t})]})}var pb=ya(()=>{let{onToggleMicrophone:e,isMicReady:t,isMicMuted:n}=nb(),{microphones:r,currentMic:i,setMicrophone:a}=Xg();return(r?.length??0)<=1?j(hb,{}):j(`div`,{class:`relative inline-flex items-center`,children:[j(db,{value:i?.device?.deviceId,devices:r||[],disabled:!t,onChange:e=>a(e),label:`Select microphone`}),j(`button`,{type:`button`,onClick:e,disabled:!t,class:cb,"aria-label":n?`Unmute microphone`:`Mute microphone`,"aria-pressed":n,children:j(My,{name:n||!t?`mic-off`:`mic`})})]})}),mb=ya(()=>{let{onToggleCamera:e,isCamReady:t,isCamMuted:n}=tb(),{currentCam:r,cameras:i,setCamera:a}=Xg();return(i?.length??0)<=1?j(gb,{}):j(`div`,{class:`relative inline-flex items-center`,children:[j(db,{value:r?.device?.deviceId,devices:i||[],disabled:!t,onChange:e=>a(e),label:`Select camera`}),j(`button`,{type:`button`,onClick:e,disabled:!t||!r,class:cb,"aria-label":n?`Turn camera on`:`Turn camera off`,"aria-pressed":n,children:j(My,{name:n?`cam-off`:`cam`})})]})}),hb=ya(()=>{let{onToggleMicrophone:e,isMicReady:t,isMicMuted:n}=nb();return j(`button`,{type:`button`,onClick:e,disabled:!t,class:`btn btn-control btn-neutral`,"aria-label":n?`Unmute microphone`:`Mute microphone`,"aria-pressed":n,children:j(My,{name:n||!t?`mic-off`:`mic`})})}),gb=ya(()=>{let{onToggleCamera:e,isCamReady:t,isCamMuted:n}=tb(),{currentCam:r}=Xg();return j(`button`,{type:`button`,onClick:e,disabled:!t||!r,class:`btn btn-control btn-neutral`,"aria-label":n?`Turn camera on`:`Turn camera off`,"aria-pressed":n,children:j(My,{name:n?`cam-off`:`cam`})})});ya(({compact:e=!1}={})=>{let{isMicReady:t}=nb(),{microphones:n,currentMic:r,setMicrophone:i}=Xg();return(n?.length??0)<=1?null:j(fb,{iconName:`mic`,value:r?.device?.deviceId,devices:n,disabled:!t,onChange:e=>i(e),label:`Select microphone`,compact:e})}),ya(({compact:e=!1}={})=>{let{isCamReady:t}=tb(),{currentCam:n,cameras:r,setCamera:i}=Xg();return(r?.length??0)<=1?null:j(fb,{iconName:`cam`,value:n?.device?.deviceId,devices:r,disabled:!t,onChange:e=>i(e),label:`Select camera`,compact:e})});var _b=ya((e={})=>{let{onToggleScreenshare:t,isScreenSharing:n}=rb();return j(`button`,{type:`button`,onClick:t,class:`btn btn-control ${n?`btn-primary`:`btn-neutral`}`,"aria-label":n?`Stop screen share`:`Start screen share`,"aria-pressed":n,children:j(My,{name:`screen-share`})})});function vb(e){let t=ft(I_);if(!t)throw Error(`useConversation must be used within ConversationProvider`);return D(()=>{if(e)return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[e]),t}var yb=Fe(null);function bb({children:e,defaultEnabled:t=!1}){let[n,r]=E(t),i=A(()=>r(e=>!e),[]),a=k(()=>({isEnabled:n,toggle:i}),[n,i]);return j(yb.Provider,{value:a,children:e})}function xb(){let e=ft(yb);if(!e)throw Error(`ClosedCaptions components must be used within <ClosedCaptionsProvider>`);return e}var Sb=ya(()=>{let{isEnabled:e,toggle:t}=xb();return j(`button`,{type:`button`,onClick:t,"aria-pressed":e,class:`btn btn-control ${e?`btn-primary`:`btn-neutral`}`,"aria-label":e?`Hide captions`:`Show captions`,children:j(My,{name:`captions`,"aria-label":e?`Closed Captions On`:`Closed Captions Off`})})}),Cb=ya(()=>{let{isEnabled:e}=xb(),{captionText:t,captionRole:n}=vb(),r=t.value,i=n.value;return!e||!r?null:j(`div`,{class:`absolute bottom-24 left-1/2 -translate-x-1/2 max-w-[80%] px-4 py-2 rounded-box bg-black/60 text-white`,role:`status`,"aria-live":`polite`,children:j(`div`,{class:`text-sm leading-5 max-h-15 overflow-hidden flex flex-col justify-end text-center`,children:j(`div`,{children:[j(`span`,{class:`text-xs ${i===`replica`?`text-secondary`:`text-primary`} mr-2`,children:i===`replica`?`Replica`:`You`}),r]})})})}),wb=Fe(null);function Tb({children:e,defaultOpen:t=!1}){let[n,r]=E(t),i=A(()=>r(e=>!e),[]),a=A(()=>r(!1),[]),o=k(()=>({isOpen:n,toggle:i,close:a}),[n,i,a]);return j(wb.Provider,{value:o,children:e})}function Eb(){let e=ft(wb);if(!e)throw Error(`Chat components must be used within <ChatProvider>`);return e}var Db=ya((e={})=>{let{isOpen:t,toggle:n}=Eb();return j(`button`,{type:`button`,onClick:n,"aria-pressed":t,"aria-label":t?`Close chat`:`Open chat`,class:`btn btn-control ${t?`btn-primary`:`btn-neutral`}`,children:j(My,{name:`chat`})})}),Ob=ya(({message:e})=>{let t=e.sender===`user`;return j(`li`,{class:`flex flex-col gap-1 ${t?`items-end`:`items-start`}`,children:[j(`span`,{class:`text-xs ${t?`text-primary`:`text-secondary`}`,children:t?`You`:`Replica`}),j(`span`,{class:`px-3 py-2 rounded-field text-sm max-w-[80%] ${t?`bg-primary text-primary-content`:`bg-base-200 text-base-content`}`,children:e.text})]})}),kb=ya(()=>{let{isOpen:e,close:t}=Eb(),{chatMessages:n,sendChat:r,session:i}=vb(),a=i.value?.conversationId??null,o=n.value,[s,c]=E(``),l=O(null);D(()=>{let e=l.current;e&&(e.scrollTop=e.scrollHeight)},[o.length]);let u=A(()=>{let e=s.trim();!e||!a||(r(e),c(``))},[s,r,a]),d=A(e=>{e.key===`Enter`&&!e.shiftKey&&!e.isComposing&&(e.preventDefault(),u())},[u]),f=!!s.trim()&&!!a;return j(`aside`,{class:`absolute top-0 right-0 w-80 h-full bg-base-100 border-l border-base-300 flex flex-col z-30 transition-transform ${e?`translate-x-0`:`translate-x-full`} @max-mobile:w-full`,"aria-hidden":!e,inert:!e,children:[j(`header`,{class:`flex items-center justify-between px-4 py-3 border-b border-base-300`,children:[j(`span`,{class:`font-medium text-base-content`,children:`Chat`}),j(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle`,onClick:t,"aria-label":`Close chat`,children:j(My,{name:`close`,size:20})})]}),j(`ul`,{ref:l,class:`flex-1 overflow-y-auto p-4 flex flex-col gap-3`,role:`log`,"aria-live":`polite`,children:o.length===0?j(`li`,{class:`text-center text-sm opacity-70`,children:a?`Send a message to start the conversation.`:`Connecting…`}):o.map(e=>j(Ob,{message:e},e.id))}),j(`form`,{class:`flex items-end gap-2 p-3 border-t border-base-300`,onSubmit:e=>{e.preventDefault(),u()},children:[j(`textarea`,{class:`textarea textarea-bordered textarea-sm flex-1 resize-none`,value:s,onChange:e=>c(e.target.value),onKeyDown:d,placeholder:a?`Type a message…`:`Connecting…`,disabled:!a,rows:1,"aria-label":`Message`}),j(`button`,{type:`submit`,class:`btn btn-primary btn-sm btn-circle`,disabled:!f,"aria-label":`Send message`,children:j(My,{name:`send`,size:18})})]})]})});function Ab({label:e}){return j(Hy,{role:`status`,"aria-live":`polite`,class:`z-2`,children:[j(By,{}),j(`div`,{class:`flex flex-col items-center gap-3`,children:[j(`span`,{class:`loading loading-spinner loading-md text-base-content`}),j(`span`,{class:`text-base font-medium`,children:e})]})]})}var jb=ya(()=>j(Ab,{label:`Connecting`})),Mb=ya(()=>j(Ab,{label:`Leaving`}));function Nb({active:e,onToggle:t,tooltip:n}){return j(`button`,{type:`button`,onClick:t,class:`btn btn-control ${e?`btn-info`:`btn-ghost`}`,"aria-label":n??(e?`Exit fullscreen`:`Enter fullscreen`),title:n,children:j(My,{name:e?`fullscreen-exit`:`fullscreen`})})}var Pb=ya(({id:e})=>{let t=Wh()===e,n=O(null),r=O(null),i=O(null),a=O(void 0);Wg(e,A(e=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{let t=Number(Math.max(.01,e).toFixed(2));n.current&&r.current&&i.current&&(n.current.style.height=`${20+t*40}%`,r.current.style.height=`${20+t*130}%`,i.current.style.height=`${20+t*40}%`)})},[]));let o=`w-[3px] rounded-full bg-base-100 transition-[opacity] ${t?`opacity-100`:`opacity-50`}`;return j(`div`,{class:`flex items-center justify-center w-6 h-6`,children:j(`div`,{class:`flex items-center justify-center gap-[2px] w-full h-full`,children:[j(`div`,{ref:n,class:o,style:{height:`20%`}}),j(`div`,{ref:r,class:o,style:{height:`20%`}}),j(`div`,{ref:i,class:o,style:{height:`20%`}})]})})});function Fb({sessionId:e,className:t=``}){let n=O(null),r=O(void 0);return Wg(e??``,A(t=>{e&&(r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let e=Math.max(0,Math.min(1,t**.6));n.current?.style.setProperty(`--audio-level`,String(e))}))},[e])),j(`div`,{ref:n,class:`relative aspect-square w-full max-w-[min(48cqi,16rem)] mx-auto pointer-events-none ${t}`,style:{"--audio-level":`0`},"aria-hidden":`true`,children:[j(`div`,{class:`absolute inset-0 rounded-full will-change-transform`,style:{background:`conic-gradient(from 0deg, var(--color-primary), var(--color-info, var(--color-primary)), var(--color-secondary, var(--color-primary)), var(--color-primary))`,filter:`blur(28px)`,animation:`tavusOrbSpin 18s linear infinite`,scale:`calc(1 + var(--audio-level, 0) * 0.35)`,opacity:`calc(0.45 + var(--audio-level, 0) * 0.45)`,transition:`scale 120ms ease-out, opacity 120ms ease-out`}}),j(`div`,{class:`absolute inset-[12%] rounded-full will-change-transform`,style:{background:`conic-gradient(from 180deg, color-mix(in oklab, var(--color-primary) 80%, white), transparent 30%, color-mix(in oklab, var(--color-primary) 60%, white) 70%, transparent)`,filter:`blur(14px)`,opacity:.55,mixBlendMode:`screen`,animation:`tavusOrbSpin 26s linear infinite reverse`}}),j(`div`,{class:`absolute inset-[28%] rounded-full`,style:{background:`radial-gradient(circle at 30% 30%, color-mix(in oklab, white 70%, var(--color-primary)), var(--color-primary) 60%, color-mix(in oklab, var(--color-primary) 50%, black))`,boxShadow:`0 0 60px color-mix(in oklab, var(--color-primary) 60%, transparent), inset 0 0 30px color-mix(in oklab, white 40%, transparent)`,scale:`calc(1 + var(--audio-level, 0) * 0.18)`,transition:`scale 100ms ease-out`}}),j(`div`,{class:`absolute inset-[28%] rounded-full`,style:{background:`radial-gradient(circle, color-mix(in oklab, var(--color-primary) 80%, transparent), transparent 70%)`,animation:`tavusOrbPulse 2.6s ease-in-out infinite`}})]})}function Ib({children:e,class:t,className:n,...r}){return j(`div`,{class:`tavus-mesh-bg ${t??n??``}`,...r,children:[j(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-1`}),j(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-2`}),j(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-3`}),j(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-4`}),j(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-5`}),j(`div`,{class:`absolute inset-0 bg-linear-to-t from-black/30 via-black/10 to-transparent pointer-events-none backdrop-blur-xs`}),e]})}var Lb=e=>!!e.user_id?.includes(`tavus-replica`);function Rb(){return Yh({filter:Lb})}function zb(e){let t=Rb()[0],n=n_(t??``),r=jg(),[i,a]=E(!1);return D(()=>{t&&(n.state===`playable`||e)&&a(!0)},[t,n.state,e]),r===`left-meeting`||r===`error`?{phase:`left`}:!i||!t?{phase:`connecting`}:{phase:`ready`,replicaId:t,videoState:n}}var Bb=ya(({isAudioOnly:e})=>{let t=zb(e);return t.phase===`left`?j(Mb,{}):t.phase===`connecting`?j(jb,{}):e?j(Ib,{class:`flex items-center justify-center`,children:[j(Fb,{sessionId:t.replicaId}),j(eg,{sessionId:t.replicaId})]}):j(`div`,{class:`relative w-full h-full`,children:[j(ng,{automirror:!0,sessionId:t.replicaId,type:`video`,fit:`cover`,className:`absolute inset-0 w-full h-full object-cover ${t.videoState.isOff?`hidden`:``}`}),j(eg,{sessionId:t.replicaId})]})}),Vb=ya(({onLeave:e})=>{let{config:t}=G_(),n=t.value.customization.conversation.modality===`audio`;return j(`div`,{class:`@container/pip w-full h-full`,children:j(`div`,{class:`relative w-full h-full overflow-hidden bg-linear-to-br from-base-300 to-base-200 text-base-content`,children:[j(`div`,{class:`relative w-full h-full z-5`,children:j(Bb,{isAudioOnly:n})}),j(`div`,{class:`absolute bottom-4 w-full inset-x-0 z-20 flex justify-center items-center gap-2 @max-mobile:gap-1`,children:[j(hb,{}),!n&&j(gb,{}),j(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:e,"aria-label":`Leave call`,children:j(My,{name:`leave`,"aria-label":`Leave Call`})})]})]})})}),Hb=ya(({personaSessionId:e,localSessionId:t,isPresenting:n,isScreenSharing:r,isAudioOnly:i,avatarOff:a,videoRef:o})=>{let s=n||r;return j(le,{children:[j(ng,{ref:o,automirror:!0,sessionId:r?t??``:e,type:s?`screenVideo`:`video`,fit:s?`contain`:`cover`,className:`absolute inset-0 w-full h-full transition-all ${s?`object-contain`:`object-cover`} ${!s&&a?`hidden`:``}`}),n&&j(`div`,{class:`absolute bottom-4 right-4 aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10`,children:i||a?j(`div`,{class:`flex w-full h-full items-center justify-center`,children:j(Fb,{sessionId:e})}):j(ng,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover`})})]})});function K(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}function Ub(e){return e&&Object.assign(qb,e),qb}var Wb,Gb,Kb,qb,Jb=a((()=>{Gb=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Kb=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(Wb=globalThis).__zod_globalConfig??(Wb.__zod_globalConfig={}),qb=globalThis.__zod_globalConfig}));function Yb(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Xb(e,t=`|`){return e.map(e=>fx(e)).join(t)}function Zb(e,t){return typeof t==`bigint`?t.toString():t}function Qb(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function $b(e){return e==null}function ex(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function tx(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function nx(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==kx)return r===void 0&&(r=kx,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function rx(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ix(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function ax(e){return JSON.stringify(e)}function ox(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}function sx(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function cx(e){if(sx(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(sx(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function lx(e){return cx(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function ux(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function dx(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function q(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function fx(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function px(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}function mx(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return dx(e,ix(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return rx(this,`shape`,e),e},checks:[]}))}function hx(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return dx(e,ix(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return rx(this,`shape`,r),r},checks:[]}))}function gx(e,t){if(!cx(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return dx(e,ix(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return rx(this,`shape`,n),n}}))}function _x(e,t){if(!cx(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return dx(e,ix(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return rx(this,`shape`,n),n}}))}function vx(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return dx(e,ix(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return rx(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function yx(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return dx(t,ix(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return rx(this,`shape`,i),i},checks:[]}))}function bx(e,t,n){return dx(t,ix(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return rx(this,`shape`,i),i}}))}function xx(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Sx(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Cx(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function wx(e){return typeof e==`string`?e:e?.message}function Tx(e,t,n){let r=e.message?e.message:wx(e.inst?._zod.def?.error?.(e))??wx(t?.error?.(e))??wx(n.customError?.(e))??wx(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function Ex(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Dx(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ox(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var kx,Ax,jx,Mx,Nx,Px=a((()=>{Jb(),kx=Symbol(`evaluating`),Ax=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},jx=Qb(()=>{if(qb.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),Mx=new Set([`string`,`number`,`symbol`]),Nx={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}}));function Fx(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Ix(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var Lx,Rx,zx,Bx=a((()=>{Jb(),Px(),Lx=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Zb,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Rx=K(`$ZodError`,Lx),zx=K(`$ZodError`,Lx,{Parent:Error})})),Vx,Hx,Ux,Wx,Gx,Kx,qx,Jx,Yx,Xx,Zx,Qx,$x,eS,tS=a((()=>{Jb(),Bx(),Px(),Vx=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Gb;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Tx(e,a,Ub())));throw Ax(t,i?.callee),t}return o.value},Hx=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Tx(e,a,Ub())));throw Ax(t,i?.callee),t}return o.value},Ux=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Gb;return a.issues.length?{success:!1,error:new(e??Rx)(a.issues.map(e=>Tx(e,i,Ub())))}:{success:!0,data:a.value}},Wx=Ux(zx),Gx=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Tx(e,i,Ub())))}:{success:!0,data:a.value}},Kx=Gx(zx),qx=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Vx(e)(t,n,i)},Jx=e=>(t,n,r)=>Vx(e)(t,n,r),Yx=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Hx(e)(t,n,i)},Xx=e=>async(t,n,r)=>Hx(e)(t,n,r),Zx=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ux(e)(t,n,i)},Qx=e=>(t,n,r)=>Ux(e)(t,n,r),$x=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Gx(e)(t,n,i)},eS=e=>async(t,n,r)=>Gx(e)(t,n,r)}));function nS(){return new RegExp(gS,`u`)}function rS(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function iS(e){return RegExp(`^${rS(e)}$`)}function aS(e){let t=rS({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${TS}T(?:${r})$`)}var oS,sS,cS,lS,uS,dS,fS,pS,mS,hS,gS,_S,vS,yS,bS,xS,SS,CS,wS,TS,ES,DS,OS,kS,AS,jS,MS,NS,PS,FS=a((()=>{oS=/^[cC][0-9a-z]{6,}$/,sS=/^[0-9a-z]+$/,cS=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,lS=/^[0-9a-vA-V]{20}$/,uS=/^[A-Za-z0-9]{27}$/,dS=/^[a-zA-Z0-9_-]{21}$/,fS=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,pS=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,mS=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,hS=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,gS=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,_S=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,vS=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,yS=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,bS=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,xS=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,SS=/^[A-Za-z0-9_-]*$/,CS=/^https?$/,wS=/^\+[1-9]\d{6,14}$/,TS=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,ES=RegExp(`^${TS}$`),DS=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},OS=/^-?\d+$/,kS=/^-?\d+(?:\.\d+)?$/,AS=/^(?:true|false)$/i,jS=/^null$/i,MS=/^undefined$/i,NS=/^[^A-Z]*$/,PS=/^[^a-z]*$/})),IS,LS,RS,zS,BS,VS,HS,US,WS,GS,KS,qS,JS,YS,XS,ZS,QS,$S=a((()=>{Jb(),FS(),Px(),IS=K(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),LS={number:`number`,bigint:`bigint`,object:`date`},RS=K(`$ZodCheckLessThan`,(e,t)=>{IS.init(e,t);let n=LS[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),zS=K(`$ZodCheckGreaterThan`,(e,t)=>{IS.init(e,t);let n=LS[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),BS=K(`$ZodCheckMultipleOf`,(e,t)=>{IS.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):tx(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),VS=K(`$ZodCheckNumberFormat`,(e,t)=>{IS.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Nx[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=OS)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),HS=K(`$ZodCheckMaxLength`,(e,t)=>{var n;IS.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!$b(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Ex(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),US=K(`$ZodCheckMinLength`,(e,t)=>{var n;IS.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!$b(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Ex(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),WS=K(`$ZodCheckLengthEquals`,(e,t)=>{var n;IS.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!$b(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Ex(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),GS=K(`$ZodCheckStringFormat`,(e,t)=>{var n,r;IS.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),KS=K(`$ZodCheckRegex`,(e,t)=>{GS.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),qS=K(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=NS,GS.init(e,t)}),JS=K(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=PS,GS.init(e,t)}),YS=K(`$ZodCheckIncludes`,(e,t)=>{IS.init(e,t);let n=ux(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),XS=K(`$ZodCheckStartsWith`,(e,t)=>{IS.init(e,t);let n=RegExp(`^${ux(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ZS=K(`$ZodCheckEndsWith`,(e,t)=>{IS.init(e,t);let n=RegExp(`.*${ux(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),QS=K(`$ZodCheckOverwrite`,(e,t)=>{IS.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),eC,tC=a((()=>{eC=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
50
+ Passed callback for '${e}' event is NOT registered.`,t),c(!0);return}l.current++;var n=setTimeout(function(){l.current=0},50);return a(e,t,u),function(){clearTimeout(n),i(e,u)}}},[t,e,u,s,i,a]),mt({event:e,eventId:u,isBlocked:s,callback:t})};function fh(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(!fh(e[i],t[i]))return!1;return!0}if(MediaStream&&e instanceof MediaStream&&t instanceof MediaStream)return e.id===t.id&&e.active===t.active&&e.getTracks().length===t.getTracks().length&&e.getTracks().every(function(e,n){return fh(e,t.getTracks()[n])});if(MediaStreamTrack&&e instanceof MediaStreamTrack&&t instanceof MediaStreamTrack)return e.id===t.id&&e.kind===t.kind&&e.readyState===t.readyState;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;var a=Array.from(e).sort(),o=Array.from(t).sort();return a.every(function(e,t){return fh(e,o[t])})}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;try{for(var s=nh(e.entries()),c=s.next();!c.done;c=s.next()){var l=rh(c.value,2),u=l[0],d=l[1];if(!t.has(u)||!fh(d,t.get(u)))return!1}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return!0}if(Qm(e)!==`object`||e===null||Qm(t)!==`object`||t===null)return!1;var f=Object.keys(e),p=Object.keys(t);if(f.length!==p.length)return!1;for(var i=0;i<f.length;i++){var u=f[i];if(!Object.prototype.hasOwnProperty.call(t,u)||!fh(e[u],t[u]))return!1}return!0}function ph(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&&Qm(r)===`object`,o=i!==null&&Qm(i)===`object`;if(a||o){if(!fh(r,i))return!1}else if(r!==i)return!1}return!0}function G(e){return`daily-react-`+e}function mh(e){var t=new Map,n=new Map;return function(r){if(!t.has(r)){var i=N(function(t){var i=e.get(r)(t),a=n.get(r);return a!=null&&e.equals(i,a)?a:(n.set(r,i),i)});t.set(r,i)}return t.get(r)}}var hh=`::`,gh=`;`,_h=function(e,t){return e+hh+t},vh=function(e,t){return e+hh+t.join(gh)},yh=function(e,t){return xh(_h(e,t))},bh=ca(function(e){var t=N([]);return t.debugLabel=G(`participant-property-paths-${e}`),t}),xh=ca(function(e){var t=N(null);return t.debugLabel=G(`participant-property-${e}`),t}),Sh=mh({equals:ph,get:function(e){return function(t){var n=rh(e.split(hh),2),r=n[0];return n[1].split(gh).map(function(e){return t(yh(r,e))})}}}),Ch=function(e,t){var n,r=ho(Array.isArray(t)?Sh(vh(e,t)):xh(_h(e,t)));return mt(Array.isArray(t)?t.reduce(function(e,t,n){return e[t]=r[n],e},{}):(n={},n[t]=r,n)),r},wh=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function Th(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Eh,Dh;function Oh(){if(Dh)return Eh;Dh=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=Qm(wh)==`object`&&wh&&wh.Object===Object&&wh,l=(typeof self>`u`?`undefined`:Qm(self))==`object`&&self&&self.Object===Object&&self,u=c||l||Function(`return this`)(),d=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function h(t,n,r){var i,a,o,s,c,l,u=0,d=!1,h=!1,g=!0;if(typeof t!=`function`)throw TypeError(e);n=b(n)||0,_(r)&&(d=!!r.leading,h=`maxWait`in r,o=h?f(b(r.maxWait)||0,n):o,g=`trailing`in r?!!r.trailing:g);function v(e){var n=i,r=a;return i=a=void 0,u=e,s=t.apply(r,n),s}function y(e){return u=e,c=setTimeout(C,n),d?v(e):s}function x(e){var t=e-l,r=e-u,i=n-t;return h?p(i,o-r):i}function S(e){var t=e-l,r=e-u;return l===void 0||t>=n||t<0||h&&r>=o}function C(){var e=m();if(S(e))return w(e);c=setTimeout(C,x(e))}function w(e){return c=void 0,g&&i?v(e):(i=a=void 0,s)}function ee(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function te(){return c===void 0?s:w(m())}function ne(){var e=m(),t=S(e);if(i=arguments,a=this,l=e,t){if(c===void 0)return y(l);if(h)return c=setTimeout(C,n),v(l)}return c===void 0&&(c=setTimeout(C,n)),s}return ne.cancel=ee,ne.flush=te,ne}function g(t,n,r){var i=!0,a=!0;if(typeof t!=`function`)throw TypeError(e);return _(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),h(t,n,{leading:i,maxWait:n,trailing:a})}function _(e){var t=Qm(e);return!!e&&(t==`object`||t==`function`)}function v(e){return!!e&&Qm(e)==`object`}function y(e){return Qm(e)==`symbol`||v(e)&&d.call(e)==n}function b(e){if(typeof e==`number`)return e;if(y(e))return t;if(_(e)){var n=typeof e.valueOf==`function`?e.valueOf():e;e=_(n)?n+``:n}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(r,``);var c=a.test(e);return c||o.test(e)?s(e.slice(2),c?2:8):i.test(e)?t:+e}return Eh=g,Eh}var kh=Th(Oh()),Ah=function(e,t,n,r){n===void 0&&(n=500),r===void 0&&(r=!1);var i=pt(sh),a=i.off,o=i.on,s=O(function(){var t;return Array.isArray(e)?e.reduce(function(e,t){return e[t]=r?lh():dh(),e},{}):(t={},t[e]=r?lh():dh(),t)},[e,r]),c=D([]);W(`call-instance-destroyed`,k(function(){c.current.length=0},[]));var l=O(function(){return kh(function(){c.current.length!==0&&(t(c.current),c.current.length=0)},n,{trailing:!0})},[t,n]);E(function(){if(e){var t=function(e){c.current.push(e),l()};return Array.isArray(e)?e.forEach(function(e){return o(e,t,s[e])}):o(e,t,s[e]),function(){Array.isArray(e)?e.forEach(function(e){return a(e,s[e])}):a(e,s[e])}}},[l,e,s,a,o]),mt({event:e,eventId:s})},jh=function(e,t,n){if(t===void 0&&(t=``),n===void 0&&(n=new Set),Qm(e)!==`object`||e===null||n.has(e))return[t];n.add(e);var r=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=t?`${t}.${i}`:i;r.push.apply(r,ih([a],rh(jh(e[i],a,n)),!1))}return n.delete(e),r},Mh=function(e){return jh(e)},Nh=function(e,t){return String(t).split(`.`).filter(function(e){return e.length}).reduce(function(e,t){return e&&e[t]},e)},Ph=function(e,t){return t.map(function(t){return Nh(e,t)})},Fh=N(null);Fh.debugLabel=G(`active-id`);var Ih=N(``);Ih.debugLabel=G(`local-id`);var Lh=N(null);Lh.debugLabel=G(`local-join-date`);var Rh=N([]);Rh.debugLabel=G(`participant-ids`);var zh=ca(function(e){var t=N(null);return t.debugLabel=G(`participant-${e}`),t}),Bh=N([]);Bh.debugLabel=G(`waiting-participants`);var Vh=ca(function(e){var t=N({awaitingAccess:{level:`full`},id:e,name:``});return t.debugLabel=G(`waiting-participant-${e}`),t}),Hh=function(e){var t=e.children,n=oh(),r=rh(T(!1),2),i=r[0],a=r[1],o=F(k(function(e,t,n){t(Ih,n.local.session_id);var r=Object.values(n);t(Rh,r.map(function(e){return e.session_id})),r.forEach(function(e){t(zh(e.session_id),e);var n=Mh(e);t(bh(e.session_id),n),n.forEach(function(n){var r=rh(Ph(e,[n]),1)[0];t(yh(e.session_id,n),r)})}),a(!0)},[]));E(function(){if(!(!n||i)){var e=setInterval(function(){var t=n.participants();`local`in t&&(o(t),clearInterval(e))},100);return function(){clearInterval(e)}}},[n,i,o]);var s=k(function(){if(n){var e=n?.participants();e.local&&o(e)}},[n,o]);W(`started-camera`,s,!0),W(`access-state-updated`,s,!0),W(`joining-meeting`,F(k(function(e,t){t(Lh,new Date),s()},[s])),!0),W(`joined-meeting`,k(function(e){o(e.participants)},[o]),!0);var c=F(k(function(e,t){t(Ih,``),t(Fh,null),e(Rh).forEach(function(e){return zh.remove(e)}),t(Rh,[])},[]));return W(`call-instance-destroyed`,c,!0),W(`left-meeting`,c,!0),Ah([`active-speaker-change`,`participant-joined`,`participant-updated`,`participant-left`],F(k(function(e,t,n){n.length&&n.forEach(function(n){switch(n.action){case`active-speaker-change`:t(Fh,n.activeSpeaker.peerId),t(zh(n.activeSpeaker.peerId),function(e){return e?U(U({},e),{last_active:new Date}):null});break;case`participant-joined`:t(Rh,function(e){return e.includes(n.participant.session_id)?e:ih(ih([],rh(e),!1),[n.participant.session_id],!1)}),t(zh(n.participant.session_id),n.participant);var r=Mh(n.participant);t(bh(n.participant.session_id),r),r.forEach(function(e){var r=rh(Ph(n.participant,[e]),1)[0];t(yh(n.participant.session_id,e),r)});break;case`participant-updated`:t(zh(n.participant.session_id),n.participant),n.participant.local&&t(Ih,n.participant.session_id);var r=Mh(n.participant),i=e(bh(n.participant.session_id));(r.length!==i.length||r.some(function(e){return!i.includes(e)}))&&t(bh(n.participant.session_id),r);var a=new Set(i),o=Ph(n.participant,r);r.forEach(function(e,r){var i=o[r];a.delete(e),t(yh(n.participant.session_id,e),function(e){return fh(e,i)?e:i})}),a.forEach(function(e){t(yh(n.participant.session_id,e),null)});break;case`participant-left`:t(Rh,function(e){return e.includes(n.participant.session_id)?e.filter(function(e){return e!==n.participant.session_id}):e}),zh.remove(n.participant.session_id),e(bh(n.participant.session_id)).forEach(function(e){xh.remove(_h(n.participant.session_id,e))}),bh.remove(n.participant.session_id);break}})},[])),100,!0),Ah([`waiting-participant-added`,`waiting-participant-updated`,`waiting-participant-removed`],F(k(function(e,t,n){n.forEach(function(e){switch(e.action){case`waiting-participant-added`:t(Bh,function(t){return t.includes(e.participant.id)?t:ih(ih([],rh(t),!1),[e.participant.id],!1)}),t(Vh(e.participant.id),e.participant);break;case`waiting-participant-updated`:t(Vh(e.participant.id),e.participant);break;case`waiting-participant-removed`:t(Bh,function(t){return t.filter(function(t){return t!==e.participant.id})}),Vh.remove(e.participant.id);break}})},[])),100,!0),P.createElement(P.Fragment,null,t)},Uh=function(){var e=ho(Ih);return mt(e),e},Wh=function(){return!0},Gh=function(e){var t=e===void 0?{}:e,n=t.filter,r=n===void 0?Wh:n,i=t.ignoreLocal,a=i===void 0?!1:i,o=Uh(),s=ho(Fh),c=a&&s===o,l=!r?.(s),u=rh(T(!c&&!l?s:null),2),d=u[0],f=u[1];return E(function(){c||l||f(s)},[l,c,s]),mt(d),d},Kh=function(e){return[`blocked`,`off`].includes(e)},qh=`;`,Jh=function(e,t){return`${e}${qh}${t}`},Yh=mh({equals:fh,get:function(e){return function(t){var n=rh(e.split(qh),2),r=n[0],i=n[1];return t(Rh).filter(function(e){switch(r){case`local`:case`owner`:case`record`:return t(yh(e,r));case`remote`:return!t(yh(e,`local`));case`screen`:var n=t(yh(e,`tracks.screenAudio.state`)),i=t(yh(e,`tracks.screenVideo.state`));return!Kh(n)||!Kh(i);default:return!0}}).sort(function(e,n){switch(i){case`joined_at`:case`session_id`:case`user_id`:case`user_name`:var r=t(yh(e,i)),a=t(yh(n,i));if(r!==void 0||a!==void 0){if(r===void 0)return-1;if(a===void 0||r>a)return 1;if(r<a)return-1}return 0;default:return 0}})}}}),Xh=function(e){var t=e===void 0?{}:e,n=t.filter,r=t.onActiveSpeakerChange,i=t.onParticipantJoined,a=t.onParticipantLeft,o=t.onParticipantUpdated,s=t.sort,c=ho(Yh(Jh(typeof n==`string`?n:null,typeof s==`string`?s:null))),l=typeof n==`function`||typeof s==`function`,u=k(function(e){return typeof n!=`function`&&typeof s!=`function`?[]:c.map(function(t){return e(zh(t))}).filter(function(e){return!!e}).filter(typeof n==`function`?n:function(){return!0}).sort(typeof s==`function`?s:function(){return 0}).map(function(e){return e.session_id}).filter(Boolean)},[n,c,s]),d=rh(T([]),2),f=d[0],p=d[1],m=F(k(function(e){if(l){var t=u(e);fh(t,f)||p(t)}},[f,u,l]));E(function(){m()},[m]),Ah([`participant-joined`,`participant-updated`,`active-speaker-change`,`participant-left`],k(function(e){e.length&&(e.forEach(function(e){switch(e.action){case`participant-joined`:i?.(e);break;case`participant-updated`:o?.(e);break;case`active-speaker-change`:r?.(e);break;case`participant-left`:a?.(e);break}}),m())},[m,r,i,a,o]));var h=typeof n==`function`||typeof s==`function`?f:c;return mt(h),h},Zh=mh({equals:ph,get:function(){return function(e){return e(Yh(Jh(`screen`,null))).map(function(t){return{local:e(yh(t,`local`)),screenAudio:e(yh(t,`tracks.screenAudio`)),screenVideo:e(yh(t,`tracks.screenVideo`)),screenId:`${t}-screen`,session_id:t}})}}}),Qh=function(e){var t=e===void 0?{}:e,n=t.onError,r=t.onLocalScreenShareStarted,i=t.onLocalScreenShareStopped,a=oh(),o=k(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a?.startScreenShare.apply(a,ih([],rh(e),!1))},[a]),s=k(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a?.stopScreenShare.apply(a,ih([],rh(e),!1))},[a]);W(`local-screen-share-started`,k(function(){return r?.()},[r])),W(`local-screen-share-stopped`,k(function(){return i?.()},[i])),W(`nonfatal-error`,k(function(e){e.type===`screen-share-error`&&n?.(e)},[n]));var c=ho(Zh(void 0)),l={isSharingScreen:c.some(function(e){return e.local}),screens:c,startScreenShare:o,stopScreenShare:s};return mt(l),l},$h=function(e,t){t===void 0&&(t=`video`);var n=Ch(e,`tracks.${t}`),r=n?U(U({},n),{isOff:Kh(n.state)}):{isOff:!0,persistentTrack:void 0,state:`off`,subscribed:!1};return mt(r),r};function eg(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return k(function(t){for(var n=0;n<e.length;n++){var r=e[n];typeof r==`function`?r(t):r&&Qm(r)===`object`&&(r.current=t)}},e)}var tg=ba(Ca(function(e,t){var n=e.onPlayFailed,r=e.sessionId,i=e.type,a=i===void 0?`audio`:i,o=$m(e,[`onPlayFailed`,`sessionId`,`type`]),s=D(null),c=$h(r,a),l=eg(s,t),u=c?.subscribed;return E(function(){var e=s.current;if(!(!e||!c?.persistentTrack)){if(!MediaStream){console.warn(`MediaStream API not available. Can't setup ${a} for ${r}`),n?.({sessionId:r,target:e,type:a,message:`MediaStream API not available`,name:`MediaStream API not available`});return}var t=function(){e.play().catch(function(t){n?.({sessionId:r,target:e,type:a,message:t.message,name:t.name})})};return e.addEventListener(`loadedmetadata`,t),e.srcObject=new MediaStream([c.persistentTrack]),e.load(),function(){e.removeEventListener(`loadedmetadata`,t)}}},[c?.persistentTrack,n,r,a]),W(`participant-left`,k(function(e){var t=s.current;e.participant.session_id!==r||!t||(t.srcObject=null)},[r])),W(`left-meeting`,k(function(){var e=s.current;e&&(e.pause(),e.srcObject=null)},[])),P.createElement(`audio`,U({autoPlay:!0,ref:l},o,{"data-session-id":r,"data-audio-type":a,"data-subscribed":u}))}));tg.displayName=`DailyAudioTrack`;var ng=ba(Ca(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=oh(),u=rh(T(Array(a).fill(``)),2),d=u[0],f=u[1],p=Qh().screens,m=Uh(),h=Gh({ignoreLocal:!0}),g=D(null);ft(t,function(){return{getActiveSpeakerAudio:function(){return g.current?.querySelector(`audio[data-session-id="${h}"][data-audio-type="audio"]`)??null},getAllAudio:function(){return Array.from(g.current?.querySelectorAll(`audio`)??[])},getAudioBySessionId:function(e){return g.current?.querySelector(`audio[data-session-id="${e}"][data-audio-type="audio"]`)??null},getRmpAudio:function(){return Array.from(g.current?.querySelectorAll(`audio[data-audio-type="rmpAudio"]`)??[])},getScreenAudio:function(){return Array.from(g.current?.querySelectorAll(`audio[data-audio-type="screenAudio"]`)??[])},getRmpAudioBySessionId:function(e){return g.current?.querySelector(`audio[data-session-id="${e}"][data-audio-type="rmpAudio"]`)??null},getScreenAudioBySessionId:function(e){return g.current?.querySelector(`audio[data-session-id="${e}"][data-audio-type="screenAudio"]`)??null}}},[h]);var _=F(k(function(e,t,n){return eh(void 0,void 0,void 0,function(){var t,i;return th(this,function(a){if(t=Object.values(l?.participants()??{}).filter(function(e){return!e.local&&!!e.tracks.audio.subscribed}),i=function(e){return t.some(function(t){return t.session_id===e})},!i(n))if(l&&!l.isDestroyed()&&r&&!l.subscribeToTracksAutomatically())l.updateParticipant(n,{setSubscribedTracks:{audio:!0}});else return[2];return f(function(r){if(r.includes(n))return r;var a=function(e){return!e||!i(e)};if(r.some(a)){var o=r.findIndex(a);return r[o]=n,ih([],rh(r),!1)}var s=r.findIndex(function(e){return t.some(function(t){return t.session_id===e&&Kh(t.tracks.audio.state)})});if(s>=0)return r[s]=n,ih([],rh(r),!1);var c=t.filter(function(e){return r.includes(e.session_id)&&e.session_id!==h}).sort(function(t,n){var r=e(yh(t.session_id,`last_active`))??new Date(`1970-01-01`),i=e(yh(n.session_id,`last_active`))??new Date(`1970-01-01`);return r>i?1:r<i?-1:0});if(!c.length){var l=r.findIndex(function(e){return e!==h});return r[l]=n,ih([],rh(r),!1)}var u=r.indexOf(c[0]?.session_id);return r[u]=n,ih([],rh(r),!1)}),[2]})})},[h,r,l])),v=k(function(e){f(function(t){if(!t.includes(e))return t;var n=ih([],rh(t),!1),r=n.indexOf(e);return n[r]=``,n})},[]);Ah([`active-speaker-change`,`track-started`,`participant-left`],k(function(e){e.forEach(function(e){switch(e.action){case`active-speaker-change`:if(e.activeSpeaker.peerId===m)return;_(e.activeSpeaker.peerId);break;case`track-started`:e.track.kind===`audio`&&e.participant&&!e.participant.local&&_(e.participant.session_id);break;case`participant-left`:v(e.participant.session_id);break}})},[_,m,v]),200);var y=Xh({filter:k(function(e){return!!e?.tracks?.rmpAudio},[])});return P.createElement(`div`,{ref:g},d.map(function(e,t){return P.createElement(tg,{key:`speaker-slot-${t}`,onPlayFailed:o,sessionId:e,type:`audio`})}),p.filter(function(e){return c?!0:!e.local}).map(function(e){return P.createElement(tg,{key:e.screenId,onPlayFailed:o,sessionId:e.session_id,type:`screenAudio`})}),y.map(function(e){return P.createElement(tg,{key:`${e}-rmp`,onPlayFailed:o,sessionId:e,type:`rmpAudio`})}))}));ng.displayName=`DailyAudio`;var rg=Ca(function(e,t){var n=e.automirror,r=e.fit,i=r===void 0?`contain`:r,a=e.mirror,o=e.onResize,s=e.playableStyle,c=s===void 0?{}:s,l=e.sessionId,u=e.style,d=u===void 0?{}:u,f=e.type,p=f===void 0?`video`:f,m=$m(e,[`automirror`,`fit`,`mirror`,`onResize`,`playableStyle`,`sessionId`,`style`,`type`]),h=Uh()===l,g=p===`screenVideo`,_=h&&!g,v=D(null),y=eg(v,t),b=$h(l,p),x=b.persistentTrack,S=_||g||!b.isOff,C=Ch(l,`tracks.${p}`)?.subscribed,w=O(function(){if(typeof a==`boolean`)return a;if(!n)return!1;if(!x)return _;var e=x.getSettings();return`facingMode`in e?_&&e.facingMode===`user`:_},[n,_,a,x]);return E(function(){var e=v.current;if(e){var t=function(){var t=e.play();t!==void 0&&t.then(function(){e.controls=!1}).catch(function(t){e.controls=!0,console.warn(`Failed to play video`,t)})},n=function(){e.paused&&t()},r=function(){e.style.transform=`scale(1)`},i=function(){e.style.transform=``,setTimeout(function(){e.paused&&t()},100)},a=function(){document.visibilityState!==`hidden`&&e.paused&&t()};return e.addEventListener(`canplay`,n),e.addEventListener(`enterpictureinpicture`,r),e.addEventListener(`leavepictureinpicture`,i),document.addEventListener(`visibilitychange`,a),function(){e.removeEventListener(`canplay`,n),e.removeEventListener(`enterpictureinpicture`,r),e.removeEventListener(`leavepictureinpicture`,i),document.removeEventListener(`visibilitychange`,a)}}},[]),E(function(){var e=v.current;if(!(!e||!x)){if(!MediaStream){console.warn(`MediaStream API not available. Can't setup ${p} for ${l}`);return}return e.srcObject=new MediaStream([x]),e.load(),function(){e.srcObject=null,e.load()}}},[l,p,x,x?.id]),E(function(){var e=v.current;if(!o||!e)return;var t;function n(){t&&cancelAnimationFrame(t),t=requestAnimationFrame(function(){var e=v.current;if(!(!e||document.hidden)){var t=e.videoWidth,n=e.videoHeight;t&&n&&o?.({aspectRatio:t/n,height:n,width:t})}})}return n(),e.addEventListener(`loadedmetadata`,n),e.addEventListener(`resize`,n),function(){t&&cancelAnimationFrame(t),e.removeEventListener(`loadedmetadata`,n),e.removeEventListener(`resize`,n)}},[o]),P.createElement(`video`,U({autoPlay:!0,muted:!0,playsInline:!0,ref:y,"data-local":h,"data-mirrored":w||void 0,"data-playable":S||void 0,"data-session-id":l,"data-subscribed":C,"data-video-type":p,style:U(U({objectFit:i,transform:w?`scale(-1, 1)`:``},d),S?c:{})},m))});rg.displayName=`DailyVideo`;var ig=Ie({refreshDevices:function(){return Promise.resolve()}}),ag=N(`idle`);ag.debugLabel=G(`camera-state`);var og=N(`idle`);og.debugLabel=G(`microphone-state`);var sg=N([]);sg.debugLabel=G(`camera-devices`);var cg=N([]);cg.debugLabel=G(`microphone-devices`);var lg=N([]);lg.debugLabel=G(`speaker-devices`);var ug=N(null);ug.debugLabel=G(`last-camera-error`);var dg=function(e){var t=e.children,n=oh(),r=F(k(function(e,t){return eh(void 0,void 0,void 0,function(){var e,r,i,a,o,s,c,l,u,d;return th(this,function(f){switch(f.label){case 0:if((navigator==null?void 0:navigator.mediaDevices)?.getUserMedia===void 0||(navigator==null?void 0:navigator.mediaDevices)?.enumerateDevices===void 0)return t(ag,`not-supported`),t(og,`not-supported`),[2];if(!n)return[2];f.label=1;case 1:return f.trys.push([1,4,,5]),[4,n.enumerateDevices()];case 2:return e=f.sent().devices,r=e.filter(function(e){return e.kind===`videoinput`&&e.deviceId!==``}),i=e.filter(function(e){return e.kind===`audioinput`&&e.deviceId!==``}),a=e.filter(function(e){return e.kind===`audiooutput`&&e.deviceId!==``}),[4,n.getInputDevices()];case 3:return o=f.sent(),s=o.camera,c=o.mic,l=o.speaker,u=function(e,t,n){var r=n.find(function(e){return e.device.deviceId===t.deviceId}),i=`deviceId`in e&&t.deviceId===e.deviceId,a=!(`deviceId`in e)&&r?.selected;return{device:t,selected:i||!!a,state:r?.state??`granted`}},d=function(e,t){return e.device.deviceId==="default"?-1:t.device.deviceId==="default"?1:e.device.label<t.device.label?-1:+(e.device.label>t.device.label)},t(sg,function(e){return r.filter(Boolean).map(function(t){return u(s,t,e)}).sort(d)}),t(cg,function(e){return i.filter(Boolean).map(function(t){return u(c,t,e)}).sort(d)}),t(lg,function(e){return a.filter(Boolean).map(function(t){return u(l,t,e)}).sort(d)}),[3,5];case 4:return f.sent(),t(ag,`not-supported`),t(og,`not-supported`),[3,5];case 5:return[2]}})})},[n])),i=F(k(function(e,t){return eh(void 0,void 0,void 0,function(){var i,a,o,s,c,l,u,d,f,p,m,h;return th(this,function(g){switch(g.label){case 0:if(!n||(i=e(ag),a=e(og),o=n.participants(),!o.local))return[2];if(s=o.local.tracks,c=`prompt`,l=`prompt`,!navigator.permissions)return[3,5];g.label=1;case 1:return g.trys.push([1,4,,5]),[4,navigator.permissions.query({name:`camera`})];case 2:return u=g.sent(),c=u.state,[4,navigator.permissions.query({name:`microphone`})];case 3:return d=g.sent(),l=d.state,[3,5];case 4:return g.sent(),[3,5];case 5:return f=c===`prompt`&&[`idle`,`pending`].includes(i)&&s.video.state===`interrupted`&&!s.video.persistentTrack,p=[`idle`,`pending`].includes(i)&&!s.video.persistentTrack&&!!s.video.off?.byUser,m=l===`prompt`&&[`idle`,`pending`].includes(a)&&s.audio.state===`interrupted`&&!s.audio.persistentTrack,h=[`idle`,`pending`].includes(a)&&!s.audio.persistentTrack&&!!s.audio.off?.byUser,s.audio?.blocked?.byDeviceInUse?(t(og,`in-use`),t(cg,function(e){return e.map(function(e){return e.selected?U(U({},e),{state:`in-use`}):e})})):s.audio?.blocked?.byDeviceMissing?t(og,`not-found`):s.audio?.blocked?.byPermissions||l===`denied`?t(og,`blocked`):m?t(og,`pending`):h?t(og,`idle`):(t(og,`granted`),t(cg,function(e){return e.map(function(e){return e.selected?U(U({},e),{state:`granted`}):e})})),s.video?.blocked?.byDeviceInUse?(t(ag,`in-use`),t(sg,function(e){return e.map(function(e){return e.selected?U(U({},e),{state:`in-use`}):e})})):s.video?.blocked?.byDeviceMissing?t(ag,`not-found`):s.video?.blocked?.byPermissions||c===`denied`?t(ag,`blocked`):f?t(ag,`pending`):p?t(ag,`idle`):(t(ag,`granted`),t(sg,function(e){return e.map(function(e){return e.selected?U(U({},e),{state:`granted`}):e})})),r(),[2]}})})},[n,r]));return W(`participant-updated`,k(function(e){e.participant.local&&i()},[i])),W(`available-devices-updated`,r),W(`selected-devices-updated`,r),W(`camera-error`,F(k(function(e,t,n){switch(t(ug,n.error),n.error?.type){case`cam-in-use`:t(ag,`in-use`);break;case`mic-in-use`:t(og,`in-use`);break;case`cam-mic-in-use`:t(ag,`in-use`),t(og,`in-use`);break;case`not-found`:n.error?.missingMedia.includes(`video`)&&t(ag,`not-found`),n.error?.missingMedia.includes(`audio`)&&t(og,`not-found`);break;case`permissions`:n.error?.blockedMedia.includes(`video`)&&t(ag,`blocked`),n.error?.blockedMedia.includes(`audio`)&&t(og,`blocked`);break;case`constraints`:n.error?.reason===`invalid`?(t(ag,`constraints-invalid`),t(og,`constraints-invalid`)):n.error?.reason===`none-specified`&&(t(ag,`constraints-none-specified`),t(og,`constraints-none-specified`));break;case`undefined-mediadevices`:t(ag,`undefined-mediadevices`),t(og,`undefined-mediadevices`);break;default:t(ag,`unknown`),t(og,`unknown`);break}},[]))),W(`started-camera`,F(k(function(e,t){t(ag,`granted`),t(og,`granted`),i()},[i]))),P.createElement(ig.Provider,{value:{refreshDevices:r}},t)};function fg(e){return e.instanceId??`__default__`}var pg=N({});pg.debugLabel=G(`live-streaming-instances`);var mg=N(function(e){var t=e(pg),n=Object.values(t),r=n.filter(function(e){return e.isLiveStreaming}),i=r[0]??n[n.length-1];return{errorMsg:n.find(function(e){return e.errorMsg})?.errorMsg,isLiveStreaming:r.length>0,layout:i?.layout}});mg.debugLabel=G(`live-streaming`);var hg=function(e){var t=e.children;return W(`live-streaming-started`,F(k(function(e,t,n){var r=fg(n);t(pg,function(e){var t;return U(U({},e),(t={},t[r]={instanceId:r,isLiveStreaming:!0,layout:n?.layout},t))})},[]))),W(`live-streaming-stopped`,F(k(function(e,t,n){var r=fg(n);t(pg,function(e){var t;return e[r]?U(U({},e),(t={},t[r]=U(U({},e[r]),{isLiveStreaming:!1,layout:void 0}),t)):e})},[]))),W(`live-streaming-error`,F(k(function(e,t,n){var r=fg(n);t(pg,function(e){var t;return U(U({},e),(t={},t[r]=U(U({},e[r]??{instanceId:r,isLiveStreaming:!1}),{errorMsg:n.errorMsg}),t))})},[]))),W(`left-meeting`,F(k(function(e,t){t(pg,{})},[]))),P.createElement(P.Fragment,null,t)},gg=N(`new`);gg.debugLabel=G(`meeting-state`);var _g=N(null);_g.debugLabel=G(`meeting-error`);var vg=N(null);vg.debugLabel=G(`non-fatal-error`);var yg=N({data:void 0,topology:`none`});yg.debugLabel=G(`meeting-session-data`);var bg=function(e){var t=e.children,n=oh(),r=F(k(function(e,t){if(n){var r=n.meetingState();return t(gg,r),r}},[n]));return W(`loading`,r),W(`loaded`,r),W(`joining-meeting`,r),W(`joined-meeting`,r),W(`left-meeting`,r),W(`error`,F(k(function(e,t,n){t(_g,n),r()},[r]))),W(`nonfatal-error`,F(k(function(e,t,n){t(vg,n)},[]))),W(`joined-meeting`,F(k(function(e,t){n&&t(yg,n.meetingSessionState())},[n]))),W(`meeting-session-state-updated`,F(k(function(e,t,n){t(yg,n.meetingSessionState)},[]))),W(`left-meeting`,F(k(function(e,t){t(yg,{data:void 0,topology:`none`})},[]))),W(`call-instance-destroyed`,F(k(function(e,t){t(gg,`new`),t(_g,null),t(vg,null),t(yg,{data:void 0,topology:`none`})},[]))),P.createElement(P.Fragment,null,t)},xg=N(`none`);xg.debugLabel=G(`topology`);var Sg=N(`unknown`),Cg=N([]),wg=N(`interrupted`),Tg=N(100);Tg.debugLabel=G(`network-quality`);var Eg=N(`good`);Eg.debugLabel=G(`network-threshold`);var Dg=function(e){var t=e.children,n=oh(),r=ho(xg),i=F(k(function(e,t){return eh(void 0,void 0,void 0,function(){var e;return th(this,function(r){switch(r.label){case 0:return n?[4,n.getNetworkTopology()]:[2];case 1:return e=r.sent(),!e||e?.topology===`none`||t(xg,e.topology),[2]}})})},[n]));return W(`joined-meeting`,i),W(`network-connection`,F(k(function(e,t,n){switch(t(wg,n.event),n.event){case`connected`:n.type===`peer-to-peer`&&t(xg,`peer`),n.type===`sfu`&&t(xg,`sfu`);break}},[]))),W(`network-quality-change`,F(k(function(e,t,n){t(Sg,function(e){return e===n.networkState?e:n.networkState}),t(Cg,function(e){var t=n.networkStateReasons??[];return ph(e,t)?e:t}),t(Tg,function(e){return e===n.quality?e:n.quality}),t(Eg,function(e){return e===n.threshold?e:n.threshold})},[]))),W(`left-meeting`,F(k(function(e,t){t(xg,`none`),t(Sg,`unknown`),t(Cg,[]),t(wg,`interrupted`),t(Tg,100),t(Eg,`good`)},[]))),E(function(){!n||r!==`none`||i()},[n,i,r]),P.createElement(P.Fragment,null,t)};function Og(e){return e.instanceId?e.instanceId:e.type===`local`||e.local?`__local__`:`__default__`}var kg=N({});kg.debugLabel=G(`recording-instances`);var Ag=N(function(e){var t=e(kg),n=Object.values(t),r=n.filter(function(e){return e.isRecording}),i=r[0]??n[n.length-1];return{error:n.some(function(e){return e.error}),isLocalParticipantRecorded:n.some(function(e){return e.isLocalParticipantRecorded}),isRecording:r.length>0,layout:i?.layout,local:i?.local,recordingId:i?.recordingId,recordingStartedDate:i?.recordingStartedDate,startedBy:i?.startedBy,type:i?.type}});Ag.debugLabel=G(`recording-state`);var jg=function(e){var t=e.children,n=Uh(),r=Xh({filter:`record`}),i=F(k(function(e,t,n,r){var i=e(kg).__local__,a={instanceId:`__local__`,isLocalParticipantRecorded:n,isRecording:n,local:n?r:i?.local,type:n?`local`:i?.type};i&&fh(i,a)||!n&&!i||(n?t(kg,function(e){return U(U({},e),{__local__:a})}):i&&t(kg,function(e){return U(U({},e),{__local__:U(U({},i),{isLocalParticipantRecorded:!1,isRecording:!1})})}))},[]));return E(function(){i(r.length>0,r.includes(n||`local`))},[n,i,r]),W(`recording-started`,F(k(function(e,t,r){var i=Og(r),a=!0;switch(r.type){case`cloud-audio-only`:case`cloud-beta`:case`cloud`:n&&r.layout?.preset===`single-participant`&&r.layout.session_id!==n&&(a=!1);break}t(kg,function(e){var t;return U(U({},e),(t={},t[i]={error:!1,instanceId:i,isLocalParticipantRecorded:a,isRecording:!0,layout:r?.layout,local:r?.local,recordingId:r?.recordingId,recordingStartedDate:new Date,startedBy:r?.startedBy,type:r?.type},t))})},[n]))),W(`recording-stopped`,F(k(function(e,t,n){var r=Og(n);t(kg,function(e){var t;return e[r]?U(U({},e),(t={},t[r]=U(U({},e[r]),{isLocalParticipantRecorded:!1,isRecording:!1}),t)):e})},[]))),W(`recording-error`,F(k(function(e,t,n){var r=Og(n);t(kg,function(e){var t,i=e[r];return U(U({},e),(t={},t[r]=U(U({},i??{instanceId:r}),{error:!0,errorMsg:n.errorMsg,isLocalParticipantRecorded:!1,isRecording:!1}),t))})},[]))),W(`left-meeting`,F(k(function(e,t){t(kg,{})},[]))),P.createElement(P.Fragment,null,t)},Mg=function(){var e=ho(gg);return mt(e),e},Ng=N(null);Ng.debugLabel=G(`room-state`);var Pg=function(e){var t=e.children,n=oh(),r=Mg();return W(`access-state-updated`,F(k(function(e,t){return eh(void 0,void 0,void 0,function(){var e;return th(this,function(i){switch(i.label){case 0:return!n||r===`left-meeting`?[2]:[4,n.room()];case 1:return e=i.sent(),e&&`id`in e&&t(Ng,e),[2,e]}})})},[n,r]))),W(`left-meeting`,F(k(function(e,t){return function(){t(Ng,null)}},[]))),P.createElement(P.Fragment,null,t)},Fg=N({isTranscribing:!1,model:`general`,language:`en`,transcriptions:[]});Fg.debugLabel=G(`transcription-state`);var Ig=function(e){var t=e.children;return W(`transcription-started`,F(k(function(e,t,n){t(Fg,{error:!1,transcriptionStartDate:new Date,isTranscribing:!0,transcriptions:[],endpointing:n.endpointing,extra:n.extra,includeRawResponse:n.includeRawResponse,instanceId:n.instanceId,language:n.language,model:n.model,profanity_filter:n.profanity_filter,punctuate:n.punctuate,redact:n.redact,startedBy:n.startedBy,tier:n.tier})},[]))),W(`transcription-stopped`,F(k(function(e,t,n){t(Fg,function(e){return U(U({},e),{updatedBy:n.updatedBy,isTranscribing:!1})})},[]))),W(`transcription-error`,F(k(function(e,t){t(Fg,function(e){return U(U({},e),{error:!0,isTranscribing:!1})})},[]))),W(`left-meeting`,F(k(function(e,t){t(Fg,function(e){return U(U({},e),{isTranscribing:!1})})},[]))),W(`app-message`,F(k(function(e,t,n){n?.fromId===`transcription`&&t(Fg,function(e){return U(U({},e),{isTranscribing:!0,transcriptions:ih(ih([],rh(e.transcriptions),!1),[n.data],!1)})})},[]))),P.createElement(P.Fragment,null,t)},Lg=`0.25.2`,Rg={strictMode:!0},zg=function(){return!0},Bg={options:Rg,shouldCreateInstance:zg},Vg=function(e,t){var n=t===void 0?Bg:t,r=n.parentElRef,i=n.options,a=i===void 0?Rg:i,o=n.shouldCreateInstance,s=o===void 0?zg:o,c=rh(T(null),2),l=c[0],u=c[1],d=D();return E(function(){if(e===`callFrame`&&r?.current===null||!s())return;function t(e){return eh(this,void 0,void 0,function(){return th(this,function(t){switch(t.label){case 0:return[4,e.destroy()];case 1:return t.sent(),[2]}})})}var n=function(){setTimeout(function(){return u(null)},0)},i=wm.getCallInstance();if(!l&&i&&!i.isDestroyed()){i.once(`call-instance-destroyed`,n),u(i);return}if(l){fh(d.current,a)||t(l);return}if(!i||i.isDestroyed())try{var o=U(U({},a),{aboutClient:U(U({},a.aboutClient??{}),{"daily-react":Lg})});switch(e){case`callFrame`:i=r?.current?wm.createFrame(r.current,o):wm.createFrame(o);break;case`callObject`:i=wm.createCallObject(o);break}d.current=a,u(i),i.once(`call-instance-destroyed`,n)}catch(e){if(console.error(`Error creating call instance:`,e),a.strictMode)throw e}},[l,a,r,s,e]),l},Hg=function(e){return Vg(`callObject`,e)},Ug=function(e){var t=e.children,n=e.jotaiStore,r=$m(e,[`children`,`jotaiStore`]),i=D({}),a=k(function(e){var t,n;if(`action`in e){var r=e.action,a=Array.from(i.current?.[r]??[]),o=a.filter(function(e){return rh(e,1)[0]<0}),s=a.filter(function(e){return rh(e,1)[0]>0}),c=ih(ih([],rh(o),!1),rh(s),!1);try{for(var l=nh(c),u=l.next();!u.done;u=l.next()){var d=rh(u.value,2)[1];d(e)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}}},[]),o=k(function(e){e&&Object.keys(i.current).forEach(function(t){e.off(t,a),e.isDestroyed()||e.on(t,a)})},[a]),s=`callObject`in r?r.callObject:null,c=Hg({options:O(function(){return`callObject`in r?{}:r},[r]),shouldCreateInstance:k(function(){return!(`callObject`in r)},[r])}),l=s??c;E(function(){l&&o(l)},[l,o]);var u=k(function(e,t,n){var r;i.current[e]||(i.current[e]=new Map,l&&(l.off(e,a),l.isDestroyed()||l.on(e,a))),i.current[e]?.has(n)||(r=i.current[e])==null||r.set(n,t)},[l,a]),d=k(function(e,t){var n;(n=i.current[e])==null||n.delete(t),i.current[e]?.size===0&&(l?.off(e,a),delete i.current[e])},[l,a]);return P.createElement(co,{store:n},P.createElement(ah.Provider,{value:l},P.createElement(sh.Provider,{value:{on:u,off:d}},P.createElement(Pg,null,P.createElement(bg,null,P.createElement(Dg,null,P.createElement(Hh,null,P.createElement(jg,null,P.createElement(hg,null,P.createElement(Ig,null,P.createElement(dg,null,t)))))))))))},Wg=function(e){var t=(e===void 0?{}:e).onAppMessage,n=oh(),r=k(function(e,t){t===void 0&&(t=`*`),n&&n.sendAppMessage(e,t)},[n]);return W(`app-message`,k(function(e){t?.(e,r)},[t,r])),r},Gg=function(e,t,n,r){var i=oh(),a=e===Uh();W(`local-audio-level`,k(function(e){a&&t(e.audioLevel)},[t,a])),W(`remote-participants-audio-level`,k(function(n){a||t(n.participantsAudioLevel[e])},[t,e,a])),E(function(){if(!(!i||i.isDestroyed()||!a)&&!i.isLocalAudioLevelObserverRunning())try{i.startLocalAudioLevelObserver(r)}catch{n?.(`Local audio level observer not supported in this browser`)}},[i,n,r,a]),E(function(){!i||i.isDestroyed()||a||i.isRemoteParticipantsAudioLevelObserverRunning()||i.startRemoteParticipantsAudioLevelObserver(r)},[i,r,a])},Kg=function(e){return $h(e,`audio`)},qg,Jg;function Yg(){return Jg?qg:(Jg=1,qg=function e(t,n){if(t===n)return!0;if(t&&n&&Qm(t)==`object`&&Qm(n)==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n},qg)}Yg();var Xg=N({state:`low`,reason:`none`});Xg.debugLabel=G(`cpu-load`);var Zg=function(){var e=oh(),t=ho(ag),n=ho(og),r=ho(sg),i=ho(cg),a=ho(lg),o=ho(ug),s=pt(ig).refreshDevices,c=k(function(t){return eh(void 0,void 0,void 0,function(){return th(this,function(n){switch(n.label){case 0:return[4,e?.setInputDevicesAsync({audioDeviceId:null,videoDeviceId:t})];case 1:return n.sent(),[2]}})})},[e]),l=k(function(t){return eh(void 0,void 0,void 0,function(){return th(this,function(n){switch(n.label){case 0:return[4,e?.setInputDevicesAsync({audioDeviceId:t,videoDeviceId:null})];case 1:return n.sent(),[2]}})})},[e]),u=k(function(t){return eh(void 0,void 0,void 0,function(){return th(this,function(n){switch(n.label){case 0:return[4,e?.setOutputDeviceAsync({outputDeviceId:t})];case 1:return n.sent(),[2]}})})},[e]),d=[`blocked`,`in-use`,`not-found`,`constraints-invalid`,`constraints-none-specified`,`undefined-mediadevices`,`unknown`],f={cameraError:o,cameras:r,camState:t,currentCam:r.find(function(e){return e.selected}),currentMic:i.find(function(e){return e.selected}),currentSpeaker:a.find(function(e){return e.selected}),hasCamError:d.includes(t),hasMicError:d.includes(n),microphones:i,micState:n,refreshDevices:s,setCamera:c,setMicrophone:l,setSpeaker:u,speakers:a};return mt(f),f},Qg=N(null);Qg.debugLabel=G(`input-settings`);var $g=N({hidden:0,present:0});$g.debugLabel=G(`participant-counts`);var e_=ca(function(e){var t=N({},function(t,n,r){n(e_(e),r)});return t.debugLabel=G(`participant-receive-settings-${e}`),t}),t_=function(e){return $h(e,`screenVideo`)},n_=N(null);n_.debugLabel=G(`send-settings`);var r_=function(e){return $h(e,`video`)};function i_({children:e}){return A(Ug,{children:e})}var a_=Ie(null),o_=`tavus:memory-user-id:`,s_=new Map;function c_(e){return`${o_}${e}`}function l_(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function u_(e){if(!e)return``;let t=c_(e);try{let e=window.localStorage.getItem(t);if(e)return e;let n=l_();return window.localStorage.setItem(t,n),n}catch{}let n=s_.get(t);if(n)return n;let r=l_();return s_.set(t,r),r}var d_=`tavus:terms-accepted:`;function f_(e){let t=5381;for(let n=0;n<e.length;n++)t=(t*33^e.charCodeAt(n))>>>0;return t.toString(36)}function p_(e,t){return`${d_}${e}:${f_(t)}`}function m_(e,t){if(!e||!t)return!1;try{return globalThis.localStorage?.getItem(p_(e,t))===`1`}catch{return!1}}function h_(e,t){if(!(!e||!t))try{globalThis.localStorage?.setItem(p_(e,t),`1`)}catch{}}var g_=null;function __(e,t){!e||!t||(g_={deploymentId:e,content:t})}function v_(){g_&&=(h_(g_.deploymentId,g_.content),null)}function y_(e){return e===`replica`||e===`user`?e:null}function b_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function x_(e){if(!b_(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!b_(e.properties))return null;if(e.event_type===`conversation.utterance`){let t=e.properties;return typeof t.speech==`string`?{kind:`chat-message`,sender:t.role===`replica`?`agent`:`user`,text:t.speech}:null}if(e.event_type===`conversation.utterance.streaming`){let t=e.properties;if(typeof t.speech!=`string`)return null;let n=t.final===!0||t.is_interrupted===!0;return{kind:`caption-update`,text:t.speech,final:n,role:y_(t.role)}}return null}function S_(e,t){return{message_type:`conversation`,event_type:`conversation.respond`,conversation_id:e,properties:{text:t}}}function C_(e,t){return typeof e[t]==`number`?{[t]:e[t]}:{}}function w_(e){let t=e.role===`user`||e.role===`replica`?e.role:null;return!t||typeof e.speech!=`string`?null:{kind:`utterance`,event_type:`conversation.utterance`,properties:{role:t,speech:e.speech,...C_(e,`seq`),...C_(e,`turn_idx`)}}}function T_(e){let t=e.role===`user`||e.role===`replica`?e.role:null;return!t||typeof e.speech!=`string`?null:{kind:`utterance.streaming`,event_type:`conversation.utterance.streaming`,properties:{role:t,speech:e.speech,...typeof e.final==`boolean`?{final:e.final}:{},...typeof e.is_interrupted==`boolean`?{is_interrupted:e.is_interrupted}:{},...C_(e,`seq`)}}}function E_(e){return typeof e.name!=`string`||typeof e.arguments!=`string`?null:{kind:`tool_call`,event_type:`conversation.tool_call`,properties:{name:e.name,arguments:e.arguments,...C_(e,`seq`),...C_(e,`turn_idx`)}}}function D_(e){if(typeof e.name!=`string`||typeof e.arguments!=`string`)return null;let t=e.modality===`vision`||e.modality===`audio`?e.modality:null;return t?{kind:`perception_tool_call`,event_type:`conversation.perception_tool_call`,properties:{name:e.name,arguments:e.arguments,modality:t}}:null}function O_(e){return{kind:`perception_analysis`,event_type:`conversation.perception_analysis`,properties:e}}function k_(e,t){return{kind:`speaking`,event_type:t,properties:{...C_(e,`seq`),...C_(e,`turn_idx`)}}}var A_={"conversation.utterance":w_,"conversation.utterance.streaming":T_,"conversation.tool_call":E_,"conversation.perception_tool_call":D_,"conversation.perception_analysis":O_,"conversation.replica_started_speaking":k_,"conversation.replica_stopped_speaking":k_,"conversation.user_started_speaking":k_,"conversation.user_stopped_speaking":k_};function j_(e){if(!b_(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!b_(e.properties))return null;let t=A_[e.event_type];return t?t(e.properties,e.event_type):{kind:`unknown`,event_type:e.event_type,properties:e.properties}}function M_(e,t){return{message_type:`conversation`,event_type:t.event_type,conversation_id:e,properties:t.properties??{}}}function N_(e,t){let n=x_(e);return n?n.kind===`chat-message`?(t.appendChatMessage(n.sender,n.text),!0):(t.setCaption(n.text,n.final,n.role),!0):!1}function P_(e=5e3){let t=[],n=n=>{for(;t.length>0&&n-t[0].ts>e;)t.shift()};return{markSent(e){t.push({text:e,ts:Date.now()})},consumeMatch(e){n(Date.now());let r=t.findIndex(t=>t.text===e);return r===-1?!1:(t.splice(r,1),!0)}}}var F_=yn(`Conversation`),I_=1500,L_=Ie(null);function R_({children:e}){return A(i_,{children:A(G_,{children:e})})}function z_(e,t,n){let{role:r,speech:i}=e.properties;if(!(r===`user`&&n.consumeMatch(i)))for(let n of t)n.onUtterance?.({...e.properties})}function B_(e,t){for(let n of t)n.onToolCall?.({...e.properties})}function V_(e,t){for(let n of t)n.onPerception?.(e)}function H_(e,t){let n=e.event_type,r=n.startsWith(`conversation.replica`)?`replica`:`user`,i=n.endsWith(`started_speaking`)?`started`:`stopped`;for(let n of t)n.onSpeakingState?.({who:r,state:i,...e.properties})}function U_(e,t){for(let n of t)n.onMessage?.(e)}function W_(e,t,n){switch(e.kind){case`utterance`:case`utterance.streaming`:z_(e,t,n);return;case`tool_call`:B_(e,t);return;case`perception_tool_call`:case`perception_analysis`:V_(e,t);return;case`speaking`:H_(e,t);return;case`unknown`:U_(e,t);return}}function G_({children:e}){let{deploymentId:t,client:n,config:r}=pt(bi),{memoryStores:i}=pt(wt),a=oh(),o=Mg(),s=pt(a_),c=O(()=>Wt(`idle`),[]),l=O(()=>Wt(null),[]),u=O(()=>Wt([]),[]),d=O(()=>Wt(``),[]),f=O(()=>Wt(null),[]),p=O(()=>Wt(null),[]),m=O(()=>Wt(null),[]),h=O(()=>Wt(null),[]),g=D(null),_=O(()=>P_(),[]),v=O(()=>new Set,[]),y=O(()=>Wt(`idle`),[]),b=s?.flowSignal??y,x=k(e=>{m.value=e},[m]),S=k(e=>{h.value=e},[h]),[,C]=T(o);E(()=>{C(o),o===`joined-meeting`?(c.value=`connected`,F_.info(`Connected to meeting`)):o===`left-meeting`?(c.value=`ended`,v_(),F_.info(`Left meeting`)):o===`error`&&(p.value=`Meeting error`,c.value=`error`)},[o,c,p]),vn(()=>{let e=c.value;if(e===`connected`)for(let e of v)e.onConnect?.();else if(e===`ended`||e===`disconnecting`)for(let e of v)e.onDisconnect?.();else if(e===`error`){let e=p.peek()??`Unknown error`;for(let t of v)t.onError?.({code:`CONVERSATION_ERROR`,message:e})}}),vn(()=>{let e=b.value;for(let t of v)t.onModeChange?.(e)}),Wg({onAppMessage:k(e=>{N_(e?.data,{appendChatMessage(e,t){e===`user`&&_.consumeMatch(t)||(u.value=[...u.peek(),{id:crypto.randomUUID(),sender:e,text:t,timestamp:Date.now()}])},setCaption(e,t,n){d.value=e,f.value=n,g.current!==null&&(clearTimeout(g.current),g.current=null),t&&(g.current=setTimeout(()=>{d.value=``,f.value=null,g.current=null},I_))}});let t=j_(e?.data);t&&W_(t,v,_)},[u,d,f,_,v])}),E(()=>()=>{g.current!==null&&(clearTimeout(g.current),g.current=null)},[]);let w=k(async(e,o)=>{try{c.value=`connecting`,p.value=null;let s=e,u=m.peek();u&&s?.password==null&&(s={...s,password:u});let d=r.value.customization.conversation.unique_memory_tag===!0;if(!s?.memory_stores){let e=i??(d?[u_(t)]:[]);e.length&&(s={...s,memory_stores:e})}let f=h.peek();h.value=null,f&&s?.captcha_token==null&&(s={...s,captcha_token:f});let g=await wn(n,t,s,o);l.value={conversationId:g.conversation_id,conversationName:g.conversation_name,conversationUrl:g.conversation_url,callbackUrl:g.callback_url,createdAt:g.created_at},await a?.join({url:g.conversation_url})}catch(e){throw e instanceof Sn&&(e.status===401||e.status===403)&&r.value.has_password===!0&&(m.value=null),F_.error(`Start failed`,e),p.value=String(e),c.value=`error`,e}},[n,t,a,c,p,l,m,h,r,i]),ee=k(async()=>{let e=l.peek();c.value=`disconnecting`,e&&await Tn(n,t,e.conversationId).catch(e=>F_.error(`End conversation API failed`,e)),await a?.leave(),c.value=`ended`},[n,t,a,c,l]),te=k(e=>{if(!a)return;let t=l.peek();if(!t){F_.warn(`sendChat called before session was established; dropping message`);return}_.markSent(e),a.sendAppMessage(S_(t.conversationId,e),`*`),u.value=[...u.peek(),{id:crypto.randomUUID(),sender:`user`,text:e,timestamp:Date.now()}]},[a,u,l,_]),ne=k(e=>{if(!a){F_.warn(`sendMessage called before Daily was ready; dropping message`);return}let t=l.peek();if(!t){F_.warn(`sendMessage called before session was established; dropping message`);return}e.event_type===`conversation.respond`&&_.markSent(e.properties.text),a.sendAppMessage(M_(t.conversationId,e),`*`)},[a,l,_]),re=k(e=>{v.add(e)},[v]),ie=k(e=>{v.delete(e)},[v]),ae=O(()=>({state:c,session:l,chatMessages:u,captionText:d,captionRole:f,error:p,password:m,setPassword:x,captchaToken:h,setCaptchaToken:S,mode:b,start:w,end:ee,sendChat:te,sendMessage:ne,conversation:{start:w,end:ee,sendMessage:ne},__registerSubscriber:re,__unregisterSubscriber:ie}),[c,l,u,d,f,p,m,x,h,S,b,w,ee,te,ne,re,ie]);return A(L_.Provider,{value:ae,children:e})}function K_(){let e=pt(bi);if(!e)throw Error(`useConfig must be used within ConfigProvider`);return e}var q_=new Set([`network`,`server`,`unavailable`,`busy`,`rate_limited`]);function J_(e){return e===401||e===403?`forbidden`:e===402?`limit_exceeded`:e===423?`busy`:e===429?`rate_limited`:e===409?`concurrency`:e===503?`unavailable`:e>=500?`server`:`unknown`}function Y_(e){if(!e)return;let t=e.get(`Retry-After`);if(!t)return;let n=Number.parseInt(t,10);if(!Number.isNaN(n)&&n>=0)return n;let r=Date.parse(t);if(!Number.isNaN(r)){let e=Math.floor((r-Date.now())/1e3);return e>0?e:0}}function X_(e){if(e instanceof Sn){let t=J_(e.status);return{kind:t,status:e.status,raw:e.body,retryable:q_.has(t),retryAfterSec:Y_(e.headers)}}return e instanceof TypeError?{kind:`network`,raw:String(e),retryable:!0}:{kind:`unknown`,raw:String(e),retryable:!1}}function Z_(e){return e===`limit_exceeded`?`daily_limit`:e===`forbidden`||e===`concurrency`?null:`busy`}var Q_=`tavus_pudl_`,$_=3600*48,ev=new Map;function tv(){let e=new Date;return`${e.getUTCFullYear()}${String(e.getUTCMonth()+1).padStart(2,`0`)}${String(e.getUTCDate()).padStart(2,`0`)}`}function nv(e){return`${Q_}${e}`}function rv(e){try{let t=`${nv(e)}=`,n=document.cookie.split(`; `).find(e=>e.startsWith(t));if(!n)return 0;let[r,i]=decodeURIComponent(n.slice(t.length)).split(`.`);if(r!==tv())return 0;let a=Number.parseInt(i,10);return Number.isFinite(a)&&a>0?a:0}catch{return 0}}function iv(e,t){try{let n=encodeURIComponent(`${tv()}.${t}`);document.cookie=`${nv(e)}=${n}; max-age=${$_}; path=/; SameSite=Lax`}catch{return}}function av(e){let t=ev.get(e);return t||(t=Wt(e?rv(e):0),ev.set(e,t)),t}function ov(e){if(!e)return;iv(e,rv(e)+1);let t=rv(e),n=ev.get(e);n?n.value=t:ev.set(e,Wt(t))}var sv=new Set([`Captcha token required`,`Captcha verification failed`]);function cv(e){if(!(e instanceof Sn)||e.status!==403)return!1;try{let t=JSON.parse(e.body.trim());return typeof t.error==`string`&&sv.has(t.error)}catch{return!1}}function lv(e,t){let n=e!==null,r=(t?.captchaToken.peek()??null)!==null,[i,a]=T(!n||r),[o,s]=T(0);E(()=>{n||a(!0)},[n]);let c=k(e=>{t?.setCaptchaToken(e),a(!0)},[t]),l=k(()=>{a(!0)},[]),u=t?.captchaToken.value??null,d=D(null);return E(()=>{let e=d.current!==null;d.current=u,n&&u===null&&(a(!1),e&&s(e=>e+1))},[n,u]),{captchaReady:i,captchaEpoch:o,handleCaptchaToken:c,handleCaptchaFallback:l}}function uv({children:e}){let{config:t}=K_(),{start:n}=pt(L_),r=t.value.deployment_id??``,i=av(r),a=k(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;return n==null||e.channel!==`widget`&&e.channel!==`embed`?null:n},[t]),[o,s]=T(`idle`),[c,l]=T(!1),[u,d]=T(null),[f,p]=T(!1),m=O(()=>Wt(`idle`),[]);E(()=>{m.value=o},[o,m]),vn(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;n!=null&&(e.channel!==`widget`&&e.channel!==`embed`||m.value===`idle`&&i.value>=n&&(d(`daily_limit`),p(!1),s(`unavailable`)))});let h=t.value.customization.show_haircheck,g=t.value.customization.conversation.modality,_=h&&g!==`chat`,v=D(!1),y=D(!1),b=k(async()=>{l(!0);try{await n(),v.current=!1,a()!=null&&ov(r),s(`call`)}catch(e){let n=X_(e);if(cv(e)&&!v.current){v.current=!0,l(!1),s(`idle`);return}if(v.current=!1,n.kind===`forbidden`&&t.value.has_password===!0){s(`idle`);return}d(Z_(n.kind)??`busy`),p(n.retryable),s(`unavailable`)}finally{l(!1)}},[n,t,a,r]),x=k(async()=>{if(o!==`idle`&&o!==`unavailable`)return;let e=a();if(e!=null&&i.value>=e){d(`daily_limit`),p(!1),s(`unavailable`);return}if(d(null),p(!1),_&&!y.current){s(`haircheck`);return}return b()},[o,_,b,a,i]),S=k(async()=>{o===`haircheck`&&(y.current=!0,await b())},[o,b]),C=k(()=>{o===`haircheck`&&s(`idle`)},[o]),w=k(()=>{o===`call`&&s(`ended`)},[o]),ee=k(()=>{d(null),p(!1),s(`idle`)},[]),te=O(()=>({flowSignal:m,setFlowState:s,isStarting:c,unavailableCause:u,canRetry:f,start:x,join:S,cancel:C,leave:w,restart:ee}),[m,c,u,f,x,S,C,w,ee]);return A(a_.Provider,{value:te,children:e})}var dv=yn(`HostBridge`),fv=Ie(null);function pv(e){if(!e)return null;let t=e.getRootNode();return t instanceof ShadowRoot&&t.host instanceof HTMLElement?t.host:e.parentElement}function mv({children:e}){let t=pt(L_),n=pt(a_),r=dn(null),i=k(e=>{r.value=pv(e)},[r]),a=k((e,t)=>{let n=r.peek();n&&n.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0})),dv.info(`Event:`,e,t)},[r]);E(()=>{let e=r.value;if(e)return e.tavus={start:t.start,end:t.end,sendChat:t.sendChat,sendMessage:t.sendMessage},()=>{delete e.tavus}},[r.value,t]),E(()=>t.state.subscribe(e=>{switch(e){case`connected`:a(`tavus:conversation-started`,{conversationId:t.session.peek()?.conversationId??``}),a(`tavus:state-change`,{state:e});break;case`ended`:a(`tavus:conversation-ended`,{conversationId:t.session.peek()?.conversationId??``}),a(`tavus:state-change`,{state:e});break;case`error`:a(`tavus:error`,{code:`CONVERSATION_ERROR`,message:t.error.peek()??`Unknown error`}),a(`tavus:state-change`,{state:e});break;default:a(`tavus:state-change`,{state:e})}}),[t,a]),vn(()=>{if(!n)return;let e=n.flowSignal.value;a(`tavus:mode-change`,{mode:e})}),E(()=>{let e={onUtterance(e){a(`tavus:protocol-message`,{kind:`utterance`,event_type:`conversation.utterance`,properties:e})},onToolCall(e){a(`tavus:tool-call`,e),a(`tavus:protocol-message`,{kind:`tool_call`,event_type:`conversation.tool_call`,properties:e})},onPerception(e){a(`tavus:protocol-message`,e)},onSpeakingState({who:e,state:t,seq:n,turn_idx:r}){let i={state:t,...n===void 0?{}:{seq:n},...r===void 0?{}:{turn_idx:r}};a(`tavus:protocol-message`,{kind:`speaking`,event_type:e===`replica`?t===`started`?`conversation.replica_started_speaking`:`conversation.replica_stopped_speaking`:t===`started`?`conversation.user_started_speaking`:`conversation.user_stopped_speaking`,properties:i})},onMessage(e){a(`tavus:protocol-message`,e)}};return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[t,a]);let o=O(()=>({shadowHost:r,dispatchEvent:a}),[r,a]);return A(fv.Provider,{value:o,children:[A(`div`,{ref:i,style:`display:contents`}),e]})}var hv=Ie(null);function gv({children:e}){let{config:t}=pt(bi),n=O(()=>Yt(()=>{let e=t.value.customization.style;return e.mode===`dark`||e.mode===`system`&&(globalThis.matchMedia?.(`(prefers-color-scheme: dark)`).matches??!1)}),[t]),r=O(()=>Yt(()=>{let e=t.value.customization.style;return e.style===`basic`?n.value?`white-black`:`black-white`:n.value?`${e.style}-dark`:e.style}),[t,n]),i=O(()=>Yt(()=>bv(t.value.customization.style)),[t]),a=O(()=>({dataTheme:r,isDark:n,cssVars:i}),[r,n,i]);return A(hv.Provider,{value:a,children:A(`div`,{"data-theme":r.value,style:xv(i.value),class:`contents`,children:e})})}var _v=[0,.125,.25,.5,.75],vv=[0,1,2,3,4],yv=[0,.2,.25,.3];function bv(e){return{"--radius-box":`${_v[e.boxes_radius]??.5}rem`,"--radius-field":`${_v[e.field_radius]??.25}rem`,"--radius-selector":`${_v[e.selectors_radius]??.5}rem`,"--border":`${vv[e.border_width]??1}px`,"--size-field":`${yv[e.fields_size]??.25}rem`,"--size-selector":`${yv[e.selectors_size]??.25}rem`,"--depth":e.depth_effect?`1`:`0`,"--noise":e.noise_effect?`1`:`0`}}function xv(e){return Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `)}Ie(null);var Sv=41/2,Cv=23/2,wv=Math.hypot(Sv,Cv);Array.from({length:1008},(e,t)=>{let n=t%42,r=Math.floor(t/42),i=Math.hypot(n-Sv,r-Cv)/wv*.82,a=.34+(n*13+r*7)%34/100;return{delay:`${i.toFixed(3)}s`,opacity:a.toFixed(2)}});var Tv=Ie(null);function Ev({children:e}){let t=D(null);return A(Tv.Provider,{value:{frameRef:t},children:A(`div`,{class:`@container/conversation w-full h-full`,children:A(`div`,{ref:t,class:`relative w-full h-full max-h-screen aspect-video @max-mobile:aspect-9/16 overflow-hidden rounded-box bg-base-100`,children:e})})})}var Dv=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Ov=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),kv=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Av=e=>{let t=kv(e);return t.charAt(0).toUpperCase()+t.slice(1)},jv={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},Mv=Ie({size:24,color:`currentColor`,strokeWidth:2,absoluteStrokeWidth:!1,class:``}),Nv=()=>pt(Mv),Pv=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Fv=({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,children:i,iconNode:a,class:o=``,...s})=>{let{size:c=24,strokeWidth:l=2,absoluteStrokeWidth:u=!1,color:d=`currentColor`,class:f=``}=Nv()??{},p=r??u?Number(n??l)*24/Number(t??c):n??l;return se(`svg`,{...jv,width:t??c??24,height:t??c??24,stroke:e??d,"stroke-width":p,class:Dv(`lucide`,f,o),...!i&&!Pv(s)&&{"aria-hidden":`true`},...s},[...a.map(([e,t])=>se(e,t)),...be(i)])},Iv=(e,t)=>{let n=({class:n=``,className:r=``,children:i,...a})=>se(Fv,{...a,iconNode:t,class:Dv(`lucide-${Ov(Av(e))}`,`lucide-${Ov(e)}`,n,r)},i);return n.displayName=Av(e),n},Lv=Iv(`camera-off`,[[`path`,{d:`M14.564 14.558a3 3 0 1 1-4.122-4.121`,key:`1rnrzw`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M20 20H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 .819-.175`,key:`1x3arw`}],[`path`,{d:`M9.695 4.024A2 2 0 0 1 10.004 4h3.993a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v7.344`,key:`1i84u0`}]]),Rv=Iv(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),zv=Iv(`captions`,[[`rect`,{width:`18`,height:`14`,x:`3`,y:`5`,rx:`2`,ry:`2`,key:`12ruh7`}],[`path`,{d:`M7 15h4M15 15h2M7 11h2M13 11h4`,key:`1ueiar`}]]),Bv=Iv(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),Vv=Iv(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),Hv=Iv(`expand`,[[`path`,{d:`m15 15 6 6`,key:`1s409w`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}],[`path`,{d:`M21 16v5h-5`,key:`1ck2sf`}],[`path`,{d:`M21 8V3h-5`,key:`1qoq8a`}],[`path`,{d:`M3 16v5h5`,key:`1t08am`}],[`path`,{d:`m3 21 6-6`,key:`wwnumi`}],[`path`,{d:`M3 8V3h5`,key:`1ln10m`}],[`path`,{d:`M9 9 3 3`,key:`v551iv`}]]),Uv=Iv(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Wv=Iv(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),Gv=Iv(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),Kv=Iv(`mic-off`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M15 9.34V5a3 3 0 0 0-5.68-1.33`,key:`1gzdoj`}],[`path`,{d:`M16.95 16.95A7 7 0 0 1 5 12v-2`,key:`cqa7eg`}],[`path`,{d:`M18.89 13.23A7 7 0 0 0 19 12v-2`,key:`16hl24`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v3a3 3 0 0 0 5.12 2.12`,key:`r2i35w`}]]),qv=Iv(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),Jv=Iv(`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`}]]),Yv=Iv(`monitor-up`,[[`path`,{d:`m9 10 3-3 3 3`,key:`11gsxs`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}]]),Xv=Iv(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Zv=Iv(`phone-off`,[[`path`,{d:`M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272`,key:`1wngk7`}],[`path`,{d:`M22 2 2 22`,key:`y4kqgn`}],[`path`,{d:`M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473`,key:`10hv5p`}]]),Qv=Iv(`picture-in-picture-2`,[[`path`,{d:`M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4`,key:`daa4of`}],[`rect`,{width:`10`,height:`7`,x:`12`,y:`13`,rx:`2`,key:`1nb8gs`}]]),$v=Iv(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),ey=Iv(`shrink`,[[`path`,{d:`m15 15 6 6m-6-6v4.8m0-4.8h4.8`,key:`17vawe`}],[`path`,{d:`M9 19.8V15m0 0H4.2M9 15l-6 6`,key:`chjx8e`}],[`path`,{d:`M15 4.2V9m0 0h4.8M15 9l6-6`,key:`lav6yq`}],[`path`,{d:`M9 4.2V9m0 0H4.2M9 9 3 3`,key:`1pxi2q`}]]),ty=Iv(`smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),ny=Iv(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ry=Iv(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),iy=Iv(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),ay=Iv(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function oy(e,t){return({size:n=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i})=>A(`span`,{class:r,role:`img`,"aria-label":i??t,children:A(e,{size:n})})}var sy={close:oy(ay,`Close`),leave:oy(Zv,`Leave call`),more:oy(Vv,`More`),error:oy(ny,`Error`),mic:oy(qv,`Microphone`),"mic-off":oy(Kv,`Microphone muted`),cam:oy(Rv,`Camera`),"cam-off":oy(Lv,`Camera off`),"screen-share":oy(Yv,`Screen share`),pip:oy(Qv,`Picture in picture`),user:oy(ry,`User`),"face-smile":oy(ty,`Camera off`),captions:oy(zv,`Closed captions`),chat:oy(Gv,`Chat`),fullscreen:oy(Wv,`Enter fullscreen`),"fullscreen-exit":oy(Jv,`Exit fullscreen`),expand:oy(Hv,`Expand`),collapse:oy(ey,`Collapse`),send:oy($v,`Send`),"external-link":oy(Uv,`External link`),clock:oy(Bv,`Clock`),moon:oy(Xv,`Unavailable`),users:oy(iy,`Busy`)},cy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M16 19H4v-2h12v2ZM4 17H2V7h2v10Zm14-8h2V7h2v10h-2v-2h-2v2h-2V7h2v2Zm-2-2H4V5h12v2Z"/></svg>`,ly=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 21h-2v-2h2v2Zm-6-2H4v-2h10v2Zm4 0h-2v-2h2v2Zm4 0h-2v-2h-2v-2h-2v-2h-2V7h2v2h2V7h2V5h2v14ZM4 17H2V7h2v10Zm12 0h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2H8V9h2v2ZM8 9H6V7h2v2ZM6 7H4V5h2v2Zm8 0h-4V5h4v2ZM4 5H2V3h2v2Z"/></svg>`,uy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M3 4h18v2H3zm0 14h18v2H3zM1 6h2v12H1zm20 0h2v12h-2zM5 10h2v4H5zm8 0h2v4h-2zM7 8h4v2H7zm0 6h4v2H7zm8 0h4v2h-4zm0-6h4v2h-4z"/></svg>`,dy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M22 22h-2v-2h-2v-2h2v-8h2v12Zm-4-4h-8v-2h8v2ZM4 12h2v2H4v2H2V4h2v8Zm6 4H8v-6h2v6Zm10-6H10V8h10v2Zm-4-4h-2V4h2v2Zm-2-2H4V2h10v2Z"/></svg>`,fy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H6v-2h12v2ZM6 20H4v-2h2v2Zm14 0h-2v-2h2v2ZM4 18H2V6h2v12Zm18 0h-2V6h2v12Zm-5-1h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2h-2V6h2v7ZM6 6H4V4h2v2Zm14 0h-2V4h2v2Zm-2-2H6V2h12v2Z"/></svg>`,py=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H6v-2h12v2ZM6 20H4v-2h2v2Zm14 0h-2v-2h2v2ZM4 18H2V6h2v12Zm4 0H6v-2h2v2Zm14 0h-2V6h2v12Zm-12-2H8v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2V8h2v2Zm2-2h-2V6h2v2ZM6 6H4V4h2v2Zm14 0h-2V4h2v2Zm-2-2H6V2h12v2Z"/></svg>`,my=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M7 19h2v-2h2v-2h2v2h2v2h2v2H7v-2Zm13-6H4v-2h16v2Zm-3-8h-2v2h-2v2h-2V7H9V5H7V3h10v2Z"/></svg>`,hy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 22H4v-2h16v2ZM4 20H2V4h2v16Zm18 0h-2V4h2v16Zm-9-2h-2v-2h2v2Zm0-4h-2V6h2v8Zm7-10H4V2h16v2Z"/></svg>`,gy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M15 19h-2v2h-2v-2H9v-2H7v-2h10v2h-2v2Zm5-6H4v-2h16v2Zm-7-8h2v2h2v2H7V7h2V5h2V3h2v2Z"/></svg>`,_y=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M8 22H4v-2h4v2Zm12 0h-4v-2h4v2ZM4 20H2v-4h2v4Zm18 0h-2v-4h2v4Zm-6-3H8v-2h8v2Zm-8-2H6V9h2v6Zm10 0h-2V9h2v6Zm-2-6H8V7h8v2ZM4 8H2V4h2v4Zm18 0h-2V4h2v4ZM8 4H4V2h4v2Zm12 0h-4V2h4v2Z"/></svg>`,vy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H6v-2h12v2ZM6 20H4V4h2v16Zm14 0h-2v-3h2v3ZM16 9h2v2h2v2h-2v2h-2v2h-2v-4H8v-2h6V7h2v2Zm4-2h-2V4h2v3Zm-2-3H6V2h12v2Z"/></svg>`,yy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M13 22h-2v-2H8v-2h8v2h-3v2Zm-5-4H6v-2h2v2Zm10 0h-2v-2h2v2ZM6 16H4v-6h2v6Zm8 0h-4v-2h4v2Zm6 0h-2v-6h2v6Zm-10-2H8V4h2v10Zm6 0h-2V4h2v10ZM14 4h-4V2h4v2Z"/></svg>`,by=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M13 22h-2v-2H8v-2h8v2h-3v2Zm9 0h-2v-2h2v2Zm-2-2h-2v-2h2v2ZM8 18H6v-2h2v2Zm10 0h-2v-2h2v2ZM6 16H4v-6h2v6Zm8-2h2v2h-6v-2h2v-2h2v2Zm-4-4h2v2h-2v2H8V8h2v2Zm10 4h-2v-4h2v4Zm-4-4h-2V4h2v6ZM8 8H6V6h2v2ZM6 6H4V4h2v2ZM4 4H2V2h2v2Zm10 0h-4V2h4v2Z"/></svg>`,xy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H8v-2h10v2ZM8 20H6v-2h2v2Zm12 0h-2v-2h2v2ZM6 18H4v-2h2v2Zm16 0h-2v-4h-2v-2h2v-2h2v8ZM4 16H2V6h2v10Zm14 0h-6v-2h6v2Zm-6-2h-2v-2h2v2Zm-2-2H8V6h2v6ZM6 6H4V4h2v2Zm8-2h-2v2h-2V4H6V2h8v2Z"/></svg>`,Sy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M5 15H3v-2h2v2Zm8 0h-2v-2h2v2Zm8 0h-2v-2h2v2ZM3 13H1v-2h2v2Zm4 0H5v-2h2v2Zm4 0H9v-2h2v2Zm4 0h-2v-2h2v2Zm4 0h-2v-2h2v2Zm4 0h-2v-2h2v2ZM5 11H3V9h2v2Zm8 0h-2V9h2v2Zm8 0h-2V9h2v2Z"/></svg>`,Cy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 20H4v-2h16v2ZM4 18H2V6h2v12Zm18 0h-2V6h2v12ZM18 8v6h-8V8h8Zm2-2H4V4h16v2Zm-4 4h-4v2h4v-2Z"/></svg>`,wy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 18h-7v2h3v2H8v-2h3v-2H4v-2h16v2ZM4 16H2V4h2v12Zm18 0h-2v-6h2v6Zm-6-6h-2V8h2v2Zm2-2h-2V6h2v2Zm4-6v6h-2V6h-2V4h-2V2h6Zm-8 2H4V2h10v2Z"/></svg>`,Ty=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M4 19h4v2H2v-8h2v6Zm8 0H8v-2h4v2Zm4-2h-4v-2h4v2Zm4-2h-4v-2h4v2Zm-10-2H4v-2h6v2Zm12 0h-2v-2h2v2ZM8 5H4v6H2V3h6v2Zm12 6h-4V9h4v2Zm-4-2h-4V7h4v2Zm-4-2H8V5h4v2Z"/></svg>`,Ey=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M6 22H4v-4h2v4Zm14 0h-2v-4h2v4ZM8 18H6v-2h2v2Zm10 0h-2v-2h2v2Zm-2-2H8v-2h8v2Zm-1-4H9v-2h6v2Zm-6-2H7V4h2v6Zm8 0h-2V4h2v6Zm-2-6H9V2h6v2Z"/></svg>`,Dy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M2 22H0v-4h2v4Zm14 0h-2v-4h2v4Zm8 0h-2v-4h2v4ZM4 18H2v-2h2v2Zm10 0h-2v-2h2v2Zm8 0h-2v-2h2v2Zm-10-2H4v-2h8v2Zm8 0h-4v-2h4v2Zm-9-4H5v-2h6v2Zm8 0h-4v-2h4v2ZM5 10H3V4h2v6Zm8 0h-2V4h2v6Zm8 0h-2V4h2v6ZM11 4H5V2h6v2Zm8 0h-4V2h4v2Z"/></svg>`,Oy=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 22H4v-2h16v2ZM4 20H2v-6H0v-2h2V8h2v12Zm18-8h2v2h-2v6h-2V8h2v4Zm-8 6h-4v-2h4v2Zm-4-2H8v-2h2v2Zm6 0h-2v-2h2v2Zm-6-4H8v-2h2v2Zm6 0h-2v-2h2v2Zm-3-6h7v2H4V6h7V4h2v2Zm4-2h-4V2h4v2Z"/></svg>`,ky=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M17 21H5v-2h12v2ZM5 19H3V7h2v12Zm14 0h-2v-6h2v6Zm-8-4H9v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2V9h2v2Zm6 0h-2V7h-2V5h-4V3h8v8Zm-4-2h-2V7h2v2Zm-6-2H5V5h6v2Z"/></svg>`;function Ay(e){return e.replace(/\s(width|height)="\d+"/g,``)}function jy(e,t){let n=Ay(e);return({size:e=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i})=>A(`span`,{class:r,role:`img`,"aria-label":i??t,style:{display:`inline-flex`,width:e,height:e},dangerouslySetInnerHTML:{__html:n.replace(`<svg`,`<svg width="100%" height="100%"`)}})}var My={pixelarticons:{close:jy(py,`Close`),leave:jy(vy,`Leave call`),more:jy(Sy,`More`),error:jy(hy,`Error`),mic:jy(yy,`Microphone`),"mic-off":jy(by,`Microphone muted`),cam:jy(cy,`Camera`),"cam-off":jy(ly,`Camera off`),"screen-share":jy(wy,`Screen share`),pip:jy(Cy,`Picture in picture`),user:jy(Ey,`User`),"face-smile":jy(Oy,`Camera off`),captions:jy(uy,`Closed captions`),chat:jy(dy,`Chat`),fullscreen:jy(_y,`Enter fullscreen`),"fullscreen-exit":jy(my,`Exit fullscreen`),expand:jy(gy,`Expand`),collapse:jy(my,`Collapse`),send:jy(Ty,`Send`),"external-link":jy(ky,`External link`),clock:jy(fy,`Clock`),moon:jy(xy,`Unavailable`),users:jy(Dy,`Busy`)},lucide:sy};function Ny({name:e,...t}){let{config:n}=K_(),r=(My[n.value.customization.style.icon_library]??My.pixelarticons)[e];return A(r,{...t})}var Py=`Ready when you are`,Fy=`Start the conversation`;function Iy(e){return typeof e==`string`&&e.length>0?e:``}function Ly(e){let t=Iy(e.replica_thumbnail_image_url);if(t)return{url:t,kind:`image`};let n=Iy(e.replica_thumbnail_video_url);return n?{url:n,kind:`video`}:null}function Ry(e){let{preview:t}=e.customization,{background:n}=t,r=Ly(e),i;i=n.type?n.type:r?`replica`:`background-gradient`;let a=Iy(n.url);return{title:t.title||Py,description:t.description||``,btn_title:t.btn_title||Fy,background:{type:i,url:a}}}var zy={backgroundImage:`linear-gradient(to bottom right, var(--color-primary), var(--color-base-300))`};function By({variant:e,replica:t}){let[n,r]=T(!1);return E(()=>{r(!1)},[e.url]),e.type===`replica`&&t?t.kind===`image`?A(`img`,{class:`absolute inset-0 w-full h-full object-cover`,src:t.url,loading:`lazy`,alt:``}):A(`video`,{class:`absolute inset-0 w-full h-full object-cover`,src:t.url,muted:!0,autoplay:!0,loop:!0,playsinline:!0}):e.type===`custom-image`&&e.url&&!n?A(`img`,{class:`absolute inset-0 w-full h-full object-cover`,src:e.url,loading:`lazy`,alt:``,onError:()=>r(!0)}):A(`div`,{class:`absolute inset-0`,style:zy})}function Vy({className:e=``}){let{config:t}=K_(),n=Ry(t.value),r=Ly(t.value);return A(`div`,{class:`relative size-16 shrink-0 rounded-box overflow-hidden bg-base-300 ${e}`,children:A(By,{variant:n.background,replica:r})})}var Hy=`absolute inset-0 bg-base-100 text-base-content flex flex-col items-center justify-center gap-6 px-6 py-8 text-center overflow-y-auto motion-safe:animate-[tavusFadeUp_280ms_ease-out]`;function Uy({children:e,class:t,role:n,"aria-live":r}){return A(`div`,{class:t?`${Hy} ${t}`:Hy,role:n,"aria-live":r,children:e})}function Wy({title:e,description:t,media:n,children:r,overlay:i}){return A(Uy,{children:[n===void 0?A(Vy,{}):n,(e||t)&&A(`div`,{class:`flex flex-col items-center gap-3 max-w-sm`,children:[e&&A(`h2`,{class:`text-lg font-medium leading-snug`,children:e}),t&&A(`p`,{class:`text-base text-base-content/60 tracking-wide leading-snug`,children:t})]}),r&&A(`div`,{class:`flex flex-col items-center gap-3`,children:r}),i]})}var Gy={daily_limit:{title:`Agent is at today's limit`,description:`This Agent can take more conversations tomorrow.`},total_limit:{title:`Agent is unavailable`,description:`This Agent isn't available right now. Please check back later.`},busy:{title:`Agent is in another conversation`,description:`Please try again in a moment.`},error:{title:`Couldn't load this Agent`,description:`This Agent couldn't be loaded. Please try again later.`}};function Ky(e,t){let n=t?.[e];return{title:n?.title||Gy[e].title,description:n?.description||Gy[e].description}}var qy={daily_limit:`clock`,total_limit:`moon`,busy:`users`,error:`error`};function Jy({cause:e}){return A(`div`,{class:`flex size-16 shrink-0 items-center justify-center rounded-box bg-base-200 text-base-content/70`,children:A(Ny,{name:qy[e],size:`2rem`})})}function Yy({cause:e,canRetry:t,onRetry:n,onCancel:r}){let{config:i}=K_(),a=i.value.customization?.unavailable_screen,o=Ky(e,a),s=a?.cta??[],c=e===`busy`||s.length>0||!!r;return A(Wy,{media:A(Jy,{cause:e}),title:o.title,description:o.description,children:c&&A(`div`,{class:`flex flex-wrap items-center justify-center gap-2`,children:[e===`busy`&&A(`button`,{type:`button`,class:`btn btn-neutral rounded-box`,disabled:!t,onClick:n,children:`Try again`}),s.map(e=>A(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`btn btn-outline rounded-box`,children:e.title},e.url)),r&&A(`button`,{type:`button`,class:`btn btn-ghost`,onClick:r,children:`Close`})]})})}function Xy(){let e=pt(a_);return{state:e.flowSignal.value,isStarting:e.isStarting,unavailableCause:e.unavailableCause,canRetry:e.canRetry,start:e.start,join:e.join,cancel:e.cancel,leave:e.leave,restart:e.restart}}var Zy=`Thanks for joining`,Qy=`You can start a new conversation whenever you're ready.`,$y=`Start a new conversation`;function eb(e){try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`||t.protocol===`mailto:`}catch{return!1}}function tb({text:e,onRestart:t}){let{config:n}=K_(),r=n.value.customization.after_call,i=r.cta.filter(e=>eb(e.url));return A(Wy,{title:r.title||e?.title||Zy,description:r.description||e?.description||Qy,children:[A(`button`,{type:`button`,class:`btn btn-neutral rounded-box`,onClick:t,children:e?.restart||$y}),i.length>0&&A(`div`,{class:`flex flex-wrap items-center justify-center gap-2`,children:i.map(e=>A(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`btn btn-outline rounded-box`,children:e.title},e.url))})]})}function nb(){let e=oh(),t=Uh(),{isOff:n}=r_(t),{camState:r}=Zg();return{isCamReady:O(()=>r===`granted`,[r]),isCamMuted:n,localSessionId:t,onToggleCamera:k(()=>{e?.setLocalVideo(n)},[e,n])}}function rb(){let e=oh(),t=Uh(),{isOff:n}=Kg(t),{micState:r}=Zg();return{isMicReady:O(()=>r===`granted`,[r]),isMicMuted:n,localSessionId:t,onToggleMicrophone:k(()=>{e?.setLocalAudio(n)},[e,n])}}function ib(){let e=oh(),t=Uh(),{isOff:n}=t_(t),r=!n;return{isScreenSharing:r,localSessionId:t,onToggleScreenshare:k(()=>{r?e?.stopScreenShare():e?.startScreenShare({displayMediaOptions:{audio:!1,selfBrowserSurface:`exclude`,surfaceSwitching:`include`,video:{width:1920,height:1080}}})},[e,r])}}function ab(e){switch(e){case`blocked`:return`blocked`;case`in-use`:return`in-use`;case`not-found`:return`not-found`;case`not-supported`:case`undefined-mediadevices`:return`unsupported`;default:return null}}function ob(e,t,n,r){return e===`granted`&&r?`granted`:ab(e)||(t===`denied`?`blocked`:t===`prompt`?`prompt`:t===`granted`?n?`checking`:`prompt`:e===`granted`?`granted`:n?`checking`:`prompt`)}function sb(e,t){let n=e===`granted`,r=e===`blocked`||e===`in-use`||e===`not-found`||e===`unsupported`;return{status:e,isGranted:n,isBlocked:r,canRequest:e===`prompt`,needsAttention:r||e===`prompt`&&t!==`granted`}}function cb(e){let[t,n]=T(null);return E(()=>{let t=!1,r=navigator.permissions;if(r?.query)return r.query({name:e}).then(e=>{t||(n(e.state),e.onchange=()=>{t||n(e.state)})}).catch(()=>{}),()=>{t=!0}},[e]),t}function lb(){let e=oh(),t=Mg(),n=Uh(),{micState:r,camState:i,currentMic:a,currentCam:o}=Zg(),s=cb(`microphone`),c=cb(`camera`),l=t===`joined-meeting`||!!n,[u,d]=T(!1),[f,p]=T(!1),m=k(()=>{e&&(d(!0),l?e.setLocalAudio(!0):Promise.resolve(e.startCamera({videoSource:!1})).catch(()=>{}))},[e,l]),h=k(async()=>{if(e){p(!0);try{await e.setInputDevicesAsync({videoSource:!0})}catch{}e.setLocalVideo(!0)}},[e]);return{mic:O(()=>sb(ob(r,s,u,!!a),s),[r,s,u,a]),camera:O(()=>sb(ob(i,c,f,!!o),c),[i,c,f,o]),requestMic:m,requestCamera:h}}var ub={microphone:`microphone`,camera:`camera`};function db({class:e}){return A(`svg`,{class:e,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[A(`circle`,{cx:`7`,cy:`8`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),A(`circle`,{cx:`16`,cy:`16`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),A(`path`,{d:`M2 8h2.5M9.5 8H22M2 16h11.5M18.5 16H22`,stroke:`currentColor`,"stroke-width":`1.6`,"stroke-linecap":`round`})]})}function fb(){return A(`svg`,{viewBox:`0 0 240 180`,class:`w-full h-auto text-base-content/70`,fill:`none`,"aria-hidden":`true`,children:[A(`rect`,{x:`10`,y:`20`,width:`220`,height:`150`,rx:`10`,stroke:`currentColor`,"stroke-width":`2`}),A(`path`,{d:`M10 46h220`,stroke:`currentColor`,"stroke-width":`2`}),A(`circle`,{cx:`26`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),A(`circle`,{cx:`40`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),A(`circle`,{cx:`54`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),A(`path`,{d:`M78 33h14M86 27l-6 6 6 6M104 27v12`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`}),A(`rect`,{x:`118`,y:`25`,width:`96`,height:`16`,rx:`8`,stroke:`currentColor`,"stroke-width":`1.6`}),A(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,fill:`currentColor`,opacity:`0.18`}),A(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,stroke:`currentColor`,"stroke-width":`1.6`}),A(`g`,{class:`text-info`,transform:`translate(120 25) scale(0.66)`,children:A(db,{})}),A(`g`,{transform:`translate(34 78)`,children:[A(`rect`,{x:`0`,y:`8`,width:`34`,height:`26`,rx:`5`,stroke:`currentColor`,"stroke-width":`2`}),A(`path`,{d:`M34 16l14-8v26l-14-8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]}),A(`g`,{transform:`translate(40 120)`,children:[A(`rect`,{x:`6`,y:`0`,width:`14`,height:`24`,rx:`7`,stroke:`currentColor`,"stroke-width":`2`}),A(`path`,{d:`M0 20a13 13 0 0 0 26 0M13 33v8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`})]}),A(`path`,{d:`M150 64l34 14-14 4-2 16-18-34Z`,fill:`currentColor`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]})}var pb=ba(({device:e,onClose:t})=>{let n=ub[e];return E(()=>{let e=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]),A(`div`,{class:`absolute inset-0 z-50 flex items-center justify-center p-4 bg-black/50 motion-safe:animate-[tavusFadeUp_180ms_ease-out]`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`tavus-blocked-title`,onClick:t,children:A(`div`,{class:`relative w-full max-w-md rounded-box bg-base-100 text-base-content shadow-xl overflow-hidden`,onClick:e=>e.stopPropagation(),children:[A(`button`,{type:`button`,class:`btn btn-sm btn-circle btn-ghost absolute top-2 right-2 z-10`,onClick:t,"aria-label":`Close`,children:A(Ny,{name:`close`,size:`1.1rem`})}),A(`div`,{class:`grid @3xl:grid-cols-[1fr_1.2fr] gap-4 p-5 @max-md:p-4`,children:[A(`div`,{class:`flex items-center justify-center @max-md:hidden`,children:A(fb,{})}),A(`div`,{class:`flex flex-col gap-4`,children:[A(`h2`,{id:`tavus-blocked-title`,class:`text-lg font-semibold leading-snug pr-6`,children:[`Access to your `,n,` is blocked`]}),A(`ol`,{class:`flex flex-col gap-3 text-sm`,children:[A(`li`,{class:`flex items-start gap-2`,children:[A(`span`,{class:`font-semibold tabular-nums`,children:`1.`}),A(`span`,{class:`leading-snug`,children:[`Click the `,A(db,{class:`inline-block align-text-bottom h-4 w-4 mx-0.5`}),` `,`settings icon in your browser's address bar`]})]}),A(`li`,{class:`flex items-start gap-2`,children:[A(`span`,{class:`font-semibold tabular-nums`,children:`2.`}),A(`span`,{class:`leading-snug`,children:[`Allow `,n,` access, then reload the page`]})]})]}),A(`button`,{type:`button`,class:`btn btn-neutral btn-sm self-start`,onClick:t,children:`Got it`})]})]})]})})}),mb=Ie({open:()=>{},close:()=>{}});function hb(){return pt(mb)}function gb({children:e}){let[t,n]=T(null),r=k(e=>n(e),[]),i=k(()=>n(null),[]),a=O(()=>({open:r,close:i}),[r,i]);return A(mb.Provider,{value:a,children:[e,t&&A(pb,{device:t,onClose:i})]})}var _b=ba(()=>A(`span`,{"aria-hidden":`true`,class:`absolute -top-0.5 -right-0.5 z-20 flex h-4 w-4 items-center justify-center rounded-full bg-warning text-warning-content text-[0.6rem] font-bold leading-none ring-2 ring-base-100 pointer-events-none`,children:`!`})),vb=`select-control-pill relative inline-flex items-center bg-neutral text-neutral-content`,yb=`absolute inset-0 w-full h-full opacity-0 cursor-pointer appearance-none disabled:cursor-not-allowed`,bb=`absolute right-1.5 top-1/2 -translate-y-1/2 pointer-events-none flex items-center`,xb=`absolute left-0 top-0 h-full aspect-square flex items-center justify-center pointer-events-none`,Sb=`absolute left-0 top-0 z-10 btn btn-control btn-neutral`;function Cb(){return A(`svg`,{style:{width:`var(--chevron-size, 0.75rem)`,height:`var(--chevron-size, 0.75rem)`},viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:A(`path`,{d:`M4 6L8 10L12 6`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`})})}function wb({value:e,devices:t,disabled:n,onChange:r,label:i}){return A(ue,{children:[A(`select`,{class:yb,value:e,onChange:e=>r(e.target.value),disabled:n,"aria-label":i,children:t.map(({device:e})=>A(`option`,{value:e.deviceId,children:e.label},e.deviceId))}),A(`span`,{class:bb,children:A(Cb,{})})]})}function Tb(e){return A(`div`,{class:vb,children:A(wb,{...e})})}function Eb({iconName:e,...t}){return A(`div`,{class:vb,children:[A(`span`,{class:xb,"aria-hidden":`true`,children:A(Ny,{name:e})}),A(wb,{...t})]})}var Db=ba(()=>{let{onToggleMicrophone:e,isMicReady:t,isMicMuted:n}=rb(),{microphones:r,currentMic:i,setMicrophone:a}=Zg();return!i||(r?.length??0)<=1?A(Ab,{}):A(`div`,{class:`relative inline-flex items-center`,children:[A(Tb,{value:i?.device?.deviceId,devices:r||[],disabled:!t,onChange:e=>a(e),label:`Select microphone`}),A(`button`,{type:`button`,onClick:e,disabled:!t,class:Sb,"aria-label":n?`Unmute microphone`:`Mute microphone`,"aria-pressed":n,children:A(Ny,{name:n||!t?`mic-off`:`mic`})})]})});function Ob(){let{onToggleCamera:e,isCamMuted:t}=nb(),{camera:n,requestCamera:r}=lb(),{open:i}=hb(),a=n.isGranted&&!t;return{isOn:a,onClick:()=>{if(n.isBlocked)return i(`camera`);if(a)return e();r()},label:a?`Turn camera off`:n.isGranted?`Turn camera on`:`Enable camera`,needsAttention:n.needsAttention}}var kb=ba(()=>{let{isCamReady:e}=nb(),{currentCam:t,cameras:n,setCamera:r}=Zg(),i=Ob();return!t||(n?.length??0)<=1?A(jb,{}):A(`div`,{class:`relative inline-flex items-center`,children:[A(Tb,{value:t?.device?.deviceId,devices:n||[],disabled:!e,onChange:e=>r(e),label:`Select camera`}),A(`button`,{type:`button`,onClick:i.onClick,class:Sb,"aria-label":i.label,"aria-pressed":!i.isOn,children:A(Ny,{name:i.isOn?`cam`:`cam-off`})})]})}),Ab=ba(()=>{let{onToggleMicrophone:e,isMicMuted:t}=rb(),{mic:n,requestMic:r}=lb(),{open:i}=hb();return A(`span`,{class:`relative inline-flex`,children:[A(`button`,{type:`button`,onClick:()=>{if(n.isGranted)return e();if(n.isBlocked)return i(`microphone`);r()},class:`btn btn-control btn-neutral`,"aria-label":n.isGranted?t?`Unmute microphone`:`Mute microphone`:`Allow microphone access`,"aria-pressed":n.isGranted?t:void 0,children:A(Ny,{name:t||!n.isGranted?`mic-off`:`mic`})}),n.needsAttention&&A(_b,{})]})}),jb=ba(()=>{let{isOn:e,onClick:t,label:n,needsAttention:r}=Ob();return A(`span`,{class:`relative inline-flex`,children:[A(`button`,{type:`button`,onClick:t,class:`btn btn-control btn-neutral`,"aria-label":n,"aria-pressed":!e,children:A(Ny,{name:e?`cam`:`cam-off`})}),r&&A(_b,{})]})});ba(({compact:e=!1}={})=>{let{isMicReady:t}=rb(),{microphones:n,currentMic:r,setMicrophone:i}=Zg();return(n?.length??0)<=1?null:A(Eb,{iconName:`mic`,value:r?.device?.deviceId,devices:n,disabled:!t,onChange:e=>i(e),label:`Select microphone`,compact:e})}),ba(({compact:e=!1}={})=>{let{isCamReady:t}=nb(),{currentCam:n,cameras:r,setCamera:i}=Zg();return(r?.length??0)<=1?null:A(Eb,{iconName:`cam`,value:n?.device?.deviceId,devices:r,disabled:!t,onChange:e=>i(e),label:`Select camera`,compact:e})});var Mb=ba((e={})=>{let{onToggleScreenshare:t,isScreenSharing:n}=ib();return A(`button`,{type:`button`,onClick:t,class:`btn btn-control ${n?`btn-primary`:`btn-neutral`}`,"aria-label":n?`Stop screen share`:`Start screen share`,"aria-pressed":n,children:A(Ny,{name:`screen-share`})})});function Nb(e){let t=pt(L_);if(!t)throw Error(`useConversation must be used within ConversationProvider`);return E(()=>{if(e)return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[e]),t}var Pb=Ie(null);function Fb({children:e,defaultEnabled:t=!1}){let[n,r]=T(t),i=k(()=>r(e=>!e),[]),a=O(()=>({isEnabled:n,toggle:i}),[n,i]);return A(Pb.Provider,{value:a,children:e})}function Ib(){let e=pt(Pb);if(!e)throw Error(`ClosedCaptions components must be used within <ClosedCaptionsProvider>`);return e}var Lb=ba(()=>{let{isEnabled:e,toggle:t}=Ib();return A(`button`,{type:`button`,onClick:t,"aria-pressed":e,class:`btn btn-control ${e?`btn-primary`:`btn-neutral`}`,"aria-label":e?`Hide captions`:`Show captions`,children:A(Ny,{name:`captions`,"aria-label":e?`Closed Captions On`:`Closed Captions Off`})})}),Rb=ba(()=>{let{isEnabled:e}=Ib(),{captionText:t,captionRole:n}=Nb(),r=t.value,i=n.value;return!e||!r?null:A(`div`,{class:`absolute bottom-24 left-1/2 -translate-x-1/2 max-w-[80%] px-4 py-2 rounded-box bg-black/60 text-white`,role:`status`,"aria-live":`polite`,children:A(`div`,{class:`text-sm leading-5 max-h-15 overflow-hidden flex flex-col justify-end text-center`,children:A(`div`,{children:[A(`span`,{class:`text-xs ${i===`replica`?`text-secondary`:`text-primary`} mr-2`,children:i===`replica`?`Replica`:`You`}),r]})})})}),zb=Ie(null);function Bb({children:e,defaultOpen:t=!1}){let[n,r]=T(t),i=k(()=>r(e=>!e),[]),a=k(()=>r(!1),[]),o=O(()=>({isOpen:n,toggle:i,close:a}),[n,i,a]);return A(zb.Provider,{value:o,children:e})}function Vb(){let e=pt(zb);if(!e)throw Error(`Chat components must be used within <ChatProvider>`);return e}var Hb=ba((e={})=>{let{isOpen:t,toggle:n}=Vb();return A(`button`,{type:`button`,onClick:n,"aria-pressed":t,"aria-label":t?`Close chat`:`Open chat`,class:`btn btn-control ${t?`btn-primary`:`btn-neutral`}`,children:A(Ny,{name:`chat`})})}),Ub=ba(({message:e})=>{let t=e.sender===`user`;return A(`li`,{class:`flex flex-col gap-1 ${t?`items-end`:`items-start`}`,children:[A(`span`,{class:`text-xs ${t?`text-primary`:`text-secondary`}`,children:t?`You`:`Replica`}),A(`span`,{class:`px-3 py-2 rounded-field text-sm max-w-[80%] ${t?`bg-primary text-primary-content`:`bg-base-200 text-base-content`}`,children:e.text})]})}),Wb=ba(()=>{let{isOpen:e,close:t}=Vb(),{chatMessages:n,sendChat:r,session:i}=Nb(),a=i.value?.conversationId??null,o=n.value,[s,c]=T(``),l=D(null);E(()=>{let e=l.current;e&&(e.scrollTop=e.scrollHeight)},[o.length]);let u=k(()=>{let e=s.trim();!e||!a||(r(e),c(``))},[s,r,a]),d=k(e=>{e.key===`Enter`&&!e.shiftKey&&!e.isComposing&&(e.preventDefault(),u())},[u]),f=!!s.trim()&&!!a;return A(`aside`,{class:`absolute top-0 right-0 w-80 h-full bg-base-100 border-l border-base-300 flex flex-col z-30 transition-transform ${e?`translate-x-0`:`translate-x-full`} @max-mobile:w-full`,"aria-hidden":!e,inert:!e,children:[A(`header`,{class:`flex items-center justify-between px-4 py-3 border-b border-base-300`,children:[A(`span`,{class:`font-medium text-base-content`,children:`Chat`}),A(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle`,onClick:t,"aria-label":`Close chat`,children:A(Ny,{name:`close`,size:20})})]}),A(`ul`,{ref:l,class:`flex-1 overflow-y-auto p-4 flex flex-col gap-3`,role:`log`,"aria-live":`polite`,children:o.length===0?A(`li`,{class:`text-center text-sm opacity-70`,children:a?`Send a message to start the conversation.`:`Connecting…`}):o.map(e=>A(Ub,{message:e},e.id))}),A(`form`,{class:`flex items-end gap-2 p-3 border-t border-base-300`,onSubmit:e=>{e.preventDefault(),u()},children:[A(`textarea`,{class:`textarea textarea-bordered textarea-sm flex-1 resize-none`,value:s,onChange:e=>c(e.target.value),onKeyDown:d,placeholder:a?`Type a message…`:`Connecting…`,disabled:!a,rows:1,"aria-label":`Message`}),A(`button`,{type:`submit`,class:`btn btn-primary btn-sm btn-circle`,disabled:!f,"aria-label":`Send message`,children:A(Ny,{name:`send`,size:18})})]})]})});function Gb({label:e}){return A(Uy,{role:`status`,"aria-live":`polite`,class:`z-2`,children:[A(Vy,{}),A(`div`,{class:`flex flex-col items-center gap-3`,children:[A(`span`,{class:`loading loading-spinner loading-md text-base-content`}),A(`span`,{class:`text-base font-medium`,children:e})]})]})}var Kb=ba(()=>A(Gb,{label:`Connecting`})),qb=ba(()=>A(Gb,{label:`Leaving`}));function Jb({active:e,onToggle:t,tooltip:n}){return A(`button`,{type:`button`,onClick:t,class:`btn btn-control ${e?`btn-info`:`btn-ghost`}`,"aria-label":n??(e?`Exit fullscreen`:`Enter fullscreen`),title:n,children:A(Ny,{name:e?`fullscreen-exit`:`fullscreen`})})}var Yb=ba(({id:e})=>{let t=Gh()===e,n=D(null),r=D(null),i=D(null),a=D(void 0);Gg(e,k(e=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{let t=Number(Math.max(.01,e).toFixed(2));n.current&&r.current&&i.current&&(n.current.style.height=`${20+t*40}%`,r.current.style.height=`${20+t*130}%`,i.current.style.height=`${20+t*40}%`)})},[]));let o=`w-[3px] rounded-full bg-base-100 transition-[opacity] ${t?`opacity-100`:`opacity-50`}`;return A(`div`,{class:`flex items-center justify-center w-6 h-6`,children:A(`div`,{class:`flex items-center justify-center gap-[2px] w-full h-full`,children:[A(`div`,{ref:n,class:o,style:{height:`20%`}}),A(`div`,{ref:r,class:o,style:{height:`20%`}}),A(`div`,{ref:i,class:o,style:{height:`20%`}})]})})});function Xb({sessionId:e,className:t=``}){let n=D(null),r=D(void 0);return Gg(e??``,k(t=>{e&&(r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let e=Math.max(0,Math.min(1,t**.6));n.current?.style.setProperty(`--audio-level`,String(e))}))},[e])),A(`div`,{ref:n,class:`relative aspect-square w-full max-w-[min(48cqi,16rem)] mx-auto pointer-events-none ${t}`,style:{"--audio-level":`0`},"aria-hidden":`true`,children:[A(`div`,{class:`absolute inset-0 rounded-full will-change-transform`,style:{background:`conic-gradient(from 0deg, var(--color-primary), var(--color-info, var(--color-primary)), var(--color-secondary, var(--color-primary)), var(--color-primary))`,filter:`blur(28px)`,animation:`tavusOrbSpin 18s linear infinite`,scale:`calc(1 + var(--audio-level, 0) * 0.35)`,opacity:`calc(0.45 + var(--audio-level, 0) * 0.45)`,transition:`scale 120ms ease-out, opacity 120ms ease-out`}}),A(`div`,{class:`absolute inset-[12%] rounded-full will-change-transform`,style:{background:`conic-gradient(from 180deg, color-mix(in oklab, var(--color-primary) 80%, white), transparent 30%, color-mix(in oklab, var(--color-primary) 60%, white) 70%, transparent)`,filter:`blur(14px)`,opacity:.55,mixBlendMode:`screen`,animation:`tavusOrbSpin 26s linear infinite reverse`}}),A(`div`,{class:`absolute inset-[28%] rounded-full`,style:{background:`radial-gradient(circle at 30% 30%, color-mix(in oklab, white 70%, var(--color-primary)), var(--color-primary) 60%, color-mix(in oklab, var(--color-primary) 50%, black))`,boxShadow:`0 0 60px color-mix(in oklab, var(--color-primary) 60%, transparent), inset 0 0 30px color-mix(in oklab, white 40%, transparent)`,scale:`calc(1 + var(--audio-level, 0) * 0.18)`,transition:`scale 100ms ease-out`}}),A(`div`,{class:`absolute inset-[28%] rounded-full`,style:{background:`radial-gradient(circle, color-mix(in oklab, var(--color-primary) 80%, transparent), transparent 70%)`,animation:`tavusOrbPulse 2.6s ease-in-out infinite`}})]})}function Zb({children:e,class:t,className:n,...r}){return A(`div`,{class:`tavus-mesh-bg ${t??n??``}`,...r,children:[A(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-1`}),A(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-2`}),A(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-3`}),A(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-4`}),A(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-5`}),A(`div`,{class:`absolute inset-0 bg-linear-to-t from-black/30 via-black/10 to-transparent pointer-events-none backdrop-blur-xs`}),e]})}var Qb=e=>!!e.user_id?.includes(`tavus-replica`);function $b(){return Xh({filter:Qb})}function ex(e){let t=$b()[0],n=r_(t??``),r=Mg(),[i,a]=T(!1);return E(()=>{t&&(n.state===`playable`||e)&&a(!0)},[t,n.state,e]),r===`left-meeting`||r===`error`?{phase:`left`}:!i||!t?{phase:`connecting`}:{phase:`ready`,replicaId:t,videoState:n}}var tx=ba(({isAudioOnly:e})=>{let t=ex(e);return t.phase===`left`?A(qb,{}):t.phase===`connecting`?A(Kb,{}):e?A(Zb,{class:`flex items-center justify-center`,children:[A(Xb,{sessionId:t.replicaId}),A(tg,{sessionId:t.replicaId})]}):A(`div`,{class:`relative w-full h-full`,children:[A(rg,{automirror:!0,sessionId:t.replicaId,type:`video`,fit:`cover`,className:`absolute inset-0 w-full h-full object-cover ${t.videoState.isOff?`hidden`:``}`}),A(tg,{sessionId:t.replicaId})]})}),nx=ba(({onLeave:e})=>{let{config:t}=K_(),n=t.value.customization.conversation.modality===`audio`;return A(`div`,{class:`@container/pip w-full h-full`,children:A(`div`,{class:`relative w-full h-full overflow-hidden bg-linear-to-br from-base-300 to-base-200 text-base-content`,children:[A(`div`,{class:`relative w-full h-full z-5`,children:A(tx,{isAudioOnly:n})}),A(`div`,{class:`absolute bottom-4 w-full inset-x-0 z-20 flex justify-center items-center gap-2 @max-mobile:gap-1`,children:[A(Ab,{}),!n&&A(jb,{}),A(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:e,"aria-label":`Leave call`,children:A(Ny,{name:`leave`,"aria-label":`Leave Call`})})]})]})})}),rx=ba(({personaSessionId:e,localSessionId:t,isPresenting:n,isScreenSharing:r,isAudioOnly:i,avatarOff:a,videoRef:o})=>{let s=n||r;return A(ue,{children:[A(rg,{ref:o,automirror:!0,sessionId:r?t??``:e,type:s?`screenVideo`:`video`,fit:s?`contain`:`cover`,className:`absolute inset-0 w-full h-full transition-all ${s?`object-contain`:`object-cover`} ${!s&&a?`hidden`:``}`}),n&&A(`div`,{class:`absolute bottom-4 right-4 aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10`,children:i||a?A(`div`,{class:`flex w-full h-full items-center justify-center`,children:A(Xb,{sessionId:e})}):A(rg,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover`})})]})});function K(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}function ix(e){return e&&Object.assign(cx,e),cx}var ax,ox,sx,cx,lx=a((()=>{ox=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},sx=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(ax=globalThis).__zod_globalConfig??(ax.__zod_globalConfig={}),cx=globalThis.__zod_globalConfig}));function ux(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function dx(e,t=`|`){return e.map(e=>Dx(e)).join(t)}function fx(e,t){return typeof t==`bigint`?t.toString():t}function px(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function mx(e){return e==null}function hx(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function gx(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function _x(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Wx)return r===void 0&&(r=Wx,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function vx(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function yx(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function bx(e){return JSON.stringify(e)}function xx(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}function Sx(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Cx(e){if(Sx(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Sx(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function wx(e){return Cx(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Tx(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Ex(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function q(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Dx(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Ox(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}function kx(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Ex(e,yx(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return vx(this,`shape`,e),e},checks:[]}))}function Ax(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Ex(e,yx(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return vx(this,`shape`,r),r},checks:[]}))}function jx(e,t){if(!Cx(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ex(e,yx(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return vx(this,`shape`,n),n}}))}function Mx(e,t){if(!Cx(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Ex(e,yx(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return vx(this,`shape`,n),n}}))}function Nx(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return Ex(e,yx(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return vx(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Px(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return Ex(t,yx(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return vx(this,`shape`,i),i},checks:[]}))}function Fx(e,t,n){return Ex(t,yx(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return vx(this,`shape`,i),i}}))}function Ix(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Lx(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Rx(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function zx(e){return typeof e==`string`?e:e?.message}function Bx(e,t,n){let r=e.message?e.message:zx(e.inst?._zod.def?.error?.(e))??zx(t?.error?.(e))??zx(n.customError?.(e))??zx(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function Vx(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Hx(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ux(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Wx,Gx,Kx,qx,Jx,Yx=a((()=>{lx(),Wx=Symbol(`evaluating`),Gx=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},Kx=px(()=>{if(cx.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),qx=new Set([`string`,`number`,`symbol`]),Jx={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}}));function Xx(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Zx(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var Qx,$x,eS,tS=a((()=>{lx(),Yx(),Qx=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,fx,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},$x=K(`$ZodError`,Qx),eS=K(`$ZodError`,Qx,{Parent:Error})})),nS,rS,iS,aS,oS,sS,cS,lS,uS,dS,fS,pS,mS,hS,gS=a((()=>{lx(),tS(),Yx(),nS=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new ox;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Bx(e,a,ix())));throw Gx(t,i?.callee),t}return o.value},rS=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Bx(e,a,ix())));throw Gx(t,i?.callee),t}return o.value},iS=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new ox;return a.issues.length?{success:!1,error:new(e??$x)(a.issues.map(e=>Bx(e,i,ix())))}:{success:!0,data:a.value}},aS=iS(eS),oS=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Bx(e,i,ix())))}:{success:!0,data:a.value}},sS=oS(eS),cS=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return nS(e)(t,n,i)},lS=e=>(t,n,r)=>nS(e)(t,n,r),uS=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return rS(e)(t,n,i)},dS=e=>async(t,n,r)=>rS(e)(t,n,r),fS=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return iS(e)(t,n,i)},pS=e=>(t,n,r)=>iS(e)(t,n,r),mS=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return oS(e)(t,n,i)},hS=e=>async(t,n,r)=>oS(e)(t,n,r)}));function _S(){return new RegExp(jS,`u`)}function vS(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function yS(e){return RegExp(`^${vS(e)}$`)}function bS(e){let t=vS({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${BS}T(?:${r})$`)}var xS,SS,CS,wS,TS,ES,DS,OS,kS,AS,jS,MS,NS,PS,FS,IS,LS,RS,zS,BS,VS,HS,US,WS,GS,KS,qS,JS,YS,XS=a((()=>{xS=/^[cC][0-9a-z]{6,}$/,SS=/^[0-9a-z]+$/,CS=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,wS=/^[0-9a-vA-V]{20}$/,TS=/^[A-Za-z0-9]{27}$/,ES=/^[a-zA-Z0-9_-]{21}$/,DS=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,OS=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,kS=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,AS=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,jS=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,MS=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,NS=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,PS=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,FS=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,IS=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,LS=/^[A-Za-z0-9_-]*$/,RS=/^https?$/,zS=/^\+[1-9]\d{6,14}$/,BS=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,VS=RegExp(`^${BS}$`),HS=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},US=/^-?\d+$/,WS=/^-?\d+(?:\.\d+)?$/,GS=/^(?:true|false)$/i,KS=/^null$/i,qS=/^undefined$/i,JS=/^[^A-Z]*$/,YS=/^[^a-z]*$/})),ZS,QS,$S,eC,tC,nC,rC,iC,aC,oC,sC,cC,lC,uC,dC,fC,pC,mC=a((()=>{lx(),XS(),Yx(),ZS=K(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),QS={number:`number`,bigint:`bigint`,object:`date`},$S=K(`$ZodCheckLessThan`,(e,t)=>{ZS.init(e,t);let n=QS[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),eC=K(`$ZodCheckGreaterThan`,(e,t)=>{ZS.init(e,t);let n=QS[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),tC=K(`$ZodCheckMultipleOf`,(e,t)=>{ZS.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):gx(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),nC=K(`$ZodCheckNumberFormat`,(e,t)=>{ZS.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Jx[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=US)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),rC=K(`$ZodCheckMaxLength`,(e,t)=>{var n;ZS.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!mx(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Vx(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),iC=K(`$ZodCheckMinLength`,(e,t)=>{var n;ZS.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!mx(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Vx(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),aC=K(`$ZodCheckLengthEquals`,(e,t)=>{var n;ZS.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!mx(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Vx(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),oC=K(`$ZodCheckStringFormat`,(e,t)=>{var n,r;ZS.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),sC=K(`$ZodCheckRegex`,(e,t)=>{oC.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),cC=K(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=JS,oC.init(e,t)}),lC=K(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=YS,oC.init(e,t)}),uC=K(`$ZodCheckIncludes`,(e,t)=>{ZS.init(e,t);let n=Tx(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),dC=K(`$ZodCheckStartsWith`,(e,t)=>{ZS.init(e,t);let n=RegExp(`^${Tx(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),fC=K(`$ZodCheckEndsWith`,(e,t)=>{ZS.init(e,t);let n=RegExp(`.*${Tx(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),pC=K(`$ZodCheckOverwrite`,(e,t)=>{ZS.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),hC,gC=a((()=>{hC=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
51
51
  `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
52
- `))}}})),nC,rC=a((()=>{nC={major:4,minor:4,patch:3}}));function iC(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function aC(e){if(!SS.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return iC(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function oC(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function sC(e,t,n){e.issues.length&&t.issues.push(...Cx(n,e.issues)),t.value[n]=e.value}function cC(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...Cx(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function lC(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=px(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function uC(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>cC(e,n,i,t,u,d))):cC(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}function dC(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!xx(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Tx(e,r,Ub())))}),t)}function fC(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(cx(e)&&cx(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=fC(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=fC(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function pC(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),xx(e))return e;let o=fC(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}function mC(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function hC(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function gC(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function _C(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}function vC(e){return e.value=Object.freeze(e.value),e}function yC(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ox(e))}}var bC,xC,SC,CC,wC,TC,EC,DC,OC,kC,AC,jC,MC,NC,PC,FC,IC,LC,RC,zC,BC,VC,HC,UC,WC,GC,KC,qC,JC,YC,XC,ZC,QC,$C,ew,tw,nw,rw,iw,aw,ow,sw,cw,lw,uw,dw,fw,pw,mw,hw,gw,_w,vw,yw,bw=a((()=>{$S(),Jb(),tC(),tS(),FS(),Px(),rC(),bC=K(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=nC;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=xx(e),i;for(let a of t){if(a._zod.def.when){if(Sx(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Gb;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=xx(e,t))});else{if(e.issues.length===t)continue;r||=xx(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(xx(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Gb;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Gb;return o.then(e=>t(e,r,a))}return t(o,r,a)}}nx(e,`~standard`,()=>({validate:t=>{try{let n=Wx(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Kx(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),xC=K(`$ZodString`,(e,t)=>{bC.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??DS(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),SC=K(`$ZodStringFormat`,(e,t)=>{GS.init(e,t),xC.init(e,t)}),CC=K(`$ZodGUID`,(e,t)=>{t.pattern??=pS,SC.init(e,t)}),wC=K(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=mS(e)}else t.pattern??=mS();SC.init(e,t)}),TC=K(`$ZodEmail`,(e,t)=>{t.pattern??=hS,SC.init(e,t)}),EC=K(`$ZodURL`,(e,t)=>{SC.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===CS.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),DC=K(`$ZodEmoji`,(e,t)=>{t.pattern??=nS(),SC.init(e,t)}),OC=K(`$ZodNanoID`,(e,t)=>{t.pattern??=dS,SC.init(e,t)}),kC=K(`$ZodCUID`,(e,t)=>{t.pattern??=oS,SC.init(e,t)}),AC=K(`$ZodCUID2`,(e,t)=>{t.pattern??=sS,SC.init(e,t)}),jC=K(`$ZodULID`,(e,t)=>{t.pattern??=cS,SC.init(e,t)}),MC=K(`$ZodXID`,(e,t)=>{t.pattern??=lS,SC.init(e,t)}),NC=K(`$ZodKSUID`,(e,t)=>{t.pattern??=uS,SC.init(e,t)}),PC=K(`$ZodISODateTime`,(e,t)=>{t.pattern??=aS(t),SC.init(e,t)}),FC=K(`$ZodISODate`,(e,t)=>{t.pattern??=ES,SC.init(e,t)}),IC=K(`$ZodISOTime`,(e,t)=>{t.pattern??=iS(t),SC.init(e,t)}),LC=K(`$ZodISODuration`,(e,t)=>{t.pattern??=fS,SC.init(e,t)}),RC=K(`$ZodIPv4`,(e,t)=>{t.pattern??=_S,SC.init(e,t),e._zod.bag.format=`ipv4`}),zC=K(`$ZodIPv6`,(e,t)=>{t.pattern??=vS,SC.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),BC=K(`$ZodCIDRv4`,(e,t)=>{t.pattern??=yS,SC.init(e,t)}),VC=K(`$ZodCIDRv6`,(e,t)=>{t.pattern??=bS,SC.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}}),HC=K(`$ZodBase64`,(e,t)=>{t.pattern??=xS,SC.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{iC(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),UC=K(`$ZodBase64URL`,(e,t)=>{t.pattern??=SS,SC.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{aC(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),WC=K(`$ZodE164`,(e,t)=>{t.pattern??=wS,SC.init(e,t)}),GC=K(`$ZodJWT`,(e,t)=>{SC.init(e,t),e._zod.check=n=>{oC(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),KC=K(`$ZodNumber`,(e,t)=>{bC.init(e,t),e._zod.pattern=e._zod.bag.pattern??kS,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),qC=K(`$ZodNumberFormat`,(e,t)=>{VS.init(e,t),KC.init(e,t)}),JC=K(`$ZodBoolean`,(e,t)=>{bC.init(e,t),e._zod.pattern=AS,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),YC=K(`$ZodUndefined`,(e,t)=>{bC.init(e,t),e._zod.pattern=MS,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),XC=K(`$ZodNull`,(e,t)=>{bC.init(e,t),e._zod.pattern=jS,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),ZC=K(`$ZodUnknown`,(e,t)=>{bC.init(e,t),e._zod.parse=e=>e}),QC=K(`$ZodNever`,(e,t)=>{bC.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),$C=K(`$ZodArray`,(e,t)=>{bC.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>sC(t,n,e))):sC(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}}),ew=K(`$ZodObject`,(e,t)=>{if(bC.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=Qb(()=>lC(t));nx(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=sx,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>cC(n,t,e,s,r,i))):cC(a,t,e,s,r,i)}return i?uC(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),tw=K(`$ZodObjectJIT`,(e,t)=>{ew.init(e,t);let n=e._zod.parse,r=Qb(()=>lC(t)),i=e=>{let t=new eC([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=ax(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=ax(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
52
+ `))}}})),_C,vC=a((()=>{_C={major:4,minor:4,patch:3}}));function yC(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function bC(e){if(!LS.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return yC(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function xC(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function SC(e,t,n){e.issues.length&&t.issues.push(...Rx(n,e.issues)),t.value[n]=e.value}function CC(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...Rx(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function wC(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=Ox(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function TC(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>CC(e,n,i,t,u,d))):CC(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}function EC(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Ix(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Bx(e,r,ix())))}),t)}function DC(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Cx(e)&&Cx(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=DC(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=DC(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function OC(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),Ix(e))return e;let o=DC(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}function kC(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function AC(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function jC(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function MC(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}function NC(e){return e.value=Object.freeze(e.value),e}function PC(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ux(e))}}var FC,IC,LC,RC,zC,BC,VC,HC,UC,WC,GC,KC,qC,JC,YC,XC,ZC,QC,$C,ew,tw,nw,rw,iw,aw,ow,sw,cw,lw,uw,dw,fw,pw,mw,hw,gw,_w,vw,yw,bw,xw,Sw,Cw,ww,Tw,Ew,Dw,Ow,kw,Aw,jw,Mw,Nw,Pw,Fw=a((()=>{mC(),lx(),gC(),gS(),XS(),Yx(),vC(),FC=K(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=_C;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=Ix(e),i;for(let a of t){if(a._zod.def.when){if(Lx(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new ox;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=Ix(e,t))});else{if(e.issues.length===t)continue;r||=Ix(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(Ix(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new ox;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new ox;return o.then(e=>t(e,r,a))}return t(o,r,a)}}_x(e,`~standard`,()=>({validate:t=>{try{let n=aS(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return sS(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),IC=K(`$ZodString`,(e,t)=>{FC.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??HS(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),LC=K(`$ZodStringFormat`,(e,t)=>{oC.init(e,t),IC.init(e,t)}),RC=K(`$ZodGUID`,(e,t)=>{t.pattern??=OS,LC.init(e,t)}),zC=K(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=kS(e)}else t.pattern??=kS();LC.init(e,t)}),BC=K(`$ZodEmail`,(e,t)=>{t.pattern??=AS,LC.init(e,t)}),VC=K(`$ZodURL`,(e,t)=>{LC.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===RS.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),HC=K(`$ZodEmoji`,(e,t)=>{t.pattern??=_S(),LC.init(e,t)}),UC=K(`$ZodNanoID`,(e,t)=>{t.pattern??=ES,LC.init(e,t)}),WC=K(`$ZodCUID`,(e,t)=>{t.pattern??=xS,LC.init(e,t)}),GC=K(`$ZodCUID2`,(e,t)=>{t.pattern??=SS,LC.init(e,t)}),KC=K(`$ZodULID`,(e,t)=>{t.pattern??=CS,LC.init(e,t)}),qC=K(`$ZodXID`,(e,t)=>{t.pattern??=wS,LC.init(e,t)}),JC=K(`$ZodKSUID`,(e,t)=>{t.pattern??=TS,LC.init(e,t)}),YC=K(`$ZodISODateTime`,(e,t)=>{t.pattern??=bS(t),LC.init(e,t)}),XC=K(`$ZodISODate`,(e,t)=>{t.pattern??=VS,LC.init(e,t)}),ZC=K(`$ZodISOTime`,(e,t)=>{t.pattern??=yS(t),LC.init(e,t)}),QC=K(`$ZodISODuration`,(e,t)=>{t.pattern??=DS,LC.init(e,t)}),$C=K(`$ZodIPv4`,(e,t)=>{t.pattern??=MS,LC.init(e,t),e._zod.bag.format=`ipv4`}),ew=K(`$ZodIPv6`,(e,t)=>{t.pattern??=NS,LC.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),tw=K(`$ZodCIDRv4`,(e,t)=>{t.pattern??=PS,LC.init(e,t)}),nw=K(`$ZodCIDRv6`,(e,t)=>{t.pattern??=FS,LC.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}}),rw=K(`$ZodBase64`,(e,t)=>{t.pattern??=IS,LC.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{yC(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),iw=K(`$ZodBase64URL`,(e,t)=>{t.pattern??=LS,LC.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{bC(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),aw=K(`$ZodE164`,(e,t)=>{t.pattern??=zS,LC.init(e,t)}),ow=K(`$ZodJWT`,(e,t)=>{LC.init(e,t),e._zod.check=n=>{xC(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),sw=K(`$ZodNumber`,(e,t)=>{FC.init(e,t),e._zod.pattern=e._zod.bag.pattern??WS,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),cw=K(`$ZodNumberFormat`,(e,t)=>{nC.init(e,t),sw.init(e,t)}),lw=K(`$ZodBoolean`,(e,t)=>{FC.init(e,t),e._zod.pattern=GS,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),uw=K(`$ZodUndefined`,(e,t)=>{FC.init(e,t),e._zod.pattern=qS,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),dw=K(`$ZodNull`,(e,t)=>{FC.init(e,t),e._zod.pattern=KS,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),fw=K(`$ZodUnknown`,(e,t)=>{FC.init(e,t),e._zod.parse=e=>e}),pw=K(`$ZodNever`,(e,t)=>{FC.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),mw=K(`$ZodArray`,(e,t)=>{FC.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>SC(t,n,e))):SC(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}}),hw=K(`$ZodObject`,(e,t)=>{if(FC.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=px(()=>wC(t));_x(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Sx,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>CC(n,t,e,s,r,i))):CC(a,t,e,s,r,i)}return i?TC(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),gw=K(`$ZodObjectJIT`,(e,t)=>{hw.init(e,t);let n=e._zod.parse,r=px(()=>wC(t)),i=e=>{let t=new hC([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=bx(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=bx(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
53
53
  if (${n}.issues.length) {
54
54
  if (${o} in input) {
55
55
  payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
@@ -108,15 +108,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
108
108
  }
109
109
  }
110
110
 
111
- `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=sx,s=!qb.jitless,c=s&&jx.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?uC([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}}),nw=K(`$ZodUnion`,(e,t)=>{bC.init(e,t),nx(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),nx(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),nx(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),nx(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>ex(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>dC(t,r,e,i)):dC(o,r,e,i)}}),rw=K(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,nw.init(e,t);let n=e._zod.parse;nx(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=Qb(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!sx(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),iw=K(`$ZodIntersection`,(e,t)=>{bC.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>pC(e,t,n)):pC(e,i,a)}}),aw=K(`$ZodRecord`,(e,t)=>{bC.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!cx(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>Tx(e,r,Ub())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...Cx(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...Cx(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&kS.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Tx(e,r,Ub())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...Cx(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...Cx(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),ow=K(`$ZodEnum`,(e,t)=>{bC.init(e,t);let n=Yb(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Mx.has(typeof e)).map(e=>typeof e==`string`?ux(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),sw=K(`$ZodLiteral`,(e,t)=>{if(bC.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?ux(e):e?ux(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),cw=K(`$ZodTransform`,(e,t)=>{bC.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Kb(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new Gb;return n.value=i,n.fallback=!0,n}}),lw=K(`$ZodOptional`,(e,t)=>{bC.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,nx(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),nx(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ex(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>mC(e,r)):mC(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),uw=K(`$ZodExactOptional`,(e,t)=>{lw.init(e,t),nx(e._zod,`values`,()=>t.innerType._zod.values),nx(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),dw=K(`$ZodNullable`,(e,t)=>{bC.init(e,t),nx(e._zod,`optin`,()=>t.innerType._zod.optin),nx(e._zod,`optout`,()=>t.innerType._zod.optout),nx(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ex(e.source)}|null)$`):void 0}),nx(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),fw=K(`$ZodDefault`,(e,t)=>{bC.init(e,t),e._zod.optin=`optional`,nx(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>hC(e,t)):hC(r,t)}}),pw=K(`$ZodPrefault`,(e,t)=>{bC.init(e,t),e._zod.optin=`optional`,nx(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),mw=K(`$ZodNonOptional`,(e,t)=>{bC.init(e,t),nx(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>gC(t,e)):gC(i,e)}}),hw=K(`$ZodCatch`,(e,t)=>{bC.init(e,t),e._zod.optin=`optional`,nx(e._zod,`optout`,()=>t.innerType._zod.optout),nx(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Tx(e,n,Ub()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Tx(e,n,Ub()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),gw=K(`$ZodPipe`,(e,t)=>{bC.init(e,t),nx(e._zod,`values`,()=>t.in._zod.values),nx(e._zod,`optin`,()=>t.in._zod.optin),nx(e._zod,`optout`,()=>t.out._zod.optout),nx(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>_C(e,t.in,n)):_C(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>_C(e,t.out,n)):_C(r,t.out,n)}}),_w=K(`$ZodPreprocess`,(e,t)=>{gw.init(e,t)}),vw=K(`$ZodReadonly`,(e,t)=>{bC.init(e,t),nx(e._zod,`propValues`,()=>t.innerType._zod.propValues),nx(e._zod,`values`,()=>t.innerType._zod.values),nx(e._zod,`optin`,()=>t.innerType?._zod?.optin),nx(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(vC):vC(r)}}),yw=K(`$ZodCustom`,(e,t)=>{IS.init(e,t),bC.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>yC(t,n,r,e));yC(i,n,r,e)}})}));function xw(){return{localeError:Sw()}}var Sw,Cw=a((()=>{Px(),Sw=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=Dx(e.input);return`Invalid input: expected ${t}, received ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${fx(e.values[0])}`:`Invalid option: expected one of ${Xb(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${Xb(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function ww(){return new Ew}var Tw,Ew,Dw,Ow=a((()=>{Ew=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(Tw=globalThis).__zod_globalRegistry??(Tw.__zod_globalRegistry=ww()),Dw=globalThis.__zod_globalRegistry}));function kw(e,t){return new e({type:`string`,...q(t)})}function Aw(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...q(t)})}function jw(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...q(t)})}function Mw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...q(t)})}function Nw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...q(t)})}function Pw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...q(t)})}function Fw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...q(t)})}function Iw(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...q(t)})}function Lw(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...q(t)})}function Rw(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...q(t)})}function zw(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...q(t)})}function Bw(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...q(t)})}function Vw(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...q(t)})}function Hw(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...q(t)})}function Uw(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...q(t)})}function Ww(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...q(t)})}function Gw(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...q(t)})}function Kw(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...q(t)})}function qw(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...q(t)})}function Jw(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...q(t)})}function Yw(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...q(t)})}function Xw(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...q(t)})}function Zw(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...q(t)})}function Qw(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...q(t)})}function $w(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...q(t)})}function eT(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...q(t)})}function tT(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...q(t)})}function nT(e,t){return new e({type:`number`,checks:[],...q(t)})}function rT(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...q(t)})}function iT(e,t){return new e({type:`boolean`,...q(t)})}function aT(e,t){return new e({type:`undefined`,...q(t)})}function oT(e,t){return new e({type:`null`,...q(t)})}function sT(e){return new e({type:`unknown`})}function cT(e,t){return new e({type:`never`,...q(t)})}function lT(e,t){return new RS({check:`less_than`,...q(t),value:e,inclusive:!1})}function uT(e,t){return new RS({check:`less_than`,...q(t),value:e,inclusive:!0})}function dT(e,t){return new zS({check:`greater_than`,...q(t),value:e,inclusive:!1})}function fT(e,t){return new zS({check:`greater_than`,...q(t),value:e,inclusive:!0})}function pT(e,t){return new BS({check:`multiple_of`,...q(t),value:e})}function mT(e,t){return new HS({check:`max_length`,...q(t),maximum:e})}function hT(e,t){return new US({check:`min_length`,...q(t),minimum:e})}function gT(e,t){return new WS({check:`length_equals`,...q(t),length:e})}function _T(e,t){return new KS({check:`string_format`,format:`regex`,...q(t),pattern:e})}function vT(e){return new qS({check:`string_format`,format:`lowercase`,...q(e)})}function yT(e){return new JS({check:`string_format`,format:`uppercase`,...q(e)})}function bT(e,t){return new YS({check:`string_format`,format:`includes`,...q(t),includes:e})}function xT(e,t){return new XS({check:`string_format`,format:`starts_with`,...q(t),prefix:e})}function ST(e,t){return new ZS({check:`string_format`,format:`ends_with`,...q(t),suffix:e})}function CT(e){return new QS({check:`overwrite`,tx:e})}function wT(e){return CT(t=>t.normalize(e))}function TT(){return CT(e=>e.trim())}function ET(){return CT(e=>e.toLowerCase())}function DT(){return CT(e=>e.toUpperCase())}function OT(){return CT(e=>ox(e))}function kT(e,t,n){return new e({type:`array`,element:t,...q(n)})}function AT(e,t,n){let r=q(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function jT(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...q(n)})}function MT(e,t){let n=NT(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ox(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Ox(r))}},e(t.value,t)),t);return n}function NT(e,t){let n=new IS({check:`custom`,...q(t)});return n._zod.check=e,n}var PT=a((()=>{$S(),Px()}));function FT(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Dw,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function IT(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,IT(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&zT(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function LT(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
111
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Sx,s=!cx.jitless,c=s&&Kx.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?TC([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}}),_w=K(`$ZodUnion`,(e,t)=>{FC.init(e,t),_x(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),_x(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),_x(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),_x(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>hx(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>EC(t,r,e,i)):EC(o,r,e,i)}}),vw=K(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,_w.init(e,t);let n=e._zod.parse;_x(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=px(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!Sx(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),yw=K(`$ZodIntersection`,(e,t)=>{FC.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>OC(e,t,n)):OC(e,i,a)}}),bw=K(`$ZodRecord`,(e,t)=>{FC.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Cx(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>Bx(e,r,ix())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...Rx(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...Rx(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&WS.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Bx(e,r,ix())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...Rx(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...Rx(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),xw=K(`$ZodEnum`,(e,t)=>{FC.init(e,t);let n=ux(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>qx.has(typeof e)).map(e=>typeof e==`string`?Tx(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Sw=K(`$ZodLiteral`,(e,t)=>{if(FC.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?Tx(e):e?Tx(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Cw=K(`$ZodTransform`,(e,t)=>{FC.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new sx(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new ox;return n.value=i,n.fallback=!0,n}}),ww=K(`$ZodOptional`,(e,t)=>{FC.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,_x(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_x(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${hx(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>kC(e,r)):kC(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Tw=K(`$ZodExactOptional`,(e,t)=>{ww.init(e,t),_x(e._zod,`values`,()=>t.innerType._zod.values),_x(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ew=K(`$ZodNullable`,(e,t)=>{FC.init(e,t),_x(e._zod,`optin`,()=>t.innerType._zod.optin),_x(e._zod,`optout`,()=>t.innerType._zod.optout),_x(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${hx(e.source)}|null)$`):void 0}),_x(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Dw=K(`$ZodDefault`,(e,t)=>{FC.init(e,t),e._zod.optin=`optional`,_x(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>AC(e,t)):AC(r,t)}}),Ow=K(`$ZodPrefault`,(e,t)=>{FC.init(e,t),e._zod.optin=`optional`,_x(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),kw=K(`$ZodNonOptional`,(e,t)=>{FC.init(e,t),_x(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>jC(t,e)):jC(i,e)}}),Aw=K(`$ZodCatch`,(e,t)=>{FC.init(e,t),e._zod.optin=`optional`,_x(e._zod,`optout`,()=>t.innerType._zod.optout),_x(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Bx(e,n,ix()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Bx(e,n,ix()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),jw=K(`$ZodPipe`,(e,t)=>{FC.init(e,t),_x(e._zod,`values`,()=>t.in._zod.values),_x(e._zod,`optin`,()=>t.in._zod.optin),_x(e._zod,`optout`,()=>t.out._zod.optout),_x(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>MC(e,t.in,n)):MC(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>MC(e,t.out,n)):MC(r,t.out,n)}}),Mw=K(`$ZodPreprocess`,(e,t)=>{jw.init(e,t)}),Nw=K(`$ZodReadonly`,(e,t)=>{FC.init(e,t),_x(e._zod,`propValues`,()=>t.innerType._zod.propValues),_x(e._zod,`values`,()=>t.innerType._zod.values),_x(e._zod,`optin`,()=>t.innerType?._zod?.optin),_x(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(NC):NC(r)}}),Pw=K(`$ZodCustom`,(e,t)=>{ZS.init(e,t),FC.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>PC(t,n,r,e));PC(i,n,r,e)}})}));function Iw(){return{localeError:Lw()}}var Lw,Rw=a((()=>{Yx(),Lw=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=Hx(e.input);return`Invalid input: expected ${t}, received ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Dx(e.values[0])}`:`Invalid option: expected one of ${dx(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${dx(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function zw(){return new Vw}var Bw,Vw,Hw,Uw=a((()=>{Vw=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(Bw=globalThis).__zod_globalRegistry??(Bw.__zod_globalRegistry=zw()),Hw=globalThis.__zod_globalRegistry}));function Ww(e,t){return new e({type:`string`,...q(t)})}function Gw(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...q(t)})}function Kw(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...q(t)})}function qw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...q(t)})}function Jw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...q(t)})}function Yw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...q(t)})}function Xw(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...q(t)})}function Zw(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...q(t)})}function Qw(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...q(t)})}function $w(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...q(t)})}function eT(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...q(t)})}function tT(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...q(t)})}function nT(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...q(t)})}function rT(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...q(t)})}function iT(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...q(t)})}function aT(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...q(t)})}function oT(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...q(t)})}function sT(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...q(t)})}function cT(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...q(t)})}function lT(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...q(t)})}function uT(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...q(t)})}function dT(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...q(t)})}function fT(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...q(t)})}function pT(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...q(t)})}function mT(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...q(t)})}function hT(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...q(t)})}function gT(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...q(t)})}function _T(e,t){return new e({type:`number`,checks:[],...q(t)})}function vT(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...q(t)})}function yT(e,t){return new e({type:`boolean`,...q(t)})}function bT(e,t){return new e({type:`undefined`,...q(t)})}function xT(e,t){return new e({type:`null`,...q(t)})}function ST(e){return new e({type:`unknown`})}function CT(e,t){return new e({type:`never`,...q(t)})}function wT(e,t){return new $S({check:`less_than`,...q(t),value:e,inclusive:!1})}function TT(e,t){return new $S({check:`less_than`,...q(t),value:e,inclusive:!0})}function ET(e,t){return new eC({check:`greater_than`,...q(t),value:e,inclusive:!1})}function DT(e,t){return new eC({check:`greater_than`,...q(t),value:e,inclusive:!0})}function OT(e,t){return new tC({check:`multiple_of`,...q(t),value:e})}function kT(e,t){return new rC({check:`max_length`,...q(t),maximum:e})}function AT(e,t){return new iC({check:`min_length`,...q(t),minimum:e})}function jT(e,t){return new aC({check:`length_equals`,...q(t),length:e})}function MT(e,t){return new sC({check:`string_format`,format:`regex`,...q(t),pattern:e})}function NT(e){return new cC({check:`string_format`,format:`lowercase`,...q(e)})}function PT(e){return new lC({check:`string_format`,format:`uppercase`,...q(e)})}function FT(e,t){return new uC({check:`string_format`,format:`includes`,...q(t),includes:e})}function IT(e,t){return new dC({check:`string_format`,format:`starts_with`,...q(t),prefix:e})}function LT(e,t){return new fC({check:`string_format`,format:`ends_with`,...q(t),suffix:e})}function RT(e){return new pC({check:`overwrite`,tx:e})}function zT(e){return RT(t=>t.normalize(e))}function BT(){return RT(e=>e.trim())}function VT(){return RT(e=>e.toLowerCase())}function HT(){return RT(e=>e.toUpperCase())}function UT(){return RT(e=>xx(e))}function WT(e,t,n){return new e({type:`array`,element:t,...q(n)})}function GT(e,t,n){let r=q(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function KT(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...q(n)})}function qT(e,t){let n=JT(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ux(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Ux(r))}},e(t.value,t)),t);return n}function JT(e,t){let n=new ZS({check:`custom`,...q(t)});return n._zod.check=e,n}var YT=a((()=>{mC(),Yx()}));function XT(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Hw,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function ZT(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,ZT(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&eE(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function QT(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
112
112
 
113
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function RT(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:VT(t,`input`,e.processors),output:VT(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function zT(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return zT(r.element,n);if(r.type===`set`)return zT(r.valueType,n);if(r.type===`lazy`)return zT(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return zT(r.innerType,n);if(r.type===`intersection`)return zT(r.left,n)||zT(r.right,n);if(r.type===`record`||r.type===`map`)return zT(r.keyType,n)||zT(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:zT(r.in,n)||zT(r.out,n);if(r.type===`object`){for(let e in r.shape)if(zT(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(zT(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(zT(e,n))return!0;return!!(r.rest&&zT(r.rest,n))}return!1}var BT,VT,HT=a((()=>{Ow(),BT=(e,t={})=>n=>{let r=FT({...n,processors:t});return IT(e,r),LT(r,e),RT(r,e)},VT=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=FT({...i??{},target:a,io:t,processors:n});return IT(e,o),LT(o,e),RT(o,e)}})),UT,WT,GT,KT,qT,JT,YT,XT,ZT,QT,$T,eE,tE,nE,rE,iE,aE,oE,sE,cE,lE,uE,dE,fE,pE,mE=a((()=>{HT(),Px(),UT={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},WT=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=UT[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},GT=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},KT=(e,t,n,r)=>{n.type=`boolean`},qT=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},JT=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},YT=(e,t,n,r)=>{n.not={}},XT=(e,t,n,r)=>{},ZT=(e,t,n,r)=>{let i=e._zod.def,a=Yb(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},QT=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},$T=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},eE=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},tE=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=IT(a.element,t,{...r,path:[...r.path,`items`]})},nE=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=IT(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=IT(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},rE=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>IT(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},iE=(e,t,n,r)=>{let i=e._zod.def,a=IT(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=IT(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},aE=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=IT(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=IT(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=IT(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},oE=(e,t,n,r)=>{let i=e._zod.def,a=IT(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},sE=(e,t,n,r)=>{let i=e._zod.def;IT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},cE=(e,t,n,r)=>{let i=e._zod.def;IT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},lE=(e,t,n,r)=>{let i=e._zod.def;IT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},uE=(e,t,n,r)=>{let i=e._zod.def;IT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},dE=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;IT(o,t,r);let s=t.seen.get(e);s.ref=o},fE=(e,t,n,r)=>{let i=e._zod.def;IT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},pE=(e,t,n,r)=>{let i=e._zod.def;IT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType}})),hE=a((()=>{Jb(),tS(),Bx(),bw(),$S(),rC(),Px(),FS(),Cw(),Ow(),tC(),PT(),HT(),mE(),HT()})),gE=a((()=>{hE()}));function _E(e){return Qw(xE,e)}function vE(e){return $w(SE,e)}function yE(e){return eT(CE,e)}function bE(e){return tT(wE,e)}var xE,SE,CE,wE,TE=a((()=>{hE(),dO(),xE=K(`ZodISODateTime`,(e,t)=>{PC.init(e,t),vD.init(e,t)}),SE=K(`ZodISODate`,(e,t)=>{FC.init(e,t),vD.init(e,t)}),CE=K(`ZodISOTime`,(e,t)=>{IC.init(e,t),vD.init(e,t)}),wE=K(`ZodISODuration`,(e,t)=>{LC.init(e,t),vD.init(e,t)})})),EE,DE,OE=a((()=>{hE(),Px(),EE=(e,t)=>{Rx.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Ix(e,t)},flatten:{value:t=>Fx(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Zb,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Zb,2)}},isEmpty:{get(){return e.issues.length===0}}})},DE=K(`ZodError`,EE,{Parent:Error})})),kE,AE,jE,ME,NE,PE,FE,IE,LE,RE,zE,BE,VE=a((()=>{hE(),OE(),kE=Vx(DE),AE=Hx(DE),jE=Ux(DE),ME=Gx(DE),NE=qx(DE),PE=Jx(DE),FE=Yx(DE),IE=Xx(DE),LE=Zx(DE),RE=Qx(DE),zE=$x(DE),BE=eS(DE)}));function HE(e,t,n){let r=Object.getPrototypeOf(e),i=mD.get(r);if(i||(i=new Set,mD.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}function J(e){return kw(_D,e)}function Y(e){return nT(RD,e)}function UE(e){return rT(zD,e)}function WE(e){return iT(BD,e)}function GE(e){return aT(VD,e)}function KE(e){return oT(HD,e)}function qE(){return sT(UD)}function JE(e){return cT(WD,e)}function X(e,t){return kT(GD,e,t)}function Z(e,t){return new KD({type:`object`,shape:e??{},...q(t)})}function YE(e,t){return new KD({type:`object`,shape:e,catchall:qE(),...q(t)})}function Q(e,t){return new qD({type:`union`,options:e,...q(t)})}function XE(e,t,n){return new JD({type:`union`,options:t,discriminator:e,...q(n)})}function ZE(e,t){return new YD({type:`intersection`,left:e,right:t})}function QE(e,t,n){return!t||!t._zod?new XD({type:`record`,keyType:J(),valueType:e,...q(t)}):new XD({type:`record`,keyType:e,valueType:t,...q(n)})}function $E(e,t){return new ZD({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...q(t)})}function $(e,t){return new QD({type:`literal`,values:Array.isArray(e)?e:[e],...q(t)})}function eD(e){return new $D({type:`transform`,transform:e})}function tD(e){return new eO({type:`optional`,innerType:e})}function nD(e){return new tO({type:`optional`,innerType:e})}function rD(e){return new nO({type:`nullable`,innerType:e})}function iD(e,t){return new rO({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():lx(t)}})}function aD(e,t){return new iO({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():lx(t)}})}function oD(e,t){return new aO({type:`nonoptional`,innerType:e,...q(t)})}function sD(e,t){return new oO({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}function cD(e,t){return new sO({type:`pipe`,in:e,out:t})}function lD(e){return new lO({type:`readonly`,innerType:e})}function uD(e,t){return AT(uO,e??(()=>!0),t)}function dD(e,t={}){return jT(uO,e,t)}function fD(e,t){return MT(e,t)}function pD(e,t){return new cO({type:`pipe`,in:eD(e),out:t})}var mD,hD,gD,_D,vD,yD,bD,xD,SD,CD,wD,TD,ED,DD,OD,kD,AD,jD,MD,ND,PD,FD,ID,LD,RD,zD,BD,VD,HD,UD,WD,GD,KD,qD,JD,YD,XD,ZD,QD,$D,eO,tO,nO,rO,iO,aO,oO,sO,cO,lO,uO,dO=a((()=>{hE(),mE(),HT(),gE(),TE(),VE(),mD=new WeakMap,hD=K(`ZodType`,(e,t)=>(bC.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:VT(e,`input`),output:VT(e,`output`)}}),e.toJSONSchema=BT(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>kE(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>jE(e,t,n),e.parseAsync=async(t,n)=>AE(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ME(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>NE(e,t,n),e.decode=(t,n)=>PE(e,t,n),e.encodeAsync=async(t,n)=>FE(e,t,n),e.decodeAsync=async(t,n)=>IE(e,t,n),e.safeEncode=(t,n)=>LE(e,t,n),e.safeDecode=(t,n)=>RE(e,t,n),e.safeEncodeAsync=async(t,n)=>zE(e,t,n),e.safeDecodeAsync=async(t,n)=>BE(e,t,n),HE(e,`ZodType`,{check(...e){let t=this.def;return this.clone(ix(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return dx(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(dD(e,t))},superRefine(e,t){return this.check(fD(e,t))},overwrite(e){return this.check(CT(e))},optional(){return tD(this)},exactOptional(){return nD(this)},nullable(){return rD(this)},nullish(){return tD(rD(this))},nonoptional(e){return oD(this,e)},array(){return X(this)},or(e){return Q([this,e])},and(e){return ZE(this,e)},transform(e){return cD(this,eD(e))},default(e){return iD(this,e)},prefault(e){return aD(this,e)},catch(e){return sD(this,e)},pipe(e){return cD(this,e)},readonly(){return lD(this)},describe(e){let t=this.clone();return Dw.add(t,{description:e}),t},meta(...e){if(e.length===0)return Dw.get(this);let t=this.clone();return Dw.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return Dw.get(e)?.description},configurable:!0}),e)),gD=K(`_ZodString`,(e,t)=>{xC.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>WT(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,HE(e,`_ZodString`,{regex(...e){return this.check(_T(...e))},includes(...e){return this.check(bT(...e))},startsWith(...e){return this.check(xT(...e))},endsWith(...e){return this.check(ST(...e))},min(...e){return this.check(hT(...e))},max(...e){return this.check(mT(...e))},length(...e){return this.check(gT(...e))},nonempty(...e){return this.check(hT(1,...e))},lowercase(e){return this.check(vT(e))},uppercase(e){return this.check(yT(e))},trim(){return this.check(TT())},normalize(...e){return this.check(wT(...e))},toLowerCase(){return this.check(ET())},toUpperCase(){return this.check(DT())},slugify(){return this.check(OT())}})}),_D=K(`ZodString`,(e,t)=>{xC.init(e,t),gD.init(e,t),e.email=t=>e.check(Aw(yD,t)),e.url=t=>e.check(Iw(SD,t)),e.jwt=t=>e.check(Zw(LD,t)),e.emoji=t=>e.check(Lw(CD,t)),e.guid=t=>e.check(jw(bD,t)),e.uuid=t=>e.check(Mw(xD,t)),e.uuidv4=t=>e.check(Nw(xD,t)),e.uuidv6=t=>e.check(Pw(xD,t)),e.uuidv7=t=>e.check(Fw(xD,t)),e.nanoid=t=>e.check(Rw(wD,t)),e.guid=t=>e.check(jw(bD,t)),e.cuid=t=>e.check(zw(TD,t)),e.cuid2=t=>e.check(Bw(ED,t)),e.ulid=t=>e.check(Vw(DD,t)),e.base64=t=>e.check(Jw(PD,t)),e.base64url=t=>e.check(Yw(FD,t)),e.xid=t=>e.check(Hw(OD,t)),e.ksuid=t=>e.check(Uw(kD,t)),e.ipv4=t=>e.check(Ww(AD,t)),e.ipv6=t=>e.check(Gw(jD,t)),e.cidrv4=t=>e.check(Kw(MD,t)),e.cidrv6=t=>e.check(qw(ND,t)),e.e164=t=>e.check(Xw(ID,t)),e.datetime=t=>e.check(_E(t)),e.date=t=>e.check(vE(t)),e.time=t=>e.check(yE(t)),e.duration=t=>e.check(bE(t))}),vD=K(`ZodStringFormat`,(e,t)=>{SC.init(e,t),gD.init(e,t)}),yD=K(`ZodEmail`,(e,t)=>{TC.init(e,t),vD.init(e,t)}),bD=K(`ZodGUID`,(e,t)=>{CC.init(e,t),vD.init(e,t)}),xD=K(`ZodUUID`,(e,t)=>{wC.init(e,t),vD.init(e,t)}),SD=K(`ZodURL`,(e,t)=>{EC.init(e,t),vD.init(e,t)}),CD=K(`ZodEmoji`,(e,t)=>{DC.init(e,t),vD.init(e,t)}),wD=K(`ZodNanoID`,(e,t)=>{OC.init(e,t),vD.init(e,t)}),TD=K(`ZodCUID`,(e,t)=>{kC.init(e,t),vD.init(e,t)}),ED=K(`ZodCUID2`,(e,t)=>{AC.init(e,t),vD.init(e,t)}),DD=K(`ZodULID`,(e,t)=>{jC.init(e,t),vD.init(e,t)}),OD=K(`ZodXID`,(e,t)=>{MC.init(e,t),vD.init(e,t)}),kD=K(`ZodKSUID`,(e,t)=>{NC.init(e,t),vD.init(e,t)}),AD=K(`ZodIPv4`,(e,t)=>{RC.init(e,t),vD.init(e,t)}),jD=K(`ZodIPv6`,(e,t)=>{zC.init(e,t),vD.init(e,t)}),MD=K(`ZodCIDRv4`,(e,t)=>{BC.init(e,t),vD.init(e,t)}),ND=K(`ZodCIDRv6`,(e,t)=>{VC.init(e,t),vD.init(e,t)}),PD=K(`ZodBase64`,(e,t)=>{HC.init(e,t),vD.init(e,t)}),FD=K(`ZodBase64URL`,(e,t)=>{UC.init(e,t),vD.init(e,t)}),ID=K(`ZodE164`,(e,t)=>{WC.init(e,t),vD.init(e,t)}),LD=K(`ZodJWT`,(e,t)=>{GC.init(e,t),vD.init(e,t)}),RD=K(`ZodNumber`,(e,t)=>{KC.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>GT(e,t,n,r),HE(e,`ZodNumber`,{gt(e,t){return this.check(dT(e,t))},gte(e,t){return this.check(fT(e,t))},min(e,t){return this.check(fT(e,t))},lt(e,t){return this.check(lT(e,t))},lte(e,t){return this.check(uT(e,t))},max(e,t){return this.check(uT(e,t))},int(e){return this.check(UE(e))},safe(e){return this.check(UE(e))},positive(e){return this.check(dT(0,e))},nonnegative(e){return this.check(fT(0,e))},negative(e){return this.check(lT(0,e))},nonpositive(e){return this.check(uT(0,e))},multipleOf(e,t){return this.check(pT(e,t))},step(e,t){return this.check(pT(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),zD=K(`ZodNumberFormat`,(e,t)=>{qC.init(e,t),RD.init(e,t)}),BD=K(`ZodBoolean`,(e,t)=>{JC.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>KT(e,t,n,r)}),VD=K(`ZodUndefined`,(e,t)=>{YC.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>JT(e,t,n,r)}),HD=K(`ZodNull`,(e,t)=>{XC.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qT(e,t,n,r)}),UD=K(`ZodUnknown`,(e,t)=>{ZC.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XT(e,t,n,r)}),WD=K(`ZodNever`,(e,t)=>{QC.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YT(e,t,n,r)}),GD=K(`ZodArray`,(e,t)=>{$C.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tE(e,t,n,r),e.element=t.element,HE(e,`ZodArray`,{min(e,t){return this.check(hT(e,t))},nonempty(e){return this.check(hT(1,e))},max(e,t){return this.check(mT(e,t))},length(e,t){return this.check(gT(e,t))},unwrap(){return this.element}})}),KD=K(`ZodObject`,(e,t)=>{tw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nE(e,t,n,r),nx(e,`shape`,()=>t.shape),HE(e,`ZodObject`,{keyof(){return $E(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:qE()})},loose(){return this.clone({...this._zod.def,catchall:qE()})},strict(){return this.clone({...this._zod.def,catchall:JE()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return gx(this,e)},safeExtend(e){return _x(this,e)},merge(e){return vx(this,e)},pick(e){return mx(this,e)},omit(e){return hx(this,e)},partial(...e){return yx(eO,this,e[0])},required(...e){return bx(aO,this,e[0])}})}),qD=K(`ZodUnion`,(e,t)=>{nw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rE(e,t,n,r),e.options=t.options}),JD=K(`ZodDiscriminatedUnion`,(e,t)=>{qD.init(e,t),rw.init(e,t)}),YD=K(`ZodIntersection`,(e,t)=>{iw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iE(e,t,n,r)}),XD=K(`ZodRecord`,(e,t)=>{aw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aE(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),ZD=K(`ZodEnum`,(e,t)=>{ow.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZT(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new ZD({...t,checks:[],...q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new ZD({...t,checks:[],...q(r),entries:i})}}),QD=K(`ZodLiteral`,(e,t)=>{sw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QT(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),$D=K(`ZodTransform`,(e,t)=>{cw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eE(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Kb(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ox(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Ox(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}}),eO=K(`ZodOptional`,(e,t)=>{lw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),tO=K(`ZodExactOptional`,(e,t)=>{uw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),nO=K(`ZodNullable`,(e,t)=>{dw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),rO=K(`ZodDefault`,(e,t)=>{fw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),iO=K(`ZodPrefault`,(e,t)=>{pw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),aO=K(`ZodNonOptional`,(e,t)=>{mw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),oO=K(`ZodCatch`,(e,t)=>{hw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),sO=K(`ZodPipe`,(e,t)=>{gw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dE(e,t,n,r),e.in=t.in,e.out=t.out}),cO=K(`ZodPreprocess`,(e,t)=>{sO.init(e,t),_w.init(e,t)}),lO=K(`ZodReadonly`,(e,t)=>{vw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),uO=K(`ZodCustom`,(e,t)=>{yw.init(e,t),hD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$T(e,t,n,r)})})),fO,pO=a((()=>{hE(),fO||={}})),mO=a((()=>{hE(),dO(),gE(),OE(),VE(),pO(),Cw(),mE(),Ow(),gE(),TE(),dO(),Px(),Ub(xw())})),hO=a((()=>{mO(),mO()})),gO=a((()=>{hO()}));gO();var _O=`io.modelcontextprotocol/related-task`,vO=uD(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),yO=Q([J(),Y().int()]),bO=J();YE({ttl:Y().optional(),pollInterval:Y().optional()});var xO=Z({ttl:Y().optional()}),SO=Z({taskId:J()}),CO=YE({progressToken:yO.optional(),[_O]:SO.optional()}),wO=Z({_meta:CO.optional()}),TO=wO.extend({task:xO.optional()}),EO=e=>TO.safeParse(e).success,DO=Z({method:J(),params:wO.loose().optional()}),OO=Z({_meta:CO.optional()}),kO=Z({method:J(),params:OO.loose().optional()}),AO=YE({_meta:CO.optional()}),jO=Q([J(),Y().int()]),MO=Z({jsonrpc:$(`2.0`),id:jO,...DO.shape}).strict(),NO=e=>MO.safeParse(e).success,PO=Z({jsonrpc:$(`2.0`),...kO.shape}).strict(),FO=e=>PO.safeParse(e).success,IO=Z({jsonrpc:$(`2.0`),id:jO,result:AO}).strict(),LO=e=>IO.safeParse(e).success,RO;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(RO||={});var zO=Z({jsonrpc:$(`2.0`),id:jO.optional(),error:Z({code:Y().int(),message:J(),data:qE().optional()})}).strict(),BO=e=>zO.safeParse(e).success;Q([MO,PO,IO,zO]),Q([IO,zO]);var VO=AO.strict(),HO=OO.extend({requestId:jO.optional(),reason:J().optional()}),UO=kO.extend({method:$(`notifications/cancelled`),params:HO}),WO=Z({icons:X(Z({src:J(),mimeType:J().optional(),sizes:X(J()).optional(),theme:$E([`light`,`dark`]).optional()})).optional()}),GO=Z({name:J(),title:J().optional()}),KO=GO.extend({...GO.shape,...WO.shape,version:J(),websiteUrl:J().optional(),description:J().optional()}),qO=pD(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ZE(Z({form:ZE(Z({applyDefaults:WE().optional()}),QE(J(),qE())).optional(),url:vO.optional()}),QE(J(),qE()).optional())),JO=YE({list:vO.optional(),cancel:vO.optional(),requests:YE({sampling:YE({createMessage:vO.optional()}).optional(),elicitation:YE({create:vO.optional()}).optional()}).optional()}),YO=YE({list:vO.optional(),cancel:vO.optional(),requests:YE({tools:YE({call:vO.optional()}).optional()}).optional()}),XO=Z({experimental:QE(J(),vO).optional(),sampling:Z({context:vO.optional(),tools:vO.optional()}).optional(),elicitation:qO.optional(),roots:Z({listChanged:WE().optional()}).optional(),tasks:JO.optional(),extensions:QE(J(),vO).optional()}),ZO=wO.extend({protocolVersion:J(),capabilities:XO,clientInfo:KO}),QO=DO.extend({method:$(`initialize`),params:ZO}),$O=Z({experimental:QE(J(),vO).optional(),logging:vO.optional(),completions:vO.optional(),prompts:Z({listChanged:WE().optional()}).optional(),resources:Z({subscribe:WE().optional(),listChanged:WE().optional()}).optional(),tools:Z({listChanged:WE().optional()}).optional(),tasks:YO.optional(),extensions:QE(J(),vO).optional()}),ek=AO.extend({protocolVersion:J(),capabilities:$O,serverInfo:KO,instructions:J().optional()}),tk=kO.extend({method:$(`notifications/initialized`),params:OO.optional()}),nk=DO.extend({method:$(`ping`),params:wO.optional()}),rk=Z({progress:Y(),total:tD(Y()),message:tD(J())}),ik=Z({...OO.shape,...rk.shape,progressToken:yO}),ak=kO.extend({method:$(`notifications/progress`),params:ik}),ok=wO.extend({cursor:bO.optional()}),sk=DO.extend({params:ok.optional()}),ck=AO.extend({nextCursor:bO.optional()}),lk=$E([`working`,`input_required`,`completed`,`failed`,`cancelled`]),uk=Z({taskId:J(),status:lk,ttl:Q([Y(),KE()]),createdAt:J(),lastUpdatedAt:J(),pollInterval:tD(Y()),statusMessage:tD(J())}),dk=AO.extend({task:uk}),fk=OO.merge(uk),pk=kO.extend({method:$(`notifications/tasks/status`),params:fk}),mk=DO.extend({method:$(`tasks/get`),params:wO.extend({taskId:J()})}),hk=AO.merge(uk),gk=DO.extend({method:$(`tasks/result`),params:wO.extend({taskId:J()})});AO.loose();var _k=sk.extend({method:$(`tasks/list`)}),vk=ck.extend({tasks:X(uk)}),yk=DO.extend({method:$(`tasks/cancel`),params:wO.extend({taskId:J()})}),bk=AO.merge(uk),xk=Z({uri:J(),mimeType:tD(J()),_meta:QE(J(),qE()).optional()}),Sk=xk.extend({text:J()}),Ck=J().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),wk=xk.extend({blob:Ck}),Tk=$E([`user`,`assistant`]),Ek=Z({audience:X(Tk).optional(),priority:Y().min(0).max(1).optional(),lastModified:_E({offset:!0}).optional()}),Dk=Z({...GO.shape,...WO.shape,uri:J(),description:tD(J()),mimeType:tD(J()),size:tD(Y()),annotations:Ek.optional(),_meta:tD(YE({}))}),Ok=Z({...GO.shape,...WO.shape,uriTemplate:J(),description:tD(J()),mimeType:tD(J()),annotations:Ek.optional(),_meta:tD(YE({}))}),kk=sk.extend({method:$(`resources/list`)}),Ak=ck.extend({resources:X(Dk)}),jk=sk.extend({method:$(`resources/templates/list`)}),Mk=ck.extend({resourceTemplates:X(Ok)}),Nk=wO.extend({uri:J()}),Pk=Nk,Fk=DO.extend({method:$(`resources/read`),params:Pk}),Ik=AO.extend({contents:X(Q([Sk,wk]))}),Lk=kO.extend({method:$(`notifications/resources/list_changed`),params:OO.optional()}),Rk=Nk,zk=DO.extend({method:$(`resources/subscribe`),params:Rk}),Bk=Nk,Vk=DO.extend({method:$(`resources/unsubscribe`),params:Bk}),Hk=OO.extend({uri:J()}),Uk=kO.extend({method:$(`notifications/resources/updated`),params:Hk}),Wk=Z({name:J(),description:tD(J()),required:tD(WE())}),Gk=Z({...GO.shape,...WO.shape,description:tD(J()),arguments:tD(X(Wk)),_meta:tD(YE({}))}),Kk=sk.extend({method:$(`prompts/list`)}),qk=ck.extend({prompts:X(Gk)}),Jk=wO.extend({name:J(),arguments:QE(J(),J()).optional()}),Yk=DO.extend({method:$(`prompts/get`),params:Jk}),Xk=Z({type:$(`text`),text:J(),annotations:Ek.optional(),_meta:QE(J(),qE()).optional()}),Zk=Z({type:$(`image`),data:Ck,mimeType:J(),annotations:Ek.optional(),_meta:QE(J(),qE()).optional()}),Qk=Z({type:$(`audio`),data:Ck,mimeType:J(),annotations:Ek.optional(),_meta:QE(J(),qE()).optional()}),$k=Z({type:$(`tool_use`),name:J(),id:J(),input:QE(J(),qE()),_meta:QE(J(),qE()).optional()}),eA=Z({type:$(`resource`),resource:Q([Sk,wk]),annotations:Ek.optional(),_meta:QE(J(),qE()).optional()}),tA=Dk.extend({type:$(`resource_link`)}),nA=Q([Xk,Zk,Qk,tA,eA]),rA=Z({role:Tk,content:nA}),iA=AO.extend({description:J().optional(),messages:X(rA)}),aA=kO.extend({method:$(`notifications/prompts/list_changed`),params:OO.optional()}),oA=Z({title:J().optional(),readOnlyHint:WE().optional(),destructiveHint:WE().optional(),idempotentHint:WE().optional(),openWorldHint:WE().optional()}),sA=Z({taskSupport:$E([`required`,`optional`,`forbidden`]).optional()}),cA=Z({...GO.shape,...WO.shape,description:J().optional(),inputSchema:Z({type:$(`object`),properties:QE(J(),vO).optional(),required:X(J()).optional()}).catchall(qE()),outputSchema:Z({type:$(`object`),properties:QE(J(),vO).optional(),required:X(J()).optional()}).catchall(qE()).optional(),annotations:oA.optional(),execution:sA.optional(),_meta:QE(J(),qE()).optional()}),lA=sk.extend({method:$(`tools/list`)}),uA=ck.extend({tools:X(cA)}),dA=AO.extend({content:X(nA).default([]),structuredContent:QE(J(),qE()).optional(),isError:WE().optional()});dA.or(AO.extend({toolResult:qE()}));var fA=TO.extend({name:J(),arguments:QE(J(),qE()).optional()}),pA=DO.extend({method:$(`tools/call`),params:fA}),mA=kO.extend({method:$(`notifications/tools/list_changed`),params:OO.optional()});Z({autoRefresh:WE().default(!0),debounceMs:Y().int().nonnegative().default(300)});var hA=$E([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),gA=wO.extend({level:hA}),_A=DO.extend({method:$(`logging/setLevel`),params:gA}),vA=OO.extend({level:hA,logger:J().optional(),data:qE()}),yA=kO.extend({method:$(`notifications/message`),params:vA}),bA=Z({hints:X(Z({name:J().optional()})).optional(),costPriority:Y().min(0).max(1).optional(),speedPriority:Y().min(0).max(1).optional(),intelligencePriority:Y().min(0).max(1).optional()}),xA=Z({mode:$E([`auto`,`required`,`none`]).optional()}),SA=Z({type:$(`tool_result`),toolUseId:J().describe(`The unique identifier for the corresponding tool call.`),content:X(nA).default([]),structuredContent:Z({}).loose().optional(),isError:WE().optional(),_meta:QE(J(),qE()).optional()}),CA=XE(`type`,[Xk,Zk,Qk]),wA=XE(`type`,[Xk,Zk,Qk,$k,SA]),TA=Z({role:Tk,content:Q([wA,X(wA)]),_meta:QE(J(),qE()).optional()}),EA=TO.extend({messages:X(TA),modelPreferences:bA.optional(),systemPrompt:J().optional(),includeContext:$E([`none`,`thisServer`,`allServers`]).optional(),temperature:Y().optional(),maxTokens:Y().int(),stopSequences:X(J()).optional(),metadata:vO.optional(),tools:X(cA).optional(),toolChoice:xA.optional()}),DA=DO.extend({method:$(`sampling/createMessage`),params:EA}),OA=AO.extend({model:J(),stopReason:tD($E([`endTurn`,`stopSequence`,`maxTokens`]).or(J())),role:Tk,content:CA}),kA=AO.extend({model:J(),stopReason:tD($E([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(J())),role:Tk,content:Q([wA,X(wA)])}),AA=Z({type:$(`boolean`),title:J().optional(),description:J().optional(),default:WE().optional()}),jA=Z({type:$(`string`),title:J().optional(),description:J().optional(),minLength:Y().optional(),maxLength:Y().optional(),format:$E([`email`,`uri`,`date`,`date-time`]).optional(),default:J().optional()}),MA=Z({type:$E([`number`,`integer`]),title:J().optional(),description:J().optional(),minimum:Y().optional(),maximum:Y().optional(),default:Y().optional()}),NA=Z({type:$(`string`),title:J().optional(),description:J().optional(),enum:X(J()),default:J().optional()}),PA=Z({type:$(`string`),title:J().optional(),description:J().optional(),oneOf:X(Z({const:J(),title:J()})),default:J().optional()}),FA=Q([Q([Z({type:$(`string`),title:J().optional(),description:J().optional(),enum:X(J()),enumNames:X(J()).optional(),default:J().optional()}),Q([NA,PA]),Q([Z({type:$(`array`),title:J().optional(),description:J().optional(),minItems:Y().optional(),maxItems:Y().optional(),items:Z({type:$(`string`),enum:X(J())}),default:X(J()).optional()}),Z({type:$(`array`),title:J().optional(),description:J().optional(),minItems:Y().optional(),maxItems:Y().optional(),items:Z({anyOf:X(Z({const:J(),title:J()}))}),default:X(J()).optional()})])]),AA,jA,MA]),IA=Q([TO.extend({mode:$(`form`).optional(),message:J(),requestedSchema:Z({type:$(`object`),properties:QE(J(),FA),required:X(J()).optional()})}),TO.extend({mode:$(`url`),message:J(),elicitationId:J(),url:J().url()})]),LA=DO.extend({method:$(`elicitation/create`),params:IA}),RA=OO.extend({elicitationId:J()}),zA=kO.extend({method:$(`notifications/elicitation/complete`),params:RA}),BA=AO.extend({action:$E([`accept`,`decline`,`cancel`]),content:pD(e=>e===null?void 0:e,QE(J(),Q([J(),Y(),WE(),X(J())])).optional())}),VA=Z({type:$(`ref/resource`),uri:J()}),HA=Z({type:$(`ref/prompt`),name:J()}),UA=wO.extend({ref:Q([HA,VA]),argument:Z({name:J(),value:J()}),context:Z({arguments:QE(J(),J()).optional()}).optional()}),WA=DO.extend({method:$(`completion/complete`),params:UA}),GA=AO.extend({completion:YE({values:X(J()).max(100),total:tD(Y().int()),hasMore:tD(WE())})}),KA=Z({uri:J().startsWith(`file://`),name:J().optional(),_meta:QE(J(),qE()).optional()}),qA=DO.extend({method:$(`roots/list`),params:wO.optional()}),JA=AO.extend({roots:X(KA)}),YA=kO.extend({method:$(`notifications/roots/list_changed`),params:OO.optional()});Q([nk,QO,WA,_A,Yk,Kk,kk,jk,Fk,zk,Vk,pA,lA,mk,gk,_k,yk]),Q([UO,ak,tk,YA,pk]),Q([VO,OA,kA,BA,JA,hk,vk,dk]),Q([nk,DA,LA,qA,mk,gk,_k,yk]),Q([UO,ak,yA,Uk,Lk,mA,aA,pk,zA]),Q([VO,ek,GA,iA,qk,Ak,Mk,Ik,dA,uA,hk,vk,dk]);var XA=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===RO.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new ZA(e.elicitations,n)}return new e(t,n,r)}},ZA=class extends XA{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(RO.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};PT(),Px(),FS(),Jb(),tS(),mE(),Bx(),init_locales(),hE(),Ow();function QA(e){return!!e._zod}function $A(e,t){return QA(e)?Wx(e,t):e.safeParse(t)}function ej(e){if(!e)return;let t;if(t=QA(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function tj(e){if(QA(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}function nj(e){return e===`completed`||e===`failed`||e===`cancelled`}function rj(e){let t=ej(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=tj(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function ij(e,t){let n=$A(e,t);if(!n.success)throw n.error;return n.data}var aj=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(UO,e=>{this._oncancel(e)}),this.setNotificationHandler(ak,e=>{this._onprogress(e)}),this.setRequestHandler(nk,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(mk,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new XA(RO.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(gk,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r)if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new XA(e.error.code,e.error.message,e.error.data))}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new XA(RO.InvalidParams,`Task not found: ${r}`);if(!nj(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(nj(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[_O]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(_k,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new XA(RO.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(yk,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new XA(RO.InvalidParams,`Task not found: ${e.params.taskId}`);if(nj(n.status))throw new XA(RO.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new XA(RO.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof XA?e:new XA(RO.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),XA.fromError(RO.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),LO(e)||BO(e)?this._onresponse(e):NO(e)?this._onrequest(e,t):FO(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=XA.fromError(RO.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[_O]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:RO.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=EO(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new XA(RO.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:RO.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),LO(e)?n(e):n(new XA(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(LO(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),LO(e)?r(e):r(XA.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof XA?e:new XA(RO.InternalError,String(e))}}return}let i;try{let r=await this.request(e,dk,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new XA(RO.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},nj(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new XA(RO.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new XA(RO.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof XA?e:new XA(RO.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[_O]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof XA?e:new XA(RO.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=$A(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(XA.fromError(RO.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},hk,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},vk,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},bk,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[_O]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[_O]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[_O]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=rj(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=ij(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=rj(e);this._notificationHandlers.set(n,n=>{let r=ij(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&NO(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new XA(RO.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new XA(RO.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new XA(RO.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new XA(RO.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=pk.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),nj(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new XA(RO.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(nj(a.status))throw new XA(RO.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=pk.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),nj(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};gO(),(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var oj=class extends aj{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},sj=`2026-01-26`,cj=Q([$(`light`),$(`dark`)]).describe(`Color theme preference for the host environment.`),lj=Q([$(`inline`),$(`fullscreen`),$(`pip`)]).describe(`Display mode for UI presentation.`),uj=QE(Q([$(`--color-background-primary`),$(`--color-background-secondary`),$(`--color-background-tertiary`),$(`--color-background-inverse`),$(`--color-background-ghost`),$(`--color-background-info`),$(`--color-background-danger`),$(`--color-background-success`),$(`--color-background-warning`),$(`--color-background-disabled`),$(`--color-text-primary`),$(`--color-text-secondary`),$(`--color-text-tertiary`),$(`--color-text-inverse`),$(`--color-text-ghost`),$(`--color-text-info`),$(`--color-text-danger`),$(`--color-text-success`),$(`--color-text-warning`),$(`--color-text-disabled`),$(`--color-border-primary`),$(`--color-border-secondary`),$(`--color-border-tertiary`),$(`--color-border-inverse`),$(`--color-border-ghost`),$(`--color-border-info`),$(`--color-border-danger`),$(`--color-border-success`),$(`--color-border-warning`),$(`--color-border-disabled`),$(`--color-ring-primary`),$(`--color-ring-secondary`),$(`--color-ring-inverse`),$(`--color-ring-info`),$(`--color-ring-danger`),$(`--color-ring-success`),$(`--color-ring-warning`),$(`--font-sans`),$(`--font-mono`),$(`--font-weight-normal`),$(`--font-weight-medium`),$(`--font-weight-semibold`),$(`--font-weight-bold`),$(`--font-text-xs-size`),$(`--font-text-sm-size`),$(`--font-text-md-size`),$(`--font-text-lg-size`),$(`--font-heading-xs-size`),$(`--font-heading-sm-size`),$(`--font-heading-md-size`),$(`--font-heading-lg-size`),$(`--font-heading-xl-size`),$(`--font-heading-2xl-size`),$(`--font-heading-3xl-size`),$(`--font-text-xs-line-height`),$(`--font-text-sm-line-height`),$(`--font-text-md-line-height`),$(`--font-text-lg-line-height`),$(`--font-heading-xs-line-height`),$(`--font-heading-sm-line-height`),$(`--font-heading-md-line-height`),$(`--font-heading-lg-line-height`),$(`--font-heading-xl-line-height`),$(`--font-heading-2xl-line-height`),$(`--font-heading-3xl-line-height`),$(`--border-radius-xs`),$(`--border-radius-sm`),$(`--border-radius-md`),$(`--border-radius-lg`),$(`--border-radius-xl`),$(`--border-radius-full`),$(`--border-width-regular`),$(`--shadow-hairline`),$(`--shadow-sm`),$(`--shadow-md`),$(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.
113
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function $T(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:nE(t,`input`,e.processors),output:nE(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function eE(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return eE(r.element,n);if(r.type===`set`)return eE(r.valueType,n);if(r.type===`lazy`)return eE(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return eE(r.innerType,n);if(r.type===`intersection`)return eE(r.left,n)||eE(r.right,n);if(r.type===`record`||r.type===`map`)return eE(r.keyType,n)||eE(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:eE(r.in,n)||eE(r.out,n);if(r.type===`object`){for(let e in r.shape)if(eE(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(eE(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(eE(e,n))return!0;return!!(r.rest&&eE(r.rest,n))}return!1}var tE,nE,rE=a((()=>{Uw(),tE=(e,t={})=>n=>{let r=XT({...n,processors:t});return ZT(e,r),QT(r,e),$T(r,e)},nE=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=XT({...i??{},target:a,io:t,processors:n});return ZT(e,o),QT(o,e),$T(o,e)}})),iE,aE,oE,sE,cE,lE,uE,dE,fE,pE,mE,hE,gE,_E,vE,yE,bE,xE,SE,CE,wE,TE,EE,DE,OE,kE=a((()=>{rE(),Yx(),iE={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},aE=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=iE[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},oE=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},sE=(e,t,n,r)=>{n.type=`boolean`},cE=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},lE=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},uE=(e,t,n,r)=>{n.not={}},dE=(e,t,n,r)=>{},fE=(e,t,n,r)=>{let i=e._zod.def,a=ux(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},pE=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},mE=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},hE=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},gE=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ZT(a.element,t,{...r,path:[...r.path,`items`]})},_E=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=ZT(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ZT(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},vE=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ZT(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},yE=(e,t,n,r)=>{let i=e._zod.def,a=ZT(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ZT(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},bE=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=ZT(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=ZT(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=ZT(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},xE=(e,t,n,r)=>{let i=e._zod.def,a=ZT(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},SE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},CE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},wE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},TE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},EE=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;ZT(o,t,r);let s=t.seen.get(e);s.ref=o},DE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},OE=(e,t,n,r)=>{let i=e._zod.def;ZT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType}})),AE=a((()=>{lx(),gS(),tS(),Fw(),mC(),vC(),Yx(),XS(),Rw(),Uw(),gC(),YT(),rE(),kE(),rE()})),jE=a((()=>{AE()}));function ME(e){return pT(IE,e)}function NE(e){return mT(LE,e)}function PE(e){return hT(RE,e)}function FE(e){return gT(zE,e)}var IE,LE,RE,zE,BE=a((()=>{AE(),EO(),IE=K(`ZodISODateTime`,(e,t)=>{YC.init(e,t),ND.init(e,t)}),LE=K(`ZodISODate`,(e,t)=>{XC.init(e,t),ND.init(e,t)}),RE=K(`ZodISOTime`,(e,t)=>{ZC.init(e,t),ND.init(e,t)}),zE=K(`ZodISODuration`,(e,t)=>{QC.init(e,t),ND.init(e,t)})})),VE,HE,UE=a((()=>{AE(),Yx(),VE=(e,t)=>{$x.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Zx(e,t)},flatten:{value:t=>Xx(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,fx,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,fx,2)}},isEmpty:{get(){return e.issues.length===0}}})},HE=K(`ZodError`,VE,{Parent:Error})})),WE,GE,KE,qE,JE,YE,XE,ZE,QE,$E,eD,tD,nD=a((()=>{AE(),UE(),WE=nS(HE),GE=rS(HE),KE=iS(HE),qE=oS(HE),JE=cS(HE),YE=lS(HE),XE=uS(HE),ZE=dS(HE),QE=fS(HE),$E=pS(HE),eD=mS(HE),tD=hS(HE)}));function rD(e,t,n){let r=Object.getPrototypeOf(e),i=kD.get(r);if(i||(i=new Set,kD.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}function J(e){return Ww(MD,e)}function Y(e){return _T($D,e)}function iD(e){return vT(eO,e)}function aD(e){return yT(tO,e)}function oD(e){return bT(nO,e)}function sD(e){return xT(rO,e)}function cD(){return ST(iO)}function lD(e){return CT(aO,e)}function X(e,t){return WT(oO,e,t)}function Z(e,t){return new sO({type:`object`,shape:e??{},...q(t)})}function uD(e,t){return new sO({type:`object`,shape:e,catchall:cD(),...q(t)})}function Q(e,t){return new cO({type:`union`,options:e,...q(t)})}function dD(e,t,n){return new lO({type:`union`,options:t,discriminator:e,...q(n)})}function fD(e,t){return new uO({type:`intersection`,left:e,right:t})}function pD(e,t,n){return!t||!t._zod?new dO({type:`record`,keyType:J(),valueType:e,...q(t)}):new dO({type:`record`,keyType:e,valueType:t,...q(n)})}function mD(e,t){return new fO({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...q(t)})}function $(e,t){return new pO({type:`literal`,values:Array.isArray(e)?e:[e],...q(t)})}function hD(e){return new mO({type:`transform`,transform:e})}function gD(e){return new hO({type:`optional`,innerType:e})}function _D(e){return new gO({type:`optional`,innerType:e})}function vD(e){return new _O({type:`nullable`,innerType:e})}function yD(e,t){return new vO({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():wx(t)}})}function bD(e,t){return new yO({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():wx(t)}})}function xD(e,t){return new bO({type:`nonoptional`,innerType:e,...q(t)})}function SD(e,t){return new xO({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}function CD(e,t){return new SO({type:`pipe`,in:e,out:t})}function wD(e){return new wO({type:`readonly`,innerType:e})}function TD(e,t){return GT(TO,e??(()=>!0),t)}function ED(e,t={}){return KT(TO,e,t)}function DD(e,t){return qT(e,t)}function OD(e,t){return new CO({type:`pipe`,in:hD(e),out:t})}var kD,AD,jD,MD,ND,PD,FD,ID,LD,RD,zD,BD,VD,HD,UD,WD,GD,KD,qD,JD,YD,XD,ZD,QD,$D,eO,tO,nO,rO,iO,aO,oO,sO,cO,lO,uO,dO,fO,pO,mO,hO,gO,_O,vO,yO,bO,xO,SO,CO,wO,TO,EO=a((()=>{AE(),kE(),rE(),jE(),BE(),nD(),kD=new WeakMap,AD=K(`ZodType`,(e,t)=>(FC.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:nE(e,`input`),output:nE(e,`output`)}}),e.toJSONSchema=tE(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>WE(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>KE(e,t,n),e.parseAsync=async(t,n)=>GE(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>qE(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>JE(e,t,n),e.decode=(t,n)=>YE(e,t,n),e.encodeAsync=async(t,n)=>XE(e,t,n),e.decodeAsync=async(t,n)=>ZE(e,t,n),e.safeEncode=(t,n)=>QE(e,t,n),e.safeDecode=(t,n)=>$E(e,t,n),e.safeEncodeAsync=async(t,n)=>eD(e,t,n),e.safeDecodeAsync=async(t,n)=>tD(e,t,n),rD(e,`ZodType`,{check(...e){let t=this.def;return this.clone(yx(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Ex(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(ED(e,t))},superRefine(e,t){return this.check(DD(e,t))},overwrite(e){return this.check(RT(e))},optional(){return gD(this)},exactOptional(){return _D(this)},nullable(){return vD(this)},nullish(){return gD(vD(this))},nonoptional(e){return xD(this,e)},array(){return X(this)},or(e){return Q([this,e])},and(e){return fD(this,e)},transform(e){return CD(this,hD(e))},default(e){return yD(this,e)},prefault(e){return bD(this,e)},catch(e){return SD(this,e)},pipe(e){return CD(this,e)},readonly(){return wD(this)},describe(e){let t=this.clone();return Hw.add(t,{description:e}),t},meta(...e){if(e.length===0)return Hw.get(this);let t=this.clone();return Hw.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return Hw.get(e)?.description},configurable:!0}),e)),jD=K(`_ZodString`,(e,t)=>{IC.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aE(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,rD(e,`_ZodString`,{regex(...e){return this.check(MT(...e))},includes(...e){return this.check(FT(...e))},startsWith(...e){return this.check(IT(...e))},endsWith(...e){return this.check(LT(...e))},min(...e){return this.check(AT(...e))},max(...e){return this.check(kT(...e))},length(...e){return this.check(jT(...e))},nonempty(...e){return this.check(AT(1,...e))},lowercase(e){return this.check(NT(e))},uppercase(e){return this.check(PT(e))},trim(){return this.check(BT())},normalize(...e){return this.check(zT(...e))},toLowerCase(){return this.check(VT())},toUpperCase(){return this.check(HT())},slugify(){return this.check(UT())}})}),MD=K(`ZodString`,(e,t)=>{IC.init(e,t),jD.init(e,t),e.email=t=>e.check(Gw(PD,t)),e.url=t=>e.check(Zw(LD,t)),e.jwt=t=>e.check(fT(QD,t)),e.emoji=t=>e.check(Qw(RD,t)),e.guid=t=>e.check(Kw(FD,t)),e.uuid=t=>e.check(qw(ID,t)),e.uuidv4=t=>e.check(Jw(ID,t)),e.uuidv6=t=>e.check(Yw(ID,t)),e.uuidv7=t=>e.check(Xw(ID,t)),e.nanoid=t=>e.check($w(zD,t)),e.guid=t=>e.check(Kw(FD,t)),e.cuid=t=>e.check(eT(BD,t)),e.cuid2=t=>e.check(tT(VD,t)),e.ulid=t=>e.check(nT(HD,t)),e.base64=t=>e.check(lT(YD,t)),e.base64url=t=>e.check(uT(XD,t)),e.xid=t=>e.check(rT(UD,t)),e.ksuid=t=>e.check(iT(WD,t)),e.ipv4=t=>e.check(aT(GD,t)),e.ipv6=t=>e.check(oT(KD,t)),e.cidrv4=t=>e.check(sT(qD,t)),e.cidrv6=t=>e.check(cT(JD,t)),e.e164=t=>e.check(dT(ZD,t)),e.datetime=t=>e.check(ME(t)),e.date=t=>e.check(NE(t)),e.time=t=>e.check(PE(t)),e.duration=t=>e.check(FE(t))}),ND=K(`ZodStringFormat`,(e,t)=>{LC.init(e,t),jD.init(e,t)}),PD=K(`ZodEmail`,(e,t)=>{BC.init(e,t),ND.init(e,t)}),FD=K(`ZodGUID`,(e,t)=>{RC.init(e,t),ND.init(e,t)}),ID=K(`ZodUUID`,(e,t)=>{zC.init(e,t),ND.init(e,t)}),LD=K(`ZodURL`,(e,t)=>{VC.init(e,t),ND.init(e,t)}),RD=K(`ZodEmoji`,(e,t)=>{HC.init(e,t),ND.init(e,t)}),zD=K(`ZodNanoID`,(e,t)=>{UC.init(e,t),ND.init(e,t)}),BD=K(`ZodCUID`,(e,t)=>{WC.init(e,t),ND.init(e,t)}),VD=K(`ZodCUID2`,(e,t)=>{GC.init(e,t),ND.init(e,t)}),HD=K(`ZodULID`,(e,t)=>{KC.init(e,t),ND.init(e,t)}),UD=K(`ZodXID`,(e,t)=>{qC.init(e,t),ND.init(e,t)}),WD=K(`ZodKSUID`,(e,t)=>{JC.init(e,t),ND.init(e,t)}),GD=K(`ZodIPv4`,(e,t)=>{$C.init(e,t),ND.init(e,t)}),KD=K(`ZodIPv6`,(e,t)=>{ew.init(e,t),ND.init(e,t)}),qD=K(`ZodCIDRv4`,(e,t)=>{tw.init(e,t),ND.init(e,t)}),JD=K(`ZodCIDRv6`,(e,t)=>{nw.init(e,t),ND.init(e,t)}),YD=K(`ZodBase64`,(e,t)=>{rw.init(e,t),ND.init(e,t)}),XD=K(`ZodBase64URL`,(e,t)=>{iw.init(e,t),ND.init(e,t)}),ZD=K(`ZodE164`,(e,t)=>{aw.init(e,t),ND.init(e,t)}),QD=K(`ZodJWT`,(e,t)=>{ow.init(e,t),ND.init(e,t)}),$D=K(`ZodNumber`,(e,t)=>{sw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oE(e,t,n,r),rD(e,`ZodNumber`,{gt(e,t){return this.check(ET(e,t))},gte(e,t){return this.check(DT(e,t))},min(e,t){return this.check(DT(e,t))},lt(e,t){return this.check(wT(e,t))},lte(e,t){return this.check(TT(e,t))},max(e,t){return this.check(TT(e,t))},int(e){return this.check(iD(e))},safe(e){return this.check(iD(e))},positive(e){return this.check(ET(0,e))},nonnegative(e){return this.check(DT(0,e))},negative(e){return this.check(wT(0,e))},nonpositive(e){return this.check(TT(0,e))},multipleOf(e,t){return this.check(OT(e,t))},step(e,t){return this.check(OT(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),eO=K(`ZodNumberFormat`,(e,t)=>{cw.init(e,t),$D.init(e,t)}),tO=K(`ZodBoolean`,(e,t)=>{lw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sE(e,t,n,r)}),nO=K(`ZodUndefined`,(e,t)=>{uw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lE(e,t,n,r)}),rO=K(`ZodNull`,(e,t)=>{dw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cE(e,t,n,r)}),iO=K(`ZodUnknown`,(e,t)=>{fw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dE(e,t,n,r)}),aO=K(`ZodNever`,(e,t)=>{pw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uE(e,t,n,r)}),oO=K(`ZodArray`,(e,t)=>{mw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gE(e,t,n,r),e.element=t.element,rD(e,`ZodArray`,{min(e,t){return this.check(AT(e,t))},nonempty(e){return this.check(AT(1,e))},max(e,t){return this.check(kT(e,t))},length(e,t){return this.check(jT(e,t))},unwrap(){return this.element}})}),sO=K(`ZodObject`,(e,t)=>{gw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_E(e,t,n,r),_x(e,`shape`,()=>t.shape),rD(e,`ZodObject`,{keyof(){return mD(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:cD()})},loose(){return this.clone({...this._zod.def,catchall:cD()})},strict(){return this.clone({...this._zod.def,catchall:lD()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return jx(this,e)},safeExtend(e){return Mx(this,e)},merge(e){return Nx(this,e)},pick(e){return kx(this,e)},omit(e){return Ax(this,e)},partial(...e){return Px(hO,this,e[0])},required(...e){return Fx(bO,this,e[0])}})}),cO=K(`ZodUnion`,(e,t)=>{_w.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vE(e,t,n,r),e.options=t.options}),lO=K(`ZodDiscriminatedUnion`,(e,t)=>{cO.init(e,t),vw.init(e,t)}),uO=K(`ZodIntersection`,(e,t)=>{yw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yE(e,t,n,r)}),dO=K(`ZodRecord`,(e,t)=>{bw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bE(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),fO=K(`ZodEnum`,(e,t)=>{xw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fE(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new fO({...t,checks:[],...q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new fO({...t,checks:[],...q(r),entries:i})}}),pO=K(`ZodLiteral`,(e,t)=>{Sw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pE(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),mO=K(`ZodTransform`,(e,t)=>{Cw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hE(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new sx(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ux(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Ux(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}}),hO=K(`ZodOptional`,(e,t)=>{ww.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),gO=K(`ZodExactOptional`,(e,t)=>{Tw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),_O=K(`ZodNullable`,(e,t)=>{Ew.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),vO=K(`ZodDefault`,(e,t)=>{Dw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),yO=K(`ZodPrefault`,(e,t)=>{Ow.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),bO=K(`ZodNonOptional`,(e,t)=>{kw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),xO=K(`ZodCatch`,(e,t)=>{Aw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),SO=K(`ZodPipe`,(e,t)=>{jw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EE(e,t,n,r),e.in=t.in,e.out=t.out}),CO=K(`ZodPreprocess`,(e,t)=>{SO.init(e,t),Mw.init(e,t)}),wO=K(`ZodReadonly`,(e,t)=>{Nw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),TO=K(`ZodCustom`,(e,t)=>{Pw.init(e,t),AD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mE(e,t,n,r)})})),DO,OO=a((()=>{AE(),DO||={}})),kO=a((()=>{AE(),EO(),jE(),UE(),nD(),OO(),Rw(),kE(),Uw(),jE(),BE(),EO(),Yx(),ix(Iw())})),AO=a((()=>{kO(),kO()})),jO=a((()=>{AO()}));jO();var MO=`io.modelcontextprotocol/related-task`,NO=TD(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),PO=Q([J(),Y().int()]),FO=J();uD({ttl:Y().optional(),pollInterval:Y().optional()});var IO=Z({ttl:Y().optional()}),LO=Z({taskId:J()}),RO=uD({progressToken:PO.optional(),[MO]:LO.optional()}),zO=Z({_meta:RO.optional()}),BO=zO.extend({task:IO.optional()}),VO=e=>BO.safeParse(e).success,HO=Z({method:J(),params:zO.loose().optional()}),UO=Z({_meta:RO.optional()}),WO=Z({method:J(),params:UO.loose().optional()}),GO=uD({_meta:RO.optional()}),KO=Q([J(),Y().int()]),qO=Z({jsonrpc:$(`2.0`),id:KO,...HO.shape}).strict(),JO=e=>qO.safeParse(e).success,YO=Z({jsonrpc:$(`2.0`),...WO.shape}).strict(),XO=e=>YO.safeParse(e).success,ZO=Z({jsonrpc:$(`2.0`),id:KO,result:GO}).strict(),QO=e=>ZO.safeParse(e).success,$O;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})($O||={});var ek=Z({jsonrpc:$(`2.0`),id:KO.optional(),error:Z({code:Y().int(),message:J(),data:cD().optional()})}).strict(),tk=e=>ek.safeParse(e).success;Q([qO,YO,ZO,ek]),Q([ZO,ek]);var nk=GO.strict(),rk=UO.extend({requestId:KO.optional(),reason:J().optional()}),ik=WO.extend({method:$(`notifications/cancelled`),params:rk}),ak=Z({icons:X(Z({src:J(),mimeType:J().optional(),sizes:X(J()).optional(),theme:mD([`light`,`dark`]).optional()})).optional()}),ok=Z({name:J(),title:J().optional()}),sk=ok.extend({...ok.shape,...ak.shape,version:J(),websiteUrl:J().optional(),description:J().optional()}),ck=OD(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,fD(Z({form:fD(Z({applyDefaults:aD().optional()}),pD(J(),cD())).optional(),url:NO.optional()}),pD(J(),cD()).optional())),lk=uD({list:NO.optional(),cancel:NO.optional(),requests:uD({sampling:uD({createMessage:NO.optional()}).optional(),elicitation:uD({create:NO.optional()}).optional()}).optional()}),uk=uD({list:NO.optional(),cancel:NO.optional(),requests:uD({tools:uD({call:NO.optional()}).optional()}).optional()}),dk=Z({experimental:pD(J(),NO).optional(),sampling:Z({context:NO.optional(),tools:NO.optional()}).optional(),elicitation:ck.optional(),roots:Z({listChanged:aD().optional()}).optional(),tasks:lk.optional(),extensions:pD(J(),NO).optional()}),fk=zO.extend({protocolVersion:J(),capabilities:dk,clientInfo:sk}),pk=HO.extend({method:$(`initialize`),params:fk}),mk=Z({experimental:pD(J(),NO).optional(),logging:NO.optional(),completions:NO.optional(),prompts:Z({listChanged:aD().optional()}).optional(),resources:Z({subscribe:aD().optional(),listChanged:aD().optional()}).optional(),tools:Z({listChanged:aD().optional()}).optional(),tasks:uk.optional(),extensions:pD(J(),NO).optional()}),hk=GO.extend({protocolVersion:J(),capabilities:mk,serverInfo:sk,instructions:J().optional()}),gk=WO.extend({method:$(`notifications/initialized`),params:UO.optional()}),_k=HO.extend({method:$(`ping`),params:zO.optional()}),vk=Z({progress:Y(),total:gD(Y()),message:gD(J())}),yk=Z({...UO.shape,...vk.shape,progressToken:PO}),bk=WO.extend({method:$(`notifications/progress`),params:yk}),xk=zO.extend({cursor:FO.optional()}),Sk=HO.extend({params:xk.optional()}),Ck=GO.extend({nextCursor:FO.optional()}),wk=mD([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Tk=Z({taskId:J(),status:wk,ttl:Q([Y(),sD()]),createdAt:J(),lastUpdatedAt:J(),pollInterval:gD(Y()),statusMessage:gD(J())}),Ek=GO.extend({task:Tk}),Dk=UO.merge(Tk),Ok=WO.extend({method:$(`notifications/tasks/status`),params:Dk}),kk=HO.extend({method:$(`tasks/get`),params:zO.extend({taskId:J()})}),Ak=GO.merge(Tk),jk=HO.extend({method:$(`tasks/result`),params:zO.extend({taskId:J()})});GO.loose();var Mk=Sk.extend({method:$(`tasks/list`)}),Nk=Ck.extend({tasks:X(Tk)}),Pk=HO.extend({method:$(`tasks/cancel`),params:zO.extend({taskId:J()})}),Fk=GO.merge(Tk),Ik=Z({uri:J(),mimeType:gD(J()),_meta:pD(J(),cD()).optional()}),Lk=Ik.extend({text:J()}),Rk=J().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),zk=Ik.extend({blob:Rk}),Bk=mD([`user`,`assistant`]),Vk=Z({audience:X(Bk).optional(),priority:Y().min(0).max(1).optional(),lastModified:ME({offset:!0}).optional()}),Hk=Z({...ok.shape,...ak.shape,uri:J(),description:gD(J()),mimeType:gD(J()),size:gD(Y()),annotations:Vk.optional(),_meta:gD(uD({}))}),Uk=Z({...ok.shape,...ak.shape,uriTemplate:J(),description:gD(J()),mimeType:gD(J()),annotations:Vk.optional(),_meta:gD(uD({}))}),Wk=Sk.extend({method:$(`resources/list`)}),Gk=Ck.extend({resources:X(Hk)}),Kk=Sk.extend({method:$(`resources/templates/list`)}),qk=Ck.extend({resourceTemplates:X(Uk)}),Jk=zO.extend({uri:J()}),Yk=Jk,Xk=HO.extend({method:$(`resources/read`),params:Yk}),Zk=GO.extend({contents:X(Q([Lk,zk]))}),Qk=WO.extend({method:$(`notifications/resources/list_changed`),params:UO.optional()}),$k=Jk,eA=HO.extend({method:$(`resources/subscribe`),params:$k}),tA=Jk,nA=HO.extend({method:$(`resources/unsubscribe`),params:tA}),rA=UO.extend({uri:J()}),iA=WO.extend({method:$(`notifications/resources/updated`),params:rA}),aA=Z({name:J(),description:gD(J()),required:gD(aD())}),oA=Z({...ok.shape,...ak.shape,description:gD(J()),arguments:gD(X(aA)),_meta:gD(uD({}))}),sA=Sk.extend({method:$(`prompts/list`)}),cA=Ck.extend({prompts:X(oA)}),lA=zO.extend({name:J(),arguments:pD(J(),J()).optional()}),uA=HO.extend({method:$(`prompts/get`),params:lA}),dA=Z({type:$(`text`),text:J(),annotations:Vk.optional(),_meta:pD(J(),cD()).optional()}),fA=Z({type:$(`image`),data:Rk,mimeType:J(),annotations:Vk.optional(),_meta:pD(J(),cD()).optional()}),pA=Z({type:$(`audio`),data:Rk,mimeType:J(),annotations:Vk.optional(),_meta:pD(J(),cD()).optional()}),mA=Z({type:$(`tool_use`),name:J(),id:J(),input:pD(J(),cD()),_meta:pD(J(),cD()).optional()}),hA=Z({type:$(`resource`),resource:Q([Lk,zk]),annotations:Vk.optional(),_meta:pD(J(),cD()).optional()}),gA=Hk.extend({type:$(`resource_link`)}),_A=Q([dA,fA,pA,gA,hA]),vA=Z({role:Bk,content:_A}),yA=GO.extend({description:J().optional(),messages:X(vA)}),bA=WO.extend({method:$(`notifications/prompts/list_changed`),params:UO.optional()}),xA=Z({title:J().optional(),readOnlyHint:aD().optional(),destructiveHint:aD().optional(),idempotentHint:aD().optional(),openWorldHint:aD().optional()}),SA=Z({taskSupport:mD([`required`,`optional`,`forbidden`]).optional()}),CA=Z({...ok.shape,...ak.shape,description:J().optional(),inputSchema:Z({type:$(`object`),properties:pD(J(),NO).optional(),required:X(J()).optional()}).catchall(cD()),outputSchema:Z({type:$(`object`),properties:pD(J(),NO).optional(),required:X(J()).optional()}).catchall(cD()).optional(),annotations:xA.optional(),execution:SA.optional(),_meta:pD(J(),cD()).optional()}),wA=Sk.extend({method:$(`tools/list`)}),TA=Ck.extend({tools:X(CA)}),EA=GO.extend({content:X(_A).default([]),structuredContent:pD(J(),cD()).optional(),isError:aD().optional()});EA.or(GO.extend({toolResult:cD()}));var DA=BO.extend({name:J(),arguments:pD(J(),cD()).optional()}),OA=HO.extend({method:$(`tools/call`),params:DA}),kA=WO.extend({method:$(`notifications/tools/list_changed`),params:UO.optional()});Z({autoRefresh:aD().default(!0),debounceMs:Y().int().nonnegative().default(300)});var AA=mD([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),jA=zO.extend({level:AA}),MA=HO.extend({method:$(`logging/setLevel`),params:jA}),NA=UO.extend({level:AA,logger:J().optional(),data:cD()}),PA=WO.extend({method:$(`notifications/message`),params:NA}),FA=Z({hints:X(Z({name:J().optional()})).optional(),costPriority:Y().min(0).max(1).optional(),speedPriority:Y().min(0).max(1).optional(),intelligencePriority:Y().min(0).max(1).optional()}),IA=Z({mode:mD([`auto`,`required`,`none`]).optional()}),LA=Z({type:$(`tool_result`),toolUseId:J().describe(`The unique identifier for the corresponding tool call.`),content:X(_A).default([]),structuredContent:Z({}).loose().optional(),isError:aD().optional(),_meta:pD(J(),cD()).optional()}),RA=dD(`type`,[dA,fA,pA]),zA=dD(`type`,[dA,fA,pA,mA,LA]),BA=Z({role:Bk,content:Q([zA,X(zA)]),_meta:pD(J(),cD()).optional()}),VA=BO.extend({messages:X(BA),modelPreferences:FA.optional(),systemPrompt:J().optional(),includeContext:mD([`none`,`thisServer`,`allServers`]).optional(),temperature:Y().optional(),maxTokens:Y().int(),stopSequences:X(J()).optional(),metadata:NO.optional(),tools:X(CA).optional(),toolChoice:IA.optional()}),HA=HO.extend({method:$(`sampling/createMessage`),params:VA}),UA=GO.extend({model:J(),stopReason:gD(mD([`endTurn`,`stopSequence`,`maxTokens`]).or(J())),role:Bk,content:RA}),WA=GO.extend({model:J(),stopReason:gD(mD([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(J())),role:Bk,content:Q([zA,X(zA)])}),GA=Z({type:$(`boolean`),title:J().optional(),description:J().optional(),default:aD().optional()}),KA=Z({type:$(`string`),title:J().optional(),description:J().optional(),minLength:Y().optional(),maxLength:Y().optional(),format:mD([`email`,`uri`,`date`,`date-time`]).optional(),default:J().optional()}),qA=Z({type:mD([`number`,`integer`]),title:J().optional(),description:J().optional(),minimum:Y().optional(),maximum:Y().optional(),default:Y().optional()}),JA=Z({type:$(`string`),title:J().optional(),description:J().optional(),enum:X(J()),default:J().optional()}),YA=Z({type:$(`string`),title:J().optional(),description:J().optional(),oneOf:X(Z({const:J(),title:J()})),default:J().optional()}),XA=Q([Q([Z({type:$(`string`),title:J().optional(),description:J().optional(),enum:X(J()),enumNames:X(J()).optional(),default:J().optional()}),Q([JA,YA]),Q([Z({type:$(`array`),title:J().optional(),description:J().optional(),minItems:Y().optional(),maxItems:Y().optional(),items:Z({type:$(`string`),enum:X(J())}),default:X(J()).optional()}),Z({type:$(`array`),title:J().optional(),description:J().optional(),minItems:Y().optional(),maxItems:Y().optional(),items:Z({anyOf:X(Z({const:J(),title:J()}))}),default:X(J()).optional()})])]),GA,KA,qA]),ZA=Q([BO.extend({mode:$(`form`).optional(),message:J(),requestedSchema:Z({type:$(`object`),properties:pD(J(),XA),required:X(J()).optional()})}),BO.extend({mode:$(`url`),message:J(),elicitationId:J(),url:J().url()})]),QA=HO.extend({method:$(`elicitation/create`),params:ZA}),$A=UO.extend({elicitationId:J()}),ej=WO.extend({method:$(`notifications/elicitation/complete`),params:$A}),tj=GO.extend({action:mD([`accept`,`decline`,`cancel`]),content:OD(e=>e===null?void 0:e,pD(J(),Q([J(),Y(),aD(),X(J())])).optional())}),nj=Z({type:$(`ref/resource`),uri:J()}),rj=Z({type:$(`ref/prompt`),name:J()}),ij=zO.extend({ref:Q([rj,nj]),argument:Z({name:J(),value:J()}),context:Z({arguments:pD(J(),J()).optional()}).optional()}),aj=HO.extend({method:$(`completion/complete`),params:ij}),oj=GO.extend({completion:uD({values:X(J()).max(100),total:gD(Y().int()),hasMore:gD(aD())})}),sj=Z({uri:J().startsWith(`file://`),name:J().optional(),_meta:pD(J(),cD()).optional()}),cj=HO.extend({method:$(`roots/list`),params:zO.optional()}),lj=GO.extend({roots:X(sj)}),uj=WO.extend({method:$(`notifications/roots/list_changed`),params:UO.optional()});Q([_k,pk,aj,MA,uA,sA,Wk,Kk,Xk,eA,nA,OA,wA,kk,jk,Mk,Pk]),Q([ik,bk,gk,uj,Ok]),Q([nk,UA,WA,tj,lj,Ak,Nk,Ek]),Q([_k,HA,QA,cj,kk,jk,Mk,Pk]),Q([ik,bk,PA,iA,Qk,kA,bA,Ok,ej]),Q([nk,hk,oj,yA,cA,Gk,qk,Zk,EA,TA,Ak,Nk,Ek]);var dj=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===$O.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new fj(e.elicitations,n)}return new e(t,n,r)}},fj=class extends dj{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super($O.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};YT(),Yx(),XS(),lx(),gS(),kE(),tS(),init_locales(),AE(),Uw();function pj(e){return!!e._zod}function mj(e,t){return pj(e)?aS(e,t):e.safeParse(t)}function hj(e){if(!e)return;let t;if(t=pj(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function gj(e){if(pj(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}function _j(e){return e===`completed`||e===`failed`||e===`cancelled`}function vj(e){let t=hj(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=gj(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function yj(e,t){let n=mj(e,t);if(!n.success)throw n.error;return n.data}var bj=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(ik,e=>{this._oncancel(e)}),this.setNotificationHandler(bk,e=>{this._onprogress(e)}),this.setRequestHandler(_k,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(kk,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new dj($O.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(jk,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r)if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new dj(e.error.code,e.error.message,e.error.data))}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new dj($O.InvalidParams,`Task not found: ${r}`);if(!_j(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(_j(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[MO]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(Mk,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new dj($O.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(Pk,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new dj($O.InvalidParams,`Task not found: ${e.params.taskId}`);if(_j(n.status))throw new dj($O.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new dj($O.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof dj?e:new dj($O.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),dj.fromError($O.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),QO(e)||tk(e)?this._onresponse(e):JO(e)?this._onrequest(e,t):XO(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=dj.fromError($O.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[MO]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:$O.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=VO(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new dj($O.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:$O.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),QO(e)?n(e):n(new dj(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(QO(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),QO(e)?r(e):r(dj.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof dj?e:new dj($O.InternalError,String(e))}}return}let i;try{let r=await this.request(e,Ek,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new dj($O.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},_j(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new dj($O.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new dj($O.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof dj?e:new dj($O.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[MO]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof dj?e:new dj($O.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=mj(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(dj.fromError($O.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},Ak,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},Nk,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},Fk,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[MO]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[MO]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[MO]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=vj(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=yj(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=vj(e);this._notificationHandlers.set(n,n=>{let r=yj(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&JO(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new dj($O.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new dj($O.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new dj($O.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new dj($O.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=Ok.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),_j(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new dj($O.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(_j(a.status))throw new dj($O.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=Ok.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),_j(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};jO(),(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var xj=class extends bj{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},Sj=`2026-01-26`,Cj=Q([$(`light`),$(`dark`)]).describe(`Color theme preference for the host environment.`),wj=Q([$(`inline`),$(`fullscreen`),$(`pip`)]).describe(`Display mode for UI presentation.`),Tj=pD(Q([$(`--color-background-primary`),$(`--color-background-secondary`),$(`--color-background-tertiary`),$(`--color-background-inverse`),$(`--color-background-ghost`),$(`--color-background-info`),$(`--color-background-danger`),$(`--color-background-success`),$(`--color-background-warning`),$(`--color-background-disabled`),$(`--color-text-primary`),$(`--color-text-secondary`),$(`--color-text-tertiary`),$(`--color-text-inverse`),$(`--color-text-ghost`),$(`--color-text-info`),$(`--color-text-danger`),$(`--color-text-success`),$(`--color-text-warning`),$(`--color-text-disabled`),$(`--color-border-primary`),$(`--color-border-secondary`),$(`--color-border-tertiary`),$(`--color-border-inverse`),$(`--color-border-ghost`),$(`--color-border-info`),$(`--color-border-danger`),$(`--color-border-success`),$(`--color-border-warning`),$(`--color-border-disabled`),$(`--color-ring-primary`),$(`--color-ring-secondary`),$(`--color-ring-inverse`),$(`--color-ring-info`),$(`--color-ring-danger`),$(`--color-ring-success`),$(`--color-ring-warning`),$(`--font-sans`),$(`--font-mono`),$(`--font-weight-normal`),$(`--font-weight-medium`),$(`--font-weight-semibold`),$(`--font-weight-bold`),$(`--font-text-xs-size`),$(`--font-text-sm-size`),$(`--font-text-md-size`),$(`--font-text-lg-size`),$(`--font-heading-xs-size`),$(`--font-heading-sm-size`),$(`--font-heading-md-size`),$(`--font-heading-lg-size`),$(`--font-heading-xl-size`),$(`--font-heading-2xl-size`),$(`--font-heading-3xl-size`),$(`--font-text-xs-line-height`),$(`--font-text-sm-line-height`),$(`--font-text-md-line-height`),$(`--font-text-lg-line-height`),$(`--font-heading-xs-line-height`),$(`--font-heading-sm-line-height`),$(`--font-heading-md-line-height`),$(`--font-heading-lg-line-height`),$(`--font-heading-xl-line-height`),$(`--font-heading-2xl-line-height`),$(`--font-heading-3xl-line-height`),$(`--border-radius-xs`),$(`--border-radius-sm`),$(`--border-radius-md`),$(`--border-radius-lg`),$(`--border-radius-xl`),$(`--border-radius-full`),$(`--border-width-regular`),$(`--shadow-hairline`),$(`--shadow-sm`),$(`--shadow-md`),$(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.
114
114
 
115
115
  Individual style keys are optional - hosts may provide any subset of these values.
116
116
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
117
117
 
118
118
  Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
119
- for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),Q([J(),GE()]).describe(`Style variables for theming MCP apps.
119
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),Q([J(),oD()]).describe(`Style variables for theming MCP apps.
120
120
 
121
121
  Individual style keys are optional - hosts may provide any subset of these values.
122
122
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
@@ -128,10 +128,10 @@ Individual style keys are optional - hosts may provide any subset of these value
128
128
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
129
129
 
130
130
  Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
131
- for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),dj=Z({method:$(`ui/open-link`),params:Z({url:J().describe(`URL to open in the host's browser`)})});Z({isError:WE().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),Z({isError:WE().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),Z({isError:WE().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();var fj=Z({method:$(`ui/notifications/sandbox-proxy-ready`),params:Z({})}),pj=Z({connectDomains:X(J()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
131
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),Ej=Z({method:$(`ui/open-link`),params:Z({url:J().describe(`URL to open in the host's browser`)})});Z({isError:aD().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),Z({isError:aD().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),Z({isError:aD().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();var Dj=Z({method:$(`ui/notifications/sandbox-proxy-ready`),params:Z({})}),Oj=Z({connectDomains:X(J()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
132
132
 
133
133
  - Maps to CSP \`connect-src\` directive
134
- - Empty or omitted → no network connections (secure default)`),resourceDomains:X(J()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:X(J()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:X(J()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),mj=Z({camera:Z({}).optional().describe(`Request camera access.
134
+ - Empty or omitted → no network connections (secure default)`),resourceDomains:X(J()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:X(J()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:X(J()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),kj=Z({camera:Z({}).optional().describe(`Request camera access.
135
135
 
136
136
  Maps to Permission Policy \`camera\` feature.`),microphone:Z({}).optional().describe(`Request microphone access.
137
137
 
@@ -139,7 +139,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:Z({}).optional()
139
139
 
140
140
  Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:Z({}).optional().describe(`Request clipboard write access.
141
141
 
142
- Maps to Permission Policy \`clipboard-write\` feature.`)}),hj=Z({method:$(`ui/notifications/size-changed`),params:Z({width:Y().optional().describe(`New width in pixels.`),height:Y().optional().describe(`New height in pixels.`)})});Z({method:$(`ui/notifications/tool-input`),params:Z({arguments:QE(J(),qE().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Z({method:$(`ui/notifications/tool-input-partial`),params:Z({arguments:QE(J(),qE().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Z({method:$(`ui/notifications/tool-cancelled`),params:Z({reason:J().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})});var gj=Z({fonts:J().optional()}),_j=Z({variables:uj.optional().describe(`CSS variables for theming the app.`),css:gj.optional().describe(`CSS blocks that apps can inject.`)});Z({method:$(`ui/resource-teardown`),params:Z({})});var vj=QE(J(),qE()),yj=Z({text:Z({}).optional().describe(`Host supports text content blocks.`),image:Z({}).optional().describe(`Host supports image content blocks.`),audio:Z({}).optional().describe(`Host supports audio content blocks.`),resource:Z({}).optional().describe(`Host supports resource content blocks.`),resourceLink:Z({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:Z({}).optional().describe(`Host supports structured content.`)}),bj=Z({method:$(`ui/notifications/request-teardown`),params:Z({}).optional()}),xj=Z({experimental:Z({}).optional().describe(`Experimental features (structure TBD).`),openLinks:Z({}).optional().describe(`Host supports opening external URLs.`),downloadFile:Z({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:Z({listChanged:WE().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:Z({listChanged:WE().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:Z({}).optional().describe(`Host accepts log messages.`),sandbox:Z({permissions:mj.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:pj.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:yj.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:yj.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:Z({tools:Z({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Sj=Z({experimental:Z({}).optional().describe(`Experimental features (structure TBD).`),tools:Z({listChanged:WE().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:X(lj).optional().describe(`Display modes the app supports.`)}),Cj=Z({method:$(`ui/notifications/initialized`),params:Z({}).optional()});Z({csp:pj.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:mj.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:J().optional().describe(`Dedicated origin for view sandbox.
142
+ Maps to Permission Policy \`clipboard-write\` feature.`)}),Aj=Z({method:$(`ui/notifications/size-changed`),params:Z({width:Y().optional().describe(`New width in pixels.`),height:Y().optional().describe(`New height in pixels.`)})});Z({method:$(`ui/notifications/tool-input`),params:Z({arguments:pD(J(),cD().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Z({method:$(`ui/notifications/tool-input-partial`),params:Z({arguments:pD(J(),cD().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Z({method:$(`ui/notifications/tool-cancelled`),params:Z({reason:J().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})});var jj=Z({fonts:J().optional()}),Mj=Z({variables:Tj.optional().describe(`CSS variables for theming the app.`),css:jj.optional().describe(`CSS blocks that apps can inject.`)});Z({method:$(`ui/resource-teardown`),params:Z({})});var Nj=pD(J(),cD()),Pj=Z({text:Z({}).optional().describe(`Host supports text content blocks.`),image:Z({}).optional().describe(`Host supports image content blocks.`),audio:Z({}).optional().describe(`Host supports audio content blocks.`),resource:Z({}).optional().describe(`Host supports resource content blocks.`),resourceLink:Z({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:Z({}).optional().describe(`Host supports structured content.`)}),Fj=Z({method:$(`ui/notifications/request-teardown`),params:Z({}).optional()}),Ij=Z({experimental:Z({}).optional().describe(`Experimental features (structure TBD).`),openLinks:Z({}).optional().describe(`Host supports opening external URLs.`),downloadFile:Z({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:Z({listChanged:aD().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:Z({listChanged:aD().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:Z({}).optional().describe(`Host accepts log messages.`),sandbox:Z({permissions:kj.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:Oj.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Pj.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Pj.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:Z({tools:Z({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Lj=Z({experimental:Z({}).optional().describe(`Experimental features (structure TBD).`),tools:Z({listChanged:aD().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:X(wj).optional().describe(`Display modes the app supports.`)}),Rj=Z({method:$(`ui/notifications/initialized`),params:Z({}).optional()});Z({csp:Oj.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:kj.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:J().optional().describe(`Dedicated origin for view sandbox.
143
143
 
144
144
  Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
145
145
 
@@ -147,22 +147,22 @@ Useful when views need stable, dedicated origins for OAuth callbacks, CORS polic
147
147
  - Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
148
148
  - URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)
149
149
 
150
- If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:WE().optional().describe(`Visual boundary preference - true if view prefers a visible border.
150
+ If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:aD().optional().describe(`Visual boundary preference - true if view prefers a visible border.
151
151
 
152
152
  Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.
153
153
 
154
154
  - \`true\`: request visible border + background
155
155
  - \`false\`: request no visible border + background
156
- - omitted: host decides border`)});var wj=Z({method:$(`ui/request-display-mode`),params:Z({mode:lj.describe(`The display mode being requested.`)})});Z({mode:lj.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough();var Tj=Q([$(`model`),$(`app`)]).describe(`Tool visibility scope - who can access the tool.`);Z({resourceUri:J().optional(),visibility:X(Tj).optional().describe(`Who can access this tool. Default: ["model", "app"]
156
+ - omitted: host decides border`)});var zj=Z({method:$(`ui/request-display-mode`),params:Z({mode:wj.describe(`The display mode being requested.`)})});Z({mode:wj.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough();var Bj=Q([$(`model`),$(`app`)]).describe(`Tool visibility scope - who can access the tool.`);Z({resourceUri:J().optional(),visibility:X(Bj).optional().describe(`Who can access this tool. Default: ["model", "app"]
157
157
  - "model": Tool visible to and callable by the agent
158
- - "app": Tool callable by the app from this server only`),csp:JE().optional(),permissions:JE().optional()}),Z({mimeTypes:X(J()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});var Ej=Z({method:$(`ui/download-file`),params:Z({contents:X(Q([eA,tA])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),Dj=Z({method:$(`ui/message`),params:Z({role:$(`user`).describe(`Message role, currently only "user" is supported.`),content:X(nA).describe(`Message content blocks (text, image, etc.).`)})});Z({method:$(`ui/notifications/sandbox-resource-ready`),params:Z({html:J().describe(`HTML content to load into the inner iframe.`),sandbox:J().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:pj.optional().describe(`CSP configuration from resource metadata.`),permissions:mj.optional().describe(`Sandbox permissions from resource metadata.`)})}),Z({method:$(`ui/notifications/tool-result`),params:dA.describe(`Standard MCP tool execution result.`)});var Oj=Z({toolInfo:Z({id:jO.optional().describe(`JSON-RPC id of the tools/call request.`),tool:cA.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:cj.optional().describe(`Current color theme preference.`),styles:_j.optional().describe(`Style configuration for theming the app.`),displayMode:lj.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:X(lj).optional().describe(`Display modes the host supports.`),containerDimensions:Q([Z({height:Y().describe(`Fixed container height in pixels.`)}),Z({maxHeight:Q([Y(),GE()]).optional().describe(`Maximum container height in pixels.`)})]).and(Q([Z({width:Y().describe(`Fixed container width in pixels.`)}),Z({maxWidth:Q([Y(),GE()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
159
- container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:J().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:J().optional().describe(`User's timezone in IANA format.`),userAgent:J().optional().describe(`Host application identifier.`),platform:Q([$(`web`),$(`desktop`),$(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:Z({touch:WE().optional().describe(`Whether the device supports touch input.`),hover:WE().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:Z({top:Y().describe(`Top safe area inset in pixels.`),right:Y().describe(`Right safe area inset in pixels.`),bottom:Y().describe(`Bottom safe area inset in pixels.`),left:Y().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough();Z({method:$(`ui/notifications/host-context-changed`),params:Oj.describe(`Partial context update containing only changed fields.`)});var kj=Z({method:$(`ui/update-model-context`),params:Z({content:X(nA).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:QE(J(),qE().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),Aj=Z({method:$(`ui/initialize`),params:Z({appInfo:KO.describe(`App identification (name and version).`),appCapabilities:Sj.describe(`Features and capabilities this app provides.`),protocolVersion:J().describe(`Protocol version this app supports.`)})});Z({protocolVersion:J().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:KO.describe(`Host application identification and version.`),hostCapabilities:xj.describe(`Features and capabilities provided by the host.`),hostContext:Oj.describe(`Rich context about the host environment.`)}).passthrough();var jj=[sj],Mj=class extends oj{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(e,t)=>{this._baseReplaceRequestHandler(e,(e,n)=>(this._initializedReceived||console.warn(`[ext-apps] AppBridge received '${e.method}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`),t(e,n)))};eventSchemas={sizechange:hj,sandboxready:fj,initialized:Cj,requestteardown:bj,loggingmessage:yA};constructor(e,t,n,r){super(r),this._client=e,this._hostInfo=t,this._capabilities=n,this.addEventListener(`initialized`,()=>{this._initializedReceived=!0}),this._hostContext=r?.hostContext||{},this.setRequestHandler(Aj,e=>this._oninitialize(e)),this.setRequestHandler(nk,(e,t)=>(this.onping?.(e.params,t),{})),this.replaceRequestHandler(wj,e=>({mode:this._hostContext.displayMode??`inline`}))}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler(`sizechange`)}set onsizechange(e){this.setEventHandler(`sizechange`,e)}get onsandboxready(){return this.getEventHandler(`sandboxready`)}set onsandboxready(e){this.setEventHandler(`sandboxready`,e)}get oninitialized(){return this.getEventHandler(`initialized`)}set oninitialized(e){this.setEventHandler(`initialized`,e)}_onmessage;get onmessage(){return this._onmessage}set onmessage(e){this.warnIfRequestHandlerReplaced(`onmessage`,this._onmessage,e),this._onmessage=e,this.replaceRequestHandler(Dj,async(e,t)=>{if(!this._onmessage)throw Error(`No onmessage handler set`);return this._onmessage(e.params,t)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced(`onopenlink`,this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler(dj,async(e,t)=>{if(!this._onopenlink)throw Error(`No onopenlink handler set`);return this._onopenlink(e.params,t)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced(`ondownloadfile`,this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler(Ej,async(e,t)=>{if(!this._ondownloadfile)throw Error(`No ondownloadfile handler set`);return this._ondownloadfile(e.params,t)})}get onrequestteardown(){return this.getEventHandler(`requestteardown`)}set onrequestteardown(e){this.setEventHandler(`requestteardown`,e)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(e){this.warnIfRequestHandlerReplaced(`onrequestdisplaymode`,this._onrequestdisplaymode,e),this._onrequestdisplaymode=e,this.replaceRequestHandler(wj,async(e,t)=>{if(!this._onrequestdisplaymode)throw Error(`No onrequestdisplaymode handler set`);return this._onrequestdisplaymode(e.params,t)})}get onloggingmessage(){return this.getEventHandler(`loggingmessage`)}set onloggingmessage(e){this.setEventHandler(`loggingmessage`,e)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(e){this.warnIfRequestHandlerReplaced(`onupdatemodelcontext`,this._onupdatemodelcontext,e),this._onupdatemodelcontext=e,this.replaceRequestHandler(kj,async(e,t)=>{if(!this._onupdatemodelcontext)throw Error(`No onupdatemodelcontext handler set`);return this._onupdatemodelcontext(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(pA,async(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}set oncreatesamplingmessage(e){this.setRequestHandler(DA,async(t,n)=>e(t.params,n))}sendToolListChanged(e={}){return this.notification({method:`notifications/tools/list_changed`,params:e})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(e){this.warnIfRequestHandlerReplaced(`onlistresources`,this._onlistresources,e),this._onlistresources=e,this.replaceRequestHandler(kk,async(e,t)=>{if(!this._onlistresources)throw Error(`No onlistresources handler set`);return this._onlistresources(e.params,t)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(e){this.warnIfRequestHandlerReplaced(`onlistresourcetemplates`,this._onlistresourcetemplates,e),this._onlistresourcetemplates=e,this.replaceRequestHandler(jk,async(e,t)=>{if(!this._onlistresourcetemplates)throw Error(`No onlistresourcetemplates handler set`);return this._onlistresourcetemplates(e.params,t)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced(`onreadresource`,this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler(Fk,async(e,t)=>{if(!this._onreadresource)throw Error(`No onreadresource handler set`);return this._onreadresource(e.params,t)})}sendResourceListChanged(e={}){return this.notification({method:`notifications/resources/list_changed`,params:e})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(e){this.warnIfRequestHandlerReplaced(`onlistprompts`,this._onlistprompts,e),this._onlistprompts=e,this.replaceRequestHandler(Kk,async(e,t)=>{if(!this._onlistprompts)throw Error(`No onlistprompts handler set`);return this._onlistprompts(e.params,t)})}sendPromptListChanged(e={}){return this.notification({method:`notifications/prompts/list_changed`,params:e})}assertCapabilityForMethod(e){}assertRequestHandlerCapability(e){}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}getCapabilities(){return this._capabilities}async _oninitialize(e){let t=e.params.protocolVersion;return this._appInfo!==void 0&&console.warn(`[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values.`),this._appCapabilities=e.params.appCapabilities,this._appInfo=e.params.appInfo,{protocolVersion:jj.includes(t)?t:sj,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let t={},n=!1;for(let r of Object.keys(e)){let i=this._hostContext[r],a=e[r];Nj(i,a)||(t[r]=a,n=!0)}n&&(this._hostContext=e,this.sendHostContextChange(t))}sendHostContextChange(e){return this.notification({method:`ui/notifications/host-context-changed`,params:e})}sendToolInput(e){return this.notification({method:`ui/notifications/tool-input`,params:e})}sendToolInputPartial(e){return this.notification({method:`ui/notifications/tool-input-partial`,params:e})}sendToolResult(e){return this.notification({method:`ui/notifications/tool-result`,params:e})}sendToolCancelled(e){return this.notification({method:`ui/notifications/tool-cancelled`,params:e})}sendSandboxResourceReady(e){return this.notification({method:`ui/notifications/sandbox-resource-ready`,params:e})}teardownResource(e,t){return this.request({method:`ui/resource-teardown`,params:e},vj,t)}sendResourceTeardown=this.teardownResource;callTool(e,t){return this.request({method:`tools/call`,params:e},dA,t)}listTools(e,t){return this.request({method:`tools/list`,params:e},uA,t)}async connect(e){if(this.transport)throw Error(`AppBridge is already connected. Call close() before connecting again.`);if(this._initializedReceived=!1,this._client){let e=this._client.getServerCapabilities();if(!e)throw Error(`Client server capabilities not available`);e.tools&&(this.oncalltool=async(e,t)=>this._client.request({method:`tools/call`,params:e},dA,{signal:t.signal}),e.tools.listChanged&&this._client.setNotificationHandler(mA,e=>this.sendToolListChanged(e.params))),e.resources&&(this.onlistresources=async(e,t)=>this._client.request({method:`resources/list`,params:e},Ak,{signal:t.signal}),this.onlistresourcetemplates=async(e,t)=>this._client.request({method:`resources/templates/list`,params:e},Mk,{signal:t.signal}),this.onreadresource=async(e,t)=>this._client.request({method:`resources/read`,params:e},Ik,{signal:t.signal}),e.resources.listChanged&&this._client.setNotificationHandler(Lk,e=>this.sendResourceListChanged(e.params))),e.prompts&&(this.onlistprompts=async(e,t)=>this._client.request({method:`prompts/list`,params:e},qk,{signal:t.signal}),e.prompts.listChanged&&this._client.setNotificationHandler(aA,e=>this.sendPromptListChanged(e.params)))}return super.connect(e)}};function Nj(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Pj(){let e=ft(mv);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}async function Fj(e){try{await e.teardownResource({},{timeout:1e3})}catch{}try{await e.close()}catch{}}function Ij({state:e}){return e.enabled?j(`details`,{class:`pointer-events-auto w-full max-w-md rounded-lg border border-base-300 bg-base-100/95 p-2 text-xs shadow-lg backdrop-blur`,children:[j(`summary`,{class:`cursor-pointer font-medium`,children:`Magic Canvas debug`}),j(`dl`,{class:`mt-2 grid gap-2`,children:[j(Lj,{label:`iframe`,value:e.iframeLifecycleState}),j(Lj,{label:`post`,value:e.lastInteractionPostResult}),j(Lj,{label:`context`,value:e.lastModelContextUpdate}),j(Lj,{label:`error`,value:e.lastError}),j(Rj,{label:`tool_call`,value:e.lastToolCall}),j(Rj,{label:`canvas_config`,value:e.parsedCanvasConfig})]})]}):null}function Lj({label:e,value:t}){return t?j(`div`,{children:[j(`dt`,{class:`font-semibold`,children:e}),j(`dd`,{class:`break-words text-base-content/70`,children:t})]}):null}function Rj({label:e,value:t}){return t===void 0?null:j(`div`,{children:[j(`dt`,{class:`font-semibold`,children:e}),j(`dd`,{children:j(`pre`,{class:`max-h-40 overflow-auto rounded bg-base-200 p-2 text-[10px] leading-relaxed`,children:JSON.stringify(t,null,2)})})]})}var zj=new Set([`mcp-ui.tavus.io`,`mcp-ui.tavus-preview.io`]),Bj=[`.sandbox-tavus.io`],Vj=new Set([`tavusapi.com`]);function Hj(e){let t;try{t=new URL(e)}catch{return!1}return Gj(t)?!0:t.protocol===`https:`?zj.has(t.hostname)?!0:Bj.some(e=>t.hostname.endsWith(e)):!1}function Uj(e){return Hj(e)}function Wj(e){let t;try{t=new URL(e)}catch{return!1}return Kj(t)?!0:t.protocol===`https:`&&Vj.has(t.hostname)}function Gj(e){return Kj(e)}function Kj(e){return!qj()||e.protocol!==`http:`&&e.protocol!==`https:`?!1:[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e.hostname)}function qj(){try{let e=globalThis.location?.hostname;return typeof e==`string`&&[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e)}catch{return!1}}var Jj=`tavus.canvas.interaction`,Yj=[`safe-area-right`,`safe-area-left`,`safe-area-bottom`,`full`],Xj=`safe-area-right`,Zj={x:275/1280,y:111/720,width:730/1280,height:609/720},Qj={type:`snapshot_mirror`};function $j(e){return bM(e)?e.message_type===`conversation`&&e.event_type===`conversation.tool_call`&&typeof e.conversation_id==`string`&&bM(e.properties):!1}function eM(e){if(!bM(e))return null;let t=PM(e,`component`),n=PM(e,`component_version`),r=PM(e,`sandbox_url`),i=LM(e,`mcp_server_url`,Uj),a=LM(e,`api_base_url`,Wj),o=LM(e,`interaction_url`,Wj),s=wM(e.layout),c=e.version;return c!==1||!t||!n||!r||!Hj(r)||i===null||a===null||o===null||s===null?null:{version:c,component:t,component_version:n,resource_uri:PM(e,`resource_uri`),sandbox_url:r,mcp_server_url:i,mcp_tool_name:PM(e,`mcp_tool_name`),api_base_url:a,interaction_url:o,layout:s,host_context:bM(e.host_context)?e.host_context:void 0}}function tM(e){if(e===void 0)return{ok:!0,value:{}};if(bM(e))return{ok:!0,value:e};if(typeof e!=`string`)return{ok:!1,error:Error(`Magic Canvas tool arguments must be an object or JSON string.`)};try{let t=JSON.parse(e);return bM(t)?{ok:!0,value:t}:{ok:!1,error:Error(`Magic Canvas tool arguments must decode to an object.`)}}catch(e){return{ok:!1,error:xM(e)}}}function nM(e){let t=e.properties.name;if(t!==`canvas_clear`&&t!==`update_component`)return null;let n=tM(e.properties.arguments);if(!n.ok)throw n.error;if(t===`canvas_clear`){let t=n.value.tool_call_id,r=n.value.reason;if(t!==void 0&&typeof t!=`string`)throw Error(`Magic Canvas clear tool_call_id must be a string when provided.`);if(r!==void 0&&typeof r!=`string`)throw Error(`Magic Canvas clear reason must be a string when provided.`);return{kind:`clear`,conversation_id:e.conversation_id,tool_call_id:t,reason:r}}let r=n.value.tool_call_id,i=n.value.updates;if(typeof r!=`string`||r.length===0)throw Error(`Magic Canvas update_component requires a target tool_call_id.`);if(!bM(i))throw Error(`Magic Canvas update_component requires an object updates payload.`);return{kind:`update`,conversation_id:e.conversation_id,tool_call_id:r,updates:i}}function rM(e){return e.display_mode===`fullscreen`?`full`:e.preferred_slot}function iM(e){return e===`full`||e===`safe-area-bottom`}function aM(e,t){let n=rM(t.layout);return iM(n)?[t]:[...e.filter(e=>{let t=rM(e.layout);return!iM(t)&&t!==n}),t]}function oM(e,t){switch(t.kind){case`show`:{let n=e.find(e=>e.id===t.instance.id),r=n?{...t.instance,revision:n.revision+1}:t.instance;return aM(e.filter(e=>e.id!==t.instance.id),r)}case`update`:{let n=e=>e.conversation_id===t.conversation_id&&e.tool_call_id===t.tool_call_id,r=gM(t.updates),i,a=e.map(e=>{if(!n(e))return e;let t={...e,arguments:{...e.arguments,...r.componentArguments},layout:{preferred_slot:r.preferredSlot??e.layout.preferred_slot,display_mode:r.displayMode??e.layout.display_mode,avoid_safe_area:r.avoidSafeArea??e.layout.avoid_safe_area,safe_area:r.safeArea??e.layout.safe_area,backdrop:r.backdrop??e.layout.backdrop},revision:e.revision+1};return i=t,t});if(i===void 0)return a;let o=e.find(n);return o&&rM(o.layout)===rM(i.layout)?a:aM(a.filter(e=>!n(e)),i)}case`clear`:return t.tool_call_id?e.filter(e=>!(e.conversation_id===t.conversation_id&&e.tool_call_id===t.tool_call_id)):e.filter(e=>e.conversation_id!==t.conversation_id)}}function sM(e){if(!bM(e)||!Array.isArray(e.content))return null;for(let t of e.content){if(!bM(t))continue;let e=(bM(t._meta)?t._meta:null)?.[Jj];if(bM(e))return RM(e)}return null}function cM(e,t){let n=t.type,r=t.value;if(!n)throw Error(`Magic Canvas interaction is missing type.`);if(r===void 0)throw Error(`Magic Canvas interaction is missing value.`);return{interaction_id:t.interaction_id??yM(e.tool_call_id,n),conversation_id:e.conversation_id,tool_call_id:e.tool_call_id,component:t.component??e.canvas_config.component,component_version:t.component_version??e.canvas_config.component_version,type:n,value:r,metadata:bM(t.metadata)?t.metadata:{}}}function lM(e){return e.type===`dismiss`||e.type===`clear`?!0:e.type!==`submit`&&e.type!==`skip`?!1:e.component===`canvas.question`||e.component===`canvas.input`||e.component===`canvas.calendar`}function uM(e){return!bM(e)||!Array.isArray(e.content)?``:e.content.map(e=>bM(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
160
- `).trim()}function dM(e,t){let n=bM(t.structuredContent)?t.structuredContent:void 0,r=SM(t.content),i=typeof n?.state==`string`?n.state:`updated`,a=typeof n?.summary==`string`?n.summary:r,o=[`Magic Canvas state update for ${e.canvas_config.component} (${e.tool_call_id}).`,`State: ${i}.`];return a&&o.push(`Summary: ${a}`),n&&o.push(`Structured state: ${CM(n)}`),r&&r!==a&&o.push(r),o.join(`
161
- `)}function fM({conversationId:e,toolCallId:t,args:n,canvasConfig:r}){let i=gM(n);return{id:t,conversation_id:e,tool_call_id:t,arguments:i.componentArguments,canvas_config:r,layout:{preferred_slot:i.preferredSlot??r.layout?.preferred_slot??_M(r.component),display_mode:i.displayMode??`inline`,avoid_safe_area:i.avoidSafeArea??r.layout?.avoid_safe_area??!0,safe_area:i.safeArea??r.layout?.safe_area??Zj,backdrop:i.backdrop??r.layout?.backdrop??Qj},revision:0}}function pM(e,t){let n=e.layout.display_mode;return{...e.layout,display_mode:n,viable_slot:n===`fullscreen`?`full`:hM(e.layout.preferred_slot,t)}}function mM(e,t){let n=e.filter(e=>!e.avoid_safe_area||e.display_mode===`fullscreen`?!1:e.viable_slot===`safe-area-left`||e.viable_slot===`safe-area-right`),r=n.some(e=>e.viable_slot===`safe-area-left`),i=n.some(e=>e.viable_slot===`safe-area-right`);if(r&&i)return{active:!1,video_shift_x:0,backdrop:Qj};let a=[...n].reverse()[0];if(!a||t.width<900)return{active:!1,video_shift_x:0,backdrop:Qj};let o=Math.min(448,Math.max(0,t.width-32)),s=a.safe_area,c=s.x*t.width,l=(s.x+s.width)*t.width,u=Math.min(360,t.width*.3),d=0;return d=a.viable_slot===`safe-area-left`?IM(16+o+24-c,0,u):-IM(l-(t.width-16-o-24),0,u),{active:!0,side:a.viable_slot===`safe-area-left`?`left`:`right`,video_shift_x:Math.round(d),safe_area:s,backdrop:a.backdrop}}function hM(e,t){return e===`full`||e===`safe-area-bottom`&&t.visualViewportHeight!==void 0&&t.visualViewportHeight<t.height*.75?`full`:(e===`safe-area-left`||e===`safe-area-right`)&&t.width<768&&t.height>=t.width?`safe-area-bottom`:e}function gM(e){let t={};for(let[n,r]of Object.entries(e))n===`layout`||n===`preferred_slot`||n===`preferredSlot`||n===`display_mode`||n===`displayMode`||n===`presentation`||n===`fullscreen`||n===`avoid_safe_area`||n===`avoidSafeArea`||n===`safe_area`||n===`safeArea`||n===`backdrop`||(t[n]=r);return{componentArguments:t,preferredSlot:TM(e.layout)??TM(e.preferred_slot)??TM(e.preferredSlot),displayMode:EM(e),avoidSafeArea:DM(e),safeArea:OM(e),backdrop:kM(e)}}function _M(e){switch(e){case`canvas.alert`:return`safe-area-bottom`;case`canvas.chart`:case`canvas.image`:case`canvas.video`:return`full`;default:return Xj}}function vM(e,t){let n=t?.displayScale??1;if(e.display_mode===`fullscreen`||e.viable_slot===`full`)return{maxWidth:void 0,maxHeight:void 0,displayScale:n};let r=t?.maxHeight??720;return e.viable_slot===`safe-area-bottom`?{maxWidth:720,maxHeight:r,displayScale:n}:{width:384,maxHeight:r,displayScale:n}}function yM(e,t){return`ci_${e.replace(/[^a-zA-Z0-9_-]/g,`_`)}_${t}_${globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,10)}`}function bM(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function xM(e){return e instanceof Error?e:Error(String(e))}function SM(e){return Array.isArray(e)?e.map(e=>bM(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
162
- `).trim():``}function CM(e){let t=JSON.stringify(e);return t?t.length<=2e3?t:`${t.slice(0,2e3)}...`:`{}`}function wM(e){if(e===void 0)return;if(!bM(e))return null;let t=TM(e),n=AM(e.safe_area??e.safeArea),r=jM(e.backdrop);return n===null||r===null?null:{...t?{preferred_slot:t}:{},...MM(e.avoid_safe_area??e.avoidSafeArea,`avoid_safe_area`),...n?{safe_area:n}:{},...r?{backdrop:r}:{}}}function TM(e){if(typeof e==`string`&&NM(e))return e;if(!bM(e))return;let t=e.preferred_slot??e.preferredSlot??e.slot;return typeof t==`string`&&NM(t)?t:void 0}function EM(e){if(e.presentation===!0||e.fullscreen===!0)return`fullscreen`;if(e.presentation===!1||e.fullscreen===!1)return`inline`;let t=e.display_mode??e.displayMode;return t===`fullscreen`||t===`inline`?t:void 0}function DM(e){let t=bM(e.layout)?e.layout:void 0,n=e.avoid_safe_area??e.avoidSafeArea??t?.avoid_safe_area??t?.avoidSafeArea;return typeof n==`boolean`?n:void 0}function OM(e){let t=bM(e.layout)?e.layout:void 0;return AM(e.safe_area??e.safeArea??t?.safe_area??t?.safeArea)??void 0}function kM(e){let t=bM(e.layout)?e.layout:void 0;return jM(e.backdrop??t?.backdrop)??void 0}function AM(e){if(e===void 0)return;if(!bM(e))return null;let t=FM(e,`x`),n=FM(e,`y`),r=FM(e,`width`),i=FM(e,`height`);return t===void 0||n===void 0||r===void 0||i===void 0||t<0||n<0||r<=0||i<=0||t+r>1.001||n+i>1.001?null:{x:IM(t,0,1),y:IM(n,0,1),width:IM(r,0,1),height:IM(i,0,1)}}function jM(e){if(e===void 0)return;if(e===`snapshot_mirror`||e===`none`)return{type:e};if(!bM(e))return null;let t=e.type;return t===`snapshot_mirror`||t===`none`?{type:t}:null}function MM(e,t){return typeof e==`boolean`?{[t]:e}:{}}function NM(e){return Yj.includes(e)}function PM(e,t){let n=e[t];return typeof n==`string`&&n.length>0?n:void 0}function FM(e,t){let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function IM(e,t,n){return Math.min(Math.max(e,t),n)}function LM(e,t,n){let r=PM(e,t);if(r)return n(r)?r:null}function RM(e){return e.interaction_id!==void 0&&typeof e.interaction_id!=`string`||e.component!==void 0&&typeof e.component!=`string`||e.component_version!==void 0&&typeof e.component_version!=`string`||e.type!==void 0&&typeof e.type!=`string`||e.metadata!==void 0&&!bM(e.metadata)?null:e}var zM=`tavus-deployment magic-canvas/0.0.0`;function BM(e){if(!$j(e)||e.canvas_config===void 0||e.canvas_config===null)return null;let t=eM(e.canvas_config),n=e.properties.tool_call_id;if(!t)return null;if(!n)throw Error(`Received Magic Canvas tool call without tool_call_id.`);let r=tM(e.properties.arguments);if(!r.ok)throw r.error;return fM({conversationId:e.conversation_id,toolCallId:n,args:r.value,canvasConfig:t})}function VM(e){if(!$j(e))return null;if(e.canvas_config!==void 0&&e.canvas_config!==null){let t=BM(e);return t?{kind:`show`,instance:t}:null}return nM(e)}function HM(e){return{body:{interaction_id:e.interaction_id,tool_call_id:e.tool_call_id,component:e.component,component_version:e.component_version,type:e.type,value:e.value,metadata:e.metadata}}}function UM(e,t){return{theme:e.theme,displayMode:t?.display_mode??`inline`,availableDisplayModes:[`inline`,`fullscreen`],...t?{containerDimensions:vM(t),layout:{preferred_slot:t.preferred_slot,viable_slot:t.viable_slot,avoid_safe_area:t.avoid_safe_area,safe_area:t.safe_area,backdrop:t.backdrop}}:{},platform:`web`,userAgent:zM,styles:{variables:WM(e.cssVars)}}}function WM(e){return{"--border-radius-md":e[`--radius-box`]??e[`--tavus-boxes-radius`]??`0.5rem`,"--border-radius-sm":e[`--radius-field`]??e[`--tavus-field-radius`]??`0.375rem`,"--border-radius-xs":e[`--radius-selector`]??`0.25rem`,"--border-radius-lg":e[`--radius-box`]??e[`--tavus-boxes-radius`]??`0.75rem`,"--border-width-regular":e[`--border`]??e[`--tavus-border-width`]??`1px`,"--font-text-sm-size":`0.875rem`,"--font-text-md-size":`1rem`,...GM(e)}}function GM(e){let t=e[`--color-base-content`],n=e[`--color-base-100`],r=e[`--color-base-200`],i=e[`--color-base-300`],a=e[`--color-error`],o={},s=(e,t)=>{t&&(o[e]=t)},c=(e,t,n)=>e&&n?`color-mix(in oklch, ${e} ${t}%, ${n})`:void 0;return s(`--color-background-primary`,n),s(`--color-background-secondary`,r),s(`--color-border-secondary`,i),s(`--color-border-primary`,c(t,28,n)),s(`--color-text-primary`,t),s(`--color-text-secondary`,c(t,62,n)),s(`--color-text-danger`,a),s(`--color-border-danger`,a),o}var KM=1e3,qM=5e3,JM=1200,YM=48,XM=`allow-scripts`,ZM={"canvas.scheduling_embed":`allow-scripts allow-same-origin allow-popups allow-forms`};function QM(e,t){if(!t.contentWindow||e.source!==t.contentWindow)return!1;let n=e.data;return!!n&&typeof n==`object`&&n?.jsonrpc===`2.0`}var $M=class{onmessage;onerror;onclose;#e;#t;constructor(e){this.#e=e}start(){let e=e=>{QM(e,this.#e)&&this.onmessage?.(e.data)};return this.#t=e,globalThis.addEventListener(`message`,e),Promise.resolve()}send(e){return this.#e.contentWindow?.postMessage(e,`*`),Promise.resolve()}close(){return this.#t&&globalThis.removeEventListener(`message`,this.#t),this.#t=void 0,this.onclose?.(),Promise.resolve()}};function eN(e){for(let t of Yj)if(e.some(e=>mN(e)===t))return t;return null}function tN({onLayoutEffectChange:e,onRenderedSlotChange:t,debugEnabled:n=hN()}={}){let{client:r}=G_(),{dataTheme:i,cssVars:a}=Pj(),o=ah(),s=jg(),[c,l]=E([]),[u,d]=lN(),[f,p]=E(()=>({enabled:n,iframeLifecycleState:`idle`})),m=A(e=>{p(t=>({...t,...e}))},[]),h=A((e,t=`*`)=>{if(s!==`joined-meeting`){m({lastError:`Dropped Magic Canvas app message because the Daily meeting is not joined.`});return}o?.sendAppMessage(e,t)},[o,s,m]),g=k(()=>({theme:i.value===`dark`?`dark`:`light`,cssVars:a.value}),[i.value,a.value]);D(()=>{p(e=>e.enabled===n?e:{...e,enabled:n})},[n]),Ug({onAppMessage:A(e=>{if(s!==`joined-meeting`){m({lastToolCall:e.data,iframeLifecycleState:`idle`,lastError:`Dropped Magic Canvas tool call because the Daily meeting is not joined.`});return}try{let t=VM(e.data);if(!t)return;l(e=>oM(e,t)),m({lastToolCall:e.data,parsedCanvasConfig:t.kind===`show`?t.instance.canvas_config:void 0,iframeLifecycleState:t.kind===`clear`?`closed`:`received`,lastError:void 0})}catch(e){m({iframeLifecycleState:`error`,lastError:vN(e).message})}},[s,m])});let _=c.map(e=>({instance:e,layout:pM(e,d)})),v=mM(_.map(({layout:e})=>e),d),y=[..._].reverse().find(({layout:e})=>e.display_mode===`fullscreen`)?.instance.tool_call_id;D(()=>{e?.(v)},[e,v.active,v.side,v.video_shift_x,v.backdrop.type,v.safe_area?.x,v.safe_area?.y,v.safe_area?.width,v.safe_area?.height]);let b=eN(_.map(({layout:e})=>e));D(()=>{t?.(b)},[t,b]);let x=c.length>0||f.enabled;return j(`div`,{ref:u,"data-magic-canvas-root":!0,class:`pointer-events-none absolute inset-0 z-30`,children:[x&&y&&j(`div`,{class:`absolute inset-0 bg-black/45`}),x&&Yj.map(e=>{let t=_.filter(({layout:t})=>mN(t)===e);return t.length===0?null:j(nN,{slot:e,safeAreaTop:v.safe_area?.y,children:e=>t.map(({instance:t,layout:n})=>j(rN,{availableHeight:e,client:r,hostTheme:g,instance:t,layout:n,dimmed:!!(y&&y!==t.tool_call_id),onDebug:m,onComplete:()=>{l(e=>e.filter(e=>e.id!==t.id))},onDisplayModeChange:e=>{l(n=>n.map(n=>n.tool_call_id===t.tool_call_id?{...n,layout:{...n.layout,display_mode:e}}:n))},sendAppMessage:h},t.id))},e)}),x&&j(`div`,{class:`absolute right-4 bottom-24 @max-mobile:right-3 @max-mobile:bottom-20`,children:j(Ij,{state:f})})]})}function nN({slot:e,safeAreaTop:t,children:n}){let[r,i]=uN(),a=n(e===`full`?void 0:i);if(e===`safe-area-left`||e===`safe-area-right`){let n=t==null?`1rem`:`${t*100}%`;return j(`div`,{ref:r,class:pN(e),style:{top:n,bottom:`${fN}px`},"data-canvas-slot":e,children:j(`div`,{class:`my-auto flex w-full flex-col gap-2`,children:a})})}return j(`div`,{ref:r,class:pN(e),"data-canvas-slot":e,children:a})}function rN({availableHeight:e,client:t,hostTheme:n,instance:r,layout:i,dimmed:a,onDebug:o,onComplete:s,onDisplayModeChange:c,sendAppMessage:l}){let u=O(null),d=O(null),f=O(e),p=O(320),m=O(n),h=O(r),g=O(i),_=O(-1),v=O(s),y=O(c),b=O(l),[x,S]=E(320);D(()=>{h.current=r},[r]),D(()=>{p.current=x,d.current?.setHostContext(sN(h.current,m.current,g.current,f.current,x))},[x]),D(()=>{f.current=e;let t=oN(n,u.current);m.current=t,d.current?.setHostContext(sN(h.current,t,g.current,e,p.current))},[e,n]),D(()=>{g.current=i,d.current?.setHostContext(sN(h.current,m.current,i,e,p.current))},[e,i]),D(()=>{v.current=s,y.current=c,b.current=l},[s,c,l]),D(()=>{let e=u.current;if(!e)return;let n=!1,i=null,a=null,s=null,c=null,l=new URL(r.canvas_config.sandbox_url,globalThis.location.href).href,x=e=>{n||o({iframeLifecycleState:`error`,lastError:vN(e).message})},C=()=>{if(n||!a)return;let e=h.current,t=dM(e,a);a=null,b.current({message_type:`conversation`,event_type:`conversation.append_llm_context`,conversation_id:e.conversation_id,properties:{context:t}}),o({lastModelContextUpdate:e.canvas_config.component,lastError:void 0})},w=()=>{if(i)return;if(e.src!==l){e.src;return}if(n||!e.contentWindow)return;let u=new Mj(null,{name:`tavus-deployment`,version:`0.0.0`},{logging:{},message:{text:{},structuredContent:{}},updateModelContext:{text:{},structuredContent:{}}},{hostContext:sN(r,oN(m.current,e),g.current,f.current,p.current)});i=u,d.current=u,u.oninitialized=()=>{n||(o({iframeLifecycleState:`ready`}),_.current=h.current.revision,u.sendToolInput({arguments:h.current.arguments}).catch(x))},u.onsizechange=({height:e})=>{!n&&typeof e==`number`&&Number.isFinite(e)&&S(Math.min(Math.max(e,YM),720))},u.onmessage=async e=>{let r=sM(e),i=uM(e);if(!r){if(i){let e=`Magic Canvas message included text without interaction metadata; no interaction row was recorded.`;return o({lastInteractionPostResult:`error`,lastError:e}),{isError:!0,code:`missing_interaction_metadata`,message:e}}return{}}try{let e=h.current,a=cM(e,r),s=HM(a),l=new AbortController,u=globalThis.setTimeout(()=>l.abort(),qM);try{await wn(t,a.conversation_id,s.body,{signal:l.signal})}finally{globalThis.clearTimeout(u)}if(n)return{};i&&b.current({message_type:`conversation`,event_type:`conversation.respond`,conversation_id:e.conversation_id,properties:{text:i}}),o({lastInteractionPostResult:`success`,lastError:void 0}),lM(a)&&(a.type===`submit`?(c&&clearTimeout(c),c=setTimeout(()=>{c=null,n||v.current()},JM)):v.current())}catch(e){let t=vN(e).message;return o({lastInteractionPostResult:`error`,lastError:t}),{isError:!0,code:`interaction_post_failed`,message:t}}return{}},u.onupdatemodelcontext=async e=>(a=e,s||=setTimeout(()=>{s=null,C()},KM),{}),u.onrequestdisplaymode=async({mode:e})=>{let t=e===`fullscreen`?`fullscreen`:`inline`;return y.current(t),g.current={...g.current,display_mode:t,viable_slot:t===`fullscreen`?`full`:g.current.viable_slot},u.setHostContext(sN(h.current,m.current,g.current,f.current,p.current)),{mode:t}},u.connect(new $M(e)).then(()=>void 0).catch(x)};o({iframeLifecycleState:`mounting`,lastInteractionPostResult:void 0}),r.canvas_config.sandbox_url,e.src=r.canvas_config.sandbox_url;let ee=()=>{w()};return e.addEventListener(`load`,ee),w(),()=>{s&&=(clearTimeout(s),null),c&&=(clearTimeout(c),null),C(),n=!0,e.removeEventListener(`load`,ee),d.current=null,o({iframeLifecycleState:`closed`}),i&&Fj(i)}},[t,r.id,r.canvas_config.sandbox_url,o]),D(()=>{r.revision!==0&&(r.revision<=_.current||(_.current=r.revision,d.current?.sendToolInput({arguments:r.arguments}).catch(e=>{o({iframeLifecycleState:`error`,lastError:vN(e).message})})))},[r.arguments,r.revision,o]);let C=i.viable_slot===`full`||i.display_mode===`fullscreen`,w=C?null:cN(x,e),ee=w?.placeholderStyle,T=w?.cardStyle,te=C?{height:`100%`}:w?.iframeStyle??{height:`${x}px`},ne=[`pointer-events-auto w-full overflow-hidden rounded-lg border border-base-300 bg-base-100 shadow-xl transition-[opacity,transform]`,C?`fixed inset-4 z-10 max-w-none`:`max-w-md`,a?`scale-[0.98] opacity-40`:``].filter(Boolean).join(` `),re=ZM[r.canvas_config.component]??XM,ie=j(`div`,{class:ne,style:T,"data-canvas-card":i.viable_slot,children:j(`iframe`,{ref:u,title:`${r.canvas_config.component} ${r.canvas_config.component_version}`,class:C?`block h-full w-full border-0 bg-transparent`:`block border-0 bg-transparent`,sandbox:re,style:te})});return C?ie:j(`div`,{class:`block w-full`,style:ee,children:ie})}var iN=[`--color-base-100`,`--color-base-200`,`--color-base-300`,`--color-base-content`,`--color-primary`,`--color-error`];function aN(e){if(!e||typeof getComputedStyle!=`function`)return{};let t=getComputedStyle(e),n={};for(let e of iN){let r=t.getPropertyValue(e).trim();r&&(n[e]=r)}return n}function oN(e,t){let n=aN(t);return Object.keys(n).length===0?e:{...e,cssVars:{...e.cssVars,...n}}}function sN(e,t,n,r,i){let a=UM(t,n),o=n.viable_slot===`full`||n.display_mode===`fullscreen`,s=o?void 0:gN(r),c=o?1:cN(i??0,r)?.displayScale??1;return{...e.canvas_config.host_context,...a,containerDimensions:{..._N(a.containerDimensions)?a.containerDimensions:{},...s===void 0?{}:{maxHeight:s},displayScale:c}}}function cN(e,t){if(t===void 0||!Number.isFinite(t)||t<=0)return null;let n=Math.min(e,720);if(n<=t)return{displayScale:1,placeholderStyle:{maxHeight:`${t}px`},cardStyle:void 0,iframeStyle:{width:`100%`,height:`${n}px`}};let r=t/n;return r>=.85?{displayScale:r,placeholderStyle:{height:`${n*r}px`,maxHeight:`${t}px`,overflow:`hidden`},cardStyle:{height:`${n}px`,transform:`scale(${r})`,transformOrigin:`top center`},iframeStyle:{width:`100%`,height:`${n}px`}}:{displayScale:1,placeholderStyle:{maxHeight:`${t}px`},cardStyle:void 0,iframeStyle:{width:`100%`,height:`${t}px`}}}function lN(){let e=O(null),[t,n]=E(()=>dN(null));return D(()=>{let t=()=>n(t=>{let n=dN(e.current);return t.width===n.width&&t.height===n.height&&t.visualViewportHeight===n.visualViewportHeight?t:n});t(),globalThis.addEventListener(`resize`,t),globalThis.visualViewport?.addEventListener(`resize`,t);let r;return typeof ResizeObserver<`u`&&e.current&&(r=new ResizeObserver(t),r.observe(e.current)),()=>{globalThis.removeEventListener(`resize`,t),globalThis.visualViewport?.removeEventListener(`resize`,t),r?.disconnect()}},[]),[e,t]}function uN(){let e=O(null),[t,n]=E();return D(()=>{let t=e.current;if(!t)return;let r=e=>{let r=e??t.getBoundingClientRect().height;!Number.isFinite(r)||r<=0||n(Math.floor(r))},i=()=>r();if(i(),typeof ResizeObserver>`u`)return globalThis.addEventListener(`resize`,i),()=>globalThis.removeEventListener(`resize`,i);let a=new ResizeObserver(e=>{r(e[0]?.contentRect.height)});return a.observe(t),()=>a.disconnect()},[]),[e,t]}function dN(e){let t=globalThis.visualViewport?.height,n=e?.getBoundingClientRect();if(n&&n.width>0&&n.height>0){let e=t===void 0?void 0:Math.max(0,(globalThis.innerHeight||0)-t);return{width:n.width,height:n.height,visualViewportHeight:e===void 0?void 0:Math.max(0,n.height-e)}}return{width:globalThis.innerWidth||1024,height:globalThis.innerHeight||768,visualViewportHeight:t}}var fN=72;function pN(e){let t=`absolute flex gap-2`;switch(e){case`safe-area-left`:return`${t} left-4 w-[min(28rem,calc(100vw_-_2rem))] flex-col overflow-y-auto`;case`safe-area-right`:return`${t} right-4 w-[min(28rem,calc(100vw_-_2rem))] flex-col overflow-y-auto`;case`safe-area-bottom`:return`${t} right-4 bottom-24 left-4 flex-col items-center justify-end @max-mobile:right-3 @max-mobile:bottom-20 @max-mobile:left-3`;case`full`:return`${t} inset-4 flex-col items-stretch justify-stretch`}}function mN(e){return e.display_mode===`fullscreen`&&e.preferred_slot!==`full`?e.preferred_slot:e.viable_slot}function hN(){return!1}function gN(e){return e===void 0||!Number.isFinite(e)||e<=0?720:Math.min(Math.floor(e),720)}function _N(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function vN(e){return e instanceof Error?e:Error(String(e))}var yN=24,bN=96;function xN(e=document){let t=Array.from(e.querySelectorAll(`[data-canvas-card]`)).map(e=>e.getBoundingClientRect());return t.length===0?null:{left:Math.min(...t.map(e=>e.left)),right:Math.max(...t.map(e=>e.right)),top:Math.min(...t.map(e=>e.top)),bottom:Math.max(...t.map(e=>e.bottom))}}function SN(e){let t=e?.getRootNode();return t instanceof ShadowRoot?t:document}function CN(e,t,n){if(!t)return!1;let r=globalThis.innerWidth,i=globalThis.innerHeight,a=e?.safe_area??Zj,o=a.x*r+n,s=(a.x+a.width)*r+n,c=a.y*i,l=(a.y+a.height)*i;return o<t.right&&s>t.left&&c<t.bottom&&l>t.top}function wN(e,t,n){let[r,i]=E(()=>e?xN(SN(n?.current)):null);return ut(()=>{if(!e){i(null);return}let t=SN(n?.current),r=()=>i(xN(t)),a=new ResizeObserver(r),o=()=>{for(let e of t.querySelectorAll(`[data-canvas-card]`))a.observe(e)};r(),o(),a.observe(document.documentElement);let s=globalThis.requestAnimationFrame(()=>{r(),o()});return globalThis.addEventListener(`resize`,r),()=>{a.disconnect(),globalThis.removeEventListener(`resize`,r),globalThis.cancelAnimationFrame(s)}},[e,t,n]),e?r:null}function TN(e,t,n,r,i){let a=e?.side??(n===`safe-area-left`?`left`:n===`safe-area-right`?`right`:null);return{usePip:a!=null&&(t===`pip`||t===`auto`&&CN(e,r,i)),side:a}}function EN(e,t=document){let n=globalThis.innerWidth,r=globalThis.innerHeight,i=Array.from(t.querySelectorAll(`[data-canvas-card]`)).map(e=>e.getBoundingClientRect()),a,o,s,c;if(i.length>0){let t=Math.min(...i.map(e=>e.left)),r=Math.max(...i.map(e=>e.right));s=Math.min(...i.map(e=>e.top)),c=Math.max(...i.map(e=>e.bottom)),[a,o]=e===`right`?[0,t]:[r,n]}else{let t=Math.min(448,Math.max(0,n-32));[a,o]=e===`right`?[0,n-16-t]:[16+t,n],s=0,c=r}let l=o-a>=144&&c-s>=bN&&a>=0&&o<=n;if(i.length>0&&!l){let t=Math.min(448,Math.max(0,n-32));[a,o]=e===`right`?[0,n-16-t]:[16+t,n],s=0,c=r}let u=Math.max(0,o-a-yN*2),d=Math.max(bN,Math.min(u,r-yN*2));return{centerX:(a+o)/2,centerY:(s+c)/2,diameter:d}}var DN=`560ms linear(0, 0, .0001, .0002, .0003, .0005, .0007, .001, .0013, .0016, .002, .0024, .0029, .0033, .0039, .0044, .005, .0057, .0063, .007, .0079, .0086, .0094, .0103, .0112, .0121, .0132 1.84%, .0153, .0175, .0201, .0226, .0253, .0283, .0313, .0345, .038, .0416, .0454, .0493, .0535, .0576, .0621, .0667, .0714, .0764, .0816 5.04%, .0897, .098 5.62%, .1071, .1165, .1263 6.56%, .137, .1481 7.25%, .1601 7.62%, .1706 7.94%, .1819 8.28%, .194, .2068 9.02%, .2331 9.79%, .2898 11.44%, .3151 12.18%, .3412 12.95%, .3533, .365 13.66%, .3786, .3918, .4045, .4167, .4288, .4405, .452, .4631 16.72%, .4759, .4884, .5005, .5124, .5242, .5354, .5467, .5576, .5686, .5791, .5894, .5995, .6094, .6194, .6289, .6385, .6477, .6569, .6659 24.45%, .6702, .6747, .6789, .6833, .6877, .6919, .696, .7002, .7043, .7084, .7125, .7165, .7205, .7244, .7283, .7321, .7358, .7396, .7433, .7471, .7507, .7544, .7579, .7615, .7649, .7685, .7718, .7752, .7786, .782, .7853, .7885, .7918, .7951, .7982, .8013, .8043, .8075, .8104, .8135, .8165, .8195, .8224, .8253, .8281, .8309, .8336, .8365, .8391, .8419, .8446, .8472, .8499, .8524, .855, .8575, .8599, .8625 37.27%, .8651, .8678, .8703, .8729, .8754, .8779, .8803, .8827, .8851, .8875, .8898, .892, .8942, .8965, .8987, .9009, .903, .9051, .9071, .9092, .9112, .9132, .9151, .9171, .919, .9209, .9227, .9245, .9262, .928, .9297, .9314, .9331, .9347, .9364, .9379, .9395, .941, .9425, .944, .9454, .9469, .9483, .9497, .951, .9524, .9537, .955, .9562, .9574, .9586, .9599, .961, .9622, .9633, .9644, .9655, .9665, .9676, .9686, .9696, .9705, .9715, .9724, .9733, .9742, .975, .9758, .9766, .9774, .9782, .9789, .9796, .9804, .9811, .9817, .9824, .9831, .9837, .9843, .9849, .9855, .986, .9866, .9871, .9877, .9882, .9887, .9892, .9896 70.56%, .9905 71.67%, .9914 72.82%, .9922, .9929 75.2%, .9936 76.43%, .9942 77.71%, .9948 79.03%, .9954 80.39%, .9959 81.81%, .9963 83.28%, .9968 84.82%, .9972 86.41%, .9975 88.07%, .9979 89.81%, .9982 91.64%, .9984 93.56%, .9987 95.58%, .9989 97.72%, .9991)`;function ON(e,t){let n=Math.abs(t)/2;return e===`left`?`${n}px center`:`calc(100% - ${n}px) center`}function kN(e,t,n){let[r,i]=E(()=>e&&t?EN(t,SN(n?.current)):null);return ut(()=>{if(!e||!t){i(null);return}let r=SN(n?.current),a=()=>i(EN(t,r)),o=new ResizeObserver(a),s=()=>{for(let e of r.querySelectorAll(`[data-canvas-card]`))o.observe(e)};a(),s(),o.observe(document.documentElement);let c=globalThis.requestAnimationFrame(()=>{a(),s()});return globalThis.addEventListener(`resize`,a),()=>{o.disconnect(),globalThis.removeEventListener(`resize`,a),globalThis.cancelAnimationFrame(c)}},[e,t,n]),e&&t?r:null}function AN(e,t){let[n,r]=E(null);return ut(()=>{if(!t){r(null);return}let n=e.current;if(!n)return;let i=()=>{let e=n.clientWidth,t=n.clientHeight;r(e&&t?{width:e,height:t}:null)},a=new ResizeObserver(i);return a.observe(n),i(),()=>a.disconnect()},[t,e]),t?n:null}var jN=1;function MN(e,t,n){return Math.min(Math.max(e,t),n)}function NN(e,t,n,r){let i=Math.min(e.diameter/t.height,1),a=r?.safe_area??Zj,o=((a.x+a.width/2)*t.width+n)*i,s=(a.y+a.height/2)*t.height*i,c=e.diameter/2;return{scale:i,tx:MN(e.centerX-o,e.centerX+c-t.width*i,e.centerX-c),ty:MN(e.centerY-s,e.centerY+c-t.height*i,e.centerY-c)}}var PN=[`cx`,`cy`,`r`,`tx`,`ty`,`s`,`shift`];function FN(e,t,n,r,i){if(!n)return null;let{width:a,height:o}=n,s={x:a/2,y:o/2},c=null;if(e&&(c=NN(e,n,r,i),s={x:(e.centerX-c.tx)/c.scale,y:(e.centerY-c.ty)/c.scale}),t&&c&&e)return{cx:s.x,cy:s.y,r:e.diameter/2/c.scale,tx:c.tx,ty:c.ty,s:c.scale,shift:r};let l=Math.hypot(Math.max(s.x,a-s.x),Math.max(s.y,o-s.y));return{cx:s.x,cy:s.y,r:l*1.1,tx:0,ty:0,s:1,shift:r}}function IN(e,t,n){let r=O(null),i=O(e),a=O(n),o=O(0),s=O(0);i.current=e,a.current=n,D(()=>{let e=i.current;if(!e)return;if(!r.current||LN()){r.current={values:{...e},velocity:{cx:0,cy:0,r:0,tx:0,ty:0,s:0,shift:0}},a.current(e,!0);return}if(o.current)return;let n=Math.max(t,160)/4e3;s.current=performance.now();let c=e=>{o.current=0;let t=i.current,l=r.current;if(!t||!l)return;let u=Math.min((e-s.current)/1e3,1/30);s.current=e;let d=!0;for(let e of PN){let r=(t[e]-l.values[e])/(n*n)-2/n*l.velocity[e],i=l.velocity[e]+r*u,a=l.values[e]+i*u,o=e===`s`?.001:.25;Math.abs(t[e]-a)<o&&Math.abs(i)*n<o?(l.values[e]=t[e],l.velocity[e]=0):(l.values[e]=a,l.velocity[e]=i,d=!1)}a.current(l.values,d),d||(o.current=globalThis.requestAnimationFrame(c))};o.current=globalThis.requestAnimationFrame(c)},[e?PN.map(t=>Math.round(e[t]*100)).join():``,t]),D(()=>()=>{o.current&&globalThis.cancelAnimationFrame(o.current)},[])}function LN(){return globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function RN({geom:e,visible:t}){return j(`div`,{"aria-hidden":`true`,"data-morph":`ring`,class:`pointer-events-none absolute z-10 rounded-full`,style:{top:`${e.centerY-e.diameter/2}px`,left:`${e.centerX-e.diameter/2}px`,width:`${e.diameter}px`,height:`${e.diameter}px`,boxShadow:`0 0 0 3px rgb(255 255 255 / 12%), 0 18px 50px rgb(0 0 0 / 55%)`,opacity:+!!t,transition:`opacity 240ms ease-out`}})}function zN(e,t){let n=t>=0?`left`:`right`,r=O({side:n,shift:t});D(()=>{e&&(r.current={side:n,shift:t})},[e,n,t]);let i=e?n:r.current.side;return{side:i,transformOrigin:ON(i,e?t:r.current.shift),translateX:e?0:-r.current.shift}}function BN(e,t,n){return`${e.side??``}:${e.active}:${t}:${n??``}`}function VN({snapshotUrl:e,transformOrigin:t}){return j(`div`,{class:`absolute inset-0 bg-cover bg-center`,style:{backgroundImage:`url("${e}")`,transform:`scaleX(-1)`,transformOrigin:t}})}function HN({snapshotUrl:e,translateX:t,transition:n,transformOrigin:r}){return j(`div`,{"aria-hidden":`true`,"data-morph":`mirror`,class:`pointer-events-none absolute z-0 overflow-hidden`,style:{inset:`0 0`,transform:`translate3d(${t}px, 0, 0)`,transition:`transform ${n}`,willChange:`transform`},children:j(VN,{snapshotUrl:e,transformOrigin:r})})}function UN({ambient:e,usePip:t,transition:n}){return e===`none`?null:j(`div`,{"aria-hidden":`true`,"data-morph":`ambient`,class:`pointer-events-none absolute inset-0 z-0`,style:{opacity:+!!t,transition:`opacity ${n}`,background:e===`darker`?`rgb(0 0 0 / 40%)`:`rgb(0 0 0 / 15%)`}})}function WN({morphCapable:e,snapshotUrl:t,mirrorSide:n,videoShiftX:r,transition:i,sceneRef:a,videoWrapRef:o,fill:s,videoRef:c}){return j(`div`,{ref:a,"data-morph":`scene`,class:`absolute inset-0`,style:e?{transformOrigin:`top left`}:void 0,children:j(`div`,{ref:o,class:`absolute inset-0`,style:e?void 0:{transform:`translate3d(${r}px, 0, 0)`,transition:`transform ${i}`},children:[s(c),e&&t!==null&&j(`div`,{"aria-hidden":`true`,"data-morph":`window-mirror`,class:`absolute top-0 bottom-0 w-full`,style:n===`right`?{left:`calc(100% - ${jN}px)`}:{right:`calc(100% - ${jN}px)`},children:j(VN,{snapshotUrl:t,transformOrigin:`center`})})]})})}function GN({canvasLayoutEffect:e,smartSidecarActive:t,isScreenSharing:n,fill:r,captureSnapshot:i,transition:a=DN,transitionMs:o=560,personaMode:s=`shift`,renderedSlot:c=null,ambient:l=`default`,children:u}){let d=O(null),[f,p]=E(null),m=t&&e.backdrop.type===`snapshot_mirror`,h=t?e.video_shift_x:0,g=O(null),_=BN(e,h,c),{usePip:v,side:y}=TN(e,s,c,wN(s!==`shift`,_,g),h),b=kN(s!==`shift`,y,g),x=zN(m,h);D(()=>{if(!m)return;let e=!1,t=0,n,r=0,a=()=>{if(e)return;let t=i(d.current);if(t){p(t);return}r+=1,r<8&&(n=globalThis.setTimeout(a,150))};return typeof globalThis.requestAnimationFrame==`function`?t=globalThis.requestAnimationFrame(a):n=globalThis.setTimeout(a,0),()=>{e=!0,t&&globalThis.cancelAnimationFrame?.(t),n&&globalThis.clearTimeout(n)}},[m,e.side,e.video_shift_x,i]),D(()=>{if(m||f===null)return;let e=globalThis.setTimeout(()=>{p(null)},o);return()=>globalThis.clearTimeout(e)},[m,f,o]);let S=v&&y!=null&&b!=null,C=s!==`shift`,w=AN(g,C),ee=f!==null&&!C,T=C&&y!=null,te=O(null),ne=O(null),[re,ie]=E(!0),ae=O(!0),oe=A((e,t)=>{let n=te.current;n&&(n.style.clipPath=`circle(${e.r}px at ${e.cx}px ${e.cy}px)`,n.style.transform=`translate(${e.tx}px, ${e.ty}px) scale(${e.s})`);let r=ne.current;r&&(r.style.transform=`translate3d(${e.shift}px, 0, 0)`),ae.current!==t&&(ae.current=t,ie(t))},[]);return IN(C?FN(b,S,w,h,e):null,o,oe),j(`div`,{ref:g,class:`relative w-full h-full overflow-hidden ${n?`flex items-center justify-center`:``}`,children:[ee&&f!==null&&j(HN,{snapshotUrl:f,translateX:x.translateX,transition:a,transformOrigin:x.transformOrigin}),T&&j(UN,{ambient:l,usePip:v,transition:a}),j(`div`,{"data-morph":`fg`,class:`absolute inset-0 z-10`,children:j(WN,{morphCapable:C,snapshotUrl:f,mirrorSide:x.side,videoShiftX:h,transition:a,sceneRef:te,videoWrapRef:ne,fill:r,videoRef:d})}),C&&b&&j(RN,{geom:b,visible:S&&re}),u]})}var KN=1e4;function qN({onTimeout:e,timeoutMs:t=KN,active:n=!0}){let r=Rb().length>0,[i,a]=E(!1),o=O(e);return D(()=>{o.current=e},[e]),D(()=>{if(!n||r){a(!1);return}let e=setTimeout(()=>{a(!0),o.current()},t);return()=>clearTimeout(e)},[n,r,t]),{hasJoined:r,timedOut:i}}function JN(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.message_type===`system`&&t.event_type===`system.shutdown`}function YN({onShutdown:e}){let t=O(e);D(()=>{t.current=e},[e]),Ug({onAppMessage:A(e=>{JN(e?.data)&&t.current()},[])})}function XN(){let e=ah();return{joinCall:A(({url:t})=>{e?.join({url:t})},[e]),leaveCall:A(()=>{e?.leave()},[e])}}var ZN=_n(`PiP`),QN=360,$N=280;function eP(){return globalThis.window!==void 0&&`documentPictureInPicture`in globalThis.window}function tP(e){let{enabled:t,active:n}=e,[r,i]=E(null),a=eP(),o=ft(mv),s=A(()=>{i(e=>(e&&!e.closed&&e.close(),null))},[]),c=A(async()=>{if(a&&!(!t||!n)&&!(r&&!r.closed))try{let e=await globalThis.window.documentPictureInPicture.requestWindow({width:QN,height:$N}),t=Je.replace(/:host(?=[\s,{])/g,`:host, :root`),n=e.document.createElement(`style`);n.textContent=t,e.document.head.appendChild(n),e.document.body.style.margin=`0`,e.document.body.style.width=`100%`,e.document.body.style.height=`100vh`,e.document.body.style.overflow=`hidden`,e.addEventListener(`pagehide`,()=>{i(t=>t===e?null:t)},{once:!0}),i(e)}catch(e){ZN.warn(`Failed to open PiP window`,e)}},[a,t,n,r]);return D(()=>{if(!t||!a||!n)return;let e=()=>{document.visibilityState===`hidden`?c():document.visibilityState===`visible`&&s()};document.addEventListener(`visibilitychange`,e);let r=[],i=null,o=`none`,l=!1;if(typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;i=e.metadata,o=e.playbackState;try{e.metadata=new MediaMetadata({title:`Tavus conversation`}),e.playbackState=`playing`,l=!0}catch(e){ZN.warn(`mediaSession metadata setup failed`,e)}let t=(t,n)=>{try{e.setActionHandler(t,n),r.push(t)}catch(e){ZN.warn(`mediaSession.${t} not supported`,e)}};t(`enterpictureinpicture`,()=>{c()}),t(`play`,()=>{}),t(`pause`,()=>{})}return()=>{if(document.removeEventListener(`visibilitychange`,e),typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;for(let t of r)try{e.setActionHandler(t,null)}catch{}if(l)try{e.metadata=i,e.playbackState=o}catch{}}}},[t,a,n,c,s]),D(()=>{(!n||!t)&&r&&!r.closed&&s()},[n,t,r,s]),D(()=>()=>{r&&!r.closed&&r.close()},[r]),D(()=>{if(!r||r.closed||!o)return;let e=()=>{r.document.body.setAttribute(`data-theme`,o.dataTheme.value);let e=o.cssVars.value;for(let[t,n]of Object.entries(e))r.document.body.style.setProperty(t,n)};e();let t=o.dataTheme.subscribe(()=>e()),n=o.cssVars.subscribe(()=>e());return()=>{t(),n()}},[r,o]),{pipWindow:r,isSupported:a,requestPipWindow:c,closePipWindow:s}}var nP={active:!1,video_shift_x:0,backdrop:{type:`snapshot_mirror`}},rP=ya(({id:e,showAudioWave:t=!0})=>{let n=n_(e).isOff;return j(`div`,{class:`relative aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10 ${n?`hidden`:``}`,children:[j(ng,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover ${n?`hidden`:``}`}),t&&j(`div`,{class:`absolute bottom-2 right-2`,children:j(Pb,{id:e})})]})}),iP=ya(()=>{let e=Hh(),{isScreenSharing:t}=rb(),n=Rb()[0];return j(le,{children:[t&&n&&j(rP,{id:n}),e&&j(rP,{id:e,showAudioWave:!1})]})}),aP=ya(()=>j(`div`,{class:`absolute top-4 left-4 flex flex-col items-end gap-2 z-20`,children:j(iP,{})})),oP=ya(({isAudioOnly:e,canvasLayoutEffect:t,canvasRenderedSlot:n})=>{let r=Hh(),i=!e_(r??``).isOff,a=zb(e),o=e_(a.phase===`ready`?a.replicaId:``),s=!i&&(o.state===`playable`||o.state===`loading`),c=t.active&&!i&&(!e||s);return a.phase===`left`?j(Mb,{}):a.phase===`connecting`?j(jb,{}):e&&!s?j(`div`,{class:`absolute inset-0 flex items-center justify-center`,children:[j(Fb,{sessionId:a.replicaId}),j(eg,{sessionId:a.replicaId})]}):j(GN,{canvasLayoutEffect:s?{...t,backdrop:{type:`none`}}:t,smartSidecarActive:c,isScreenSharing:i,captureSnapshot:uP,personaMode:s?`shift`:`auto`,renderedSlot:n,fill:t=>j(Hb,{personaSessionId:a.replicaId,localSessionId:r,isPresenting:s,isScreenSharing:i,isAudioOnly:e,avatarOff:a.videoState.isOff,videoRef:t}),children:j(eg,{sessionId:a.replicaId})})}),sP=ya(({items:e})=>{let[t,n]=E(!1),r=O(null);return D(()=>{if(!t)return;let e=e=>{r.current&&!e.composedPath().includes(r.current)&&n(!1)},i=e=>{e.key===`Escape`&&n(!1)};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,i)}},[t]),j(`div`,{ref:r,class:`relative`,children:[j(`button`,{type:`button`,onClick:()=>n(e=>!e),"aria-pressed":t,"aria-expanded":t,"aria-haspopup":`true`,"aria-label":t?`Close more controls`:`More controls`,class:`btn btn-control ${t?`btn-primary`:`btn-neutral`}`,children:j(My,{name:`more`})}),t&&j(`div`,{role:`menu`,class:`absolute bottom-full mb-1 left-1/2 -translate-x-1/2 flex flex-row items-center gap-1 p-1 rounded-box bg-base-100 border border-base-300 shadow-lg z-30 whitespace-nowrap`,children:e})]})}),cP=ya(({items:e})=>e.length<=1?j(le,{children:e}):j(sP,{items:e})),lP=ya(({onLeave:e})=>{let{joinCall:t,leaveCall:n}=XN(),r=jg(),{hasMicError:i}=Xg(),{config:a}=G_(),{session:o,end:s}=vb(),c=O(null),l=ft(wv)?.frameRef??c,[u,d]=E(!1),[f,p]=E(!1),[m,h]=E(nP),[g,_]=E(null),v=o.value?.conversationUrl,y=a.value.customization.conversation,b=y.modality===`audio`,x=y.enable_chat,S=y.enable_closed_captions,C=y.enable_picture_in_picture,{pipWindow:w}=tP({enabled:C,active:r===`joined-meeting`});D(()=>(v&&t({url:v}),()=>{n()}),[]),D(()=>{(r===`left-meeting`||r===`error`)&&e()},[r,e]),D(()=>{let e=()=>{let e=l.current,t=e?.getRootNode(),n=t instanceof Document||t instanceof ShadowRoot?t:null;d(!!e&&n?.fullscreenElement===e)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]);let ee=A(()=>{let e=l.current;if(!e)return;let t=e.getRootNode();(t instanceof Document||t instanceof ShadowRoot?t:null)?.fullscreenElement===e?document.exitFullscreen?.():e.requestFullscreen?.()},[]);A(()=>{p(e=>!e)},[]);let T=A(()=>{s(),n()},[s]);if(qN({active:r===`joined-meeting`,onTimeout:T}),YN({onShutdown:T}),!v)return null;let te=[j(_b,{compact:!0},`screen-share`)];return x&&te.push(j(Db,{compact:!0},`chat`)),j(bb,{children:j(Tb,{children:[j(`div`,{class:`absolute inset-0`,children:[j(`div`,{class:`relative w-full h-full z-[5]`,children:[i&&j(`div`,{class:`absolute top-0 left-0 right-0 z-10 bg-error text-error-content px-4 py-2 text-sm text-center`,children:`Camera or microphone access denied. Please check your settings and try again.`}),j(oP,{isAudioOnly:b,canvasLayoutEffect:m,canvasRenderedSlot:g}),!b&&j(aP,{}),j(Cb,{}),j(tN,{debugEnabled:f,onLayoutEffectChange:h,onRenderedSlotChange:_}),j(`div`,{class:`absolute top-4 right-4 z-20`,children:j(Nb,{active:u,onToggle:ee,compact:!0})})]}),j(kb,{}),j(`div`,{class:`pointer-events-none absolute bottom-6 left-0 right-0 z-20 transition-opacity transition-transform ${r===`left-meeting`?`opacity-0 translate-y-5`:`opacity-100 translate-y-0`}`,"aria-hidden":r===`left-meeting`,children:j(`div`,{class:`flex justify-center items-center gap-2 @max-mobile:gap-1 ${r===`left-meeting`?``:`pointer-events-auto`}`,children:[j(pb,{}),!b&&j(mb,{}),S&&j(Sb,{}),j(cP,{items:te}),j(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:T,"aria-label":`Leave call`,children:j(My,{name:`leave`,"aria-label":`Leave Call`})})]})})]}),w&&Ia(j(Vb,{onLeave:T}),w.document.body)]})})});function uP(e){if(!e||e.readyState<2||!e.videoWidth||!e.videoHeight)return null;let t=document.createElement(`canvas`),n=Math.round(640*(e.videoHeight/e.videoWidth));t.width=640,t.height=n;let r=t.getContext(`2d`);if(!r)return null;r.drawImage(e,0,0,640,n);try{return t.toDataURL(`image/jpeg`,.82)}catch{return null}}function dP({loading:e=!1,disabled:t,class:n,children:r,...i}){return j(`button`,{type:`button`,class:`btn relative ${n?` ${n}`:``}`,disabled:t||e,"aria-busy":e||void 0,...i,children:[j(`span`,{children:r}),e&&j(`span`,{class:`absolute inset-0 flex items-center justify-center backdrop-blur-xs`,"aria-hidden":`true`,children:j(`span`,{class:`loading loading-spinner loading-sm`})})]})}function fP(e){switch(e){case`blocked`:return`denied`;case`in-use`:return`in-use`;case`not-found`:return`not-found`;case`not-supported`:case`undefined-mediadevices`:return`unsupported`;case`constraints-invalid`:case`constraints-none-specified`:return`unknown`;default:return null}}function pP(e){let t=e instanceof Error?e.name:``,n=e instanceof Error?e.message.toLowerCase():``;return t===`NotAllowedError`||n.includes(`denied`)||n.includes(`not allowed`)?`denied`:t===`NotReadableError`||n.includes(`in use`)||n.includes(`readable`)?`in-use`:t===`NotFoundError`||n.includes(`not found`)||n.includes(`no device`)?`not-found`:t===`NotSupportedError`||n.includes(`not supported`)?`unsupported`:`unknown`}function mP(){let e=ah(),{micState:t,camState:n}=Xg(),{config:r}=G_(),i=r.value.customization.conversation.modality,a=i===`video`,[o,s]=E(null),[c,l]=E(null),[u,d]=E(!1);D(()=>{let e=!1;return navigator.permissions.query({name:`microphone`}).then(t=>{e||(s(t.state),t.onchange=()=>{e||s(t.state)})}).catch(()=>{}),()=>{e=!0}},[]);let f=A(()=>{if(!e)return;l(null),d(!0);let t={};a||(t.videoSource=!1),Promise.resolve(e.startCamera(t)).catch(e=>{l(pP(e))})},[e,a]),p=k(()=>c&&t!==`granted`?c:fP(t),[t,c]),m=k(()=>a?c&&n!==`granted`&&t===`granted`?c:fP(n):null,[n,t,a,c]),h=k(()=>p??m??null,[p,m]),g=k(()=>c||(u?h:null),[u,c,h]),_=k(()=>o===`prompt`&&g===null,[o,g]),v=k(()=>o===`denied`||g!==null,[o,g]),y=k(()=>g===null&&o!==`prompt`&&o!==`denied`&&t===`granted`&&(!a||n===`granted`),[o,t,n,a,g]);return{isPermissionsPrompt:_,isPermissionsLoading:k(()=>!_&&!v&&!y,[_,v,y]),isPermissionsGranted:y,isPermissionsDenied:v,permissionErrorReason:g,micErrorReason:u?p:null,camErrorReason:u?m:null,modality:i,requestPermissions:f}}function hP(e,t,n,r){return t?e?.prompt??`Make sure your camera and mic are ready!`:n?e?.loading??`Getting your camera and mic ready...`:r?e?.denied??`Camera and mic access denied. Allow permissions to continue.`:null}function gP({message:e}){return j(`div`,{class:`relative max-w-[min(20rem,90%)]`,children:[j(`div`,{class:`px-4 py-2 rounded-box bg-neutral text-neutral-content text-sm font-medium shadow-lg text-center`,role:`status`,"aria-live":`polite`,children:e}),j(`svg`,{class:`absolute left-1/2 -translate-x-1/2 top-full text-neutral`,width:`16`,height:`8`,viewBox:`0 0 16 8`,"aria-hidden":`true`,children:j(`path`,{d:`M0 0 L8 8 L16 0 Z`,fill:`currentColor`})})]})}var _P=ya(({text:e,isJoining:t=!1,onJoin:n,onCancel:r})=>{let i=ah(),{localSessionId:a,isCamMuted:o}=tb(),{isPermissionsPrompt:s,isPermissionsLoading:c,isPermissionsGranted:l,isPermissionsDenied:u,requestPermissions:d}=mP();D(()=>{d()},[]);let f=hP(e,s,c,u);return j(`div`,{class:`absolute inset-0 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,children:[l&&!o?j(`div`,{class:`absolute inset-0 flex items-center justify-center bg-black overflow-hidden`,children:j(ng,{type:`video`,sessionId:a??``,mirror:!0,fit:`cover`,className:`w-full h-full object-cover!`})}):j(`div`,{class:`absolute inset-0 flex items-center justify-center text-base-content/40`,children:j(My,{name:`face-smile`,size:`7rem`,"aria-label":`Camera off`})}),j(`div`,{class:`absolute bottom-6 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[90%]`,children:[f&&j(gP,{message:f}),j(`div`,{class:`flex flex-wrap items-center justify-center gap-1.5 @max-mobile:gap-1`,children:[j(`div`,{class:`flex items-center justify-center gap-1.5 shrink-0 @max-mobile:gap-1`,children:[j(pb,{}),j(mb,{})]}),j(dP,{class:`btn-accent `,loading:t,disabled:!l,onClick:n,children:e?.join??`Join Video Chat`}),u&&j(`button`,{type:`button`,class:`btn btn-error `,onClick:()=>{i&&i.leave(),r?.()},children:e?.cancel??`Cancel`})]})]})]})}),vP=`Password required`,yP=`Enter the password to start this conversation.`,bP=`Password`,xP=`Continue`;function SP({onSubmit:e,text:t,isSubmitting:n=!1,errorMessage:r}){let[i,a]=E(``),o=mt();return j(`div`,{class:`absolute inset-0 z-30 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`${o}-title`,children:j(`form`,{onSubmit:t=>{t.preventDefault();let r=i.trim();!r||n||e(r)},class:`card bg-base-100 shadow-xl w-full max-w-sm`,children:j(`div`,{class:`card-body gap-3`,children:[j(`h3`,{id:`${o}-title`,class:`card-title text-base-content`,children:t?.title??vP}),j(`p`,{class:`text-sm text-base-content/70`,children:t?.description??yP}),j(`input`,{id:o,type:`password`,autocomplete:`current-password`,class:`input input-bordered w-full`,placeholder:t?.placeholder??bP,value:i,disabled:n,onInput:e=>a(e.target.value),autoFocus:!0}),r&&j(`p`,{class:`text-error text-xs`,role:`alert`,children:r}),j(dP,{class:`btn-primary`,type:`submit`,disabled:!i.trim(),loading:n,children:t?.submit??xP})]})})})}var CP=_n(`CaptchaChallenge`),wP=1;function TP(e){return typeof e==`object`&&!!e&&e.source===`tavus-captcha`&&typeof e.type==`string`}function EP({captcha:e,deploymentId:t,onToken:n,onFallback:r}){let i=(ft(Ct).baseUrl??`https://tavusapi.com`).replace(/\/+$/,``).split(`/`).slice(0,3).join(`/`),[a,o]=E(0),[s,c]=E(0),[l,u]=E(!1),[d,f]=E(!1),p=`${i}${e.challenge_path}?deployment_uuid=${encodeURIComponent(t)}&action=${encodeURIComponent(e.action)}&parent_origin=${encodeURIComponent(window.location.origin)}`,m=A(()=>{f(!1),o(e=>e+1)},[]);return D(()=>{function e(e){if(l||e.origin!==i)return;let a=e.data;if(TP(a)&&a.deployment_uuid===t){if(a.type===`interactive`){f(!0);return}if(a.type===`token`&&a.token){CP.info(`Captcha token received`),f(!1),n(a.token);return}if(a.type===`expired`){CP.info(`Captcha token expired, reloading iframe`),m();return}a.type===`error`&&(CP.warn(`Captcha error received`,a.code),s<wP?(c(e=>e+1),m()):(CP.warn(`Captcha error retries exhausted, falling back to no-token mode`),u(!0),r()))}}return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[i,t,s,l,n,r,m]),l?null:j(`div`,{class:d?`absolute inset-0 z-30 flex items-center justify-center p-4 bg-base-100/70 backdrop-blur-sm animate-[tavusFadeUp_180ms_ease-out]`:`absolute top-0 left-0 w-0 h-0 overflow-hidden opacity-0 pointer-events-none`,"aria-hidden":!d,children:j(`iframe`,{src:p,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups`,title:`Security challenge`,style:{border:`none`,width:`300px`,height:`65px`},scrolling:`no`},a)})}function DP({text:e,onStart:t,isStarting:n}){let{config:r,deploymentId:i}=G_(),a=ft(I_),o=Ly(r.value),s=o.btn_title??e?.fallback_button??`Start the conversation`,c=r.value.customization.terms_content?.trim()??``,l=r.value.customization.terms_enabled===!0,u=c.length>0,d=u&&l,f=k(()=>d&&p_(i,c),[d,i,c]),p=d&&!f,m=r.value.has_password===!0,h=a?.password.value??null,g=m&&!h,_=r.value.captcha??null,{captchaReady:v,captchaEpoch:y,handleCaptchaToken:b,handleCaptchaFallback:x}=cv(_,a),S=mt(),[C,w]=E(f),ee=_!==null&&!v,T=n||d&&!C||g||ee;return j(Uy,{title:o.title,description:o.description,overlay:j(le,{children:[ee&&j(EP,{captcha:_,deploymentId:i,onToken:b,onFallback:x},y),g&&a?j(SP,{onSubmit:a.setPassword}):null]}),children:[j(dP,{class:`btn-neutral rounded-box`,onClick:()=>{d&&C&&!f&&g_(i,c),t()},disabled:T,loading:n,children:s}),u&&j(`div`,{class:`max-w-xs`,children:p?j(`label`,{for:S,class:`flex items-center gap-2 text-xs text-left cursor-pointer`,children:[j(`input`,{id:S,type:`checkbox`,class:`checkbox checkbox-secondary checkbox-xs mt-0.5 shrink-0`,checked:C,onChange:e=>w(e.target.checked)}),j(`span`,{class:`leading-snug`,children:c})]}):j(`p`,{class:`text-xs leading-snug text-base-content/60`,children:c})})]})}function OP({flow:e,welcomeText:t,onUnavailableCancel:n}){switch(e.state){case`idle`:return j(DP,{text:t,onStart:()=>{e.start()},isStarting:e.isStarting});case`haircheck`:return j(_P,{onJoin:()=>{e.join()},onCancel:()=>e.cancel(),isJoining:e.isStarting});case`call`:return j(lP,{onLeave:()=>e.leave()});case`ended`:return j(eb,{onRestart:()=>e.restart()});case`unavailable`:return j(Jy,{cause:e.unavailableCause??`busy`,canRetry:e.canRetry,onRetry:()=>{e.start()},onCancel:n});default:{let t=e.state;throw Error(`Unreachable flow state: ${String(t)}`)}}}var kP=Fe(null);function AP({children:e}){let{config:t}=ft(yi),n=t.peek().customization?.widget,r=n?.expandable??`default`,i=ln(r===`start-expanded`||r===`always`),a=ln(n?.variant??`full`),o=ln(n?.position??`bottom-right`),s=ln(r),c=ln(n?.avatar?.type??`orb`),l=O(r);gn(()=>{let e=t.value.customization?.widget,n=e?.expandable??`default`;a.value=e?.variant??`full`,o.value=e?.position??`bottom-right`,s.value=n,c.value=e?.avatar?.type??`orb`,l.current!==n&&(i.value=n===`start-expanded`||n===`always`,l.current=n)});let u=A(()=>{s.peek()!==`always`&&(i.value=!i.peek())},[i,s]),d=A(()=>{i.value=!0},[i]),f=A(()=>{s.peek()!==`always`&&(i.value=!1)},[i,s]),p=k(()=>({expanded:i,variant:a,position:o,expandable:s,avatarType:c,toggle:u,expand:d,collapse:f}),[i,a,o,s,c,u,d,f]);return j(kP.Provider,{value:p,children:e})}function jP(){let{config:e}=G_();if(e.value.show_tavus_branding!==!1)return j(MP,{});let t=e.value.customization.branding;return t?.logo||t?.text?j(NP,{logo:t.logo,text:t.text}):null}function MP(){let{isDark:e}=Pj(),t=e.value?`white`:`#140206`;return j(`a`,{href:`https://tavus.io`,target:`_blank`,rel:`noopener noreferrer`,class:`inline-flex items-center gap-1 text-xs text-base-content/50 hover:text-base-content/80 transition-colors`,children:[j(`svg`,{viewBox:`0 0 488 452`,class:`h-2.5 w-2.5 shrink-0`,fill:`none`,"aria-hidden":`true`,children:[j(`path`,{d:`M160 152V208H104V152H160Z`,fill:t}),j(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M488 270.5L436 285L451 326L418.766 346L441 360L423 392L435 452H0V0H394.766L488 270.5ZM24 24V428H216.2L209 392L227 360L204.766 346L237 326L222 285L274 270.5L189.038 24H24ZM352 152C336.536 152 324 164.536 324 180C324 195.464 336.536 208 352 208C367.464 208 380 195.464 380 180C380 164.536 367.464 152 352 152Z`,fill:t})]}),j(`span`,{children:[`Powered by `,j(`span`,{class:`underline`,children:`Tavus`})]})]})}function NP({logo:e,text:t}){return j(`div`,{class:`inline-flex items-center gap-1 text-xs text-base-content/50`,children:[e?j(`img`,{src:e,alt:t||`Branding`,class:`h-2.5 shrink-0`}):null,t?j(`span`,{children:t}):null]})}var PP={title:`Hi! Want to chat?`,btn_title:`Start conversation`};function FP(){let{config:e}=G_(),t=e.value.customization.widget?.text;return k(()=>({title:t?.title||PP.title,btn_title:t?.btn_title||PP.btn_title}),[t])}function IP(){let e=ft(kP);if(!e)throw Error(`useWidgetUI must be used within WidgetUIProvider`);return e}var LP={xs:`w-6 h-6`,sm:`w-8 h-8`,md:`w-10 h-10`,lg:`w-16 h-16`},RP={xs:`w-3 h-3`,sm:`w-4 h-4`,md:`w-5 h-5`,lg:`w-8 h-8`};function zP({size:e=`md`,className:t=``}){let{avatarType:n}=IP(),{config:r}=G_(),i=Iy(r.value);return(Ly(r.value).background.type===`replica`||n.value===`image`)&&i?j(`div`,{class:`relative ${LP[e]} rounded-box overflow-hidden bg-base-300 ${t}`,children:i.kind===`image`?j(`img`,{src:i.url,class:`absolute inset-0 w-full h-full object-cover`,loading:`lazy`,alt:``}):j(`video`,{src:i.url,class:`absolute inset-0 w-full h-full object-cover`,muted:!0,autoplay:!0,loop:!0,playsinline:!0})}):j(`div`,{class:`relative ${LP[e]} rounded-box bg-primary/15 flex items-center justify-center ${t}`,children:j(`span`,{class:`${RP[e]} rounded-full bg-primary animate-pulse`})})}function BP({variant:e}){let{toggle:t}=IP(),n=FP();return e===`tiny`?j(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`rounded-box overflow-hidden shadow-xl hover:shadow-2xl transition-shadow cursor-pointer`,children:j(zP,{size:`lg`})}):e===`compact`?j(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`group flex items-center gap-2.5 py-2.5 pl-2.5 pr-8 rounded-box bg-base-100 text-base-content border border-base-300 shadow-lg hover:shadow-xl transition-shadow cursor-pointer text-left`,children:[j(zP,{size:`md`}),j(`span`,{class:`flex flex-col gap-0.5`,children:[j(`span`,{class:`text-base font-medium leading-tight`,children:n.title}),j(`span`,{class:`text-sm text-base-content/60 leading-tight`,children:n.btn_title})]})]}):j(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`flex flex-col gap-3 p-3 w-64 rounded-box bg-base-100 text-base-content border border-base-300 shadow-xl hover:shadow-2xl transition-shadow cursor-pointer text-left`,children:[j(`div`,{class:`flex items-center gap-2.5`,children:[j(zP,{size:`md`}),j(`span`,{class:`text-sm font-medium leading-snug`,children:n.title})]}),j(`span`,{class:`btn btn-primary btn-sm w-full pointer-events-none gap-2 flex items-center`,children:[j(My,{name:`cam`,size:16}),j(`span`,{className:`leading-4`,children:n.btn_title})]})]})}var VP=`tavus:widget:greeting-dismissed`;function HP({anchor:e}){let t=FP(),{variant:n,expand:r}=IP(),[i,a]=E(!1);D(()=>{if(n.value===`tiny`){try{if(sessionStorage.getItem(VP)===`1`)return}catch{}a(!0)}},[n]);let o=A(e=>{e.stopPropagation();try{sessionStorage.setItem(VP,`1`)}catch{}a(!1)},[]);if(!i)return null;let s=e===`right`?`right-[-6px] border-r border-b`:`left-[-6px] border-l border-t`,c=e===`right`?`-right-2`:`-left-2`;return j(`button`,{type:`button`,onClick:r,class:`relative max-w-56 rounded-box bg-base-100 text-base-content shadow-lg border border-base-300 px-3 py-2 text-sm text-left cursor-pointer animate-[tavusFadeUp_240ms_ease-out] hover:bg-base-200 transition-colors`,children:[j(`p`,{class:`leading-snug pr-3`,children:t.title}),j(`span`,{role:`button`,tabIndex:0,onClick:o,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&o(e)},class:`absolute -top-2 ${c} btn btn-ghost btn-circle btn-xs bg-base-100 border border-base-300 shadow-sm`,"aria-label":`Dismiss`,children:`×`}),j(`span`,{class:`absolute bottom-3 w-3 h-3 rotate-45 bg-base-100 border-base-300 ${s}`})]})}function UP(){let e=ft(dv);if(!e)throw Error(`useHostBridge must be used within HostBridgeProvider`);return e}var WP=`bg-base-100 text-base-content rounded-box border border-base-300 shadow-xl w-[22rem] flex flex-col animate-[tavusPopIn_180ms_ease-out]`,GP=`bg-base-100 text-base-content w-[100vw] h-[100dvh] flex flex-col animate-[tavusFadeUp_180ms_ease-out]`,KP=`p-1 flex-1 min-h-0`,qP=`p-1 flex-1 min-h-0`;function JP({variant:e,children:t,fullscreen:n}){let{collapse:r,expandable:i}=IP(),a=i.value!==`always`;return n?j(`div`,{class:GP,children:[j(`div`,{class:`flex items-center justify-end gap-2 px-2.5 py-1.5 border-b border-base-300`,children:a&&j(`button`,{type:`button`,class:`btn btn-ghost btn-circle btn-xs`,onClick:r,"aria-label":`Close`,children:j(My,{name:`close`,size:14})})}),j(`div`,{class:qP,children:t}),j(`div`,{class:`flex justify-end px-2.5`,children:j(jP,{})})]}):j(`div`,{class:`flex flex-col h-[min(34rem,calc(100dvh-3rem))]`,children:[j(`div`,{class:`${WP} flex-1 overflow-hidden`,children:[j(`div`,{class:`flex items-center justify-end gap-2 px-2.5 pt-1.5 shrink-0`,children:a&&j(`button`,{type:`button`,class:`btn btn-ghost btn-circle btn-xs`,onClick:r,"aria-label":`Close`,children:j(My,{name:`close`,size:14})})}),j(`div`,{class:KP,children:t})]}),j(`div`,{class:`flex justify-end pr-2 pt-1.5 shrink-0`,children:j(jP,{})})]})}var YP=_n(`Widget`),XP=`1rem`,ZP=480;function QP(){return typeof window>`u`?!1:window.innerWidth<=ZP}function $P(e){switch(e){case`bottom-right`:return{bottom:XP,right:XP};case`bottom-left`:return{bottom:XP,left:XP};case`top-right`:return{top:XP,right:XP};case`top-left`:return{top:XP,left:XP};case`top`:return{top:XP,left:`50%`,transform:`translateX(-50%)`};case`bottom`:return{bottom:XP,left:`50%`,transform:`translateX(-50%)`}}}var eF=[`top`,`bottom`,`left`,`right`,`transform`];function tF(e){return e===`bottom-left`||e===`top-left`?`left`:`right`}function nF(){let{config:e,initError:t}=G_(),n=FP(),{expanded:r,position:i,variant:a}=IP(),{shadowHost:o}=UP(),s=Yy(),c=ln(QP());D(()=>{if(typeof window>`u`)return;c.value=QP();let e=()=>{c.value=QP()};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[c]);let l=k(()=>({fallback_button:n.btn_title}),[n.btn_title]);if(gn(()=>{let e=o.value,t=i.value,n=r.value,a=n&&c.value;if(e){if(a)e.style.top=`0`,e.style.right=`0`,e.style.bottom=`0`,e.style.left=`0`,e.style.transform=``;else{let n=$P(t);for(let t of eF)e.style[t]=n[t]??``}e.dataset.tavusWidgetPosition=t,e.dataset.tavusWidgetExpanded=n?`true`:`false`,e.dataset.tavusWidgetFullscreen=a?`true`:`false`,e.dataset.tavusWidgetSmall=c.value?`true`:`false`}}),t.value)return YP.error(`Widget cannot initialize (init request failed):`,t.value),null;if(e.value.is_available===!1&&e.value.unavailable_reason===`total_limit`)return YP.error(`Widget is unavailable (total_limit reached) — not rendering`),null;if(!r.value){let e=tF(i.value),t=e===`right`?`flex items-end gap-2 justify-end`:`flex items-end gap-2 flex-row-reverse justify-end`,n=e===`right`?`justify-end pr-2`:`justify-start pl-2`;return j(`div`,{class:`flex flex-col`,children:[j(`div`,{class:t,children:[j(HP,{anchor:e}),j(BP,{variant:a.value})]}),j(`div`,{class:`flex ${n} pt-1.5`,children:j(jP,{})})]})}return e.value.is_available===!1?j(JP,{variant:a.value,fullscreen:c.value,children:j(Tv,{children:j(Jy,{cause:e.value.unavailable_reason??`daily_limit`,canRetry:!1,onRetry:()=>{}})})}):j(JP,{variant:a.value,fullscreen:c.value,children:j(Tv,{children:j(OP,{flow:s,welcomeText:l,onUnavailableCancel:()=>s.restart()})})})}var rF=`:host {
158
+ - "app": Tool callable by the app from this server only`),csp:lD().optional(),permissions:lD().optional()}),Z({mimeTypes:X(J()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});var Vj=Z({method:$(`ui/download-file`),params:Z({contents:X(Q([hA,gA])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),Hj=Z({method:$(`ui/message`),params:Z({role:$(`user`).describe(`Message role, currently only "user" is supported.`),content:X(_A).describe(`Message content blocks (text, image, etc.).`)})});Z({method:$(`ui/notifications/sandbox-resource-ready`),params:Z({html:J().describe(`HTML content to load into the inner iframe.`),sandbox:J().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:Oj.optional().describe(`CSP configuration from resource metadata.`),permissions:kj.optional().describe(`Sandbox permissions from resource metadata.`)})}),Z({method:$(`ui/notifications/tool-result`),params:EA.describe(`Standard MCP tool execution result.`)});var Uj=Z({toolInfo:Z({id:KO.optional().describe(`JSON-RPC id of the tools/call request.`),tool:CA.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:Cj.optional().describe(`Current color theme preference.`),styles:Mj.optional().describe(`Style configuration for theming the app.`),displayMode:wj.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:X(wj).optional().describe(`Display modes the host supports.`),containerDimensions:Q([Z({height:Y().describe(`Fixed container height in pixels.`)}),Z({maxHeight:Q([Y(),oD()]).optional().describe(`Maximum container height in pixels.`)})]).and(Q([Z({width:Y().describe(`Fixed container width in pixels.`)}),Z({maxWidth:Q([Y(),oD()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
159
+ container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:J().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:J().optional().describe(`User's timezone in IANA format.`),userAgent:J().optional().describe(`Host application identifier.`),platform:Q([$(`web`),$(`desktop`),$(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:Z({touch:aD().optional().describe(`Whether the device supports touch input.`),hover:aD().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:Z({top:Y().describe(`Top safe area inset in pixels.`),right:Y().describe(`Right safe area inset in pixels.`),bottom:Y().describe(`Bottom safe area inset in pixels.`),left:Y().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough();Z({method:$(`ui/notifications/host-context-changed`),params:Uj.describe(`Partial context update containing only changed fields.`)});var Wj=Z({method:$(`ui/update-model-context`),params:Z({content:X(_A).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:pD(J(),cD().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),Gj=Z({method:$(`ui/initialize`),params:Z({appInfo:sk.describe(`App identification (name and version).`),appCapabilities:Lj.describe(`Features and capabilities this app provides.`),protocolVersion:J().describe(`Protocol version this app supports.`)})});Z({protocolVersion:J().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:sk.describe(`Host application identification and version.`),hostCapabilities:Ij.describe(`Features and capabilities provided by the host.`),hostContext:Uj.describe(`Rich context about the host environment.`)}).passthrough();var Kj=[Sj],qj=class extends xj{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(e,t)=>{this._baseReplaceRequestHandler(e,(e,n)=>(this._initializedReceived||console.warn(`[ext-apps] AppBridge received '${e.method}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`),t(e,n)))};eventSchemas={sizechange:Aj,sandboxready:Dj,initialized:Rj,requestteardown:Fj,loggingmessage:PA};constructor(e,t,n,r){super(r),this._client=e,this._hostInfo=t,this._capabilities=n,this.addEventListener(`initialized`,()=>{this._initializedReceived=!0}),this._hostContext=r?.hostContext||{},this.setRequestHandler(Gj,e=>this._oninitialize(e)),this.setRequestHandler(_k,(e,t)=>(this.onping?.(e.params,t),{})),this.replaceRequestHandler(zj,e=>({mode:this._hostContext.displayMode??`inline`}))}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler(`sizechange`)}set onsizechange(e){this.setEventHandler(`sizechange`,e)}get onsandboxready(){return this.getEventHandler(`sandboxready`)}set onsandboxready(e){this.setEventHandler(`sandboxready`,e)}get oninitialized(){return this.getEventHandler(`initialized`)}set oninitialized(e){this.setEventHandler(`initialized`,e)}_onmessage;get onmessage(){return this._onmessage}set onmessage(e){this.warnIfRequestHandlerReplaced(`onmessage`,this._onmessage,e),this._onmessage=e,this.replaceRequestHandler(Hj,async(e,t)=>{if(!this._onmessage)throw Error(`No onmessage handler set`);return this._onmessage(e.params,t)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced(`onopenlink`,this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler(Ej,async(e,t)=>{if(!this._onopenlink)throw Error(`No onopenlink handler set`);return this._onopenlink(e.params,t)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced(`ondownloadfile`,this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler(Vj,async(e,t)=>{if(!this._ondownloadfile)throw Error(`No ondownloadfile handler set`);return this._ondownloadfile(e.params,t)})}get onrequestteardown(){return this.getEventHandler(`requestteardown`)}set onrequestteardown(e){this.setEventHandler(`requestteardown`,e)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(e){this.warnIfRequestHandlerReplaced(`onrequestdisplaymode`,this._onrequestdisplaymode,e),this._onrequestdisplaymode=e,this.replaceRequestHandler(zj,async(e,t)=>{if(!this._onrequestdisplaymode)throw Error(`No onrequestdisplaymode handler set`);return this._onrequestdisplaymode(e.params,t)})}get onloggingmessage(){return this.getEventHandler(`loggingmessage`)}set onloggingmessage(e){this.setEventHandler(`loggingmessage`,e)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(e){this.warnIfRequestHandlerReplaced(`onupdatemodelcontext`,this._onupdatemodelcontext,e),this._onupdatemodelcontext=e,this.replaceRequestHandler(Wj,async(e,t)=>{if(!this._onupdatemodelcontext)throw Error(`No onupdatemodelcontext handler set`);return this._onupdatemodelcontext(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(OA,async(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}set oncreatesamplingmessage(e){this.setRequestHandler(HA,async(t,n)=>e(t.params,n))}sendToolListChanged(e={}){return this.notification({method:`notifications/tools/list_changed`,params:e})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(e){this.warnIfRequestHandlerReplaced(`onlistresources`,this._onlistresources,e),this._onlistresources=e,this.replaceRequestHandler(Wk,async(e,t)=>{if(!this._onlistresources)throw Error(`No onlistresources handler set`);return this._onlistresources(e.params,t)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(e){this.warnIfRequestHandlerReplaced(`onlistresourcetemplates`,this._onlistresourcetemplates,e),this._onlistresourcetemplates=e,this.replaceRequestHandler(Kk,async(e,t)=>{if(!this._onlistresourcetemplates)throw Error(`No onlistresourcetemplates handler set`);return this._onlistresourcetemplates(e.params,t)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced(`onreadresource`,this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler(Xk,async(e,t)=>{if(!this._onreadresource)throw Error(`No onreadresource handler set`);return this._onreadresource(e.params,t)})}sendResourceListChanged(e={}){return this.notification({method:`notifications/resources/list_changed`,params:e})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(e){this.warnIfRequestHandlerReplaced(`onlistprompts`,this._onlistprompts,e),this._onlistprompts=e,this.replaceRequestHandler(sA,async(e,t)=>{if(!this._onlistprompts)throw Error(`No onlistprompts handler set`);return this._onlistprompts(e.params,t)})}sendPromptListChanged(e={}){return this.notification({method:`notifications/prompts/list_changed`,params:e})}assertCapabilityForMethod(e){}assertRequestHandlerCapability(e){}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}getCapabilities(){return this._capabilities}async _oninitialize(e){let t=e.params.protocolVersion;return this._appInfo!==void 0&&console.warn(`[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values.`),this._appCapabilities=e.params.appCapabilities,this._appInfo=e.params.appInfo,{protocolVersion:Kj.includes(t)?t:Sj,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let t={},n=!1;for(let r of Object.keys(e)){let i=this._hostContext[r],a=e[r];Jj(i,a)||(t[r]=a,n=!0)}n&&(this._hostContext=e,this.sendHostContextChange(t))}sendHostContextChange(e){return this.notification({method:`ui/notifications/host-context-changed`,params:e})}sendToolInput(e){return this.notification({method:`ui/notifications/tool-input`,params:e})}sendToolInputPartial(e){return this.notification({method:`ui/notifications/tool-input-partial`,params:e})}sendToolResult(e){return this.notification({method:`ui/notifications/tool-result`,params:e})}sendToolCancelled(e){return this.notification({method:`ui/notifications/tool-cancelled`,params:e})}sendSandboxResourceReady(e){return this.notification({method:`ui/notifications/sandbox-resource-ready`,params:e})}teardownResource(e,t){return this.request({method:`ui/resource-teardown`,params:e},Nj,t)}sendResourceTeardown=this.teardownResource;callTool(e,t){return this.request({method:`tools/call`,params:e},EA,t)}listTools(e,t){return this.request({method:`tools/list`,params:e},TA,t)}async connect(e){if(this.transport)throw Error(`AppBridge is already connected. Call close() before connecting again.`);if(this._initializedReceived=!1,this._client){let e=this._client.getServerCapabilities();if(!e)throw Error(`Client server capabilities not available`);e.tools&&(this.oncalltool=async(e,t)=>this._client.request({method:`tools/call`,params:e},EA,{signal:t.signal}),e.tools.listChanged&&this._client.setNotificationHandler(kA,e=>this.sendToolListChanged(e.params))),e.resources&&(this.onlistresources=async(e,t)=>this._client.request({method:`resources/list`,params:e},Gk,{signal:t.signal}),this.onlistresourcetemplates=async(e,t)=>this._client.request({method:`resources/templates/list`,params:e},qk,{signal:t.signal}),this.onreadresource=async(e,t)=>this._client.request({method:`resources/read`,params:e},Zk,{signal:t.signal}),e.resources.listChanged&&this._client.setNotificationHandler(Qk,e=>this.sendResourceListChanged(e.params))),e.prompts&&(this.onlistprompts=async(e,t)=>this._client.request({method:`prompts/list`,params:e},cA,{signal:t.signal}),e.prompts.listChanged&&this._client.setNotificationHandler(bA,e=>this.sendPromptListChanged(e.params)))}return super.connect(e)}};function Jj(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Yj(){let e=pt(hv);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}async function Xj(e){try{await e.teardownResource({},{timeout:1e3})}catch{}try{await e.close()}catch{}}function Zj({state:e}){return e.enabled?A(`details`,{class:`pointer-events-auto w-full max-w-md rounded-lg border border-base-300 bg-base-100/95 p-2 text-xs shadow-lg backdrop-blur`,children:[A(`summary`,{class:`cursor-pointer font-medium`,children:`Magic Canvas debug`}),A(`dl`,{class:`mt-2 grid gap-2`,children:[A(Qj,{label:`iframe`,value:e.iframeLifecycleState}),A(Qj,{label:`post`,value:e.lastInteractionPostResult}),A(Qj,{label:`context`,value:e.lastModelContextUpdate}),A(Qj,{label:`error`,value:e.lastError}),A($j,{label:`tool_call`,value:e.lastToolCall}),A($j,{label:`canvas_config`,value:e.parsedCanvasConfig})]})]}):null}function Qj({label:e,value:t}){return t?A(`div`,{children:[A(`dt`,{class:`font-semibold`,children:e}),A(`dd`,{class:`break-words text-base-content/70`,children:t})]}):null}function $j({label:e,value:t}){return t===void 0?null:A(`div`,{children:[A(`dt`,{class:`font-semibold`,children:e}),A(`dd`,{children:A(`pre`,{class:`max-h-40 overflow-auto rounded bg-base-200 p-2 text-[10px] leading-relaxed`,children:JSON.stringify(t,null,2)})})]})}var eM=new Set([`mcp-ui.tavus.io`,`mcp-ui.tavus-preview.io`]),tM=[`.sandbox-tavus.io`],nM=new Set([`tavusapi.com`]);function rM(e){let t;try{t=new URL(e)}catch{return!1}return oM(t)?!0:t.protocol===`https:`?eM.has(t.hostname)?!0:tM.some(e=>t.hostname.endsWith(e)):!1}function iM(e){return rM(e)}function aM(e){let t;try{t=new URL(e)}catch{return!1}return sM(t)?!0:t.protocol===`https:`&&nM.has(t.hostname)}function oM(e){return sM(e)}function sM(e){return!cM()||e.protocol!==`http:`&&e.protocol!==`https:`?!1:[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e.hostname)}function cM(){try{let e=globalThis.location?.hostname;return typeof e==`string`&&[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e)}catch{return!1}}var lM=`tavus.canvas.interaction`,uM=[`safe-area-right`,`safe-area-left`,`safe-area-bottom`,`full`],dM=`safe-area-right`,fM={x:275/1280,y:111/720,width:730/1280,height:609/720},pM={type:`snapshot_mirror`};function mM(e){return FM(e)?e.message_type===`conversation`&&e.event_type===`conversation.tool_call`&&typeof e.conversation_id==`string`&&FM(e.properties):!1}function hM(e){if(!FM(e))return null;let t=YM(e,`component`),n=YM(e,`component_version`),r=YM(e,`sandbox_url`),i=QM(e,`mcp_server_url`,iM),a=QM(e,`api_base_url`,aM),o=QM(e,`interaction_url`,aM),s=zM(e.layout),c=e.version;return c!==1||!t||!n||!r||!rM(r)||i===null||a===null||o===null||s===null?null:{version:c,component:t,component_version:n,resource_uri:YM(e,`resource_uri`),sandbox_url:r,mcp_server_url:i,mcp_tool_name:YM(e,`mcp_tool_name`),api_base_url:a,interaction_url:o,layout:s,host_context:FM(e.host_context)?e.host_context:void 0}}function gM(e){if(e===void 0)return{ok:!0,value:{}};if(FM(e))return{ok:!0,value:e};if(typeof e!=`string`)return{ok:!1,error:Error(`Magic Canvas tool arguments must be an object or JSON string.`)};try{let t=JSON.parse(e);return FM(t)?{ok:!0,value:t}:{ok:!1,error:Error(`Magic Canvas tool arguments must decode to an object.`)}}catch(e){return{ok:!1,error:IM(e)}}}function _M(e){let t=e.properties.name;if(t!==`canvas_clear`&&t!==`update_component`)return null;let n=gM(e.properties.arguments);if(!n.ok)throw n.error;if(t===`canvas_clear`){let t=n.value.tool_call_id,r=n.value.reason;if(t!==void 0&&typeof t!=`string`)throw Error(`Magic Canvas clear tool_call_id must be a string when provided.`);if(r!==void 0&&typeof r!=`string`)throw Error(`Magic Canvas clear reason must be a string when provided.`);return{kind:`clear`,conversation_id:e.conversation_id,tool_call_id:t,reason:r}}let r=n.value.tool_call_id,i=n.value.updates;if(typeof r!=`string`||r.length===0)throw Error(`Magic Canvas update_component requires a target tool_call_id.`);if(!FM(i))throw Error(`Magic Canvas update_component requires an object updates payload.`);return{kind:`update`,conversation_id:e.conversation_id,tool_call_id:r,updates:i}}function vM(e){return e.display_mode===`fullscreen`?`full`:e.preferred_slot}function yM(e){return e===`full`||e===`safe-area-bottom`}function bM(e,t){let n=vM(t.layout);return yM(n)?[t]:[...e.filter(e=>{let t=vM(e.layout);return!yM(t)&&t!==n}),t]}function xM(e,t){switch(t.kind){case`show`:{let n=e.find(e=>e.id===t.instance.id),r=n?{...t.instance,revision:n.revision+1}:t.instance;return bM(e.filter(e=>e.id!==t.instance.id),r)}case`update`:{let n=e=>e.conversation_id===t.conversation_id&&e.tool_call_id===t.tool_call_id,r=jM(t.updates),i,a=e.map(e=>{if(!n(e))return e;let t={...e,arguments:{...e.arguments,...r.componentArguments},layout:{preferred_slot:r.preferredSlot??e.layout.preferred_slot,display_mode:r.displayMode??e.layout.display_mode,avoid_safe_area:r.avoidSafeArea??e.layout.avoid_safe_area,safe_area:r.safeArea??e.layout.safe_area,backdrop:r.backdrop??e.layout.backdrop},revision:e.revision+1};return i=t,t});if(i===void 0)return a;let o=e.find(n);return o&&vM(o.layout)===vM(i.layout)?a:bM(a.filter(e=>!n(e)),i)}case`clear`:return t.tool_call_id?e.filter(e=>!(e.conversation_id===t.conversation_id&&e.tool_call_id===t.tool_call_id)):e.filter(e=>e.conversation_id!==t.conversation_id)}}function SM(e){if(!FM(e)||!Array.isArray(e.content))return null;for(let t of e.content){if(!FM(t))continue;let e=(FM(t._meta)?t._meta:null)?.[lM];if(FM(e))return $M(e)}return null}function CM(e,t){let n=t.type,r=t.value;if(!n)throw Error(`Magic Canvas interaction is missing type.`);if(r===void 0)throw Error(`Magic Canvas interaction is missing value.`);return{interaction_id:t.interaction_id??PM(e.tool_call_id,n),conversation_id:e.conversation_id,tool_call_id:e.tool_call_id,component:t.component??e.canvas_config.component,component_version:t.component_version??e.canvas_config.component_version,type:n,value:r,metadata:FM(t.metadata)?t.metadata:{}}}function wM(e){return e.type===`dismiss`||e.type===`clear`?!0:e.type!==`submit`&&e.type!==`skip`?!1:e.component===`canvas.question`||e.component===`canvas.input`||e.component===`canvas.calendar`}function TM(e){return!FM(e)||!Array.isArray(e.content)?``:e.content.map(e=>FM(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
160
+ `).trim()}function EM(e,t){let n=FM(t.structuredContent)?t.structuredContent:void 0,r=LM(t.content),i=typeof n?.state==`string`?n.state:`updated`,a=typeof n?.summary==`string`?n.summary:r,o=[`Magic Canvas state update for ${e.canvas_config.component} (${e.tool_call_id}).`,`State: ${i}.`];return a&&o.push(`Summary: ${a}`),n&&o.push(`Structured state: ${RM(n)}`),r&&r!==a&&o.push(r),o.join(`
161
+ `)}function DM({conversationId:e,toolCallId:t,args:n,canvasConfig:r}){let i=jM(n);return{id:t,conversation_id:e,tool_call_id:t,arguments:i.componentArguments,canvas_config:r,layout:{preferred_slot:i.preferredSlot??r.layout?.preferred_slot??MM(r.component),display_mode:i.displayMode??`inline`,avoid_safe_area:i.avoidSafeArea??r.layout?.avoid_safe_area??!0,safe_area:i.safeArea??r.layout?.safe_area??fM,backdrop:i.backdrop??r.layout?.backdrop??pM},revision:0}}function OM(e,t){let n=e.layout.display_mode;return{...e.layout,display_mode:n,viable_slot:n===`fullscreen`?`full`:AM(e.layout.preferred_slot,t)}}function kM(e,t){let n=e.filter(e=>!e.avoid_safe_area||e.display_mode===`fullscreen`?!1:e.viable_slot===`safe-area-left`||e.viable_slot===`safe-area-right`),r=n.some(e=>e.viable_slot===`safe-area-left`),i=n.some(e=>e.viable_slot===`safe-area-right`);if(r&&i)return{active:!1,video_shift_x:0,backdrop:pM};let a=[...n].reverse()[0];if(!a||t.width<900)return{active:!1,video_shift_x:0,backdrop:pM};let o=Math.min(448,Math.max(0,t.width-32)),s=a.safe_area,c=s.x*t.width,l=(s.x+s.width)*t.width,u=Math.min(360,t.width*.3),d=0;return d=a.viable_slot===`safe-area-left`?ZM(16+o+24-c,0,u):-ZM(l-(t.width-16-o-24),0,u),{active:!0,side:a.viable_slot===`safe-area-left`?`left`:`right`,video_shift_x:Math.round(d),safe_area:s,backdrop:a.backdrop}}function AM(e,t){return e===`full`||e===`safe-area-bottom`&&t.visualViewportHeight!==void 0&&t.visualViewportHeight<t.height*.75?`full`:(e===`safe-area-left`||e===`safe-area-right`)&&t.width<768&&t.height>=t.width?`safe-area-bottom`:e}function jM(e){let t={};for(let[n,r]of Object.entries(e))n===`layout`||n===`preferred_slot`||n===`preferredSlot`||n===`display_mode`||n===`displayMode`||n===`presentation`||n===`fullscreen`||n===`avoid_safe_area`||n===`avoidSafeArea`||n===`safe_area`||n===`safeArea`||n===`backdrop`||(t[n]=r);return{componentArguments:t,preferredSlot:BM(e.layout)??BM(e.preferred_slot)??BM(e.preferredSlot),displayMode:VM(e),avoidSafeArea:HM(e),safeArea:UM(e),backdrop:WM(e)}}function MM(e){switch(e){case`canvas.alert`:return`safe-area-bottom`;case`canvas.chart`:case`canvas.image`:case`canvas.video`:return`full`;default:return dM}}function NM(e,t){let n=t?.displayScale??1;if(e.display_mode===`fullscreen`||e.viable_slot===`full`)return{maxWidth:void 0,maxHeight:void 0,displayScale:n};let r=t?.maxHeight??720;return e.viable_slot===`safe-area-bottom`?{maxWidth:720,maxHeight:r,displayScale:n}:{width:384,maxHeight:r,displayScale:n}}function PM(e,t){return`ci_${e.replace(/[^a-zA-Z0-9_-]/g,`_`)}_${t}_${globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,10)}`}function FM(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function IM(e){return e instanceof Error?e:Error(String(e))}function LM(e){return Array.isArray(e)?e.map(e=>FM(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
162
+ `).trim():``}function RM(e){let t=JSON.stringify(e);return t?t.length<=2e3?t:`${t.slice(0,2e3)}...`:`{}`}function zM(e){if(e===void 0)return;if(!FM(e))return null;let t=BM(e),n=GM(e.safe_area??e.safeArea),r=KM(e.backdrop);return n===null||r===null?null:{...t?{preferred_slot:t}:{},...qM(e.avoid_safe_area??e.avoidSafeArea,`avoid_safe_area`),...n?{safe_area:n}:{},...r?{backdrop:r}:{}}}function BM(e){if(typeof e==`string`&&JM(e))return e;if(!FM(e))return;let t=e.preferred_slot??e.preferredSlot??e.slot;return typeof t==`string`&&JM(t)?t:void 0}function VM(e){if(e.presentation===!0||e.fullscreen===!0)return`fullscreen`;if(e.presentation===!1||e.fullscreen===!1)return`inline`;let t=e.display_mode??e.displayMode;return t===`fullscreen`||t===`inline`?t:void 0}function HM(e){let t=FM(e.layout)?e.layout:void 0,n=e.avoid_safe_area??e.avoidSafeArea??t?.avoid_safe_area??t?.avoidSafeArea;return typeof n==`boolean`?n:void 0}function UM(e){let t=FM(e.layout)?e.layout:void 0;return GM(e.safe_area??e.safeArea??t?.safe_area??t?.safeArea)??void 0}function WM(e){let t=FM(e.layout)?e.layout:void 0;return KM(e.backdrop??t?.backdrop)??void 0}function GM(e){if(e===void 0)return;if(!FM(e))return null;let t=XM(e,`x`),n=XM(e,`y`),r=XM(e,`width`),i=XM(e,`height`);return t===void 0||n===void 0||r===void 0||i===void 0||t<0||n<0||r<=0||i<=0||t+r>1.001||n+i>1.001?null:{x:ZM(t,0,1),y:ZM(n,0,1),width:ZM(r,0,1),height:ZM(i,0,1)}}function KM(e){if(e===void 0)return;if(e===`snapshot_mirror`||e===`none`)return{type:e};if(!FM(e))return null;let t=e.type;return t===`snapshot_mirror`||t===`none`?{type:t}:null}function qM(e,t){return typeof e==`boolean`?{[t]:e}:{}}function JM(e){return uM.includes(e)}function YM(e,t){let n=e[t];return typeof n==`string`&&n.length>0?n:void 0}function XM(e,t){let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function ZM(e,t,n){return Math.min(Math.max(e,t),n)}function QM(e,t,n){let r=YM(e,t);if(r)return n(r)?r:null}function $M(e){return e.interaction_id!==void 0&&typeof e.interaction_id!=`string`||e.component!==void 0&&typeof e.component!=`string`||e.component_version!==void 0&&typeof e.component_version!=`string`||e.type!==void 0&&typeof e.type!=`string`||e.metadata!==void 0&&!FM(e.metadata)?null:e}var eN=`tavus-deployment magic-canvas/0.0.0`;function tN(e){if(!mM(e)||e.canvas_config===void 0||e.canvas_config===null)return null;let t=hM(e.canvas_config),n=e.properties.tool_call_id;if(!t)return null;if(!n)throw Error(`Received Magic Canvas tool call without tool_call_id.`);let r=gM(e.properties.arguments);if(!r.ok)throw r.error;return DM({conversationId:e.conversation_id,toolCallId:n,args:r.value,canvasConfig:t})}function nN(e){if(!mM(e))return null;if(e.canvas_config!==void 0&&e.canvas_config!==null){let t=tN(e);return t?{kind:`show`,instance:t}:null}return _M(e)}function rN(e){return{body:{interaction_id:e.interaction_id,tool_call_id:e.tool_call_id,component:e.component,component_version:e.component_version,type:e.type,value:e.value,metadata:e.metadata}}}function iN(e,t){return{theme:e.theme,displayMode:t?.display_mode??`inline`,availableDisplayModes:[`inline`,`fullscreen`],...t?{containerDimensions:NM(t),layout:{preferred_slot:t.preferred_slot,viable_slot:t.viable_slot,avoid_safe_area:t.avoid_safe_area,safe_area:t.safe_area,backdrop:t.backdrop}}:{},platform:`web`,userAgent:eN,styles:{variables:aN(e.cssVars)}}}function aN(e){return{"--border-radius-md":e[`--radius-box`]??e[`--tavus-boxes-radius`]??`0.5rem`,"--border-radius-sm":e[`--radius-field`]??e[`--tavus-field-radius`]??`0.375rem`,"--border-radius-xs":e[`--radius-selector`]??`0.25rem`,"--border-radius-lg":e[`--radius-box`]??e[`--tavus-boxes-radius`]??`0.75rem`,"--border-width-regular":e[`--border`]??e[`--tavus-border-width`]??`1px`,"--font-text-sm-size":`0.875rem`,"--font-text-md-size":`1rem`,...oN(e)}}function oN(e){let t=e[`--color-base-content`],n=e[`--color-base-100`],r=e[`--color-base-200`],i=e[`--color-base-300`],a=e[`--color-error`],o={},s=(e,t)=>{t&&(o[e]=t)},c=(e,t,n)=>e&&n?`color-mix(in oklch, ${e} ${t}%, ${n})`:void 0;return s(`--color-background-primary`,n),s(`--color-background-secondary`,r),s(`--color-border-secondary`,i),s(`--color-border-primary`,c(t,28,n)),s(`--color-text-primary`,t),s(`--color-text-secondary`,c(t,62,n)),s(`--color-text-danger`,a),s(`--color-border-danger`,a),o}var sN=1e3,cN=5e3,lN=1200,uN=48,dN=`allow-scripts`,fN={"canvas.scheduling_embed":`allow-scripts allow-same-origin allow-popups allow-forms`};function pN(e,t){if(!t.contentWindow||e.source!==t.contentWindow)return!1;let n=e.data;return!!n&&typeof n==`object`&&n?.jsonrpc===`2.0`}var mN=class{onmessage;onerror;onclose;#e;#t;constructor(e){this.#e=e}start(){let e=e=>{pN(e,this.#e)&&this.onmessage?.(e.data)};return this.#t=e,globalThis.addEventListener(`message`,e),Promise.resolve()}send(e){return this.#e.contentWindow?.postMessage(e,`*`),Promise.resolve()}close(){return this.#t&&globalThis.removeEventListener(`message`,this.#t),this.#t=void 0,this.onclose?.(),Promise.resolve()}};function hN(e){for(let t of uM)if(e.some(e=>kN(e)===t))return t;return null}function gN({onLayoutEffectChange:e,onRenderedSlotChange:t,debugEnabled:n=AN()}={}){let{client:r}=K_(),{dataTheme:i,cssVars:a}=Yj(),o=oh(),s=Mg(),[c,l]=T([]),[u,d]=wN(),[f,p]=T(()=>({enabled:n,iframeLifecycleState:`idle`})),m=k(e=>{p(t=>({...t,...e}))},[]),h=k((e,t=`*`)=>{if(s!==`joined-meeting`){m({lastError:`Dropped Magic Canvas app message because the Daily meeting is not joined.`});return}o?.sendAppMessage(e,t)},[o,s,m]),g=O(()=>({theme:i.value===`dark`?`dark`:`light`,cssVars:a.value}),[i.value,a.value]);E(()=>{p(e=>e.enabled===n?e:{...e,enabled:n})},[n]),Wg({onAppMessage:k(e=>{if(s!==`joined-meeting`){m({lastToolCall:e.data,iframeLifecycleState:`idle`,lastError:`Dropped Magic Canvas tool call because the Daily meeting is not joined.`});return}try{let t=nN(e.data);if(!t)return;l(e=>xM(e,t)),m({lastToolCall:e.data,parsedCanvasConfig:t.kind===`show`?t.instance.canvas_config:void 0,iframeLifecycleState:t.kind===`clear`?`closed`:`received`,lastError:void 0})}catch(e){m({iframeLifecycleState:`error`,lastError:NN(e).message})}},[s,m])});let _=c.map(e=>({instance:e,layout:OM(e,d)})),v=kM(_.map(({layout:e})=>e),d),y=[..._].reverse().find(({layout:e})=>e.display_mode===`fullscreen`)?.instance.tool_call_id;E(()=>{e?.(v)},[e,v.active,v.side,v.video_shift_x,v.backdrop.type,v.safe_area?.x,v.safe_area?.y,v.safe_area?.width,v.safe_area?.height]);let b=hN(_.map(({layout:e})=>e));E(()=>{t?.(b)},[t,b]);let x=c.length>0||f.enabled;return A(`div`,{ref:u,"data-magic-canvas-root":!0,class:`pointer-events-none absolute inset-0 z-30`,children:[x&&y&&A(`div`,{class:`absolute inset-0 bg-black/45`}),x&&uM.map(e=>{let t=_.filter(({layout:t})=>kN(t)===e);return t.length===0?null:A(_N,{slot:e,safeAreaTop:v.safe_area?.y,children:e=>t.map(({instance:t,layout:n})=>A(vN,{availableHeight:e,client:r,hostTheme:g,instance:t,layout:n,dimmed:!!(y&&y!==t.tool_call_id),onDebug:m,onComplete:()=>{l(e=>e.filter(e=>e.id!==t.id))},onDisplayModeChange:e=>{l(n=>n.map(n=>n.tool_call_id===t.tool_call_id?{...n,layout:{...n.layout,display_mode:e}}:n))},sendAppMessage:h},t.id))},e)}),x&&A(`div`,{class:`absolute right-4 bottom-24 @max-mobile:right-3 @max-mobile:bottom-20`,children:A(Zj,{state:f})})]})}function _N({slot:e,safeAreaTop:t,children:n}){let[r,i]=TN(),a=n(e===`full`?void 0:i);if(e===`safe-area-left`||e===`safe-area-right`){let n=t==null?`1rem`:`${t*100}%`;return A(`div`,{ref:r,class:ON(e),style:{top:n,bottom:`${DN}px`},"data-canvas-slot":e,children:A(`div`,{class:`my-auto flex w-full flex-col gap-2`,children:a})})}return A(`div`,{ref:r,class:ON(e),"data-canvas-slot":e,children:a})}function vN({availableHeight:e,client:t,hostTheme:n,instance:r,layout:i,dimmed:a,onDebug:o,onComplete:s,onDisplayModeChange:c,sendAppMessage:l}){let u=D(null),d=D(null),f=D(e),p=D(320),m=D(n),h=D(r),g=D(i),_=D(-1),v=D(s),y=D(c),b=D(l),[x,S]=T(320);E(()=>{h.current=r},[r]),E(()=>{p.current=x,d.current?.setHostContext(SN(h.current,m.current,g.current,f.current,x))},[x]),E(()=>{f.current=e;let t=xN(n,u.current);m.current=t,d.current?.setHostContext(SN(h.current,t,g.current,e,p.current))},[e,n]),E(()=>{g.current=i,d.current?.setHostContext(SN(h.current,m.current,i,e,p.current))},[e,i]),E(()=>{v.current=s,y.current=c,b.current=l},[s,c,l]),E(()=>{let e=u.current;if(!e)return;let n=!1,i=null,a=null,s=null,c=null,l=new URL(r.canvas_config.sandbox_url,globalThis.location.href).href,x=e=>{n||o({iframeLifecycleState:`error`,lastError:NN(e).message})},C=()=>{if(n||!a)return;let e=h.current,t=EM(e,a);a=null,b.current({message_type:`conversation`,event_type:`conversation.append_llm_context`,conversation_id:e.conversation_id,properties:{context:t}}),o({lastModelContextUpdate:e.canvas_config.component,lastError:void 0})},w=()=>{if(i)return;if(e.src!==l){e.src;return}if(n||!e.contentWindow)return;let u=new qj(null,{name:`tavus-deployment`,version:`0.0.0`},{logging:{},message:{text:{},structuredContent:{}},updateModelContext:{text:{},structuredContent:{}}},{hostContext:SN(r,xN(m.current,e),g.current,f.current,p.current)});i=u,d.current=u,u.oninitialized=()=>{n||(o({iframeLifecycleState:`ready`}),_.current=h.current.revision,u.sendToolInput({arguments:h.current.arguments}).catch(x))},u.onsizechange=({height:e})=>{!n&&typeof e==`number`&&Number.isFinite(e)&&S(Math.min(Math.max(e,uN),720))},u.onmessage=async e=>{let r=SM(e),i=TM(e);if(!r){if(i){let e=`Magic Canvas message included text without interaction metadata; no interaction row was recorded.`;return o({lastInteractionPostResult:`error`,lastError:e}),{isError:!0,code:`missing_interaction_metadata`,message:e}}return{}}try{let e=h.current,a=CM(e,r),s=rN(a),l=new AbortController,u=globalThis.setTimeout(()=>l.abort(),cN);try{await En(t,a.conversation_id,s.body,{signal:l.signal})}finally{globalThis.clearTimeout(u)}if(n)return{};i&&b.current({message_type:`conversation`,event_type:`conversation.respond`,conversation_id:e.conversation_id,properties:{text:i}}),o({lastInteractionPostResult:`success`,lastError:void 0}),wM(a)&&(a.type===`submit`?(c&&clearTimeout(c),c=setTimeout(()=>{c=null,n||v.current()},lN)):v.current())}catch(e){let t=NN(e).message;return o({lastInteractionPostResult:`error`,lastError:t}),{isError:!0,code:`interaction_post_failed`,message:t}}return{}},u.onupdatemodelcontext=async e=>(a=e,s||=setTimeout(()=>{s=null,C()},sN),{}),u.onrequestdisplaymode=async({mode:e})=>{let t=e===`fullscreen`?`fullscreen`:`inline`;return y.current(t),g.current={...g.current,display_mode:t,viable_slot:t===`fullscreen`?`full`:g.current.viable_slot},u.setHostContext(SN(h.current,m.current,g.current,f.current,p.current)),{mode:t}},u.connect(new mN(e)).then(()=>void 0).catch(x)};o({iframeLifecycleState:`mounting`,lastInteractionPostResult:void 0}),r.canvas_config.sandbox_url,e.src=r.canvas_config.sandbox_url;let ee=()=>{w()};return e.addEventListener(`load`,ee),w(),()=>{s&&=(clearTimeout(s),null),c&&=(clearTimeout(c),null),C(),n=!0,e.removeEventListener(`load`,ee),d.current=null,o({iframeLifecycleState:`closed`}),i&&Xj(i)}},[t,r.id,r.canvas_config.sandbox_url,o]),E(()=>{r.revision!==0&&(r.revision<=_.current||(_.current=r.revision,d.current?.sendToolInput({arguments:r.arguments}).catch(e=>{o({iframeLifecycleState:`error`,lastError:NN(e).message})})))},[r.arguments,r.revision,o]);let C=i.viable_slot===`full`||i.display_mode===`fullscreen`,w=C?null:CN(x,e),ee=w?.placeholderStyle,te=w?.cardStyle,ne=C?{height:`100%`}:w?.iframeStyle??{height:`${x}px`},re=[`pointer-events-auto w-full overflow-hidden rounded-lg border border-base-300 bg-base-100 shadow-xl transition-[opacity,transform]`,C?`fixed inset-4 z-10 max-w-none`:`max-w-md`,a?`scale-[0.98] opacity-40`:``].filter(Boolean).join(` `),ie=fN[r.canvas_config.component]??dN,ae=A(`div`,{class:re,style:te,"data-canvas-card":i.viable_slot,children:A(`iframe`,{ref:u,title:`${r.canvas_config.component} ${r.canvas_config.component_version}`,class:C?`block h-full w-full border-0 bg-transparent`:`block border-0 bg-transparent`,sandbox:ie,style:ne})});return C?ae:A(`div`,{class:`block w-full`,style:ee,children:ae})}var yN=[`--color-base-100`,`--color-base-200`,`--color-base-300`,`--color-base-content`,`--color-primary`,`--color-error`];function bN(e){if(!e||typeof getComputedStyle!=`function`)return{};let t=getComputedStyle(e),n={};for(let e of yN){let r=t.getPropertyValue(e).trim();r&&(n[e]=r)}return n}function xN(e,t){let n=bN(t);return Object.keys(n).length===0?e:{...e,cssVars:{...e.cssVars,...n}}}function SN(e,t,n,r,i){let a=iN(t,n),o=n.viable_slot===`full`||n.display_mode===`fullscreen`,s=o?void 0:jN(r),c=o?1:CN(i??0,r)?.displayScale??1;return{...e.canvas_config.host_context,...a,containerDimensions:{...MN(a.containerDimensions)?a.containerDimensions:{},...s===void 0?{}:{maxHeight:s},displayScale:c}}}function CN(e,t){if(t===void 0||!Number.isFinite(t)||t<=0)return null;let n=Math.min(e,720);if(n<=t)return{displayScale:1,placeholderStyle:{maxHeight:`${t}px`},cardStyle:void 0,iframeStyle:{width:`100%`,height:`${n}px`}};let r=t/n;return r>=.85?{displayScale:r,placeholderStyle:{height:`${n*r}px`,maxHeight:`${t}px`,overflow:`hidden`},cardStyle:{height:`${n}px`,transform:`scale(${r})`,transformOrigin:`top center`},iframeStyle:{width:`100%`,height:`${n}px`}}:{displayScale:1,placeholderStyle:{maxHeight:`${t}px`},cardStyle:void 0,iframeStyle:{width:`100%`,height:`${t}px`}}}function wN(){let e=D(null),[t,n]=T(()=>EN(null));return E(()=>{let t=()=>n(t=>{let n=EN(e.current);return t.width===n.width&&t.height===n.height&&t.visualViewportHeight===n.visualViewportHeight?t:n});t(),globalThis.addEventListener(`resize`,t),globalThis.visualViewport?.addEventListener(`resize`,t);let r;return typeof ResizeObserver<`u`&&e.current&&(r=new ResizeObserver(t),r.observe(e.current)),()=>{globalThis.removeEventListener(`resize`,t),globalThis.visualViewport?.removeEventListener(`resize`,t),r?.disconnect()}},[]),[e,t]}function TN(){let e=D(null),[t,n]=T();return E(()=>{let t=e.current;if(!t)return;let r=e=>{let r=e??t.getBoundingClientRect().height;!Number.isFinite(r)||r<=0||n(Math.floor(r))},i=()=>r();if(i(),typeof ResizeObserver>`u`)return globalThis.addEventListener(`resize`,i),()=>globalThis.removeEventListener(`resize`,i);let a=new ResizeObserver(e=>{r(e[0]?.contentRect.height)});return a.observe(t),()=>a.disconnect()},[]),[e,t]}function EN(e){let t=globalThis.visualViewport?.height,n=e?.getBoundingClientRect();if(n&&n.width>0&&n.height>0){let e=t===void 0?void 0:Math.max(0,(globalThis.innerHeight||0)-t);return{width:n.width,height:n.height,visualViewportHeight:e===void 0?void 0:Math.max(0,n.height-e)}}return{width:globalThis.innerWidth||1024,height:globalThis.innerHeight||768,visualViewportHeight:t}}var DN=72;function ON(e){let t=`absolute flex gap-2`;switch(e){case`safe-area-left`:return`${t} left-4 w-[min(28rem,calc(100vw_-_2rem))] flex-col overflow-y-auto`;case`safe-area-right`:return`${t} right-4 w-[min(28rem,calc(100vw_-_2rem))] flex-col overflow-y-auto`;case`safe-area-bottom`:return`${t} right-4 bottom-24 left-4 flex-col items-center justify-end @max-mobile:right-3 @max-mobile:bottom-20 @max-mobile:left-3`;case`full`:return`${t} inset-4 flex-col items-stretch justify-stretch`}}function kN(e){return e.display_mode===`fullscreen`&&e.preferred_slot!==`full`?e.preferred_slot:e.viable_slot}function AN(){return!1}function jN(e){return e===void 0||!Number.isFinite(e)||e<=0?720:Math.min(Math.floor(e),720)}function MN(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function NN(e){return e instanceof Error?e:Error(String(e))}var PN=24,FN=96;function IN(e=document){let t=Array.from(e.querySelectorAll(`[data-canvas-card]`)).map(e=>e.getBoundingClientRect());return t.length===0?null:{left:Math.min(...t.map(e=>e.left)),right:Math.max(...t.map(e=>e.right)),top:Math.min(...t.map(e=>e.top)),bottom:Math.max(...t.map(e=>e.bottom))}}function LN(e){let t=e?.getRootNode();return t instanceof ShadowRoot?t:document}function RN(e,t,n){if(!t)return!1;let r=globalThis.innerWidth,i=globalThis.innerHeight,a=e?.safe_area??fM,o=a.x*r+n,s=(a.x+a.width)*r+n,c=a.y*i,l=(a.y+a.height)*i;return o<t.right&&s>t.left&&c<t.bottom&&l>t.top}function zN(e,t,n){let[r,i]=T(()=>e?IN(LN(n?.current)):null);return dt(()=>{if(!e){i(null);return}let t=LN(n?.current),r=()=>i(IN(t)),a=new ResizeObserver(r),o=()=>{for(let e of t.querySelectorAll(`[data-canvas-card]`))a.observe(e)};r(),o(),a.observe(document.documentElement);let s=globalThis.requestAnimationFrame(()=>{r(),o()});return globalThis.addEventListener(`resize`,r),()=>{a.disconnect(),globalThis.removeEventListener(`resize`,r),globalThis.cancelAnimationFrame(s)}},[e,t,n]),e?r:null}function BN(e,t,n,r,i){let a=e?.side??(n===`safe-area-left`?`left`:n===`safe-area-right`?`right`:null);return{usePip:a!=null&&(t===`pip`||t===`auto`&&RN(e,r,i)),side:a}}function VN(e,t=document){let n=globalThis.innerWidth,r=globalThis.innerHeight,i=Array.from(t.querySelectorAll(`[data-canvas-card]`)).map(e=>e.getBoundingClientRect()),a,o,s,c;if(i.length>0){let t=Math.min(...i.map(e=>e.left)),r=Math.max(...i.map(e=>e.right));s=Math.min(...i.map(e=>e.top)),c=Math.max(...i.map(e=>e.bottom)),[a,o]=e===`right`?[0,t]:[r,n]}else{let t=Math.min(448,Math.max(0,n-32));[a,o]=e===`right`?[0,n-16-t]:[16+t,n],s=0,c=r}let l=o-a>=144&&c-s>=FN&&a>=0&&o<=n;if(i.length>0&&!l){let t=Math.min(448,Math.max(0,n-32));[a,o]=e===`right`?[0,n-16-t]:[16+t,n],s=0,c=r}let u=Math.max(0,o-a-PN*2),d=Math.max(FN,Math.min(u,r-PN*2));return{centerX:(a+o)/2,centerY:(s+c)/2,diameter:d}}var HN=`560ms linear(0, 0, .0001, .0002, .0003, .0005, .0007, .001, .0013, .0016, .002, .0024, .0029, .0033, .0039, .0044, .005, .0057, .0063, .007, .0079, .0086, .0094, .0103, .0112, .0121, .0132 1.84%, .0153, .0175, .0201, .0226, .0253, .0283, .0313, .0345, .038, .0416, .0454, .0493, .0535, .0576, .0621, .0667, .0714, .0764, .0816 5.04%, .0897, .098 5.62%, .1071, .1165, .1263 6.56%, .137, .1481 7.25%, .1601 7.62%, .1706 7.94%, .1819 8.28%, .194, .2068 9.02%, .2331 9.79%, .2898 11.44%, .3151 12.18%, .3412 12.95%, .3533, .365 13.66%, .3786, .3918, .4045, .4167, .4288, .4405, .452, .4631 16.72%, .4759, .4884, .5005, .5124, .5242, .5354, .5467, .5576, .5686, .5791, .5894, .5995, .6094, .6194, .6289, .6385, .6477, .6569, .6659 24.45%, .6702, .6747, .6789, .6833, .6877, .6919, .696, .7002, .7043, .7084, .7125, .7165, .7205, .7244, .7283, .7321, .7358, .7396, .7433, .7471, .7507, .7544, .7579, .7615, .7649, .7685, .7718, .7752, .7786, .782, .7853, .7885, .7918, .7951, .7982, .8013, .8043, .8075, .8104, .8135, .8165, .8195, .8224, .8253, .8281, .8309, .8336, .8365, .8391, .8419, .8446, .8472, .8499, .8524, .855, .8575, .8599, .8625 37.27%, .8651, .8678, .8703, .8729, .8754, .8779, .8803, .8827, .8851, .8875, .8898, .892, .8942, .8965, .8987, .9009, .903, .9051, .9071, .9092, .9112, .9132, .9151, .9171, .919, .9209, .9227, .9245, .9262, .928, .9297, .9314, .9331, .9347, .9364, .9379, .9395, .941, .9425, .944, .9454, .9469, .9483, .9497, .951, .9524, .9537, .955, .9562, .9574, .9586, .9599, .961, .9622, .9633, .9644, .9655, .9665, .9676, .9686, .9696, .9705, .9715, .9724, .9733, .9742, .975, .9758, .9766, .9774, .9782, .9789, .9796, .9804, .9811, .9817, .9824, .9831, .9837, .9843, .9849, .9855, .986, .9866, .9871, .9877, .9882, .9887, .9892, .9896 70.56%, .9905 71.67%, .9914 72.82%, .9922, .9929 75.2%, .9936 76.43%, .9942 77.71%, .9948 79.03%, .9954 80.39%, .9959 81.81%, .9963 83.28%, .9968 84.82%, .9972 86.41%, .9975 88.07%, .9979 89.81%, .9982 91.64%, .9984 93.56%, .9987 95.58%, .9989 97.72%, .9991)`;function UN(e,t){let n=Math.abs(t)/2;return e===`left`?`${n}px center`:`calc(100% - ${n}px) center`}function WN(e,t,n){let[r,i]=T(()=>e&&t?VN(t,LN(n?.current)):null);return dt(()=>{if(!e||!t){i(null);return}let r=LN(n?.current),a=()=>i(VN(t,r)),o=new ResizeObserver(a),s=()=>{for(let e of r.querySelectorAll(`[data-canvas-card]`))o.observe(e)};a(),s(),o.observe(document.documentElement);let c=globalThis.requestAnimationFrame(()=>{a(),s()});return globalThis.addEventListener(`resize`,a),()=>{o.disconnect(),globalThis.removeEventListener(`resize`,a),globalThis.cancelAnimationFrame(c)}},[e,t,n]),e&&t?r:null}function GN(e,t){let[n,r]=T(null);return dt(()=>{if(!t){r(null);return}let n=e.current;if(!n)return;let i=()=>{let e=n.clientWidth,t=n.clientHeight;r(e&&t?{width:e,height:t}:null)},a=new ResizeObserver(i);return a.observe(n),i(),()=>a.disconnect()},[t,e]),t?n:null}var KN=1;function qN(e,t,n){return Math.min(Math.max(e,t),n)}function JN(e,t,n,r){let i=Math.min(e.diameter/t.height,1),a=r?.safe_area??fM,o=((a.x+a.width/2)*t.width+n)*i,s=(a.y+a.height/2)*t.height*i,c=e.diameter/2;return{scale:i,tx:qN(e.centerX-o,e.centerX+c-t.width*i,e.centerX-c),ty:qN(e.centerY-s,e.centerY+c-t.height*i,e.centerY-c)}}var YN=[`cx`,`cy`,`r`,`tx`,`ty`,`s`,`shift`];function XN(e,t,n,r,i){if(!n)return null;let{width:a,height:o}=n,s={x:a/2,y:o/2},c=null;if(e&&(c=JN(e,n,r,i),s={x:(e.centerX-c.tx)/c.scale,y:(e.centerY-c.ty)/c.scale}),t&&c&&e)return{cx:s.x,cy:s.y,r:e.diameter/2/c.scale,tx:c.tx,ty:c.ty,s:c.scale,shift:r};let l=Math.hypot(Math.max(s.x,a-s.x),Math.max(s.y,o-s.y));return{cx:s.x,cy:s.y,r:l*1.1,tx:0,ty:0,s:1,shift:r}}function ZN(e,t,n){let r=D(null),i=D(e),a=D(n),o=D(0),s=D(0);i.current=e,a.current=n,E(()=>{let e=i.current;if(!e)return;if(!r.current||QN()){r.current={values:{...e},velocity:{cx:0,cy:0,r:0,tx:0,ty:0,s:0,shift:0}},a.current(e,!0);return}if(o.current)return;let n=Math.max(t,160)/4e3;s.current=performance.now();let c=e=>{o.current=0;let t=i.current,l=r.current;if(!t||!l)return;let u=Math.min((e-s.current)/1e3,1/30);s.current=e;let d=!0;for(let e of YN){let r=(t[e]-l.values[e])/(n*n)-2/n*l.velocity[e],i=l.velocity[e]+r*u,a=l.values[e]+i*u,o=e===`s`?.001:.25;Math.abs(t[e]-a)<o&&Math.abs(i)*n<o?(l.values[e]=t[e],l.velocity[e]=0):(l.values[e]=a,l.velocity[e]=i,d=!1)}a.current(l.values,d),d||(o.current=globalThis.requestAnimationFrame(c))};o.current=globalThis.requestAnimationFrame(c)},[e?YN.map(t=>Math.round(e[t]*100)).join():``,t]),E(()=>()=>{o.current&&globalThis.cancelAnimationFrame(o.current)},[])}function QN(){return globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function $N({geom:e,visible:t}){return A(`div`,{"aria-hidden":`true`,"data-morph":`ring`,class:`pointer-events-none absolute z-10 rounded-full`,style:{top:`${e.centerY-e.diameter/2}px`,left:`${e.centerX-e.diameter/2}px`,width:`${e.diameter}px`,height:`${e.diameter}px`,boxShadow:`0 0 0 3px rgb(255 255 255 / 12%), 0 18px 50px rgb(0 0 0 / 55%)`,opacity:+!!t,transition:`opacity 240ms ease-out`}})}function eP(e,t){let n=t>=0?`left`:`right`,r=D({side:n,shift:t});E(()=>{e&&(r.current={side:n,shift:t})},[e,n,t]);let i=e?n:r.current.side;return{side:i,transformOrigin:UN(i,e?t:r.current.shift),translateX:e?0:-r.current.shift}}function tP(e,t,n){return`${e.side??``}:${e.active}:${t}:${n??``}`}function nP({snapshotUrl:e,transformOrigin:t}){return A(`div`,{class:`absolute inset-0 bg-cover bg-center`,style:{backgroundImage:`url("${e}")`,transform:`scaleX(-1)`,transformOrigin:t}})}function rP({snapshotUrl:e,translateX:t,transition:n,transformOrigin:r}){return A(`div`,{"aria-hidden":`true`,"data-morph":`mirror`,class:`pointer-events-none absolute z-0 overflow-hidden`,style:{inset:`0 0`,transform:`translate3d(${t}px, 0, 0)`,transition:`transform ${n}`,willChange:`transform`},children:A(nP,{snapshotUrl:e,transformOrigin:r})})}function iP({ambient:e,usePip:t,transition:n}){return e===`none`?null:A(`div`,{"aria-hidden":`true`,"data-morph":`ambient`,class:`pointer-events-none absolute inset-0 z-0`,style:{opacity:+!!t,transition:`opacity ${n}`,background:e===`darker`?`rgb(0 0 0 / 40%)`:`rgb(0 0 0 / 15%)`}})}function aP({morphCapable:e,snapshotUrl:t,mirrorSide:n,videoShiftX:r,transition:i,sceneRef:a,videoWrapRef:o,fill:s,videoRef:c}){return A(`div`,{ref:a,"data-morph":`scene`,class:`absolute inset-0`,style:e?{transformOrigin:`top left`}:void 0,children:A(`div`,{ref:o,class:`absolute inset-0`,style:e?void 0:{transform:`translate3d(${r}px, 0, 0)`,transition:`transform ${i}`},children:[s(c),e&&t!==null&&A(`div`,{"aria-hidden":`true`,"data-morph":`window-mirror`,class:`absolute top-0 bottom-0 w-full`,style:n===`right`?{left:`calc(100% - ${KN}px)`}:{right:`calc(100% - ${KN}px)`},children:A(nP,{snapshotUrl:t,transformOrigin:`center`})})]})})}function oP({canvasLayoutEffect:e,smartSidecarActive:t,isScreenSharing:n,fill:r,captureSnapshot:i,transition:a=HN,transitionMs:o=560,personaMode:s=`shift`,renderedSlot:c=null,ambient:l=`default`,children:u}){let d=D(null),[f,p]=T(null),m=t&&e.backdrop.type===`snapshot_mirror`,h=t?e.video_shift_x:0,g=D(null),_=tP(e,h,c),{usePip:v,side:y}=BN(e,s,c,zN(s!==`shift`,_,g),h),b=WN(s!==`shift`,y,g),x=eP(m,h);E(()=>{if(!m)return;let e=!1,t=0,n,r=0,a=()=>{if(e)return;let t=i(d.current);if(t){p(t);return}r+=1,r<8&&(n=globalThis.setTimeout(a,150))};return typeof globalThis.requestAnimationFrame==`function`?t=globalThis.requestAnimationFrame(a):n=globalThis.setTimeout(a,0),()=>{e=!0,t&&globalThis.cancelAnimationFrame?.(t),n&&globalThis.clearTimeout(n)}},[m,e.side,e.video_shift_x,i]),E(()=>{if(m||f===null)return;let e=globalThis.setTimeout(()=>{p(null)},o);return()=>globalThis.clearTimeout(e)},[m,f,o]);let S=v&&y!=null&&b!=null,C=s!==`shift`,w=GN(g,C),ee=f!==null&&!C,te=C&&y!=null,ne=D(null),re=D(null),[ie,ae]=T(!0),oe=D(!0),se=k((e,t)=>{let n=ne.current;n&&(n.style.clipPath=`circle(${e.r}px at ${e.cx}px ${e.cy}px)`,n.style.transform=`translate(${e.tx}px, ${e.ty}px) scale(${e.s})`);let r=re.current;r&&(r.style.transform=`translate3d(${e.shift}px, 0, 0)`),oe.current!==t&&(oe.current=t,ae(t))},[]);return ZN(C?XN(b,S,w,h,e):null,o,se),A(`div`,{ref:g,class:`relative w-full h-full overflow-hidden ${n?`flex items-center justify-center`:``}`,children:[ee&&f!==null&&A(rP,{snapshotUrl:f,translateX:x.translateX,transition:a,transformOrigin:x.transformOrigin}),te&&A(iP,{ambient:l,usePip:v,transition:a}),A(`div`,{"data-morph":`fg`,class:`absolute inset-0 z-10`,children:A(aP,{morphCapable:C,snapshotUrl:f,mirrorSide:x.side,videoShiftX:h,transition:a,sceneRef:ne,videoWrapRef:re,fill:r,videoRef:d})}),C&&b&&A($N,{geom:b,visible:S&&ie}),u]})}var sP=1e4;function cP({onTimeout:e,timeoutMs:t=sP,active:n=!0}){let r=$b().length>0,[i,a]=T(!1),o=D(e);return E(()=>{o.current=e},[e]),E(()=>{if(!n||r){a(!1);return}let e=setTimeout(()=>{a(!0),o.current()},t);return()=>clearTimeout(e)},[n,r,t]),{hasJoined:r,timedOut:i}}function lP(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.message_type===`system`&&t.event_type===`system.shutdown`}function uP({onShutdown:e}){let t=D(e);E(()=>{t.current=e},[e]),Wg({onAppMessage:k(e=>{lP(e?.data)&&t.current()},[])})}function dP(){let e=oh();return{joinCall:k(({url:t,micOnly:n=!1})=>{e?.join(n?{url:t,videoSource:!1}:{url:t})},[e]),leaveCall:k(()=>{e?.leave()},[e])}}var fP=yn(`PiP`),pP=360,mP=280;function hP(){return globalThis.window!==void 0&&`documentPictureInPicture`in globalThis.window}function gP(e){let{enabled:t,active:n}=e,[r,i]=T(null),a=hP(),o=pt(hv),s=k(()=>{i(e=>(e&&!e.closed&&e.close(),null))},[]),c=k(async()=>{if(a&&!(!t||!n)&&!(r&&!r.closed))try{let e=await globalThis.window.documentPictureInPicture.requestWindow({width:pP,height:mP}),t=Ye.replace(/:host(?=[\s,{])/g,`:host, :root`),n=e.document.createElement(`style`);n.textContent=t,e.document.head.appendChild(n),e.document.body.style.margin=`0`,e.document.body.style.width=`100%`,e.document.body.style.height=`100vh`,e.document.body.style.overflow=`hidden`,e.addEventListener(`pagehide`,()=>{i(t=>t===e?null:t)},{once:!0}),i(e)}catch(e){fP.warn(`Failed to open PiP window`,e)}},[a,t,n,r]);return E(()=>{if(!t||!a||!n)return;let e=()=>{document.visibilityState===`hidden`?c():document.visibilityState===`visible`&&s()};document.addEventListener(`visibilitychange`,e);let r=[],i=null,o=`none`,l=!1;if(typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;i=e.metadata,o=e.playbackState;try{e.metadata=new MediaMetadata({title:`Tavus conversation`}),e.playbackState=`playing`,l=!0}catch(e){fP.warn(`mediaSession metadata setup failed`,e)}let t=(t,n)=>{try{e.setActionHandler(t,n),r.push(t)}catch(e){fP.warn(`mediaSession.${t} not supported`,e)}};t(`enterpictureinpicture`,()=>{c()}),t(`play`,()=>{}),t(`pause`,()=>{})}return()=>{if(document.removeEventListener(`visibilitychange`,e),typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;for(let t of r)try{e.setActionHandler(t,null)}catch{}if(l)try{e.metadata=i,e.playbackState=o}catch{}}}},[t,a,n,c,s]),E(()=>{(!n||!t)&&r&&!r.closed&&s()},[n,t,r,s]),E(()=>()=>{r&&!r.closed&&r.close()},[r]),E(()=>{if(!r||r.closed||!o)return;let e=()=>{r.document.body.setAttribute(`data-theme`,o.dataTheme.value);let e=o.cssVars.value;for(let[t,n]of Object.entries(e))r.document.body.style.setProperty(t,n)};e();let t=o.dataTheme.subscribe(()=>e()),n=o.cssVars.subscribe(()=>e());return()=>{t(),n()}},[r,o]),{pipWindow:r,isSupported:a,requestPipWindow:c,closePipWindow:s}}var _P=Wt(null),vP={active:!1,video_shift_x:0,backdrop:{type:`snapshot_mirror`}},yP=ba(({id:e,showAudioWave:t=!0})=>{let n=r_(e).isOff;return A(`div`,{class:`relative aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10 ${n?`hidden`:``}`,children:[A(rg,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover ${n?`hidden`:``}`}),t&&A(`div`,{class:`absolute bottom-2 right-2`,children:A(Yb,{id:e})})]})}),bP=ba(()=>{let e=Uh(),{isScreenSharing:t}=ib(),n=$b()[0];return A(ue,{children:[t&&n&&A(yP,{id:n}),e&&A(yP,{id:e,showAudioWave:!1})]})}),xP=ba(()=>A(`div`,{class:`absolute top-4 left-4 flex flex-col items-end gap-2 z-20`,children:A(bP,{})})),SP=ba(({isAudioOnly:e,canvasLayoutEffect:t,canvasRenderedSlot:n})=>{let r=Uh(),i=!t_(r??``).isOff,a=ex(e),o=t_(a.phase===`ready`?a.replicaId:``),s=!i&&(o.state===`playable`||o.state===`loading`),c=t.active&&!i&&(!e||s);return a.phase===`left`?A(qb,{}):a.phase===`connecting`?A(Kb,{}):e&&!s?A(`div`,{class:`absolute inset-0 flex items-center justify-center`,children:[A(Xb,{sessionId:a.replicaId}),A(tg,{sessionId:a.replicaId})]}):A(oP,{canvasLayoutEffect:s?{...t,backdrop:{type:`none`}}:t,smartSidecarActive:c,isScreenSharing:i,captureSnapshot:EP,personaMode:s?`shift`:`auto`,renderedSlot:n,fill:t=>A(rx,{personaSessionId:a.replicaId,localSessionId:r,isPresenting:s,isScreenSharing:i,isAudioOnly:e,avatarOff:a.videoState.isOff,videoRef:t}),children:A(tg,{sessionId:a.replicaId})})}),CP=ba(({items:e})=>{let[t,n]=T(!1),r=D(null);return E(()=>{if(!t)return;let e=e=>{r.current&&!e.composedPath().includes(r.current)&&n(!1)},i=e=>{e.key===`Escape`&&n(!1)};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,i)}},[t]),A(`div`,{ref:r,class:`relative`,children:[A(`button`,{type:`button`,onClick:()=>n(e=>!e),"aria-pressed":t,"aria-expanded":t,"aria-haspopup":`true`,"aria-label":t?`Close more controls`:`More controls`,class:`btn btn-control ${t?`btn-primary`:`btn-neutral`}`,children:A(Ny,{name:`more`})}),t&&A(`div`,{role:`menu`,class:`absolute bottom-full mb-1 left-1/2 -translate-x-1/2 flex flex-row items-center gap-1 p-1 rounded-box bg-base-100 border border-base-300 shadow-lg z-30 whitespace-nowrap`,children:e})]})}),wP=ba(({items:e})=>e.length<=1?A(ue,{children:e}):A(CP,{items:e})),TP=ba(({onLeave:e})=>{let{joinCall:t,leaveCall:n}=dP(),r=Mg(),{config:i}=K_(),{session:a,end:o}=Nb(),s=Uh(),c=D(null),l=pt(Tv)?.frameRef??c,[u,d]=T(!1),[f,p]=T(!1),[m,h]=T(vP),[g,_]=T(null),v=a.value?.conversationUrl,y=i.value.customization.conversation,b=y.modality===`audio`,x=y.enable_chat,S=y.enable_closed_captions,C=y.enable_picture_in_picture,{pipWindow:w}=gP({enabled:C,active:r===`joined-meeting`});E(()=>(v&&t({url:v,micOnly:!s}),()=>{n()}),[]);let{camera:ee,requestCamera:te}=lb(),{isCamMuted:ne}=nb(),re=ee.isGranted&&!ne;E(()=>{!b&&r===`joined-meeting`&&(_P.value=re)},[b,r,re]);let ie=D(!b&&!s&&_P.value===!0);E(()=>{r===`joined-meeting`&&ie.current&&(ie.current=!1,te())},[r,te]),E(()=>{(r===`left-meeting`||r===`error`)&&e()},[r,e]),E(()=>{let e=()=>{let e=l.current,t=e?.getRootNode(),n=t instanceof Document||t instanceof ShadowRoot?t:null;d(!!e&&n?.fullscreenElement===e)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]);let ae=k(()=>{let e=l.current;if(!e)return;let t=e.getRootNode();(t instanceof Document||t instanceof ShadowRoot?t:null)?.fullscreenElement===e?document.exitFullscreen?.():e.requestFullscreen?.()},[]);k(()=>{p(e=>!e)},[]);let oe=k(()=>{o(),n()},[o]);if(cP({active:r===`joined-meeting`,onTimeout:oe}),uP({onShutdown:oe}),!v)return null;let se=[A(Mb,{compact:!0},`screen-share`)];return x&&se.push(A(Hb,{compact:!0},`chat`)),A(Fb,{children:A(Bb,{children:A(gb,{children:[A(`div`,{class:`absolute inset-0`,children:[A(`div`,{class:`relative w-full h-full z-[5]`,children:[A(SP,{isAudioOnly:b,canvasLayoutEffect:m,canvasRenderedSlot:g}),!b&&A(xP,{}),A(Rb,{}),A(gN,{debugEnabled:f,onLayoutEffectChange:h,onRenderedSlotChange:_}),A(`div`,{class:`absolute top-4 right-4 z-20`,children:A(Jb,{active:u,onToggle:ae,compact:!0})})]}),A(Wb,{}),A(`div`,{class:`pointer-events-none absolute bottom-6 left-0 right-0 z-20 transition-opacity transition-transform ${r===`left-meeting`?`opacity-0 translate-y-5`:`opacity-100 translate-y-0`}`,"aria-hidden":r===`left-meeting`,children:A(`div`,{class:`flex justify-center items-center gap-2 @max-mobile:gap-1 ${r===`left-meeting`?``:`pointer-events-auto`}`,children:[A(Db,{}),!b&&A(kb,{}),S&&A(Lb,{}),A(wP,{items:se}),A(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:oe,"aria-label":`Leave call`,children:A(Ny,{name:`leave`,"aria-label":`Leave Call`})})]})})]}),w&&La(A(nx,{onLeave:oe}),w.document.body)]})})})});function EP(e){if(!e||e.readyState<2||!e.videoWidth||!e.videoHeight)return null;let t=document.createElement(`canvas`),n=Math.round(640*(e.videoHeight/e.videoWidth));t.width=640,t.height=n;let r=t.getContext(`2d`);if(!r)return null;r.drawImage(e,0,0,640,n);try{return t.toDataURL(`image/jpeg`,.82)}catch{return null}}function DP({loading:e=!1,disabled:t,class:n,children:r,...i}){return A(`button`,{type:`button`,class:`btn relative ${n?` ${n}`:``}`,disabled:t||e,"aria-busy":e||void 0,...i,children:[A(`span`,{children:r}),e&&A(`span`,{class:`absolute inset-0 flex items-center justify-center backdrop-blur-xs`,"aria-hidden":`true`,children:A(`span`,{class:`loading loading-spinner loading-sm`})})]})}function OP(e,t,n){switch(t){case`granted`:return n?e?.cameraOptional??`Camera is optional — turn it on anytime.`:e?.ready??`You're all set — join whenever you're ready.`;case`blocked`:return e?.denied??`Microphone is blocked. Click the mic to see how to allow it.`;case`in-use`:return`Your microphone is in use by another app. Close it and try again.`;case`not-found`:return`No microphone found. Connect one to continue.`;case`unsupported`:return`This browser can't access your microphone.`;case`prompt`:return e?.prompt??`Allow microphone access to join.`;default:return e?.loading??`Getting your microphone ready...`}}function kP({message:e}){return A(`div`,{class:`relative max-w-[min(20rem,90%)]`,children:[A(`div`,{class:`px-4 py-2 rounded-box bg-neutral text-neutral-content text-sm font-medium shadow-lg text-center`,role:`status`,"aria-live":`polite`,children:e}),A(`svg`,{class:`absolute left-1/2 -translate-x-1/2 top-full text-neutral`,width:`16`,height:`8`,viewBox:`0 0 16 8`,"aria-hidden":`true`,children:A(`path`,{d:`M0 0 L8 8 L16 0 Z`,fill:`currentColor`})})]})}var AP=ba(({text:e,isJoining:t=!1,onJoin:n,onCancel:r})=>{let i=oh(),{config:a}=K_(),{localSessionId:o,isCamMuted:s}=nb(),{mic:c,camera:l,requestMic:u,requestCamera:d}=lb(),f=a.value.customization.conversation.modality===`video`;E(()=>{u()},[]);let p=c.isGranted,m=D(!1);E(()=>{!f||!p||m.current||l.isGranted||l.isBlocked||(m.current=!0,d())},[f,p,l.isGranted,l.isBlocked,d]);let h=f&&p&&!l.isGranted,g=OP(e,c.status,h);return A(gb,{children:A(`div`,{class:`absolute inset-0 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,children:[l.isGranted&&!s?A(`div`,{class:`absolute inset-0 flex items-center justify-center bg-black overflow-hidden`,children:A(rg,{type:`video`,sessionId:o??``,mirror:!0,fit:`cover`,className:`w-full h-full object-cover!`})}):A(`div`,{class:`absolute inset-0 flex items-center justify-center text-base-content/40`,children:A(Ny,{name:`face-smile`,size:`7rem`,"aria-label":`Camera off`})}),A(`div`,{class:`absolute bottom-6 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[90%]`,children:[g&&A(kP,{message:g}),A(`div`,{class:`flex flex-wrap items-center justify-center gap-1.5 @max-mobile:gap-1`,children:[A(`div`,{class:`flex items-center justify-center gap-1.5 shrink-0 @max-mobile:gap-1`,children:[A(Db,{}),f&&A(kb,{})]}),A(DP,{class:`btn-accent `,loading:t,disabled:!p,onClick:n,children:e?.join??`Join Video Chat`}),c.isBlocked&&A(`button`,{type:`button`,class:`btn btn-error `,onClick:()=>{i&&i.leave(),r?.()},children:e?.cancel??`Cancel`})]})]})]})})}),jP=`Password required`,MP=`Enter the password to start this conversation.`,NP=`Password`,PP=`Continue`;function FP({onSubmit:e,text:t,isSubmitting:n=!1,errorMessage:r}){let[i,a]=T(``),o=ht();return A(`div`,{class:`absolute inset-0 z-30 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`${o}-title`,children:A(`form`,{onSubmit:t=>{t.preventDefault();let r=i.trim();!r||n||e(r)},class:`card bg-base-100 shadow-xl w-full max-w-sm`,children:A(`div`,{class:`card-body gap-3`,children:[A(`h3`,{id:`${o}-title`,class:`card-title text-base-content`,children:t?.title??jP}),A(`p`,{class:`text-sm text-base-content/70`,children:t?.description??MP}),A(`input`,{id:o,type:`password`,autocomplete:`current-password`,class:`input input-bordered w-full`,placeholder:t?.placeholder??NP,value:i,disabled:n,onInput:e=>a(e.target.value),autoFocus:!0}),r&&A(`p`,{class:`text-error text-xs`,role:`alert`,children:r}),A(DP,{class:`btn-primary`,type:`submit`,disabled:!i.trim(),loading:n,children:t?.submit??PP})]})})})}var IP=yn(`CaptchaChallenge`),LP=1;function RP(e){return typeof e==`object`&&!!e&&e.source===`tavus-captcha`&&typeof e.type==`string`}function zP({captcha:e,deploymentId:t,onToken:n,onFallback:r}){let i=(pt(wt).baseUrl??`https://tavusapi.com`).replace(/\/+$/,``).split(`/`).slice(0,3).join(`/`),[a,o]=T(0),[s,c]=T(0),[l,u]=T(!1),[d,f]=T(!1),p=`${i}${e.challenge_path}?deployment_uuid=${encodeURIComponent(t)}&action=${encodeURIComponent(e.action)}&parent_origin=${encodeURIComponent(window.location.origin)}`,m=k(()=>{f(!1),o(e=>e+1)},[]);return E(()=>{function e(e){if(l||e.origin!==i)return;let a=e.data;if(RP(a)&&a.deployment_uuid===t){if(a.type===`interactive`){f(!0);return}if(a.type===`token`&&a.token){IP.info(`Captcha token received`),f(!1),n(a.token);return}if(a.type===`expired`){IP.info(`Captcha token expired, reloading iframe`),m();return}a.type===`error`&&(IP.warn(`Captcha error received`,a.code),s<LP?(c(e=>e+1),m()):(IP.warn(`Captcha error retries exhausted, falling back to no-token mode`),u(!0),r()))}}return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[i,t,s,l,n,r,m]),l?null:A(`div`,{class:d?`absolute inset-0 z-30 flex items-center justify-center p-4 bg-base-100/70 backdrop-blur-sm animate-[tavusFadeUp_180ms_ease-out]`:`absolute top-0 left-0 w-0 h-0 overflow-hidden opacity-0 pointer-events-none`,"aria-hidden":!d,children:A(`iframe`,{src:p,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups`,title:`Security challenge`,style:{border:`none`,width:`300px`,height:`65px`},scrolling:`no`},a)})}function BP({text:e,onStart:t,isStarting:n}){let{config:r,deploymentId:i}=K_(),a=pt(L_),o=Ry(r.value),s=o.btn_title??e?.fallback_button??`Start the conversation`,c=r.value.customization.terms_content?.trim()??``,l=r.value.customization.terms_enabled===!0,u=c.length>0,d=u&&l,f=O(()=>d&&m_(i,c),[d,i,c]),p=d&&!f,m=r.value.has_password===!0,h=a?.password.value??null,g=m&&!h,_=r.value.captcha??null,{captchaReady:v,captchaEpoch:y,handleCaptchaToken:b,handleCaptchaFallback:x}=lv(_,a),S=ht(),[C,w]=T(f),ee=_!==null&&!v,te=n||d&&!C||g||ee;return A(Wy,{title:o.title,description:o.description,overlay:A(ue,{children:[ee&&A(zP,{captcha:_,deploymentId:i,onToken:b,onFallback:x},y),g&&a?A(FP,{onSubmit:a.setPassword}):null]}),children:[A(DP,{class:`btn-neutral rounded-box`,onClick:()=>{d&&C&&!f&&__(i,c),t()},disabled:te,loading:n,children:s}),u&&A(`div`,{class:`max-w-xs`,children:p?A(`label`,{for:S,class:`flex items-center gap-2 text-xs text-left cursor-pointer`,children:[A(`input`,{id:S,type:`checkbox`,class:`checkbox checkbox-secondary checkbox-xs mt-0.5 shrink-0`,checked:C,onChange:e=>w(e.target.checked)}),A(`span`,{class:`leading-snug`,children:c})]}):A(`p`,{class:`text-xs leading-snug text-base-content/60`,children:c})})]})}function VP({flow:e,welcomeText:t,onUnavailableCancel:n}){switch(e.state){case`idle`:return A(BP,{text:t,onStart:()=>{e.start()},isStarting:e.isStarting});case`haircheck`:return A(AP,{onJoin:()=>{e.join()},onCancel:()=>e.cancel(),isJoining:e.isStarting});case`call`:return A(TP,{onLeave:()=>e.leave()});case`ended`:return A(tb,{onRestart:()=>e.restart()});case`unavailable`:return A(Yy,{cause:e.unavailableCause??`busy`,canRetry:e.canRetry,onRetry:()=>{e.start()},onCancel:n});default:{let t=e.state;throw Error(`Unreachable flow state: ${String(t)}`)}}}var HP=Ie(null);function UP({children:e}){let{config:t}=pt(bi),n=t.peek().customization?.widget,r=n?.expandable??`default`,i=dn(r===`start-expanded`||r===`always`),a=dn(n?.variant??`full`),o=dn(n?.position??`bottom-right`),s=dn(r),c=dn(n?.avatar?.type??`orb`),l=D(r);vn(()=>{let e=t.value.customization?.widget,n=e?.expandable??`default`;a.value=e?.variant??`full`,o.value=e?.position??`bottom-right`,s.value=n,c.value=e?.avatar?.type??`orb`,l.current!==n&&(i.value=n===`start-expanded`||n===`always`,l.current=n)});let u=k(()=>{s.peek()!==`always`&&(i.value=!i.peek())},[i,s]),d=k(()=>{i.value=!0},[i]),f=k(()=>{s.peek()!==`always`&&(i.value=!1)},[i,s]),p=O(()=>({expanded:i,variant:a,position:o,expandable:s,avatarType:c,toggle:u,expand:d,collapse:f}),[i,a,o,s,c,u,d,f]);return A(HP.Provider,{value:p,children:e})}function WP(){let{config:e}=K_(),t=e.value.customization.branding;return e.value.show_tavus_branding!==!1&&!t?.hide_tavus_badge?A(GP,{}):t?.logo||t?.text?A(KP,{logo:t.logo,text:t.text}):null}function GP(){let{isDark:e}=Yj(),t=e.value?`white`:`#140206`;return A(`a`,{href:`https://tavus.io`,target:`_blank`,rel:`noopener noreferrer`,class:`inline-flex items-center gap-1 text-xs text-base-content/50 hover:text-base-content/80 transition-colors`,children:[A(`svg`,{viewBox:`0 0 488 452`,class:`h-2.5 w-2.5 shrink-0`,fill:`none`,"aria-hidden":`true`,children:[A(`path`,{d:`M160 152V208H104V152H160Z`,fill:t}),A(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M488 270.5L436 285L451 326L418.766 346L441 360L423 392L435 452H0V0H394.766L488 270.5ZM24 24V428H216.2L209 392L227 360L204.766 346L237 326L222 285L274 270.5L189.038 24H24ZM352 152C336.536 152 324 164.536 324 180C324 195.464 336.536 208 352 208C367.464 208 380 195.464 380 180C380 164.536 367.464 152 352 152Z`,fill:t})]}),A(`span`,{children:[`Powered by `,A(`span`,{class:`underline`,children:`Tavus`})]})]})}function KP({logo:e,text:t}){return A(`div`,{class:`inline-flex items-center gap-1 text-xs text-base-content/50`,children:[e?A(`img`,{src:e,alt:t||`Branding`,class:`h-2.5 shrink-0`}):null,t?A(`span`,{children:t}):null]})}var qP={title:`Hi! Want to chat?`,btn_title:`Start conversation`};function JP(){let{config:e}=K_(),t=e.value.customization.widget?.text;return O(()=>({title:t?.title||qP.title,btn_title:t?.btn_title||qP.btn_title}),[t])}function YP(){let e=pt(HP);if(!e)throw Error(`useWidgetUI must be used within WidgetUIProvider`);return e}var XP={xs:`w-6 h-6`,sm:`w-8 h-8`,md:`w-10 h-10`,lg:`w-16 h-16`},ZP={xs:`w-3 h-3`,sm:`w-4 h-4`,md:`w-5 h-5`,lg:`w-8 h-8`};function QP({size:e=`md`,className:t=``}){let{avatarType:n}=YP(),{config:r}=K_(),i=Ly(r.value);return(Ry(r.value).background.type===`replica`||n.value===`image`)&&i?A(`div`,{class:`relative ${XP[e]} rounded-box overflow-hidden bg-base-300 ${t}`,children:i.kind===`image`?A(`img`,{src:i.url,class:`absolute inset-0 w-full h-full object-cover`,loading:`lazy`,alt:``}):A(`video`,{src:i.url,class:`absolute inset-0 w-full h-full object-cover`,muted:!0,autoplay:!0,loop:!0,playsinline:!0})}):A(`div`,{class:`relative ${XP[e]} rounded-box bg-primary/15 flex items-center justify-center ${t}`,children:A(`span`,{class:`${ZP[e]} rounded-full bg-primary animate-pulse`})})}function $P({variant:e}){let{toggle:t}=YP(),n=JP();return e===`tiny`?A(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`rounded-box overflow-hidden shadow-xl hover:shadow-2xl transition-shadow cursor-pointer`,children:A(QP,{size:`lg`})}):e===`compact`?A(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`group flex items-center gap-2.5 py-2.5 pl-2.5 pr-8 rounded-box bg-base-100 text-base-content border border-base-300 shadow-lg hover:shadow-xl transition-shadow cursor-pointer text-left`,children:[A(QP,{size:`md`}),A(`span`,{class:`flex flex-col gap-0.5`,children:[A(`span`,{class:`text-base font-medium leading-tight`,children:n.title}),A(`span`,{class:`text-sm text-base-content/60 leading-tight`,children:n.btn_title})]})]}):A(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`flex flex-col gap-3 p-3 w-64 rounded-box bg-base-100 text-base-content border border-base-300 shadow-xl hover:shadow-2xl transition-shadow cursor-pointer text-left`,children:[A(`div`,{class:`flex items-center gap-2.5`,children:[A(QP,{size:`md`}),A(`span`,{class:`text-sm font-medium leading-snug`,children:n.title})]}),A(`span`,{class:`btn btn-primary btn-sm w-full pointer-events-none gap-2 flex items-center`,children:[A(Ny,{name:`cam`,size:16}),A(`span`,{className:`leading-4`,children:n.btn_title})]})]})}var eF=`tavus:widget:greeting-dismissed`;function tF({anchor:e}){let t=JP(),{variant:n,expand:r}=YP(),[i,a]=T(!1);E(()=>{if(n.value===`tiny`){try{if(sessionStorage.getItem(eF)===`1`)return}catch{}a(!0)}},[n]);let o=k(e=>{e.stopPropagation();try{sessionStorage.setItem(eF,`1`)}catch{}a(!1)},[]);if(!i)return null;let s=e===`right`?`right-[-6px] border-r border-b`:`left-[-6px] border-l border-t`,c=e===`right`?`-right-2`:`-left-2`;return A(`button`,{type:`button`,onClick:r,class:`relative max-w-56 rounded-box bg-base-100 text-base-content shadow-lg border border-base-300 px-3 py-2 text-sm text-left cursor-pointer animate-[tavusFadeUp_240ms_ease-out] hover:bg-base-200 transition-colors`,children:[A(`p`,{class:`leading-snug pr-3`,children:t.title}),A(`span`,{role:`button`,tabIndex:0,onClick:o,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&o(e)},class:`absolute -top-2 ${c} btn btn-ghost btn-circle btn-xs bg-base-100 border border-base-300 shadow-sm`,"aria-label":`Dismiss`,children:`×`}),A(`span`,{class:`absolute bottom-3 w-3 h-3 rotate-45 bg-base-100 border-base-300 ${s}`})]})}function nF(){let e=pt(fv);if(!e)throw Error(`useHostBridge must be used within HostBridgeProvider`);return e}var rF=`bg-base-100 text-base-content rounded-box border border-base-300 shadow-xl w-[22rem] flex flex-col animate-[tavusPopIn_180ms_ease-out]`,iF=`bg-base-100 text-base-content w-[100vw] h-[100dvh] flex flex-col animate-[tavusFadeUp_180ms_ease-out]`,aF=`p-1 flex-1 min-h-0`,oF=`p-1 flex-1 min-h-0`;function sF({variant:e,children:t,fullscreen:n}){let{collapse:r,expandable:i}=YP(),a=i.value!==`always`;return n?A(`div`,{class:iF,children:[A(`div`,{class:`flex items-center justify-end gap-2 px-2.5 py-1.5 border-b border-base-300`,children:a&&A(`button`,{type:`button`,class:`btn btn-ghost btn-circle btn-xs`,onClick:r,"aria-label":`Close`,children:A(Ny,{name:`close`,size:14})})}),A(`div`,{class:oF,children:t}),A(`div`,{class:`flex justify-end px-2.5`,children:A(WP,{})})]}):A(`div`,{class:`flex flex-col h-[min(34rem,calc(100dvh-3rem))]`,children:[A(`div`,{class:`${rF} flex-1 overflow-hidden`,children:[A(`div`,{class:`flex items-center justify-end gap-2 px-2.5 pt-1.5 shrink-0`,children:a&&A(`button`,{type:`button`,class:`btn btn-ghost btn-circle btn-xs`,onClick:r,"aria-label":`Close`,children:A(Ny,{name:`close`,size:14})})}),A(`div`,{class:aF,children:t})]}),A(`div`,{class:`flex justify-end pr-2 pt-1.5 shrink-0`,children:A(WP,{})})]})}var cF=yn(`Widget`),lF=`1rem`,uF=480;function dF(){return typeof window>`u`?!1:window.innerWidth<=uF}function fF(e){switch(e){case`bottom-right`:return{bottom:lF,right:lF};case`bottom-left`:return{bottom:lF,left:lF};case`top-right`:return{top:lF,right:lF};case`top-left`:return{top:lF,left:lF};case`top`:return{top:lF,left:`50%`,transform:`translateX(-50%)`};case`bottom`:return{bottom:lF,left:`50%`,transform:`translateX(-50%)`}}}var pF=[`top`,`bottom`,`left`,`right`,`transform`];function mF(e){return e===`bottom-left`||e===`top-left`?`left`:`right`}function hF(){let{config:e,initError:t}=K_(),n=JP(),{expanded:r,position:i,variant:a}=YP(),{shadowHost:o}=nF(),s=Xy(),c=dn(dF());E(()=>{if(typeof window>`u`)return;c.value=dF();let e=()=>{c.value=dF()};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[c]);let l=O(()=>({fallback_button:n.btn_title}),[n.btn_title]);if(vn(()=>{let e=o.value,t=i.value,n=r.value,a=n&&c.value;if(e){if(a)e.style.top=`0`,e.style.right=`0`,e.style.bottom=`0`,e.style.left=`0`,e.style.transform=``;else{let n=fF(t);for(let t of pF)e.style[t]=n[t]??``}e.dataset.tavusWidgetPosition=t,e.dataset.tavusWidgetExpanded=n?`true`:`false`,e.dataset.tavusWidgetFullscreen=a?`true`:`false`,e.dataset.tavusWidgetSmall=c.value?`true`:`false`}}),t.value)return cF.error(`Widget cannot initialize (init request failed):`,t.value),null;if(e.value.is_available===!1&&e.value.unavailable_reason===`total_limit`)return cF.error(`Widget is unavailable (total_limit reached) — not rendering`),null;if(!r.value){let e=mF(i.value),t=e===`right`?`flex items-end gap-2 justify-end`:`flex items-end gap-2 flex-row-reverse justify-end`,n=e===`right`?`justify-end pr-2`:`justify-start pl-2`;return A(`div`,{class:`flex flex-col`,children:[A(`div`,{class:t,children:[A(tF,{anchor:e}),A($P,{variant:a.value})]}),A(`div`,{class:`flex ${n} pt-1.5`,children:A(WP,{})})]})}return e.value.is_available===!1?A(sF,{variant:a.value,fullscreen:c.value,children:A(Ev,{children:A(Yy,{cause:e.value.unavailable_reason??`daily_limit`,canRetry:!1,onRetry:()=>{}})})}):A(sF,{variant:a.value,fullscreen:c.value,children:A(Ev,{children:A(VP,{flow:s,welcomeText:l,onUnavailableCancel:()=>s.restart()})})})}var gF=`:host {
163
163
  display: block;
164
164
  position: fixed;
165
165
  z-index: 50;
166
166
  background: transparent;
167
167
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
168
- }`;function iF(e){return j(le,{children:[j(`style`,{dangerouslySetInnerHTML:{__html:Je}}),j(`style`,{dangerouslySetInnerHTML:{__html:rF}}),j(Tt,{"deployment-id":e[`deployment-id`],"override-config":e[`override-config`],"conversational-context":e[`conversational-context`],"custom-greeting":e[`custom-greeting`],"base-url":e[`base-url`],token:e.token,children:j(bi,{children:j(Si,{children:j(L_,{children:j(lv,{children:j(pv,{children:j(hv,{children:j(AP,{children:j(nF,{})})})})})})})})})]})}var aF;function oF(){aF||=Be(iF,`tavus-widget`,[`deployment-id`,`override-config`,`conversational-context`,`custom-greeting`,`base-url`,`token`],{shadow:!0,mode:`open`})}var sF=[`tavus:chat-message`,`tavus:conversation-ended`,`tavus:conversation-started`,`tavus:error`,`tavus:message`,`tavus:mode-change`,`tavus:protocol-message`,`tavus:ready`,`tavus:state-change`,`tavus:tool-call`],cF=class{element=null;tagName;constructor(e=`tavus-widget`){this.tagName=e,this.element=document.querySelector(this.tagName)}getElement(){if(this.element||=document.querySelector(this.tagName),!this.element)throw Error(`Element <${this.tagName}> not found in the DOM`);return this.element}open(){this.getElement().open?.()}close(){this.getElement().close?.()}startConversation(){this.getElement().startConversation?.()}endConversation(){this.getElement().endConversation?.()}sendMessage(e){let t=this.getElement();if(typeof e==`string`){let n={event_type:`conversation.respond`,properties:{text:e}};t.tavus?.sendMessage?.(n)}else t.tavus?.sendMessage?.(e)}updateConfig(e){this.getElement().updateConfig?.(e)}destroy(){this.getElement().destroy?.(),this.element=null}on(e,t){this.getElement().addEventListener(e,t)}off(e,t){this.getElement().removeEventListener(e,t)}};return typeof window<`u`&&oF(),e.TAVUS_EVENT_NAMES=sF,e.TavusIntegration=cF,e})({});
168
+ }`;function _F(e){return A(ue,{children:[A(`style`,{dangerouslySetInnerHTML:{__html:Ye}}),A(`style`,{dangerouslySetInnerHTML:{__html:gF}}),A(Et,{"deployment-id":e[`deployment-id`],"override-config":e[`override-config`],"conversational-context":e[`conversational-context`],"custom-greeting":e[`custom-greeting`],"memory-stores":e[`memory-stores`],"base-url":e[`base-url`],token:e.token,children:A(xi,{children:A(Ci,{children:A(R_,{children:A(uv,{children:A(mv,{children:A(gv,{children:A(UP,{children:A(hF,{})})})})})})})})})]})}var vF;function yF(){vF||=Ve(_F,`tavus-widget`,[`deployment-id`,`override-config`,`conversational-context`,`custom-greeting`,`memory-stores`,`base-url`,`token`],{shadow:!0,mode:`open`})}var bF=[`tavus:chat-message`,`tavus:conversation-ended`,`tavus:conversation-started`,`tavus:error`,`tavus:message`,`tavus:mode-change`,`tavus:protocol-message`,`tavus:ready`,`tavus:state-change`,`tavus:tool-call`],xF=class{element=null;tagName;constructor(e=`tavus-widget`){this.tagName=e,this.element=document.querySelector(this.tagName)}getElement(){if(this.element||=document.querySelector(this.tagName),!this.element)throw Error(`Element <${this.tagName}> not found in the DOM`);return this.element}open(){this.getElement().open?.()}close(){this.getElement().close?.()}startConversation(){this.getElement().startConversation?.()}endConversation(){this.getElement().endConversation?.()}sendMessage(e){let t=this.getElement();if(typeof e==`string`){let n={event_type:`conversation.respond`,properties:{text:e}};t.tavus?.sendMessage?.(n)}else t.tavus?.sendMessage?.(e)}updateConfig(e){this.getElement().updateConfig?.(e)}destroy(){this.getElement().destroy?.(),this.element=null}on(e,t){this.getElement().addEventListener(e,t)}off(e,t){this.getElement().removeEventListener(e,t)}};return typeof window<`u`&&yF(),e.TAVUS_EVENT_NAMES=bF,e.TavusIntegration=xF,e})({});