@careshiphealth/widget 2.2.6-ela → 2.2.6

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.
@@ -53,7 +53,7 @@ Error generating stack: `+z.message+`
53
53
  `+z.stack}return Object.defineProperty(b,"componentStack",{value:M}),M}}),b}function Ln(h,b,y){if(h=h.onError,b=h(b,y),b==null||typeof b=="string")return b}function Ac(h,b){var y=h.onShellError,k=h.onFatalError;y(b),k(b),h.destination!==null?(h.status=14,ZA(h.destination,b)):(h.status=13,h.fatalError=b)}function zs(h,b){Vf(h,b.next,b.hoistables)}function Vf(h,b,y){for(;b!==null;){y!==null&&($o(b.hoistables,y),b.inheritedHoistables=y);var k=b.boundaries;if(k!==null){b.boundaries=null;for(var M=0;M<k.length;M++){var z=k[M];y!==null&&$o(z.contentState,y),Er(h,z,null,null)}}if(b.pendingTasks--,0<b.pendingTasks)break;y=b.hoistables,b=b.next}}function Fg(h,b){var y=b.boundaries;if(y!==null&&b.pendingTasks===y.length){for(var k=!0,M=0;M<y.length;M++){var z=y[M];if(z.pendingTasks!==1||z.parentFlushed||Rr(h,z)){k=!1;break}}k&&Vf(h,b,b.hoistables)}}function an(h){var b={pendingTasks:1,boundaries:null,hoistables:Xi(),inheritedHoistables:null,together:!1,next:null};return h!==null&&0<h.pendingTasks&&(b.pendingTasks++,b.boundaries=[],h.next=b),b}function mu(h,b,y,k,M){var z=b.keyPath,K=b.treeContext,cA=b.row;b.keyPath=y,y=k.length;var sA=null;if(b.replay!==null){var lA=b.replay.slots;if(lA!==null&&typeof lA=="object")for(var bA=0;bA<y;bA++){var pA=M!=="backwards"&&M!=="unstable_legacy-backwards"?bA:y-1-bA,XA=k[pA];b.row=sA=an(sA),b.treeContext=tA(K,y,pA);var OA=lA[pA];typeof OA=="number"?(Wr(h,b,OA,XA,pA),delete lA[pA]):Hn(h,b,XA,pA),--sA.pendingTasks===0&&zs(h,sA)}else for(lA=0;lA<y;lA++)bA=M!=="backwards"&&M!=="unstable_legacy-backwards"?lA:y-1-lA,pA=k[bA],b.row=sA=an(sA),b.treeContext=tA(K,y,bA),Hn(h,b,pA,bA),--sA.pendingTasks===0&&zs(h,sA)}else if(M!=="backwards"&&M!=="unstable_legacy-backwards")for(M=0;M<y;M++)lA=k[M],b.row=sA=an(sA),b.treeContext=tA(K,y,M),Hn(h,b,lA,M),--sA.pendingTasks===0&&zs(h,sA);else{for(M=b.blockedSegment,lA=M.children.length,bA=M.chunks.length,pA=y-1;0<=pA;pA--){XA=k[pA],b.row=sA=an(sA),b.treeContext=tA(K,y,pA),OA=Es(h,bA,null,b.formatContext,pA===0?M.lastPushedText:!0,!0),M.children.splice(lA,0,OA),b.blockedSegment=OA;try{Hn(h,b,XA,pA),OA.lastPushedText&&OA.textEmbedded&&OA.chunks.push(Ua),OA.status=1,fr(h,b.blockedBoundary,OA),--sA.pendingTasks===0&&zs(h,sA)}catch(fe){throw OA.status=h.status===12?3:4,fe}}b.blockedSegment=M,M.lastPushedText=!1}cA!==null&&sA!==null&&0<sA.pendingTasks&&(cA.pendingTasks++,sA.next=cA),b.treeContext=K,b.row=cA,b.keyPath=z}function ol(h,b,y,k,M,z){var K=b.thenableState;for(b.thenableState=null,Fe={},It=b,rn=h,Je=y,pt=Dn=0,fn=-1,An=0,Ot=K,h=k(M,z);At;)At=!1,pt=Dn=0,fn=-1,An=0,Ji+=1,nt=null,h=k(M,z);return lr(),h}function Vr(h,b,y,k,M,z,K){var cA=!1;if(z!==0&&h.formState!==null){var sA=b.blockedSegment;if(sA!==null){cA=!0,sA=sA.chunks;for(var lA=0;lA<z;lA++)lA===K?sA.push(jw):sA.push(Xc)}}z=b.keyPath,b.keyPath=y,M?(y=b.treeContext,b.treeContext=tA(y,1,0),Hn(h,b,k,-1),b.treeContext=y):cA?Hn(h,b,k,-1):pn(h,b,k,-1),b.keyPath=z}function _i(h,b,y,k,M,z){if(typeof k=="function")if(k.prototype&&k.prototype.isReactComponent){var K=M;if("ref"in M){K={};for(var cA in M)cA!=="ref"&&(K[cA]=M[cA])}var sA=k.defaultProps;if(sA){K===M&&(K=YA({},K,M));for(var lA in sA)K[lA]===void 0&&(K[lA]=sA[lA])}M=K,K=Sf,sA=k.contextType,typeof sA=="object"&&sA!==null&&(K=sA._currentValue),K=new k(M,K);var bA=K.state!==void 0?K.state:null;if(K.updater=P,K.props=M,K.state=bA,sA={queue:[],replace:!1},K._reactInternals=sA,z=k.contextType,K.context=typeof z=="object"&&z!==null?z._currentValue:Sf,z=k.getDerivedStateFromProps,typeof z=="function"&&(z=z(M,bA),bA=z==null?bA:YA({},bA,z),K.state=bA),typeof k.getDerivedStateFromProps!="function"&&typeof K.getSnapshotBeforeUpdate!="function"&&(typeof K.UNSAFE_componentWillMount=="function"||typeof K.componentWillMount=="function"))if(k=K.state,typeof K.componentWillMount=="function"&&K.componentWillMount(),typeof K.UNSAFE_componentWillMount=="function"&&K.UNSAFE_componentWillMount(),k!==K.state&&P.enqueueReplaceState(K,K.state,null),sA.queue!==null&&0<sA.queue.length)if(k=sA.queue,z=sA.replace,sA.queue=null,sA.replace=!1,z&&k.length===1)K.state=k[0];else{for(sA=z?k[0]:K.state,bA=!0,z=z?1:0;z<k.length;z++)lA=k[z],lA=typeof lA=="function"?lA.call(K,sA,M,void 0):lA,lA!=null&&(bA?(bA=!1,sA=YA({},sA,lA)):YA(sA,lA));K.state=sA}else sA.queue=null;if(k=K.render(),h.status===12)throw null;M=b.keyPath,b.keyPath=y,pn(h,b,k,-1),b.keyPath=M}else{if(k=ol(h,b,y,k,M,void 0),h.status===12)throw null;Vr(h,b,y,k,Dn!==0,pt,fn)}else if(typeof k=="string")if(K=b.blockedSegment,K===null)K=M.children,sA=b.formatContext,bA=b.keyPath,b.formatContext=ka(sA,k,M),b.keyPath=y,Hn(h,b,K,-1),b.formatContext=sA,b.keyPath=bA;else{if(bA=Br(K.chunks,k,M,h.resumableState,h.renderState,b.blockedPreamble,b.hoistableState,b.formatContext,K.lastPushedText),K.lastPushedText=!1,sA=b.formatContext,z=b.keyPath,b.keyPath=y,(b.formatContext=ka(sA,k,M)).insertionMode===3){y=Es(h,0,null,b.formatContext,!1,!1),K.preambleChildren.push(y),b.blockedSegment=y;try{y.status=6,Hn(h,b,bA,-1),y.lastPushedText&&y.textEmbedded&&y.chunks.push(Ua),y.status=1,fr(h,b.blockedBoundary,y)}finally{b.blockedSegment=K}}else Hn(h,b,bA,-1);b.formatContext=sA,b.keyPath=z;A:{switch(b=K.chunks,h=h.resumableState,k){case"title":case"style":case"script":case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break A;case"body":if(1>=sA.insertionMode){h.hasBody=!0;break A}break;case"html":if(sA.insertionMode===0){h.hasHtml=!0;break A}break;case"head":if(1>=sA.insertionMode)break A}b.push(Ri(k))}K.lastPushedText=!1}else{switch(k){case Z:case a:case B:case r:k=b.keyPath,b.keyPath=y,pn(h,b,M.children,-1),b.keyPath=k;return;case m:k=b.blockedSegment,k===null?M.mode!=="hidden"&&(k=b.keyPath,b.keyPath=y,Hn(h,b,M.children,-1),b.keyPath=k):M.mode!=="hidden"&&(k.chunks.push(Vo),k.lastPushedText=!1,K=b.keyPath,b.keyPath=y,Hn(h,b,M.children,-1),b.keyPath=K,k.chunks.push(Ig),k.lastPushedText=!1);return;case f:A:{if(k=M.children,M=M.revealOrder,M==="forwards"||M==="backwards"||M==="unstable_legacy-backwards"){if(V(k)){mu(h,b,y,k,M);break A}if((K=F(k))&&(K=K.call(k))){if(sA=K.next(),!sA.done){do sA=K.next();while(!sA.done);mu(h,b,y,k,M)}break A}}M==="together"?(M=b.keyPath,K=b.row,sA=b.row=an(null),sA.boundaries=[],sA.together=!0,b.keyPath=y,pn(h,b,k,-1),--sA.pendingTasks===0&&zs(h,sA),b.keyPath=M,b.row=K,K!==null&&0<sA.pendingTasks&&(K.pendingTasks++,sA.next=K)):(M=b.keyPath,b.keyPath=y,pn(h,b,k,-1),b.keyPath=M)}return;case T:case E:throw Error(t(343));case u:A:if(b.replay!==null){k=b.keyPath,K=b.formatContext,sA=b.row,b.keyPath=y,b.formatContext=Fi(h.resumableState,K),b.row=null,y=M.children;try{Hn(h,b,y,-1)}finally{b.keyPath=k,b.formatContext=K,b.row=sA}}else{k=b.keyPath,z=b.formatContext;var pA=b.row;lA=b.blockedBoundary,cA=b.blockedPreamble;var XA=b.hoistableState,OA=b.blockedSegment,fe=M.fallback;M=M.children;var Me=new Set,Ye=2>b.formatContext.insertionMode?mr(h,b.row,Me,un(),un()):mr(h,b.row,Me,null,null);h.trackedPostpones!==null&&(Ye.trackedContentKeyPath=y);var te=Es(h,OA.chunks.length,Ye,b.formatContext,!1,!1);OA.children.push(te),OA.lastPushedText=!1;var he=Es(h,0,null,b.formatContext,!1,!1);if(he.parentFlushed=!0,h.trackedPostpones!==null){K=b.componentStack,sA=[y[0],"Suspense Fallback",y[2]],bA=[sA[1],sA[2],[],null],h.trackedPostpones.workingMap.set(sA,bA),Ye.trackedFallbackNode=bA,b.blockedSegment=te,b.blockedPreamble=Ye.fallbackPreamble,b.keyPath=sA,b.formatContext=xo(h.resumableState,z),b.componentStack=Sr(K),te.status=6;try{Hn(h,b,fe,-1),te.lastPushedText&&te.textEmbedded&&te.chunks.push(Ua),te.status=1,fr(h,lA,te)}catch(je){throw te.status=h.status===12?3:4,je}finally{b.blockedSegment=OA,b.blockedPreamble=cA,b.keyPath=k,b.formatContext=z}b=fi(h,null,M,-1,Ye,he,Ye.contentPreamble,Ye.contentState,b.abortSet,y,Fi(h.resumableState,b.formatContext),b.context,b.treeContext,null,K),Ra(b),h.pingedTasks.push(b)}else{b.blockedBoundary=Ye,b.blockedPreamble=Ye.contentPreamble,b.hoistableState=Ye.contentState,b.blockedSegment=he,b.keyPath=y,b.formatContext=Fi(h.resumableState,z),b.row=null,he.status=6;try{if(Hn(h,b,M,-1),he.lastPushedText&&he.textEmbedded&&he.chunks.push(Ua),he.status=1,fr(h,Ye,he),Sa(Ye,he),Ye.pendingTasks===0&&Ye.status===0){if(Ye.status=1,!Rr(h,Ye)){pA!==null&&--pA.pendingTasks===0&&zs(h,pA),h.pendingRootTasks===0&&b.blockedPreamble&&ra(h);break A}}else pA!==null&&pA.together&&Fg(h,pA)}catch(je){Ye.status=4,h.status===12?(he.status=3,K=h.fatalError):(he.status=4,K=je),sA=Ft(b.componentStack),bA=Ln(h,K,sA),Ye.errorDigest=bA,qi(h,Ye)}finally{b.blockedBoundary=lA,b.blockedPreamble=cA,b.hoistableState=XA,b.blockedSegment=OA,b.keyPath=k,b.formatContext=z,b.row=pA}b=fi(h,null,fe,-1,lA,te,Ye.fallbackPreamble,Ye.fallbackState,Me,[y[0],"Suspense Fallback",y[2]],xo(h.resumableState,b.formatContext),b.context,b.treeContext,b.row,Sr(b.componentStack)),Ra(b),h.pingedTasks.push(b)}}return}if(typeof k=="object"&&k!==null)switch(k.$$typeof){case g:if("ref"in M)for(OA in K={},M)OA!=="ref"&&(K[OA]=M[OA]);else K=M;k=ol(h,b,y,k.render,K,z),Vr(h,b,y,k,Dn!==0,pt,fn);return;case w:_i(h,b,y,k.type,M,z);return;case l:if(sA=M.children,K=b.keyPath,M=M.value,bA=k._currentValue,k._currentValue=M,z=Ss,Ss=k={parent:z,depth:z===null?0:z.depth+1,context:k,parentValue:bA,value:M},b.context=k,b.keyPath=y,pn(h,b,sA,-1),h=Ss,h===null)throw Error(t(403));h.context._currentValue=h.parentValue,h=Ss=h.parent,b.context=h,b.keyPath=K;return;case c:M=M.children,k=M(k._context._currentValue),M=b.keyPath,b.keyPath=y,pn(h,b,k,-1),b.keyPath=M;return;case v:if(K=k._init,k=K(k._payload),h.status===12)throw null;_i(h,b,y,k,M,z);return}throw Error(t(130,k==null?k:typeof k,""))}}function Wr(h,b,y,k,M){var z=b.replay,K=b.blockedBoundary,cA=Es(h,0,null,b.formatContext,!1,!1);cA.id=y,cA.parentFlushed=!0;try{b.replay=null,b.blockedSegment=cA,Hn(h,b,k,M),cA.status=1,fr(h,K,cA),K===null?h.completedRootSegment=cA:(Sa(K,cA),K.parentFlushed&&h.partialBoundaries.push(K))}finally{b.replay=z,b.blockedSegment=null}}function pn(h,b,y,k){b.replay!==null&&typeof b.replay.slots=="number"?Wr(h,b,b.replay.slots,y,k):(b.node=y,b.childIndex=k,y=b.componentStack,Ra(b),cl(h,b),b.componentStack=y)}function cl(h,b){var y=b.node,k=b.childIndex;if(y!==null){if(typeof y=="object"){switch(y.$$typeof){case n:var M=y.type,z=y.key,K=y.props;y=K.ref;var cA=y!==void 0?y:null,sA=al(M),lA=z??(k===-1?0:k);if(z=[b.keyPath,sA,lA],b.replay!==null)A:{var bA=b.replay;for(k=bA.nodes,y=0;y<k.length;y++){var pA=k[y];if(lA===pA[1]){if(pA.length===4){if(sA!==null&&sA!==pA[0])throw Error(t(490,pA[0],sA));var XA=pA[2];sA=pA[3],lA=b.node,b.replay={nodes:XA,slots:sA,pendingTasks:1};try{if(_i(h,b,z,M,K,cA),b.replay.pendingTasks===1&&0<b.replay.nodes.length)throw Error(t(488));b.replay.pendingTasks--}catch(Qe){if(typeof Qe=="object"&&Qe!==null&&(Qe===_A||typeof Qe.then=="function"))throw b.node===lA?b.replay=bA:k.splice(y,1),Qe;b.replay.pendingTasks--,K=Ft(b.componentStack),z=h,h=b.blockedBoundary,M=Qe,K=Ln(z,M,K),JB(z,h,XA,sA,M,K)}b.replay=bA}else{if(M!==u)throw Error(t(490,"Suspense",al(M)||"Unknown"));e:{bA=void 0,M=pA[5],cA=pA[2],sA=pA[3],lA=pA[4]===null?[]:pA[4][2],pA=pA[4]===null?null:pA[4][3];var OA=b.keyPath,fe=b.formatContext,Me=b.row,Ye=b.replay,te=b.blockedBoundary,he=b.hoistableState,je=K.children,ys=K.fallback,Ys=new Set;K=2>b.formatContext.insertionMode?mr(h,b.row,Ys,un(),un()):mr(h,b.row,Ys,null,null),K.parentFlushed=!0,K.rootSegmentID=M,b.blockedBoundary=K,b.hoistableState=K.contentState,b.keyPath=z,b.formatContext=Fi(h.resumableState,fe),b.row=null,b.replay={nodes:cA,slots:sA,pendingTasks:1};try{if(Hn(h,b,je,-1),b.replay.pendingTasks===1&&0<b.replay.nodes.length)throw Error(t(488));if(b.replay.pendingTasks--,K.pendingTasks===0&&K.status===0){K.status=1,h.completedBoundaries.push(K);break e}}catch(Qe){K.status=4,XA=Ft(b.componentStack),bA=Ln(h,Qe,XA),K.errorDigest=bA,b.replay.pendingTasks--,h.clientRenderedBoundaries.push(K)}finally{b.blockedBoundary=te,b.hoistableState=he,b.replay=Ye,b.keyPath=OA,b.formatContext=fe,b.row=Me}XA=Bl(h,null,{nodes:lA,slots:pA,pendingTasks:0},ys,-1,te,K.fallbackState,Ys,[z[0],"Suspense Fallback",z[2]],xo(h.resumableState,b.formatContext),b.context,b.treeContext,b.row,Sr(b.componentStack)),Ra(XA),h.pingedTasks.push(XA)}}k.splice(y,1);break A}}}else _i(h,b,z,M,K,cA);return;case s:throw Error(t(257));case v:if(XA=y._init,y=XA(y._payload),h.status===12)throw null;pn(h,b,y,k);return}if(V(y)){ec(h,b,y,k);return}if((XA=F(y))&&(XA=XA.call(y))){if(y=XA.next(),!y.done){K=[];do K.push(y.value),y=XA.next();while(!y.done);ec(h,b,K,k)}return}if(typeof y.then=="function")return b.thenableState=null,pn(h,b,Dg(y),k);if(y.$$typeof===l)return pn(h,b,y._currentValue,k);throw k=Object.prototype.toString.call(y),Error(t(31,k==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":k))}typeof y=="string"?(k=b.blockedSegment,k!==null&&(k.lastPushedText=kf(k.chunks,y,h.renderState,k.lastPushedText))):(typeof y=="number"||typeof y=="bigint")&&(k=b.blockedSegment,k!==null&&(k.lastPushedText=kf(k.chunks,""+y,h.renderState,k.lastPushedText)))}}function ec(h,b,y,k){var M=b.keyPath;if(k!==-1&&(b.keyPath=[b.keyPath,"Fragment",k],b.replay!==null)){for(var z=b.replay,K=z.nodes,cA=0;cA<K.length;cA++){var sA=K[cA];if(sA[1]===k){k=sA[2],sA=sA[3],b.replay={nodes:k,slots:sA,pendingTasks:1};try{if(ec(h,b,y,-1),b.replay.pendingTasks===1&&0<b.replay.nodes.length)throw Error(t(488));b.replay.pendingTasks--}catch(pA){if(typeof pA=="object"&&pA!==null&&(pA===_A||typeof pA.then=="function"))throw pA;b.replay.pendingTasks--,y=Ft(b.componentStack);var lA=b.blockedBoundary,bA=pA;y=Ln(h,bA,y),JB(h,lA,k,sA,bA,y)}b.replay=z,K.splice(cA,1);break}}b.keyPath=M;return}if(z=b.treeContext,K=y.length,b.replay!==null&&(cA=b.replay.slots,cA!==null&&typeof cA=="object")){for(k=0;k<K;k++)sA=y[k],b.treeContext=tA(z,K,k),lA=cA[k],typeof lA=="number"?(Wr(h,b,lA,sA,k),delete cA[k]):Hn(h,b,sA,k);b.treeContext=z,b.keyPath=M;return}for(cA=0;cA<K;cA++)k=y[cA],b.treeContext=tA(z,K,cA),Hn(h,b,k,cA);b.treeContext=z,b.keyPath=M}function Eu(h,b,y){if(y.status=5,y.rootSegmentID=h.nextSegmentId++,h=y.trackedContentKeyPath,h===null)throw Error(t(486));var k=y.trackedFallbackNode,M=[],z=b.workingMap.get(h);return z===void 0?(y=[h[1],h[2],M,null,k,y.rootSegmentID],b.workingMap.set(h,y),ul(y,h[0],b),y):(z[4]=k,z[5]=y.rootSegmentID,z)}function Mg(h,b,y,k){k.status=5;var M=y.keyPath,z=y.blockedBoundary;if(z===null)k.id=h.nextSegmentId++,b.rootSlots=k.id,h.completedRootSegment!==null&&(h.completedRootSegment.status=5);else{if(z!==null&&z.status===0){var K=Eu(h,b,z);if(z.trackedContentKeyPath===M&&y.childIndex===-1){k.id===-1&&(k.id=k.parentFlushed?z.rootSegmentID:h.nextSegmentId++),K[3]=k.id;return}}if(k.id===-1&&(k.id=k.parentFlushed&&z!==null?z.rootSegmentID:h.nextSegmentId++),y.childIndex===-1)M===null?b.rootSlots=k.id:(y=b.workingMap.get(M),y===void 0?(y=[M[1],M[2],[],k.id],ul(y,M[0],b)):y[3]=k.id);else{if(M===null){if(h=b.rootSlots,h===null)h=b.rootSlots={};else if(typeof h=="number")throw Error(t(491))}else if(z=b.workingMap,K=z.get(M),K===void 0)h={},K=[M[1],M[2],[],h],z.set(M,K),ul(K,M[0],b);else if(h=K[3],h===null)h=K[3]={};else if(typeof h=="number")throw Error(t(491));h[y.childIndex]=k.id}}}function qi(h,b){h=h.trackedPostpones,h!==null&&(b=b.trackedContentKeyPath,b!==null&&(b=h.workingMap.get(b),b!==void 0&&(b.length=4,b[2]=[],b[3]=null)))}function ll(h,b,y){return Bl(h,y,b.replay,b.node,b.childIndex,b.blockedBoundary,b.hoistableState,b.abortSet,b.keyPath,b.formatContext,b.context,b.treeContext,b.row,b.componentStack)}function gl(h,b,y){var k=b.blockedSegment,M=Es(h,k.chunks.length,null,b.formatContext,k.lastPushedText,!0);return k.children.push(M),k.lastPushedText=!1,fi(h,y,b.node,b.childIndex,b.blockedBoundary,M,b.blockedPreamble,b.hoistableState,b.abortSet,b.keyPath,b.formatContext,b.context,b.treeContext,b.row,b.componentStack)}function Hn(h,b,y,k){var M=b.formatContext,z=b.context,K=b.keyPath,cA=b.treeContext,sA=b.componentStack,lA=b.blockedSegment;if(lA===null){lA=b.replay;try{return pn(h,b,y,k)}catch(XA){if(lr(),y=XA===_A?Ze():XA,h.status!==12&&typeof y=="object"&&y!==null){if(typeof y.then=="function"){k=XA===_A?Fn():null,h=ll(h,b,k).ping,y.then(h,h),b.formatContext=M,b.context=z,b.keyPath=K,b.treeContext=cA,b.componentStack=sA,b.replay=lA,U(z);return}if(y.message==="Maximum call stack size exceeded"){y=XA===_A?Fn():null,y=ll(h,b,y),h.pingedTasks.push(y),b.formatContext=M,b.context=z,b.keyPath=K,b.treeContext=cA,b.componentStack=sA,b.replay=lA,U(z);return}}}}else{var bA=lA.children.length,pA=lA.chunks.length;try{return pn(h,b,y,k)}catch(XA){if(lr(),lA.children.length=bA,lA.chunks.length=pA,y=XA===_A?Ze():XA,h.status!==12&&typeof y=="object"&&y!==null){if(typeof y.then=="function"){lA=y,y=XA===_A?Fn():null,h=gl(h,b,y).ping,lA.then(h,h),b.formatContext=M,b.context=z,b.keyPath=K,b.treeContext=cA,b.componentStack=sA,U(z);return}if(y.message==="Maximum call stack size exceeded"){lA=XA===_A?Fn():null,lA=gl(h,b,lA),h.pingedTasks.push(lA),b.formatContext=M,b.context=z,b.keyPath=K,b.treeContext=cA,b.componentStack=sA,U(z);return}}}}throw b.formatContext=M,b.context=z,b.keyPath=K,b.treeContext=cA,U(z),y}function $i(h){var b=h.blockedBoundary,y=h.blockedSegment;y!==null&&(y.status=3,Er(this,b,h.row,y))}function JB(h,b,y,k,M,z){for(var K=0;K<y.length;K++){var cA=y[K];if(cA.length===4)JB(h,b,cA[2],cA[3],M,z);else{cA=cA[5];var sA=h,lA=z,bA=mr(sA,null,new Set,null,null);bA.parentFlushed=!0,bA.rootSegmentID=cA,bA.status=4,bA.errorDigest=lA,bA.parentFlushed&&sA.clientRenderedBoundaries.push(bA)}}if(y.length=0,k!==null){if(b===null)throw Error(t(487));if(b.status!==4&&(b.status=4,b.errorDigest=z,b.parentFlushed&&h.clientRenderedBoundaries.push(b)),typeof k=="object")for(var pA in k)delete k[pA]}}function AB(h,b,y){var k=h.blockedBoundary,M=h.blockedSegment;if(M!==null){if(M.status===6)return;M.status=3}var z=Ft(h.componentStack);if(k===null){if(b.status!==13&&b.status!==14){if(k=h.replay,k===null){b.trackedPostpones!==null&&M!==null?(k=b.trackedPostpones,Ln(b,y,z),Mg(b,k,h,M),Er(b,null,h.row,M)):(Ln(b,y,z),Ac(b,y));return}k.pendingTasks--,k.pendingTasks===0&&0<k.nodes.length&&(M=Ln(b,y,z),JB(b,null,k.nodes,k.slots,y,M)),b.pendingRootTasks--,b.pendingRootTasks===0&&xg(b)}}else{var K=b.trackedPostpones;if(k.status!==4){if(K!==null&&M!==null)return Ln(b,y,z),Mg(b,K,h,M),k.fallbackAbortableTasks.forEach(function(cA){return AB(cA,b,y)}),k.fallbackAbortableTasks.clear(),Er(b,k,h.row,M);k.status=4,M=Ln(b,y,z),k.status=4,k.errorDigest=M,qi(b,k),k.parentFlushed&&b.clientRenderedBoundaries.push(k)}k.pendingTasks--,M=k.row,M!==null&&--M.pendingTasks===0&&zs(b,M),k.fallbackAbortableTasks.forEach(function(cA){return AB(cA,b,y)}),k.fallbackAbortableTasks.clear()}h=h.row,h!==null&&--h.pendingTasks===0&&zs(b,h),b.allPendingTasks--,b.allPendingTasks===0&&dl(b)}function KB(h,b){try{var y=h.renderState,k=y.onHeaders;if(k){var M=y.headers;if(M){y.headers=null;var z=M.preconnects;if(M.fontPreloads&&(z&&(z+=", "),z+=M.fontPreloads),M.highImagePreloads&&(z&&(z+=", "),z+=M.highImagePreloads),!b){var K=y.styles.values(),cA=K.next();A:for(;0<M.remainingCapacity&&!cA.done;cA=K.next())for(var sA=cA.value.sheets.values(),lA=sA.next();0<M.remainingCapacity&&!lA.done;lA=sA.next()){var bA=lA.value,pA=bA.props,XA=pA.href,OA=bA.props,fe=Hs(OA.href,"style",{crossOrigin:OA.crossOrigin,integrity:OA.integrity,nonce:OA.nonce,type:OA.type,fetchPriority:OA.fetchPriority,referrerPolicy:OA.referrerPolicy,media:OA.media});if(0<=(M.remainingCapacity-=fe.length+2))y.resets.style[XA]=gA,z&&(z+=", "),z+=fe,y.resets.style[XA]=typeof pA.crossOrigin=="string"||typeof pA.integrity=="string"?[pA.crossOrigin,pA.integrity]:gA;else break A}}k(z?{Link:z}:{})}}}catch(Me){Ln(h,Me,{})}}function xg(h){h.trackedPostpones===null&&KB(h,!0),h.trackedPostpones===null&&ra(h),h.onShellError=EA,h=h.onShellReady,h()}function dl(h){KB(h,h.trackedPostpones===null?!0:h.completedRootSegment===null||h.completedRootSegment.status!==5),ra(h),h=h.onAllReady,h()}function Sa(h,b){if(b.chunks.length===0&&b.children.length===1&&b.children[0].boundary===null&&b.children[0].id===-1){var y=b.children[0];y.id=b.id,y.parentFlushed=!0,y.status!==1&&y.status!==3&&y.status!==4||Sa(h,y)}else h.completedSegments.push(b)}function fr(h,b,y){if(dA!==null){y=y.chunks;for(var k=0,M=0;M<y.length;M++)k+=y[M].byteLength;b===null?h.byteSize+=k:b.byteSize+=k}}function Er(h,b,y,k){if(y!==null&&(--y.pendingTasks===0?zs(h,y):y.together&&Fg(h,y)),h.allPendingTasks--,b===null){if(k!==null&&k.parentFlushed){if(h.completedRootSegment!==null)throw Error(t(389));h.completedRootSegment=k}h.pendingRootTasks--,h.pendingRootTasks===0&&xg(h)}else if(b.pendingTasks--,b.status!==4)if(b.pendingTasks===0){if(b.status===0&&(b.status=1),k!==null&&k.parentFlushed&&(k.status===1||k.status===3)&&Sa(b,k),b.parentFlushed&&h.completedBoundaries.push(b),b.status===1)y=b.row,y!==null&&$o(y.hoistables,b.contentState),Rr(h,b)||(b.fallbackAbortableTasks.forEach($i,h),b.fallbackAbortableTasks.clear(),y!==null&&--y.pendingTasks===0&&zs(h,y)),h.pendingRootTasks===0&&h.trackedPostpones===null&&b.contentPreamble!==null&&ra(h);else if(b.status===5&&(b=b.row,b!==null)){if(h.trackedPostpones!==null){y=h.trackedPostpones;var M=b.next;if(M!==null&&(k=M.boundaries,k!==null))for(M.boundaries=null,M=0;M<k.length;M++){var z=k[M];Eu(h,y,z),Er(h,z,null,null)}}--b.pendingTasks===0&&zs(h,b)}}else k===null||!k.parentFlushed||k.status!==1&&k.status!==3||(Sa(b,k),b.completedSegments.length===1&&b.parentFlushed&&h.partialBoundaries.push(b)),b=b.row,b!==null&&b.together&&Fg(h,b);h.allPendingTasks===0&&dl(h)}function yu(h){if(h.status!==14&&h.status!==13){var b=Ss,y=We.H;We.H=pu;var k=We.A;We.A=Jt;var M=Wt;Wt=h;var z=Mn;Mn=h.resumableState;try{var K=h.pingedTasks,cA;for(cA=0;cA<K.length;cA++){var sA=K[cA],lA=h,bA=sA.blockedSegment;if(bA===null){var pA=lA;if(sA.replay.pendingTasks!==0){U(sA.context);try{if(typeof sA.replay.slots=="number"?Wr(pA,sA,sA.replay.slots,sA.node,sA.childIndex):cl(pA,sA),sA.replay.pendingTasks===1&&0<sA.replay.nodes.length)throw Error(t(488));sA.replay.pendingTasks--,sA.abortSet.delete(sA),Er(pA,sA.blockedBoundary,sA.row,null)}catch(gs){lr();var XA=gs===_A?Ze():gs;if(typeof XA=="object"&&XA!==null&&typeof XA.then=="function"){var OA=sA.ping;XA.then(OA,OA),sA.thenableState=gs===_A?Fn():null}else{sA.replay.pendingTasks--,sA.abortSet.delete(sA);var fe=Ft(sA.componentStack);lA=void 0;var Me=pA,Ye=sA.blockedBoundary,te=pA.status===12?pA.fatalError:XA,he=sA.replay.nodes,je=sA.replay.slots;lA=Ln(Me,te,fe),JB(Me,Ye,he,je,te,lA),pA.pendingRootTasks--,pA.pendingRootTasks===0&&xg(pA),pA.allPendingTasks--,pA.allPendingTasks===0&&dl(pA)}}}}else if(pA=void 0,Me=bA,Me.status===0){Me.status=6,U(sA.context);var ys=Me.children.length,Ys=Me.chunks.length;try{cl(lA,sA),Me.lastPushedText&&Me.textEmbedded&&Me.chunks.push(Ua),sA.abortSet.delete(sA),Me.status=1,fr(lA,sA.blockedBoundary,Me),Er(lA,sA.blockedBoundary,sA.row,Me)}catch(gs){lr(),Me.children.length=ys,Me.chunks.length=Ys;var Qe=gs===_A?Ze():lA.status===12?lA.fatalError:gs;if(lA.status===12&&lA.trackedPostpones!==null){var $n=lA.trackedPostpones,Kt=Ft(sA.componentStack);sA.abortSet.delete(sA),Ln(lA,Qe,Kt),Mg(lA,$n,sA,Me),Er(lA,sA.blockedBoundary,sA.row,Me)}else if(typeof Qe=="object"&&Qe!==null&&typeof Qe.then=="function"){Me.status=0,sA.thenableState=gs===_A?Fn():null;var Xn=sA.ping;Qe.then(Xn,Xn)}else{var eB=Ft(sA.componentStack);sA.abortSet.delete(sA),Me.status=4;var ke=sA.blockedBoundary,Qi=sA.row;if(Qi!==null&&--Qi.pendingTasks===0&&zs(lA,Qi),lA.allPendingTasks--,pA=Ln(lA,Qe,eB),ke===null)Ac(lA,Qe);else if(ke.pendingTasks--,ke.status!==4){ke.status=4,ke.errorDigest=pA,qi(lA,ke);var Ba=ke.row;Ba!==null&&--Ba.pendingTasks===0&&zs(lA,Ba),ke.parentFlushed&&lA.clientRenderedBoundaries.push(ke),lA.pendingRootTasks===0&&lA.trackedPostpones===null&&ke.contentPreamble!==null&&ra(lA)}lA.allPendingTasks===0&&dl(lA)}}}}K.splice(0,cA),h.destination!==null&&sc(h,h.destination)}catch(gs){Ln(h,gs,{}),Ac(h,gs)}finally{Mn=z,We.H=y,We.A=k,y===pu&&U(b),Wt=M}}}function Nr(h,b,y){b.preambleChildren.length&&y.push(b.preambleChildren);for(var k=!1,M=0;M<b.children.length;M++)k=tc(h,b.children[M],y)||k;return k}function tc(h,b,y){var k=b.boundary;if(k===null)return Nr(h,b,y);var M=k.contentPreamble,z=k.fallbackPreamble;if(M===null||z===null)return!1;switch(k.status){case 1:if(vg(h.renderState,M),h.byteSize+=k.byteSize,b=k.completedSegments[0],!b)throw Error(t(391));return Nr(h,b,y);case 5:if(h.trackedPostpones!==null)return!0;case 4:if(b.status===1)return vg(h.renderState,z),Nr(h,b,y);default:return!0}}function ra(h){if(h.completedRootSegment&&h.completedPreambleSegments===null){var b=[],y=h.byteSize,k=tc(h,h.completedRootSegment,b),M=h.renderState.preamble;k===!1||M.headChunks&&M.bodyChunks?h.completedPreambleSegments=b:h.byteSize=y}}function Va(h,b,y,k){switch(y.parentFlushed=!0,y.status){case 0:y.id=h.nextSegmentId++;case 5:return k=y.id,y.lastPushedText=!1,y.textEmbedded=!1,h=h.renderState,L(b,Ff),L(b,h.placeholderPrefix),h=q(k.toString(16)),L(b,h),_(b,Jc);case 1:y.status=2;var M=!0,z=y.chunks,K=0;y=y.children;for(var cA=0;cA<y.length;cA++){for(M=y[cA];K<M.index;K++)L(b,z[K]);M=nc(h,b,M,k)}for(;K<z.length-1;K++)L(b,z[K]);return K<z.length&&(M=_(b,z[K])),M;case 3:return!0;default:throw Error(t(390))}}var aa=0;function nc(h,b,y,k){var M=y.boundary;if(M===null)return Va(h,b,y,k);if(M.parentFlushed=!0,M.status===4){var z=M.row;z!==null&&--z.pendingTasks===0&&zs(h,z),M=M.errorDigest,_(b,or),L(b,Vi),M&&(L(b,jc),L(b,q(UA(M))),L(b,Kc)),_(b,_c),Va(h,b,y,k)}else if(M.status!==1)M.status===0&&(M.rootSegmentID=h.nextSegmentId++),0<M.completedSegments.length&&h.partialBoundaries.push(M),Wo(b,h.renderState,M.rootSegmentID),k&&$o(k,M.fallbackState),Va(h,b,y,k);else if(!Wa&&Rr(h,M)&&(aa+M.byteSize>h.progressiveChunkSize||ui(M.contentState)))M.rootSegmentID=h.nextSegmentId++,h.completedBoundaries.push(M),Wo(b,h.renderState,M.rootSegmentID),Va(h,b,y,k);else{if(aa+=M.byteSize,k&&$o(k,M.contentState),y=M.row,y!==null&&Rr(h,M)&&--y.pendingTasks===0&&zs(h,y),_(b,_w),y=M.completedSegments,y.length!==1)throw Error(t(391));nc(h,b,y[0],k)}return _(b,Rs)}function hr(h,b,y,k){return Al(b,h.renderState,y.parentFormatContext,y.id),nc(h,b,y,k),mg(b,y.parentFormatContext)}function Yu(h,b,y){aa=y.byteSize;for(var k=y.completedSegments,M=0;M<k.length;M++)hi(h,b,y,k[M]);k.length=0,k=y.row,k!==null&&Rr(h,y)&&--k.pendingTasks===0&&zs(h,k),di(b,y.contentState,h.renderState),k=h.resumableState,h=h.renderState,M=y.rootSegmentID,y=y.contentState;var z=h.stylesToHoist;return h.stylesToHoist=!1,L(b,h.startInlineScript),L(b,yt),z?((k.instructions&4)===0&&(k.instructions|=4,L(b,el)),(k.instructions&2)===0&&(k.instructions|=2,L(b,Eg)),(k.instructions&8)===0?(k.instructions|=8,L(b,Qv)):L(b,AQ)):((k.instructions&2)===0&&(k.instructions|=2,L(b,Eg)),L(b,$w)),k=q(M.toString(16)),L(b,h.boundaryPrefix),L(b,k),L(b,ru),L(b,h.segmentPrefix),L(b,k),z?(L(b,bv),qn(b,y)):L(b,au),y=_(b,eQ),RB(b,h)&&y}function hi(h,b,y,k){if(k.status===2)return!0;var M=y.contentState,z=k.id;if(z===-1){if((k.id=y.rootSegmentID)===-1)throw Error(t(392));return hr(h,b,k,M)}return z===y.rootSegmentID?hr(h,b,k,M):(hr(h,b,k,M),y=h.resumableState,h=h.renderState,L(b,h.startInlineScript),L(b,yt),(y.instructions&1)===0?(y.instructions|=1,L(b,qw)):L(b,fv),L(b,h.segmentPrefix),z=q(z.toString(16)),L(b,z),L(b,hv),L(b,h.placeholderPrefix),L(b,z),b=_(b,wv),b)}var Wa=!1;function sc(h,b){fA=new Uint8Array(2048),yA=0;try{if(!(0<h.pendingRootTasks)){var y,k=h.completedRootSegment;if(k!==null){if(k.status===5)return;var M=h.completedPreambleSegments;if(M===null)return;aa=h.byteSize;var z=h.resumableState,K=h.renderState,cA=K.preamble,sA=cA.htmlChunks,lA=cA.headChunks,bA;if(sA){for(bA=0;bA<sA.length;bA++)L(b,sA[bA]);if(lA)for(bA=0;bA<lA.length;bA++)L(b,lA[bA]);else L(b,Gn("head")),L(b,yt)}else if(lA)for(bA=0;bA<lA.length;bA++)L(b,lA[bA]);var pA=K.charsetChunks;for(bA=0;bA<pA.length;bA++)L(b,pA[bA]);pA.length=0,K.preconnects.forEach(Lt,b),K.preconnects.clear();var XA=K.viewportChunks;for(bA=0;bA<XA.length;bA++)L(b,XA[bA]);XA.length=0,K.fontPreloads.forEach(Lt,b),K.fontPreloads.clear(),K.highImagePreloads.forEach(Lt,b),K.highImagePreloads.clear(),WA=K,K.styles.forEach(du,b),WA=null;var OA=K.importMapChunks;for(bA=0;bA<OA.length;bA++)L(b,OA[bA]);OA.length=0,K.bootstrapScripts.forEach(Lt,b),K.scripts.forEach(Lt,b),K.scripts.clear(),K.bulkPreloads.forEach(Lt,b),K.bulkPreloads.clear(),sA||lA||(z.instructions|=32);var fe=K.hoistableChunks;for(bA=0;bA<fe.length;bA++)L(b,fe[bA]);for(z=fe.length=0;z<M.length;z++){var Me=M[z];for(K=0;K<Me.length;K++)nc(h,b,Me[K],null)}var Ye=h.renderState.preamble,te=Ye.headChunks;(Ye.htmlChunks||te)&&L(b,Ri("head"));var he=Ye.bodyChunks;if(he)for(M=0;M<he.length;M++)L(b,he[M]);nc(h,b,k,null),h.completedRootSegment=null;var je=h.renderState;if(h.allPendingTasks!==0||h.clientRenderedBoundaries.length!==0||h.completedBoundaries.length!==0||h.trackedPostpones!==null&&(h.trackedPostpones.rootNodes.length!==0||h.trackedPostpones.rootSlots!==null)){var ys=h.resumableState;if((ys.instructions&64)===0){if(ys.instructions|=64,L(b,je.startInlineScript),(ys.instructions&32)===0){ys.instructions|=32;var Ys="_"+ys.idPrefix+"R_";L(b,Yg),L(b,q(UA(Ys))),L(b,qt)}L(b,yt),L(b,Si),_(b,NA)}}RB(b,je)}var Qe=h.renderState;k=0;var $n=Qe.viewportChunks;for(k=0;k<$n.length;k++)L(b,$n[k]);$n.length=0,Qe.preconnects.forEach(Lt,b),Qe.preconnects.clear(),Qe.fontPreloads.forEach(Lt,b),Qe.fontPreloads.clear(),Qe.highImagePreloads.forEach(Lt,b),Qe.highImagePreloads.clear(),Qe.styles.forEach(uu,b),Qe.scripts.forEach(Lt,b),Qe.scripts.clear(),Qe.bulkPreloads.forEach(Lt,b),Qe.bulkPreloads.clear();var Kt=Qe.hoistableChunks;for(k=0;k<Kt.length;k++)L(b,Kt[k]);Kt.length=0;var Xn=h.clientRenderedBoundaries;for(y=0;y<Xn.length;y++){var eB=Xn[y];Qe=b;var ke=h.resumableState,Qi=h.renderState,Ba=eB.rootSegmentID,gs=eB.errorDigest;L(Qe,Qi.startInlineScript),L(Qe,yt),(ke.instructions&4)===0?(ke.instructions|=4,L(Qe,xf)):L(Qe,iu),L(Qe,Qi.boundaryPrefix),L(Qe,q(Ba.toString(16))),L(Qe,Bu),gs&&(L(Qe,tl),L(Qe,q(tQ(gs||""))));var zr=_(Qe,Cv);if(!zr){h.destination=null,y++,Xn.splice(0,y);return}}Xn.splice(0,y);var Pg=h.completedBoundaries;for(y=0;y<Pg.length;y++)if(!Yu(h,b,Pg[y])){h.destination=null,y++,Pg.splice(0,y);return}Pg.splice(0,y),AA(b),fA=new Uint8Array(2048),yA=0,Wa=!0;var ac=h.partialBoundaries;for(y=0;y<ac.length;y++){var tB=ac[y];A:{Xn=h,eB=b,aa=tB.byteSize;var ic=tB.completedSegments;for(zr=0;zr<ic.length;zr++)if(!hi(Xn,eB,tB,ic[zr])){zr++,ic.splice(0,zr);var Zs=!1;break A}ic.splice(0,zr);var Mt=tB.row;Mt!==null&&Mt.together&&tB.pendingTasks===1&&(Mt.pendingTasks===1?Vf(Xn,Mt,Mt.hoistables):Mt.pendingTasks--),Zs=di(eB,tB.contentState,Xn.renderState)}if(!Zs){h.destination=null,y++,ac.splice(0,y);return}}ac.splice(0,y),Wa=!1;var nB=h.completedBoundaries;for(y=0;y<nB.length;y++)if(!Yu(h,b,nB[y])){h.destination=null,y++,nB.splice(0,y);return}nB.splice(0,y)}}finally{Wa=!1,h.allPendingTasks===0&&h.clientRenderedBoundaries.length===0&&h.completedBoundaries.length===0?(h.flushScheduled=!1,y=h.resumableState,y.hasBody&&L(b,Ri("body")),y.hasHtml&&L(b,Ri("html")),AA(b),h.status=14,b.close(),h.destination=null):AA(b)}}function yr(h){h.flushScheduled=h.destination!==null,hA(function(){return yu(h)}),$(function(){h.status===10&&(h.status=11),h.trackedPostpones===null&&KB(h,h.pendingRootTasks===0)})}function Ls(h){h.flushScheduled===!1&&h.pingedTasks.length===0&&h.destination!==null&&(h.flushScheduled=!0,$(function(){var b=h.destination;b?sc(h,b):h.flushScheduled=!1}))}function ia(h,b){if(h.status===13)h.status=14,ZA(b,h.fatalError);else if(h.status!==14&&h.destination===null){h.destination=b;try{sc(h,b)}catch(y){Ln(h,y,{}),Ac(h,y)}}}function Yr(h,b){(h.status===11||h.status===10)&&(h.status=12);try{var y=h.abortableTasks;if(0<y.size){var k=b===void 0?Error(t(432)):typeof b=="object"&&b!==null&&typeof b.then=="function"?Error(t(530)):b;h.fatalError=k,y.forEach(function(M){return AB(M,h,k)}),y.clear()}h.destination!==null&&sc(h,h.destination)}catch(M){Ln(h,M,{}),Ac(h,M)}}function ul(h,b,y){if(b===null)y.rootNodes.push(h);else{var k=y.workingMap,M=k.get(b);M===void 0&&(M=[b[1],b[2],[],null],k.set(b,M),ul(M,b[0],y)),M[2].push(h)}}function rc(h){var b=h.trackedPostpones;if(b===null||b.rootNodes.length===0&&b.rootSlots===null)return h.trackedPostpones=null;if(h.completedRootSegment===null||h.completedRootSegment.status!==5&&h.completedPreambleSegments!==null){var y=h.nextSegmentId,k=b.rootSlots,M=h.resumableState;M.bootstrapScriptContent=void 0,M.bootstrapScripts=void 0,M.bootstrapModules=void 0}else{y=0,k=-1,M=h.resumableState;var z=h.renderState;M.nextFormID=0,M.hasBody=!1,M.hasHtml=!1,M.unknownResources={font:z.resets.font},M.dnsResources=z.resets.dns,M.connectResources=z.resets.connect,M.imageResources=z.resets.image,M.styleResources=z.resets.style,M.scriptResources={},M.moduleUnknownResources={},M.moduleScriptResources={},M.instructions=0}return{nextSegmentId:y,rootFormatContext:h.rootFormatContext,progressiveChunkSize:h.progressiveChunkSize,resumableState:h.resumableState,replayNodes:b.rootNodes,replaySlots:k}}function wi(){var h=e.version;if(h!=="19.2.4")throw Error(t(527,h,"19.2.4"))}return wi(),wi(),aG.prerender=function(h,b){return new Promise(function(y,k){var M=b?b.onHeaders:void 0,z;M&&(z=function(bA){M(new Headers(bA))});var K=Zf(b?b.identifierPrefix:void 0,b?b.unstable_externalRuntimeSrc:void 0,b?b.bootstrapScriptContent:void 0,b?b.bootstrapScripts:void 0,b?b.bootstrapModules:void 0),cA=Ki(h,K,qd(K,void 0,b?b.unstable_externalRuntimeSrc:void 0,b?b.importMap:void 0,z,b?b.maxHeadersLength:void 0),Wc(b?b.namespaceURI:void 0),b?b.progressiveChunkSize:void 0,b?b.onError:void 0,function(){var bA=new ReadableStream({type:"bytes",pull:function(pA){ia(cA,pA)},cancel:function(pA){cA.destination=null,Yr(cA,pA)}},{highWaterMark:0});bA={postponed:rc(cA),prelude:bA},y(bA)},void 0,void 0,k,b?b.onPostpone:void 0);if(b&&b.signal){var sA=b.signal;if(sA.aborted)Yr(cA,sA.reason);else{var lA=function(){Yr(cA,sA.reason),sA.removeEventListener("abort",lA)};sA.addEventListener("abort",lA)}}yr(cA)})},aG.renderToReadableStream=function(h,b){return new Promise(function(y,k){var M,z,K=new Promise(function(OA,fe){z=OA,M=fe}),cA=b?b.onHeaders:void 0,sA;cA&&(sA=function(OA){cA(new Headers(OA))});var lA=Zf(b?b.identifierPrefix:void 0,b?b.unstable_externalRuntimeSrc:void 0,b?b.bootstrapScriptContent:void 0,b?b.bootstrapScripts:void 0,b?b.bootstrapModules:void 0),bA=OB(h,lA,qd(lA,b?b.nonce:void 0,b?b.unstable_externalRuntimeSrc:void 0,b?b.importMap:void 0,sA,b?b.maxHeadersLength:void 0),Wc(b?b.namespaceURI:void 0),b?b.progressiveChunkSize:void 0,b?b.onError:void 0,z,function(){var OA=new ReadableStream({type:"bytes",pull:function(fe){ia(bA,fe)},cancel:function(fe){bA.destination=null,Yr(bA,fe)}},{highWaterMark:0});OA.allReady=K,y(OA)},function(OA){K.catch(function(){}),k(OA)},M,b?b.onPostpone:void 0,b?b.formState:void 0);if(b&&b.signal){var pA=b.signal;if(pA.aborted)Yr(bA,pA.reason);else{var XA=function(){Yr(bA,pA.reason),pA.removeEventListener("abort",XA)};pA.addEventListener("abort",XA)}}yr(bA)})},aG.resume=function(h,b,y){return new Promise(function(k,M){var z,K,cA=new Promise(function(pA,XA){K=pA,z=XA}),sA=Ta(h,b,qd(b.resumableState,y?y.nonce:void 0,void 0,void 0,void 0,void 0),y?y.onError:void 0,K,function(){var pA=new ReadableStream({type:"bytes",pull:function(XA){ia(sA,XA)},cancel:function(XA){sA.destination=null,Yr(sA,XA)}},{highWaterMark:0});pA.allReady=cA,k(pA)},function(pA){cA.catch(function(){}),M(pA)},z,y?y.onPostpone:void 0);if(y&&y.signal){var lA=y.signal;if(lA.aborted)Yr(sA,lA.reason);else{var bA=function(){Yr(sA,lA.reason),lA.removeEventListener("abort",bA)};lA.addEventListener("abort",bA)}}yr(sA)})},aG.resumeAndPrerender=function(h,b,y){return new Promise(function(k,M){var z=ji(h,b,qd(b.resumableState,void 0,void 0,void 0,void 0,void 0),y?y.onError:void 0,function(){var sA=new ReadableStream({type:"bytes",pull:function(lA){ia(z,lA)},cancel:function(lA){z.destination=null,Yr(z,lA)}},{highWaterMark:0});sA={postponed:rc(z),prelude:sA},k(sA)},void 0,void 0,M,y?y.onPostpone:void 0);if(y&&y.signal){var K=y.signal;if(K.aborted)Yr(z,K.reason);else{var cA=function(){Yr(z,K.reason),K.removeEventListener("abort",cA)};K.addEventListener("abort",cA)}}yr(z)})},aG.version="19.2.4",aG}var iM;function MK(){if(iM)return rG;iM=1;var e,A;return e=DK(),A=FK(),rG.version=e.version,rG.renderToString=e.renderToString,rG.renderToStaticMarkup=e.renderToStaticMarkup,rG.renderToReadableStream=A.renderToReadableStream,rG.resume=A.resume,rG}var xK=MK(),WE={exports:{}},NE,BM;function PK(){if(BM)return NE;BM=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return NE=e,NE}var zE,oM;function TK(){if(oM)return zE;oM=1;var e=PK();function A(){}function t(){}return t.resetWarningCache=A,zE=function(){function n(a,B,c,l,g,u){if(u!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}n.isRequired=n;function s(){return n}var r={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:A};return r.PropTypes=r,r},zE}var cM;function RK(){return cM||(cM=1,WE.exports=TK()()),WE.exports}var SK=RK();const Ae=$g(SK);var VK=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lM(e,A){return e(A={exports:{}},A.exports),A.exports}var WK=lM((function(e){(function(A){var t=function(m,Z,D){if(!c(Z)||g(Z)||u(Z)||f(Z)||B(Z))return Z;var T,S=0,F=0;if(l(Z))for(T=[],F=Z.length;S<F;S++)T.push(t(m,Z[S],D));else for(var V in T={},Z)Object.prototype.hasOwnProperty.call(Z,V)&&(T[m(V,D)]=t(m,Z[V],D));return T},n=function(m){return w(m)?m:(m=m.replace(/[\-_\s]+(.)?/g,(function(Z,D){return D?D.toUpperCase():""}))).substr(0,1).toLowerCase()+m.substr(1)},s=function(m){var Z=n(m);return Z.substr(0,1).toUpperCase()+Z.substr(1)},r=function(m,Z){return(function(D,T){var S=(T=T||{}).separator||"_",F=T.split||/(?=[A-Z])/;return D.split(F).join(S)})(m,Z).toLowerCase()},a=Object.prototype.toString,B=function(m){return typeof m=="function"},c=function(m){return m===Object(m)},l=function(m){return a.call(m)=="[object Array]"},g=function(m){return a.call(m)=="[object Date]"},u=function(m){return a.call(m)=="[object RegExp]"},f=function(m){return a.call(m)=="[object Boolean]"},w=function(m){return(m-=0)==m},v=function(m,Z){var D=Z&&"process"in Z?Z.process:Z;return typeof D!="function"?m:function(T,S){return D(T,m,S)}},E={camelize:n,decamelize:r,pascalize:s,depascalize:r,camelizeKeys:function(m,Z){return t(v(n,Z),m)},decamelizeKeys:function(m,Z){return t(v(r,Z),m,Z)},pascalizeKeys:function(m,Z){return t(v(s,Z),m)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=E:A.humps=E})(VK)})).decamelize,NK=function(e){if(Array.isArray(e))return e},zK=function(e,A){if(typeof Symbol<"u"&&Symbol.iterator in Object(e)){var t=[],n=!0,s=!1,r=void 0;try{for(var a,B=e[Symbol.iterator]();!(n=(a=B.next()).done)&&(t.push(a.value),!A||t.length!==A);n=!0);}catch(c){s=!0,r=c}finally{try{n||B.return==null||B.return()}finally{if(s)throw r}}return t}},gM=function(e,A){(A==null||A>e.length)&&(A=e.length);for(var t=0,n=new Array(A);t<A;t++)n[t]=e[t];return n},LK=function(e,A){if(e){if(typeof e=="string")return gM(e,A);var t=Object.prototype.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?gM(e,A):void 0}},XK=function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
54
54
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},OK=function(e,A){return NK(e)||zK(e,A)||LK(e,A)||XK()},dM=lM((function(e){function A(){return e.exports=A=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r])}return t},A.apply(this,arguments)}e.exports=A})),JK=function(e,A){if(e==null)return{};var t,n,s={},r=Object.keys(e);for(n=0;n<r.length;n++)t=r[n],A.indexOf(t)>=0||(s[t]=e[t]);return s},uM=function(e,A){if(e==null)return{};var t,n,s=JK(e,A);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)t=r[n],A.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s},KK=R.createContext(null);function GM(e){var A=e.children,t=A===void 0?"":A,n=uM(e,["children"]);return typeof t!="string"&&(t=xK.renderToString(t)),j.createElement("template",dM({},n,{dangerouslySetInnerHTML:{__html:t}}))}function fM(e){var A=e.root,t=e.children;return VE.createPortal(t===void 0?null:t,A)}function jK(e){var A=R.forwardRef((function(t,n){var s,r,a=t.mode,B=a===void 0?"open":a,c=t.delegatesFocus,l=c!==void 0&&c,g=t.styleSheets,u=g===void 0?[]:g,f=t.ssr,w=f!==void 0&&f,v=t.children,E=uM(t,["mode","delegatesFocus","styleSheets","ssr","children"]),m=(r=R.useRef((s=n)&&s.current),R.useEffect((function(){s&&(s.current=r.current)}),[s]),r),Z=R.useState(null),D=OK(Z,2),T=D[0],S=D[1],F="node_".concat(B).concat(l);return R.useLayoutEffect((function(){if(m.current)try{if(typeof n=="function"&&n(m.current),w){var V=m.current.shadowRoot;return void S(V)}var N=m.current.attachShadow({mode:B,delegatesFocus:l});u.length>0&&(N.adoptedStyleSheets=u),S(N)}catch(X){(function(eA){var $=eA.error,rA=eA.styleSheets,iA=eA.root;if($.name==="NotSupportedError")rA.length>0&&(iA.adoptedStyleSheets=rA);else throw $})({error:X,styleSheets:u,root:T})}}),[n,m,u]),j.createElement(j.Fragment,null,j.createElement(e.tag,dM({key:F,ref:m},E),(T||w)&&j.createElement(KK.Provider,{value:T},w?j.createElement(GM,{shadowroot:B,shadowrootmode:B},e.render({root:T,ssr:w,children:v})):j.createElement(fM,{root:T},e.render({root:T,ssr:w,children:v})))))}));return A.propTypes={mode:Ae.oneOf(["open","closed"]),delegatesFocus:Ae.bool,styleSheets:Ae.arrayOf(Ae.instanceOf(globalThis.CSSStyleSheet)),ssr:Ae.bool,children:Ae.node},A}GM.propTypes={children:Ae.oneOfType([Ae.string,Ae.node])},fM.propTypes={root:Ae.object.isRequired,children:Ae.node};var LE=new Map;function _K(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"core",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(n){return n.children};return new Proxy(e,{get:function(n,s){var r=WK(s,{separator:"-"}),a="".concat(A,"-").concat(r);return LE.has(a)||LE.set(a,jK({tag:r,render:t})),LE.get(a)}})}var qK=_K();function hM(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function $K(e={}){let{initialEntries:A=["/"],initialIndex:t,v5Compat:n=!1}=e,s;s=A.map((w,v)=>g(w,typeof w=="string"?null:w.state,v===0?"default":void 0,typeof w=="string"?void 0:w.unstable_mask));let r=c(t??s.length-1),a="POP",B=null;function c(w){return Math.min(Math.max(w,0),s.length-1)}function l(){return s[r]}function g(w,v=null,E,m){let Z=ej(s?l().pathname:"/",w,v,E,m);return $B(Z.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(w)}`),Z}function u(w){return typeof w=="string"?w:oI(w)}return{get index(){return r},get action(){return a},get location(){return l()},createHref:u,createURL(w){return new URL(u(w),"http://localhost")},encodeLocation(w){let v=typeof w=="string"?iG(w):w;return{pathname:v.pathname||"",search:v.search||"",hash:v.hash||""}},push(w,v){a="PUSH";let E=hM(w)?w:g(w,v);r+=1,s.splice(r,s.length,E),n&&B&&B({action:a,location:E,delta:1})},replace(w,v){a="REPLACE";let E=hM(w)?w:g(w,v);s[r]=E,n&&B&&B({action:a,location:E,delta:0})},go(w){a="POP";let v=c(r+w),E=s[v];r=v,B&&B({action:a,location:E,delta:w})},listen(w){return B=w,()=>{B=null}}}}function As(e,A){if(e===!1||e===null||typeof e>"u")throw new Error(A)}function $B(e,A){if(!e){typeof console<"u"&&console.warn(A);try{throw new Error(A)}catch{}}}function Aj(){return Math.random().toString(36).substring(2,10)}function ej(e,A,t=null,n,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof A=="string"?iG(A):A,state:t,key:A&&A.key||n||Aj(),unstable_mask:s}}function oI({pathname:e="/",search:A="",hash:t=""}){return A&&A!=="?"&&(e+=A.charAt(0)==="?"?A:"?"+A),t&&t!=="#"&&(e+=t.charAt(0)==="#"?t:"#"+t),e}function iG(e){let A={};if(e){let t=e.indexOf("#");t>=0&&(A.hash=e.substring(t),e=e.substring(0,t));let n=e.indexOf("?");n>=0&&(A.search=e.substring(n),e=e.substring(0,n)),e&&(A.pathname=e)}return A}function wM(e,A,t="/"){return tj(e,A,t,!1)}function tj(e,A,t,n){let s=typeof A=="string"?iG(A):A,r=pl(s.pathname||"/",t);if(r==null)return null;let a=QM(e);nj(a);let B=null;for(let c=0;B==null&&c<a.length;++c){let l=uj(r);B=gj(a[c],l,n)}return B}function QM(e,A=[],t=[],n="",s=!1){let r=(a,B,c=s,l)=>{let g={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:B,route:a};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(n)&&c)return;As(g.relativePath.startsWith(n),`Absolute route path "${g.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(n.length)}let u=dc([n,g.relativePath]),f=t.concat(g);a.children&&a.children.length>0&&(As(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),QM(a.children,A,f,u,c)),!(a.path==null&&!a.index)&&A.push({path:u,score:cj(u,a.index),routesMeta:f})};return e.forEach((a,B)=>{if(a.path===""||!a.path?.includes("?"))r(a,B);else for(let c of bM(a.path))r(a,B,!0,c)}),A}function bM(e){let A=e.split("/");if(A.length===0)return[];let[t,...n]=A,s=t.endsWith("?"),r=t.replace(/\?$/,"");if(n.length===0)return s?[r,""]:[r];let a=bM(n.join("/")),B=[];return B.push(...a.map(c=>c===""?r:[r,c].join("/"))),s&&B.push(...a),B.map(c=>e.startsWith("/")&&c===""?"/":c)}function nj(e){e.sort((A,t)=>A.score!==t.score?t.score-A.score:lj(A.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}var sj=/^:[\w-]+$/,rj=3,aj=2,ij=1,Bj=10,oj=-2,CM=e=>e==="*";function cj(e,A){let t=e.split("/"),n=t.length;return t.some(CM)&&(n+=oj),A&&(n+=aj),t.filter(s=>!CM(s)).reduce((s,r)=>s+(sj.test(r)?rj:r===""?ij:Bj),n)}function lj(e,A){return e.length===A.length&&e.slice(0,-1).every((n,s)=>n===A[s])?e[e.length-1]-A[A.length-1]:0}function gj(e,A,t=!1){let{routesMeta:n}=e,s={},r="/",a=[];for(let B=0;B<n.length;++B){let c=n[B],l=B===n.length-1,g=r==="/"?A:A.slice(r.length)||"/",u=cI({path:c.relativePath,caseSensitive:c.caseSensitive,end:l},g),f=c.route;if(!u&&l&&t&&!n[n.length-1].route.index&&(u=cI({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},g)),!u)return null;Object.assign(s,u.params),a.push({params:s,pathname:dc([r,u.pathname]),pathnameBase:wj(dc([r,u.pathnameBase])),route:f}),u.pathnameBase!=="/"&&(r=dc([r,u.pathnameBase]))}return a}function cI(e,A){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[t,n]=dj(e.path,e.caseSensitive,e.end),s=A.match(t);if(!s)return null;let r=s[0],a=r.replace(/(.)\/+$/,"$1"),B=s.slice(1);return{params:n.reduce((l,{paramName:g,isOptional:u},f)=>{if(g==="*"){let v=B[f]||"";a=r.slice(0,r.length-v.length).replace(/(.)\/+$/,"$1")}const w=B[f];return u&&!w?l[g]=void 0:l[g]=(w||"").replace(/%2F/g,"/"),l},{}),pathname:r,pathnameBase:a,pattern:e}}function dj(e,A=!1,t=!0){$B(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,B,c,l,g)=>{if(n.push({paramName:B,isOptional:c!=null}),c){let u=g.charAt(l+a.length);return u&&u!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,A?void 0:"i"),n]}function uj(e){try{return e.split("/").map(A=>decodeURIComponent(A).replace(/\//g,"%2F")).join("/")}catch(A){return $B(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${A}).`),e}}function pl(e,A){if(A==="/")return e;if(!e.toLowerCase().startsWith(A.toLowerCase()))return null;let t=A.endsWith("/")?A.length-1:A.length,n=e.charAt(t);return n&&n!=="/"?null:e.slice(t)||"/"}var Gj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function fj(e,A="/"){let{pathname:t,search:n="",hash:s=""}=typeof e=="string"?iG(e):e,r;return t?(t=t.replace(/\/\/+/g,"/"),t.startsWith("/")?r=vM(t.substring(1),"/"):r=vM(t,A)):r=A,{pathname:r,search:Qj(n),hash:bj(s)}}function vM(e,A){let t=A.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?t.length>1&&t.pop():s!=="."&&t.push(s)}),t.length>1?t.join("/"):"/"}function XE(e,A,t,n){return`Cannot include a '${e}' character in a manually specified \`to.${A}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function hj(e){return e.filter((A,t)=>t===0||A.route.path&&A.route.path.length>0)}function IM(e){let A=hj(e);return A.map((t,n)=>n===A.length-1?t.pathname:t.pathnameBase)}function OE(e,A,t,n=!1){let s;typeof e=="string"?s=iG(e):(s={...e},As(!s.pathname||!s.pathname.includes("?"),XE("?","pathname","search",s)),As(!s.pathname||!s.pathname.includes("#"),XE("#","pathname","hash",s)),As(!s.search||!s.search.includes("#"),XE("#","search","hash",s)));let r=e===""||s.pathname==="",a=r?"/":s.pathname,B;if(a==null)B=t;else{let u=A.length-1;if(!n&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),u-=1;s.pathname=f.join("/")}B=u>=0?A[u]:"/"}let c=fj(s,B),l=a&&a!=="/"&&a.endsWith("/"),g=(r||a===".")&&t.endsWith("/");return!c.pathname.endsWith("/")&&(l||g)&&(c.pathname+="/"),c}var dc=e=>e.join("/").replace(/\/\/+/g,"/"),wj=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Qj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bj=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Cj=class{constructor(e,A,t,n=!1){this.status=e,this.statusText=A||"",this.internal=n,t instanceof Error?(this.data=t.toString(),this.error=t):this.data=t}};function vj(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Ij(e){return e.map(A=>A.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var pM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function HM(e,A){let t=e;if(typeof t!="string"||!Gj.test(t))return{absoluteURL:void 0,isExternal:!1,to:t};let n=t,s=!1;if(pM)try{let r=new URL(window.location.href),a=t.startsWith("//")?new URL(r.protocol+t):new URL(t),B=pl(a.pathname,A);a.origin===r.origin&&B!=null?t=B+a.search+a.hash:s=!0}catch{$B(!1,`<Link to="${t}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:s,to:t}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var mM=["POST","PUT","PATCH","DELETE"];new Set(mM);var pj=["GET",...mM];new Set(pj);var gh=R.createContext(null);gh.displayName="DataRouter";var lI=R.createContext(null);lI.displayName="DataRouterState";var EM=R.createContext(!1);function Hj(){return R.useContext(EM)}var yM=R.createContext({isTransitioning:!1});yM.displayName="ViewTransition";var mj=R.createContext(new Map);mj.displayName="Fetchers";var Ej=R.createContext(null);Ej.displayName="Await";var cB=R.createContext(null);cB.displayName="Navigation";var ZQ=R.createContext(null);ZQ.displayName="Location";var Hl=R.createContext({outlet:null,matches:[],isDataRoute:!1});Hl.displayName="Route";var JE=R.createContext(null);JE.displayName="RouteError";var YM="REACT_ROUTER_ERROR",yj="REDIRECT",Yj="ROUTE_ERROR_RESPONSE";function Zj(e){if(e.startsWith(`${YM}:${yj}:{`))try{let A=JSON.parse(e.slice(28));if(typeof A=="object"&&A&&typeof A.status=="number"&&typeof A.statusText=="string"&&typeof A.location=="string"&&typeof A.reloadDocument=="boolean"&&typeof A.replace=="boolean")return A}catch{}}function kj(e){if(e.startsWith(`${YM}:${Yj}:{`))try{let A=JSON.parse(e.slice(40));if(typeof A=="object"&&A&&typeof A.status=="number"&&typeof A.statusText=="string")return new Cj(A.status,A.statusText,A.data)}catch{}}function Uj(e,{relative:A}={}){As(kQ(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:n}=R.useContext(cB),{hash:s,pathname:r,search:a}=UQ(e,{relative:A}),B=r;return t!=="/"&&(B=r==="/"?t:dc([t,r])),n.createHref({pathname:B,search:a,hash:s})}function kQ(){return R.useContext(ZQ)!=null}function Ao(){return As(kQ(),"useLocation() may be used only in the context of a <Router> component."),R.useContext(ZQ).location}var ZM="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function kM(e){R.useContext(cB).static||R.useLayoutEffect(e)}function za(){let{isDataRoute:e}=R.useContext(Hl);return e?Lj():Dj()}function Dj(){As(kQ(),"useNavigate() may be used only in the context of a <Router> component.");let e=R.useContext(gh),{basename:A,navigator:t}=R.useContext(cB),{matches:n}=R.useContext(Hl),{pathname:s}=Ao(),r=JSON.stringify(IM(n)),a=R.useRef(!1);return kM(()=>{a.current=!0}),R.useCallback((c,l={})=>{if($B(a.current,ZM),!a.current)return;if(typeof c=="number"){t.go(c);return}let g=OE(c,JSON.parse(r),s,l.relative==="path");e==null&&A!=="/"&&(g.pathname=g.pathname==="/"?A:dc([A,g.pathname])),(l.replace?t.replace:t.push)(g,l.state,l)},[A,t,r,s,e])}R.createContext(null);function UQ(e,{relative:A}={}){let{matches:t}=R.useContext(Hl),{pathname:n}=Ao(),s=JSON.stringify(IM(t));return R.useMemo(()=>OE(e,JSON.parse(s),n,A==="path"),[e,s,n,A])}function Fj(e,A){return UM(e,A)}function UM(e,A,t){As(kQ(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=R.useContext(cB),{matches:s}=R.useContext(Hl),r=s[s.length-1],a=r?r.params:{},B=r?r.pathname:"/",c=r?r.pathnameBase:"/",l=r&&r.route;{let m=l&&l.path||"";MM(B,!l||m.endsWith("*")||m.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${B}" (under <Route path="${m}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
55
55
 
56
- Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}/*`}">.`)}let g=Ao(),u;if(A){let m=typeof A=="string"?iG(A):A;As(c==="/"||m.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${m.pathname}" was given in the \`location\` prop.`),u=m}else u=g;let f=u.pathname||"/",w=f;if(c!=="/"){let m=c.replace(/^\//,"").split("/");w="/"+f.replace(/^\//,"").split("/").slice(m.length).join("/")}let v=wM(e,{pathname:w});$B(l||v!=null,`No routes matched location "${u.pathname}${u.search}${u.hash}" `),$B(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${u.pathname}${u.search}${u.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=Rj(v&&v.map(m=>Object.assign({},m,{params:Object.assign({},a,m.params),pathname:dc([c,n.encodeLocation?n.encodeLocation(m.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?c:dc([c,n.encodeLocation?n.encodeLocation(m.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),s,t);return A&&E?R.createElement(ZQ.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...u},navigationType:"POP"}},E):E}function Mj(){let e=zj(),A=vj(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),t=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:n},r={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=R.createElement(R.Fragment,null,R.createElement("p",null,"💿 Hey developer 👋"),R.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",R.createElement("code",{style:r},"ErrorBoundary")," or"," ",R.createElement("code",{style:r},"errorElement")," prop on your route.")),R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},A),t?R.createElement("pre",{style:s},t):null,a)}var xj=R.createElement(Mj,null),DM=class extends R.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,A){return A.location!==e.location||A.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:A.error,location:A.location,revalidation:e.revalidation||A.revalidation}}componentDidCatch(e,A){this.props.onError?this.props.onError(e,A):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const t=kj(e.digest);t&&(e=t)}let A=e!==void 0?R.createElement(Hl.Provider,{value:this.props.routeContext},R.createElement(JE.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?R.createElement(Pj,{error:e},A):A}};DM.contextType=EM;var KE=new WeakMap;function Pj({children:e,error:A}){let{basename:t}=R.useContext(cB);if(typeof A=="object"&&A&&"digest"in A&&typeof A.digest=="string"){let n=Zj(A.digest);if(n){let s=KE.get(A);if(s)throw s;let r=HM(n.location,t);if(pM&&!KE.get(A))if(r.isExternal||n.reloadDocument)window.location.href=r.absoluteURL||r.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(r.to,{replace:n.replace}));throw KE.set(A,a),a}return R.createElement("meta",{httpEquiv:"refresh",content:`0;url=${r.absoluteURL||r.to}`})}}return e}function Tj({routeContext:e,match:A,children:t}){let n=R.useContext(gh);return n&&n.static&&n.staticContext&&(A.route.errorElement||A.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=A.route.id),R.createElement(Hl.Provider,{value:e},t)}function Rj(e,A=[],t){let n=t?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(A.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,r=n?.errors;if(r!=null){let g=s.findIndex(u=>u.route.id&&r?.[u.route.id]!==void 0);As(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(r).join(",")}`),s=s.slice(0,Math.min(s.length,g+1))}let a=!1,B=-1;if(t&&n){a=n.renderFallback;for(let g=0;g<s.length;g++){let u=s[g];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(B=g),u.route.id){let{loaderData:f,errors:w}=n,v=u.route.loader&&!f.hasOwnProperty(u.route.id)&&(!w||w[u.route.id]===void 0);if(u.route.lazy||v){t.isStatic&&(a=!0),B>=0?s=s.slice(0,B+1):s=[s[0]];break}}}}let c=t?.onError,l=n&&c?(g,u)=>{c(g,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Ij(n.matches),errorInfo:u})}:void 0;return s.reduceRight((g,u,f)=>{let w,v=!1,E=null,m=null;n&&(w=r&&u.route.id?r[u.route.id]:void 0,E=u.route.errorElement||xj,a&&(B<0&&f===0?(MM("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,m=null):B===f&&(v=!0,m=u.route.hydrateFallbackElement||null)));let Z=A.concat(s.slice(0,f+1)),D=()=>{let T;return w?T=E:v?T=m:u.route.Component?T=R.createElement(u.route.Component,null):u.route.element?T=u.route.element:T=g,R.createElement(Tj,{match:u,routeContext:{outlet:g,matches:Z,isDataRoute:n!=null},children:T})};return n&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?R.createElement(DM,{location:n.location,revalidation:n.revalidation,component:E,error:w,children:D(),routeContext:{outlet:null,matches:Z,isDataRoute:!0},onError:l}):D()},null)}function jE(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Sj(e){let A=R.useContext(gh);return As(A,jE(e)),A}function Vj(e){let A=R.useContext(lI);return As(A,jE(e)),A}function Wj(e){let A=R.useContext(Hl);return As(A,jE(e)),A}function _E(e){let A=Wj(e),t=A.matches[A.matches.length-1];return As(t.route.id,`${e} can only be used on routes that contain a unique "id"`),t.route.id}function Nj(){return _E("useRouteId")}function zj(){let e=R.useContext(JE),A=Vj("useRouteError"),t=_E("useRouteError");return e!==void 0?e:A.errors?.[t]}function Lj(){let{router:e}=Sj("useNavigate"),A=_E("useNavigate"),t=R.useRef(!1);return kM(()=>{t.current=!0}),R.useCallback(async(s,r={})=>{$B(t.current,ZM),t.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:A,...r}))},[e,A])}var FM={};function MM(e,A,t){!A&&!FM[e]&&(FM[e]=!0,$B(!1,t))}R.memo(Xj);function Xj({routes:e,future:A,state:t,isStatic:n,onError:s}){return UM(e,void 0,{state:t,isStatic:n,onError:s})}function Oj({basename:e,children:A,initialEntries:t,initialIndex:n,unstable_useTransitions:s}){let r=R.useRef();r.current==null&&(r.current=$K({initialEntries:t,initialIndex:n,v5Compat:!0}));let a=r.current,[B,c]=R.useState({action:a.action,location:a.location}),l=R.useCallback(g=>{s===!1?c(g):R.startTransition(()=>c(g))},[s]);return R.useLayoutEffect(()=>a.listen(l),[a,l]),R.createElement(Jj,{basename:e,children:A,location:B.location,navigationType:B.action,navigator:a,unstable_useTransitions:s})}function uc(e){As(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Jj({basename:e="/",children:A=null,location:t,navigationType:n="POP",navigator:s,static:r=!1,unstable_useTransitions:a}){As(!kQ(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let B=e.replace(/^\/*/,"/"),c=R.useMemo(()=>({basename:B,navigator:s,static:r,unstable_useTransitions:a,future:{}}),[B,s,r,a]);typeof t=="string"&&(t=iG(t));let{pathname:l="/",search:g="",hash:u="",state:f=null,key:w="default",unstable_mask:v}=t,E=R.useMemo(()=>{let m=pl(l,B);return m==null?null:{location:{pathname:m,search:g,hash:u,state:f,key:w,unstable_mask:v},navigationType:n}},[B,l,g,u,f,w,n,v]);return $B(E!=null,`<Router basename="${B}"> is not able to match the URL "${l}${g}${u}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:R.createElement(cB.Provider,{value:c},R.createElement(ZQ.Provider,{children:A,value:E}))}function Kj({children:e,location:A}){return Fj(qE(e),A)}function qE(e,A=[]){let t=[];return R.Children.forEach(e,(n,s)=>{if(!R.isValidElement(n))return;let r=[...A,s];if(n.type===R.Fragment){t.push.apply(t,qE(n.props.children,r));return}As(n.type===uc,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),As(!n.props.index||!n.props.children,"An index route cannot have child routes.");let a={id:n.props.id||r.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=qE(n.props.children,r)),t.push(a)}),t}var gI="get",dI="application/x-www-form-urlencoded";function uI(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function jj(e){return uI(e)&&e.tagName.toLowerCase()==="button"}function _j(e){return uI(e)&&e.tagName.toLowerCase()==="form"}function qj(e){return uI(e)&&e.tagName.toLowerCase()==="input"}function $j(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function A_(e,A){return e.button===0&&(!A||A==="_self")&&!$j(e)}var GI=null;function e_(){if(GI===null)try{new FormData(document.createElement("form"),0),GI=!1}catch{GI=!0}return GI}var t_=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $E(e){return e!=null&&!t_.has(e)?($B(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${dI}"`),null):e}function n_(e,A){let t,n,s,r,a;if(_j(e)){let B=e.getAttribute("action");n=B?pl(B,A):null,t=e.getAttribute("method")||gI,s=$E(e.getAttribute("enctype"))||dI,r=new FormData(e)}else if(jj(e)||qj(e)&&(e.type==="submit"||e.type==="image")){let B=e.form;if(B==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||B.getAttribute("action");if(n=c?pl(c,A):null,t=e.getAttribute("formmethod")||B.getAttribute("method")||gI,s=$E(e.getAttribute("formenctype"))||$E(B.getAttribute("enctype"))||dI,r=new FormData(B,e),!e_()){let{name:l,type:g,value:u}=e;if(g==="image"){let f=l?`${l}.`:"";r.append(`${f}x`,"0"),r.append(`${f}y`,"0")}else l&&r.append(l,u)}}else{if(uI(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=gI,n=null,s=dI,a=e}return r&&s==="text/plain"&&(a=r,r=void 0),{action:n,method:t.toLowerCase(),encType:s,formData:r,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ay(e,A){if(e===!1||e===null||typeof e>"u")throw new Error(A)}function xM(e,A,t,n){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${n}`:s.pathname=`${s.pathname}.${n}`:s.pathname==="/"?s.pathname=`_root.${n}`:A&&pl(s.pathname,A)==="/"?s.pathname=`${A.replace(/\/$/,"")}/_root.${n}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${n}`,s}async function s_(e,A){if(e.id in A)return A[e.id];try{let t=await import(e.module);return A[e.id]=t,t}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function r_(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function a_(e,A,t){let n=await Promise.all(e.map(async s=>{let r=A.routes[s.route.id];if(r){let a=await s_(r,t);return a.links?a.links():[]}return[]}));return c_(n.flat(1).filter(r_).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function PM(e,A,t,n,s,r){let a=(c,l)=>t[l]?c.route.id!==t[l].route.id:!0,B=(c,l)=>t[l].pathname!==c.pathname||t[l].route.path?.endsWith("*")&&t[l].params["*"]!==c.params["*"];return r==="assets"?A.filter((c,l)=>a(c,l)||B(c,l)):r==="data"?A.filter((c,l)=>{let g=n.routes[c.route.id];if(!g||!g.hasLoader)return!1;if(a(c,l)||B(c,l))return!0;if(c.route.shouldRevalidate){let u=c.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof u=="boolean")return u}return!0}):[]}function i_(e,A,{includeHydrateFallback:t}={}){return B_(e.map(n=>{let s=A.routes[n.route.id];if(!s)return[];let r=[s.module];return s.clientActionModule&&(r=r.concat(s.clientActionModule)),s.clientLoaderModule&&(r=r.concat(s.clientLoaderModule)),t&&s.hydrateFallbackModule&&(r=r.concat(s.hydrateFallbackModule)),s.imports&&(r=r.concat(s.imports)),r}).flat(1))}function B_(e){return[...new Set(e)]}function o_(e){let A={},t=Object.keys(e).sort();for(let n of t)A[n]=e[n];return A}function c_(e,A){let t=new Set;return new Set(A),e.reduce((n,s)=>{let r=JSON.stringify(o_(s));return t.has(r)||(t.add(r),n.push({key:r,link:s})),n},[])}function ey(){let e=R.useContext(gh);return Ay(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function l_(){let e=R.useContext(lI);return Ay(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ty=R.createContext(void 0);ty.displayName="FrameworkContext";function ny(){let e=R.useContext(ty);return Ay(e,"You must render this element inside a <HydratedRouter> element"),e}function g_(e,A){let t=R.useContext(ty),[n,s]=R.useState(!1),[r,a]=R.useState(!1),{onFocus:B,onBlur:c,onMouseEnter:l,onMouseLeave:g,onTouchStart:u}=A,f=R.useRef(null);R.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let E=Z=>{Z.forEach(D=>{a(D.isIntersecting)})},m=new IntersectionObserver(E,{threshold:.5});return f.current&&m.observe(f.current),()=>{m.disconnect()}}},[e]),R.useEffect(()=>{if(n){let E=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(E)}}},[n]);let w=()=>{s(!0)},v=()=>{s(!1),a(!1)};return t?e!=="intent"?[r,f,{}]:[r,f,{onFocus:DQ(B,w),onBlur:DQ(c,v),onMouseEnter:DQ(l,w),onMouseLeave:DQ(g,v),onTouchStart:DQ(u,w)}]:[!1,f,{}]}function DQ(e,A){return t=>{e&&e(t),t.defaultPrevented||A(t)}}function d_({page:e,...A}){let t=Hj(),{router:n}=ey(),s=R.useMemo(()=>wM(n.routes,e,n.basename),[n.routes,e,n.basename]);return s?t?R.createElement(G_,{page:e,matches:s,...A}):R.createElement(f_,{page:e,matches:s,...A}):null}function u_(e){let{manifest:A,routeModules:t}=ny(),[n,s]=R.useState([]);return R.useEffect(()=>{let r=!1;return a_(e,A,t).then(a=>{r||s(a)}),()=>{r=!0}},[e,A,t]),n}function G_({page:e,matches:A,...t}){let n=Ao(),{future:s}=ny(),{basename:r}=ey(),a=R.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let B=xM(e,r,s.unstable_trailingSlashAwareDataRequests,"rsc"),c=!1,l=[];for(let g of A)typeof g.route.shouldRevalidate=="function"?c=!0:l.push(g.route.id);return c&&l.length>0&&B.searchParams.set("_routes",l.join(",")),[B.pathname+B.search]},[r,s.unstable_trailingSlashAwareDataRequests,e,n,A]);return R.createElement(R.Fragment,null,a.map(B=>R.createElement("link",{key:B,rel:"prefetch",as:"fetch",href:B,...t})))}function f_({page:e,matches:A,...t}){let n=Ao(),{future:s,manifest:r,routeModules:a}=ny(),{basename:B}=ey(),{loaderData:c,matches:l}=l_(),g=R.useMemo(()=>PM(e,A,l,r,n,"data"),[e,A,l,r,n]),u=R.useMemo(()=>PM(e,A,l,r,n,"assets"),[e,A,l,r,n]),f=R.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let E=new Set,m=!1;if(A.forEach(D=>{let T=r.routes[D.route.id];!T||!T.hasLoader||(!g.some(S=>S.route.id===D.route.id)&&D.route.id in c&&a[D.route.id]?.shouldRevalidate||T.hasClientLoader?m=!0:E.add(D.route.id))}),E.size===0)return[];let Z=xM(e,B,s.unstable_trailingSlashAwareDataRequests,"data");return m&&E.size>0&&Z.searchParams.set("_routes",A.filter(D=>E.has(D.route.id)).map(D=>D.route.id).join(",")),[Z.pathname+Z.search]},[B,s.unstable_trailingSlashAwareDataRequests,c,n,r,g,A,e,a]),w=R.useMemo(()=>i_(u,r),[u,r]),v=u_(u);return R.createElement(R.Fragment,null,f.map(E=>R.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...t})),w.map(E=>R.createElement("link",{key:E,rel:"modulepreload",href:E,...t})),v.map(({key:E,link:m})=>R.createElement("link",{key:E,nonce:t.nonce,...m,crossOrigin:m.crossOrigin??t.crossOrigin})))}function h_(...e){return A=>{e.forEach(t=>{typeof t=="function"?t(A):t!=null&&(t.current=A)})}}var w_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{w_&&(window.__reactRouterVersion="7.14.0")}catch{}var TM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fI=R.forwardRef(function({onClick:A,discover:t="render",prefetch:n="none",relative:s,reloadDocument:r,replace:a,unstable_mask:B,state:c,target:l,to:g,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:w,...v},E){let{basename:m,navigator:Z,unstable_useTransitions:D}=R.useContext(cB),T=typeof g=="string"&&TM.test(g),S=HM(g,m);g=S.to;let F=Uj(g,{relative:s}),V=Ao(),N=null;if(B){let yA=OE(B,[],V.unstable_mask?V.unstable_mask.pathname:"/",!0);m!=="/"&&(yA.pathname=yA.pathname==="/"?m:dc([m,yA.pathname])),N=Z.createHref(yA)}let[X,eA,$]=g_(n,v),rA=v_(g,{replace:a,unstable_mask:B,state:c,target:l,preventScrollReset:u,relative:s,viewTransition:f,unstable_defaultShouldRevalidate:w,unstable_useTransitions:D});function iA(yA){A&&A(yA),yA.defaultPrevented||rA(yA)}let hA=!(S.isExternal||r),fA=R.createElement("a",{...v,...$,href:(hA?N:void 0)||S.absoluteURL||F,onClick:hA?iA:A,ref:h_(E,eA),target:l,"data-discover":!T&&t==="render"?"true":void 0});return X&&!T?R.createElement(R.Fragment,null,fA,R.createElement(d_,{page:F})):fA});fI.displayName="Link";var Q_=R.forwardRef(function({"aria-current":A="page",caseSensitive:t=!1,className:n="",end:s=!1,style:r,to:a,viewTransition:B,children:c,...l},g){let u=UQ(a,{relative:l.relative}),f=Ao(),w=R.useContext(lI),{navigator:v,basename:E}=R.useContext(cB),m=w!=null&&E_(u)&&B===!0,Z=v.encodeLocation?v.encodeLocation(u).pathname:u.pathname,D=f.pathname,T=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;t||(D=D.toLowerCase(),T=T?T.toLowerCase():null,Z=Z.toLowerCase()),T&&E&&(T=pl(T,E)||T);const S=Z!=="/"&&Z.endsWith("/")?Z.length-1:Z.length;let F=D===Z||!s&&D.startsWith(Z)&&D.charAt(S)==="/",V=T!=null&&(T===Z||!s&&T.startsWith(Z)&&T.charAt(Z.length)==="/"),N={isActive:F,isPending:V,isTransitioning:m},X=F?A:void 0,eA;typeof n=="function"?eA=n(N):eA=[n,F?"active":null,V?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let $=typeof r=="function"?r(N):r;return R.createElement(fI,{...l,"aria-current":X,className:eA,ref:g,style:$,to:a,viewTransition:B},typeof c=="function"?c(N):c)});Q_.displayName="NavLink";var b_=R.forwardRef(({discover:e="render",fetcherKey:A,navigate:t,reloadDocument:n,replace:s,state:r,method:a=gI,action:B,onSubmit:c,relative:l,preventScrollReset:g,viewTransition:u,unstable_defaultShouldRevalidate:f,...w},v)=>{let{unstable_useTransitions:E}=R.useContext(cB),m=H_(),Z=m_(B,{relative:l}),D=a.toLowerCase()==="get"?"get":"post",T=typeof B=="string"&&TM.test(B),S=F=>{if(c&&c(F),F.defaultPrevented)return;F.preventDefault();let V=F.nativeEvent.submitter,N=V?.getAttribute("formmethod")||a,X=()=>m(V||F.currentTarget,{fetcherKey:A,method:N,navigate:t,replace:s,state:r,relative:l,preventScrollReset:g,viewTransition:u,unstable_defaultShouldRevalidate:f});E&&t!==!1?R.startTransition(()=>X()):X()};return R.createElement("form",{ref:v,method:D,action:Z,onSubmit:n?c:S,...w,"data-discover":!T&&e==="render"?"true":void 0})});b_.displayName="Form";function C_(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function RM(e){let A=R.useContext(gh);return As(A,C_(e)),A}function v_(e,{target:A,replace:t,unstable_mask:n,state:s,preventScrollReset:r,relative:a,viewTransition:B,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let g=za(),u=Ao(),f=UQ(e,{relative:a});return R.useCallback(w=>{if(A_(w,A)){w.preventDefault();let v=t!==void 0?t:oI(u)===oI(f),E=()=>g(e,{replace:v,unstable_mask:n,state:s,preventScrollReset:r,relative:a,viewTransition:B,unstable_defaultShouldRevalidate:c});l?R.startTransition(()=>E()):E()}},[u,g,f,t,n,s,A,e,r,a,B,c,l])}var I_=0,p_=()=>`__${String(++I_)}__`;function H_(){let{router:e}=RM("useSubmit"),{basename:A}=R.useContext(cB),t=Nj(),n=e.fetch,s=e.navigate;return R.useCallback(async(r,a={})=>{let{action:B,method:c,encType:l,formData:g,body:u}=n_(r,A);if(a.navigate===!1){let f=a.fetcherKey||p_();await n(f,t,a.action||B,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:g,body:u,formMethod:a.method||c,formEncType:a.encType||l,flushSync:a.flushSync})}else await s(a.action||B,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:g,body:u,formMethod:a.method||c,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:t,flushSync:a.flushSync,viewTransition:a.viewTransition})},[n,s,A,t])}function m_(e,{relative:A}={}){let{basename:t}=R.useContext(cB),n=R.useContext(Hl);As(n,"useFormAction must be used inside a RouteContext");let[s]=n.matches.slice(-1),r={...UQ(e||".",{relative:A})},a=Ao();if(e==null){r.search=a.search;let B=new URLSearchParams(r.search),c=B.getAll("index");if(c.some(g=>g==="")){B.delete("index"),c.filter(u=>u).forEach(u=>B.append("index",u));let g=B.toString();r.search=g?`?${g}`:""}}return(!e||e===".")&&s.route.index&&(r.search=r.search?r.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(r.pathname=r.pathname==="/"?t:dc([t,r.pathname])),oI(r)}function E_(e,{relative:A}={}){let t=R.useContext(yM);As(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=RM("useViewTransitionState"),s=UQ(e,{relative:A});if(!t.isTransitioning)return!1;let r=pl(t.currentLocation.pathname,n)||t.currentLocation.pathname,a=pl(t.nextLocation.pathname,n)||t.nextLocation.pathname;return cI(s.pathname,a)!=null||cI(s.pathname,r)!=null}const sy="ela@careshiphealth.com",BG="https://ela.careshiphealth.com",hI="https://api.ela.careshiphealth.com",wI=`${hI}/rt`,ry=420,FQ=540,y_=520,eo={FACE_LG_ICON:`${BG}/bolt/faceLg.svg`,AI_ASSISTANT_TALK_ICON:`${BG}/bolt/new/ai-assistant-talk-icon.svg`,AI_ASSISTANT_CHAT_ICON:`${BG}/bolt/new/ai-assistant-chat-icon.svg`,AI_ASSISTANT__CALL_ICON:`${BG}/bolt/new/ai-assistant-call-icon.svg`,AI_ASSISTANT_ICON_BW:`${BG}/bolt/new/ai-assistant-icon-bw.svg`,MINIMIZE_ICON:`${BG}/bolt/new/minimize-icon.svg`,MAXIMIZE_ICON:`${BG}/bolt/new/maximize-icon.svg`},ay="Ela",Y_=e=>p.jsxs("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("path",{d:"M14.788 9.48971C14.5248 9.05746 14.1061 8.74231 13.6179 8.60892C13.1297 8.47552 12.609 8.53399 12.1625 8.77233C10.0479 9.9113 8.85588 12.1545 9.63525 14.3233C10.5054 16.7288 11.8175 18.9504 13.5041 20.8736C15.178 22.7934 17.1908 24.3887 19.4421 25.5799C21.4658 26.6469 23.8375 25.7746 25.2439 23.8137C25.5398 23.4011 25.6681 22.8917 25.603 22.3882C25.538 21.8848 25.2843 21.4247 24.8933 21.1009L23.3591 19.8338C23.0516 19.5788 22.6745 19.4221 22.2768 19.384C21.8791 19.346 21.4792 19.4283 21.1288 19.6203L18.456 21.0859L17.857 20.6704C17.1019 20.1437 16.411 19.5305 15.7985 18.8432C15.1987 18.1437 14.6865 17.3736 14.2732 16.55L13.9463 15.9052L15.7449 13.4461C15.9827 13.1198 16.1177 12.73 16.1327 12.3265C16.1477 11.923 16.042 11.5243 15.829 11.1813L14.788 9.48971ZM11.0452 6.69431C12.0219 6.171 13.1616 6.041 14.231 6.33095C15.3004 6.6209 16.2184 7.30884 16.797 8.2538L17.8352 9.94349C18.2934 10.6853 18.5203 11.5468 18.4868 12.4181C18.4533 13.2893 18.161 14.1309 17.6471 14.8353L16.7193 16.1029C16.9446 16.4768 17.2323 16.8985 17.575 17.2949C17.9164 17.6843 18.2917 18.0262 18.6269 18.299L19.9935 17.5482C20.7578 17.1299 21.63 16.9506 22.4973 17.0335C23.3646 17.1164 24.1871 17.4578 24.8582 18.0133L26.3925 19.2804C27.2451 19.9846 27.7986 20.9863 27.9411 22.0829C28.0836 23.1796 27.8044 24.2894 27.1601 25.1881C25.2861 27.8016 21.707 29.439 18.3439 27.665C15.8368 26.3392 13.5952 24.5633 11.7308 22.4261C9.84914 20.2812 8.38523 17.8032 7.41459 15.1201C6.13111 11.5432 8.22187 8.21369 11.0457 6.69662",fill:e?.color||"black"}),p.jsx("path",{d:"M25.026 11.6502L25.3027 11.0139C25.7888 9.88815 26.6795 8.9853 27.7991 8.48354L28.6541 8.10358C28.7574 8.05583 28.8449 7.97955 28.9061 7.88374C28.9674 7.78793 29 7.67659 29 7.56288C29 7.44918 28.9674 7.33784 28.9061 7.24203C28.8449 7.14622 28.7574 7.06993 28.6541 7.02218L27.8464 6.66247C26.6986 6.14642 25.7927 5.21019 25.3151 4.04664L25.0305 3.36093C24.9887 3.25454 24.9158 3.1632 24.8213 3.09882C24.7267 3.03444 24.615 3 24.5006 3C24.3862 3 24.2745 3.03444 24.18 3.09882C24.0854 3.1632 24.0125 3.25454 23.9707 3.36093L23.6861 4.04777C23.208 5.2111 22.3017 6.14692 21.1537 6.66247L20.3471 7.02106C20.2435 7.06867 20.1557 7.14497 20.0942 7.2409C20.0327 7.33684 20 7.44838 20 7.56232C20 7.67626 20.0327 7.78781 20.0942 7.88374C20.1557 7.97967 20.2435 8.05597 20.3471 8.10358L21.201 8.48466C22.3208 8.98593 23.2119 9.88837 23.6985 11.0139L23.9752 11.6502C24.0185 11.7538 24.0914 11.8423 24.1849 11.9045C24.2784 11.9668 24.3883 12 24.5006 12C24.613 12 24.7228 11.9668 24.8163 11.9045C24.9098 11.8423 24.9827 11.7538 25.026 11.6502Z",fill:e?.color||"black"})]}),iy=R.createContext({});function QI(e){const A=R.useRef(null);return A.current===null&&(A.current=e()),A.current}const By=typeof window<"u"?R.useLayoutEffect:R.useEffect,bI=R.createContext(null);function oy(e,A){e.indexOf(A)===-1&&e.push(A)}function CI(e,A){const t=e.indexOf(A);t>-1&&e.splice(t,1)}const Gc=(e,A,t)=>t>A?A:t<e?e:t;let cy=()=>{};const Ad={},SM=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function VM(e){return typeof e=="object"&&e!==null}const WM=e=>/^0[^.\s]+$/u.test(e);function NM(e){let A;return()=>(A===void 0&&(A=e()),A)}const lB=e=>e,Z_=(e,A)=>t=>A(e(t)),MQ=(...e)=>e.reduce(Z_),xQ=(e,A,t)=>{const n=A-e;return n===0?1:(t-e)/n};class ly{constructor(){this.subscriptions=[]}add(A){return oy(this.subscriptions,A),()=>CI(this.subscriptions,A)}notify(A,t,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](A,t,n);else for(let r=0;r<s;r++){const a=this.subscriptions[r];a&&a(A,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Hi=e=>e*1e3,gB=e=>e/1e3;function zM(e,A){return A?e*(1e3/A):0}const LM=(e,A,t)=>(((1-3*t+3*A)*e+(3*t-6*A))*e+3*A)*e,k_=1e-7,U_=12;function D_(e,A,t,n,s){let r,a,B=0;do a=A+(t-A)/2,r=LM(a,n,s)-e,r>0?t=a:A=a;while(Math.abs(r)>k_&&++B<U_);return a}function PQ(e,A,t,n){if(e===A&&t===n)return lB;const s=r=>D_(r,0,1,e,t);return r=>r===0||r===1?r:LM(s(r),A,n)}const XM=e=>A=>A<=.5?e(2*A)/2:(2-e(2*(1-A)))/2,OM=e=>A=>1-e(1-A),JM=PQ(.33,1.53,.69,.99),gy=OM(JM),KM=XM(gy),jM=e=>e>=1?1:(e*=2)<1?.5*gy(e):.5*(2-Math.pow(2,-10*(e-1))),dy=e=>1-Math.sin(Math.acos(e)),_M=OM(dy),qM=XM(dy),F_=PQ(.42,0,1,1),M_=PQ(0,0,.58,1),$M=PQ(.42,0,.58,1),x_=e=>Array.isArray(e)&&typeof e[0]!="number",Ax=e=>Array.isArray(e)&&typeof e[0]=="number",P_={linear:lB,easeIn:F_,easeInOut:$M,easeOut:M_,circIn:dy,circInOut:qM,circOut:_M,backIn:gy,backInOut:KM,backOut:JM,anticipate:jM},T_=e=>typeof e=="string",ex=e=>{if(Ax(e)){cy(e.length===4);const[A,t,n,s]=e;return PQ(A,t,n,s)}else if(T_(e))return P_[e];return e},vI=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function R_(e,A){let t=new Set,n=new Set,s=!1,r=!1;const a=new WeakSet;let B={delta:0,timestamp:0,isProcessing:!1};function c(g){a.has(g)&&(l.schedule(g),e()),g(B)}const l={schedule:(g,u=!1,f=!1)=>{const v=f&&s?t:n;return u&&a.add(g),v.add(g),g},cancel:g=>{n.delete(g),a.delete(g)},process:g=>{if(B=g,s){r=!0;return}s=!0;const u=t;t=n,n=u,t.forEach(c),t.clear(),s=!1,r&&(r=!1,l.process(g))}};return l}const S_=40;function tx(e,A){let t=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>t=!0,a=vI.reduce((T,S)=>(T[S]=R_(r),T),{}),{setup:B,read:c,resolveKeyframes:l,preUpdate:g,update:u,preRender:f,render:w,postRender:v}=a,E=()=>{const T=Ad.useManualTiming,S=T?s.timestamp:performance.now();t=!1,T||(s.delta=n?1e3/60:Math.max(Math.min(S-s.timestamp,S_),1)),s.timestamp=S,s.isProcessing=!0,B.process(s),c.process(s),l.process(s),g.process(s),u.process(s),f.process(s),w.process(s),v.process(s),s.isProcessing=!1,t&&A&&(n=!1,e(E))},m=()=>{t=!0,n=!0,s.isProcessing||e(E)};return{schedule:vI.reduce((T,S)=>{const F=a[S];return T[S]=(V,N=!1,X=!1)=>(t||m(),F.schedule(V,N,X)),T},{}),cancel:T=>{for(let S=0;S<vI.length;S++)a[vI[S]].cancel(T)},state:s,steps:a}}const{schedule:cn,cancel:ed,state:kr,steps:uy}=tx(typeof requestAnimationFrame<"u"?requestAnimationFrame:lB,!0);let II;function V_(){II=void 0}const ca={now:()=>(II===void 0&&ca.set(kr.isProcessing||Ad.useManualTiming?kr.timestamp:performance.now()),II),set:e=>{II=e,queueMicrotask(V_)}},nx=e=>A=>typeof A=="string"&&A.startsWith(e),sx=nx("--"),W_=nx("var(--"),Gy=e=>W_(e)?N_.test(e.split("/*")[0].trim()):!1,N_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function rx(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const dh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},TQ={...dh,transform:e=>Gc(0,1,e)},pI={...dh,default:1},RQ=e=>Math.round(e*1e5)/1e5,fy=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function z_(e){return e==null}const L_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,hy=(e,A)=>t=>!!(typeof t=="string"&&L_.test(t)&&t.startsWith(e)||A&&!z_(t)&&Object.prototype.hasOwnProperty.call(t,A)),ax=(e,A,t)=>n=>{if(typeof n!="string")return n;const[s,r,a,B]=n.match(fy);return{[e]:parseFloat(s),[A]:parseFloat(r),[t]:parseFloat(a),alpha:B!==void 0?parseFloat(B):1}},X_=e=>Gc(0,255,e),wy={...dh,transform:e=>Math.round(X_(e))},oG={test:hy("rgb","red"),parse:ax("red","green","blue"),transform:({red:e,green:A,blue:t,alpha:n=1})=>"rgba("+wy.transform(e)+", "+wy.transform(A)+", "+wy.transform(t)+", "+RQ(TQ.transform(n))+")"};function O_(e){let A="",t="",n="",s="";return e.length>5?(A=e.substring(1,3),t=e.substring(3,5),n=e.substring(5,7),s=e.substring(7,9)):(A=e.substring(1,2),t=e.substring(2,3),n=e.substring(3,4),s=e.substring(4,5),A+=A,t+=t,n+=n,s+=s),{red:parseInt(A,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const Qy={test:hy("#"),parse:O_,transform:oG.transform},SQ=e=>({test:A=>typeof A=="string"&&A.endsWith(e)&&A.split(" ").length===1,parse:parseFloat,transform:A=>`${A}${e}`}),td=SQ("deg"),fc=SQ("%"),Be=SQ("px"),J_=SQ("vh"),K_=SQ("vw"),ix={...fc,parse:e=>fc.parse(e)/100,transform:e=>fc.transform(e*100)},uh={test:hy("hsl","hue"),parse:ax("hue","saturation","lightness"),transform:({hue:e,saturation:A,lightness:t,alpha:n=1})=>"hsla("+Math.round(e)+", "+fc.transform(RQ(A))+", "+fc.transform(RQ(t))+", "+RQ(TQ.transform(n))+")"},Ds={test:e=>oG.test(e)||Qy.test(e)||uh.test(e),parse:e=>oG.test(e)?oG.parse(e):uh.test(e)?uh.parse(e):Qy.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?oG.transform(e):uh.transform(e),getAnimatableNone:e=>{const A=Ds.parse(e);return A.alpha=0,Ds.transform(A)}},j_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function __(e){return isNaN(e)&&typeof e=="string"&&(e.match(fy)?.length||0)+(e.match(j_)?.length||0)>0}const Bx="number",ox="color",q_="var",$_="var(",cx="${}",A6=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Gh(e){const A=e.toString(),t=[],n={color:[],number:[],var:[]},s=[];let r=0;const B=A.replace(A6,c=>(Ds.test(c)?(n.color.push(r),s.push(ox),t.push(Ds.parse(c))):c.startsWith($_)?(n.var.push(r),s.push(q_),t.push(c)):(n.number.push(r),s.push(Bx),t.push(parseFloat(c))),++r,cx)).split(cx);return{values:t,split:B,indexes:n,types:s}}function e6(e){return Gh(e).values}function lx({split:e,types:A}){const t=e.length;return n=>{let s="";for(let r=0;r<t;r++)if(s+=e[r],n[r]!==void 0){const a=A[r];a===Bx?s+=RQ(n[r]):a===ox?s+=Ds.transform(n[r]):s+=n[r]}return s}}function t6(e){return lx(Gh(e))}const n6=e=>typeof e=="number"?0:Ds.test(e)?Ds.getAnimatableNone(e):e,s6=(e,A)=>typeof e=="number"?A?.trim().endsWith("/")?e:0:n6(e);function r6(e){const A=Gh(e);return lx(A)(A.values.map((n,s)=>s6(n,A.split[s])))}const to={test:__,parse:e6,createTransformer:t6,getAnimatableNone:r6};function by(e,A,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(A-e)*6*t:t<1/2?A:t<2/3?e+(A-e)*(2/3-t)*6:e}function a6({hue:e,saturation:A,lightness:t,alpha:n}){e/=360,A/=100,t/=100;let s=0,r=0,a=0;if(!A)s=r=a=t;else{const B=t<.5?t*(1+A):t+A-t*A,c=2*t-B;s=by(c,B,e+1/3),r=by(c,B,e),a=by(c,B,e-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(a*255),alpha:n}}function HI(e,A){return t=>t>0?A:e}const mn=(e,A,t)=>e+(A-e)*t,Cy=(e,A,t)=>{const n=e*e,s=t*(A*A-n)+n;return s<0?0:Math.sqrt(s)},i6=[Qy,oG,uh],B6=e=>i6.find(A=>A.test(e));function gx(e){const A=B6(e);if(!A)return!1;let t=A.parse(e);return A===uh&&(t=a6(t)),t}const dx=(e,A)=>{const t=gx(e),n=gx(A);if(!t||!n)return HI(e,A);const s={...t};return r=>(s.red=Cy(t.red,n.red,r),s.green=Cy(t.green,n.green,r),s.blue=Cy(t.blue,n.blue,r),s.alpha=mn(t.alpha,n.alpha,r),oG.transform(s))},vy=new Set(["none","hidden"]);function o6(e,A){return vy.has(e)?t=>t<=0?e:A:t=>t>=1?A:e}function c6(e,A){return t=>mn(e,A,t)}function Iy(e){return typeof e=="number"?c6:typeof e=="string"?Gy(e)?HI:Ds.test(e)?dx:d6:Array.isArray(e)?ux:typeof e=="object"?Ds.test(e)?dx:l6:HI}function ux(e,A){const t=[...e],n=t.length,s=e.map((r,a)=>Iy(r)(r,A[a]));return r=>{for(let a=0;a<n;a++)t[a]=s[a](r);return t}}function l6(e,A){const t={...e,...A},n={};for(const s in t)e[s]!==void 0&&A[s]!==void 0&&(n[s]=Iy(e[s])(e[s],A[s]));return s=>{for(const r in n)t[r]=n[r](s);return t}}function g6(e,A){const t=[],n={color:0,var:0,number:0};for(let s=0;s<A.values.length;s++){const r=A.types[s],a=e.indexes[r][n[r]],B=e.values[a]??0;t[s]=B,n[r]++}return t}const d6=(e,A)=>{const t=to.createTransformer(A),n=Gh(e),s=Gh(A);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?vy.has(e)&&!s.values.length||vy.has(A)&&!n.values.length?o6(e,A):MQ(ux(g6(n,s),s.values),t):HI(e,A)};function Gx(e,A,t){return typeof e=="number"&&typeof A=="number"&&typeof t=="number"?mn(e,A,t):Iy(e)(e,A)}const u6=e=>{const A=({timestamp:t})=>e(t);return{start:(t=!0)=>cn.update(A,t),stop:()=>ed(A),now:()=>kr.isProcessing?kr.timestamp:ca.now()}},fx=(e,A,t=10)=>{let n="";const s=Math.max(Math.round(A/t),2);for(let r=0;r<s;r++)n+=Math.round(e(r/(s-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},mI=2e4;function py(e){let A=0;const t=50;let n=e.next(A);for(;!n.done&&A<mI;)A+=t,n=e.next(A);return A>=mI?1/0:A}function G6(e,A=100,t){const n=t({...e,keyframes:[0,A]}),s=Math.min(py(n),mI);return{type:"keyframes",ease:r=>n.next(s*r).value/A,duration:gB(s)}}const es={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Hy(e,A){return e*Math.sqrt(1-A*A)}const f6=12;function h6(e,A,t){let n=t;for(let s=1;s<f6;s++)n=n-e(n)/A(n);return n}const my=.001;function w6({duration:e=es.duration,bounce:A=es.bounce,velocity:t=es.velocity,mass:n=es.mass}){let s,r,a=1-A;a=Gc(es.minDamping,es.maxDamping,a),e=Gc(es.minDuration,es.maxDuration,gB(e)),a<1?(s=l=>{const g=l*a,u=g*e,f=g-t,w=Hy(l,a),v=Math.exp(-u);return my-f/w*v},r=l=>{const u=l*a*e,f=u*t+t,w=Math.pow(a,2)*Math.pow(l,2)*e,v=Math.exp(-u),E=Hy(Math.pow(l,2),a);return(-s(l)+my>0?-1:1)*((f-w)*v)/E}):(s=l=>{const g=Math.exp(-l*e),u=(l-t)*e+1;return-my+g*u},r=l=>{const g=Math.exp(-l*e),u=(t-l)*(e*e);return g*u});const B=5/e,c=h6(s,r,B);if(e=Hi(e),isNaN(c))return{stiffness:es.stiffness,damping:es.damping,duration:e};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:a*2*Math.sqrt(n*l),duration:e}}}const Q6=["duration","bounce"],b6=["stiffness","damping","mass"];function hx(e,A){return A.some(t=>e[t]!==void 0)}function C6(e){let A={velocity:es.velocity,stiffness:es.stiffness,damping:es.damping,mass:es.mass,isResolvedFromDuration:!1,...e};if(!hx(e,b6)&&hx(e,Q6))if(A.velocity=0,e.visualDuration){const t=e.visualDuration,n=2*Math.PI/(t*1.2),s=n*n,r=2*Gc(.05,1,1-(e.bounce||0))*Math.sqrt(s);A={...A,mass:es.mass,stiffness:s,damping:r}}else{const t=w6({...e,velocity:0});A={...A,...t,mass:es.mass},A.isResolvedFromDuration=!0}return A}function EI(e=es.visualDuration,A=es.bounce){const t=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:A}:e;let{restSpeed:n,restDelta:s}=t;const r=t.keyframes[0],a=t.keyframes[t.keyframes.length-1],B={done:!1,value:r},{stiffness:c,damping:l,mass:g,duration:u,velocity:f,isResolvedFromDuration:w}=C6({...t,velocity:-gB(t.velocity||0)}),v=f||0,E=l/(2*Math.sqrt(c*g)),m=a-r,Z=gB(Math.sqrt(c/g)),D=Math.abs(m)<5;n||(n=D?es.restSpeed.granular:es.restSpeed.default),s||(s=D?es.restDelta.granular:es.restDelta.default);let T,S,F,V,N,X;if(E<1)F=Hy(Z,E),V=(v+E*Z*m)/F,T=$=>{const rA=Math.exp(-E*Z*$);return a-rA*(V*Math.sin(F*$)+m*Math.cos(F*$))},N=E*Z*V+m*F,X=E*Z*m-V*F,S=$=>Math.exp(-E*Z*$)*(N*Math.sin(F*$)+X*Math.cos(F*$));else if(E===1){T=rA=>a-Math.exp(-Z*rA)*(m+(v+Z*m)*rA);const $=v+Z*m;S=rA=>Math.exp(-Z*rA)*(Z*$*rA-v)}else{const $=Z*Math.sqrt(E*E-1);T=fA=>{const yA=Math.exp(-E*Z*fA),L=Math.min($*fA,300);return a-yA*((v+E*Z*m)*Math.sinh(L)+$*m*Math.cosh(L))/$};const rA=(v+E*Z*m)/$,iA=E*Z*rA-m*$,hA=E*Z*m-rA*$;S=fA=>{const yA=Math.exp(-E*Z*fA),L=Math.min($*fA,300);return yA*(iA*Math.sinh(L)+hA*Math.cosh(L))}}const eA={calculatedDuration:w&&u||null,velocity:$=>Hi(S($)),next:$=>{if(!w&&E<1){const iA=Math.exp(-E*Z*$),hA=Math.sin(F*$),fA=Math.cos(F*$),yA=a-iA*(V*hA+m*fA),L=Hi(iA*(N*hA+X*fA));return B.done=Math.abs(L)<=n&&Math.abs(a-yA)<=s,B.value=B.done?a:yA,B}const rA=T($);if(w)B.done=$>=u;else{const iA=Hi(S($));B.done=Math.abs(iA)<=n&&Math.abs(a-rA)<=s}return B.value=B.done?a:rA,B},toString:()=>{const $=Math.min(py(eA),mI),rA=fx(iA=>eA.next($*iA).value,$,30);return $+"ms "+rA},toTransition:()=>{}};return eA}EI.applyToOptions=e=>{const A=G6(e,100,EI);return e.ease=A.ease,e.duration=Hi(A.duration),e.type="keyframes",e};const v6=5;function wx(e,A,t){const n=Math.max(A-v6,0);return zM(t-e(n),A-n)}function Ey({keyframes:e,velocity:A=0,power:t=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:a,min:B,max:c,restDelta:l=.5,restSpeed:g}){const u=e[0],f={done:!1,value:u},w=X=>B!==void 0&&X<B||c!==void 0&&X>c,v=X=>B===void 0?c:c===void 0||Math.abs(B-X)<Math.abs(c-X)?B:c;let E=t*A;const m=u+E,Z=a===void 0?m:a(m);Z!==m&&(E=Z-u);const D=X=>-E*Math.exp(-X/n),T=X=>Z+D(X),S=X=>{const eA=D(X),$=T(X);f.done=Math.abs(eA)<=l,f.value=f.done?Z:$};let F,V;const N=X=>{w(f.value)&&(F=X,V=EI({keyframes:[f.value,v(f.value)],velocity:wx(T,X,f.value),damping:s,stiffness:r,restDelta:l,restSpeed:g}))};return N(0),{calculatedDuration:null,next:X=>{let eA=!1;return!V&&F===void 0&&(eA=!0,S(X),N(X)),F!==void 0&&X>=F?V.next(X-F):(!eA&&S(X),f)}}}function I6(e,A,t){const n=[],s=t||Ad.mix||Gx,r=e.length-1;for(let a=0;a<r;a++){let B=s(e[a],e[a+1]);if(A){const c=Array.isArray(A)?A[a]||lB:A;B=MQ(c,B)}n.push(B)}return n}function p6(e,A,{clamp:t=!0,ease:n,mixer:s}={}){const r=e.length;if(cy(r===A.length),r===1)return()=>A[0];if(r===2&&A[0]===A[1])return()=>A[1];const a=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),A=[...A].reverse());const B=I6(A,n,s),c=B.length,l=g=>{if(a&&g<e[0])return A[0];let u=0;if(c>1)for(;u<e.length-2&&!(g<e[u+1]);u++);const f=xQ(e[u],e[u+1],g);return B[u](f)};return t?g=>l(Gc(e[0],e[r-1],g)):l}function H6(e,A){const t=e[e.length-1];for(let n=1;n<=A;n++){const s=xQ(0,A,n);e.push(mn(t,1,s))}}function m6(e){const A=[0];return H6(A,e.length-1),A}function E6(e,A){return e.map(t=>t*A)}function y6(e,A){return e.map(()=>A||$M).splice(0,e.length-1)}function VQ({duration:e=300,keyframes:A,times:t,ease:n="easeInOut"}){const s=x_(n)?n.map(ex):ex(n),r={done:!1,value:A[0]},a=E6(t&&t.length===A.length?t:m6(A),e),B=p6(a,A,{ease:Array.isArray(s)?s:y6(A,s)});return{calculatedDuration:e,next:c=>(r.value=B(c),r.done=c>=e,r)}}const Y6=e=>e!==null;function yI(e,{repeat:A,repeatType:t="loop"},n,s=1){const r=e.filter(Y6),B=s<0||A&&t!=="loop"&&A%2===1?0:r.length-1;return!B||n===void 0?r[B]:n}const Z6={decay:Ey,inertia:Ey,tween:VQ,keyframes:VQ,spring:EI};function Qx(e){typeof e.type=="string"&&(e.type=Z6[e.type])}class yy{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(A=>{this.resolve=A})}notifyFinished(){this.resolve()}then(A,t){return this.finished.then(A,t)}}const k6=e=>e/100;class YI extends yy{constructor(A){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==ca.now()&&this.tick(ca.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=A,this.initAnimation(),this.play(),A.autoplay===!1&&this.pause()}initAnimation(){const{options:A}=this;Qx(A);const{type:t=VQ,repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:a=0}=A;let{keyframes:B}=A;const c=t||VQ;c!==VQ&&typeof B[0]!="number"&&(this.mixKeyframes=MQ(k6,Gx(B[0],B[1])),B=[0,100]);const l=c({...A,keyframes:B});r==="mirror"&&(this.mirroredGenerator=c({...A,keyframes:[...B].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=py(l));const{calculatedDuration:g}=l;this.calculatedDuration=g,this.resolvedDuration=g+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=l}updateTime(A){const t=Math.round(A-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(A,t=!1){const{generator:n,totalDuration:s,mixKeyframes:r,mirroredGenerator:a,resolvedDuration:B,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:l=0,keyframes:g,repeat:u,repeatType:f,repeatDelay:w,type:v,onUpdate:E,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,A):this.speed<0&&(this.startTime=Math.min(A-s/this.speed,this.startTime)),t?this.currentTime=A:this.updateTime(A);const Z=this.currentTime-l*(this.playbackSpeed>=0?1:-1),D=this.playbackSpeed>=0?Z<0:Z>s;this.currentTime=Math.max(Z,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let T=this.currentTime,S=n;if(u){const X=Math.min(this.currentTime,s)/B;let eA=Math.floor(X),$=X%1;!$&&X>=1&&($=1),$===1&&eA--,eA=Math.min(eA,u+1),eA%2&&(f==="reverse"?($=1-$,w&&($-=w/B)):f==="mirror"&&(S=a)),T=Gc(0,1,$)*B}let F;D?(this.delayState.value=g[0],F=this.delayState):F=S.next(T),r&&!D&&(F.value=r(F.value));let{done:V}=F;!D&&c!==null&&(V=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return N&&v!==Ey&&(F.value=yI(g,this.options,m,this.speed)),E&&E(F.value),N&&this.finish(),F}then(A,t){return this.finished.then(A,t)}get duration(){return gB(this.calculatedDuration)}get iterationDuration(){const{delay:A=0}=this.options||{};return this.duration+gB(A)}get time(){return gB(this.currentTime)}set time(A){A=Hi(A),this.currentTime=A,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=A:this.driver&&(this.startTime=this.driver.now()-A/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=A,this.tick(A))}getGeneratorVelocity(){const A=this.currentTime;if(A<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(A);const t=this.generator.next(A).value;return wx(n=>this.generator.next(n).value,A,t)}get speed(){return this.playbackSpeed}set speed(A){const t=this.playbackSpeed!==A;t&&this.driver&&this.updateTime(ca.now()),this.playbackSpeed=A,t&&this.driver&&(this.time=gB(this.currentTime))}play(){if(this.isStopped)return;const{driver:A=u6,startTime:t}=this.options;this.driver||(this.driver=A(s=>this.tick(s))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ca.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(A){return this.startTime=0,this.tick(A,!0)}attachTimeline(A){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),A.observe(this)}}function U6(e){for(let A=1;A<e.length;A++)e[A]??(e[A]=e[A-1])}const cG=e=>e*180/Math.PI,Yy=e=>{const A=cG(Math.atan2(e[1],e[0]));return Zy(A)},D6={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Yy,rotateZ:Yy,skewX:e=>cG(Math.atan(e[1])),skewY:e=>cG(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Zy=e=>(e=e%360,e<0&&(e+=360),e),bx=Yy,Cx=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),vx=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),F6={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Cx,scaleY:vx,scale:e=>(Cx(e)+vx(e))/2,rotateX:e=>Zy(cG(Math.atan2(e[6],e[5]))),rotateY:e=>Zy(cG(Math.atan2(-e[2],e[0]))),rotateZ:bx,rotate:bx,skewX:e=>cG(Math.atan(e[4])),skewY:e=>cG(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ky(e){return e.includes("scale")?1:0}function Uy(e,A){if(!e||e==="none")return ky(A);const t=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,s;if(t)n=F6,s=t;else{const B=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=D6,s=B}if(!s)return ky(A);const r=n[A],a=s[1].split(",").map(x6);return typeof r=="function"?r(a):a[r]}const M6=(e,A)=>{const{transform:t="none"}=getComputedStyle(e);return Uy(t,A)};function x6(e){return parseFloat(e.trim())}const fh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hh=new Set(fh),Ix=e=>e===dh||e===Be,P6=new Set(["x","y","z"]),T6=fh.filter(e=>!P6.has(e));function R6(e){const A=[];return T6.forEach(t=>{const n=e.getValue(t);n!==void 0&&(A.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),A}const nd={width:({x:e},{paddingLeft:A="0",paddingRight:t="0",boxSizing:n})=>{const s=e.max-e.min;return n==="border-box"?s:s-parseFloat(A)-parseFloat(t)},height:({y:e},{paddingTop:A="0",paddingBottom:t="0",boxSizing:n})=>{const s=e.max-e.min;return n==="border-box"?s:s-parseFloat(A)-parseFloat(t)},top:(e,{top:A})=>parseFloat(A),left:(e,{left:A})=>parseFloat(A),bottom:({y:e},{top:A})=>parseFloat(A)+(e.max-e.min),right:({x:e},{left:A})=>parseFloat(A)+(e.max-e.min),x:(e,{transform:A})=>Uy(A,"x"),y:(e,{transform:A})=>Uy(A,"y")};nd.translateX=nd.x,nd.translateY=nd.y;const lG=new Set;let Dy=!1,Fy=!1,My=!1;function px(){if(Fy){const e=Array.from(lG).filter(n=>n.needsMeasurement),A=new Set(e.map(n=>n.element)),t=new Map;A.forEach(n=>{const s=R6(n);s.length&&(t.set(n,s),n.render())}),e.forEach(n=>n.measureInitialState()),A.forEach(n=>{n.render();const s=t.get(n);s&&s.forEach(([r,a])=>{n.getValue(r)?.set(a)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Fy=!1,Dy=!1,lG.forEach(e=>e.complete(My)),lG.clear()}function Hx(){lG.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Fy=!0)})}function S6(){My=!0,Hx(),px(),My=!1}class xy{constructor(A,t,n,s,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...A],this.onComplete=t,this.name=n,this.motionValue=s,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(lG.add(this),Dy||(Dy=!0,cn.read(Hx),cn.resolveKeyframes(px))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:A,name:t,element:n,motionValue:s}=this;if(A[0]===null){const r=s?.get(),a=A[A.length-1];if(r!==void 0)A[0]=r;else if(n&&t){const B=n.readValue(t,a);B!=null&&(A[0]=B)}A[0]===void 0&&(A[0]=a),s&&r===void 0&&s.set(A[0])}U6(A)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(A=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,A),lG.delete(this)}cancel(){this.state==="scheduled"&&(lG.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const V6=e=>e.startsWith("--");function mx(e,A,t){V6(A)?e.style.setProperty(A,t):e.style[A]=t}const W6={};function Ex(e,A){const t=NM(e);return()=>W6[A]??t()}const N6=Ex(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),yx=Ex(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),WQ=([e,A,t,n])=>`cubic-bezier(${e}, ${A}, ${t}, ${n})`,Yx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:WQ([0,.65,.55,1]),circOut:WQ([.55,0,1,.45]),backIn:WQ([.31,.01,.66,-.59]),backOut:WQ([.33,1.53,.69,.99])};function Zx(e,A){if(e)return typeof e=="function"?yx()?fx(e,A):"ease-out":Ax(e)?WQ(e):Array.isArray(e)?e.map(t=>Zx(t,A)||Yx.easeOut):Yx[e]}function z6(e,A,t,{delay:n=0,duration:s=300,repeat:r=0,repeatType:a="loop",ease:B="easeOut",times:c}={},l=void 0){const g={[A]:t};c&&(g.offset=c);const u=Zx(B,s);Array.isArray(u)&&(g.easing=u);const f={delay:n,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:r+1,direction:a==="reverse"?"alternate":"normal"};return l&&(f.pseudoElement=l),e.animate(g,f)}function kx(e){return typeof e=="function"&&"applyToOptions"in e}function L6({type:e,...A}){return kx(e)&&yx()?e.applyToOptions(A):(A.duration??(A.duration=300),A.ease??(A.ease="easeOut"),A)}class Ux extends yy{constructor(A){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!A)return;const{element:t,name:n,keyframes:s,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:B,onComplete:c}=A;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=A,cy(typeof A.type!="string");const l=L6(A);this.animation=z6(t,n,s,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const g=yI(s,this.options,B,this.speed);this.updateMotionValue&&this.updateMotionValue(g),mx(t,n,g),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:A}=this;A==="idle"||A==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const A=this.options?.element;!this.isPseudoElement&&A?.isConnected&&this.animation.commitStyles?.()}get duration(){const A=this.animation.effect?.getComputedTiming?.().duration||0;return gB(Number(A))}get iterationDuration(){const{delay:A=0}=this.options||{};return this.duration+gB(A)}get time(){return gB(Number(this.animation.currentTime)||0)}set time(A){const t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Hi(A),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(A){A<0&&(this.finishedTime=null),this.animation.playbackRate=A}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(A){this.manualStartTime=this.animation.startTime=A}attachTimeline({timeline:A,rangeStart:t,rangeEnd:n,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,A&&N6()?(this.animation.timeline=A,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),lB):s(this)}}const Dx={anticipate:jM,backInOut:KM,circInOut:qM};function X6(e){return e in Dx}function O6(e){typeof e.ease=="string"&&X6(e.ease)&&(e.ease=Dx[e.ease])}const Py=10;class J6 extends Ux{constructor(A){O6(A),Qx(A),super(A),A.startTime!==void 0&&A.autoplay!==!1&&(this.startTime=A.startTime),this.options=A}updateMotionValue(A){const{motionValue:t,onUpdate:n,onComplete:s,element:r,...a}=this.options;if(!t)return;if(A!==void 0){t.set(A);return}const B=new YI({...a,autoplay:!1}),c=Math.max(Py,ca.now()-this.startTime),l=Gc(0,Py,c-Py),g=B.sample(c).value,{name:u}=this.options;r&&u&&mx(r,u,g),t.setWithVelocity(B.sample(Math.max(0,c-l)).value,g,l),B.stop()}}const Fx=(e,A)=>A==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(to.test(e)||e==="0")&&!e.startsWith("url("));function K6(e){const A=e[0];if(e.length===1)return!0;for(let t=0;t<e.length;t++)if(e[t]!==A)return!0}function j6(e,A,t,n){const s=e[0];if(s===null)return!1;if(A==="display"||A==="visibility")return!0;const r=e[e.length-1],a=Fx(s,A),B=Fx(r,A);return!a||!B?!1:K6(e)||(t==="spring"||kx(t))&&n}function Ty(e){e.duration=0,e.type="keyframes"}const Mx=new Set(["opacity","clipPath","filter","transform"]),_6=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function q6(e){for(let A=0;A<e.length;A++)if(typeof e[A]=="string"&&_6.test(e[A]))return!0;return!1}const $6=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Aq=NM(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function eq(e){const{motionValue:A,name:t,repeatDelay:n,repeatType:s,damping:r,type:a,keyframes:B}=e;if(!(A?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:g}=A.owner.getProps();return Aq()&&t&&(Mx.has(t)||$6.has(t)&&q6(B))&&(t!=="transform"||!g)&&!l&&!n&&s!=="mirror"&&r!==0&&a!=="inertia"}const tq=40;class nq extends yy{constructor({autoplay:A=!0,delay:t=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:a="loop",keyframes:B,name:c,motionValue:l,element:g,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ca.now();const f={autoplay:A,delay:t,type:n,repeat:s,repeatDelay:r,repeatType:a,name:c,motionValue:l,element:g,...u},w=g?.KeyframeResolver||xy;this.keyframeResolver=new w(B,(v,E,m)=>this.onKeyframesResolved(v,E,f,!m),c,l,g),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(A,t,n,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:B,delay:c,isHandoff:l,onUpdate:g}=n;this.resolvedAt=ca.now();let u=!0;j6(A,r,a,B)||(u=!1,(Ad.instantAnimations||!c)&&g?.(yI(A,n,t)),A[0]=A[A.length-1],Ty(n),n.repeat=0);const w={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>tq?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:A},v=u&&!l&&eq(w),E=w.motionValue?.owner?.current;let m;if(v)try{m=new J6({...w,element:E})}catch{m=new YI(w)}else m=new YI(w);m.finished.then(()=>{this.notifyFinished()}).catch(lB),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(A,t){return this.finished.finally(A).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),S6()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(A){this.animation.time=A}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(A){this.animation.speed=A}get startTime(){return this.animation.startTime}attachTimeline(A){return this._animation?this.stopTimeline=this.animation.attachTimeline(A):this.pendingTimeline=A,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function xx(e,A,t,n=0,s=1){const r=Array.from(e).sort((l,g)=>l.sortNodePosition(g)).indexOf(A),a=e.size,B=(a-1)*n;return typeof t=="function"?t(r,a):s===1?r*n:B-r*n}const sq=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function rq(e){const A=sq.exec(e);if(!A)return[,];const[,t,n,s]=A;return[`--${t??n}`,s]}function Px(e,A,t=1){const[n,s]=rq(e);if(!n)return;const r=window.getComputedStyle(A).getPropertyValue(n);if(r){const a=r.trim();return SM(a)?parseFloat(a):a}return Gy(s)?Px(s,A,t+1):s}const aq={type:"spring",stiffness:500,damping:25,restSpeed:10},iq=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Bq={type:"keyframes",duration:.8},oq={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},cq=(e,{keyframes:A})=>A.length>2?Bq:hh.has(e)?e.startsWith("scale")?iq(A[1]):aq:oq;function Tx(e,A){if(e?.inherit&&A){const{inherit:t,...n}=e;return{...A,...n}}return e}function Ry(e,A){const t=e?.[A]??e?.default??e;return t!==e?Tx(t,e):t}const lq=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function gq(e){for(const A in e)if(!lq.has(A))return!0;return!1}const Sy=(e,A,t,n={},s,r)=>a=>{const B=Ry(n,e)||{},c=B.delay||n.delay||0;let{elapsed:l=0}=n;l=l-Hi(c);const g={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:A.getVelocity(),...B,delay:-l,onUpdate:f=>{A.set(f),B.onUpdate&&B.onUpdate(f)},onComplete:()=>{a(),B.onComplete&&B.onComplete()},name:e,motionValue:A,element:r?void 0:s};gq(B)||Object.assign(g,cq(e,g)),g.duration&&(g.duration=Hi(g.duration)),g.repeatDelay&&(g.repeatDelay=Hi(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let u=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(Ty(g),g.delay===0&&(u=!0)),(Ad.instantAnimations||Ad.skipAnimations||s?.shouldSkipAnimations)&&(u=!0,Ty(g),g.delay=0),g.allowFlatten=!B.type&&!B.ease,u&&!r&&A.get()!==void 0){const f=yI(g.keyframes,B);if(f!==void 0){cn.update(()=>{g.onUpdate(f),g.onComplete()});return}}return B.isSync?new YI(g):new nq(g)};function Rx(e){const A=[{},{}];return e?.values.forEach((t,n)=>{A[0][n]=t.get(),A[1][n]=t.getVelocity()}),A}function Vy(e,A,t,n){if(typeof A=="function"){const[s,r]=Rx(n);A=A(t!==void 0?t:e.custom,s,r)}if(typeof A=="string"&&(A=e.variants&&e.variants[A]),typeof A=="function"){const[s,r]=Rx(n);A=A(t!==void 0?t:e.custom,s,r)}return A}function gG(e,A,t){const n=e.getProps();return Vy(n,A,t!==void 0?t:n.custom,e)}const Sx=new Set(["width","height","top","left","right","bottom",...fh]),Vx=30,dq=e=>!isNaN(parseFloat(e));class uq{constructor(A,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const s=ca.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(A),this.owner=t.owner}setCurrent(A){this.current=A,this.updatedAt=ca.now(),this.canTrackVelocity===null&&A!==void 0&&(this.canTrackVelocity=dq(this.current))}setPrevFrameValue(A=this.current){this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt}onChange(A){return this.on("change",A)}on(A,t){this.events[A]||(this.events[A]=new ly);const n=this.events[A].add(t);return A==="change"?()=>{n(),cn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const A in this.events)this.events[A].clear()}attach(A,t){this.passiveEffect=A,this.stopPassiveEffect=t}set(A){this.passiveEffect?this.passiveEffect(A,this.updateAndNotify):this.updateAndNotify(A)}setWithVelocity(A,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt-n}jump(A,t=!0){this.updateAndNotify(A),this.prev=A,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(A){this.dependents||(this.dependents=new Set),this.dependents.add(A)}removeDependent(A){this.dependents&&this.dependents.delete(A)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const A=ca.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||A-this.updatedAt>Vx)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,Vx);return zM(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(A){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=A(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wh(e,A){return new uq(e,A)}const Wy=e=>Array.isArray(e);function Gq(e,A,t){e.hasValue(A)?e.getValue(A).set(t):e.addValue(A,wh(t))}function fq(e){return Wy(e)?e[e.length-1]||0:e}function Ny(e,A){const t=gG(e,A);let{transitionEnd:n={},transition:s={},...r}=t||{};r={...r,...n};for(const a in r){const B=fq(r[a]);Gq(e,a,B)}}const Ur=e=>!!(e&&e.getVelocity);function hq(e){return!!(Ur(e)&&e.add)}function zy(e,A){const t=e.getValue("willChange");if(hq(t))return t.add(A);if(!t&&Ad.WillChange){const n=new Ad.WillChange("auto");e.addValue("willChange",n),n.add(A)}}function Ly(e){return e.replace(/([A-Z])/g,A=>`-${A.toLowerCase()}`)}const Wx="data-"+Ly("framerAppearId");function Nx(e){return e.props[Wx]}function wq({protectedKeys:e,needsAnimating:A},t){const n=e.hasOwnProperty(t)&&A[t]!==!0;return A[t]=!1,n}function zx(e,A,{delay:t=0,transitionOverride:n,type:s}={}){let{transition:r,transitionEnd:a,...B}=A;const c=e.getDefaultTransition();r=r?Tx(r,c):c;const l=r?.reduceMotion;n&&(r=n);const g=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const f in B){const w=e.getValue(f,e.latestValues[f]??null),v=B[f];if(v===void 0||u&&wq(u,f))continue;const E={delay:t,...Ry(r||{},f)},m=w.get();if(m!==void 0&&!w.isAnimating()&&!Array.isArray(v)&&v===m&&!E.velocity){cn.update(()=>w.set(v));continue}let Z=!1;if(window.MotionHandoffAnimation){const S=Nx(e);if(S){const F=window.MotionHandoffAnimation(S,f,cn);F!==null&&(E.startTime=F,Z=!0)}}zy(e,f);const D=l??e.shouldReduceMotion;w.start(Sy(f,w,v,D&&Sx.has(f)?{type:!1}:E,e,Z));const T=w.animation;T&&g.push(T)}if(a){const f=()=>cn.update(()=>{a&&Ny(e,a)});g.length?Promise.all(g).then(f):f()}return g}function Xy(e,A,t={}){const n=gG(e,A,t.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=n||{};t.transitionOverride&&(s=t.transitionOverride);const r=n?()=>Promise.all(zx(e,n,t)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:g,staggerDirection:u}=s;return Qq(e,A,c,l,g,u,t)}:()=>Promise.resolve(),{when:B}=s;if(B){const[c,l]=B==="beforeChildren"?[r,a]:[a,r];return c().then(()=>l())}else return Promise.all([r(),a(t.delay)])}function Qq(e,A,t=0,n=0,s=0,r=1,a){const B=[];for(const c of e.variantChildren)c.notify("AnimationStart",A),B.push(Xy(c,A,{...a,delay:t+(typeof n=="function"?0:n)+xx(e.variantChildren,c,n,s,r)}).then(()=>c.notify("AnimationComplete",A)));return Promise.all(B)}function Lx(e,A,t={}){e.notify("AnimationStart",A);let n;if(Array.isArray(A)){const s=A.map(r=>Xy(e,r,t));n=Promise.all(s)}else if(typeof A=="string")n=Xy(e,A,t);else{const s=typeof A=="function"?gG(e,A,t.custom):A;n=Promise.all(zx(e,s,t))}return n.then(()=>{e.notify("AnimationComplete",A)})}const bq={test:e=>e==="auto",parse:e=>e},Xx=e=>A=>A.test(e),Ox=[dh,Be,fc,td,K_,J_,bq],Jx=e=>Ox.find(Xx(e));function Cq(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||WM(e):!0}const vq=new Set(["brightness","contrast","saturate","opacity"]);function Iq(e){const[A,t]=e.slice(0,-1).split("(");if(A==="drop-shadow")return e;const[n]=t.match(fy)||[];if(!n)return e;const s=t.replace(n,"");let r=vq.has(A)?1:0;return n!==t&&(r*=100),A+"("+r+s+")"}const pq=/\b([a-z-]*)\(.*?\)/gu,Oy={...to,getAnimatableNone:e=>{const A=e.match(pq);return A?A.map(Iq).join(" "):e}},Jy={...to,getAnimatableNone:e=>{const A=to.parse(e);return to.createTransformer(e)(A.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}},Kx={...dh,transform:Math.round},Ky={borderWidth:Be,borderTopWidth:Be,borderRightWidth:Be,borderBottomWidth:Be,borderLeftWidth:Be,borderRadius:Be,borderTopLeftRadius:Be,borderTopRightRadius:Be,borderBottomRightRadius:Be,borderBottomLeftRadius:Be,width:Be,maxWidth:Be,height:Be,maxHeight:Be,top:Be,right:Be,bottom:Be,left:Be,inset:Be,insetBlock:Be,insetBlockStart:Be,insetBlockEnd:Be,insetInline:Be,insetInlineStart:Be,insetInlineEnd:Be,padding:Be,paddingTop:Be,paddingRight:Be,paddingBottom:Be,paddingLeft:Be,paddingBlock:Be,paddingBlockStart:Be,paddingBlockEnd:Be,paddingInline:Be,paddingInlineStart:Be,paddingInlineEnd:Be,margin:Be,marginTop:Be,marginRight:Be,marginBottom:Be,marginLeft:Be,marginBlock:Be,marginBlockStart:Be,marginBlockEnd:Be,marginInline:Be,marginInlineStart:Be,marginInlineEnd:Be,fontSize:Be,backgroundPositionX:Be,backgroundPositionY:Be,...{rotate:td,rotateX:td,rotateY:td,rotateZ:td,scale:pI,scaleX:pI,scaleY:pI,scaleZ:pI,skew:td,skewX:td,skewY:td,distance:Be,translateX:Be,translateY:Be,translateZ:Be,x:Be,y:Be,z:Be,perspective:Be,transformPerspective:Be,opacity:TQ,originX:ix,originY:ix,originZ:Be},zIndex:Kx,fillOpacity:TQ,strokeOpacity:TQ,numOctaves:Kx},Hq={...Ky,color:Ds,backgroundColor:Ds,outlineColor:Ds,fill:Ds,stroke:Ds,borderColor:Ds,borderTopColor:Ds,borderRightColor:Ds,borderBottomColor:Ds,borderLeftColor:Ds,filter:Oy,WebkitFilter:Oy,mask:Jy,WebkitMask:Jy},jx=e=>Hq[e],mq=new Set([Oy,Jy]);function _x(e,A){let t=jx(e);return mq.has(t)||(t=to),t.getAnimatableNone?t.getAnimatableNone(A):void 0}const Eq=new Set(["auto","none","0"]);function yq(e,A,t){let n=0,s;for(;n<e.length&&!s;){const r=e[n];typeof r=="string"&&!Eq.has(r)&&Gh(r).values.length&&(s=e[n]),n++}if(s&&t)for(const r of A)e[r]=_x(t,s)}class Yq extends xy{constructor(A,t,n,s,r){super(A,t,n,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:A,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let g=0;g<A.length;g++){let u=A[g];if(typeof u=="string"&&(u=u.trim(),Gy(u))){const f=Px(u,t.current);f!==void 0&&(A[g]=f),g===A.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Sx.has(n)||A.length!==2)return;const[s,r]=A,a=Jx(s),B=Jx(r),c=rx(s),l=rx(r);if(c!==l&&nd[n]){this.needsMeasurement=!0;return}if(a!==B)if(Ix(a)&&Ix(B))for(let g=0;g<A.length;g++){const u=A[g];typeof u=="string"&&(A[g]=parseFloat(u))}else nd[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:A,name:t}=this,n=[];for(let s=0;s<A.length;s++)(A[s]===null||Cq(A[s]))&&n.push(s);n.length&&yq(A,n,t)}measureInitialState(){const{element:A,unresolvedKeyframes:t,name:n}=this;if(!A||!A.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=nd[n](A.measureViewportBox(),window.getComputedStyle(A.current)),t[0]=this.measuredOrigin;const s=t[t.length-1];s!==void 0&&A.getValue(n,s).jump(s,!1)}measureEndState(){const{element:A,name:t,unresolvedKeyframes:n}=this;if(!A||!A.current)return;const s=A.getValue(t);s&&s.jump(this.measuredOrigin,!1);const r=n.length-1,a=n[r];n[r]=nd[t](A.measureViewportBox(),window.getComputedStyle(A.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([B,c])=>{A.getValue(B).set(c)}),this.resolveNoneKeyframes()}}function qx(e,A,t){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const s=t?.[e]??n.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(n=>n!=null)}const $x=(e,A)=>A&&typeof e=="number"?A.transform(e):e;function ZI(e){return VM(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:jy}=tx(queueMicrotask,!1),no={x:!1,y:!1};function A2(){return no.x||no.y}function Zq(e){return e==="x"||e==="y"?no[e]?null:(no[e]=!0,()=>{no[e]=!1}):no.x||no.y?null:(no.x=no.y=!0,()=>{no.x=no.y=!1})}function e2(e,A){const t=qx(e),n=new AbortController,s={passive:!0,...A,signal:n.signal};return[t,s,()=>n.abort()]}function kq(e){return!(e.pointerType==="touch"||A2())}function Uq(e,A,t={}){const[n,s,r]=e2(e,t);return n.forEach(a=>{let B=!1,c=!1,l;const g=()=>{a.removeEventListener("pointerleave",v)},u=m=>{l&&(l(m),l=void 0),g()},f=m=>{B=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,u(m))},w=()=>{B=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},v=m=>{if(m.pointerType!=="touch"){if(B){c=!0;return}u(m)}},E=m=>{if(!kq(m))return;c=!1;const Z=A(a,m);typeof Z=="function"&&(l=Z,a.addEventListener("pointerleave",v,s))};a.addEventListener("pointerenter",E,s),a.addEventListener("pointerdown",w,s)}),r}const t2=(e,A)=>A?e===A?!0:t2(e,A.parentElement):!1,_y=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Dq=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Fq(e){return Dq.has(e.tagName)||e.isContentEditable===!0}const Mq=new Set(["INPUT","SELECT","TEXTAREA"]);function xq(e){return Mq.has(e.tagName)||e.isContentEditable===!0}const kI=new WeakSet;function n2(e){return A=>{A.key==="Enter"&&e(A)}}function qy(e,A){e.dispatchEvent(new PointerEvent("pointer"+A,{isPrimary:!0,bubbles:!0}))}const Pq=(e,A)=>{const t=e.currentTarget;if(!t)return;const n=n2(()=>{if(kI.has(t))return;qy(t,"down");const s=n2(()=>{qy(t,"up")}),r=()=>qy(t,"cancel");t.addEventListener("keyup",s,A),t.addEventListener("blur",r,A)});t.addEventListener("keydown",n,A),t.addEventListener("blur",()=>t.removeEventListener("keydown",n),A)};function s2(e){return _y(e)&&!A2()}const r2=new WeakSet;function Tq(e,A,t={}){const[n,s,r]=e2(e,t),a=B=>{const c=B.currentTarget;if(!s2(B)||r2.has(B))return;kI.add(c),t.stopPropagation&&r2.add(B);const l=A(c,B),g=(w,v)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",f),kI.has(c)&&kI.delete(c),s2(w)&&typeof l=="function"&&l(w,{success:v})},u=w=>{g(w,c===window||c===document||t.useGlobalTarget||t2(c,w.target))},f=w=>{g(w,!1)};window.addEventListener("pointerup",u,s),window.addEventListener("pointercancel",f,s)};return n.forEach(B=>{(t.useGlobalTarget?window:B).addEventListener("pointerdown",a,s),ZI(B)&&(B.addEventListener("focus",l=>Pq(l,s)),!Fq(B)&&!B.hasAttribute("tabindex")&&(B.tabIndex=0))}),r}function $y(e){return VM(e)&&"ownerSVGElement"in e}const UI=new WeakMap;let DI;const a2=(e,A,t)=>(n,s)=>s&&s[0]?s[0][e+"Size"]:$y(n)&&"getBBox"in n?n.getBBox()[A]:n[t],Rq=a2("inline","width","offsetWidth"),Sq=a2("block","height","offsetHeight");function Vq({target:e,borderBoxSize:A}){UI.get(e)?.forEach(t=>{t(e,{get width(){return Rq(e,A)},get height(){return Sq(e,A)}})})}function Wq(e){e.forEach(Vq)}function Nq(){typeof ResizeObserver>"u"||(DI=new ResizeObserver(Wq))}function zq(e,A){DI||Nq();const t=qx(e);return t.forEach(n=>{let s=UI.get(n);s||(s=new Set,UI.set(n,s)),s.add(A),DI?.observe(n)}),()=>{t.forEach(n=>{const s=UI.get(n);s?.delete(A),s?.size||DI?.unobserve(n)})}}const FI=new Set;let Qh;function Lq(){Qh=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};FI.forEach(A=>A(e))},window.addEventListener("resize",Qh)}function Xq(e){return FI.add(e),Qh||Lq(),()=>{FI.delete(e),!FI.size&&typeof Qh=="function"&&(window.removeEventListener("resize",Qh),Qh=void 0)}}function i2(e,A){return typeof e=="function"?Xq(e):zq(e,A)}function Oq(e){return $y(e)&&e.tagName==="svg"}const Jq=[...Ox,Ds,to],Kq=e=>Jq.find(Xx(e)),B2=()=>({translate:0,scale:1,origin:0,originPoint:0}),bh=()=>({x:B2(),y:B2()}),o2=()=>({min:0,max:0}),Ks=()=>({x:o2(),y:o2()}),jq=new WeakMap;function MI(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function NQ(e){return typeof e=="string"||Array.isArray(e)}const A3=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],e3=["initial",...A3];function xI(e){return MI(e.animate)||e3.some(A=>NQ(e[A]))}function c2(e){return!!(xI(e)||e.variants)}function _q(e,A,t){for(const n in A){const s=A[n],r=t[n];if(Ur(s))e.addValue(n,s);else if(Ur(r))e.addValue(n,wh(s,{owner:e}));else if(r!==s)if(e.hasValue(n)){const a=e.getValue(n);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(n);e.addValue(n,wh(a!==void 0?a:s,{owner:e}))}}for(const n in t)A[n]===void 0&&e.removeValue(n);return A}const t3={current:null},l2={current:!1},qq=typeof window<"u";function $q(){if(l2.current=!0,!!qq)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),A=()=>t3.current=e.matches;e.addEventListener("change",A),A()}else t3.current=!1}const g2=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let PI={};function d2(e){PI=e}function A$(){return PI}class e${scrapeMotionValuesFromProps(A,t,n){return{}}constructor({parent:A,props:t,presenceContext:n,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:a,visualState:B},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=xy,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const w=ca.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,cn.render(this.render,!1,!0))};const{latestValues:l,renderState:g}=B;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=g,this.parent=A,this.props=t,this.presenceContext=n,this.depth=A?A.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=xI(t),this.isVariantNode=c2(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(A&&A.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(t,{},this);for(const w in f){const v=f[w];l[w]!==void 0&&Ur(v)&&v.set(l[w])}}mount(A){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=A,jq.set(A,this),this.projection&&!this.projection.instance&&this.projection.mount(A),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,n)=>this.bindToMotionValue(n,t)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(l2.current||$q(),this.shouldReduceMotion=t3.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ed(this.notifyUpdate),ed(this.render),this.valueSubscriptions.forEach(A=>A()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const A in this.events)this.events[A].clear();for(const A in this.features){const t=this.features[A];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(A){this.children.add(A),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(A)}removeChild(A){this.children.delete(A),this.enteringChildren&&this.enteringChildren.delete(A)}bindToMotionValue(A,t){if(this.valueSubscriptions.has(A)&&this.valueSubscriptions.get(A)(),t.accelerate&&Mx.has(A)&&this.current instanceof HTMLElement){const{factory:a,keyframes:B,times:c,ease:l,duration:g}=t.accelerate,u=new Ux({element:this.current,name:A,keyframes:B,times:c,ease:l,duration:Hi(g)}),f=a(u);this.valueSubscriptions.set(A,()=>{f(),u.cancel()});return}const n=hh.has(A);n&&this.onBindTransform&&this.onBindTransform();const s=t.on("change",a=>{this.latestValues[A]=a,this.props.onUpdate&&cn.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,A,t)),this.valueSubscriptions.set(A,()=>{s(),r&&r(),t.owner&&t.stop()})}sortNodePosition(A){return!this.current||!this.sortInstanceNodePosition||this.type!==A.type?0:this.sortInstanceNodePosition(this.current,A.current)}updateFeatures(){let A="animation";for(A in PI){const t=PI[A];if(!t)continue;const{isEnabled:n,Feature:s}=t;if(!this.features[A]&&s&&n(this.props)&&(this.features[A]=new s(this)),this.features[A]){const r=this.features[A];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ks()}getStaticValue(A){return this.latestValues[A]}setStaticValue(A,t){this.latestValues[A]=t}update(A,t){(A.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=A,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<g2.length;n++){const s=g2[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,a=A[r];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=_q(this,this.scrapeMotionValuesFromProps(A,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(A){return this.props.variants?this.props.variants[A]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(A){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(A),()=>t.variantChildren.delete(A)}addValue(A,t){const n=this.values.get(A);t!==n&&(n&&this.removeValue(A),this.bindToMotionValue(A,t),this.values.set(A,t),this.latestValues[A]=t.get())}removeValue(A){this.values.delete(A);const t=this.valueSubscriptions.get(A);t&&(t(),this.valueSubscriptions.delete(A)),delete this.latestValues[A],this.removeValueFromRenderState(A,this.renderState)}hasValue(A){return this.values.has(A)}getValue(A,t){if(this.props.values&&this.props.values[A])return this.props.values[A];let n=this.values.get(A);return n===void 0&&t!==void 0&&(n=wh(t===null?void 0:t,{owner:this}),this.addValue(A,n)),n}readValue(A,t){let n=this.latestValues[A]!==void 0||!this.current?this.latestValues[A]:this.getBaseTargetFromProps(this.props,A)??this.readValueFromInstance(this.current,A,this.options);return n!=null&&(typeof n=="string"&&(SM(n)||WM(n))?n=parseFloat(n):!Kq(n)&&to.test(t)&&(n=_x(A,t)),this.setBaseTarget(A,Ur(n)?n.get():n)),Ur(n)?n.get():n}setBaseTarget(A,t){this.baseTarget[A]=t}getBaseTarget(A){const{initial:t}=this.props;let n;if(typeof t=="string"||typeof t=="object"){const r=Vy(this.props,t,this.presenceContext?.custom);r&&(n=r[A])}if(t&&n!==void 0)return n;const s=this.getBaseTargetFromProps(this.props,A);return s!==void 0&&!Ur(s)?s:this.initialValues[A]!==void 0&&n===void 0?void 0:this.baseTarget[A]}on(A,t){return this.events[A]||(this.events[A]=new ly),this.events[A].add(t)}notify(A,...t){this.events[A]&&this.events[A].notify(...t)}scheduleRenderMicrotask(){jy.render(this.render)}}class u2 extends e${constructor(){super(...arguments),this.KeyframeResolver=Yq}sortInstanceNodePosition(A,t){return A.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(A,t){const n=A.style;return n?n[t]:void 0}removeValueFromRenderState(A,{vars:t,style:n}){delete t[A],delete n[A]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:A}=this.props;Ur(A)&&(this.childSubscription=A.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class sd{constructor(A){this.isMounted=!1,this.node=A}update(){}}function G2({top:e,left:A,right:t,bottom:n}){return{x:{min:A,max:t},y:{min:e,max:n}}}function t$({x:e,y:A}){return{top:A.min,right:e.max,bottom:A.max,left:e.min}}function n$(e,A){if(!A)return e;const t=A({x:e.left,y:e.top}),n=A({x:e.right,y:e.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}function n3(e){return e===void 0||e===1}function s3({scale:e,scaleX:A,scaleY:t}){return!n3(e)||!n3(A)||!n3(t)}function dG(e){return s3(e)||f2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function f2(e){return h2(e.x)||h2(e.y)}function h2(e){return e&&e!=="0%"}function TI(e,A,t){const n=e-t,s=A*n;return t+s}function w2(e,A,t,n,s){return s!==void 0&&(e=TI(e,s,n)),TI(e,t,n)+A}function r3(e,A=0,t=1,n,s){e.min=w2(e.min,A,t,n,s),e.max=w2(e.max,A,t,n,s)}function Q2(e,{x:A,y:t}){r3(e.x,A.translate,A.scale,A.originPoint),r3(e.y,t.translate,t.scale,t.originPoint)}const b2=.999999999999,C2=1.0000000000001;function s$(e,A,t,n=!1){const s=t.length;if(!s)return;A.x=A.y=1;let r,a;for(let B=0;B<s;B++){r=t[B],a=r.projectionDelta;const{visualElement:c}=r.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(hc(e.x,-r.scroll.offset.x),hc(e.y,-r.scroll.offset.y)),a&&(A.x*=a.x.scale,A.y*=a.y.scale,Q2(e,a)),n&&dG(r.latestValues)&&RI(e,r.latestValues,r.layout?.layoutBox))}A.x<C2&&A.x>b2&&(A.x=1),A.y<C2&&A.y>b2&&(A.y=1)}function hc(e,A){e.min+=A,e.max+=A}function v2(e,A,t,n,s=.5){const r=mn(e.min,e.max,s);r3(e,A,t,r,n)}function I2(e,A){return typeof e=="string"?parseFloat(e)/100*(A.max-A.min):e}function RI(e,A,t){const n=t??e;v2(e.x,I2(A.x,n.x),A.scaleX,A.scale,A.originX),v2(e.y,I2(A.y,n.y),A.scaleY,A.scale,A.originY)}function p2(e,A){return G2(n$(e.getBoundingClientRect(),A))}function r$(e,A,t){const n=p2(e,t),{scroll:s}=A;return s&&(hc(n.x,s.offset.x),hc(n.y,s.offset.y)),n}const a$={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},i$=fh.length;function B$(e,A,t){let n="",s=!0;for(let r=0;r<i$;r++){const a=fh[r],B=e[a];if(B===void 0)continue;let c=!0;if(typeof B=="number")c=B===(a.startsWith("scale")?1:0);else{const l=parseFloat(B);c=a.startsWith("scale")?l===1:l===0}if(!c||t){const l=$x(B,Ky[a]);if(!c){s=!1;const g=a$[a]||a;n+=`${g}(${l}) `}t&&(A[a]=l)}}return n=n.trim(),t?n=t(A,s?"":n):s&&(n="none"),n}function a3(e,A,t){const{style:n,vars:s,transformOrigin:r}=e;let a=!1,B=!1;for(const c in A){const l=A[c];if(hh.has(c)){a=!0;continue}else if(sx(c)){s[c]=l;continue}else{const g=$x(l,Ky[c]);c.startsWith("origin")?(B=!0,r[c]=g):n[c]=g}}if(A.transform||(a||t?n.transform=B$(A,e.transform,t):n.transform&&(n.transform="none")),B){const{originX:c="50%",originY:l="50%",originZ:g=0}=r;n.transformOrigin=`${c} ${l} ${g}`}}function H2(e,{style:A,vars:t},n,s){const r=e.style;let a;for(a in A)r[a]=A[a];s?.applyProjectionStyles(r,n);for(a in t)r.setProperty(a,t[a])}function m2(e,A){return A.max===A.min?0:e/(A.max-A.min)*100}const zQ={correct:(e,A)=>{if(!A.target)return e;if(typeof e=="string")if(Be.test(e))e=parseFloat(e);else return e;const t=m2(e,A.target.x),n=m2(e,A.target.y);return`${t}% ${n}%`}},o$={correct:(e,{treeScale:A,projectionDelta:t})=>{const n=e,s=to.parse(e);if(s.length>5)return n;const r=to.createTransformer(e),a=typeof s[0]!="number"?1:0,B=t.x.scale*A.x,c=t.y.scale*A.y;s[0+a]/=B,s[1+a]/=c;const l=mn(B,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=l),typeof s[3+a]=="number"&&(s[3+a]/=l),r(s)}},i3={borderRadius:{...zQ,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zQ,borderTopRightRadius:zQ,borderBottomLeftRadius:zQ,borderBottomRightRadius:zQ,boxShadow:o$};function E2(e,{layout:A,layoutId:t}){return hh.has(e)||e.startsWith("origin")||(A||t!==void 0)&&(!!i3[e]||e==="opacity")}function B3(e,A,t){const n=e.style,s=A?.style,r={};if(!n)return r;for(const a in n)(Ur(n[a])||s&&Ur(s[a])||E2(a,e)||t?.getValue(a)?.liveStyle!==void 0)&&(r[a]=n[a]);return r}function c$(e){return window.getComputedStyle(e)}class l$ extends u2{constructor(){super(...arguments),this.type="html",this.renderInstance=H2}readValueFromInstance(A,t){if(hh.has(t))return this.projection?.isProjecting?ky(t):M6(A,t);{const n=c$(A),s=(sx(t)?n.getPropertyValue(t):n[t])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(A,{transformPagePoint:t}){return p2(A,t)}build(A,t,n){a3(A,t,n.transformTemplate)}scrapeMotionValuesFromProps(A,t,n){return B3(A,t,n)}}const g$={offset:"stroke-dashoffset",array:"stroke-dasharray"},d$={offset:"strokeDashoffset",array:"strokeDasharray"};function u$(e,A,t=1,n=0,s=!0){e.pathLength=1;const r=s?g$:d$;e[r.offset]=`${-n}`,e[r.array]=`${A} ${t}`}const G$=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function y2(e,{attrX:A,attrY:t,attrScale:n,pathLength:s,pathSpacing:r=1,pathOffset:a=0,...B},c,l,g){if(a3(e,B,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:u,style:f}=e;u.transform&&(f.transform=u.transform,delete u.transform),(f.transform||u.transformOrigin)&&(f.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),f.transform&&(f.transformBox=g?.transformBox??"fill-box",delete u.transformBox);for(const w of G$)u[w]!==void 0&&(f[w]=u[w],delete u[w]);A!==void 0&&(u.x=A),t!==void 0&&(u.y=t),n!==void 0&&(u.scale=n),s!==void 0&&u$(u,s,r,a,!1)}const Y2=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Z2=e=>typeof e=="string"&&e.toLowerCase()==="svg";function f$(e,A,t,n){H2(e,A,void 0,n);for(const s in A.attrs)e.setAttribute(Y2.has(s)?s:Ly(s),A.attrs[s])}function k2(e,A,t){const n=B3(e,A,t);for(const s in e)if(Ur(e[s])||Ur(A[s])){const r=fh.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[r]=e[s]}return n}class h$ extends u2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ks}getBaseTargetFromProps(A,t){return A[t]}readValueFromInstance(A,t){if(hh.has(t)){const n=jx(t);return n&&n.default||0}return t=Y2.has(t)?t:Ly(t),A.getAttribute(t)}scrapeMotionValuesFromProps(A,t,n){return k2(A,t,n)}build(A,t,n){y2(A,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(A,t,n,s){f$(A,t,n,s)}mount(A){this.isSVGTag=Z2(A.tagName),super.mount(A)}}const w$=e3.length;function U2(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent?U2(e.parent)||{}:{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}const A={};for(let t=0;t<w$;t++){const n=e3[t],s=e.props[n];(NQ(s)||s===!1)&&(A[n]=s)}return A}function D2(e,A){if(!Array.isArray(A))return!1;const t=A.length;if(t!==e.length)return!1;for(let n=0;n<t;n++)if(A[n]!==e[n])return!1;return!0}const Q$=[...A3].reverse(),b$=A3.length;function C$(e){return A=>Promise.all(A.map(({animation:t,options:n})=>Lx(e,t,n)))}function v$(e){let A=C$(e),t=F2(),n=!0,s=!1;const r=l=>(g,u)=>{const f=gG(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:w,transitionEnd:v,...E}=f;g={...g,...E,...v}}return g};function a(l){A=l(e)}function B(l){const{props:g}=e,u=U2(e.parent)||{},f=[],w=new Set;let v={},E=1/0;for(let Z=0;Z<b$;Z++){const D=Q$[Z],T=t[D],S=g[D]!==void 0?g[D]:u[D],F=NQ(S),V=D===l?T.isActive:null;V===!1&&(E=Z);let N=S===u[D]&&S!==g[D]&&F;if(N&&(n||s)&&e.manuallyAnimateOnMount&&(N=!1),T.protectedKeys={...v},!T.isActive&&V===null||!S&&!T.prevProp||MI(S)||typeof S=="boolean")continue;if(D==="exit"&&T.isActive&&V!==!0){T.prevResolvedValues&&(v={...v,...T.prevResolvedValues});continue}const X=I$(T.prevProp,S);let eA=X||D===l&&T.isActive&&!N&&F||Z>E&&F,$=!1;const rA=Array.isArray(S)?S:[S];let iA=rA.reduce(r(D),{});V===!1&&(iA={});const{prevResolvedValues:hA={}}=T,fA={...hA,...iA},yA=AA=>{eA=!0,w.has(AA)&&($=!0,w.delete(AA)),T.needsAnimating[AA]=!0;const MA=e.getValue(AA);MA&&(MA.liveStyle=!1)};for(const AA in fA){const MA=iA[AA],q=hA[AA];if(v.hasOwnProperty(AA))continue;let W=!1;Wy(MA)&&Wy(q)?W=!D2(MA,q):W=MA!==q,W?MA!=null?yA(AA):w.add(AA):MA!==void 0&&w.has(AA)?yA(AA):T.protectedKeys[AA]=!0}T.prevProp=S,T.prevResolvedValues=iA,T.isActive&&(v={...v,...iA}),(n||s)&&e.blockInitialAnimation&&(eA=!1);const L=N&&X;eA&&(!L||$)&&f.push(...rA.map(AA=>{const MA={type:D};if(typeof AA=="string"&&(n||s)&&!L&&e.manuallyAnimateOnMount&&e.parent){const{parent:q}=e,W=gG(q,AA);if(q.enteringChildren&&W){const{delayChildren:dA}=W.transition||{};MA.delay=xx(q.enteringChildren,e,dA)}}return{animation:AA,options:MA}}))}if(w.size){const Z={};if(typeof g.initial!="boolean"){const D=gG(e,Array.isArray(g.initial)?g.initial[0]:g.initial);D&&D.transition&&(Z.transition=D.transition)}w.forEach(D=>{const T=e.getBaseTarget(D),S=e.getValue(D);S&&(S.liveStyle=!0),Z[D]=T??null}),f.push({animation:Z})}let m=!!f.length;return n&&(g.initial===!1||g.initial===g.animate)&&!e.manuallyAnimateOnMount&&(m=!1),n=!1,s=!1,m?A(f):Promise.resolve()}function c(l,g){if(t[l].isActive===g)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(l,g)),t[l].isActive=g;const u=B(l);for(const f in t)t[f].protectedKeys={};return u}return{animateChanges:B,setActive:c,setAnimateFunction:a,getState:()=>t,reset:()=>{t=F2(),s=!0}}}function I$(e,A){return typeof A=="string"?A!==e:Array.isArray(A)?!D2(A,e):!1}function uG(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function F2(){return{animate:uG(!0),whileInView:uG(),whileHover:uG(),whileTap:uG(),whileDrag:uG(),whileFocus:uG(),exit:uG()}}function o3(e,A){e.min=A.min,e.max=A.max}function so(e,A){o3(e.x,A.x),o3(e.y,A.y)}function M2(e,A){e.translate=A.translate,e.scale=A.scale,e.originPoint=A.originPoint,e.origin=A.origin}const x2=1e-4,p$=1-x2,H$=1+x2,P2=.01,m$=0-P2,E$=0+P2;function la(e){return e.max-e.min}function y$(e,A,t){return Math.abs(e-A)<=t}function T2(e,A,t,n=.5){e.origin=n,e.originPoint=mn(A.min,A.max,e.origin),e.scale=la(t)/la(A),e.translate=mn(t.min,t.max,e.origin)-e.originPoint,(e.scale>=p$&&e.scale<=H$||isNaN(e.scale))&&(e.scale=1),(e.translate>=m$&&e.translate<=E$||isNaN(e.translate))&&(e.translate=0)}function LQ(e,A,t,n){T2(e.x,A.x,t.x,n?n.originX:void 0),T2(e.y,A.y,t.y,n?n.originY:void 0)}function R2(e,A,t,n=0){const s=n?mn(t.min,t.max,n):t.min;e.min=s+A.min,e.max=e.min+la(A)}function Y$(e,A,t,n){R2(e.x,A.x,t.x,n?.x),R2(e.y,A.y,t.y,n?.y)}function S2(e,A,t,n=0){const s=n?mn(t.min,t.max,n):t.min;e.min=A.min-s,e.max=e.min+la(A)}function SI(e,A,t,n){S2(e.x,A.x,t.x,n?.x),S2(e.y,A.y,t.y,n?.y)}function V2(e,A,t,n,s){return e-=A,e=TI(e,1/t,n),s!==void 0&&(e=TI(e,1/s,n)),e}function Z$(e,A=0,t=1,n=.5,s,r=e,a=e){if(fc.test(A)&&(A=parseFloat(A),A=mn(a.min,a.max,A/100)-a.min),typeof A!="number")return;let B=mn(r.min,r.max,n);e===r&&(B-=A),e.min=V2(e.min,A,t,B,s),e.max=V2(e.max,A,t,B,s)}function W2(e,A,[t,n,s],r,a){Z$(e,A[t],A[n],A[s],A.scale,r,a)}const k$=["x","scaleX","originX"],U$=["y","scaleY","originY"];function N2(e,A,t,n){W2(e.x,A,k$,t?t.x:void 0,n?n.x:void 0),W2(e.y,A,U$,t?t.y:void 0,n?n.y:void 0)}function z2(e){return e.translate===0&&e.scale===1}function L2(e){return z2(e.x)&&z2(e.y)}function X2(e,A){return e.min===A.min&&e.max===A.max}function D$(e,A){return X2(e.x,A.x)&&X2(e.y,A.y)}function O2(e,A){return Math.round(e.min)===Math.round(A.min)&&Math.round(e.max)===Math.round(A.max)}function J2(e,A){return O2(e.x,A.x)&&O2(e.y,A.y)}function K2(e){return la(e.x)/la(e.y)}function j2(e,A){return e.translate===A.translate&&e.scale===A.scale&&e.originPoint===A.originPoint}function wc(e){return[e("x"),e("y")]}function F$(e,A,t){let n="";const s=e.x.translate/A.x,r=e.y.translate/A.y,a=t?.z||0;if((s||r||a)&&(n=`translate3d(${s}px, ${r}px, ${a}px) `),(A.x!==1||A.y!==1)&&(n+=`scale(${1/A.x}, ${1/A.y}) `),t){const{transformPerspective:l,rotate:g,rotateX:u,rotateY:f,skewX:w,skewY:v}=t;l&&(n=`perspective(${l}px) ${n}`),g&&(n+=`rotate(${g}deg) `),u&&(n+=`rotateX(${u}deg) `),f&&(n+=`rotateY(${f}deg) `),w&&(n+=`skewX(${w}deg) `),v&&(n+=`skewY(${v}deg) `)}const B=e.x.scale*A.x,c=e.y.scale*A.y;return(B!==1||c!==1)&&(n+=`scale(${B}, ${c})`),n||"none"}const _2=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],M$=_2.length,q2=e=>typeof e=="string"?parseFloat(e):e,$2=e=>typeof e=="number"||Be.test(e);function x$(e,A,t,n,s,r){s?(e.opacity=mn(0,t.opacity??1,P$(n)),e.opacityExit=mn(A.opacity??1,0,T$(n))):r&&(e.opacity=mn(A.opacity??1,t.opacity??1,n));for(let a=0;a<M$;a++){const B=_2[a];let c=AP(A,B),l=AP(t,B);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||$2(c)===$2(l)?(e[B]=Math.max(mn(q2(c),q2(l),n),0),(fc.test(l)||fc.test(c))&&(e[B]+="%")):e[B]=l}(A.rotate||t.rotate)&&(e.rotate=mn(A.rotate||0,t.rotate||0,n))}function AP(e,A){return e[A]!==void 0?e[A]:e.borderRadius}const P$=eP(0,.5,_M),T$=eP(.5,.95,lB);function eP(e,A,t){return n=>n<e?0:n>A?1:t(xQ(e,A,n))}function R$(e,A,t){const n=Ur(e)?e:wh(e);return n.start(Sy("",n,A,t)),n.animation}function XQ(e,A,t,n={passive:!0}){return e.addEventListener(A,t,n),()=>e.removeEventListener(A,t)}const S$=(e,A)=>e.depth-A.depth;class V${constructor(){this.children=[],this.isDirty=!1}add(A){oy(this.children,A),this.isDirty=!0}remove(A){CI(this.children,A),this.isDirty=!0}forEach(A){this.isDirty&&this.children.sort(S$),this.isDirty=!1,this.children.forEach(A)}}function W$(e,A){const t=ca.now(),n=({timestamp:s})=>{const r=s-t;r>=A&&(ed(n),e(r-A))};return cn.setup(n,!0),()=>ed(n)}function VI(e){return Ur(e)?e.get():e}class N${constructor(){this.members=[]}add(A){oy(this.members,A);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===A||n===this.lead||n===this.prevLead)continue;const s=n.instance;(!s||s.isConnected===!1)&&!n.snapshot&&(CI(this.members,n),n.unmount())}A.scheduleRender()}remove(A){if(CI(this.members,A),A===this.prevLead&&(this.prevLead=void 0),A===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(A){for(let t=this.members.indexOf(A)-1;t>=0;t--){const n=this.members[t];if(n.isPresent!==!1&&n.instance?.isConnected!==!1)return this.promote(n),!0}return!1}promote(A,t){const n=this.lead;if(A!==n&&(this.prevLead=n,this.lead=A,A.show(),n)){n.updateSnapshot(),A.scheduleRender();const{layoutDependency:s}=n.options,{layoutDependency:r}=A.options;(s===void 0||s!==r)&&(A.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(A.snapshot=n.snapshot,A.snapshot.latestValues=n.animationValues||n.latestValues),A.root?.isUpdating&&(A.isLayoutDirty=!0)),A.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(A=>{A.options.onExitComplete?.(),A.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(A=>A.instance&&A.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const WI={hasAnimatedSinceResize:!0,hasEverUpdated:!1},c3=["","X","Y","Z"],z$=1e3;let L$=0;function l3(e,A,t,n){const{latestValues:s}=A;s[e]&&(t[e]=s[e],A.setStaticValue(e,0),n&&(n[e]=0))}function tP(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:A}=e.options;if(!A)return;const t=Nx(A);if(window.MotionHasOptimisedAnimation(t,"transform")){const{layout:s,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(t,"transform",cn,!(s||r))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&tP(n)}function nP({attachResizeListener:e,defaultParent:A,measureScroll:t,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(a={},B=A?.()){this.id=L$++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(J$),this.nodes.forEach(AAA),this.nodes.forEach(eAA),this.nodes.forEach(K$)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=B?B.root||B:this,this.path=B?[...B.path,B]:[],this.parent=B,this.depth=B?B.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new V$)}addEventListener(a,B){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new ly),this.eventHandlers.get(a).add(B)}notifyListeners(a,...B){const c=this.eventHandlers.get(a);c&&c.notify(...B)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=$y(a)&&!Oq(a),this.instance=a;const{layoutId:B,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||B)&&(this.isLayoutDirty=!0),e){let g,u=0;const f=()=>this.root.updateBlockedByResize=!1;cn.read(()=>{u=window.innerWidth}),e(a,()=>{const w=window.innerWidth;w!==u&&(u=w,this.root.updateBlockedByResize=!0,g&&g(),g=W$(f,250),WI.hasAnimatedSinceResize&&(WI.hasAnimatedSinceResize=!1,this.nodes.forEach(aP)))})}B&&this.root.registerSharedNode(B,this),this.options.animate!==!1&&l&&(B||c)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:u,hasRelativeLayoutChanged:f,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||l.getDefaultTransition()||aAA,{onLayoutAnimationStart:E,onLayoutAnimationComplete:m}=l.getProps(),Z=!this.targetLayout||!J2(this.targetLayout,w),D=!u&&f;if(this.options.layoutRoot||this.resumeFrom||D||u&&(Z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...Ry(v,"layout"),onPlay:E,onComplete:m};(l.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(g,D)}else u||aP(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ed(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(tAA),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&tP(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const u=this.path[g];u.shouldResetTransform=!0,(typeof u.latestValues.x=="string"||typeof u.latestValues.y=="string")&&(u.isLayoutDirty=!0),u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:B,layout:c}=this.options;if(B===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(_$),this.nodes.forEach(sP);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(rP);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(q$),this.nodes.forEach($$),this.nodes.forEach(X$),this.nodes.forEach(O$)):this.nodes.forEach(rP),this.clearAllSnapshots();const B=ca.now();kr.delta=Gc(0,1e3/60,B-kr.timestamp),kr.timestamp=B,kr.isProcessing=!0,uy.update.process(kr),uy.preRender.process(kr),uy.render.process(kr),kr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,jy.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(j$),this.sharedNodes.forEach(nAA)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,cn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){cn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!la(this.snapshot.measuredBox.x)&&!la(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Ks()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:B}=this.options;B&&B.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let B=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(B=!1),B&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,B=this.projectionDelta&&!L2(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,g=l!==this.prevTransformTemplateValue;a&&this.instance&&(B||dG(this.latestValues)||g)&&(s(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const B=this.measurePageBox();let c=this.removeElementScroll(B);return a&&(c=this.removeTransform(c)),iAA(c),{animationId:this.root.animationId,measuredBox:B,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Ks();const B=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(BAA))){const{scroll:l}=this.root;l&&(hc(B.x,l.offset.x),hc(B.y,l.offset.y))}return B}removeElementScroll(a){const B=Ks();if(so(B,a),this.scroll?.wasRoot)return B;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:g,options:u}=l;l!==this.root&&g&&u.layoutScroll&&(g.wasRoot&&so(B,a),hc(B.x,g.offset.x),hc(B.y,g.offset.y))}return B}applyTransform(a,B=!1,c){const l=c||Ks();so(l,a);for(let g=0;g<this.path.length;g++){const u=this.path[g];!B&&u.options.layoutScroll&&u.scroll&&u!==u.root&&(hc(l.x,-u.scroll.offset.x),hc(l.y,-u.scroll.offset.y)),dG(u.latestValues)&&RI(l,u.latestValues,u.layout?.layoutBox)}return dG(this.latestValues)&&RI(l,this.latestValues,this.layout?.layoutBox),l}removeTransform(a){const B=Ks();so(B,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!dG(l.latestValues))continue;let g;l.instance&&(s3(l.latestValues)&&l.updateSnapshot(),g=Ks(),so(g,l.measurePageBox())),N2(B,l.latestValues,l.snapshot?.layoutBox,g)}return dG(this.latestValues)&&N2(B,this.latestValues),B}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==kr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const B=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=B.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=B.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=B.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==B;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:u}=this.options;if(!this.layout||!(g||u))return;this.resolvedRelativeTargetAt=kr.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ks(),this.targetWithTransforms=Ks()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Y$(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):so(this.target,this.layout.layoutBox),Q2(this.target,this.targetDelta)):so(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||s3(this.parent.latestValues)||f2(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,B,c){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ks(),this.relativeTargetOrigin=Ks(),SI(this.relativeTargetOrigin,B,c,this.options.layoutAnchor||void 0),so(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),B=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),B&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===kr.timestamp&&(c=!1),c)return;const{layout:l,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||g))return;so(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,f=this.treeScale.y;s$(this.layoutCorrected,this.treeScale,this.path,B),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ks());const{target:w}=a;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(M2(this.prevProjectionDelta.x,this.projectionDelta.x),M2(this.prevProjectionDelta.y,this.projectionDelta.y)),LQ(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==f||!j2(this.projectionDelta.x,this.prevProjectionDelta.x)||!j2(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const B=this.getStack();B&&B.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=bh(),this.projectionDelta=bh(),this.projectionDeltaWithTransform=bh()}setAnimationOrigin(a,B=!1){const c=this.snapshot,l=c?c.latestValues:{},g={...this.latestValues},u=bh();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!B;const f=Ks(),w=c?c.source:void 0,v=this.layout?this.layout.source:void 0,E=w!==v,m=this.getStack(),Z=!m||m.members.length<=1,D=!!(E&&!Z&&this.options.crossfade===!0&&!this.path.some(rAA));this.animationProgress=0;let T;this.mixTargetDelta=S=>{const F=S/1e3;iP(u.x,a.x,F),iP(u.y,a.y,F),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(SI(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),sAA(this.relativeTarget,this.relativeTargetOrigin,f,F),T&&D$(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Ks()),so(T,this.relativeTarget)),E&&(this.animationValues=g,x$(g,l,this.latestValues,F,D,Z)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=F},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ed(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=cn.update(()=>{WI.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=wh(0)),this.motionValue.jump(0,!1),this.currentAnimation=R$(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:B=>{this.mixTargetDelta(B),a.onUpdate&&a.onUpdate(B)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(z$),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:B,target:c,layout:l,latestValues:g}=a;if(!(!B||!c||!l)){if(this!==a&&this.layout&&l&&gP(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Ks();const u=la(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+u;const f=la(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}so(B,c),RI(B,g),LQ(this.projectionDeltaWithTransform,this.layoutCorrected,B,g)}}registerSharedNode(a,B){this.sharedNodes.has(a)||this.sharedNodes.set(a,new N$),this.sharedNodes.get(a).add(B);const l=B.options.initialPromotionConfig;B.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(B):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:B,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),B&&this.setOptions({transition:B})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let B=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(B=!0),!B)return;const l={};c.z&&l3("z",a,l,this.animationValues);for(let g=0;g<c3.length;g++)l3(`rotate${c3[g]}`,a,l,this.animationValues),l3(`skew${c3[g]}`,a,l,this.animationValues);a.render();for(const g in l)a.setStaticValue(g,l[g]),this.animationValues&&(this.animationValues[g]=l[g]);a.scheduleRender()}applyProjectionStyles(a,B){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=VI(B?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=VI(B?.pointerEvents)||""),this.hasProjected&&!dG(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const g=l.animationValues||l.latestValues;this.applyTransformsToTarget();let u=F$(this.projectionDeltaWithTransform,this.treeScale,g);c&&(u=c(g,u)),a.transform=u;const{x:f,y:w}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${w.origin*100}% 0`,l.animationValues?a.opacity=l===this?g.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:a.opacity=l===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const v in i3){if(g[v]===void 0)continue;const{correct:E,applyTo:m,isCSSVariable:Z}=i3[v],D=u==="none"?g[v]:E(g[v],l);if(m){const T=m.length;for(let S=0;S<T;S++)a[m[S]]=D}else Z?this.options.visualElement.renderState.vars[v]=D:a[v]=D}this.options.layoutId&&(a.pointerEvents=l===this?VI(B?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(sP),this.root.sharedNodes.clear()}}}function X$(e){e.updateLayout()}function O$(e){const A=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&A&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:n}=e.layout,{animationType:s}=e.options,r=A.source!==e.layout.source;if(s==="size")wc(g=>{const u=r?A.measuredBox[g]:A.layoutBox[g],f=la(u);u.min=t[g].min,u.max=u.min+f});else if(s==="x"||s==="y"){const g=s==="x"?"y":"x";o3(r?A.measuredBox[g]:A.layoutBox[g],t[g])}else gP(s,A.layoutBox,t)&&wc(g=>{const u=r?A.measuredBox[g]:A.layoutBox[g],f=la(t[g]);u.max=u.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[g].max=e.relativeTarget[g].min+f)});const a=bh();LQ(a,t,A.layoutBox);const B=bh();r?LQ(B,e.applyTransform(n,!0),A.measuredBox):LQ(B,t,A.layoutBox);const c=!L2(a);let l=!1;if(!e.resumeFrom){const g=e.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:u,layout:f}=g;if(u&&f){const w=e.options.layoutAnchor||void 0,v=Ks();SI(v,A.layoutBox,u.layoutBox,w);const E=Ks();SI(E,t,f.layoutBox,w),J2(v,E)||(l=!0),g.options.layoutRoot&&(e.relativeTarget=E,e.relativeTargetOrigin=v,e.relativeParent=g)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:A,delta:B,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function J$(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function K$(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function j$(e){e.clearSnapshot()}function sP(e){e.clearMeasurements()}function _$(e){e.isLayoutDirty=!0,e.updateLayout()}function rP(e){e.isLayoutDirty=!1}function q$(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function $$(e){const{visualElement:A}=e.options;A&&A.getProps().onBeforeLayoutMeasure&&A.notify("BeforeLayoutMeasure"),e.resetTransform()}function aP(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function AAA(e){e.resolveTargetDelta()}function eAA(e){e.calcProjection()}function tAA(e){e.resetSkewAndRotation()}function nAA(e){e.removeLeadSnapshot()}function iP(e,A,t){e.translate=mn(A.translate,0,t),e.scale=mn(A.scale,1,t),e.origin=A.origin,e.originPoint=A.originPoint}function BP(e,A,t,n){e.min=mn(A.min,t.min,n),e.max=mn(A.max,t.max,n)}function sAA(e,A,t,n){BP(e.x,A.x,t.x,n),BP(e.y,A.y,t.y,n)}function rAA(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const aAA={duration:.45,ease:[.4,0,.1,1]},oP=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),cP=oP("applewebkit/")&&!oP("chrome/")?Math.round:lB;function lP(e){e.min=cP(e.min),e.max=cP(e.max)}function iAA(e){lP(e.x),lP(e.y)}function gP(e,A,t){return e==="position"||e==="preserve-aspect"&&!y$(K2(A),K2(t),.2)}function BAA(e){return e!==e.root&&e.scroll?.wasRoot}const oAA=nP({attachResizeListener:(e,A)=>XQ(e,"resize",A),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),g3={current:void 0},dP=nP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!g3.current){const e=new oAA({});e.mount(window),e.setOptions({layoutScroll:!0}),g3.current=e}return g3.current},resetTransform:(e,A)=>{e.style.transform=A!==void 0?A:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),d3=R.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function uP(e,A){if(typeof e=="function")return e(A);e!=null&&(e.current=A)}function cAA(...e){return A=>{let t=!1;const n=e.map(s=>{const r=uP(s,A);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let s=0;s<n.length;s++){const r=n[s];typeof r=="function"?r():uP(e[s],null)}}}}function lAA(...e){return R.useCallback(cAA(...e),e)}class gAA extends R.Component{getSnapshotBeforeUpdate(A){const t=this.props.childRef.current;if(ZI(t)&&A.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const n=t.offsetParent,s=ZI(n)&&n.offsetWidth||0,r=ZI(n)&&n.offsetHeight||0,a=getComputedStyle(t),B=this.props.sizeRef.current;B.height=parseFloat(a.height),B.width=parseFloat(a.width),B.top=t.offsetTop,B.left=t.offsetLeft,B.right=s-B.width-B.left,B.bottom=r-B.height-B.top}return null}componentDidUpdate(){}render(){return this.props.children}}function dAA({children:e,isPresent:A,anchorX:t,anchorY:n,root:s,pop:r}){const a=R.useId(),B=R.useRef(null),c=R.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=R.useContext(d3),g=e.props?.ref??e?.ref,u=lAA(B,g);return R.useInsertionEffect(()=>{const{width:f,height:w,top:v,left:E,right:m,bottom:Z}=c.current;if(A||r===!1||!B.current||!f||!w)return;const D=t==="left"?`left: ${E}`:`right: ${m}`,T=n==="bottom"?`bottom: ${Z}`:`top: ${v}`;B.current.dataset.motionPopId=a;const S=document.createElement("style");l&&(S.nonce=l);const F=s??document.head;return F.appendChild(S),S.sheet&&S.sheet.insertRule(`
56
+ Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}/*`}">.`)}let g=Ao(),u;if(A){let m=typeof A=="string"?iG(A):A;As(c==="/"||m.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${m.pathname}" was given in the \`location\` prop.`),u=m}else u=g;let f=u.pathname||"/",w=f;if(c!=="/"){let m=c.replace(/^\//,"").split("/");w="/"+f.replace(/^\//,"").split("/").slice(m.length).join("/")}let v=wM(e,{pathname:w});$B(l||v!=null,`No routes matched location "${u.pathname}${u.search}${u.hash}" `),$B(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${u.pathname}${u.search}${u.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=Rj(v&&v.map(m=>Object.assign({},m,{params:Object.assign({},a,m.params),pathname:dc([c,n.encodeLocation?n.encodeLocation(m.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?c:dc([c,n.encodeLocation?n.encodeLocation(m.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),s,t);return A&&E?R.createElement(ZQ.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...u},navigationType:"POP"}},E):E}function Mj(){let e=zj(),A=vj(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),t=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:n},r={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=R.createElement(R.Fragment,null,R.createElement("p",null,"💿 Hey developer 👋"),R.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",R.createElement("code",{style:r},"ErrorBoundary")," or"," ",R.createElement("code",{style:r},"errorElement")," prop on your route.")),R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},A),t?R.createElement("pre",{style:s},t):null,a)}var xj=R.createElement(Mj,null),DM=class extends R.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,A){return A.location!==e.location||A.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:A.error,location:A.location,revalidation:e.revalidation||A.revalidation}}componentDidCatch(e,A){this.props.onError?this.props.onError(e,A):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const t=kj(e.digest);t&&(e=t)}let A=e!==void 0?R.createElement(Hl.Provider,{value:this.props.routeContext},R.createElement(JE.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?R.createElement(Pj,{error:e},A):A}};DM.contextType=EM;var KE=new WeakMap;function Pj({children:e,error:A}){let{basename:t}=R.useContext(cB);if(typeof A=="object"&&A&&"digest"in A&&typeof A.digest=="string"){let n=Zj(A.digest);if(n){let s=KE.get(A);if(s)throw s;let r=HM(n.location,t);if(pM&&!KE.get(A))if(r.isExternal||n.reloadDocument)window.location.href=r.absoluteURL||r.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(r.to,{replace:n.replace}));throw KE.set(A,a),a}return R.createElement("meta",{httpEquiv:"refresh",content:`0;url=${r.absoluteURL||r.to}`})}}return e}function Tj({routeContext:e,match:A,children:t}){let n=R.useContext(gh);return n&&n.static&&n.staticContext&&(A.route.errorElement||A.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=A.route.id),R.createElement(Hl.Provider,{value:e},t)}function Rj(e,A=[],t){let n=t?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(A.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,r=n?.errors;if(r!=null){let g=s.findIndex(u=>u.route.id&&r?.[u.route.id]!==void 0);As(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(r).join(",")}`),s=s.slice(0,Math.min(s.length,g+1))}let a=!1,B=-1;if(t&&n){a=n.renderFallback;for(let g=0;g<s.length;g++){let u=s[g];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(B=g),u.route.id){let{loaderData:f,errors:w}=n,v=u.route.loader&&!f.hasOwnProperty(u.route.id)&&(!w||w[u.route.id]===void 0);if(u.route.lazy||v){t.isStatic&&(a=!0),B>=0?s=s.slice(0,B+1):s=[s[0]];break}}}}let c=t?.onError,l=n&&c?(g,u)=>{c(g,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Ij(n.matches),errorInfo:u})}:void 0;return s.reduceRight((g,u,f)=>{let w,v=!1,E=null,m=null;n&&(w=r&&u.route.id?r[u.route.id]:void 0,E=u.route.errorElement||xj,a&&(B<0&&f===0?(MM("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,m=null):B===f&&(v=!0,m=u.route.hydrateFallbackElement||null)));let Z=A.concat(s.slice(0,f+1)),D=()=>{let T;return w?T=E:v?T=m:u.route.Component?T=R.createElement(u.route.Component,null):u.route.element?T=u.route.element:T=g,R.createElement(Tj,{match:u,routeContext:{outlet:g,matches:Z,isDataRoute:n!=null},children:T})};return n&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?R.createElement(DM,{location:n.location,revalidation:n.revalidation,component:E,error:w,children:D(),routeContext:{outlet:null,matches:Z,isDataRoute:!0},onError:l}):D()},null)}function jE(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Sj(e){let A=R.useContext(gh);return As(A,jE(e)),A}function Vj(e){let A=R.useContext(lI);return As(A,jE(e)),A}function Wj(e){let A=R.useContext(Hl);return As(A,jE(e)),A}function _E(e){let A=Wj(e),t=A.matches[A.matches.length-1];return As(t.route.id,`${e} can only be used on routes that contain a unique "id"`),t.route.id}function Nj(){return _E("useRouteId")}function zj(){let e=R.useContext(JE),A=Vj("useRouteError"),t=_E("useRouteError");return e!==void 0?e:A.errors?.[t]}function Lj(){let{router:e}=Sj("useNavigate"),A=_E("useNavigate"),t=R.useRef(!1);return kM(()=>{t.current=!0}),R.useCallback(async(s,r={})=>{$B(t.current,ZM),t.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:A,...r}))},[e,A])}var FM={};function MM(e,A,t){!A&&!FM[e]&&(FM[e]=!0,$B(!1,t))}R.memo(Xj);function Xj({routes:e,future:A,state:t,isStatic:n,onError:s}){return UM(e,void 0,{state:t,isStatic:n,onError:s})}function Oj({basename:e,children:A,initialEntries:t,initialIndex:n,unstable_useTransitions:s}){let r=R.useRef();r.current==null&&(r.current=$K({initialEntries:t,initialIndex:n,v5Compat:!0}));let a=r.current,[B,c]=R.useState({action:a.action,location:a.location}),l=R.useCallback(g=>{s===!1?c(g):R.startTransition(()=>c(g))},[s]);return R.useLayoutEffect(()=>a.listen(l),[a,l]),R.createElement(Jj,{basename:e,children:A,location:B.location,navigationType:B.action,navigator:a,unstable_useTransitions:s})}function uc(e){As(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Jj({basename:e="/",children:A=null,location:t,navigationType:n="POP",navigator:s,static:r=!1,unstable_useTransitions:a}){As(!kQ(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let B=e.replace(/^\/*/,"/"),c=R.useMemo(()=>({basename:B,navigator:s,static:r,unstable_useTransitions:a,future:{}}),[B,s,r,a]);typeof t=="string"&&(t=iG(t));let{pathname:l="/",search:g="",hash:u="",state:f=null,key:w="default",unstable_mask:v}=t,E=R.useMemo(()=>{let m=pl(l,B);return m==null?null:{location:{pathname:m,search:g,hash:u,state:f,key:w,unstable_mask:v},navigationType:n}},[B,l,g,u,f,w,n,v]);return $B(E!=null,`<Router basename="${B}"> is not able to match the URL "${l}${g}${u}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:R.createElement(cB.Provider,{value:c},R.createElement(ZQ.Provider,{children:A,value:E}))}function Kj({children:e,location:A}){return Fj(qE(e),A)}function qE(e,A=[]){let t=[];return R.Children.forEach(e,(n,s)=>{if(!R.isValidElement(n))return;let r=[...A,s];if(n.type===R.Fragment){t.push.apply(t,qE(n.props.children,r));return}As(n.type===uc,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),As(!n.props.index||!n.props.children,"An index route cannot have child routes.");let a={id:n.props.id||r.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=qE(n.props.children,r)),t.push(a)}),t}var gI="get",dI="application/x-www-form-urlencoded";function uI(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function jj(e){return uI(e)&&e.tagName.toLowerCase()==="button"}function _j(e){return uI(e)&&e.tagName.toLowerCase()==="form"}function qj(e){return uI(e)&&e.tagName.toLowerCase()==="input"}function $j(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function A_(e,A){return e.button===0&&(!A||A==="_self")&&!$j(e)}var GI=null;function e_(){if(GI===null)try{new FormData(document.createElement("form"),0),GI=!1}catch{GI=!0}return GI}var t_=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $E(e){return e!=null&&!t_.has(e)?($B(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${dI}"`),null):e}function n_(e,A){let t,n,s,r,a;if(_j(e)){let B=e.getAttribute("action");n=B?pl(B,A):null,t=e.getAttribute("method")||gI,s=$E(e.getAttribute("enctype"))||dI,r=new FormData(e)}else if(jj(e)||qj(e)&&(e.type==="submit"||e.type==="image")){let B=e.form;if(B==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||B.getAttribute("action");if(n=c?pl(c,A):null,t=e.getAttribute("formmethod")||B.getAttribute("method")||gI,s=$E(e.getAttribute("formenctype"))||$E(B.getAttribute("enctype"))||dI,r=new FormData(B,e),!e_()){let{name:l,type:g,value:u}=e;if(g==="image"){let f=l?`${l}.`:"";r.append(`${f}x`,"0"),r.append(`${f}y`,"0")}else l&&r.append(l,u)}}else{if(uI(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=gI,n=null,s=dI,a=e}return r&&s==="text/plain"&&(a=r,r=void 0),{action:n,method:t.toLowerCase(),encType:s,formData:r,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ay(e,A){if(e===!1||e===null||typeof e>"u")throw new Error(A)}function xM(e,A,t,n){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${n}`:s.pathname=`${s.pathname}.${n}`:s.pathname==="/"?s.pathname=`_root.${n}`:A&&pl(s.pathname,A)==="/"?s.pathname=`${A.replace(/\/$/,"")}/_root.${n}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${n}`,s}async function s_(e,A){if(e.id in A)return A[e.id];try{let t=await import(e.module);return A[e.id]=t,t}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function r_(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function a_(e,A,t){let n=await Promise.all(e.map(async s=>{let r=A.routes[s.route.id];if(r){let a=await s_(r,t);return a.links?a.links():[]}return[]}));return c_(n.flat(1).filter(r_).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function PM(e,A,t,n,s,r){let a=(c,l)=>t[l]?c.route.id!==t[l].route.id:!0,B=(c,l)=>t[l].pathname!==c.pathname||t[l].route.path?.endsWith("*")&&t[l].params["*"]!==c.params["*"];return r==="assets"?A.filter((c,l)=>a(c,l)||B(c,l)):r==="data"?A.filter((c,l)=>{let g=n.routes[c.route.id];if(!g||!g.hasLoader)return!1;if(a(c,l)||B(c,l))return!0;if(c.route.shouldRevalidate){let u=c.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof u=="boolean")return u}return!0}):[]}function i_(e,A,{includeHydrateFallback:t}={}){return B_(e.map(n=>{let s=A.routes[n.route.id];if(!s)return[];let r=[s.module];return s.clientActionModule&&(r=r.concat(s.clientActionModule)),s.clientLoaderModule&&(r=r.concat(s.clientLoaderModule)),t&&s.hydrateFallbackModule&&(r=r.concat(s.hydrateFallbackModule)),s.imports&&(r=r.concat(s.imports)),r}).flat(1))}function B_(e){return[...new Set(e)]}function o_(e){let A={},t=Object.keys(e).sort();for(let n of t)A[n]=e[n];return A}function c_(e,A){let t=new Set;return new Set(A),e.reduce((n,s)=>{let r=JSON.stringify(o_(s));return t.has(r)||(t.add(r),n.push({key:r,link:s})),n},[])}function ey(){let e=R.useContext(gh);return Ay(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function l_(){let e=R.useContext(lI);return Ay(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ty=R.createContext(void 0);ty.displayName="FrameworkContext";function ny(){let e=R.useContext(ty);return Ay(e,"You must render this element inside a <HydratedRouter> element"),e}function g_(e,A){let t=R.useContext(ty),[n,s]=R.useState(!1),[r,a]=R.useState(!1),{onFocus:B,onBlur:c,onMouseEnter:l,onMouseLeave:g,onTouchStart:u}=A,f=R.useRef(null);R.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let E=Z=>{Z.forEach(D=>{a(D.isIntersecting)})},m=new IntersectionObserver(E,{threshold:.5});return f.current&&m.observe(f.current),()=>{m.disconnect()}}},[e]),R.useEffect(()=>{if(n){let E=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(E)}}},[n]);let w=()=>{s(!0)},v=()=>{s(!1),a(!1)};return t?e!=="intent"?[r,f,{}]:[r,f,{onFocus:DQ(B,w),onBlur:DQ(c,v),onMouseEnter:DQ(l,w),onMouseLeave:DQ(g,v),onTouchStart:DQ(u,w)}]:[!1,f,{}]}function DQ(e,A){return t=>{e&&e(t),t.defaultPrevented||A(t)}}function d_({page:e,...A}){let t=Hj(),{router:n}=ey(),s=R.useMemo(()=>wM(n.routes,e,n.basename),[n.routes,e,n.basename]);return s?t?R.createElement(G_,{page:e,matches:s,...A}):R.createElement(f_,{page:e,matches:s,...A}):null}function u_(e){let{manifest:A,routeModules:t}=ny(),[n,s]=R.useState([]);return R.useEffect(()=>{let r=!1;return a_(e,A,t).then(a=>{r||s(a)}),()=>{r=!0}},[e,A,t]),n}function G_({page:e,matches:A,...t}){let n=Ao(),{future:s}=ny(),{basename:r}=ey(),a=R.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let B=xM(e,r,s.unstable_trailingSlashAwareDataRequests,"rsc"),c=!1,l=[];for(let g of A)typeof g.route.shouldRevalidate=="function"?c=!0:l.push(g.route.id);return c&&l.length>0&&B.searchParams.set("_routes",l.join(",")),[B.pathname+B.search]},[r,s.unstable_trailingSlashAwareDataRequests,e,n,A]);return R.createElement(R.Fragment,null,a.map(B=>R.createElement("link",{key:B,rel:"prefetch",as:"fetch",href:B,...t})))}function f_({page:e,matches:A,...t}){let n=Ao(),{future:s,manifest:r,routeModules:a}=ny(),{basename:B}=ey(),{loaderData:c,matches:l}=l_(),g=R.useMemo(()=>PM(e,A,l,r,n,"data"),[e,A,l,r,n]),u=R.useMemo(()=>PM(e,A,l,r,n,"assets"),[e,A,l,r,n]),f=R.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let E=new Set,m=!1;if(A.forEach(D=>{let T=r.routes[D.route.id];!T||!T.hasLoader||(!g.some(S=>S.route.id===D.route.id)&&D.route.id in c&&a[D.route.id]?.shouldRevalidate||T.hasClientLoader?m=!0:E.add(D.route.id))}),E.size===0)return[];let Z=xM(e,B,s.unstable_trailingSlashAwareDataRequests,"data");return m&&E.size>0&&Z.searchParams.set("_routes",A.filter(D=>E.has(D.route.id)).map(D=>D.route.id).join(",")),[Z.pathname+Z.search]},[B,s.unstable_trailingSlashAwareDataRequests,c,n,r,g,A,e,a]),w=R.useMemo(()=>i_(u,r),[u,r]),v=u_(u);return R.createElement(R.Fragment,null,f.map(E=>R.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...t})),w.map(E=>R.createElement("link",{key:E,rel:"modulepreload",href:E,...t})),v.map(({key:E,link:m})=>R.createElement("link",{key:E,nonce:t.nonce,...m,crossOrigin:m.crossOrigin??t.crossOrigin})))}function h_(...e){return A=>{e.forEach(t=>{typeof t=="function"?t(A):t!=null&&(t.current=A)})}}var w_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{w_&&(window.__reactRouterVersion="7.14.0")}catch{}var TM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fI=R.forwardRef(function({onClick:A,discover:t="render",prefetch:n="none",relative:s,reloadDocument:r,replace:a,unstable_mask:B,state:c,target:l,to:g,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:w,...v},E){let{basename:m,navigator:Z,unstable_useTransitions:D}=R.useContext(cB),T=typeof g=="string"&&TM.test(g),S=HM(g,m);g=S.to;let F=Uj(g,{relative:s}),V=Ao(),N=null;if(B){let yA=OE(B,[],V.unstable_mask?V.unstable_mask.pathname:"/",!0);m!=="/"&&(yA.pathname=yA.pathname==="/"?m:dc([m,yA.pathname])),N=Z.createHref(yA)}let[X,eA,$]=g_(n,v),rA=v_(g,{replace:a,unstable_mask:B,state:c,target:l,preventScrollReset:u,relative:s,viewTransition:f,unstable_defaultShouldRevalidate:w,unstable_useTransitions:D});function iA(yA){A&&A(yA),yA.defaultPrevented||rA(yA)}let hA=!(S.isExternal||r),fA=R.createElement("a",{...v,...$,href:(hA?N:void 0)||S.absoluteURL||F,onClick:hA?iA:A,ref:h_(E,eA),target:l,"data-discover":!T&&t==="render"?"true":void 0});return X&&!T?R.createElement(R.Fragment,null,fA,R.createElement(d_,{page:F})):fA});fI.displayName="Link";var Q_=R.forwardRef(function({"aria-current":A="page",caseSensitive:t=!1,className:n="",end:s=!1,style:r,to:a,viewTransition:B,children:c,...l},g){let u=UQ(a,{relative:l.relative}),f=Ao(),w=R.useContext(lI),{navigator:v,basename:E}=R.useContext(cB),m=w!=null&&E_(u)&&B===!0,Z=v.encodeLocation?v.encodeLocation(u).pathname:u.pathname,D=f.pathname,T=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;t||(D=D.toLowerCase(),T=T?T.toLowerCase():null,Z=Z.toLowerCase()),T&&E&&(T=pl(T,E)||T);const S=Z!=="/"&&Z.endsWith("/")?Z.length-1:Z.length;let F=D===Z||!s&&D.startsWith(Z)&&D.charAt(S)==="/",V=T!=null&&(T===Z||!s&&T.startsWith(Z)&&T.charAt(Z.length)==="/"),N={isActive:F,isPending:V,isTransitioning:m},X=F?A:void 0,eA;typeof n=="function"?eA=n(N):eA=[n,F?"active":null,V?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let $=typeof r=="function"?r(N):r;return R.createElement(fI,{...l,"aria-current":X,className:eA,ref:g,style:$,to:a,viewTransition:B},typeof c=="function"?c(N):c)});Q_.displayName="NavLink";var b_=R.forwardRef(({discover:e="render",fetcherKey:A,navigate:t,reloadDocument:n,replace:s,state:r,method:a=gI,action:B,onSubmit:c,relative:l,preventScrollReset:g,viewTransition:u,unstable_defaultShouldRevalidate:f,...w},v)=>{let{unstable_useTransitions:E}=R.useContext(cB),m=H_(),Z=m_(B,{relative:l}),D=a.toLowerCase()==="get"?"get":"post",T=typeof B=="string"&&TM.test(B),S=F=>{if(c&&c(F),F.defaultPrevented)return;F.preventDefault();let V=F.nativeEvent.submitter,N=V?.getAttribute("formmethod")||a,X=()=>m(V||F.currentTarget,{fetcherKey:A,method:N,navigate:t,replace:s,state:r,relative:l,preventScrollReset:g,viewTransition:u,unstable_defaultShouldRevalidate:f});E&&t!==!1?R.startTransition(()=>X()):X()};return R.createElement("form",{ref:v,method:D,action:Z,onSubmit:n?c:S,...w,"data-discover":!T&&e==="render"?"true":void 0})});b_.displayName="Form";function C_(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function RM(e){let A=R.useContext(gh);return As(A,C_(e)),A}function v_(e,{target:A,replace:t,unstable_mask:n,state:s,preventScrollReset:r,relative:a,viewTransition:B,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let g=za(),u=Ao(),f=UQ(e,{relative:a});return R.useCallback(w=>{if(A_(w,A)){w.preventDefault();let v=t!==void 0?t:oI(u)===oI(f),E=()=>g(e,{replace:v,unstable_mask:n,state:s,preventScrollReset:r,relative:a,viewTransition:B,unstable_defaultShouldRevalidate:c});l?R.startTransition(()=>E()):E()}},[u,g,f,t,n,s,A,e,r,a,B,c,l])}var I_=0,p_=()=>`__${String(++I_)}__`;function H_(){let{router:e}=RM("useSubmit"),{basename:A}=R.useContext(cB),t=Nj(),n=e.fetch,s=e.navigate;return R.useCallback(async(r,a={})=>{let{action:B,method:c,encType:l,formData:g,body:u}=n_(r,A);if(a.navigate===!1){let f=a.fetcherKey||p_();await n(f,t,a.action||B,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:g,body:u,formMethod:a.method||c,formEncType:a.encType||l,flushSync:a.flushSync})}else await s(a.action||B,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:g,body:u,formMethod:a.method||c,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:t,flushSync:a.flushSync,viewTransition:a.viewTransition})},[n,s,A,t])}function m_(e,{relative:A}={}){let{basename:t}=R.useContext(cB),n=R.useContext(Hl);As(n,"useFormAction must be used inside a RouteContext");let[s]=n.matches.slice(-1),r={...UQ(e||".",{relative:A})},a=Ao();if(e==null){r.search=a.search;let B=new URLSearchParams(r.search),c=B.getAll("index");if(c.some(g=>g==="")){B.delete("index"),c.filter(u=>u).forEach(u=>B.append("index",u));let g=B.toString();r.search=g?`?${g}`:""}}return(!e||e===".")&&s.route.index&&(r.search=r.search?r.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(r.pathname=r.pathname==="/"?t:dc([t,r.pathname])),oI(r)}function E_(e,{relative:A}={}){let t=R.useContext(yM);As(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=RM("useViewTransitionState"),s=UQ(e,{relative:A});if(!t.isTransitioning)return!1;let r=pl(t.currentLocation.pathname,n)||t.currentLocation.pathname,a=pl(t.nextLocation.pathname,n)||t.nextLocation.pathname;return cI(s.pathname,a)!=null||cI(s.pathname,r)!=null}const sy="ela@careshiphealth.com",BG="https://beta.careshiphealth.com",hI="https://api.beta.careshiphealth.com",wI=`${hI}/rt`,ry=420,FQ=540,y_=520,eo={FACE_LG_ICON:`${BG}/bolt/faceLg.svg`,AI_ASSISTANT_TALK_ICON:`${BG}/bolt/new/ai-assistant-talk-icon.svg`,AI_ASSISTANT_CHAT_ICON:`${BG}/bolt/new/ai-assistant-chat-icon.svg`,AI_ASSISTANT__CALL_ICON:`${BG}/bolt/new/ai-assistant-call-icon.svg`,AI_ASSISTANT_ICON_BW:`${BG}/bolt/new/ai-assistant-icon-bw.svg`,MINIMIZE_ICON:`${BG}/bolt/new/minimize-icon.svg`,MAXIMIZE_ICON:`${BG}/bolt/new/maximize-icon.svg`},ay="Ela",Y_=e=>p.jsxs("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("path",{d:"M14.788 9.48971C14.5248 9.05746 14.1061 8.74231 13.6179 8.60892C13.1297 8.47552 12.609 8.53399 12.1625 8.77233C10.0479 9.9113 8.85588 12.1545 9.63525 14.3233C10.5054 16.7288 11.8175 18.9504 13.5041 20.8736C15.178 22.7934 17.1908 24.3887 19.4421 25.5799C21.4658 26.6469 23.8375 25.7746 25.2439 23.8137C25.5398 23.4011 25.6681 22.8917 25.603 22.3882C25.538 21.8848 25.2843 21.4247 24.8933 21.1009L23.3591 19.8338C23.0516 19.5788 22.6745 19.4221 22.2768 19.384C21.8791 19.346 21.4792 19.4283 21.1288 19.6203L18.456 21.0859L17.857 20.6704C17.1019 20.1437 16.411 19.5305 15.7985 18.8432C15.1987 18.1437 14.6865 17.3736 14.2732 16.55L13.9463 15.9052L15.7449 13.4461C15.9827 13.1198 16.1177 12.73 16.1327 12.3265C16.1477 11.923 16.042 11.5243 15.829 11.1813L14.788 9.48971ZM11.0452 6.69431C12.0219 6.171 13.1616 6.041 14.231 6.33095C15.3004 6.6209 16.2184 7.30884 16.797 8.2538L17.8352 9.94349C18.2934 10.6853 18.5203 11.5468 18.4868 12.4181C18.4533 13.2893 18.161 14.1309 17.6471 14.8353L16.7193 16.1029C16.9446 16.4768 17.2323 16.8985 17.575 17.2949C17.9164 17.6843 18.2917 18.0262 18.6269 18.299L19.9935 17.5482C20.7578 17.1299 21.63 16.9506 22.4973 17.0335C23.3646 17.1164 24.1871 17.4578 24.8582 18.0133L26.3925 19.2804C27.2451 19.9846 27.7986 20.9863 27.9411 22.0829C28.0836 23.1796 27.8044 24.2894 27.1601 25.1881C25.2861 27.8016 21.707 29.439 18.3439 27.665C15.8368 26.3392 13.5952 24.5633 11.7308 22.4261C9.84914 20.2812 8.38523 17.8032 7.41459 15.1201C6.13111 11.5432 8.22187 8.21369 11.0457 6.69662",fill:e?.color||"black"}),p.jsx("path",{d:"M25.026 11.6502L25.3027 11.0139C25.7888 9.88815 26.6795 8.9853 27.7991 8.48354L28.6541 8.10358C28.7574 8.05583 28.8449 7.97955 28.9061 7.88374C28.9674 7.78793 29 7.67659 29 7.56288C29 7.44918 28.9674 7.33784 28.9061 7.24203C28.8449 7.14622 28.7574 7.06993 28.6541 7.02218L27.8464 6.66247C26.6986 6.14642 25.7927 5.21019 25.3151 4.04664L25.0305 3.36093C24.9887 3.25454 24.9158 3.1632 24.8213 3.09882C24.7267 3.03444 24.615 3 24.5006 3C24.3862 3 24.2745 3.03444 24.18 3.09882C24.0854 3.1632 24.0125 3.25454 23.9707 3.36093L23.6861 4.04777C23.208 5.2111 22.3017 6.14692 21.1537 6.66247L20.3471 7.02106C20.2435 7.06867 20.1557 7.14497 20.0942 7.2409C20.0327 7.33684 20 7.44838 20 7.56232C20 7.67626 20.0327 7.78781 20.0942 7.88374C20.1557 7.97967 20.2435 8.05597 20.3471 8.10358L21.201 8.48466C22.3208 8.98593 23.2119 9.88837 23.6985 11.0139L23.9752 11.6502C24.0185 11.7538 24.0914 11.8423 24.1849 11.9045C24.2784 11.9668 24.3883 12 24.5006 12C24.613 12 24.7228 11.9668 24.8163 11.9045C24.9098 11.8423 24.9827 11.7538 25.026 11.6502Z",fill:e?.color||"black"})]}),iy=R.createContext({});function QI(e){const A=R.useRef(null);return A.current===null&&(A.current=e()),A.current}const By=typeof window<"u"?R.useLayoutEffect:R.useEffect,bI=R.createContext(null);function oy(e,A){e.indexOf(A)===-1&&e.push(A)}function CI(e,A){const t=e.indexOf(A);t>-1&&e.splice(t,1)}const Gc=(e,A,t)=>t>A?A:t<e?e:t;let cy=()=>{};const Ad={},SM=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function VM(e){return typeof e=="object"&&e!==null}const WM=e=>/^0[^.\s]+$/u.test(e);function NM(e){let A;return()=>(A===void 0&&(A=e()),A)}const lB=e=>e,Z_=(e,A)=>t=>A(e(t)),MQ=(...e)=>e.reduce(Z_),xQ=(e,A,t)=>{const n=A-e;return n===0?1:(t-e)/n};class ly{constructor(){this.subscriptions=[]}add(A){return oy(this.subscriptions,A),()=>CI(this.subscriptions,A)}notify(A,t,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](A,t,n);else for(let r=0;r<s;r++){const a=this.subscriptions[r];a&&a(A,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Hi=e=>e*1e3,gB=e=>e/1e3;function zM(e,A){return A?e*(1e3/A):0}const LM=(e,A,t)=>(((1-3*t+3*A)*e+(3*t-6*A))*e+3*A)*e,k_=1e-7,U_=12;function D_(e,A,t,n,s){let r,a,B=0;do a=A+(t-A)/2,r=LM(a,n,s)-e,r>0?t=a:A=a;while(Math.abs(r)>k_&&++B<U_);return a}function PQ(e,A,t,n){if(e===A&&t===n)return lB;const s=r=>D_(r,0,1,e,t);return r=>r===0||r===1?r:LM(s(r),A,n)}const XM=e=>A=>A<=.5?e(2*A)/2:(2-e(2*(1-A)))/2,OM=e=>A=>1-e(1-A),JM=PQ(.33,1.53,.69,.99),gy=OM(JM),KM=XM(gy),jM=e=>e>=1?1:(e*=2)<1?.5*gy(e):.5*(2-Math.pow(2,-10*(e-1))),dy=e=>1-Math.sin(Math.acos(e)),_M=OM(dy),qM=XM(dy),F_=PQ(.42,0,1,1),M_=PQ(0,0,.58,1),$M=PQ(.42,0,.58,1),x_=e=>Array.isArray(e)&&typeof e[0]!="number",Ax=e=>Array.isArray(e)&&typeof e[0]=="number",P_={linear:lB,easeIn:F_,easeInOut:$M,easeOut:M_,circIn:dy,circInOut:qM,circOut:_M,backIn:gy,backInOut:KM,backOut:JM,anticipate:jM},T_=e=>typeof e=="string",ex=e=>{if(Ax(e)){cy(e.length===4);const[A,t,n,s]=e;return PQ(A,t,n,s)}else if(T_(e))return P_[e];return e},vI=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function R_(e,A){let t=new Set,n=new Set,s=!1,r=!1;const a=new WeakSet;let B={delta:0,timestamp:0,isProcessing:!1};function c(g){a.has(g)&&(l.schedule(g),e()),g(B)}const l={schedule:(g,u=!1,f=!1)=>{const v=f&&s?t:n;return u&&a.add(g),v.add(g),g},cancel:g=>{n.delete(g),a.delete(g)},process:g=>{if(B=g,s){r=!0;return}s=!0;const u=t;t=n,n=u,t.forEach(c),t.clear(),s=!1,r&&(r=!1,l.process(g))}};return l}const S_=40;function tx(e,A){let t=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>t=!0,a=vI.reduce((T,S)=>(T[S]=R_(r),T),{}),{setup:B,read:c,resolveKeyframes:l,preUpdate:g,update:u,preRender:f,render:w,postRender:v}=a,E=()=>{const T=Ad.useManualTiming,S=T?s.timestamp:performance.now();t=!1,T||(s.delta=n?1e3/60:Math.max(Math.min(S-s.timestamp,S_),1)),s.timestamp=S,s.isProcessing=!0,B.process(s),c.process(s),l.process(s),g.process(s),u.process(s),f.process(s),w.process(s),v.process(s),s.isProcessing=!1,t&&A&&(n=!1,e(E))},m=()=>{t=!0,n=!0,s.isProcessing||e(E)};return{schedule:vI.reduce((T,S)=>{const F=a[S];return T[S]=(V,N=!1,X=!1)=>(t||m(),F.schedule(V,N,X)),T},{}),cancel:T=>{for(let S=0;S<vI.length;S++)a[vI[S]].cancel(T)},state:s,steps:a}}const{schedule:cn,cancel:ed,state:kr,steps:uy}=tx(typeof requestAnimationFrame<"u"?requestAnimationFrame:lB,!0);let II;function V_(){II=void 0}const ca={now:()=>(II===void 0&&ca.set(kr.isProcessing||Ad.useManualTiming?kr.timestamp:performance.now()),II),set:e=>{II=e,queueMicrotask(V_)}},nx=e=>A=>typeof A=="string"&&A.startsWith(e),sx=nx("--"),W_=nx("var(--"),Gy=e=>W_(e)?N_.test(e.split("/*")[0].trim()):!1,N_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function rx(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const dh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},TQ={...dh,transform:e=>Gc(0,1,e)},pI={...dh,default:1},RQ=e=>Math.round(e*1e5)/1e5,fy=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function z_(e){return e==null}const L_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,hy=(e,A)=>t=>!!(typeof t=="string"&&L_.test(t)&&t.startsWith(e)||A&&!z_(t)&&Object.prototype.hasOwnProperty.call(t,A)),ax=(e,A,t)=>n=>{if(typeof n!="string")return n;const[s,r,a,B]=n.match(fy);return{[e]:parseFloat(s),[A]:parseFloat(r),[t]:parseFloat(a),alpha:B!==void 0?parseFloat(B):1}},X_=e=>Gc(0,255,e),wy={...dh,transform:e=>Math.round(X_(e))},oG={test:hy("rgb","red"),parse:ax("red","green","blue"),transform:({red:e,green:A,blue:t,alpha:n=1})=>"rgba("+wy.transform(e)+", "+wy.transform(A)+", "+wy.transform(t)+", "+RQ(TQ.transform(n))+")"};function O_(e){let A="",t="",n="",s="";return e.length>5?(A=e.substring(1,3),t=e.substring(3,5),n=e.substring(5,7),s=e.substring(7,9)):(A=e.substring(1,2),t=e.substring(2,3),n=e.substring(3,4),s=e.substring(4,5),A+=A,t+=t,n+=n,s+=s),{red:parseInt(A,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const Qy={test:hy("#"),parse:O_,transform:oG.transform},SQ=e=>({test:A=>typeof A=="string"&&A.endsWith(e)&&A.split(" ").length===1,parse:parseFloat,transform:A=>`${A}${e}`}),td=SQ("deg"),fc=SQ("%"),Be=SQ("px"),J_=SQ("vh"),K_=SQ("vw"),ix={...fc,parse:e=>fc.parse(e)/100,transform:e=>fc.transform(e*100)},uh={test:hy("hsl","hue"),parse:ax("hue","saturation","lightness"),transform:({hue:e,saturation:A,lightness:t,alpha:n=1})=>"hsla("+Math.round(e)+", "+fc.transform(RQ(A))+", "+fc.transform(RQ(t))+", "+RQ(TQ.transform(n))+")"},Ds={test:e=>oG.test(e)||Qy.test(e)||uh.test(e),parse:e=>oG.test(e)?oG.parse(e):uh.test(e)?uh.parse(e):Qy.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?oG.transform(e):uh.transform(e),getAnimatableNone:e=>{const A=Ds.parse(e);return A.alpha=0,Ds.transform(A)}},j_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function __(e){return isNaN(e)&&typeof e=="string"&&(e.match(fy)?.length||0)+(e.match(j_)?.length||0)>0}const Bx="number",ox="color",q_="var",$_="var(",cx="${}",A6=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Gh(e){const A=e.toString(),t=[],n={color:[],number:[],var:[]},s=[];let r=0;const B=A.replace(A6,c=>(Ds.test(c)?(n.color.push(r),s.push(ox),t.push(Ds.parse(c))):c.startsWith($_)?(n.var.push(r),s.push(q_),t.push(c)):(n.number.push(r),s.push(Bx),t.push(parseFloat(c))),++r,cx)).split(cx);return{values:t,split:B,indexes:n,types:s}}function e6(e){return Gh(e).values}function lx({split:e,types:A}){const t=e.length;return n=>{let s="";for(let r=0;r<t;r++)if(s+=e[r],n[r]!==void 0){const a=A[r];a===Bx?s+=RQ(n[r]):a===ox?s+=Ds.transform(n[r]):s+=n[r]}return s}}function t6(e){return lx(Gh(e))}const n6=e=>typeof e=="number"?0:Ds.test(e)?Ds.getAnimatableNone(e):e,s6=(e,A)=>typeof e=="number"?A?.trim().endsWith("/")?e:0:n6(e);function r6(e){const A=Gh(e);return lx(A)(A.values.map((n,s)=>s6(n,A.split[s])))}const to={test:__,parse:e6,createTransformer:t6,getAnimatableNone:r6};function by(e,A,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(A-e)*6*t:t<1/2?A:t<2/3?e+(A-e)*(2/3-t)*6:e}function a6({hue:e,saturation:A,lightness:t,alpha:n}){e/=360,A/=100,t/=100;let s=0,r=0,a=0;if(!A)s=r=a=t;else{const B=t<.5?t*(1+A):t+A-t*A,c=2*t-B;s=by(c,B,e+1/3),r=by(c,B,e),a=by(c,B,e-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(a*255),alpha:n}}function HI(e,A){return t=>t>0?A:e}const mn=(e,A,t)=>e+(A-e)*t,Cy=(e,A,t)=>{const n=e*e,s=t*(A*A-n)+n;return s<0?0:Math.sqrt(s)},i6=[Qy,oG,uh],B6=e=>i6.find(A=>A.test(e));function gx(e){const A=B6(e);if(!A)return!1;let t=A.parse(e);return A===uh&&(t=a6(t)),t}const dx=(e,A)=>{const t=gx(e),n=gx(A);if(!t||!n)return HI(e,A);const s={...t};return r=>(s.red=Cy(t.red,n.red,r),s.green=Cy(t.green,n.green,r),s.blue=Cy(t.blue,n.blue,r),s.alpha=mn(t.alpha,n.alpha,r),oG.transform(s))},vy=new Set(["none","hidden"]);function o6(e,A){return vy.has(e)?t=>t<=0?e:A:t=>t>=1?A:e}function c6(e,A){return t=>mn(e,A,t)}function Iy(e){return typeof e=="number"?c6:typeof e=="string"?Gy(e)?HI:Ds.test(e)?dx:d6:Array.isArray(e)?ux:typeof e=="object"?Ds.test(e)?dx:l6:HI}function ux(e,A){const t=[...e],n=t.length,s=e.map((r,a)=>Iy(r)(r,A[a]));return r=>{for(let a=0;a<n;a++)t[a]=s[a](r);return t}}function l6(e,A){const t={...e,...A},n={};for(const s in t)e[s]!==void 0&&A[s]!==void 0&&(n[s]=Iy(e[s])(e[s],A[s]));return s=>{for(const r in n)t[r]=n[r](s);return t}}function g6(e,A){const t=[],n={color:0,var:0,number:0};for(let s=0;s<A.values.length;s++){const r=A.types[s],a=e.indexes[r][n[r]],B=e.values[a]??0;t[s]=B,n[r]++}return t}const d6=(e,A)=>{const t=to.createTransformer(A),n=Gh(e),s=Gh(A);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?vy.has(e)&&!s.values.length||vy.has(A)&&!n.values.length?o6(e,A):MQ(ux(g6(n,s),s.values),t):HI(e,A)};function Gx(e,A,t){return typeof e=="number"&&typeof A=="number"&&typeof t=="number"?mn(e,A,t):Iy(e)(e,A)}const u6=e=>{const A=({timestamp:t})=>e(t);return{start:(t=!0)=>cn.update(A,t),stop:()=>ed(A),now:()=>kr.isProcessing?kr.timestamp:ca.now()}},fx=(e,A,t=10)=>{let n="";const s=Math.max(Math.round(A/t),2);for(let r=0;r<s;r++)n+=Math.round(e(r/(s-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},mI=2e4;function py(e){let A=0;const t=50;let n=e.next(A);for(;!n.done&&A<mI;)A+=t,n=e.next(A);return A>=mI?1/0:A}function G6(e,A=100,t){const n=t({...e,keyframes:[0,A]}),s=Math.min(py(n),mI);return{type:"keyframes",ease:r=>n.next(s*r).value/A,duration:gB(s)}}const es={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Hy(e,A){return e*Math.sqrt(1-A*A)}const f6=12;function h6(e,A,t){let n=t;for(let s=1;s<f6;s++)n=n-e(n)/A(n);return n}const my=.001;function w6({duration:e=es.duration,bounce:A=es.bounce,velocity:t=es.velocity,mass:n=es.mass}){let s,r,a=1-A;a=Gc(es.minDamping,es.maxDamping,a),e=Gc(es.minDuration,es.maxDuration,gB(e)),a<1?(s=l=>{const g=l*a,u=g*e,f=g-t,w=Hy(l,a),v=Math.exp(-u);return my-f/w*v},r=l=>{const u=l*a*e,f=u*t+t,w=Math.pow(a,2)*Math.pow(l,2)*e,v=Math.exp(-u),E=Hy(Math.pow(l,2),a);return(-s(l)+my>0?-1:1)*((f-w)*v)/E}):(s=l=>{const g=Math.exp(-l*e),u=(l-t)*e+1;return-my+g*u},r=l=>{const g=Math.exp(-l*e),u=(t-l)*(e*e);return g*u});const B=5/e,c=h6(s,r,B);if(e=Hi(e),isNaN(c))return{stiffness:es.stiffness,damping:es.damping,duration:e};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:a*2*Math.sqrt(n*l),duration:e}}}const Q6=["duration","bounce"],b6=["stiffness","damping","mass"];function hx(e,A){return A.some(t=>e[t]!==void 0)}function C6(e){let A={velocity:es.velocity,stiffness:es.stiffness,damping:es.damping,mass:es.mass,isResolvedFromDuration:!1,...e};if(!hx(e,b6)&&hx(e,Q6))if(A.velocity=0,e.visualDuration){const t=e.visualDuration,n=2*Math.PI/(t*1.2),s=n*n,r=2*Gc(.05,1,1-(e.bounce||0))*Math.sqrt(s);A={...A,mass:es.mass,stiffness:s,damping:r}}else{const t=w6({...e,velocity:0});A={...A,...t,mass:es.mass},A.isResolvedFromDuration=!0}return A}function EI(e=es.visualDuration,A=es.bounce){const t=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:A}:e;let{restSpeed:n,restDelta:s}=t;const r=t.keyframes[0],a=t.keyframes[t.keyframes.length-1],B={done:!1,value:r},{stiffness:c,damping:l,mass:g,duration:u,velocity:f,isResolvedFromDuration:w}=C6({...t,velocity:-gB(t.velocity||0)}),v=f||0,E=l/(2*Math.sqrt(c*g)),m=a-r,Z=gB(Math.sqrt(c/g)),D=Math.abs(m)<5;n||(n=D?es.restSpeed.granular:es.restSpeed.default),s||(s=D?es.restDelta.granular:es.restDelta.default);let T,S,F,V,N,X;if(E<1)F=Hy(Z,E),V=(v+E*Z*m)/F,T=$=>{const rA=Math.exp(-E*Z*$);return a-rA*(V*Math.sin(F*$)+m*Math.cos(F*$))},N=E*Z*V+m*F,X=E*Z*m-V*F,S=$=>Math.exp(-E*Z*$)*(N*Math.sin(F*$)+X*Math.cos(F*$));else if(E===1){T=rA=>a-Math.exp(-Z*rA)*(m+(v+Z*m)*rA);const $=v+Z*m;S=rA=>Math.exp(-Z*rA)*(Z*$*rA-v)}else{const $=Z*Math.sqrt(E*E-1);T=fA=>{const yA=Math.exp(-E*Z*fA),L=Math.min($*fA,300);return a-yA*((v+E*Z*m)*Math.sinh(L)+$*m*Math.cosh(L))/$};const rA=(v+E*Z*m)/$,iA=E*Z*rA-m*$,hA=E*Z*m-rA*$;S=fA=>{const yA=Math.exp(-E*Z*fA),L=Math.min($*fA,300);return yA*(iA*Math.sinh(L)+hA*Math.cosh(L))}}const eA={calculatedDuration:w&&u||null,velocity:$=>Hi(S($)),next:$=>{if(!w&&E<1){const iA=Math.exp(-E*Z*$),hA=Math.sin(F*$),fA=Math.cos(F*$),yA=a-iA*(V*hA+m*fA),L=Hi(iA*(N*hA+X*fA));return B.done=Math.abs(L)<=n&&Math.abs(a-yA)<=s,B.value=B.done?a:yA,B}const rA=T($);if(w)B.done=$>=u;else{const iA=Hi(S($));B.done=Math.abs(iA)<=n&&Math.abs(a-rA)<=s}return B.value=B.done?a:rA,B},toString:()=>{const $=Math.min(py(eA),mI),rA=fx(iA=>eA.next($*iA).value,$,30);return $+"ms "+rA},toTransition:()=>{}};return eA}EI.applyToOptions=e=>{const A=G6(e,100,EI);return e.ease=A.ease,e.duration=Hi(A.duration),e.type="keyframes",e};const v6=5;function wx(e,A,t){const n=Math.max(A-v6,0);return zM(t-e(n),A-n)}function Ey({keyframes:e,velocity:A=0,power:t=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:a,min:B,max:c,restDelta:l=.5,restSpeed:g}){const u=e[0],f={done:!1,value:u},w=X=>B!==void 0&&X<B||c!==void 0&&X>c,v=X=>B===void 0?c:c===void 0||Math.abs(B-X)<Math.abs(c-X)?B:c;let E=t*A;const m=u+E,Z=a===void 0?m:a(m);Z!==m&&(E=Z-u);const D=X=>-E*Math.exp(-X/n),T=X=>Z+D(X),S=X=>{const eA=D(X),$=T(X);f.done=Math.abs(eA)<=l,f.value=f.done?Z:$};let F,V;const N=X=>{w(f.value)&&(F=X,V=EI({keyframes:[f.value,v(f.value)],velocity:wx(T,X,f.value),damping:s,stiffness:r,restDelta:l,restSpeed:g}))};return N(0),{calculatedDuration:null,next:X=>{let eA=!1;return!V&&F===void 0&&(eA=!0,S(X),N(X)),F!==void 0&&X>=F?V.next(X-F):(!eA&&S(X),f)}}}function I6(e,A,t){const n=[],s=t||Ad.mix||Gx,r=e.length-1;for(let a=0;a<r;a++){let B=s(e[a],e[a+1]);if(A){const c=Array.isArray(A)?A[a]||lB:A;B=MQ(c,B)}n.push(B)}return n}function p6(e,A,{clamp:t=!0,ease:n,mixer:s}={}){const r=e.length;if(cy(r===A.length),r===1)return()=>A[0];if(r===2&&A[0]===A[1])return()=>A[1];const a=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),A=[...A].reverse());const B=I6(A,n,s),c=B.length,l=g=>{if(a&&g<e[0])return A[0];let u=0;if(c>1)for(;u<e.length-2&&!(g<e[u+1]);u++);const f=xQ(e[u],e[u+1],g);return B[u](f)};return t?g=>l(Gc(e[0],e[r-1],g)):l}function H6(e,A){const t=e[e.length-1];for(let n=1;n<=A;n++){const s=xQ(0,A,n);e.push(mn(t,1,s))}}function m6(e){const A=[0];return H6(A,e.length-1),A}function E6(e,A){return e.map(t=>t*A)}function y6(e,A){return e.map(()=>A||$M).splice(0,e.length-1)}function VQ({duration:e=300,keyframes:A,times:t,ease:n="easeInOut"}){const s=x_(n)?n.map(ex):ex(n),r={done:!1,value:A[0]},a=E6(t&&t.length===A.length?t:m6(A),e),B=p6(a,A,{ease:Array.isArray(s)?s:y6(A,s)});return{calculatedDuration:e,next:c=>(r.value=B(c),r.done=c>=e,r)}}const Y6=e=>e!==null;function yI(e,{repeat:A,repeatType:t="loop"},n,s=1){const r=e.filter(Y6),B=s<0||A&&t!=="loop"&&A%2===1?0:r.length-1;return!B||n===void 0?r[B]:n}const Z6={decay:Ey,inertia:Ey,tween:VQ,keyframes:VQ,spring:EI};function Qx(e){typeof e.type=="string"&&(e.type=Z6[e.type])}class yy{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(A=>{this.resolve=A})}notifyFinished(){this.resolve()}then(A,t){return this.finished.then(A,t)}}const k6=e=>e/100;class YI extends yy{constructor(A){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==ca.now()&&this.tick(ca.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=A,this.initAnimation(),this.play(),A.autoplay===!1&&this.pause()}initAnimation(){const{options:A}=this;Qx(A);const{type:t=VQ,repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:a=0}=A;let{keyframes:B}=A;const c=t||VQ;c!==VQ&&typeof B[0]!="number"&&(this.mixKeyframes=MQ(k6,Gx(B[0],B[1])),B=[0,100]);const l=c({...A,keyframes:B});r==="mirror"&&(this.mirroredGenerator=c({...A,keyframes:[...B].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=py(l));const{calculatedDuration:g}=l;this.calculatedDuration=g,this.resolvedDuration=g+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=l}updateTime(A){const t=Math.round(A-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(A,t=!1){const{generator:n,totalDuration:s,mixKeyframes:r,mirroredGenerator:a,resolvedDuration:B,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:l=0,keyframes:g,repeat:u,repeatType:f,repeatDelay:w,type:v,onUpdate:E,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,A):this.speed<0&&(this.startTime=Math.min(A-s/this.speed,this.startTime)),t?this.currentTime=A:this.updateTime(A);const Z=this.currentTime-l*(this.playbackSpeed>=0?1:-1),D=this.playbackSpeed>=0?Z<0:Z>s;this.currentTime=Math.max(Z,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let T=this.currentTime,S=n;if(u){const X=Math.min(this.currentTime,s)/B;let eA=Math.floor(X),$=X%1;!$&&X>=1&&($=1),$===1&&eA--,eA=Math.min(eA,u+1),eA%2&&(f==="reverse"?($=1-$,w&&($-=w/B)):f==="mirror"&&(S=a)),T=Gc(0,1,$)*B}let F;D?(this.delayState.value=g[0],F=this.delayState):F=S.next(T),r&&!D&&(F.value=r(F.value));let{done:V}=F;!D&&c!==null&&(V=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return N&&v!==Ey&&(F.value=yI(g,this.options,m,this.speed)),E&&E(F.value),N&&this.finish(),F}then(A,t){return this.finished.then(A,t)}get duration(){return gB(this.calculatedDuration)}get iterationDuration(){const{delay:A=0}=this.options||{};return this.duration+gB(A)}get time(){return gB(this.currentTime)}set time(A){A=Hi(A),this.currentTime=A,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=A:this.driver&&(this.startTime=this.driver.now()-A/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=A,this.tick(A))}getGeneratorVelocity(){const A=this.currentTime;if(A<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(A);const t=this.generator.next(A).value;return wx(n=>this.generator.next(n).value,A,t)}get speed(){return this.playbackSpeed}set speed(A){const t=this.playbackSpeed!==A;t&&this.driver&&this.updateTime(ca.now()),this.playbackSpeed=A,t&&this.driver&&(this.time=gB(this.currentTime))}play(){if(this.isStopped)return;const{driver:A=u6,startTime:t}=this.options;this.driver||(this.driver=A(s=>this.tick(s))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ca.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(A){return this.startTime=0,this.tick(A,!0)}attachTimeline(A){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),A.observe(this)}}function U6(e){for(let A=1;A<e.length;A++)e[A]??(e[A]=e[A-1])}const cG=e=>e*180/Math.PI,Yy=e=>{const A=cG(Math.atan2(e[1],e[0]));return Zy(A)},D6={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Yy,rotateZ:Yy,skewX:e=>cG(Math.atan(e[1])),skewY:e=>cG(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Zy=e=>(e=e%360,e<0&&(e+=360),e),bx=Yy,Cx=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),vx=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),F6={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Cx,scaleY:vx,scale:e=>(Cx(e)+vx(e))/2,rotateX:e=>Zy(cG(Math.atan2(e[6],e[5]))),rotateY:e=>Zy(cG(Math.atan2(-e[2],e[0]))),rotateZ:bx,rotate:bx,skewX:e=>cG(Math.atan(e[4])),skewY:e=>cG(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ky(e){return e.includes("scale")?1:0}function Uy(e,A){if(!e||e==="none")return ky(A);const t=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,s;if(t)n=F6,s=t;else{const B=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=D6,s=B}if(!s)return ky(A);const r=n[A],a=s[1].split(",").map(x6);return typeof r=="function"?r(a):a[r]}const M6=(e,A)=>{const{transform:t="none"}=getComputedStyle(e);return Uy(t,A)};function x6(e){return parseFloat(e.trim())}const fh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hh=new Set(fh),Ix=e=>e===dh||e===Be,P6=new Set(["x","y","z"]),T6=fh.filter(e=>!P6.has(e));function R6(e){const A=[];return T6.forEach(t=>{const n=e.getValue(t);n!==void 0&&(A.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),A}const nd={width:({x:e},{paddingLeft:A="0",paddingRight:t="0",boxSizing:n})=>{const s=e.max-e.min;return n==="border-box"?s:s-parseFloat(A)-parseFloat(t)},height:({y:e},{paddingTop:A="0",paddingBottom:t="0",boxSizing:n})=>{const s=e.max-e.min;return n==="border-box"?s:s-parseFloat(A)-parseFloat(t)},top:(e,{top:A})=>parseFloat(A),left:(e,{left:A})=>parseFloat(A),bottom:({y:e},{top:A})=>parseFloat(A)+(e.max-e.min),right:({x:e},{left:A})=>parseFloat(A)+(e.max-e.min),x:(e,{transform:A})=>Uy(A,"x"),y:(e,{transform:A})=>Uy(A,"y")};nd.translateX=nd.x,nd.translateY=nd.y;const lG=new Set;let Dy=!1,Fy=!1,My=!1;function px(){if(Fy){const e=Array.from(lG).filter(n=>n.needsMeasurement),A=new Set(e.map(n=>n.element)),t=new Map;A.forEach(n=>{const s=R6(n);s.length&&(t.set(n,s),n.render())}),e.forEach(n=>n.measureInitialState()),A.forEach(n=>{n.render();const s=t.get(n);s&&s.forEach(([r,a])=>{n.getValue(r)?.set(a)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Fy=!1,Dy=!1,lG.forEach(e=>e.complete(My)),lG.clear()}function Hx(){lG.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Fy=!0)})}function S6(){My=!0,Hx(),px(),My=!1}class xy{constructor(A,t,n,s,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...A],this.onComplete=t,this.name=n,this.motionValue=s,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(lG.add(this),Dy||(Dy=!0,cn.read(Hx),cn.resolveKeyframes(px))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:A,name:t,element:n,motionValue:s}=this;if(A[0]===null){const r=s?.get(),a=A[A.length-1];if(r!==void 0)A[0]=r;else if(n&&t){const B=n.readValue(t,a);B!=null&&(A[0]=B)}A[0]===void 0&&(A[0]=a),s&&r===void 0&&s.set(A[0])}U6(A)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(A=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,A),lG.delete(this)}cancel(){this.state==="scheduled"&&(lG.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const V6=e=>e.startsWith("--");function mx(e,A,t){V6(A)?e.style.setProperty(A,t):e.style[A]=t}const W6={};function Ex(e,A){const t=NM(e);return()=>W6[A]??t()}const N6=Ex(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),yx=Ex(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),WQ=([e,A,t,n])=>`cubic-bezier(${e}, ${A}, ${t}, ${n})`,Yx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:WQ([0,.65,.55,1]),circOut:WQ([.55,0,1,.45]),backIn:WQ([.31,.01,.66,-.59]),backOut:WQ([.33,1.53,.69,.99])};function Zx(e,A){if(e)return typeof e=="function"?yx()?fx(e,A):"ease-out":Ax(e)?WQ(e):Array.isArray(e)?e.map(t=>Zx(t,A)||Yx.easeOut):Yx[e]}function z6(e,A,t,{delay:n=0,duration:s=300,repeat:r=0,repeatType:a="loop",ease:B="easeOut",times:c}={},l=void 0){const g={[A]:t};c&&(g.offset=c);const u=Zx(B,s);Array.isArray(u)&&(g.easing=u);const f={delay:n,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:r+1,direction:a==="reverse"?"alternate":"normal"};return l&&(f.pseudoElement=l),e.animate(g,f)}function kx(e){return typeof e=="function"&&"applyToOptions"in e}function L6({type:e,...A}){return kx(e)&&yx()?e.applyToOptions(A):(A.duration??(A.duration=300),A.ease??(A.ease="easeOut"),A)}class Ux extends yy{constructor(A){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!A)return;const{element:t,name:n,keyframes:s,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:B,onComplete:c}=A;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=A,cy(typeof A.type!="string");const l=L6(A);this.animation=z6(t,n,s,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const g=yI(s,this.options,B,this.speed);this.updateMotionValue&&this.updateMotionValue(g),mx(t,n,g),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:A}=this;A==="idle"||A==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const A=this.options?.element;!this.isPseudoElement&&A?.isConnected&&this.animation.commitStyles?.()}get duration(){const A=this.animation.effect?.getComputedTiming?.().duration||0;return gB(Number(A))}get iterationDuration(){const{delay:A=0}=this.options||{};return this.duration+gB(A)}get time(){return gB(Number(this.animation.currentTime)||0)}set time(A){const t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Hi(A),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(A){A<0&&(this.finishedTime=null),this.animation.playbackRate=A}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(A){this.manualStartTime=this.animation.startTime=A}attachTimeline({timeline:A,rangeStart:t,rangeEnd:n,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,A&&N6()?(this.animation.timeline=A,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),lB):s(this)}}const Dx={anticipate:jM,backInOut:KM,circInOut:qM};function X6(e){return e in Dx}function O6(e){typeof e.ease=="string"&&X6(e.ease)&&(e.ease=Dx[e.ease])}const Py=10;class J6 extends Ux{constructor(A){O6(A),Qx(A),super(A),A.startTime!==void 0&&A.autoplay!==!1&&(this.startTime=A.startTime),this.options=A}updateMotionValue(A){const{motionValue:t,onUpdate:n,onComplete:s,element:r,...a}=this.options;if(!t)return;if(A!==void 0){t.set(A);return}const B=new YI({...a,autoplay:!1}),c=Math.max(Py,ca.now()-this.startTime),l=Gc(0,Py,c-Py),g=B.sample(c).value,{name:u}=this.options;r&&u&&mx(r,u,g),t.setWithVelocity(B.sample(Math.max(0,c-l)).value,g,l),B.stop()}}const Fx=(e,A)=>A==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(to.test(e)||e==="0")&&!e.startsWith("url("));function K6(e){const A=e[0];if(e.length===1)return!0;for(let t=0;t<e.length;t++)if(e[t]!==A)return!0}function j6(e,A,t,n){const s=e[0];if(s===null)return!1;if(A==="display"||A==="visibility")return!0;const r=e[e.length-1],a=Fx(s,A),B=Fx(r,A);return!a||!B?!1:K6(e)||(t==="spring"||kx(t))&&n}function Ty(e){e.duration=0,e.type="keyframes"}const Mx=new Set(["opacity","clipPath","filter","transform"]),_6=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function q6(e){for(let A=0;A<e.length;A++)if(typeof e[A]=="string"&&_6.test(e[A]))return!0;return!1}const $6=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Aq=NM(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function eq(e){const{motionValue:A,name:t,repeatDelay:n,repeatType:s,damping:r,type:a,keyframes:B}=e;if(!(A?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:g}=A.owner.getProps();return Aq()&&t&&(Mx.has(t)||$6.has(t)&&q6(B))&&(t!=="transform"||!g)&&!l&&!n&&s!=="mirror"&&r!==0&&a!=="inertia"}const tq=40;class nq extends yy{constructor({autoplay:A=!0,delay:t=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:a="loop",keyframes:B,name:c,motionValue:l,element:g,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ca.now();const f={autoplay:A,delay:t,type:n,repeat:s,repeatDelay:r,repeatType:a,name:c,motionValue:l,element:g,...u},w=g?.KeyframeResolver||xy;this.keyframeResolver=new w(B,(v,E,m)=>this.onKeyframesResolved(v,E,f,!m),c,l,g),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(A,t,n,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:B,delay:c,isHandoff:l,onUpdate:g}=n;this.resolvedAt=ca.now();let u=!0;j6(A,r,a,B)||(u=!1,(Ad.instantAnimations||!c)&&g?.(yI(A,n,t)),A[0]=A[A.length-1],Ty(n),n.repeat=0);const w={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>tq?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:A},v=u&&!l&&eq(w),E=w.motionValue?.owner?.current;let m;if(v)try{m=new J6({...w,element:E})}catch{m=new YI(w)}else m=new YI(w);m.finished.then(()=>{this.notifyFinished()}).catch(lB),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(A,t){return this.finished.finally(A).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),S6()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(A){this.animation.time=A}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(A){this.animation.speed=A}get startTime(){return this.animation.startTime}attachTimeline(A){return this._animation?this.stopTimeline=this.animation.attachTimeline(A):this.pendingTimeline=A,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function xx(e,A,t,n=0,s=1){const r=Array.from(e).sort((l,g)=>l.sortNodePosition(g)).indexOf(A),a=e.size,B=(a-1)*n;return typeof t=="function"?t(r,a):s===1?r*n:B-r*n}const sq=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function rq(e){const A=sq.exec(e);if(!A)return[,];const[,t,n,s]=A;return[`--${t??n}`,s]}function Px(e,A,t=1){const[n,s]=rq(e);if(!n)return;const r=window.getComputedStyle(A).getPropertyValue(n);if(r){const a=r.trim();return SM(a)?parseFloat(a):a}return Gy(s)?Px(s,A,t+1):s}const aq={type:"spring",stiffness:500,damping:25,restSpeed:10},iq=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Bq={type:"keyframes",duration:.8},oq={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},cq=(e,{keyframes:A})=>A.length>2?Bq:hh.has(e)?e.startsWith("scale")?iq(A[1]):aq:oq;function Tx(e,A){if(e?.inherit&&A){const{inherit:t,...n}=e;return{...A,...n}}return e}function Ry(e,A){const t=e?.[A]??e?.default??e;return t!==e?Tx(t,e):t}const lq=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function gq(e){for(const A in e)if(!lq.has(A))return!0;return!1}const Sy=(e,A,t,n={},s,r)=>a=>{const B=Ry(n,e)||{},c=B.delay||n.delay||0;let{elapsed:l=0}=n;l=l-Hi(c);const g={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:A.getVelocity(),...B,delay:-l,onUpdate:f=>{A.set(f),B.onUpdate&&B.onUpdate(f)},onComplete:()=>{a(),B.onComplete&&B.onComplete()},name:e,motionValue:A,element:r?void 0:s};gq(B)||Object.assign(g,cq(e,g)),g.duration&&(g.duration=Hi(g.duration)),g.repeatDelay&&(g.repeatDelay=Hi(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let u=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(Ty(g),g.delay===0&&(u=!0)),(Ad.instantAnimations||Ad.skipAnimations||s?.shouldSkipAnimations)&&(u=!0,Ty(g),g.delay=0),g.allowFlatten=!B.type&&!B.ease,u&&!r&&A.get()!==void 0){const f=yI(g.keyframes,B);if(f!==void 0){cn.update(()=>{g.onUpdate(f),g.onComplete()});return}}return B.isSync?new YI(g):new nq(g)};function Rx(e){const A=[{},{}];return e?.values.forEach((t,n)=>{A[0][n]=t.get(),A[1][n]=t.getVelocity()}),A}function Vy(e,A,t,n){if(typeof A=="function"){const[s,r]=Rx(n);A=A(t!==void 0?t:e.custom,s,r)}if(typeof A=="string"&&(A=e.variants&&e.variants[A]),typeof A=="function"){const[s,r]=Rx(n);A=A(t!==void 0?t:e.custom,s,r)}return A}function gG(e,A,t){const n=e.getProps();return Vy(n,A,t!==void 0?t:n.custom,e)}const Sx=new Set(["width","height","top","left","right","bottom",...fh]),Vx=30,dq=e=>!isNaN(parseFloat(e));class uq{constructor(A,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const s=ca.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(A),this.owner=t.owner}setCurrent(A){this.current=A,this.updatedAt=ca.now(),this.canTrackVelocity===null&&A!==void 0&&(this.canTrackVelocity=dq(this.current))}setPrevFrameValue(A=this.current){this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt}onChange(A){return this.on("change",A)}on(A,t){this.events[A]||(this.events[A]=new ly);const n=this.events[A].add(t);return A==="change"?()=>{n(),cn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const A in this.events)this.events[A].clear()}attach(A,t){this.passiveEffect=A,this.stopPassiveEffect=t}set(A){this.passiveEffect?this.passiveEffect(A,this.updateAndNotify):this.updateAndNotify(A)}setWithVelocity(A,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=A,this.prevUpdatedAt=this.updatedAt-n}jump(A,t=!0){this.updateAndNotify(A),this.prev=A,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(A){this.dependents||(this.dependents=new Set),this.dependents.add(A)}removeDependent(A){this.dependents&&this.dependents.delete(A)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const A=ca.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||A-this.updatedAt>Vx)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,Vx);return zM(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(A){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=A(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wh(e,A){return new uq(e,A)}const Wy=e=>Array.isArray(e);function Gq(e,A,t){e.hasValue(A)?e.getValue(A).set(t):e.addValue(A,wh(t))}function fq(e){return Wy(e)?e[e.length-1]||0:e}function Ny(e,A){const t=gG(e,A);let{transitionEnd:n={},transition:s={},...r}=t||{};r={...r,...n};for(const a in r){const B=fq(r[a]);Gq(e,a,B)}}const Ur=e=>!!(e&&e.getVelocity);function hq(e){return!!(Ur(e)&&e.add)}function zy(e,A){const t=e.getValue("willChange");if(hq(t))return t.add(A);if(!t&&Ad.WillChange){const n=new Ad.WillChange("auto");e.addValue("willChange",n),n.add(A)}}function Ly(e){return e.replace(/([A-Z])/g,A=>`-${A.toLowerCase()}`)}const Wx="data-"+Ly("framerAppearId");function Nx(e){return e.props[Wx]}function wq({protectedKeys:e,needsAnimating:A},t){const n=e.hasOwnProperty(t)&&A[t]!==!0;return A[t]=!1,n}function zx(e,A,{delay:t=0,transitionOverride:n,type:s}={}){let{transition:r,transitionEnd:a,...B}=A;const c=e.getDefaultTransition();r=r?Tx(r,c):c;const l=r?.reduceMotion;n&&(r=n);const g=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const f in B){const w=e.getValue(f,e.latestValues[f]??null),v=B[f];if(v===void 0||u&&wq(u,f))continue;const E={delay:t,...Ry(r||{},f)},m=w.get();if(m!==void 0&&!w.isAnimating()&&!Array.isArray(v)&&v===m&&!E.velocity){cn.update(()=>w.set(v));continue}let Z=!1;if(window.MotionHandoffAnimation){const S=Nx(e);if(S){const F=window.MotionHandoffAnimation(S,f,cn);F!==null&&(E.startTime=F,Z=!0)}}zy(e,f);const D=l??e.shouldReduceMotion;w.start(Sy(f,w,v,D&&Sx.has(f)?{type:!1}:E,e,Z));const T=w.animation;T&&g.push(T)}if(a){const f=()=>cn.update(()=>{a&&Ny(e,a)});g.length?Promise.all(g).then(f):f()}return g}function Xy(e,A,t={}){const n=gG(e,A,t.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=n||{};t.transitionOverride&&(s=t.transitionOverride);const r=n?()=>Promise.all(zx(e,n,t)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:g,staggerDirection:u}=s;return Qq(e,A,c,l,g,u,t)}:()=>Promise.resolve(),{when:B}=s;if(B){const[c,l]=B==="beforeChildren"?[r,a]:[a,r];return c().then(()=>l())}else return Promise.all([r(),a(t.delay)])}function Qq(e,A,t=0,n=0,s=0,r=1,a){const B=[];for(const c of e.variantChildren)c.notify("AnimationStart",A),B.push(Xy(c,A,{...a,delay:t+(typeof n=="function"?0:n)+xx(e.variantChildren,c,n,s,r)}).then(()=>c.notify("AnimationComplete",A)));return Promise.all(B)}function Lx(e,A,t={}){e.notify("AnimationStart",A);let n;if(Array.isArray(A)){const s=A.map(r=>Xy(e,r,t));n=Promise.all(s)}else if(typeof A=="string")n=Xy(e,A,t);else{const s=typeof A=="function"?gG(e,A,t.custom):A;n=Promise.all(zx(e,s,t))}return n.then(()=>{e.notify("AnimationComplete",A)})}const bq={test:e=>e==="auto",parse:e=>e},Xx=e=>A=>A.test(e),Ox=[dh,Be,fc,td,K_,J_,bq],Jx=e=>Ox.find(Xx(e));function Cq(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||WM(e):!0}const vq=new Set(["brightness","contrast","saturate","opacity"]);function Iq(e){const[A,t]=e.slice(0,-1).split("(");if(A==="drop-shadow")return e;const[n]=t.match(fy)||[];if(!n)return e;const s=t.replace(n,"");let r=vq.has(A)?1:0;return n!==t&&(r*=100),A+"("+r+s+")"}const pq=/\b([a-z-]*)\(.*?\)/gu,Oy={...to,getAnimatableNone:e=>{const A=e.match(pq);return A?A.map(Iq).join(" "):e}},Jy={...to,getAnimatableNone:e=>{const A=to.parse(e);return to.createTransformer(e)(A.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}},Kx={...dh,transform:Math.round},Ky={borderWidth:Be,borderTopWidth:Be,borderRightWidth:Be,borderBottomWidth:Be,borderLeftWidth:Be,borderRadius:Be,borderTopLeftRadius:Be,borderTopRightRadius:Be,borderBottomRightRadius:Be,borderBottomLeftRadius:Be,width:Be,maxWidth:Be,height:Be,maxHeight:Be,top:Be,right:Be,bottom:Be,left:Be,inset:Be,insetBlock:Be,insetBlockStart:Be,insetBlockEnd:Be,insetInline:Be,insetInlineStart:Be,insetInlineEnd:Be,padding:Be,paddingTop:Be,paddingRight:Be,paddingBottom:Be,paddingLeft:Be,paddingBlock:Be,paddingBlockStart:Be,paddingBlockEnd:Be,paddingInline:Be,paddingInlineStart:Be,paddingInlineEnd:Be,margin:Be,marginTop:Be,marginRight:Be,marginBottom:Be,marginLeft:Be,marginBlock:Be,marginBlockStart:Be,marginBlockEnd:Be,marginInline:Be,marginInlineStart:Be,marginInlineEnd:Be,fontSize:Be,backgroundPositionX:Be,backgroundPositionY:Be,...{rotate:td,rotateX:td,rotateY:td,rotateZ:td,scale:pI,scaleX:pI,scaleY:pI,scaleZ:pI,skew:td,skewX:td,skewY:td,distance:Be,translateX:Be,translateY:Be,translateZ:Be,x:Be,y:Be,z:Be,perspective:Be,transformPerspective:Be,opacity:TQ,originX:ix,originY:ix,originZ:Be},zIndex:Kx,fillOpacity:TQ,strokeOpacity:TQ,numOctaves:Kx},Hq={...Ky,color:Ds,backgroundColor:Ds,outlineColor:Ds,fill:Ds,stroke:Ds,borderColor:Ds,borderTopColor:Ds,borderRightColor:Ds,borderBottomColor:Ds,borderLeftColor:Ds,filter:Oy,WebkitFilter:Oy,mask:Jy,WebkitMask:Jy},jx=e=>Hq[e],mq=new Set([Oy,Jy]);function _x(e,A){let t=jx(e);return mq.has(t)||(t=to),t.getAnimatableNone?t.getAnimatableNone(A):void 0}const Eq=new Set(["auto","none","0"]);function yq(e,A,t){let n=0,s;for(;n<e.length&&!s;){const r=e[n];typeof r=="string"&&!Eq.has(r)&&Gh(r).values.length&&(s=e[n]),n++}if(s&&t)for(const r of A)e[r]=_x(t,s)}class Yq extends xy{constructor(A,t,n,s,r){super(A,t,n,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:A,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let g=0;g<A.length;g++){let u=A[g];if(typeof u=="string"&&(u=u.trim(),Gy(u))){const f=Px(u,t.current);f!==void 0&&(A[g]=f),g===A.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Sx.has(n)||A.length!==2)return;const[s,r]=A,a=Jx(s),B=Jx(r),c=rx(s),l=rx(r);if(c!==l&&nd[n]){this.needsMeasurement=!0;return}if(a!==B)if(Ix(a)&&Ix(B))for(let g=0;g<A.length;g++){const u=A[g];typeof u=="string"&&(A[g]=parseFloat(u))}else nd[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:A,name:t}=this,n=[];for(let s=0;s<A.length;s++)(A[s]===null||Cq(A[s]))&&n.push(s);n.length&&yq(A,n,t)}measureInitialState(){const{element:A,unresolvedKeyframes:t,name:n}=this;if(!A||!A.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=nd[n](A.measureViewportBox(),window.getComputedStyle(A.current)),t[0]=this.measuredOrigin;const s=t[t.length-1];s!==void 0&&A.getValue(n,s).jump(s,!1)}measureEndState(){const{element:A,name:t,unresolvedKeyframes:n}=this;if(!A||!A.current)return;const s=A.getValue(t);s&&s.jump(this.measuredOrigin,!1);const r=n.length-1,a=n[r];n[r]=nd[t](A.measureViewportBox(),window.getComputedStyle(A.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([B,c])=>{A.getValue(B).set(c)}),this.resolveNoneKeyframes()}}function qx(e,A,t){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const s=t?.[e]??n.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(n=>n!=null)}const $x=(e,A)=>A&&typeof e=="number"?A.transform(e):e;function ZI(e){return VM(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:jy}=tx(queueMicrotask,!1),no={x:!1,y:!1};function A2(){return no.x||no.y}function Zq(e){return e==="x"||e==="y"?no[e]?null:(no[e]=!0,()=>{no[e]=!1}):no.x||no.y?null:(no.x=no.y=!0,()=>{no.x=no.y=!1})}function e2(e,A){const t=qx(e),n=new AbortController,s={passive:!0,...A,signal:n.signal};return[t,s,()=>n.abort()]}function kq(e){return!(e.pointerType==="touch"||A2())}function Uq(e,A,t={}){const[n,s,r]=e2(e,t);return n.forEach(a=>{let B=!1,c=!1,l;const g=()=>{a.removeEventListener("pointerleave",v)},u=m=>{l&&(l(m),l=void 0),g()},f=m=>{B=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,u(m))},w=()=>{B=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},v=m=>{if(m.pointerType!=="touch"){if(B){c=!0;return}u(m)}},E=m=>{if(!kq(m))return;c=!1;const Z=A(a,m);typeof Z=="function"&&(l=Z,a.addEventListener("pointerleave",v,s))};a.addEventListener("pointerenter",E,s),a.addEventListener("pointerdown",w,s)}),r}const t2=(e,A)=>A?e===A?!0:t2(e,A.parentElement):!1,_y=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Dq=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Fq(e){return Dq.has(e.tagName)||e.isContentEditable===!0}const Mq=new Set(["INPUT","SELECT","TEXTAREA"]);function xq(e){return Mq.has(e.tagName)||e.isContentEditable===!0}const kI=new WeakSet;function n2(e){return A=>{A.key==="Enter"&&e(A)}}function qy(e,A){e.dispatchEvent(new PointerEvent("pointer"+A,{isPrimary:!0,bubbles:!0}))}const Pq=(e,A)=>{const t=e.currentTarget;if(!t)return;const n=n2(()=>{if(kI.has(t))return;qy(t,"down");const s=n2(()=>{qy(t,"up")}),r=()=>qy(t,"cancel");t.addEventListener("keyup",s,A),t.addEventListener("blur",r,A)});t.addEventListener("keydown",n,A),t.addEventListener("blur",()=>t.removeEventListener("keydown",n),A)};function s2(e){return _y(e)&&!A2()}const r2=new WeakSet;function Tq(e,A,t={}){const[n,s,r]=e2(e,t),a=B=>{const c=B.currentTarget;if(!s2(B)||r2.has(B))return;kI.add(c),t.stopPropagation&&r2.add(B);const l=A(c,B),g=(w,v)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",f),kI.has(c)&&kI.delete(c),s2(w)&&typeof l=="function"&&l(w,{success:v})},u=w=>{g(w,c===window||c===document||t.useGlobalTarget||t2(c,w.target))},f=w=>{g(w,!1)};window.addEventListener("pointerup",u,s),window.addEventListener("pointercancel",f,s)};return n.forEach(B=>{(t.useGlobalTarget?window:B).addEventListener("pointerdown",a,s),ZI(B)&&(B.addEventListener("focus",l=>Pq(l,s)),!Fq(B)&&!B.hasAttribute("tabindex")&&(B.tabIndex=0))}),r}function $y(e){return VM(e)&&"ownerSVGElement"in e}const UI=new WeakMap;let DI;const a2=(e,A,t)=>(n,s)=>s&&s[0]?s[0][e+"Size"]:$y(n)&&"getBBox"in n?n.getBBox()[A]:n[t],Rq=a2("inline","width","offsetWidth"),Sq=a2("block","height","offsetHeight");function Vq({target:e,borderBoxSize:A}){UI.get(e)?.forEach(t=>{t(e,{get width(){return Rq(e,A)},get height(){return Sq(e,A)}})})}function Wq(e){e.forEach(Vq)}function Nq(){typeof ResizeObserver>"u"||(DI=new ResizeObserver(Wq))}function zq(e,A){DI||Nq();const t=qx(e);return t.forEach(n=>{let s=UI.get(n);s||(s=new Set,UI.set(n,s)),s.add(A),DI?.observe(n)}),()=>{t.forEach(n=>{const s=UI.get(n);s?.delete(A),s?.size||DI?.unobserve(n)})}}const FI=new Set;let Qh;function Lq(){Qh=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};FI.forEach(A=>A(e))},window.addEventListener("resize",Qh)}function Xq(e){return FI.add(e),Qh||Lq(),()=>{FI.delete(e),!FI.size&&typeof Qh=="function"&&(window.removeEventListener("resize",Qh),Qh=void 0)}}function i2(e,A){return typeof e=="function"?Xq(e):zq(e,A)}function Oq(e){return $y(e)&&e.tagName==="svg"}const Jq=[...Ox,Ds,to],Kq=e=>Jq.find(Xx(e)),B2=()=>({translate:0,scale:1,origin:0,originPoint:0}),bh=()=>({x:B2(),y:B2()}),o2=()=>({min:0,max:0}),Ks=()=>({x:o2(),y:o2()}),jq=new WeakMap;function MI(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function NQ(e){return typeof e=="string"||Array.isArray(e)}const A3=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],e3=["initial",...A3];function xI(e){return MI(e.animate)||e3.some(A=>NQ(e[A]))}function c2(e){return!!(xI(e)||e.variants)}function _q(e,A,t){for(const n in A){const s=A[n],r=t[n];if(Ur(s))e.addValue(n,s);else if(Ur(r))e.addValue(n,wh(s,{owner:e}));else if(r!==s)if(e.hasValue(n)){const a=e.getValue(n);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(n);e.addValue(n,wh(a!==void 0?a:s,{owner:e}))}}for(const n in t)A[n]===void 0&&e.removeValue(n);return A}const t3={current:null},l2={current:!1},qq=typeof window<"u";function $q(){if(l2.current=!0,!!qq)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),A=()=>t3.current=e.matches;e.addEventListener("change",A),A()}else t3.current=!1}const g2=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let PI={};function d2(e){PI=e}function A$(){return PI}class e${scrapeMotionValuesFromProps(A,t,n){return{}}constructor({parent:A,props:t,presenceContext:n,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:a,visualState:B},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=xy,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const w=ca.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,cn.render(this.render,!1,!0))};const{latestValues:l,renderState:g}=B;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=g,this.parent=A,this.props=t,this.presenceContext=n,this.depth=A?A.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=xI(t),this.isVariantNode=c2(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(A&&A.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(t,{},this);for(const w in f){const v=f[w];l[w]!==void 0&&Ur(v)&&v.set(l[w])}}mount(A){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=A,jq.set(A,this),this.projection&&!this.projection.instance&&this.projection.mount(A),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,n)=>this.bindToMotionValue(n,t)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(l2.current||$q(),this.shouldReduceMotion=t3.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ed(this.notifyUpdate),ed(this.render),this.valueSubscriptions.forEach(A=>A()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const A in this.events)this.events[A].clear();for(const A in this.features){const t=this.features[A];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(A){this.children.add(A),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(A)}removeChild(A){this.children.delete(A),this.enteringChildren&&this.enteringChildren.delete(A)}bindToMotionValue(A,t){if(this.valueSubscriptions.has(A)&&this.valueSubscriptions.get(A)(),t.accelerate&&Mx.has(A)&&this.current instanceof HTMLElement){const{factory:a,keyframes:B,times:c,ease:l,duration:g}=t.accelerate,u=new Ux({element:this.current,name:A,keyframes:B,times:c,ease:l,duration:Hi(g)}),f=a(u);this.valueSubscriptions.set(A,()=>{f(),u.cancel()});return}const n=hh.has(A);n&&this.onBindTransform&&this.onBindTransform();const s=t.on("change",a=>{this.latestValues[A]=a,this.props.onUpdate&&cn.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,A,t)),this.valueSubscriptions.set(A,()=>{s(),r&&r(),t.owner&&t.stop()})}sortNodePosition(A){return!this.current||!this.sortInstanceNodePosition||this.type!==A.type?0:this.sortInstanceNodePosition(this.current,A.current)}updateFeatures(){let A="animation";for(A in PI){const t=PI[A];if(!t)continue;const{isEnabled:n,Feature:s}=t;if(!this.features[A]&&s&&n(this.props)&&(this.features[A]=new s(this)),this.features[A]){const r=this.features[A];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ks()}getStaticValue(A){return this.latestValues[A]}setStaticValue(A,t){this.latestValues[A]=t}update(A,t){(A.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=A,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<g2.length;n++){const s=g2[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,a=A[r];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=_q(this,this.scrapeMotionValuesFromProps(A,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(A){return this.props.variants?this.props.variants[A]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(A){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(A),()=>t.variantChildren.delete(A)}addValue(A,t){const n=this.values.get(A);t!==n&&(n&&this.removeValue(A),this.bindToMotionValue(A,t),this.values.set(A,t),this.latestValues[A]=t.get())}removeValue(A){this.values.delete(A);const t=this.valueSubscriptions.get(A);t&&(t(),this.valueSubscriptions.delete(A)),delete this.latestValues[A],this.removeValueFromRenderState(A,this.renderState)}hasValue(A){return this.values.has(A)}getValue(A,t){if(this.props.values&&this.props.values[A])return this.props.values[A];let n=this.values.get(A);return n===void 0&&t!==void 0&&(n=wh(t===null?void 0:t,{owner:this}),this.addValue(A,n)),n}readValue(A,t){let n=this.latestValues[A]!==void 0||!this.current?this.latestValues[A]:this.getBaseTargetFromProps(this.props,A)??this.readValueFromInstance(this.current,A,this.options);return n!=null&&(typeof n=="string"&&(SM(n)||WM(n))?n=parseFloat(n):!Kq(n)&&to.test(t)&&(n=_x(A,t)),this.setBaseTarget(A,Ur(n)?n.get():n)),Ur(n)?n.get():n}setBaseTarget(A,t){this.baseTarget[A]=t}getBaseTarget(A){const{initial:t}=this.props;let n;if(typeof t=="string"||typeof t=="object"){const r=Vy(this.props,t,this.presenceContext?.custom);r&&(n=r[A])}if(t&&n!==void 0)return n;const s=this.getBaseTargetFromProps(this.props,A);return s!==void 0&&!Ur(s)?s:this.initialValues[A]!==void 0&&n===void 0?void 0:this.baseTarget[A]}on(A,t){return this.events[A]||(this.events[A]=new ly),this.events[A].add(t)}notify(A,...t){this.events[A]&&this.events[A].notify(...t)}scheduleRenderMicrotask(){jy.render(this.render)}}class u2 extends e${constructor(){super(...arguments),this.KeyframeResolver=Yq}sortInstanceNodePosition(A,t){return A.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(A,t){const n=A.style;return n?n[t]:void 0}removeValueFromRenderState(A,{vars:t,style:n}){delete t[A],delete n[A]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:A}=this.props;Ur(A)&&(this.childSubscription=A.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class sd{constructor(A){this.isMounted=!1,this.node=A}update(){}}function G2({top:e,left:A,right:t,bottom:n}){return{x:{min:A,max:t},y:{min:e,max:n}}}function t$({x:e,y:A}){return{top:A.min,right:e.max,bottom:A.max,left:e.min}}function n$(e,A){if(!A)return e;const t=A({x:e.left,y:e.top}),n=A({x:e.right,y:e.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}function n3(e){return e===void 0||e===1}function s3({scale:e,scaleX:A,scaleY:t}){return!n3(e)||!n3(A)||!n3(t)}function dG(e){return s3(e)||f2(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function f2(e){return h2(e.x)||h2(e.y)}function h2(e){return e&&e!=="0%"}function TI(e,A,t){const n=e-t,s=A*n;return t+s}function w2(e,A,t,n,s){return s!==void 0&&(e=TI(e,s,n)),TI(e,t,n)+A}function r3(e,A=0,t=1,n,s){e.min=w2(e.min,A,t,n,s),e.max=w2(e.max,A,t,n,s)}function Q2(e,{x:A,y:t}){r3(e.x,A.translate,A.scale,A.originPoint),r3(e.y,t.translate,t.scale,t.originPoint)}const b2=.999999999999,C2=1.0000000000001;function s$(e,A,t,n=!1){const s=t.length;if(!s)return;A.x=A.y=1;let r,a;for(let B=0;B<s;B++){r=t[B],a=r.projectionDelta;const{visualElement:c}=r.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(hc(e.x,-r.scroll.offset.x),hc(e.y,-r.scroll.offset.y)),a&&(A.x*=a.x.scale,A.y*=a.y.scale,Q2(e,a)),n&&dG(r.latestValues)&&RI(e,r.latestValues,r.layout?.layoutBox))}A.x<C2&&A.x>b2&&(A.x=1),A.y<C2&&A.y>b2&&(A.y=1)}function hc(e,A){e.min+=A,e.max+=A}function v2(e,A,t,n,s=.5){const r=mn(e.min,e.max,s);r3(e,A,t,r,n)}function I2(e,A){return typeof e=="string"?parseFloat(e)/100*(A.max-A.min):e}function RI(e,A,t){const n=t??e;v2(e.x,I2(A.x,n.x),A.scaleX,A.scale,A.originX),v2(e.y,I2(A.y,n.y),A.scaleY,A.scale,A.originY)}function p2(e,A){return G2(n$(e.getBoundingClientRect(),A))}function r$(e,A,t){const n=p2(e,t),{scroll:s}=A;return s&&(hc(n.x,s.offset.x),hc(n.y,s.offset.y)),n}const a$={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},i$=fh.length;function B$(e,A,t){let n="",s=!0;for(let r=0;r<i$;r++){const a=fh[r],B=e[a];if(B===void 0)continue;let c=!0;if(typeof B=="number")c=B===(a.startsWith("scale")?1:0);else{const l=parseFloat(B);c=a.startsWith("scale")?l===1:l===0}if(!c||t){const l=$x(B,Ky[a]);if(!c){s=!1;const g=a$[a]||a;n+=`${g}(${l}) `}t&&(A[a]=l)}}return n=n.trim(),t?n=t(A,s?"":n):s&&(n="none"),n}function a3(e,A,t){const{style:n,vars:s,transformOrigin:r}=e;let a=!1,B=!1;for(const c in A){const l=A[c];if(hh.has(c)){a=!0;continue}else if(sx(c)){s[c]=l;continue}else{const g=$x(l,Ky[c]);c.startsWith("origin")?(B=!0,r[c]=g):n[c]=g}}if(A.transform||(a||t?n.transform=B$(A,e.transform,t):n.transform&&(n.transform="none")),B){const{originX:c="50%",originY:l="50%",originZ:g=0}=r;n.transformOrigin=`${c} ${l} ${g}`}}function H2(e,{style:A,vars:t},n,s){const r=e.style;let a;for(a in A)r[a]=A[a];s?.applyProjectionStyles(r,n);for(a in t)r.setProperty(a,t[a])}function m2(e,A){return A.max===A.min?0:e/(A.max-A.min)*100}const zQ={correct:(e,A)=>{if(!A.target)return e;if(typeof e=="string")if(Be.test(e))e=parseFloat(e);else return e;const t=m2(e,A.target.x),n=m2(e,A.target.y);return`${t}% ${n}%`}},o$={correct:(e,{treeScale:A,projectionDelta:t})=>{const n=e,s=to.parse(e);if(s.length>5)return n;const r=to.createTransformer(e),a=typeof s[0]!="number"?1:0,B=t.x.scale*A.x,c=t.y.scale*A.y;s[0+a]/=B,s[1+a]/=c;const l=mn(B,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=l),typeof s[3+a]=="number"&&(s[3+a]/=l),r(s)}},i3={borderRadius:{...zQ,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zQ,borderTopRightRadius:zQ,borderBottomLeftRadius:zQ,borderBottomRightRadius:zQ,boxShadow:o$};function E2(e,{layout:A,layoutId:t}){return hh.has(e)||e.startsWith("origin")||(A||t!==void 0)&&(!!i3[e]||e==="opacity")}function B3(e,A,t){const n=e.style,s=A?.style,r={};if(!n)return r;for(const a in n)(Ur(n[a])||s&&Ur(s[a])||E2(a,e)||t?.getValue(a)?.liveStyle!==void 0)&&(r[a]=n[a]);return r}function c$(e){return window.getComputedStyle(e)}class l$ extends u2{constructor(){super(...arguments),this.type="html",this.renderInstance=H2}readValueFromInstance(A,t){if(hh.has(t))return this.projection?.isProjecting?ky(t):M6(A,t);{const n=c$(A),s=(sx(t)?n.getPropertyValue(t):n[t])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(A,{transformPagePoint:t}){return p2(A,t)}build(A,t,n){a3(A,t,n.transformTemplate)}scrapeMotionValuesFromProps(A,t,n){return B3(A,t,n)}}const g$={offset:"stroke-dashoffset",array:"stroke-dasharray"},d$={offset:"strokeDashoffset",array:"strokeDasharray"};function u$(e,A,t=1,n=0,s=!0){e.pathLength=1;const r=s?g$:d$;e[r.offset]=`${-n}`,e[r.array]=`${A} ${t}`}const G$=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function y2(e,{attrX:A,attrY:t,attrScale:n,pathLength:s,pathSpacing:r=1,pathOffset:a=0,...B},c,l,g){if(a3(e,B,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:u,style:f}=e;u.transform&&(f.transform=u.transform,delete u.transform),(f.transform||u.transformOrigin)&&(f.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),f.transform&&(f.transformBox=g?.transformBox??"fill-box",delete u.transformBox);for(const w of G$)u[w]!==void 0&&(f[w]=u[w],delete u[w]);A!==void 0&&(u.x=A),t!==void 0&&(u.y=t),n!==void 0&&(u.scale=n),s!==void 0&&u$(u,s,r,a,!1)}const Y2=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Z2=e=>typeof e=="string"&&e.toLowerCase()==="svg";function f$(e,A,t,n){H2(e,A,void 0,n);for(const s in A.attrs)e.setAttribute(Y2.has(s)?s:Ly(s),A.attrs[s])}function k2(e,A,t){const n=B3(e,A,t);for(const s in e)if(Ur(e[s])||Ur(A[s])){const r=fh.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[r]=e[s]}return n}class h$ extends u2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ks}getBaseTargetFromProps(A,t){return A[t]}readValueFromInstance(A,t){if(hh.has(t)){const n=jx(t);return n&&n.default||0}return t=Y2.has(t)?t:Ly(t),A.getAttribute(t)}scrapeMotionValuesFromProps(A,t,n){return k2(A,t,n)}build(A,t,n){y2(A,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(A,t,n,s){f$(A,t,n,s)}mount(A){this.isSVGTag=Z2(A.tagName),super.mount(A)}}const w$=e3.length;function U2(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent?U2(e.parent)||{}:{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}const A={};for(let t=0;t<w$;t++){const n=e3[t],s=e.props[n];(NQ(s)||s===!1)&&(A[n]=s)}return A}function D2(e,A){if(!Array.isArray(A))return!1;const t=A.length;if(t!==e.length)return!1;for(let n=0;n<t;n++)if(A[n]!==e[n])return!1;return!0}const Q$=[...A3].reverse(),b$=A3.length;function C$(e){return A=>Promise.all(A.map(({animation:t,options:n})=>Lx(e,t,n)))}function v$(e){let A=C$(e),t=F2(),n=!0,s=!1;const r=l=>(g,u)=>{const f=gG(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:w,transitionEnd:v,...E}=f;g={...g,...E,...v}}return g};function a(l){A=l(e)}function B(l){const{props:g}=e,u=U2(e.parent)||{},f=[],w=new Set;let v={},E=1/0;for(let Z=0;Z<b$;Z++){const D=Q$[Z],T=t[D],S=g[D]!==void 0?g[D]:u[D],F=NQ(S),V=D===l?T.isActive:null;V===!1&&(E=Z);let N=S===u[D]&&S!==g[D]&&F;if(N&&(n||s)&&e.manuallyAnimateOnMount&&(N=!1),T.protectedKeys={...v},!T.isActive&&V===null||!S&&!T.prevProp||MI(S)||typeof S=="boolean")continue;if(D==="exit"&&T.isActive&&V!==!0){T.prevResolvedValues&&(v={...v,...T.prevResolvedValues});continue}const X=I$(T.prevProp,S);let eA=X||D===l&&T.isActive&&!N&&F||Z>E&&F,$=!1;const rA=Array.isArray(S)?S:[S];let iA=rA.reduce(r(D),{});V===!1&&(iA={});const{prevResolvedValues:hA={}}=T,fA={...hA,...iA},yA=AA=>{eA=!0,w.has(AA)&&($=!0,w.delete(AA)),T.needsAnimating[AA]=!0;const MA=e.getValue(AA);MA&&(MA.liveStyle=!1)};for(const AA in fA){const MA=iA[AA],q=hA[AA];if(v.hasOwnProperty(AA))continue;let W=!1;Wy(MA)&&Wy(q)?W=!D2(MA,q):W=MA!==q,W?MA!=null?yA(AA):w.add(AA):MA!==void 0&&w.has(AA)?yA(AA):T.protectedKeys[AA]=!0}T.prevProp=S,T.prevResolvedValues=iA,T.isActive&&(v={...v,...iA}),(n||s)&&e.blockInitialAnimation&&(eA=!1);const L=N&&X;eA&&(!L||$)&&f.push(...rA.map(AA=>{const MA={type:D};if(typeof AA=="string"&&(n||s)&&!L&&e.manuallyAnimateOnMount&&e.parent){const{parent:q}=e,W=gG(q,AA);if(q.enteringChildren&&W){const{delayChildren:dA}=W.transition||{};MA.delay=xx(q.enteringChildren,e,dA)}}return{animation:AA,options:MA}}))}if(w.size){const Z={};if(typeof g.initial!="boolean"){const D=gG(e,Array.isArray(g.initial)?g.initial[0]:g.initial);D&&D.transition&&(Z.transition=D.transition)}w.forEach(D=>{const T=e.getBaseTarget(D),S=e.getValue(D);S&&(S.liveStyle=!0),Z[D]=T??null}),f.push({animation:Z})}let m=!!f.length;return n&&(g.initial===!1||g.initial===g.animate)&&!e.manuallyAnimateOnMount&&(m=!1),n=!1,s=!1,m?A(f):Promise.resolve()}function c(l,g){if(t[l].isActive===g)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(l,g)),t[l].isActive=g;const u=B(l);for(const f in t)t[f].protectedKeys={};return u}return{animateChanges:B,setActive:c,setAnimateFunction:a,getState:()=>t,reset:()=>{t=F2(),s=!0}}}function I$(e,A){return typeof A=="string"?A!==e:Array.isArray(A)?!D2(A,e):!1}function uG(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function F2(){return{animate:uG(!0),whileInView:uG(),whileHover:uG(),whileTap:uG(),whileDrag:uG(),whileFocus:uG(),exit:uG()}}function o3(e,A){e.min=A.min,e.max=A.max}function so(e,A){o3(e.x,A.x),o3(e.y,A.y)}function M2(e,A){e.translate=A.translate,e.scale=A.scale,e.originPoint=A.originPoint,e.origin=A.origin}const x2=1e-4,p$=1-x2,H$=1+x2,P2=.01,m$=0-P2,E$=0+P2;function la(e){return e.max-e.min}function y$(e,A,t){return Math.abs(e-A)<=t}function T2(e,A,t,n=.5){e.origin=n,e.originPoint=mn(A.min,A.max,e.origin),e.scale=la(t)/la(A),e.translate=mn(t.min,t.max,e.origin)-e.originPoint,(e.scale>=p$&&e.scale<=H$||isNaN(e.scale))&&(e.scale=1),(e.translate>=m$&&e.translate<=E$||isNaN(e.translate))&&(e.translate=0)}function LQ(e,A,t,n){T2(e.x,A.x,t.x,n?n.originX:void 0),T2(e.y,A.y,t.y,n?n.originY:void 0)}function R2(e,A,t,n=0){const s=n?mn(t.min,t.max,n):t.min;e.min=s+A.min,e.max=e.min+la(A)}function Y$(e,A,t,n){R2(e.x,A.x,t.x,n?.x),R2(e.y,A.y,t.y,n?.y)}function S2(e,A,t,n=0){const s=n?mn(t.min,t.max,n):t.min;e.min=A.min-s,e.max=e.min+la(A)}function SI(e,A,t,n){S2(e.x,A.x,t.x,n?.x),S2(e.y,A.y,t.y,n?.y)}function V2(e,A,t,n,s){return e-=A,e=TI(e,1/t,n),s!==void 0&&(e=TI(e,1/s,n)),e}function Z$(e,A=0,t=1,n=.5,s,r=e,a=e){if(fc.test(A)&&(A=parseFloat(A),A=mn(a.min,a.max,A/100)-a.min),typeof A!="number")return;let B=mn(r.min,r.max,n);e===r&&(B-=A),e.min=V2(e.min,A,t,B,s),e.max=V2(e.max,A,t,B,s)}function W2(e,A,[t,n,s],r,a){Z$(e,A[t],A[n],A[s],A.scale,r,a)}const k$=["x","scaleX","originX"],U$=["y","scaleY","originY"];function N2(e,A,t,n){W2(e.x,A,k$,t?t.x:void 0,n?n.x:void 0),W2(e.y,A,U$,t?t.y:void 0,n?n.y:void 0)}function z2(e){return e.translate===0&&e.scale===1}function L2(e){return z2(e.x)&&z2(e.y)}function X2(e,A){return e.min===A.min&&e.max===A.max}function D$(e,A){return X2(e.x,A.x)&&X2(e.y,A.y)}function O2(e,A){return Math.round(e.min)===Math.round(A.min)&&Math.round(e.max)===Math.round(A.max)}function J2(e,A){return O2(e.x,A.x)&&O2(e.y,A.y)}function K2(e){return la(e.x)/la(e.y)}function j2(e,A){return e.translate===A.translate&&e.scale===A.scale&&e.originPoint===A.originPoint}function wc(e){return[e("x"),e("y")]}function F$(e,A,t){let n="";const s=e.x.translate/A.x,r=e.y.translate/A.y,a=t?.z||0;if((s||r||a)&&(n=`translate3d(${s}px, ${r}px, ${a}px) `),(A.x!==1||A.y!==1)&&(n+=`scale(${1/A.x}, ${1/A.y}) `),t){const{transformPerspective:l,rotate:g,rotateX:u,rotateY:f,skewX:w,skewY:v}=t;l&&(n=`perspective(${l}px) ${n}`),g&&(n+=`rotate(${g}deg) `),u&&(n+=`rotateX(${u}deg) `),f&&(n+=`rotateY(${f}deg) `),w&&(n+=`skewX(${w}deg) `),v&&(n+=`skewY(${v}deg) `)}const B=e.x.scale*A.x,c=e.y.scale*A.y;return(B!==1||c!==1)&&(n+=`scale(${B}, ${c})`),n||"none"}const _2=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],M$=_2.length,q2=e=>typeof e=="string"?parseFloat(e):e,$2=e=>typeof e=="number"||Be.test(e);function x$(e,A,t,n,s,r){s?(e.opacity=mn(0,t.opacity??1,P$(n)),e.opacityExit=mn(A.opacity??1,0,T$(n))):r&&(e.opacity=mn(A.opacity??1,t.opacity??1,n));for(let a=0;a<M$;a++){const B=_2[a];let c=AP(A,B),l=AP(t,B);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||$2(c)===$2(l)?(e[B]=Math.max(mn(q2(c),q2(l),n),0),(fc.test(l)||fc.test(c))&&(e[B]+="%")):e[B]=l}(A.rotate||t.rotate)&&(e.rotate=mn(A.rotate||0,t.rotate||0,n))}function AP(e,A){return e[A]!==void 0?e[A]:e.borderRadius}const P$=eP(0,.5,_M),T$=eP(.5,.95,lB);function eP(e,A,t){return n=>n<e?0:n>A?1:t(xQ(e,A,n))}function R$(e,A,t){const n=Ur(e)?e:wh(e);return n.start(Sy("",n,A,t)),n.animation}function XQ(e,A,t,n={passive:!0}){return e.addEventListener(A,t,n),()=>e.removeEventListener(A,t)}const S$=(e,A)=>e.depth-A.depth;class V${constructor(){this.children=[],this.isDirty=!1}add(A){oy(this.children,A),this.isDirty=!0}remove(A){CI(this.children,A),this.isDirty=!0}forEach(A){this.isDirty&&this.children.sort(S$),this.isDirty=!1,this.children.forEach(A)}}function W$(e,A){const t=ca.now(),n=({timestamp:s})=>{const r=s-t;r>=A&&(ed(n),e(r-A))};return cn.setup(n,!0),()=>ed(n)}function VI(e){return Ur(e)?e.get():e}class N${constructor(){this.members=[]}add(A){oy(this.members,A);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===A||n===this.lead||n===this.prevLead)continue;const s=n.instance;(!s||s.isConnected===!1)&&!n.snapshot&&(CI(this.members,n),n.unmount())}A.scheduleRender()}remove(A){if(CI(this.members,A),A===this.prevLead&&(this.prevLead=void 0),A===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(A){for(let t=this.members.indexOf(A)-1;t>=0;t--){const n=this.members[t];if(n.isPresent!==!1&&n.instance?.isConnected!==!1)return this.promote(n),!0}return!1}promote(A,t){const n=this.lead;if(A!==n&&(this.prevLead=n,this.lead=A,A.show(),n)){n.updateSnapshot(),A.scheduleRender();const{layoutDependency:s}=n.options,{layoutDependency:r}=A.options;(s===void 0||s!==r)&&(A.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(A.snapshot=n.snapshot,A.snapshot.latestValues=n.animationValues||n.latestValues),A.root?.isUpdating&&(A.isLayoutDirty=!0)),A.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(A=>{A.options.onExitComplete?.(),A.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(A=>A.instance&&A.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const WI={hasAnimatedSinceResize:!0,hasEverUpdated:!1},c3=["","X","Y","Z"],z$=1e3;let L$=0;function l3(e,A,t,n){const{latestValues:s}=A;s[e]&&(t[e]=s[e],A.setStaticValue(e,0),n&&(n[e]=0))}function tP(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:A}=e.options;if(!A)return;const t=Nx(A);if(window.MotionHasOptimisedAnimation(t,"transform")){const{layout:s,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(t,"transform",cn,!(s||r))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&tP(n)}function nP({attachResizeListener:e,defaultParent:A,measureScroll:t,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(a={},B=A?.()){this.id=L$++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(J$),this.nodes.forEach(AAA),this.nodes.forEach(eAA),this.nodes.forEach(K$)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=B?B.root||B:this,this.path=B?[...B.path,B]:[],this.parent=B,this.depth=B?B.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new V$)}addEventListener(a,B){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new ly),this.eventHandlers.get(a).add(B)}notifyListeners(a,...B){const c=this.eventHandlers.get(a);c&&c.notify(...B)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=$y(a)&&!Oq(a),this.instance=a;const{layoutId:B,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||B)&&(this.isLayoutDirty=!0),e){let g,u=0;const f=()=>this.root.updateBlockedByResize=!1;cn.read(()=>{u=window.innerWidth}),e(a,()=>{const w=window.innerWidth;w!==u&&(u=w,this.root.updateBlockedByResize=!0,g&&g(),g=W$(f,250),WI.hasAnimatedSinceResize&&(WI.hasAnimatedSinceResize=!1,this.nodes.forEach(aP)))})}B&&this.root.registerSharedNode(B,this),this.options.animate!==!1&&l&&(B||c)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:u,hasRelativeLayoutChanged:f,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||l.getDefaultTransition()||aAA,{onLayoutAnimationStart:E,onLayoutAnimationComplete:m}=l.getProps(),Z=!this.targetLayout||!J2(this.targetLayout,w),D=!u&&f;if(this.options.layoutRoot||this.resumeFrom||D||u&&(Z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...Ry(v,"layout"),onPlay:E,onComplete:m};(l.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(g,D)}else u||aP(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ed(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(tAA),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&tP(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const u=this.path[g];u.shouldResetTransform=!0,(typeof u.latestValues.x=="string"||typeof u.latestValues.y=="string")&&(u.isLayoutDirty=!0),u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:B,layout:c}=this.options;if(B===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(_$),this.nodes.forEach(sP);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(rP);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(q$),this.nodes.forEach($$),this.nodes.forEach(X$),this.nodes.forEach(O$)):this.nodes.forEach(rP),this.clearAllSnapshots();const B=ca.now();kr.delta=Gc(0,1e3/60,B-kr.timestamp),kr.timestamp=B,kr.isProcessing=!0,uy.update.process(kr),uy.preRender.process(kr),uy.render.process(kr),kr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,jy.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(j$),this.sharedNodes.forEach(nAA)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,cn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){cn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!la(this.snapshot.measuredBox.x)&&!la(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Ks()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:B}=this.options;B&&B.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let B=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(B=!1),B&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,B=this.projectionDelta&&!L2(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,g=l!==this.prevTransformTemplateValue;a&&this.instance&&(B||dG(this.latestValues)||g)&&(s(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const B=this.measurePageBox();let c=this.removeElementScroll(B);return a&&(c=this.removeTransform(c)),iAA(c),{animationId:this.root.animationId,measuredBox:B,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Ks();const B=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(BAA))){const{scroll:l}=this.root;l&&(hc(B.x,l.offset.x),hc(B.y,l.offset.y))}return B}removeElementScroll(a){const B=Ks();if(so(B,a),this.scroll?.wasRoot)return B;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:g,options:u}=l;l!==this.root&&g&&u.layoutScroll&&(g.wasRoot&&so(B,a),hc(B.x,g.offset.x),hc(B.y,g.offset.y))}return B}applyTransform(a,B=!1,c){const l=c||Ks();so(l,a);for(let g=0;g<this.path.length;g++){const u=this.path[g];!B&&u.options.layoutScroll&&u.scroll&&u!==u.root&&(hc(l.x,-u.scroll.offset.x),hc(l.y,-u.scroll.offset.y)),dG(u.latestValues)&&RI(l,u.latestValues,u.layout?.layoutBox)}return dG(this.latestValues)&&RI(l,this.latestValues,this.layout?.layoutBox),l}removeTransform(a){const B=Ks();so(B,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!dG(l.latestValues))continue;let g;l.instance&&(s3(l.latestValues)&&l.updateSnapshot(),g=Ks(),so(g,l.measurePageBox())),N2(B,l.latestValues,l.snapshot?.layoutBox,g)}return dG(this.latestValues)&&N2(B,this.latestValues),B}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==kr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const B=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=B.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=B.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=B.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==B;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:u}=this.options;if(!this.layout||!(g||u))return;this.resolvedRelativeTargetAt=kr.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ks(),this.targetWithTransforms=Ks()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Y$(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):so(this.target,this.layout.layoutBox),Q2(this.target,this.targetDelta)):so(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||s3(this.parent.latestValues)||f2(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,B,c){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ks(),this.relativeTargetOrigin=Ks(),SI(this.relativeTargetOrigin,B,c,this.options.layoutAnchor||void 0),so(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),B=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),B&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===kr.timestamp&&(c=!1),c)return;const{layout:l,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||g))return;so(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,f=this.treeScale.y;s$(this.layoutCorrected,this.treeScale,this.path,B),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ks());const{target:w}=a;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(M2(this.prevProjectionDelta.x,this.projectionDelta.x),M2(this.prevProjectionDelta.y,this.projectionDelta.y)),LQ(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==f||!j2(this.projectionDelta.x,this.prevProjectionDelta.x)||!j2(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const B=this.getStack();B&&B.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=bh(),this.projectionDelta=bh(),this.projectionDeltaWithTransform=bh()}setAnimationOrigin(a,B=!1){const c=this.snapshot,l=c?c.latestValues:{},g={...this.latestValues},u=bh();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!B;const f=Ks(),w=c?c.source:void 0,v=this.layout?this.layout.source:void 0,E=w!==v,m=this.getStack(),Z=!m||m.members.length<=1,D=!!(E&&!Z&&this.options.crossfade===!0&&!this.path.some(rAA));this.animationProgress=0;let T;this.mixTargetDelta=S=>{const F=S/1e3;iP(u.x,a.x,F),iP(u.y,a.y,F),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(SI(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),sAA(this.relativeTarget,this.relativeTargetOrigin,f,F),T&&D$(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Ks()),so(T,this.relativeTarget)),E&&(this.animationValues=g,x$(g,l,this.latestValues,F,D,Z)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=F},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ed(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=cn.update(()=>{WI.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=wh(0)),this.motionValue.jump(0,!1),this.currentAnimation=R$(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:B=>{this.mixTargetDelta(B),a.onUpdate&&a.onUpdate(B)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(z$),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:B,target:c,layout:l,latestValues:g}=a;if(!(!B||!c||!l)){if(this!==a&&this.layout&&l&&gP(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Ks();const u=la(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+u;const f=la(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}so(B,c),RI(B,g),LQ(this.projectionDeltaWithTransform,this.layoutCorrected,B,g)}}registerSharedNode(a,B){this.sharedNodes.has(a)||this.sharedNodes.set(a,new N$),this.sharedNodes.get(a).add(B);const l=B.options.initialPromotionConfig;B.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(B):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:B,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),B&&this.setOptions({transition:B})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let B=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(B=!0),!B)return;const l={};c.z&&l3("z",a,l,this.animationValues);for(let g=0;g<c3.length;g++)l3(`rotate${c3[g]}`,a,l,this.animationValues),l3(`skew${c3[g]}`,a,l,this.animationValues);a.render();for(const g in l)a.setStaticValue(g,l[g]),this.animationValues&&(this.animationValues[g]=l[g]);a.scheduleRender()}applyProjectionStyles(a,B){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=VI(B?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=VI(B?.pointerEvents)||""),this.hasProjected&&!dG(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const g=l.animationValues||l.latestValues;this.applyTransformsToTarget();let u=F$(this.projectionDeltaWithTransform,this.treeScale,g);c&&(u=c(g,u)),a.transform=u;const{x:f,y:w}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${w.origin*100}% 0`,l.animationValues?a.opacity=l===this?g.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:a.opacity=l===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const v in i3){if(g[v]===void 0)continue;const{correct:E,applyTo:m,isCSSVariable:Z}=i3[v],D=u==="none"?g[v]:E(g[v],l);if(m){const T=m.length;for(let S=0;S<T;S++)a[m[S]]=D}else Z?this.options.visualElement.renderState.vars[v]=D:a[v]=D}this.options.layoutId&&(a.pointerEvents=l===this?VI(B?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(sP),this.root.sharedNodes.clear()}}}function X$(e){e.updateLayout()}function O$(e){const A=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&A&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:n}=e.layout,{animationType:s}=e.options,r=A.source!==e.layout.source;if(s==="size")wc(g=>{const u=r?A.measuredBox[g]:A.layoutBox[g],f=la(u);u.min=t[g].min,u.max=u.min+f});else if(s==="x"||s==="y"){const g=s==="x"?"y":"x";o3(r?A.measuredBox[g]:A.layoutBox[g],t[g])}else gP(s,A.layoutBox,t)&&wc(g=>{const u=r?A.measuredBox[g]:A.layoutBox[g],f=la(t[g]);u.max=u.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[g].max=e.relativeTarget[g].min+f)});const a=bh();LQ(a,t,A.layoutBox);const B=bh();r?LQ(B,e.applyTransform(n,!0),A.measuredBox):LQ(B,t,A.layoutBox);const c=!L2(a);let l=!1;if(!e.resumeFrom){const g=e.getClosestProjectingParent();if(g&&!g.resumeFrom){const{snapshot:u,layout:f}=g;if(u&&f){const w=e.options.layoutAnchor||void 0,v=Ks();SI(v,A.layoutBox,u.layoutBox,w);const E=Ks();SI(E,t,f.layoutBox,w),J2(v,E)||(l=!0),g.options.layoutRoot&&(e.relativeTarget=E,e.relativeTargetOrigin=v,e.relativeParent=g)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:A,delta:B,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function J$(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function K$(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function j$(e){e.clearSnapshot()}function sP(e){e.clearMeasurements()}function _$(e){e.isLayoutDirty=!0,e.updateLayout()}function rP(e){e.isLayoutDirty=!1}function q$(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function $$(e){const{visualElement:A}=e.options;A&&A.getProps().onBeforeLayoutMeasure&&A.notify("BeforeLayoutMeasure"),e.resetTransform()}function aP(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function AAA(e){e.resolveTargetDelta()}function eAA(e){e.calcProjection()}function tAA(e){e.resetSkewAndRotation()}function nAA(e){e.removeLeadSnapshot()}function iP(e,A,t){e.translate=mn(A.translate,0,t),e.scale=mn(A.scale,1,t),e.origin=A.origin,e.originPoint=A.originPoint}function BP(e,A,t,n){e.min=mn(A.min,t.min,n),e.max=mn(A.max,t.max,n)}function sAA(e,A,t,n){BP(e.x,A.x,t.x,n),BP(e.y,A.y,t.y,n)}function rAA(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const aAA={duration:.45,ease:[.4,0,.1,1]},oP=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),cP=oP("applewebkit/")&&!oP("chrome/")?Math.round:lB;function lP(e){e.min=cP(e.min),e.max=cP(e.max)}function iAA(e){lP(e.x),lP(e.y)}function gP(e,A,t){return e==="position"||e==="preserve-aspect"&&!y$(K2(A),K2(t),.2)}function BAA(e){return e!==e.root&&e.scroll?.wasRoot}const oAA=nP({attachResizeListener:(e,A)=>XQ(e,"resize",A),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),g3={current:void 0},dP=nP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!g3.current){const e=new oAA({});e.mount(window),e.setOptions({layoutScroll:!0}),g3.current=e}return g3.current},resetTransform:(e,A)=>{e.style.transform=A!==void 0?A:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),d3=R.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function uP(e,A){if(typeof e=="function")return e(A);e!=null&&(e.current=A)}function cAA(...e){return A=>{let t=!1;const n=e.map(s=>{const r=uP(s,A);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let s=0;s<n.length;s++){const r=n[s];typeof r=="function"?r():uP(e[s],null)}}}}function lAA(...e){return R.useCallback(cAA(...e),e)}class gAA extends R.Component{getSnapshotBeforeUpdate(A){const t=this.props.childRef.current;if(ZI(t)&&A.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const n=t.offsetParent,s=ZI(n)&&n.offsetWidth||0,r=ZI(n)&&n.offsetHeight||0,a=getComputedStyle(t),B=this.props.sizeRef.current;B.height=parseFloat(a.height),B.width=parseFloat(a.width),B.top=t.offsetTop,B.left=t.offsetLeft,B.right=s-B.width-B.left,B.bottom=r-B.height-B.top}return null}componentDidUpdate(){}render(){return this.props.children}}function dAA({children:e,isPresent:A,anchorX:t,anchorY:n,root:s,pop:r}){const a=R.useId(),B=R.useRef(null),c=R.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=R.useContext(d3),g=e.props?.ref??e?.ref,u=lAA(B,g);return R.useInsertionEffect(()=>{const{width:f,height:w,top:v,left:E,right:m,bottom:Z}=c.current;if(A||r===!1||!B.current||!f||!w)return;const D=t==="left"?`left: ${E}`:`right: ${m}`,T=n==="bottom"?`bottom: ${Z}`:`top: ${v}`;B.current.dataset.motionPopId=a;const S=document.createElement("style");l&&(S.nonce=l);const F=s??document.head;return F.appendChild(S),S.sheet&&S.sheet.insertRule(`
57
57
  [data-motion-pop-id="${a}"] {
58
58
  position: absolute !important;
59
59
  width: ${f}px !important;
@@ -94,7 +94,7 @@ or you can use record.mirror to access the mirror instance during recording.`;le
94
94
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(A){return A instanceof this?A:new this(A)}static concat(A,...t){const n=new this(A);return t.forEach(s=>n.set(s)),n}static accessor(A){const n=(this[Y1]=this[Y1]={accessors:{}}).accessors,s=this.prototype;function r(a){const B=Kb(a);n[B]||(ewA(s,a),n[B]=!0)}return HA.isArray(A)?A.forEach(r):r(A),this}};ja.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),HA.reduceDescriptors(ja.prototype,({value:e},A)=>{let t=A[0].toUpperCase()+A.slice(1);return{get:()=>e,set(n){this[t]=n}}}),HA.freezeMethods(ja);function rZ(e,A){const t=this||Jb,n=A||t,s=ja.from(n.headers);let r=n.data;return HA.forEach(e,function(B){r=B.call(t,r,s.normalize(),A?A.status:void 0)}),s.normalize(),r}function Z1(e){return!!(e&&e.__CANCEL__)}let jb=class extends me{constructor(A,t,n){super(A??"canceled",me.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function k1(e,A,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?e(t):A(new me("Request failed with status code "+t.status,[me.ERR_BAD_REQUEST,me.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function twA(e){const A=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return A&&A[1]||""}function nwA(e,A){e=e||10;const t=new Array(e),n=new Array(e);let s=0,r=0,a;return A=A!==void 0?A:1e3,function(c){const l=Date.now(),g=n[r];a||(a=l),t[s]=c,n[s]=l;let u=r,f=0;for(;u!==s;)f+=t[u++],u=u%e;if(s=(s+1)%e,s===r&&(r=(r+1)%e),l-a<A)return;const w=g&&l-g;return w?Math.round(f*1e3/w):void 0}}function swA(e,A){let t=0,n=1e3/A,s,r;const a=(l,g=Date.now())=>{t=g,s=null,r&&(clearTimeout(r),r=null),e(...l)};return[(...l)=>{const g=Date.now(),u=g-t;u>=n?a(l,g):(s=l,r||(r=setTimeout(()=>{r=null,a(s)},n-u)))},()=>s&&a(s)]}const FH=(e,A,t=3)=>{let n=0;const s=nwA(50,250);return swA(r=>{const a=r.loaded,B=r.lengthComputable?r.total:void 0,c=a-n,l=s(c),g=a<=B;n=a;const u={loaded:a,total:B,progress:B?a/B:void 0,bytes:c,rate:l||void 0,estimated:l&&B&&g?(B-a)/l:void 0,event:r,lengthComputable:B!=null,[A?"download":"upload"]:!0};e(u)},t)},U1=(e,A)=>{const t=e!=null;return[n=>A[0]({lengthComputable:t,total:e,loaded:n}),A[1]]},D1=e=>(...A)=>HA.asap(()=>e(...A)),rwA=Jr.hasStandardBrowserEnv?((e,A)=>t=>(t=new URL(t,Jr.origin),e.protocol===t.protocol&&e.host===t.host&&(A||e.port===t.port)))(new URL(Jr.origin),Jr.navigator&&/(msie|trident)/i.test(Jr.navigator.userAgent)):()=>!0,awA=Jr.hasStandardBrowserEnv?{write(e,A,t,n,s,r,a){if(typeof document>"u")return;const B=[`${e}=${encodeURIComponent(A)}`];HA.isNumber(t)&&B.push(`expires=${new Date(t).toUTCString()}`),HA.isString(n)&&B.push(`path=${n}`),HA.isString(s)&&B.push(`domain=${s}`),r===!0&&B.push("secure"),HA.isString(a)&&B.push(`SameSite=${a}`),document.cookie=B.join("; ")},read(e){if(typeof document>"u")return null;const A=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return A?decodeURIComponent(A[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function iwA(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function BwA(e,A){return A?e.replace(/\/?\/$/,"")+"/"+A.replace(/^\/+/,""):e}function F1(e,A,t){let n=!iwA(A);return e&&(n||t==!1)?BwA(e,A):A}const M1=e=>e instanceof ja?{...e}:e;function xG(e,A){A=A||{};const t={};function n(l,g,u,f){return HA.isPlainObject(l)&&HA.isPlainObject(g)?HA.merge.call({caseless:f},l,g):HA.isPlainObject(g)?HA.merge({},g):HA.isArray(g)?g.slice():g}function s(l,g,u,f){if(HA.isUndefined(g)){if(!HA.isUndefined(l))return n(void 0,l,u,f)}else return n(l,g,u,f)}function r(l,g){if(!HA.isUndefined(g))return n(void 0,g)}function a(l,g){if(HA.isUndefined(g)){if(!HA.isUndefined(l))return n(void 0,l)}else return n(void 0,g)}function B(l,g,u){if(u in A)return n(l,g);if(u in e)return n(void 0,l)}const c={url:r,method:r,data:r,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:B,headers:(l,g,u)=>s(M1(l),M1(g),u,!0)};return HA.forEach(Object.keys({...e,...A}),function(g){if(g==="__proto__"||g==="constructor"||g==="prototype")return;const u=HA.hasOwnProp(c,g)?c[g]:s,f=u(e[g],A[g],g);HA.isUndefined(f)&&u!==B||(t[g]=f)}),t}const x1=e=>{const A=xG({},e);let{data:t,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:r,headers:a,auth:B}=A;if(A.headers=a=ja.from(a),A.url=m1(F1(A.baseURL,A.url,A.allowAbsoluteUrls),e.params,e.paramsSerializer),B&&a.set("Authorization","Basic "+btoa((B.username||"")+":"+(B.password?unescape(encodeURIComponent(B.password)):""))),HA.isFormData(t)){if(Jr.hasStandardBrowserEnv||Jr.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(HA.isFunction(t.getHeaders)){const c=t.getHeaders(),l=["content-type","content-length"];Object.entries(c).forEach(([g,u])=>{l.includes(g.toLowerCase())&&a.set(g,u)})}}if(Jr.hasStandardBrowserEnv&&(n&&HA.isFunction(n)&&(n=n(A)),n||n!==!1&&rwA(A.url))){const c=s&&r&&awA.read(r);c&&a.set(s,c)}return A},owA=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(t,n){const s=x1(e);let r=s.data;const a=ja.from(s.headers).normalize();let{responseType:B,onUploadProgress:c,onDownloadProgress:l}=s,g,u,f,w,v;function E(){w&&w(),v&&v(),s.cancelToken&&s.cancelToken.unsubscribe(g),s.signal&&s.signal.removeEventListener("abort",g)}let m=new XMLHttpRequest;m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout;function Z(){if(!m)return;const T=ja.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),F={data:!B||B==="text"||B==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:T,config:e,request:m};k1(function(N){t(N),E()},function(N){n(N),E()},F),m=null}"onloadend"in m?m.onloadend=Z:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(Z)},m.onabort=function(){m&&(n(new me("Request aborted",me.ECONNABORTED,e,m)),m=null)},m.onerror=function(S){const F=S&&S.message?S.message:"Network Error",V=new me(F,me.ERR_NETWORK,e,m);V.event=S||null,n(V),m=null},m.ontimeout=function(){let S=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const F=s.transitional||eZ;s.timeoutErrorMessage&&(S=s.timeoutErrorMessage),n(new me(S,F.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,e,m)),m=null},r===void 0&&a.setContentType(null),"setRequestHeader"in m&&HA.forEach(a.toJSON(),function(S,F){m.setRequestHeader(F,S)}),HA.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),B&&B!=="json"&&(m.responseType=s.responseType),l&&([f,v]=FH(l,!0),m.addEventListener("progress",f)),c&&m.upload&&([u,w]=FH(c),m.upload.addEventListener("progress",u),m.upload.addEventListener("loadend",w)),(s.cancelToken||s.signal)&&(g=T=>{m&&(n(!T||T.type?new jb(null,e,m):T),m.abort(),m=null)},s.cancelToken&&s.cancelToken.subscribe(g),s.signal&&(s.signal.aborted?g():s.signal.addEventListener("abort",g)));const D=twA(s.url);if(D&&Jr.protocols.indexOf(D)===-1){n(new me("Unsupported protocol "+D+":",me.ERR_BAD_REQUEST,e));return}m.send(r||null)})},cwA=(e,A)=>{const{length:t}=e=e?e.filter(Boolean):[];if(A||t){let n=new AbortController,s;const r=function(l){if(!s){s=!0,B();const g=l instanceof Error?l:this.reason;n.abort(g instanceof me?g:new jb(g instanceof Error?g.message:g))}};let a=A&&setTimeout(()=>{a=null,r(new me(`timeout of ${A}ms exceeded`,me.ETIMEDOUT))},A);const B=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(r):l.removeEventListener("abort",r)}),e=null)};e.forEach(l=>l.addEventListener("abort",r));const{signal:c}=n;return c.unsubscribe=()=>HA.asap(B),c}},lwA=function*(e,A){let t=e.byteLength;if(t<A){yield e;return}let n=0,s;for(;n<t;)s=n+A,yield e.slice(n,s),n=s},gwA=async function*(e,A){for await(const t of dwA(e))yield*lwA(t,A)},dwA=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const A=e.getReader();try{for(;;){const{done:t,value:n}=await A.read();if(t)break;yield n}}finally{await A.cancel()}},P1=(e,A,t,n)=>{const s=gwA(e,A);let r=0,a,B=c=>{a||(a=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:l,value:g}=await s.next();if(l){B(),c.close();return}let u=g.byteLength;if(t){let f=r+=u;t(f)}c.enqueue(new Uint8Array(g))}catch(l){throw B(l),l}},cancel(c){return B(c),s.return()}},{highWaterMark:2})},T1=64*1024,{isFunction:MH}=HA,uwA=(({Request:e,Response:A})=>({Request:e,Response:A}))(HA.global),{ReadableStream:R1,TextEncoder:S1}=HA.global,V1=(e,...A)=>{try{return!!e(...A)}catch{return!1}},GwA=e=>{e=HA.merge.call({skipUndefined:!0},uwA,e);const{fetch:A,Request:t,Response:n}=e,s=A?MH(A):typeof fetch=="function",r=MH(t),a=MH(n);if(!s)return!1;const B=s&&MH(R1),c=s&&(typeof S1=="function"?(v=>E=>v.encode(E))(new S1):async v=>new Uint8Array(await new t(v).arrayBuffer())),l=r&&B&&V1(()=>{let v=!1;const E=new R1,m=new t(Jr.origin,{body:E,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return E.cancel(),v&&!m}),g=a&&B&&V1(()=>HA.isReadableStream(new n("").body)),u={stream:g&&(v=>v.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!u[v]&&(u[v]=(E,m)=>{let Z=E&&E[v];if(Z)return Z.call(E);throw new me(`Response type '${v}' is not supported`,me.ERR_NOT_SUPPORT,m)})});const f=async v=>{if(v==null)return 0;if(HA.isBlob(v))return v.size;if(HA.isSpecCompliantForm(v))return(await new t(Jr.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(HA.isArrayBufferView(v)||HA.isArrayBuffer(v))return v.byteLength;if(HA.isURLSearchParams(v)&&(v=v+""),HA.isString(v))return(await c(v)).byteLength},w=async(v,E)=>{const m=HA.toFiniteNumber(v.getContentLength());return m??f(E)};return async v=>{let{url:E,method:m,data:Z,signal:D,cancelToken:T,timeout:S,onDownloadProgress:F,onUploadProgress:V,responseType:N,headers:X,withCredentials:eA="same-origin",fetchOptions:$}=x1(v),rA=A||fetch;N=N?(N+"").toLowerCase():"text";let iA=cwA([D,T&&T.toAbortSignal()],S),hA=null;const fA=iA&&iA.unsubscribe&&(()=>{iA.unsubscribe()});let yA;try{if(V&&l&&m!=="get"&&m!=="head"&&(yA=await w(X,Z))!==0){let W=new t(E,{method:"POST",body:Z,duplex:"half"}),dA;if(HA.isFormData(Z)&&(dA=W.headers.get("content-type"))&&X.setContentType(dA),W.body){const[ZA,YA]=U1(yA,FH(D1(V)));Z=P1(W.body,T1,ZA,YA)}}HA.isString(eA)||(eA=eA?"include":"omit");const L=r&&"credentials"in t.prototype,_={...$,signal:iA,method:m.toUpperCase(),headers:X.normalize().toJSON(),body:Z,duplex:"half",credentials:L?eA:void 0};hA=r&&new t(E,_);let AA=await(r?rA(hA,$):rA(E,_));const MA=g&&(N==="stream"||N==="response");if(g&&(F||MA&&fA)){const W={};["status","statusText","headers"].forEach(DA=>{W[DA]=AA[DA]});const dA=HA.toFiniteNumber(AA.headers.get("content-length")),[ZA,YA]=F&&U1(dA,FH(D1(F),!0))||[];AA=new n(P1(AA.body,T1,ZA,()=>{YA&&YA(),fA&&fA()}),W)}N=N||"text";let q=await u[HA.findKey(u,N)||"text"](AA,v);return!MA&&fA&&fA(),await new Promise((W,dA)=>{k1(W,dA,{data:q,headers:ja.from(AA.headers),status:AA.status,statusText:AA.statusText,config:v,request:hA})})}catch(L){throw fA&&fA(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new me("Network Error",me.ERR_NETWORK,v,hA,L&&L.response),{cause:L.cause||L}):me.from(L,L&&L.code,v,hA,L&&L.response)}}},fwA=new Map,W1=e=>{let A=e&&e.env||{};const{fetch:t,Request:n,Response:s}=A,r=[n,s,t];let a=r.length,B=a,c,l,g=fwA;for(;B--;)c=r[B],l=g.get(c),l===void 0&&g.set(c,l=B?new Map:GwA(A)),g=l;return l};W1();const aZ={http:ThA,xhr:owA,fetch:{get:W1}};HA.forEach(aZ,(e,A)=>{if(e){try{Object.defineProperty(e,"name",{value:A})}catch{}Object.defineProperty(e,"adapterName",{value:A})}});const N1=e=>`- ${e}`,hwA=e=>HA.isFunction(e)||e===null||e===!1;function wwA(e,A){e=HA.isArray(e)?e:[e];const{length:t}=e;let n,s;const r={};for(let a=0;a<t;a++){n=e[a];let B;if(s=n,!hwA(n)&&(s=aZ[(B=String(n)).toLowerCase()],s===void 0))throw new me(`Unknown adapter '${B}'`);if(s&&(HA.isFunction(s)||(s=s.get(A))))break;r[B||"#"+a]=s}if(!s){const a=Object.entries(r).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let B=t?a.length>1?`since :
95
95
  `+a.map(N1).join(`
96
96
  `):" "+N1(a[0]):"as no adapter specified";throw new me("There is no suitable adapter to dispatch the request "+B,"ERR_NOT_SUPPORT")}return s}const z1={getAdapter:wwA,adapters:aZ};function iZ(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new jb(null,e)}function L1(e){return iZ(e),e.headers=ja.from(e.headers),e.data=rZ.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),z1.getAdapter(e.adapter||Jb.adapter,e)(e).then(function(n){return iZ(e),n.data=rZ.call(e,e.transformResponse,n),n.headers=ja.from(n.headers),n},function(n){return Z1(n)||(iZ(e),n&&n.response&&(n.response.data=rZ.call(e,e.transformResponse,n.response),n.response.headers=ja.from(n.response.headers))),Promise.reject(n)})}const X1="1.14.0",xH={};["object","boolean","number","function","string","symbol"].forEach((e,A)=>{xH[e]=function(n){return typeof n===e||"a"+(A<1?"n ":" ")+e}});const O1={};xH.transitional=function(A,t,n){function s(r,a){return"[Axios v"+X1+"] Transitional option '"+r+"'"+a+(n?". "+n:"")}return(r,a,B)=>{if(A===!1)throw new me(s(a," has been removed"+(t?" in "+t:"")),me.ERR_DEPRECATED);return t&&!O1[a]&&(O1[a]=!0,console.warn(s(a," has been deprecated since v"+t+" and will be removed in the near future"))),A?A(r,a,B):!0}},xH.spelling=function(A){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${A}`),!0)};function QwA(e,A,t){if(typeof e!="object")throw new me("options must be an object",me.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const r=n[s],a=A[r];if(a){const B=e[r],c=B===void 0||a(B,r,e);if(c!==!0)throw new me("option "+r+" must be "+c,me.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new me("Unknown option "+r,me.ERR_BAD_OPTION)}}const PH={assertOptions:QwA,validators:xH},wB=PH.validators;let PG=class{constructor(A){this.defaults=A||{},this.interceptors={request:new E1,response:new E1}}async request(A,t){try{return await this._request(A,t)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const r=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?r&&!String(n.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(n.stack+=`
97
- `+r):n.stack=r}catch{}}throw n}}_request(A,t){typeof A=="string"?(t=t||{},t.url=A):t=A||{},t=xG(this.defaults,t);const{transitional:n,paramsSerializer:s,headers:r}=t;n!==void 0&&PH.assertOptions(n,{silentJSONParsing:wB.transitional(wB.boolean),forcedJSONParsing:wB.transitional(wB.boolean),clarifyTimeoutError:wB.transitional(wB.boolean),legacyInterceptorReqResOrdering:wB.transitional(wB.boolean)},!1),s!=null&&(HA.isFunction(s)?t.paramsSerializer={serialize:s}:PH.assertOptions(s,{encode:wB.function,serialize:wB.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),PH.assertOptions(t,{baseUrl:wB.spelling("baseURL"),withXsrfToken:wB.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=r&&HA.merge(r.common,r[t.method]);r&&HA.forEach(["delete","get","head","post","put","patch","common"],v=>{delete r[v]}),t.headers=ja.concat(a,r);const B=[];let c=!0;this.interceptors.request.forEach(function(E){if(typeof E.runWhen=="function"&&E.runWhen(t)===!1)return;c=c&&E.synchronous;const m=t.transitional||eZ;m&&m.legacyInterceptorReqResOrdering?B.unshift(E.fulfilled,E.rejected):B.push(E.fulfilled,E.rejected)});const l=[];this.interceptors.response.forEach(function(E){l.push(E.fulfilled,E.rejected)});let g,u=0,f;if(!c){const v=[L1.bind(this),void 0];for(v.unshift(...B),v.push(...l),f=v.length,g=Promise.resolve(t);u<f;)g=g.then(v[u++],v[u++]);return g}f=B.length;let w=t;for(;u<f;){const v=B[u++],E=B[u++];try{w=v(w)}catch(m){E.call(this,m);break}}try{g=L1.call(this,w)}catch(v){return Promise.reject(v)}for(u=0,f=l.length;u<f;)g=g.then(l[u++],l[u++]);return g}getUri(A){A=xG(this.defaults,A);const t=F1(A.baseURL,A.url,A.allowAbsoluteUrls);return m1(t,A.params,A.paramsSerializer)}};HA.forEach(["delete","get","head","options"],function(A){PG.prototype[A]=function(t,n){return this.request(xG(n||{},{method:A,url:t,data:(n||{}).data}))}}),HA.forEach(["post","put","patch"],function(A){function t(n){return function(r,a,B){return this.request(xG(B||{},{method:A,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:a}))}}PG.prototype[A]=t(),PG.prototype[A+"Form"]=t(!0)});let bwA=class IK{constructor(A){if(typeof A!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(r){t=r});const n=this;this.promise.then(s=>{if(!n._listeners)return;let r=n._listeners.length;for(;r-- >0;)n._listeners[r](s);n._listeners=null}),this.promise.then=s=>{let r;const a=new Promise(B=>{n.subscribe(B),r=B}).then(s);return a.cancel=function(){n.unsubscribe(r)},a},A(function(r,a,B){n.reason||(n.reason=new jb(r,a,B),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(A){if(this.reason){A(this.reason);return}this._listeners?this._listeners.push(A):this._listeners=[A]}unsubscribe(A){if(!this._listeners)return;const t=this._listeners.indexOf(A);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const A=new AbortController,t=n=>{A.abort(n)};return this.subscribe(t),A.signal.unsubscribe=()=>this.unsubscribe(t),A.signal}static source(){let A;return{token:new IK(function(s){A=s}),cancel:A}}};function CwA(e){return function(t){return e.apply(null,t)}}function vwA(e){return HA.isObject(e)&&e.isAxiosError===!0}const BZ={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(BZ).forEach(([e,A])=>{BZ[A]=e});function J1(e){const A=new PG(e),t=g1(PG.prototype.request,A);return HA.extend(t,PG.prototype,A,{allOwnKeys:!0}),HA.extend(t,A,null,{allOwnKeys:!0}),t.create=function(s){return J1(xG(e,s))},t}const fs=J1(Jb);fs.Axios=PG,fs.CanceledError=jb,fs.CancelToken=bwA,fs.isCancel=Z1,fs.VERSION=X1,fs.toFormData=UH,fs.AxiosError=me,fs.Cancel=fs.CanceledError,fs.all=function(A){return Promise.all(A)},fs.spread=CwA,fs.isAxiosError=vwA,fs.mergeConfig=xG,fs.AxiosHeaders=ja,fs.formToJSON=e=>y1(HA.isHTMLForm(e)?new FormData(e):e),fs.getAdapter=z1.getAdapter,fs.HttpStatusCode=BZ,fs.default=fs;const{Axios:oPA,AxiosError:cPA,CanceledError:lPA,isCancel:gPA,CancelToken:dPA,VERSION:uPA,all:GPA,Cancel:fPA,isAxiosError:K1,spread:hPA,toFormData:wPA,AxiosHeaders:QPA,HttpStatusCode:bPA,formToJSON:CPA,getAdapter:vPA,mergeConfig:IPA}=fs,IwA="https://46735cdcba6c9e360dc10987b2be144d@o4507919735324672.ingest.us.sentry.io/4511274341367808",pwA=["localhost",/^\//],HwA=["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications."],mwA=new Set([400,403]);function TG(e){return!e||typeof e!="object"?e:Array.isArray(e)?e.map(TG):Object.fromEntries(Object.entries(e).map(([A,t])=>/(authorization|cookie|token|api[-_]?key|x-org-id|x-api-key)/i.test(A)?[A,"[redacted]"]:[A,TG(t)]))}function EwA(){jfA({dsn:IwA,environment:"production",release:"2.2.6-ela",sendDefaultPii:!1,initialScope:{tags:{"app.name":"@careshiphealth/widget","app.surface":"widget"}},integrations:[LfA({traceFetch:!1,traceXHR:!1}),IfA({maskAllText:!0,blockAllMedia:!0,networkDetailAllowUrls:[hI]})],tracesSampleRate:.2,tracePropagationTargets:pwA,replaysSessionSampleRate:.05,replaysOnErrorSampleRate:1,ignoreErrors:HwA,beforeSend(e,A){const t=A?.originalException,n=t?.response?.status??t?.status;return n&&n<500&&!mwA.has(n)?null:(e.request&&(e.request=TG(e.request)),e.extra&&(e.extra=TG(e.extra)),e)}})}function ywA(e){e.orgId&&kG("org.id",e.orgId),e.containerId&&kG("widget.container_id",e.containerId),e.host&&kG("widget.host",e.host),R9("widget_init",TG(e))}function YwA(e){kG("org.id",e.id),e.name&&kG("org.name",e.name),e.color&&kG("org.color",e.color)}function ZwA(e){kG("widget.route",e),zl({category:"navigation",type:"navigation",level:"info",message:e})}function j1(e,A){ub(t=>{A&&t.setExtras(TG(A)),T9(e)})}function _1(e,A,t="error"){ub(n=>{n.setLevel(t),A&&n.setExtras(TG(A)),FBA(e)})}const _a=fs.create({baseURL:`${hI}/ela-external`,headers:{"Content-Type":"application/json"}});_a.interceptors.request.use(e=>{const A=Bd("psid");A&&(e.headers.Authorization=`Bearer ${A}`);const t=Bd("wak");t&&(e.headers["x-api-key"]=t);const n=Bd("woid");return n&&(e.headers["x-org-id"]=n),e.headers["x-user-context"]="lead",e}),_a.interceptors.response.use(e=>e,e=>{const A=e.response?.status;return A==401&&o9("psid"),(!e.response||A===400||A===403||A>=500)&&j1(e,{area:"api",baseURL:e.config?.baseURL,url:e.config?.url,method:e.config?.method,status:A}),Promise.reject(e)});const kwA=async()=>_a.get("/info"),UwA=async e=>_a.post("/meet-and-greet/schedule",e),DwA=async e=>_a.post("/appointment/book",e),FwA=async e=>_a.post("/subscribe",{...e,mode:"widget"}),MwA=async()=>_a.get("/xi-signed-url"),xwA=async e=>_a.post("/request-call-back",e),PwA=async e=>_a.post("/verify-call-back-otp",e),TwA=async e=>_a.post("/resend-call-back-otp",e);var aw=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},RwA=class extends aw{#A;#e;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const A=()=>e();return window.addEventListener("visibilitychange",A,!1),()=>{window.removeEventListener("visibilitychange",A)}}}}onSubscribe(){this.#e||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#t=e,this.#e?.(),this.#e=e(A=>{typeof A=="boolean"?this.setFocused(A):this.onFocus()})}setFocused(e){this.#A!==e&&(this.#A=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(A=>{A(e)})}isFocused(){return typeof this.#A=="boolean"?this.#A:globalThis.document?.visibilityState!=="hidden"}},oZ=new RwA,SwA={setTimeout:(e,A)=>setTimeout(e,A),clearTimeout:e=>clearTimeout(e),setInterval:(e,A)=>setInterval(e,A),clearInterval:e=>clearInterval(e)},VwA=class{#A=SwA;#e=!1;setTimeoutProvider(e){this.#A=e}setTimeout(e,A){return this.#A.setTimeout(e,A)}clearTimeout(e){this.#A.clearTimeout(e)}setInterval(e,A){return this.#A.setInterval(e,A)}clearInterval(e){this.#A.clearInterval(e)}},RG=new VwA;function WwA(e){setTimeout(e,0)}var NwA=typeof window>"u"||"Deno"in globalThis;function fa(){}function zwA(e,A){return typeof e=="function"?e(A):e}function cZ(e){return typeof e=="number"&&e>=0&&e!==1/0}function q1(e,A){return Math.max(e+(A||0)-Date.now(),0)}function Id(e,A){return typeof e=="function"?e(A):e}function QB(e,A){return typeof e=="function"?e(A):e}function $1(e,A){const{type:t="all",exact:n,fetchStatus:s,predicate:r,queryKey:a,stale:B}=e;if(a){if(n){if(A.queryHash!==lZ(a,A.options))return!1}else if(!_b(A.queryKey,a))return!1}if(t!=="all"){const c=A.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof B=="boolean"&&A.isStale()!==B||s&&s!==A.state.fetchStatus||r&&!r(A))}function AV(e,A){const{exact:t,status:n,predicate:s,mutationKey:r}=e;if(r){if(!A.options.mutationKey)return!1;if(t){if(SG(A.options.mutationKey)!==SG(r))return!1}else if(!_b(A.options.mutationKey,r))return!1}return!(n&&A.state.status!==n||s&&!s(A))}function lZ(e,A){return(A?.queryKeyHashFn||SG)(e)}function SG(e){return JSON.stringify(e,(A,t)=>gZ(t)?Object.keys(t).sort().reduce((n,s)=>(n[s]=t[s],n),{}):t)}function _b(e,A){return e===A?!0:typeof e!=typeof A?!1:e&&A&&typeof e=="object"&&typeof A=="object"?Object.keys(A).every(t=>_b(e[t],A[t])):!1}var LwA=Object.prototype.hasOwnProperty;function eV(e,A,t=0){if(e===A)return e;if(t>500)return A;const n=tV(e)&&tV(A);if(!n&&!(gZ(e)&&gZ(A)))return A;const r=(n?e:Object.keys(e)).length,a=n?A:Object.keys(A),B=a.length,c=n?new Array(B):{};let l=0;for(let g=0;g<B;g++){const u=n?g:a[g],f=e[u],w=A[u];if(f===w){c[u]=f,(n?g<r:LwA.call(e,u))&&l++;continue}if(f===null||w===null||typeof f!="object"||typeof w!="object"){c[u]=w;continue}const v=eV(f,w,t+1);c[u]=v,v===f&&l++}return r===B&&l===r?e:c}function TH(e,A){if(!A||Object.keys(e).length!==Object.keys(A).length)return!1;for(const t in e)if(e[t]!==A[t])return!1;return!0}function tV(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function gZ(e){if(!nV(e))return!1;const A=e.constructor;if(A===void 0)return!0;const t=A.prototype;return!(!nV(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function nV(e){return Object.prototype.toString.call(e)==="[object Object]"}function XwA(e){return new Promise(A=>{RG.setTimeout(A,e)})}function dZ(e,A,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,A):t.structuralSharing!==!1?eV(e,A):A}function OwA(e,A,t=0){const n=[...e,A];return t&&n.length>t?n.slice(1):n}function JwA(e,A,t=0){const n=[A,...e];return t&&n.length>t?n.slice(0,-1):n}var uZ=Symbol();function sV(e,A){return!e.queryFn&&A?.initialPromise?()=>A.initialPromise:!e.queryFn||e.queryFn===uZ?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function GZ(e,A){return typeof e=="function"?e(...A):!!e}function KwA(e,A,t){let n=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=A(),n||(n=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),e}var qb=(()=>{let e=()=>NwA;return{isServer(){return e()},setIsServer(A){e=A}}})();function fZ(){let e,A;const t=new Promise((s,r)=>{e=s,A=r});t.status="pending",t.catch(()=>{});function n(s){Object.assign(t,s),delete t.resolve,delete t.reject}return t.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},t.reject=s=>{n({status:"rejected",reason:s}),A(s)},t}var jwA=WwA;function _wA(){let e=[],A=0,t=B=>{B()},n=B=>{B()},s=jwA;const r=B=>{A?e.push(B):s(()=>{t(B)})},a=()=>{const B=e;e=[],B.length&&s(()=>{n(()=>{B.forEach(c=>{t(c)})})})};return{batch:B=>{let c;A++;try{c=B()}finally{A--,A||a()}return c},batchCalls:B=>(...c)=>{r(()=>{B(...c)})},schedule:r,setNotifyFunction:B=>{t=B},setBatchNotifyFunction:B=>{n=B},setScheduler:B=>{s=B}}}var er=_wA(),qwA=class extends aw{#A=!0;#e;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const A=()=>e(!0),t=()=>e(!1);return window.addEventListener("online",A,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",A),window.removeEventListener("offline",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#t=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#A!==e&&(this.#A=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#A}},RH=new qwA;function $wA(e){return Math.min(1e3*2**e,3e4)}function rV(e){return(e??"online")==="online"?RH.isOnline():!0}var hZ=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function aV(e){let A=!1,t=0,n;const s=fZ(),r=()=>s.status!=="pending",a=E=>{if(!r()){const m=new hZ(E);f(m),e.onCancel?.(m)}},B=()=>{A=!0},c=()=>{A=!1},l=()=>oZ.isFocused()&&(e.networkMode==="always"||RH.isOnline())&&e.canRun(),g=()=>rV(e.networkMode)&&e.canRun(),u=E=>{r()||(n?.(),s.resolve(E))},f=E=>{r()||(n?.(),s.reject(E))},w=()=>new Promise(E=>{n=m=>{(r()||l())&&E(m)},e.onPause?.()}).then(()=>{n=void 0,r()||e.onContinue?.()}),v=()=>{if(r())return;let E;const m=t===0?e.initialPromise:void 0;try{E=m??e.fn()}catch(Z){E=Promise.reject(Z)}Promise.resolve(E).then(u).catch(Z=>{if(r())return;const D=e.retry??(qb.isServer()?0:3),T=e.retryDelay??$wA,S=typeof T=="function"?T(t,Z):T,F=D===!0||typeof D=="number"&&t<D||typeof D=="function"&&D(t,Z);if(A||!F){f(Z);return}t++,e.onFail?.(t,Z),XwA(S).then(()=>l()?void 0:w()).then(()=>{A?f(Z):v()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(n?.(),s),cancelRetry:B,continueRetry:c,canStart:g,start:()=>(g()?v():w().then(v),s)}}var iV=class{#A;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cZ(this.gcTime)&&(this.#A=RG.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qb.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#A&&(RG.clearTimeout(this.#A),this.#A=void 0)}},AQA=class extends iV{#A;#e;#t;#s;#n;#r;#a;constructor(e){super(),this.#a=!1,this.#r=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#t=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#A=cV(this.options),this.state=e.state??this.#A,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){if(this.options={...this.#r,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const A=cV(this.options);A.data!==void 0&&(this.setState(oV(A.data,A.dataUpdatedAt)),this.#A=A)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,A){const t=dZ(this.state.data,e,this.options);return this.#B({data:t,type:"success",dataUpdatedAt:A?.updatedAt,manual:A?.manual}),t}setState(e,A){this.#B({type:"setState",state:e,setStateOptions:A})}cancel(e){const A=this.#n?.promise;return this.#n?.cancel(e),A?A.then(fa).catch(fa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#A}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>QB(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===uZ||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Id(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!q1(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(A=>A.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(A=>A.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(A=>A!==e),this.observers.length||(this.#n&&(this.#a||this.#i()?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#i(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#B({type:"invalidate"})}async fetch(e,A){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&A?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const B=this.observers.find(c=>c.options.queryFn);B&&this.setOptions(B.options)}const t=new AbortController,n=B=>{Object.defineProperty(B,"signal",{enumerable:!0,get:()=>(this.#a=!0,t.signal)})},s=()=>{const B=sV(this.options,A),l=(()=>{const g={client:this.#s,queryKey:this.queryKey,meta:this.meta};return n(g),g})();return this.#a=!1,this.options.persister?this.options.persister(B,l,this):B(l)},a=(()=>{const B={fetchOptions:A,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:s};return n(B),B})();this.options.behavior?.onFetch(a,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#B({type:"fetch",meta:a.fetchOptions?.meta}),this.#n=aV({initialPromise:A?.initialPromise,fn:a.fetchFn,onCancel:B=>{B instanceof hZ&&B.revert&&this.setState({...this.#e,fetchStatus:"idle"}),t.abort()},onFail:(B,c)=>{this.#B({type:"failed",failureCount:B,error:c})},onPause:()=>{this.#B({type:"pause"})},onContinue:()=>{this.#B({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const B=await this.#n.start();if(B===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(B),this.#t.config.onSuccess?.(B,this),this.#t.config.onSettled?.(B,this.state.error,this),B}catch(B){if(B instanceof hZ){if(B.silent)return this.#n.promise;if(B.revert){if(this.state.data===void 0)throw B;return this.state.data}}throw this.#B({type:"error",error:B}),this.#t.config.onError?.(B,this),this.#t.config.onSettled?.(this.state.data,B,this),B}finally{this.scheduleGc()}}#B(e){const A=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...BV(t.data,this.options),fetchMeta:e.meta??null};case"success":const n={...t,...oV(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=e.manual?n:void 0,n;case"error":const s=e.error;return{...t,error:s,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=A(this.state),er.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function BV(e,A){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rV(A.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function oV(e,A){return{data:e,dataUpdatedAt:A??Date.now(),error:null,isInvalidated:!1,status:"success"}}function cV(e){const A=typeof e.initialData=="function"?e.initialData():e.initialData,t=A!==void 0,n=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:A,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var lV=class extends aw{constructor(e,A){super(),this.options=A,this.#A=e,this.#i=null,this.#a=fZ(),this.bindMethods(),this.setOptions(A)}#A;#e=void 0;#t=void 0;#s=void 0;#n;#r;#a;#i;#B;#d;#u;#c;#l;#o;#G=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),gV(this.#e,this.options)?this.#g():this.updateResult(),this.#Q())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return wZ(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return wZ(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#C(),this.#e.removeObserver(this)}setOptions(e){const A=this.options,t=this.#e;if(this.options=this.#A.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof QB(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#v(),this.#e.setOptions(this.options),A._defaulted&&!TH(this.options,A)&&this.#A.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const n=this.hasListeners();n&&dV(this.#e,t,this.options,A)&&this.#g(),this.updateResult(),n&&(this.#e!==t||QB(this.options.enabled,this.#e)!==QB(A.enabled,this.#e)||Id(this.options.staleTime,this.#e)!==Id(A.staleTime,this.#e))&&this.#f();const s=this.#h();n&&(this.#e!==t||QB(this.options.enabled,this.#e)!==QB(A.enabled,this.#e)||s!==this.#o)&&this.#w(s)}getOptimisticResult(e){const A=this.#A.getQueryCache().build(this.#A,e),t=this.createResult(A,e);return tQA(this,t)&&(this.#s=t,this.#r=this.options,this.#n=this.#e.state),t}getCurrentResult(){return this.#s}trackResult(e,A){return new Proxy(e,{get:(t,n)=>(this.trackProp(n),A?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(t,n))})}trackProp(e){this.#G.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const A=this.#A.defaultQueryOptions(e),t=this.#A.getQueryCache().build(this.#A,A);return t.fetch().then(()=>this.createResult(t,A))}fetch(e){return this.#g({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#g(e){this.#v();let A=this.#e.fetch(this.options,e);return e?.throwOnError||(A=A.catch(fa)),A}#f(){this.#b();const e=Id(this.options.staleTime,this.#e);if(qb.isServer()||this.#s.isStale||!cZ(e))return;const t=q1(this.#s.dataUpdatedAt,e)+1;this.#c=RG.setTimeout(()=>{this.#s.isStale||this.updateResult()},t)}#h(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#w(e){this.#C(),this.#o=e,!(qb.isServer()||QB(this.options.enabled,this.#e)===!1||!cZ(this.#o)||this.#o===0)&&(this.#l=RG.setInterval(()=>{(this.options.refetchIntervalInBackground||oZ.isFocused())&&this.#g()},this.#o))}#Q(){this.#f(),this.#w(this.#h())}#b(){this.#c&&(RG.clearTimeout(this.#c),this.#c=void 0)}#C(){this.#l&&(RG.clearInterval(this.#l),this.#l=void 0)}createResult(e,A){const t=this.#e,n=this.options,s=this.#s,r=this.#n,a=this.#r,c=e!==t?e.state:this.#t,{state:l}=e;let g={...l},u=!1,f;if(A._optimisticResults){const X=this.hasListeners(),eA=!X&&gV(e,A),$=X&&dV(e,t,A,n);(eA||$)&&(g={...g,...BV(l.data,e.options)}),A._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:w,errorUpdatedAt:v,status:E}=g;f=g.data;let m=!1;if(A.placeholderData!==void 0&&f===void 0&&E==="pending"){let X;s?.isPlaceholderData&&A.placeholderData===a?.placeholderData?(X=s.data,m=!0):X=typeof A.placeholderData=="function"?A.placeholderData(this.#u?.state.data,this.#u):A.placeholderData,X!==void 0&&(E="success",f=dZ(s?.data,X,A),u=!0)}if(A.select&&f!==void 0&&!m)if(s&&f===r?.data&&A.select===this.#B)f=this.#d;else try{this.#B=A.select,f=A.select(f),f=dZ(s?.data,f,A),this.#d=f,this.#i=null}catch(X){this.#i=X}this.#i&&(w=this.#i,f=this.#d,v=Date.now(),E="error");const Z=g.fetchStatus==="fetching",D=E==="pending",T=E==="error",S=D&&Z,F=f!==void 0,N={status:E,fetchStatus:g.fetchStatus,isPending:D,isSuccess:E==="success",isError:T,isInitialLoading:S,isLoading:S,data:f,dataUpdatedAt:g.dataUpdatedAt,error:w,errorUpdatedAt:v,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>c.dataUpdateCount||g.errorUpdateCount>c.errorUpdateCount,isFetching:Z,isRefetching:Z&&!D,isLoadingError:T&&!F,isPaused:g.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:T&&F,isStale:QZ(e,A),refetch:this.refetch,promise:this.#a,isEnabled:QB(A.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const X=N.data!==void 0,eA=N.status==="error"&&!X,$=hA=>{eA?hA.reject(N.error):X&&hA.resolve(N.data)},rA=()=>{const hA=this.#a=N.promise=fZ();$(hA)},iA=this.#a;switch(iA.status){case"pending":e.queryHash===t.queryHash&&$(iA);break;case"fulfilled":(eA||N.data!==iA.value)&&rA();break;case"rejected":(!eA||N.error!==iA.reason)&&rA();break}}return N}updateResult(){const e=this.#s,A=this.createResult(this.#e,this.options);if(this.#n=this.#e.state,this.#r=this.options,this.#n.data!==void 0&&(this.#u=this.#e),TH(A,e))return;this.#s=A;const t=()=>{if(!e)return!0;const{notifyOnChangeProps:n}=this.options,s=typeof n=="function"?n():n;if(s==="all"||!s&&!this.#G.size)return!0;const r=new Set(s??this.#G);return this.options.throwOnError&&r.add("error"),Object.keys(this.#s).some(a=>{const B=a;return this.#s[B]!==e[B]&&r.has(B)})};this.#I({listeners:t()})}#v(){const e=this.#A.getQueryCache().build(this.#A,this.options);if(e===this.#e)return;const A=this.#e;this.#e=e,this.#t=e.state,this.hasListeners()&&(A?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#Q()}#I(e){er.batch(()=>{e.listeners&&this.listeners.forEach(A=>{A(this.#s)}),this.#A.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function eQA(e,A){return QB(A.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&A.retryOnMount===!1)}function gV(e,A){return eQA(e,A)||e.state.data!==void 0&&wZ(e,A,A.refetchOnMount)}function wZ(e,A,t){if(QB(A.enabled,e)!==!1&&Id(A.staleTime,e)!=="static"){const n=typeof t=="function"?t(e):t;return n==="always"||n!==!1&&QZ(e,A)}return!1}function dV(e,A,t,n){return(e!==A||QB(n.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&QZ(e,t)}function QZ(e,A){return QB(A.enabled,e)!==!1&&e.isStaleByTime(Id(A.staleTime,e))}function tQA(e,A){return!TH(e.getCurrentResult(),A)}function SH(e){return{onFetch:(A,t)=>{const n=A.options,s=A.fetchOptions?.meta?.fetchMore?.direction,r=A.state.data?.pages||[],a=A.state.data?.pageParams||[];let B={pages:[],pageParams:[]},c=0;const l=async()=>{let g=!1;const u=v=>{KwA(v,()=>A.signal,()=>g=!0)},f=sV(A.options,A.fetchOptions),w=async(v,E,m)=>{if(g)return Promise.reject();if(E==null&&v.pages.length)return Promise.resolve(v);const D=(()=>{const V={client:A.client,queryKey:A.queryKey,pageParam:E,direction:m?"backward":"forward",meta:A.options.meta};return u(V),V})(),T=await f(D),{maxPages:S}=A.options,F=m?JwA:OwA;return{pages:F(v.pages,T,S),pageParams:F(v.pageParams,E,S)}};if(s&&r.length){const v=s==="backward",E=v?uV:bZ,m={pages:r,pageParams:a},Z=E(n,m);B=await w(m,Z,v)}else{const v=e??r.length;do{const E=c===0?a[0]??n.initialPageParam:bZ(n,B);if(c>0&&E==null)break;B=await w(B,E),c++}while(c<v)}return B};A.options.persister?A.fetchFn=()=>A.options.persister?.(l,{client:A.client,queryKey:A.queryKey,meta:A.options.meta,signal:A.signal},t):A.fetchFn=l}}}function bZ(e,{pages:A,pageParams:t}){const n=A.length-1;return A.length>0?e.getNextPageParam(A[n],A,t[n],t):void 0}function uV(e,{pages:A,pageParams:t}){return A.length>0?e.getPreviousPageParam?.(A[0],A,t[0],t):void 0}function nQA(e,A){return A?bZ(e,A)!=null:!1}function sQA(e,A){return!A||!e.getPreviousPageParam?!1:uV(e,A)!=null}var rQA=class extends lV{constructor(e,A){super(e,A)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:SH()})}getOptimisticResult(e){return e.behavior=SH(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,A){const{state:t}=e,n=super.createResult(e,A),{isFetching:s,isRefetching:r,isError:a,isRefetchError:B}=n,c=t.fetchMeta?.fetchMore?.direction,l=a&&c==="forward",g=s&&c==="forward",u=a&&c==="backward",f=s&&c==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:nQA(A,t.data),hasPreviousPage:sQA(A,t.data),isFetchNextPageError:l,isFetchingNextPage:g,isFetchPreviousPageError:u,isFetchingPreviousPage:f,isRefetchError:B&&!l&&!u,isRefetching:r&&!g&&!f}}},aQA=class extends iV{#A;#e;#t;#s;constructor(e){super(),this.#A=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||GV(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(A=>A!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const A=()=>{this.#n({type:"continue"})},t={client:this.#A,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=aV({fn:()=>this.options.mutationFn?this.options.mutationFn(e,t):Promise.reject(new Error("No mutationFn found")),onFail:(r,a)=>{this.#n({type:"failed",failureCount:r,error:a})},onPause:()=>{this.#n({type:"pause"})},onContinue:A,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const n=this.state.status==="pending",s=!this.#s.canStart();try{if(n)A();else{this.#n({type:"pending",variables:e,isPaused:s}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,t);const a=await this.options.onMutate?.(e,t);a!==this.state.context&&this.#n({type:"pending",context:a,variables:e,isPaused:s})}const r=await this.#s.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this,t),await this.options.onSuccess?.(r,e,this.state.context,t),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this,t),await this.options.onSettled?.(r,null,e,this.state.context,t),this.#n({type:"success",data:r}),r}catch(r){try{await this.#t.config.onError?.(r,e,this.state.context,this,t)}catch(a){Promise.reject(a)}try{await this.options.onError?.(r,e,this.state.context,t)}catch(a){Promise.reject(a)}try{await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,t)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,r,e,this.state.context,t)}catch(a){Promise.reject(a)}throw this.#n({type:"error",error:r}),r}finally{this.#t.runNext(this)}}#n(e){const A=t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=A(this.state),er.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function GV(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var iQA=class extends aw{constructor(e={}){super(),this.config=e,this.#A=new Set,this.#e=new Map,this.#t=0}#A;#e;#t;build(e,A,t){const n=new aQA({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(A),state:t});return this.add(n),n}add(e){this.#A.add(e);const A=VH(e);if(typeof A=="string"){const t=this.#e.get(A);t?t.push(e):this.#e.set(A,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#A.delete(e)){const A=VH(e);if(typeof A=="string"){const t=this.#e.get(A);if(t)if(t.length>1){const n=t.indexOf(e);n!==-1&&t.splice(n,1)}else t[0]===e&&this.#e.delete(A)}}this.notify({type:"removed",mutation:e})}canRun(e){const A=VH(e);if(typeof A=="string"){const n=this.#e.get(A)?.find(s=>s.state.status==="pending");return!n||n===e}else return!0}runNext(e){const A=VH(e);return typeof A=="string"?this.#e.get(A)?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){er.batch(()=>{this.#A.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#A.clear(),this.#e.clear()})}getAll(){return Array.from(this.#A)}find(e){const A={exact:!0,...e};return this.getAll().find(t=>AV(A,t))}findAll(e={}){return this.getAll().filter(A=>AV(e,A))}notify(e){er.batch(()=>{this.listeners.forEach(A=>{A(e)})})}resumePausedMutations(){const e=this.getAll().filter(A=>A.state.isPaused);return er.batch(()=>Promise.all(e.map(A=>A.continue().catch(fa))))}};function VH(e){return e.options.scope?.id}var BQA=class extends aw{#A;#e=void 0;#t;#s;constructor(A,t){super(),this.#A=A,this.setOptions(t),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(A){const t=this.options;this.options=this.#A.defaultMutationOptions(A),TH(this.options,t)||this.#A.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),t?.mutationKey&&this.options.mutationKey&&SG(t.mutationKey)!==SG(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(A){this.#n(),this.#r(A)}getCurrentResult(){return this.#e}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#n(),this.#r()}mutate(A,t){return this.#s=t,this.#t?.removeObserver(this),this.#t=this.#A.getMutationCache().build(this.#A,this.options),this.#t.addObserver(this),this.#t.execute(A)}#n(){const A=this.#t?.state??GV();this.#e={...A,isPending:A.status==="pending",isSuccess:A.status==="success",isError:A.status==="error",isIdle:A.status==="idle",mutate:this.mutate,reset:this.reset}}#r(A){er.batch(()=>{if(this.#s&&this.hasListeners()){const t=this.#e.variables,n=this.#e.context,s={client:this.#A,meta:this.options.meta,mutationKey:this.options.mutationKey};if(A?.type==="success"){try{this.#s.onSuccess?.(A.data,t,n,s)}catch(r){Promise.reject(r)}try{this.#s.onSettled?.(A.data,null,t,n,s)}catch(r){Promise.reject(r)}}else if(A?.type==="error"){try{this.#s.onError?.(A.error,t,n,s)}catch(r){Promise.reject(r)}try{this.#s.onSettled?.(void 0,A.error,t,n,s)}catch(r){Promise.reject(r)}}}this.listeners.forEach(t=>{t(this.#e)})})}},oQA=class extends aw{constructor(e={}){super(),this.config=e,this.#A=new Map}#A;build(e,A,t){const n=A.queryKey,s=A.queryHash??lZ(n,A);let r=this.get(s);return r||(r=new AQA({client:e,queryKey:n,queryHash:s,options:e.defaultQueryOptions(A),state:t,defaultOptions:e.getQueryDefaults(n)}),this.add(r)),r}add(e){this.#A.has(e.queryHash)||(this.#A.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const A=this.#A.get(e.queryHash);A&&(e.destroy(),A===e&&this.#A.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){er.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#A.get(e)}getAll(){return[...this.#A.values()]}find(e){const A={exact:!0,...e};return this.getAll().find(t=>$1(A,t))}findAll(e={}){const A=this.getAll();return Object.keys(e).length>0?A.filter(t=>$1(e,t)):A}notify(e){er.batch(()=>{this.listeners.forEach(A=>{A(e)})})}onFocus(){er.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){er.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},cQA=class{#A;#e;#t;#s;#n;#r;#a;#i;constructor(e={}){this.#A=e.queryCache||new oQA,this.#e=e.mutationCache||new iQA,this.#t=e.defaultOptions||{},this.#s=new Map,this.#n=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#a=oZ.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#A.onFocus())}),this.#i=RH.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#A.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#A.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const A=this.defaultQueryOptions({queryKey:e});return this.#A.get(A.queryHash)?.state.data}ensureQueryData(e){const A=this.defaultQueryOptions(e),t=this.#A.build(this,A),n=t.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(Id(A.staleTime,t))&&this.prefetchQuery(A),Promise.resolve(n))}getQueriesData(e){return this.#A.findAll(e).map(({queryKey:A,state:t})=>{const n=t.data;return[A,n]})}setQueryData(e,A,t){const n=this.defaultQueryOptions({queryKey:e}),r=this.#A.get(n.queryHash)?.state.data,a=zwA(A,r);if(a!==void 0)return this.#A.build(this,n).setData(a,{...t,manual:!0})}setQueriesData(e,A,t){return er.batch(()=>this.#A.findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,A,t)]))}getQueryState(e){const A=this.defaultQueryOptions({queryKey:e});return this.#A.get(A.queryHash)?.state}removeQueries(e){const A=this.#A;er.batch(()=>{A.findAll(e).forEach(t=>{A.remove(t)})})}resetQueries(e,A){const t=this.#A;return er.batch(()=>(t.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},A)))}cancelQueries(e,A={}){const t={revert:!0,...A},n=er.batch(()=>this.#A.findAll(e).map(s=>s.cancel(t)));return Promise.all(n).then(fa).catch(fa)}invalidateQueries(e,A={}){return er.batch(()=>(this.#A.findAll(e).forEach(t=>{t.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},A)))}refetchQueries(e,A={}){const t={...A,cancelRefetch:A.cancelRefetch??!0},n=er.batch(()=>this.#A.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let r=s.fetch(void 0,t);return t.throwOnError||(r=r.catch(fa)),s.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(n).then(fa)}fetchQuery(e){const A=this.defaultQueryOptions(e);A.retry===void 0&&(A.retry=!1);const t=this.#A.build(this,A);return t.isStaleByTime(Id(A.staleTime,t))?t.fetch(A):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(fa).catch(fa)}fetchInfiniteQuery(e){return e.behavior=SH(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(fa).catch(fa)}ensureInfiniteQueryData(e){return e.behavior=SH(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return RH.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#A}getMutationCache(){return this.#e}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,A){this.#s.set(SG(e),{queryKey:e,defaultOptions:A})}getQueryDefaults(e){const A=[...this.#s.values()],t={};return A.forEach(n=>{_b(e,n.queryKey)&&Object.assign(t,n.defaultOptions)}),t}setMutationDefaults(e,A){this.#n.set(SG(e),{mutationKey:e,defaultOptions:A})}getMutationDefaults(e){const A=[...this.#n.values()],t={};return A.forEach(n=>{_b(e,n.mutationKey)&&Object.assign(t,n.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const A={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return A.queryHash||(A.queryHash=lZ(A.queryKey,A)),A.refetchOnReconnect===void 0&&(A.refetchOnReconnect=A.networkMode!=="always"),A.throwOnError===void 0&&(A.throwOnError=!!A.suspense),!A.networkMode&&A.persister&&(A.networkMode="offlineFirst"),A.queryFn===uZ&&(A.enabled=!1),A}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#A.clear(),this.#e.clear()}},fV=R.createContext(void 0),CZ=e=>{const A=R.useContext(fV);if(!A)throw new Error("No QueryClient set, use QueryClientProvider to set one");return A},lQA=({client:e,children:A})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(fV.Provider,{value:e,children:A})),hV=R.createContext(!1),gQA=()=>R.useContext(hV);hV.Provider;function dQA(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var uQA=R.createContext(dQA()),GQA=()=>R.useContext(uQA),fQA=(e,A,t)=>{const n=t?.state.error&&typeof e.throwOnError=="function"?GZ(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(A.isReset()||(e.retryOnMount=!1))},hQA=e=>{R.useEffect(()=>{e.clearReset()},[e])},wQA=({result:e,errorResetBoundary:A,throwOnError:t,query:n,suspense:s})=>e.isError&&!A.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||GZ(t,[e.error,n])),QQA=e=>{if(e.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>t(n(...s)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},bQA=(e,A)=>e.isLoading&&e.isFetching&&!A,CQA=(e,A)=>e?.suspense&&A.isPending,wV=(e,A,t)=>A.fetchOptimistic(e).catch(()=>{t.clearReset()});function QV(e,A,t){const n=gQA(),s=GQA(),r=CZ(),a=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const B=r.getQueryCache().get(a.queryHash);a._optimisticResults=n?"isRestoring":"optimistic",QQA(a),fQA(a,s,B),hQA(s);const c=!r.getQueryCache().get(a.queryHash),[l]=R.useState(()=>new A(r,a)),g=l.getOptimisticResult(a),u=!n&&e.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(f=>{const w=u?l.subscribe(er.batchCalls(f)):fa;return l.updateResult(),w},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),R.useEffect(()=>{l.setOptions(a)},[a,l]),CQA(a,g))throw wV(a,l,s);if(wQA({result:g,errorResetBoundary:s,throwOnError:a.throwOnError,query:B,suspense:a.suspense}))throw g.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,g),a.experimental_prefetchInRender&&!qb.isServer()&&bQA(g,n)&&(c?wV(a,l,s):B?.promise)?.catch(fa).finally(()=>{l.updateResult()}),a.notifyOnChangeProps?g:l.trackResult(g)}function vZ(e,A){return QV(e,lV)}function VG(e,A){const t=CZ(),[n]=R.useState(()=>new BQA(t,e));R.useEffect(()=>{n.setOptions(e)},[n,e]);const s=R.useSyncExternalStore(R.useCallback(a=>n.subscribe(er.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),r=R.useCallback((a,B)=>{n.mutate(a,B).catch(fa)},[n]);if(s.error&&GZ(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:r,mutateAsync:s.mutate}}function vQA(e,A){return QV(e,rQA)}function IQA(e,A){return A.forEach(function(t){t&&typeof t!="string"&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!=="default"&&!(n in e)){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var pQA=Object.defineProperty,HQA=(e,A,t)=>A in e?pQA(e,A,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[A]=t,bV=(e,A,t)=>HQA(e,typeof A!="symbol"?A+"":A,t);let ha=class{constructor(){bV(this,"_locking"),bV(this,"_locks"),this._locking=Promise.resolve(),this._locks=0}isLocked(){return this._locks>0}lock(){this._locks+=1;let A;const t=new Promise(s=>A=()=>{this._locks-=1,s()}),n=this._locking.then(()=>A);return this._locking=this._locking.then(()=>t),n}};function ns(e,A){if(!e)throw new Error(A)}const mQA=34028234663852886e22,EQA=-34028234663852886e22,yQA=4294967295,YQA=2147483647,ZQA=-2147483648;function WH(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>YQA||e<ZQA)throw new Error("invalid int 32: "+e)}function IZ(e){if(typeof e!="number")throw new Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>yQA||e<0)throw new Error("invalid uint 32: "+e)}function CV(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>mQA||e<EQA))throw new Error("invalid float 32: "+e)}const vV=Symbol("@bufbuild/protobuf/enum-type");function kQA(e){const A=e[vV];return ns(A,"missing enum type on enum object"),A}function IV(e,A,t,n){e[vV]=pV(A,t.map(s=>({no:s.no,name:s.name,localName:e[s.no]})))}function pV(e,A,t){const n=Object.create(null),s=Object.create(null),r=[];for(const a of A){const B=HV(a);r.push(B),n[a.name]=B,s[a.no]=B}return{typeName:e,values:r,findName(a){return n[a]},findNumber(a){return s[a]}}}function UQA(e,A,t){const n={};for(const s of A){const r=HV(s);n[r.localName]=r.no,n[r.no]=r.localName}return IV(n,e,A),n}function HV(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}class pZ{equals(A){return this.getType().runtime.util.equals(this.getType(),this,A)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(A,t){const n=this.getType(),s=n.runtime.bin,r=s.makeReadOptions(t);return s.readMessage(this,r.readerFactory(A),A.byteLength,r),this}fromJson(A,t){const n=this.getType(),s=n.runtime.json,r=s.makeReadOptions(t);return s.readMessage(n,A,r,this),this}fromJsonString(A,t){let n;try{n=JSON.parse(A)}catch(s){throw new Error("cannot decode ".concat(this.getType().typeName," from JSON: ").concat(s instanceof Error?s.message:String(s)))}return this.fromJson(n,t)}toBinary(A){const t=this.getType(),n=t.runtime.bin,s=n.makeWriteOptions(A),r=s.writerFactory();return n.writeMessage(this,r,s),r.finish()}toJson(A){const t=this.getType(),n=t.runtime.json,s=n.makeWriteOptions(A);return n.writeMessage(this,s)}toJsonString(A){var t;const n=this.toJson(A);return JSON.stringify(n,null,(t=A?.prettySpaces)!==null&&t!==void 0?t:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function DQA(e,A,t,n){var s;const r=(s=n?.localName)!==null&&s!==void 0?s:A.substring(A.lastIndexOf(".")+1),a={[r]:function(B){e.util.initFields(this),e.util.initPartial(B,this)}}[r];return Object.setPrototypeOf(a.prototype,new pZ),Object.assign(a,{runtime:e,typeName:A,fields:e.util.newFieldList(t),fromBinary(B,c){return new a().fromBinary(B,c)},fromJson(B,c){return new a().fromJson(B,c)},fromJsonString(B,c){return new a().fromJsonString(B,c)},equals(B,c){return e.util.equals(a,B,c)}}),a}function FQA(){let e=0,A=0;for(let n=0;n<28;n+=7){let s=this.buf[this.pos++];if(e|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[e,A]}let t=this.buf[this.pos++];if(e|=(t&15)<<28,A=(t&112)>>4,(t&128)==0)return this.assertBounds(),[e,A];for(let n=3;n<=31;n+=7){let s=this.buf[this.pos++];if(A|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[e,A]}throw new Error("invalid varint")}function HZ(e,A,t){for(let r=0;r<28;r=r+7){const a=e>>>r,B=!(!(a>>>7)&&A==0),c=(B?a|128:a)&255;if(t.push(c),!B)return}const n=e>>>28&15|(A&7)<<4,s=A>>3!=0;if(t.push((s?n|128:n)&255),!!s){for(let r=3;r<31;r=r+7){const a=A>>>r,B=!!(a>>>7),c=(B?a|128:a)&255;if(t.push(c),!B)return}t.push(A>>>31&1)}}const NH=4294967296;function mV(e){const A=e[0]==="-";A&&(e=e.slice(1));const t=1e6;let n=0,s=0;function r(a,B){const c=Number(e.slice(a,B));s*=t,n=n*t+c,n>=NH&&(s=s+(n/NH|0),n=n%NH)}return r(-24,-18),r(-18,-12),r(-12,-6),r(-6),A?yV(n,s):mZ(n,s)}function MQA(e,A){let t=mZ(e,A);const n=t.hi&2147483648;n&&(t=yV(t.lo,t.hi));const s=EV(t.lo,t.hi);return n?"-"+s:s}function EV(e,A){if({lo:e,hi:A}=xQA(e,A),A<=2097151)return String(NH*A+e);const t=e&16777215,n=(e>>>24|A<<8)&16777215,s=A>>16&65535;let r=t+n*6777216+s*6710656,a=n+s*8147497,B=s*2;const c=1e7;return r>=c&&(a+=Math.floor(r/c),r%=c),a>=c&&(B+=Math.floor(a/c),a%=c),B.toString()+YV(a)+YV(r)}function xQA(e,A){return{lo:e>>>0,hi:A>>>0}}function mZ(e,A){return{lo:e|0,hi:A|0}}function yV(e,A){return A=~A,e?e=~e+1:A+=1,mZ(e,A)}const YV=e=>{const A=String(e);return"0000000".slice(A.length)+A};function ZV(e,A){if(e>=0){for(;e>127;)A.push(e&127|128),e=e>>>7;A.push(e)}else{for(let t=0;t<9;t++)A.push(e&127|128),e=e>>7;A.push(1)}}function PQA(){let e=this.buf[this.pos++],A=e&127;if((e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<7,(e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<14,(e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<21,(e&128)==0)return this.assertBounds(),A;e=this.buf[this.pos++],A|=(e&15)<<28;for(let t=5;(e&128)!==0&&t<10;t++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),A>>>0}function TQA(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const s=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),a=BigInt("0"),B=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(c){const l=typeof c=="bigint"?c:BigInt(c);if(l>r||l<s)throw new Error("int64 invalid: ".concat(c));return l},uParse(c){const l=typeof c=="bigint"?c:BigInt(c);if(l>B||l<a)throw new Error("uint64 invalid: ".concat(c));return l},enc(c){return e.setBigInt64(0,this.parse(c),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(c){return e.setBigInt64(0,this.uParse(c),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec(c,l){return e.setInt32(0,c,!0),e.setInt32(4,l,!0),e.getBigInt64(0,!0)},uDec(c,l){return e.setInt32(0,c,!0),e.setInt32(4,l,!0),e.getBigUint64(0,!0)}}}const t=s=>ns(/^-?[0-9]+$/.test(s),"int64 invalid: ".concat(s)),n=s=>ns(/^[0-9]+$/.test(s),"uint64 invalid: ".concat(s));return{zero:"0",supported:!1,parse(s){return typeof s!="string"&&(s=s.toString()),t(s),s},uParse(s){return typeof s!="string"&&(s=s.toString()),n(s),s},enc(s){return typeof s!="string"&&(s=s.toString()),t(s),mV(s)},uEnc(s){return typeof s!="string"&&(s=s.toString()),n(s),mV(s)},dec(s,r){return MQA(s,r)},uDec(s,r){return EV(s,r)}}}const Tn=TQA();var RA;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(RA||(RA={}));var pd;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(pd||(pd={}));function Hd(e,A,t){if(A===t)return!0;if(e==RA.BYTES){if(!(A instanceof Uint8Array)||!(t instanceof Uint8Array)||A.length!==t.length)return!1;for(let n=0;n<A.length;n++)if(A[n]!==t[n])return!1;return!0}switch(e){case RA.UINT64:case RA.FIXED64:case RA.INT64:case RA.SFIXED64:case RA.SINT64:return A==t}return!1}function iw(e,A){switch(e){case RA.BOOL:return!1;case RA.UINT64:case RA.FIXED64:case RA.INT64:case RA.SFIXED64:case RA.SINT64:return A==0?Tn.zero:"0";case RA.DOUBLE:case RA.FLOAT:return 0;case RA.BYTES:return new Uint8Array(0);case RA.STRING:return"";default:return 0}}function kV(e,A){switch(e){case RA.BOOL:return A===!1;case RA.STRING:return A==="";case RA.BYTES:return A instanceof Uint8Array&&!A.byteLength;default:return A==0}}var hs;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(hs||(hs={}));class RQA{constructor(A){this.stack=[],this.textEncoder=A??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let A=0;for(let s=0;s<this.chunks.length;s++)A+=this.chunks[s].length;let t=new Uint8Array(A),n=0;for(let s=0;s<this.chunks.length;s++)t.set(this.chunks[s],n),n+=this.chunks[s].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let A=this.finish(),t=this.stack.pop();if(!t)throw new Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(A.byteLength),this.raw(A)}tag(A,t){return this.uint32((A<<3|t)>>>0)}raw(A){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(A),this}uint32(A){for(IZ(A);A>127;)this.buf.push(A&127|128),A=A>>>7;return this.buf.push(A),this}int32(A){return WH(A),ZV(A,this.buf),this}bool(A){return this.buf.push(A?1:0),this}bytes(A){return this.uint32(A.byteLength),this.raw(A)}string(A){let t=this.textEncoder.encode(A);return this.uint32(t.byteLength),this.raw(t)}float(A){CV(A);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,A,!0),this.raw(t)}double(A){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,A,!0),this.raw(t)}fixed32(A){IZ(A);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,A,!0),this.raw(t)}sfixed32(A){WH(A);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,A,!0),this.raw(t)}sint32(A){return WH(A),A=(A<<1^A>>31)>>>0,ZV(A,this.buf),this}sfixed64(A){let t=new Uint8Array(8),n=new DataView(t.buffer),s=Tn.enc(A);return n.setInt32(0,s.lo,!0),n.setInt32(4,s.hi,!0),this.raw(t)}fixed64(A){let t=new Uint8Array(8),n=new DataView(t.buffer),s=Tn.uEnc(A);return n.setInt32(0,s.lo,!0),n.setInt32(4,s.hi,!0),this.raw(t)}int64(A){let t=Tn.enc(A);return HZ(t.lo,t.hi,this.buf),this}sint64(A){let t=Tn.enc(A),n=t.hi>>31,s=t.lo<<1^n,r=(t.hi<<1|t.lo>>>31)^n;return HZ(s,r,this.buf),this}uint64(A){let t=Tn.uEnc(A);return HZ(t.lo,t.hi,this.buf),this}}class SQA{constructor(A,t){this.varint64=FQA,this.uint32=PQA,this.buf=A,this.len=A.length,this.pos=0,this.view=new DataView(A.buffer,A.byteOffset,A.byteLength),this.textDecoder=t??new TextDecoder}tag(){let A=this.uint32(),t=A>>>3,n=A&7;if(t<=0||n<0||n>5)throw new Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(A,t){let n=this.pos;switch(A){case hs.Varint:for(;this.buf[this.pos++]&128;);break;case hs.Bit64:this.pos+=4;case hs.Bit32:this.pos+=4;break;case hs.LengthDelimited:let s=this.uint32();this.pos+=s;break;case hs.StartGroup:for(;;){const[r,a]=this.tag();if(a===hs.EndGroup){if(t!==void 0&&r!==t)throw new Error("invalid end group tag");break}this.skip(a,r)}break;default:throw new Error("cant skip wire type "+A)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let A=this.uint32();return A>>>1^-(A&1)}int64(){return Tn.dec(...this.varint64())}uint64(){return Tn.uDec(...this.varint64())}sint64(){let[A,t]=this.varint64(),n=-(A&1);return A=(A>>>1|(t&1)<<31)^n,t=t>>>1^n,Tn.dec(A,t)}bool(){let[A,t]=this.varint64();return A!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Tn.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Tn.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let A=this.uint32(),t=this.pos;return this.pos+=A,this.assertBounds(),this.buf.subarray(t,t+A)}string(){return this.textDecoder.decode(this.bytes())}}function VQA(e,A,t,n){let s;return{typeName:A,extendee:t,get field(){if(!s){const r=typeof n=="function"?n():n;r.name=A.split(".").pop(),r.jsonName="[".concat(A,"]"),s=e.util.newFieldList([r]).list()[0]}return s},runtime:e}}function UV(e){const A=e.field.localName,t=Object.create(null);return t[A]=WQA(e),[t,()=>t[A]]}function WQA(e){const A=e.field;if(A.repeated)return[];if(A.default!==void 0)return A.default;switch(A.kind){case"enum":return A.T.values[0].no;case"scalar":return iw(A.T,A.L);case"message":const t=A.T,n=new t;return t.fieldWrapper?t.fieldWrapper.unwrapField(n):n;case"map":throw"map fields are not allowed to be extensions"}}function NQA(e,A){if(!A.repeated&&(A.kind=="enum"||A.kind=="scalar")){for(let t=e.length-1;t>=0;--t)if(e[t].no==A.no)return[e[t]];return[]}return e.filter(t=>t.no===A.no)}let Xl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),zH=[];for(let e=0;e<Xl.length;e++)zH[Xl[e].charCodeAt(0)]=e;zH[45]=Xl.indexOf("+"),zH[95]=Xl.indexOf("/");const DV={dec(e){let A=e.length*3/4;e[e.length-2]=="="?A-=2:e[e.length-1]=="="&&(A-=1);let t=new Uint8Array(A),n=0,s=0,r,a=0;for(let B=0;B<e.length;B++){if(r=zH[e.charCodeAt(B)],r===void 0)switch(e[B]){case"=":s=0;case`
97
+ `+r):n.stack=r}catch{}}throw n}}_request(A,t){typeof A=="string"?(t=t||{},t.url=A):t=A||{},t=xG(this.defaults,t);const{transitional:n,paramsSerializer:s,headers:r}=t;n!==void 0&&PH.assertOptions(n,{silentJSONParsing:wB.transitional(wB.boolean),forcedJSONParsing:wB.transitional(wB.boolean),clarifyTimeoutError:wB.transitional(wB.boolean),legacyInterceptorReqResOrdering:wB.transitional(wB.boolean)},!1),s!=null&&(HA.isFunction(s)?t.paramsSerializer={serialize:s}:PH.assertOptions(s,{encode:wB.function,serialize:wB.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),PH.assertOptions(t,{baseUrl:wB.spelling("baseURL"),withXsrfToken:wB.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=r&&HA.merge(r.common,r[t.method]);r&&HA.forEach(["delete","get","head","post","put","patch","common"],v=>{delete r[v]}),t.headers=ja.concat(a,r);const B=[];let c=!0;this.interceptors.request.forEach(function(E){if(typeof E.runWhen=="function"&&E.runWhen(t)===!1)return;c=c&&E.synchronous;const m=t.transitional||eZ;m&&m.legacyInterceptorReqResOrdering?B.unshift(E.fulfilled,E.rejected):B.push(E.fulfilled,E.rejected)});const l=[];this.interceptors.response.forEach(function(E){l.push(E.fulfilled,E.rejected)});let g,u=0,f;if(!c){const v=[L1.bind(this),void 0];for(v.unshift(...B),v.push(...l),f=v.length,g=Promise.resolve(t);u<f;)g=g.then(v[u++],v[u++]);return g}f=B.length;let w=t;for(;u<f;){const v=B[u++],E=B[u++];try{w=v(w)}catch(m){E.call(this,m);break}}try{g=L1.call(this,w)}catch(v){return Promise.reject(v)}for(u=0,f=l.length;u<f;)g=g.then(l[u++],l[u++]);return g}getUri(A){A=xG(this.defaults,A);const t=F1(A.baseURL,A.url,A.allowAbsoluteUrls);return m1(t,A.params,A.paramsSerializer)}};HA.forEach(["delete","get","head","options"],function(A){PG.prototype[A]=function(t,n){return this.request(xG(n||{},{method:A,url:t,data:(n||{}).data}))}}),HA.forEach(["post","put","patch"],function(A){function t(n){return function(r,a,B){return this.request(xG(B||{},{method:A,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:a}))}}PG.prototype[A]=t(),PG.prototype[A+"Form"]=t(!0)});let bwA=class IK{constructor(A){if(typeof A!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(r){t=r});const n=this;this.promise.then(s=>{if(!n._listeners)return;let r=n._listeners.length;for(;r-- >0;)n._listeners[r](s);n._listeners=null}),this.promise.then=s=>{let r;const a=new Promise(B=>{n.subscribe(B),r=B}).then(s);return a.cancel=function(){n.unsubscribe(r)},a},A(function(r,a,B){n.reason||(n.reason=new jb(r,a,B),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(A){if(this.reason){A(this.reason);return}this._listeners?this._listeners.push(A):this._listeners=[A]}unsubscribe(A){if(!this._listeners)return;const t=this._listeners.indexOf(A);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const A=new AbortController,t=n=>{A.abort(n)};return this.subscribe(t),A.signal.unsubscribe=()=>this.unsubscribe(t),A.signal}static source(){let A;return{token:new IK(function(s){A=s}),cancel:A}}};function CwA(e){return function(t){return e.apply(null,t)}}function vwA(e){return HA.isObject(e)&&e.isAxiosError===!0}const BZ={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(BZ).forEach(([e,A])=>{BZ[A]=e});function J1(e){const A=new PG(e),t=g1(PG.prototype.request,A);return HA.extend(t,PG.prototype,A,{allOwnKeys:!0}),HA.extend(t,A,null,{allOwnKeys:!0}),t.create=function(s){return J1(xG(e,s))},t}const fs=J1(Jb);fs.Axios=PG,fs.CanceledError=jb,fs.CancelToken=bwA,fs.isCancel=Z1,fs.VERSION=X1,fs.toFormData=UH,fs.AxiosError=me,fs.Cancel=fs.CanceledError,fs.all=function(A){return Promise.all(A)},fs.spread=CwA,fs.isAxiosError=vwA,fs.mergeConfig=xG,fs.AxiosHeaders=ja,fs.formToJSON=e=>y1(HA.isHTMLForm(e)?new FormData(e):e),fs.getAdapter=z1.getAdapter,fs.HttpStatusCode=BZ,fs.default=fs;const{Axios:oPA,AxiosError:cPA,CanceledError:lPA,isCancel:gPA,CancelToken:dPA,VERSION:uPA,all:GPA,Cancel:fPA,isAxiosError:K1,spread:hPA,toFormData:wPA,AxiosHeaders:QPA,HttpStatusCode:bPA,formToJSON:CPA,getAdapter:vPA,mergeConfig:IPA}=fs,IwA="https://46735cdcba6c9e360dc10987b2be144d@o4507919735324672.ingest.us.sentry.io/4511274341367808",pwA=["localhost",/^\//],HwA=["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications."],mwA=new Set([400,403]);function TG(e){return!e||typeof e!="object"?e:Array.isArray(e)?e.map(TG):Object.fromEntries(Object.entries(e).map(([A,t])=>/(authorization|cookie|token|api[-_]?key|x-org-id|x-api-key)/i.test(A)?[A,"[redacted]"]:[A,TG(t)]))}function EwA(){jfA({dsn:IwA,environment:"production",release:"2.2.6",sendDefaultPii:!1,initialScope:{tags:{"app.name":"@careshiphealth/widget","app.surface":"widget"}},integrations:[LfA({traceFetch:!1,traceXHR:!1}),IfA({maskAllText:!0,blockAllMedia:!0,networkDetailAllowUrls:[hI]})],tracesSampleRate:.2,tracePropagationTargets:pwA,replaysSessionSampleRate:.05,replaysOnErrorSampleRate:1,ignoreErrors:HwA,beforeSend(e,A){const t=A?.originalException,n=t?.response?.status??t?.status;return n&&n<500&&!mwA.has(n)?null:(e.request&&(e.request=TG(e.request)),e.extra&&(e.extra=TG(e.extra)),e)}})}function ywA(e){e.orgId&&kG("org.id",e.orgId),e.containerId&&kG("widget.container_id",e.containerId),e.host&&kG("widget.host",e.host),R9("widget_init",TG(e))}function YwA(e){kG("org.id",e.id),e.name&&kG("org.name",e.name),e.color&&kG("org.color",e.color)}function ZwA(e){kG("widget.route",e),zl({category:"navigation",type:"navigation",level:"info",message:e})}function j1(e,A){ub(t=>{A&&t.setExtras(TG(A)),T9(e)})}function _1(e,A,t="error"){ub(n=>{n.setLevel(t),A&&n.setExtras(TG(A)),FBA(e)})}const _a=fs.create({baseURL:`${hI}/ela-external`,headers:{"Content-Type":"application/json"}});_a.interceptors.request.use(e=>{const A=Bd("psid");A&&(e.headers.Authorization=`Bearer ${A}`);const t=Bd("wak");t&&(e.headers["x-api-key"]=t);const n=Bd("woid");return n&&(e.headers["x-org-id"]=n),e.headers["x-user-context"]="lead",e}),_a.interceptors.response.use(e=>e,e=>{const A=e.response?.status;return A==401&&o9("psid"),(!e.response||A===400||A===403||A>=500)&&j1(e,{area:"api",baseURL:e.config?.baseURL,url:e.config?.url,method:e.config?.method,status:A}),Promise.reject(e)});const kwA=async()=>_a.get("/info"),UwA=async e=>_a.post("/meet-and-greet/schedule",e),DwA=async e=>_a.post("/appointment/book",e),FwA=async e=>_a.post("/subscribe",{...e,mode:"widget"}),MwA=async()=>_a.get("/xi-signed-url"),xwA=async e=>_a.post("/request-call-back",e),PwA=async e=>_a.post("/verify-call-back-otp",e),TwA=async e=>_a.post("/resend-call-back-otp",e);var aw=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},RwA=class extends aw{#A;#e;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const A=()=>e();return window.addEventListener("visibilitychange",A,!1),()=>{window.removeEventListener("visibilitychange",A)}}}}onSubscribe(){this.#e||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#t=e,this.#e?.(),this.#e=e(A=>{typeof A=="boolean"?this.setFocused(A):this.onFocus()})}setFocused(e){this.#A!==e&&(this.#A=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(A=>{A(e)})}isFocused(){return typeof this.#A=="boolean"?this.#A:globalThis.document?.visibilityState!=="hidden"}},oZ=new RwA,SwA={setTimeout:(e,A)=>setTimeout(e,A),clearTimeout:e=>clearTimeout(e),setInterval:(e,A)=>setInterval(e,A),clearInterval:e=>clearInterval(e)},VwA=class{#A=SwA;#e=!1;setTimeoutProvider(e){this.#A=e}setTimeout(e,A){return this.#A.setTimeout(e,A)}clearTimeout(e){this.#A.clearTimeout(e)}setInterval(e,A){return this.#A.setInterval(e,A)}clearInterval(e){this.#A.clearInterval(e)}},RG=new VwA;function WwA(e){setTimeout(e,0)}var NwA=typeof window>"u"||"Deno"in globalThis;function fa(){}function zwA(e,A){return typeof e=="function"?e(A):e}function cZ(e){return typeof e=="number"&&e>=0&&e!==1/0}function q1(e,A){return Math.max(e+(A||0)-Date.now(),0)}function Id(e,A){return typeof e=="function"?e(A):e}function QB(e,A){return typeof e=="function"?e(A):e}function $1(e,A){const{type:t="all",exact:n,fetchStatus:s,predicate:r,queryKey:a,stale:B}=e;if(a){if(n){if(A.queryHash!==lZ(a,A.options))return!1}else if(!_b(A.queryKey,a))return!1}if(t!=="all"){const c=A.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof B=="boolean"&&A.isStale()!==B||s&&s!==A.state.fetchStatus||r&&!r(A))}function AV(e,A){const{exact:t,status:n,predicate:s,mutationKey:r}=e;if(r){if(!A.options.mutationKey)return!1;if(t){if(SG(A.options.mutationKey)!==SG(r))return!1}else if(!_b(A.options.mutationKey,r))return!1}return!(n&&A.state.status!==n||s&&!s(A))}function lZ(e,A){return(A?.queryKeyHashFn||SG)(e)}function SG(e){return JSON.stringify(e,(A,t)=>gZ(t)?Object.keys(t).sort().reduce((n,s)=>(n[s]=t[s],n),{}):t)}function _b(e,A){return e===A?!0:typeof e!=typeof A?!1:e&&A&&typeof e=="object"&&typeof A=="object"?Object.keys(A).every(t=>_b(e[t],A[t])):!1}var LwA=Object.prototype.hasOwnProperty;function eV(e,A,t=0){if(e===A)return e;if(t>500)return A;const n=tV(e)&&tV(A);if(!n&&!(gZ(e)&&gZ(A)))return A;const r=(n?e:Object.keys(e)).length,a=n?A:Object.keys(A),B=a.length,c=n?new Array(B):{};let l=0;for(let g=0;g<B;g++){const u=n?g:a[g],f=e[u],w=A[u];if(f===w){c[u]=f,(n?g<r:LwA.call(e,u))&&l++;continue}if(f===null||w===null||typeof f!="object"||typeof w!="object"){c[u]=w;continue}const v=eV(f,w,t+1);c[u]=v,v===f&&l++}return r===B&&l===r?e:c}function TH(e,A){if(!A||Object.keys(e).length!==Object.keys(A).length)return!1;for(const t in e)if(e[t]!==A[t])return!1;return!0}function tV(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function gZ(e){if(!nV(e))return!1;const A=e.constructor;if(A===void 0)return!0;const t=A.prototype;return!(!nV(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function nV(e){return Object.prototype.toString.call(e)==="[object Object]"}function XwA(e){return new Promise(A=>{RG.setTimeout(A,e)})}function dZ(e,A,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,A):t.structuralSharing!==!1?eV(e,A):A}function OwA(e,A,t=0){const n=[...e,A];return t&&n.length>t?n.slice(1):n}function JwA(e,A,t=0){const n=[A,...e];return t&&n.length>t?n.slice(0,-1):n}var uZ=Symbol();function sV(e,A){return!e.queryFn&&A?.initialPromise?()=>A.initialPromise:!e.queryFn||e.queryFn===uZ?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function GZ(e,A){return typeof e=="function"?e(...A):!!e}function KwA(e,A,t){let n=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=A(),n||(n=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),e}var qb=(()=>{let e=()=>NwA;return{isServer(){return e()},setIsServer(A){e=A}}})();function fZ(){let e,A;const t=new Promise((s,r)=>{e=s,A=r});t.status="pending",t.catch(()=>{});function n(s){Object.assign(t,s),delete t.resolve,delete t.reject}return t.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},t.reject=s=>{n({status:"rejected",reason:s}),A(s)},t}var jwA=WwA;function _wA(){let e=[],A=0,t=B=>{B()},n=B=>{B()},s=jwA;const r=B=>{A?e.push(B):s(()=>{t(B)})},a=()=>{const B=e;e=[],B.length&&s(()=>{n(()=>{B.forEach(c=>{t(c)})})})};return{batch:B=>{let c;A++;try{c=B()}finally{A--,A||a()}return c},batchCalls:B=>(...c)=>{r(()=>{B(...c)})},schedule:r,setNotifyFunction:B=>{t=B},setBatchNotifyFunction:B=>{n=B},setScheduler:B=>{s=B}}}var er=_wA(),qwA=class extends aw{#A=!0;#e;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const A=()=>e(!0),t=()=>e(!1);return window.addEventListener("online",A,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",A),window.removeEventListener("offline",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#t=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#A!==e&&(this.#A=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#A}},RH=new qwA;function $wA(e){return Math.min(1e3*2**e,3e4)}function rV(e){return(e??"online")==="online"?RH.isOnline():!0}var hZ=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function aV(e){let A=!1,t=0,n;const s=fZ(),r=()=>s.status!=="pending",a=E=>{if(!r()){const m=new hZ(E);f(m),e.onCancel?.(m)}},B=()=>{A=!0},c=()=>{A=!1},l=()=>oZ.isFocused()&&(e.networkMode==="always"||RH.isOnline())&&e.canRun(),g=()=>rV(e.networkMode)&&e.canRun(),u=E=>{r()||(n?.(),s.resolve(E))},f=E=>{r()||(n?.(),s.reject(E))},w=()=>new Promise(E=>{n=m=>{(r()||l())&&E(m)},e.onPause?.()}).then(()=>{n=void 0,r()||e.onContinue?.()}),v=()=>{if(r())return;let E;const m=t===0?e.initialPromise:void 0;try{E=m??e.fn()}catch(Z){E=Promise.reject(Z)}Promise.resolve(E).then(u).catch(Z=>{if(r())return;const D=e.retry??(qb.isServer()?0:3),T=e.retryDelay??$wA,S=typeof T=="function"?T(t,Z):T,F=D===!0||typeof D=="number"&&t<D||typeof D=="function"&&D(t,Z);if(A||!F){f(Z);return}t++,e.onFail?.(t,Z),XwA(S).then(()=>l()?void 0:w()).then(()=>{A?f(Z):v()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(n?.(),s),cancelRetry:B,continueRetry:c,canStart:g,start:()=>(g()?v():w().then(v),s)}}var iV=class{#A;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cZ(this.gcTime)&&(this.#A=RG.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qb.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#A&&(RG.clearTimeout(this.#A),this.#A=void 0)}},AQA=class extends iV{#A;#e;#t;#s;#n;#r;#a;constructor(e){super(),this.#a=!1,this.#r=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#t=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#A=cV(this.options),this.state=e.state??this.#A,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){if(this.options={...this.#r,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const A=cV(this.options);A.data!==void 0&&(this.setState(oV(A.data,A.dataUpdatedAt)),this.#A=A)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,A){const t=dZ(this.state.data,e,this.options);return this.#B({data:t,type:"success",dataUpdatedAt:A?.updatedAt,manual:A?.manual}),t}setState(e,A){this.#B({type:"setState",state:e,setStateOptions:A})}cancel(e){const A=this.#n?.promise;return this.#n?.cancel(e),A?A.then(fa).catch(fa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#A}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>QB(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===uZ||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Id(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!q1(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(A=>A.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(A=>A.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(A=>A!==e),this.observers.length||(this.#n&&(this.#a||this.#i()?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#i(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#B({type:"invalidate"})}async fetch(e,A){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&A?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const B=this.observers.find(c=>c.options.queryFn);B&&this.setOptions(B.options)}const t=new AbortController,n=B=>{Object.defineProperty(B,"signal",{enumerable:!0,get:()=>(this.#a=!0,t.signal)})},s=()=>{const B=sV(this.options,A),l=(()=>{const g={client:this.#s,queryKey:this.queryKey,meta:this.meta};return n(g),g})();return this.#a=!1,this.options.persister?this.options.persister(B,l,this):B(l)},a=(()=>{const B={fetchOptions:A,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:s};return n(B),B})();this.options.behavior?.onFetch(a,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#B({type:"fetch",meta:a.fetchOptions?.meta}),this.#n=aV({initialPromise:A?.initialPromise,fn:a.fetchFn,onCancel:B=>{B instanceof hZ&&B.revert&&this.setState({...this.#e,fetchStatus:"idle"}),t.abort()},onFail:(B,c)=>{this.#B({type:"failed",failureCount:B,error:c})},onPause:()=>{this.#B({type:"pause"})},onContinue:()=>{this.#B({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const B=await this.#n.start();if(B===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(B),this.#t.config.onSuccess?.(B,this),this.#t.config.onSettled?.(B,this.state.error,this),B}catch(B){if(B instanceof hZ){if(B.silent)return this.#n.promise;if(B.revert){if(this.state.data===void 0)throw B;return this.state.data}}throw this.#B({type:"error",error:B}),this.#t.config.onError?.(B,this),this.#t.config.onSettled?.(this.state.data,B,this),B}finally{this.scheduleGc()}}#B(e){const A=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...BV(t.data,this.options),fetchMeta:e.meta??null};case"success":const n={...t,...oV(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=e.manual?n:void 0,n;case"error":const s=e.error;return{...t,error:s,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=A(this.state),er.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function BV(e,A){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rV(A.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function oV(e,A){return{data:e,dataUpdatedAt:A??Date.now(),error:null,isInvalidated:!1,status:"success"}}function cV(e){const A=typeof e.initialData=="function"?e.initialData():e.initialData,t=A!==void 0,n=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:A,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var lV=class extends aw{constructor(e,A){super(),this.options=A,this.#A=e,this.#i=null,this.#a=fZ(),this.bindMethods(),this.setOptions(A)}#A;#e=void 0;#t=void 0;#s=void 0;#n;#r;#a;#i;#B;#d;#u;#c;#l;#o;#G=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),gV(this.#e,this.options)?this.#g():this.updateResult(),this.#Q())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return wZ(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return wZ(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#C(),this.#e.removeObserver(this)}setOptions(e){const A=this.options,t=this.#e;if(this.options=this.#A.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof QB(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#v(),this.#e.setOptions(this.options),A._defaulted&&!TH(this.options,A)&&this.#A.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const n=this.hasListeners();n&&dV(this.#e,t,this.options,A)&&this.#g(),this.updateResult(),n&&(this.#e!==t||QB(this.options.enabled,this.#e)!==QB(A.enabled,this.#e)||Id(this.options.staleTime,this.#e)!==Id(A.staleTime,this.#e))&&this.#f();const s=this.#h();n&&(this.#e!==t||QB(this.options.enabled,this.#e)!==QB(A.enabled,this.#e)||s!==this.#o)&&this.#w(s)}getOptimisticResult(e){const A=this.#A.getQueryCache().build(this.#A,e),t=this.createResult(A,e);return tQA(this,t)&&(this.#s=t,this.#r=this.options,this.#n=this.#e.state),t}getCurrentResult(){return this.#s}trackResult(e,A){return new Proxy(e,{get:(t,n)=>(this.trackProp(n),A?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(t,n))})}trackProp(e){this.#G.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const A=this.#A.defaultQueryOptions(e),t=this.#A.getQueryCache().build(this.#A,A);return t.fetch().then(()=>this.createResult(t,A))}fetch(e){return this.#g({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#g(e){this.#v();let A=this.#e.fetch(this.options,e);return e?.throwOnError||(A=A.catch(fa)),A}#f(){this.#b();const e=Id(this.options.staleTime,this.#e);if(qb.isServer()||this.#s.isStale||!cZ(e))return;const t=q1(this.#s.dataUpdatedAt,e)+1;this.#c=RG.setTimeout(()=>{this.#s.isStale||this.updateResult()},t)}#h(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#w(e){this.#C(),this.#o=e,!(qb.isServer()||QB(this.options.enabled,this.#e)===!1||!cZ(this.#o)||this.#o===0)&&(this.#l=RG.setInterval(()=>{(this.options.refetchIntervalInBackground||oZ.isFocused())&&this.#g()},this.#o))}#Q(){this.#f(),this.#w(this.#h())}#b(){this.#c&&(RG.clearTimeout(this.#c),this.#c=void 0)}#C(){this.#l&&(RG.clearInterval(this.#l),this.#l=void 0)}createResult(e,A){const t=this.#e,n=this.options,s=this.#s,r=this.#n,a=this.#r,c=e!==t?e.state:this.#t,{state:l}=e;let g={...l},u=!1,f;if(A._optimisticResults){const X=this.hasListeners(),eA=!X&&gV(e,A),$=X&&dV(e,t,A,n);(eA||$)&&(g={...g,...BV(l.data,e.options)}),A._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:w,errorUpdatedAt:v,status:E}=g;f=g.data;let m=!1;if(A.placeholderData!==void 0&&f===void 0&&E==="pending"){let X;s?.isPlaceholderData&&A.placeholderData===a?.placeholderData?(X=s.data,m=!0):X=typeof A.placeholderData=="function"?A.placeholderData(this.#u?.state.data,this.#u):A.placeholderData,X!==void 0&&(E="success",f=dZ(s?.data,X,A),u=!0)}if(A.select&&f!==void 0&&!m)if(s&&f===r?.data&&A.select===this.#B)f=this.#d;else try{this.#B=A.select,f=A.select(f),f=dZ(s?.data,f,A),this.#d=f,this.#i=null}catch(X){this.#i=X}this.#i&&(w=this.#i,f=this.#d,v=Date.now(),E="error");const Z=g.fetchStatus==="fetching",D=E==="pending",T=E==="error",S=D&&Z,F=f!==void 0,N={status:E,fetchStatus:g.fetchStatus,isPending:D,isSuccess:E==="success",isError:T,isInitialLoading:S,isLoading:S,data:f,dataUpdatedAt:g.dataUpdatedAt,error:w,errorUpdatedAt:v,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>c.dataUpdateCount||g.errorUpdateCount>c.errorUpdateCount,isFetching:Z,isRefetching:Z&&!D,isLoadingError:T&&!F,isPaused:g.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:T&&F,isStale:QZ(e,A),refetch:this.refetch,promise:this.#a,isEnabled:QB(A.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const X=N.data!==void 0,eA=N.status==="error"&&!X,$=hA=>{eA?hA.reject(N.error):X&&hA.resolve(N.data)},rA=()=>{const hA=this.#a=N.promise=fZ();$(hA)},iA=this.#a;switch(iA.status){case"pending":e.queryHash===t.queryHash&&$(iA);break;case"fulfilled":(eA||N.data!==iA.value)&&rA();break;case"rejected":(!eA||N.error!==iA.reason)&&rA();break}}return N}updateResult(){const e=this.#s,A=this.createResult(this.#e,this.options);if(this.#n=this.#e.state,this.#r=this.options,this.#n.data!==void 0&&(this.#u=this.#e),TH(A,e))return;this.#s=A;const t=()=>{if(!e)return!0;const{notifyOnChangeProps:n}=this.options,s=typeof n=="function"?n():n;if(s==="all"||!s&&!this.#G.size)return!0;const r=new Set(s??this.#G);return this.options.throwOnError&&r.add("error"),Object.keys(this.#s).some(a=>{const B=a;return this.#s[B]!==e[B]&&r.has(B)})};this.#I({listeners:t()})}#v(){const e=this.#A.getQueryCache().build(this.#A,this.options);if(e===this.#e)return;const A=this.#e;this.#e=e,this.#t=e.state,this.hasListeners()&&(A?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#Q()}#I(e){er.batch(()=>{e.listeners&&this.listeners.forEach(A=>{A(this.#s)}),this.#A.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function eQA(e,A){return QB(A.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&A.retryOnMount===!1)}function gV(e,A){return eQA(e,A)||e.state.data!==void 0&&wZ(e,A,A.refetchOnMount)}function wZ(e,A,t){if(QB(A.enabled,e)!==!1&&Id(A.staleTime,e)!=="static"){const n=typeof t=="function"?t(e):t;return n==="always"||n!==!1&&QZ(e,A)}return!1}function dV(e,A,t,n){return(e!==A||QB(n.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&QZ(e,t)}function QZ(e,A){return QB(A.enabled,e)!==!1&&e.isStaleByTime(Id(A.staleTime,e))}function tQA(e,A){return!TH(e.getCurrentResult(),A)}function SH(e){return{onFetch:(A,t)=>{const n=A.options,s=A.fetchOptions?.meta?.fetchMore?.direction,r=A.state.data?.pages||[],a=A.state.data?.pageParams||[];let B={pages:[],pageParams:[]},c=0;const l=async()=>{let g=!1;const u=v=>{KwA(v,()=>A.signal,()=>g=!0)},f=sV(A.options,A.fetchOptions),w=async(v,E,m)=>{if(g)return Promise.reject();if(E==null&&v.pages.length)return Promise.resolve(v);const D=(()=>{const V={client:A.client,queryKey:A.queryKey,pageParam:E,direction:m?"backward":"forward",meta:A.options.meta};return u(V),V})(),T=await f(D),{maxPages:S}=A.options,F=m?JwA:OwA;return{pages:F(v.pages,T,S),pageParams:F(v.pageParams,E,S)}};if(s&&r.length){const v=s==="backward",E=v?uV:bZ,m={pages:r,pageParams:a},Z=E(n,m);B=await w(m,Z,v)}else{const v=e??r.length;do{const E=c===0?a[0]??n.initialPageParam:bZ(n,B);if(c>0&&E==null)break;B=await w(B,E),c++}while(c<v)}return B};A.options.persister?A.fetchFn=()=>A.options.persister?.(l,{client:A.client,queryKey:A.queryKey,meta:A.options.meta,signal:A.signal},t):A.fetchFn=l}}}function bZ(e,{pages:A,pageParams:t}){const n=A.length-1;return A.length>0?e.getNextPageParam(A[n],A,t[n],t):void 0}function uV(e,{pages:A,pageParams:t}){return A.length>0?e.getPreviousPageParam?.(A[0],A,t[0],t):void 0}function nQA(e,A){return A?bZ(e,A)!=null:!1}function sQA(e,A){return!A||!e.getPreviousPageParam?!1:uV(e,A)!=null}var rQA=class extends lV{constructor(e,A){super(e,A)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:SH()})}getOptimisticResult(e){return e.behavior=SH(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,A){const{state:t}=e,n=super.createResult(e,A),{isFetching:s,isRefetching:r,isError:a,isRefetchError:B}=n,c=t.fetchMeta?.fetchMore?.direction,l=a&&c==="forward",g=s&&c==="forward",u=a&&c==="backward",f=s&&c==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:nQA(A,t.data),hasPreviousPage:sQA(A,t.data),isFetchNextPageError:l,isFetchingNextPage:g,isFetchPreviousPageError:u,isFetchingPreviousPage:f,isRefetchError:B&&!l&&!u,isRefetching:r&&!g&&!f}}},aQA=class extends iV{#A;#e;#t;#s;constructor(e){super(),this.#A=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||GV(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(A=>A!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const A=()=>{this.#n({type:"continue"})},t={client:this.#A,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=aV({fn:()=>this.options.mutationFn?this.options.mutationFn(e,t):Promise.reject(new Error("No mutationFn found")),onFail:(r,a)=>{this.#n({type:"failed",failureCount:r,error:a})},onPause:()=>{this.#n({type:"pause"})},onContinue:A,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const n=this.state.status==="pending",s=!this.#s.canStart();try{if(n)A();else{this.#n({type:"pending",variables:e,isPaused:s}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,t);const a=await this.options.onMutate?.(e,t);a!==this.state.context&&this.#n({type:"pending",context:a,variables:e,isPaused:s})}const r=await this.#s.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this,t),await this.options.onSuccess?.(r,e,this.state.context,t),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this,t),await this.options.onSettled?.(r,null,e,this.state.context,t),this.#n({type:"success",data:r}),r}catch(r){try{await this.#t.config.onError?.(r,e,this.state.context,this,t)}catch(a){Promise.reject(a)}try{await this.options.onError?.(r,e,this.state.context,t)}catch(a){Promise.reject(a)}try{await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,t)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,r,e,this.state.context,t)}catch(a){Promise.reject(a)}throw this.#n({type:"error",error:r}),r}finally{this.#t.runNext(this)}}#n(e){const A=t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=A(this.state),er.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function GV(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var iQA=class extends aw{constructor(e={}){super(),this.config=e,this.#A=new Set,this.#e=new Map,this.#t=0}#A;#e;#t;build(e,A,t){const n=new aQA({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(A),state:t});return this.add(n),n}add(e){this.#A.add(e);const A=VH(e);if(typeof A=="string"){const t=this.#e.get(A);t?t.push(e):this.#e.set(A,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#A.delete(e)){const A=VH(e);if(typeof A=="string"){const t=this.#e.get(A);if(t)if(t.length>1){const n=t.indexOf(e);n!==-1&&t.splice(n,1)}else t[0]===e&&this.#e.delete(A)}}this.notify({type:"removed",mutation:e})}canRun(e){const A=VH(e);if(typeof A=="string"){const n=this.#e.get(A)?.find(s=>s.state.status==="pending");return!n||n===e}else return!0}runNext(e){const A=VH(e);return typeof A=="string"?this.#e.get(A)?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){er.batch(()=>{this.#A.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#A.clear(),this.#e.clear()})}getAll(){return Array.from(this.#A)}find(e){const A={exact:!0,...e};return this.getAll().find(t=>AV(A,t))}findAll(e={}){return this.getAll().filter(A=>AV(e,A))}notify(e){er.batch(()=>{this.listeners.forEach(A=>{A(e)})})}resumePausedMutations(){const e=this.getAll().filter(A=>A.state.isPaused);return er.batch(()=>Promise.all(e.map(A=>A.continue().catch(fa))))}};function VH(e){return e.options.scope?.id}var BQA=class extends aw{#A;#e=void 0;#t;#s;constructor(A,t){super(),this.#A=A,this.setOptions(t),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(A){const t=this.options;this.options=this.#A.defaultMutationOptions(A),TH(this.options,t)||this.#A.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),t?.mutationKey&&this.options.mutationKey&&SG(t.mutationKey)!==SG(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(A){this.#n(),this.#r(A)}getCurrentResult(){return this.#e}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#n(),this.#r()}mutate(A,t){return this.#s=t,this.#t?.removeObserver(this),this.#t=this.#A.getMutationCache().build(this.#A,this.options),this.#t.addObserver(this),this.#t.execute(A)}#n(){const A=this.#t?.state??GV();this.#e={...A,isPending:A.status==="pending",isSuccess:A.status==="success",isError:A.status==="error",isIdle:A.status==="idle",mutate:this.mutate,reset:this.reset}}#r(A){er.batch(()=>{if(this.#s&&this.hasListeners()){const t=this.#e.variables,n=this.#e.context,s={client:this.#A,meta:this.options.meta,mutationKey:this.options.mutationKey};if(A?.type==="success"){try{this.#s.onSuccess?.(A.data,t,n,s)}catch(r){Promise.reject(r)}try{this.#s.onSettled?.(A.data,null,t,n,s)}catch(r){Promise.reject(r)}}else if(A?.type==="error"){try{this.#s.onError?.(A.error,t,n,s)}catch(r){Promise.reject(r)}try{this.#s.onSettled?.(void 0,A.error,t,n,s)}catch(r){Promise.reject(r)}}}this.listeners.forEach(t=>{t(this.#e)})})}},oQA=class extends aw{constructor(e={}){super(),this.config=e,this.#A=new Map}#A;build(e,A,t){const n=A.queryKey,s=A.queryHash??lZ(n,A);let r=this.get(s);return r||(r=new AQA({client:e,queryKey:n,queryHash:s,options:e.defaultQueryOptions(A),state:t,defaultOptions:e.getQueryDefaults(n)}),this.add(r)),r}add(e){this.#A.has(e.queryHash)||(this.#A.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const A=this.#A.get(e.queryHash);A&&(e.destroy(),A===e&&this.#A.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){er.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#A.get(e)}getAll(){return[...this.#A.values()]}find(e){const A={exact:!0,...e};return this.getAll().find(t=>$1(A,t))}findAll(e={}){const A=this.getAll();return Object.keys(e).length>0?A.filter(t=>$1(e,t)):A}notify(e){er.batch(()=>{this.listeners.forEach(A=>{A(e)})})}onFocus(){er.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){er.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},cQA=class{#A;#e;#t;#s;#n;#r;#a;#i;constructor(e={}){this.#A=e.queryCache||new oQA,this.#e=e.mutationCache||new iQA,this.#t=e.defaultOptions||{},this.#s=new Map,this.#n=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#a=oZ.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#A.onFocus())}),this.#i=RH.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#A.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#A.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const A=this.defaultQueryOptions({queryKey:e});return this.#A.get(A.queryHash)?.state.data}ensureQueryData(e){const A=this.defaultQueryOptions(e),t=this.#A.build(this,A),n=t.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(Id(A.staleTime,t))&&this.prefetchQuery(A),Promise.resolve(n))}getQueriesData(e){return this.#A.findAll(e).map(({queryKey:A,state:t})=>{const n=t.data;return[A,n]})}setQueryData(e,A,t){const n=this.defaultQueryOptions({queryKey:e}),r=this.#A.get(n.queryHash)?.state.data,a=zwA(A,r);if(a!==void 0)return this.#A.build(this,n).setData(a,{...t,manual:!0})}setQueriesData(e,A,t){return er.batch(()=>this.#A.findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,A,t)]))}getQueryState(e){const A=this.defaultQueryOptions({queryKey:e});return this.#A.get(A.queryHash)?.state}removeQueries(e){const A=this.#A;er.batch(()=>{A.findAll(e).forEach(t=>{A.remove(t)})})}resetQueries(e,A){const t=this.#A;return er.batch(()=>(t.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},A)))}cancelQueries(e,A={}){const t={revert:!0,...A},n=er.batch(()=>this.#A.findAll(e).map(s=>s.cancel(t)));return Promise.all(n).then(fa).catch(fa)}invalidateQueries(e,A={}){return er.batch(()=>(this.#A.findAll(e).forEach(t=>{t.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},A)))}refetchQueries(e,A={}){const t={...A,cancelRefetch:A.cancelRefetch??!0},n=er.batch(()=>this.#A.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let r=s.fetch(void 0,t);return t.throwOnError||(r=r.catch(fa)),s.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(n).then(fa)}fetchQuery(e){const A=this.defaultQueryOptions(e);A.retry===void 0&&(A.retry=!1);const t=this.#A.build(this,A);return t.isStaleByTime(Id(A.staleTime,t))?t.fetch(A):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(fa).catch(fa)}fetchInfiniteQuery(e){return e.behavior=SH(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(fa).catch(fa)}ensureInfiniteQueryData(e){return e.behavior=SH(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return RH.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#A}getMutationCache(){return this.#e}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,A){this.#s.set(SG(e),{queryKey:e,defaultOptions:A})}getQueryDefaults(e){const A=[...this.#s.values()],t={};return A.forEach(n=>{_b(e,n.queryKey)&&Object.assign(t,n.defaultOptions)}),t}setMutationDefaults(e,A){this.#n.set(SG(e),{mutationKey:e,defaultOptions:A})}getMutationDefaults(e){const A=[...this.#n.values()],t={};return A.forEach(n=>{_b(e,n.mutationKey)&&Object.assign(t,n.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const A={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return A.queryHash||(A.queryHash=lZ(A.queryKey,A)),A.refetchOnReconnect===void 0&&(A.refetchOnReconnect=A.networkMode!=="always"),A.throwOnError===void 0&&(A.throwOnError=!!A.suspense),!A.networkMode&&A.persister&&(A.networkMode="offlineFirst"),A.queryFn===uZ&&(A.enabled=!1),A}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#A.clear(),this.#e.clear()}},fV=R.createContext(void 0),CZ=e=>{const A=R.useContext(fV);if(!A)throw new Error("No QueryClient set, use QueryClientProvider to set one");return A},lQA=({client:e,children:A})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(fV.Provider,{value:e,children:A})),hV=R.createContext(!1),gQA=()=>R.useContext(hV);hV.Provider;function dQA(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var uQA=R.createContext(dQA()),GQA=()=>R.useContext(uQA),fQA=(e,A,t)=>{const n=t?.state.error&&typeof e.throwOnError=="function"?GZ(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(A.isReset()||(e.retryOnMount=!1))},hQA=e=>{R.useEffect(()=>{e.clearReset()},[e])},wQA=({result:e,errorResetBoundary:A,throwOnError:t,query:n,suspense:s})=>e.isError&&!A.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||GZ(t,[e.error,n])),QQA=e=>{if(e.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>t(n(...s)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},bQA=(e,A)=>e.isLoading&&e.isFetching&&!A,CQA=(e,A)=>e?.suspense&&A.isPending,wV=(e,A,t)=>A.fetchOptimistic(e).catch(()=>{t.clearReset()});function QV(e,A,t){const n=gQA(),s=GQA(),r=CZ(),a=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const B=r.getQueryCache().get(a.queryHash);a._optimisticResults=n?"isRestoring":"optimistic",QQA(a),fQA(a,s,B),hQA(s);const c=!r.getQueryCache().get(a.queryHash),[l]=R.useState(()=>new A(r,a)),g=l.getOptimisticResult(a),u=!n&&e.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(f=>{const w=u?l.subscribe(er.batchCalls(f)):fa;return l.updateResult(),w},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),R.useEffect(()=>{l.setOptions(a)},[a,l]),CQA(a,g))throw wV(a,l,s);if(wQA({result:g,errorResetBoundary:s,throwOnError:a.throwOnError,query:B,suspense:a.suspense}))throw g.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,g),a.experimental_prefetchInRender&&!qb.isServer()&&bQA(g,n)&&(c?wV(a,l,s):B?.promise)?.catch(fa).finally(()=>{l.updateResult()}),a.notifyOnChangeProps?g:l.trackResult(g)}function vZ(e,A){return QV(e,lV)}function VG(e,A){const t=CZ(),[n]=R.useState(()=>new BQA(t,e));R.useEffect(()=>{n.setOptions(e)},[n,e]);const s=R.useSyncExternalStore(R.useCallback(a=>n.subscribe(er.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),r=R.useCallback((a,B)=>{n.mutate(a,B).catch(fa)},[n]);if(s.error&&GZ(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:r,mutateAsync:s.mutate}}function vQA(e,A){return QV(e,rQA)}function IQA(e,A){return A.forEach(function(t){t&&typeof t!="string"&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!=="default"&&!(n in e)){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var pQA=Object.defineProperty,HQA=(e,A,t)=>A in e?pQA(e,A,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[A]=t,bV=(e,A,t)=>HQA(e,typeof A!="symbol"?A+"":A,t);let ha=class{constructor(){bV(this,"_locking"),bV(this,"_locks"),this._locking=Promise.resolve(),this._locks=0}isLocked(){return this._locks>0}lock(){this._locks+=1;let A;const t=new Promise(s=>A=()=>{this._locks-=1,s()}),n=this._locking.then(()=>A);return this._locking=this._locking.then(()=>t),n}};function ns(e,A){if(!e)throw new Error(A)}const mQA=34028234663852886e22,EQA=-34028234663852886e22,yQA=4294967295,YQA=2147483647,ZQA=-2147483648;function WH(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>YQA||e<ZQA)throw new Error("invalid int 32: "+e)}function IZ(e){if(typeof e!="number")throw new Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>yQA||e<0)throw new Error("invalid uint 32: "+e)}function CV(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>mQA||e<EQA))throw new Error("invalid float 32: "+e)}const vV=Symbol("@bufbuild/protobuf/enum-type");function kQA(e){const A=e[vV];return ns(A,"missing enum type on enum object"),A}function IV(e,A,t,n){e[vV]=pV(A,t.map(s=>({no:s.no,name:s.name,localName:e[s.no]})))}function pV(e,A,t){const n=Object.create(null),s=Object.create(null),r=[];for(const a of A){const B=HV(a);r.push(B),n[a.name]=B,s[a.no]=B}return{typeName:e,values:r,findName(a){return n[a]},findNumber(a){return s[a]}}}function UQA(e,A,t){const n={};for(const s of A){const r=HV(s);n[r.localName]=r.no,n[r.no]=r.localName}return IV(n,e,A),n}function HV(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}class pZ{equals(A){return this.getType().runtime.util.equals(this.getType(),this,A)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(A,t){const n=this.getType(),s=n.runtime.bin,r=s.makeReadOptions(t);return s.readMessage(this,r.readerFactory(A),A.byteLength,r),this}fromJson(A,t){const n=this.getType(),s=n.runtime.json,r=s.makeReadOptions(t);return s.readMessage(n,A,r,this),this}fromJsonString(A,t){let n;try{n=JSON.parse(A)}catch(s){throw new Error("cannot decode ".concat(this.getType().typeName," from JSON: ").concat(s instanceof Error?s.message:String(s)))}return this.fromJson(n,t)}toBinary(A){const t=this.getType(),n=t.runtime.bin,s=n.makeWriteOptions(A),r=s.writerFactory();return n.writeMessage(this,r,s),r.finish()}toJson(A){const t=this.getType(),n=t.runtime.json,s=n.makeWriteOptions(A);return n.writeMessage(this,s)}toJsonString(A){var t;const n=this.toJson(A);return JSON.stringify(n,null,(t=A?.prettySpaces)!==null&&t!==void 0?t:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function DQA(e,A,t,n){var s;const r=(s=n?.localName)!==null&&s!==void 0?s:A.substring(A.lastIndexOf(".")+1),a={[r]:function(B){e.util.initFields(this),e.util.initPartial(B,this)}}[r];return Object.setPrototypeOf(a.prototype,new pZ),Object.assign(a,{runtime:e,typeName:A,fields:e.util.newFieldList(t),fromBinary(B,c){return new a().fromBinary(B,c)},fromJson(B,c){return new a().fromJson(B,c)},fromJsonString(B,c){return new a().fromJsonString(B,c)},equals(B,c){return e.util.equals(a,B,c)}}),a}function FQA(){let e=0,A=0;for(let n=0;n<28;n+=7){let s=this.buf[this.pos++];if(e|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[e,A]}let t=this.buf[this.pos++];if(e|=(t&15)<<28,A=(t&112)>>4,(t&128)==0)return this.assertBounds(),[e,A];for(let n=3;n<=31;n+=7){let s=this.buf[this.pos++];if(A|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[e,A]}throw new Error("invalid varint")}function HZ(e,A,t){for(let r=0;r<28;r=r+7){const a=e>>>r,B=!(!(a>>>7)&&A==0),c=(B?a|128:a)&255;if(t.push(c),!B)return}const n=e>>>28&15|(A&7)<<4,s=A>>3!=0;if(t.push((s?n|128:n)&255),!!s){for(let r=3;r<31;r=r+7){const a=A>>>r,B=!!(a>>>7),c=(B?a|128:a)&255;if(t.push(c),!B)return}t.push(A>>>31&1)}}const NH=4294967296;function mV(e){const A=e[0]==="-";A&&(e=e.slice(1));const t=1e6;let n=0,s=0;function r(a,B){const c=Number(e.slice(a,B));s*=t,n=n*t+c,n>=NH&&(s=s+(n/NH|0),n=n%NH)}return r(-24,-18),r(-18,-12),r(-12,-6),r(-6),A?yV(n,s):mZ(n,s)}function MQA(e,A){let t=mZ(e,A);const n=t.hi&2147483648;n&&(t=yV(t.lo,t.hi));const s=EV(t.lo,t.hi);return n?"-"+s:s}function EV(e,A){if({lo:e,hi:A}=xQA(e,A),A<=2097151)return String(NH*A+e);const t=e&16777215,n=(e>>>24|A<<8)&16777215,s=A>>16&65535;let r=t+n*6777216+s*6710656,a=n+s*8147497,B=s*2;const c=1e7;return r>=c&&(a+=Math.floor(r/c),r%=c),a>=c&&(B+=Math.floor(a/c),a%=c),B.toString()+YV(a)+YV(r)}function xQA(e,A){return{lo:e>>>0,hi:A>>>0}}function mZ(e,A){return{lo:e|0,hi:A|0}}function yV(e,A){return A=~A,e?e=~e+1:A+=1,mZ(e,A)}const YV=e=>{const A=String(e);return"0000000".slice(A.length)+A};function ZV(e,A){if(e>=0){for(;e>127;)A.push(e&127|128),e=e>>>7;A.push(e)}else{for(let t=0;t<9;t++)A.push(e&127|128),e=e>>7;A.push(1)}}function PQA(){let e=this.buf[this.pos++],A=e&127;if((e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<7,(e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<14,(e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<21,(e&128)==0)return this.assertBounds(),A;e=this.buf[this.pos++],A|=(e&15)<<28;for(let t=5;(e&128)!==0&&t<10;t++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),A>>>0}function TQA(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const s=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),a=BigInt("0"),B=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(c){const l=typeof c=="bigint"?c:BigInt(c);if(l>r||l<s)throw new Error("int64 invalid: ".concat(c));return l},uParse(c){const l=typeof c=="bigint"?c:BigInt(c);if(l>B||l<a)throw new Error("uint64 invalid: ".concat(c));return l},enc(c){return e.setBigInt64(0,this.parse(c),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(c){return e.setBigInt64(0,this.uParse(c),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec(c,l){return e.setInt32(0,c,!0),e.setInt32(4,l,!0),e.getBigInt64(0,!0)},uDec(c,l){return e.setInt32(0,c,!0),e.setInt32(4,l,!0),e.getBigUint64(0,!0)}}}const t=s=>ns(/^-?[0-9]+$/.test(s),"int64 invalid: ".concat(s)),n=s=>ns(/^[0-9]+$/.test(s),"uint64 invalid: ".concat(s));return{zero:"0",supported:!1,parse(s){return typeof s!="string"&&(s=s.toString()),t(s),s},uParse(s){return typeof s!="string"&&(s=s.toString()),n(s),s},enc(s){return typeof s!="string"&&(s=s.toString()),t(s),mV(s)},uEnc(s){return typeof s!="string"&&(s=s.toString()),n(s),mV(s)},dec(s,r){return MQA(s,r)},uDec(s,r){return EV(s,r)}}}const Tn=TQA();var RA;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(RA||(RA={}));var pd;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(pd||(pd={}));function Hd(e,A,t){if(A===t)return!0;if(e==RA.BYTES){if(!(A instanceof Uint8Array)||!(t instanceof Uint8Array)||A.length!==t.length)return!1;for(let n=0;n<A.length;n++)if(A[n]!==t[n])return!1;return!0}switch(e){case RA.UINT64:case RA.FIXED64:case RA.INT64:case RA.SFIXED64:case RA.SINT64:return A==t}return!1}function iw(e,A){switch(e){case RA.BOOL:return!1;case RA.UINT64:case RA.FIXED64:case RA.INT64:case RA.SFIXED64:case RA.SINT64:return A==0?Tn.zero:"0";case RA.DOUBLE:case RA.FLOAT:return 0;case RA.BYTES:return new Uint8Array(0);case RA.STRING:return"";default:return 0}}function kV(e,A){switch(e){case RA.BOOL:return A===!1;case RA.STRING:return A==="";case RA.BYTES:return A instanceof Uint8Array&&!A.byteLength;default:return A==0}}var hs;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(hs||(hs={}));class RQA{constructor(A){this.stack=[],this.textEncoder=A??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let A=0;for(let s=0;s<this.chunks.length;s++)A+=this.chunks[s].length;let t=new Uint8Array(A),n=0;for(let s=0;s<this.chunks.length;s++)t.set(this.chunks[s],n),n+=this.chunks[s].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let A=this.finish(),t=this.stack.pop();if(!t)throw new Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(A.byteLength),this.raw(A)}tag(A,t){return this.uint32((A<<3|t)>>>0)}raw(A){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(A),this}uint32(A){for(IZ(A);A>127;)this.buf.push(A&127|128),A=A>>>7;return this.buf.push(A),this}int32(A){return WH(A),ZV(A,this.buf),this}bool(A){return this.buf.push(A?1:0),this}bytes(A){return this.uint32(A.byteLength),this.raw(A)}string(A){let t=this.textEncoder.encode(A);return this.uint32(t.byteLength),this.raw(t)}float(A){CV(A);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,A,!0),this.raw(t)}double(A){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,A,!0),this.raw(t)}fixed32(A){IZ(A);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,A,!0),this.raw(t)}sfixed32(A){WH(A);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,A,!0),this.raw(t)}sint32(A){return WH(A),A=(A<<1^A>>31)>>>0,ZV(A,this.buf),this}sfixed64(A){let t=new Uint8Array(8),n=new DataView(t.buffer),s=Tn.enc(A);return n.setInt32(0,s.lo,!0),n.setInt32(4,s.hi,!0),this.raw(t)}fixed64(A){let t=new Uint8Array(8),n=new DataView(t.buffer),s=Tn.uEnc(A);return n.setInt32(0,s.lo,!0),n.setInt32(4,s.hi,!0),this.raw(t)}int64(A){let t=Tn.enc(A);return HZ(t.lo,t.hi,this.buf),this}sint64(A){let t=Tn.enc(A),n=t.hi>>31,s=t.lo<<1^n,r=(t.hi<<1|t.lo>>>31)^n;return HZ(s,r,this.buf),this}uint64(A){let t=Tn.uEnc(A);return HZ(t.lo,t.hi,this.buf),this}}class SQA{constructor(A,t){this.varint64=FQA,this.uint32=PQA,this.buf=A,this.len=A.length,this.pos=0,this.view=new DataView(A.buffer,A.byteOffset,A.byteLength),this.textDecoder=t??new TextDecoder}tag(){let A=this.uint32(),t=A>>>3,n=A&7;if(t<=0||n<0||n>5)throw new Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(A,t){let n=this.pos;switch(A){case hs.Varint:for(;this.buf[this.pos++]&128;);break;case hs.Bit64:this.pos+=4;case hs.Bit32:this.pos+=4;break;case hs.LengthDelimited:let s=this.uint32();this.pos+=s;break;case hs.StartGroup:for(;;){const[r,a]=this.tag();if(a===hs.EndGroup){if(t!==void 0&&r!==t)throw new Error("invalid end group tag");break}this.skip(a,r)}break;default:throw new Error("cant skip wire type "+A)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let A=this.uint32();return A>>>1^-(A&1)}int64(){return Tn.dec(...this.varint64())}uint64(){return Tn.uDec(...this.varint64())}sint64(){let[A,t]=this.varint64(),n=-(A&1);return A=(A>>>1|(t&1)<<31)^n,t=t>>>1^n,Tn.dec(A,t)}bool(){let[A,t]=this.varint64();return A!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Tn.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Tn.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let A=this.uint32(),t=this.pos;return this.pos+=A,this.assertBounds(),this.buf.subarray(t,t+A)}string(){return this.textDecoder.decode(this.bytes())}}function VQA(e,A,t,n){let s;return{typeName:A,extendee:t,get field(){if(!s){const r=typeof n=="function"?n():n;r.name=A.split(".").pop(),r.jsonName="[".concat(A,"]"),s=e.util.newFieldList([r]).list()[0]}return s},runtime:e}}function UV(e){const A=e.field.localName,t=Object.create(null);return t[A]=WQA(e),[t,()=>t[A]]}function WQA(e){const A=e.field;if(A.repeated)return[];if(A.default!==void 0)return A.default;switch(A.kind){case"enum":return A.T.values[0].no;case"scalar":return iw(A.T,A.L);case"message":const t=A.T,n=new t;return t.fieldWrapper?t.fieldWrapper.unwrapField(n):n;case"map":throw"map fields are not allowed to be extensions"}}function NQA(e,A){if(!A.repeated&&(A.kind=="enum"||A.kind=="scalar")){for(let t=e.length-1;t>=0;--t)if(e[t].no==A.no)return[e[t]];return[]}return e.filter(t=>t.no===A.no)}let Xl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),zH=[];for(let e=0;e<Xl.length;e++)zH[Xl[e].charCodeAt(0)]=e;zH[45]=Xl.indexOf("+"),zH[95]=Xl.indexOf("/");const DV={dec(e){let A=e.length*3/4;e[e.length-2]=="="?A-=2:e[e.length-1]=="="&&(A-=1);let t=new Uint8Array(A),n=0,s=0,r,a=0;for(let B=0;B<e.length;B++){if(r=zH[e.charCodeAt(B)],r===void 0)switch(e[B]){case"=":s=0;case`
98
98
  `:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(s){case 0:a=r,s=1;break;case 1:t[n++]=a<<2|(r&48)>>4,a=r,s=2;break;case 2:t[n++]=(a&15)<<4|(r&60)>>2,a=r,s=3;break;case 3:t[n++]=(a&3)<<6|r,s=0;break}}if(s==1)throw Error("invalid base64 string.");return t.subarray(0,n)},enc(e){let A="",t=0,n,s=0;for(let r=0;r<e.length;r++)switch(n=e[r],t){case 0:A+=Xl[n>>2],s=(n&3)<<4,t=1;break;case 1:A+=Xl[s|n>>4],s=(n&15)<<2,t=2;break;case 2:A+=Xl[s|n>>6],A+=Xl[n&63],t=0;break}return t&&(A+=Xl[s],A+="=",t==1&&(A+="=")),A}};function zQA(e,A,t){MV(A,e);const n=A.runtime.bin.makeReadOptions(t),s=NQA(e.getType().runtime.bin.listUnknownFields(e),A.field),[r,a]=UV(A);for(const B of s)A.runtime.bin.readField(r,n.readerFactory(B.data),A.field,B.wireType,n);return a()}function LQA(e,A,t,n){MV(A,e);const s=A.runtime.bin.makeReadOptions(n),r=A.runtime.bin.makeWriteOptions(n);if(FV(e,A)){const l=e.getType().runtime.bin.listUnknownFields(e).filter(g=>g.no!=A.field.no);e.getType().runtime.bin.discardUnknownFields(e);for(const g of l)e.getType().runtime.bin.onUnknownField(e,g.no,g.wireType,g.data)}const a=r.writerFactory();let B=A.field;!B.opt&&!B.repeated&&(B.kind=="enum"||B.kind=="scalar")&&(B=Object.assign(Object.assign({},A.field),{opt:!0})),A.runtime.bin.writeField(B,t,a,r);const c=s.readerFactory(a.finish());for(;c.pos<c.len;){const[l,g]=c.tag(),u=c.skip(g,l);e.getType().runtime.bin.onUnknownField(e,l,g,u)}}function FV(e,A){const t=e.getType();return A.extendee.typeName===t.typeName&&!!t.runtime.bin.listUnknownFields(e).find(n=>n.no==A.field.no)}function MV(e,A){ns(e.extendee.typeName==A.getType().typeName,"extension ".concat(e.typeName," can only be applied to message ").concat(e.extendee.typeName))}function xV(e,A){const t=e.localName;if(e.repeated)return A[t].length>0;if(e.oneof)return A[e.oneof.localName].case===t;switch(e.kind){case"enum":case"scalar":return e.opt||e.req?A[t]!==void 0:e.kind=="enum"?A[t]!==e.T.values[0].no:!kV(e.T,A[t]);case"message":return A[t]!==void 0;case"map":return Object.keys(A[t]).length>0}}function PV(e,A){const t=e.localName,n=!e.opt&&!e.req;if(e.repeated)A[t]=[];else if(e.oneof)A[e.oneof.localName]={case:void 0};else switch(e.kind){case"map":A[t]={};break;case"enum":A[t]=n?e.T.values[0].no:void 0;break;case"scalar":A[t]=n?iw(e.T,e.L):void 0;break;case"message":A[t]=void 0;break}}function Ol(e,A){if(e===null||typeof e!="object"||!Object.getOwnPropertyNames(pZ.prototype).every(n=>n in e&&typeof e[n]=="function"))return!1;const t=e.getType();return t===null||typeof t!="function"||!("typeName"in t)||typeof t.typeName!="string"?!1:A===void 0?!0:t.typeName==A.typeName}function TV(e,A){return Ol(A)||!e.fieldWrapper?A:e.fieldWrapper.wrapField(A)}RA.DOUBLE,RA.FLOAT,RA.INT64,RA.UINT64,RA.INT32,RA.UINT32,RA.BOOL,RA.STRING,RA.BYTES;const RV={ignoreUnknownFields:!1},SV={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function XQA(e){return e?Object.assign(Object.assign({},RV),e):RV}function OQA(e){return e?Object.assign(Object.assign({},SV),e):SV}const LH=Symbol(),XH=Symbol();function JQA(){return{makeReadOptions:XQA,makeWriteOptions:OQA,readMessage(e,A,t,n){if(A==null||Array.isArray(A)||typeof A!="object")throw new Error("cannot decode message ".concat(e.typeName," from JSON: ").concat(Ec(A)));n=n??new e;const s=new Map,r=t.typeRegistry;for(const[a,B]of Object.entries(A)){const c=e.fields.findJsonName(a);if(c){if(c.oneof){if(B===null&&c.kind=="scalar")continue;const l=s.get(c.oneof);if(l!==void 0)throw new Error("cannot decode message ".concat(e.typeName,' from JSON: multiple keys for oneof "').concat(c.oneof.name,'" present: "').concat(l,'", "').concat(a,'"'));s.set(c.oneof,a)}VV(n,B,c,t,e)}else{let l=!1;if(r?.findExtension&&a.startsWith("[")&&a.endsWith("]")){const g=r.findExtension(a.substring(1,a.length-1));if(g&&g.extendee.typeName==e.typeName){l=!0;const[u,f]=UV(g);VV(u,B,g.field,t,g),LQA(n,g,f(),t)}}if(!l&&!t.ignoreUnknownFields)throw new Error("cannot decode message ".concat(e.typeName,' from JSON: key "').concat(a,'" is unknown'))}}return n},writeMessage(e,A){const t=e.getType(),n={};let s;try{for(s of t.fields.byNumber()){if(!xV(s,e)){if(s.req)throw"required field not set";if(!A.emitDefaultValues||!jQA(s))continue}const a=s.oneof?e[s.oneof.localName].value:e[s.localName],B=WV(s,a,A);B!==void 0&&(n[A.useProtoFieldName?s.name:s.jsonName]=B)}const r=A.typeRegistry;if(r?.findExtensionFor)for(const a of t.runtime.bin.listUnknownFields(e)){const B=r.findExtensionFor(t.typeName,a.no);if(B&&FV(e,B)){const c=zQA(e,B,A),l=WV(B.field,c,A);l!==void 0&&(n[B.field.jsonName]=l)}}}catch(r){const a=s?"cannot encode field ".concat(t.typeName,".").concat(s.name," to JSON"):"cannot encode message ".concat(t.typeName," to JSON"),B=r instanceof Error?r.message:String(r);throw new Error(a+(B.length>0?": ".concat(B):""))}return n},readScalar(e,A,t){return $b(e,A,t??pd.BIGINT,!0)},writeScalar(e,A,t){if(A!==void 0&&(t||kV(e,A)))return OH(e,A)},debug:Ec}}function Ec(e){if(e===null)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":'"'.concat(e.split('"').join('\\"'),'"');default:return String(e)}}function VV(e,A,t,n,s){let r=t.localName;if(t.repeated){if(ns(t.kind!="map"),A===null)return;if(!Array.isArray(A))throw new Error("cannot decode field ".concat(s.typeName,".").concat(t.name," from JSON: ").concat(Ec(A)));const a=e[r];for(const B of A){if(B===null)throw new Error("cannot decode field ".concat(s.typeName,".").concat(t.name," from JSON: ").concat(Ec(B)));switch(t.kind){case"message":a.push(t.T.fromJson(B,n));break;case"enum":const c=EZ(t.T,B,n.ignoreUnknownFields,!0);c!==XH&&a.push(c);break;case"scalar":try{a.push($b(t.T,B,t.L,!0))}catch(l){let g="cannot decode field ".concat(s.typeName,".").concat(t.name," from JSON: ").concat(Ec(B));throw l instanceof Error&&l.message.length>0&&(g+=": ".concat(l.message)),new Error(g)}break}}}else if(t.kind=="map"){if(A===null)return;if(typeof A!="object"||Array.isArray(A))throw new Error("cannot decode field ".concat(s.typeName,".").concat(t.name," from JSON: ").concat(Ec(A)));const a=e[r];for(const[B,c]of Object.entries(A)){if(c===null)throw new Error("cannot decode field ".concat(s.typeName,".").concat(t.name," from JSON: map value null"));let l;try{l=KQA(t.K,B)}catch(g){let u="cannot decode map key for field ".concat(s.typeName,".").concat(t.name," from JSON: ").concat(Ec(A));throw g instanceof Error&&g.message.length>0&&(u+=": ".concat(g.message)),new Error(u)}switch(t.V.kind){case"message":a[l]=t.V.T.fromJson(c,n);break;case"enum":const g=EZ(t.V.T,c,n.ignoreUnknownFields,!0);g!==XH&&(a[l]=g);break;case"scalar":try{a[l]=$b(t.V.T,c,pd.BIGINT,!0)}catch(u){let f="cannot decode map value for field ".concat(s.typeName,".").concat(t.name," from JSON: ").concat(Ec(A));throw u instanceof Error&&u.message.length>0&&(f+=": ".concat(u.message)),new Error(f)}break}}}else switch(t.oneof&&(e=e[t.oneof.localName]={case:r},r="value"),t.kind){case"message":const a=t.T;if(A===null&&a.typeName!="google.protobuf.Value")return;let B=e[r];Ol(B)?B.fromJson(A,n):(e[r]=B=a.fromJson(A,n),a.fieldWrapper&&!t.oneof&&(e[r]=a.fieldWrapper.unwrapField(B)));break;case"enum":const c=EZ(t.T,A,n.ignoreUnknownFields,!1);switch(c){case LH:PV(t,e);break;case XH:break;default:e[r]=c;break}break;case"scalar":try{const l=$b(t.T,A,t.L,!1);l===LH?PV(t,e):e[r]=l}catch(l){let g="cannot decode field ".concat(s.typeName,".").concat(t.name," from JSON: ").concat(Ec(A));throw l instanceof Error&&l.message.length>0&&(g+=": ".concat(l.message)),new Error(g)}break}}function KQA(e,A){if(e===RA.BOOL)switch(A){case"true":A=!0;break;case"false":A=!1;break}return $b(e,A,pd.BIGINT,!0).toString()}function $b(e,A,t,n){if(A===null)return n?iw(e,t):LH;switch(e){case RA.DOUBLE:case RA.FLOAT:if(A==="NaN")return Number.NaN;if(A==="Infinity")return Number.POSITIVE_INFINITY;if(A==="-Infinity")return Number.NEGATIVE_INFINITY;if(A===""||typeof A=="string"&&A.trim().length!==A.length||typeof A!="string"&&typeof A!="number")break;const s=Number(A);if(Number.isNaN(s)||!Number.isFinite(s))break;return e==RA.FLOAT&&CV(s),s;case RA.INT32:case RA.FIXED32:case RA.SFIXED32:case RA.SINT32:case RA.UINT32:let r;if(typeof A=="number"?r=A:typeof A=="string"&&A.length>0&&A.trim().length===A.length&&(r=Number(A)),r===void 0)break;return e==RA.UINT32||e==RA.FIXED32?IZ(r):WH(r),r;case RA.INT64:case RA.SFIXED64:case RA.SINT64:if(typeof A!="number"&&typeof A!="string")break;const a=Tn.parse(A);return t?a.toString():a;case RA.FIXED64:case RA.UINT64:if(typeof A!="number"&&typeof A!="string")break;const B=Tn.uParse(A);return t?B.toString():B;case RA.BOOL:if(typeof A!="boolean")break;return A;case RA.STRING:if(typeof A!="string")break;try{encodeURIComponent(A)}catch{throw new Error("invalid UTF8")}return A;case RA.BYTES:if(A==="")return new Uint8Array(0);if(typeof A!="string")break;return DV.dec(A)}throw new Error}function EZ(e,A,t,n){if(A===null)return e.typeName=="google.protobuf.NullValue"?0:n?e.values[0].no:LH;switch(typeof A){case"number":if(Number.isInteger(A))return A;break;case"string":const s=e.findName(A);if(s!==void 0)return s.no;if(t)return XH;break}throw new Error("cannot decode enum ".concat(e.typeName," from JSON: ").concat(Ec(A)))}function jQA(e){return e.repeated||e.kind=="map"?!0:!(e.oneof||e.kind=="message"||e.opt||e.req)}function WV(e,A,t){if(e.kind=="map"){ns(typeof A=="object"&&A!=null);const n={},s=Object.entries(A);switch(e.V.kind){case"scalar":for(const[a,B]of s)n[a.toString()]=OH(e.V.T,B);break;case"message":for(const[a,B]of s)n[a.toString()]=B.toJson(t);break;case"enum":const r=e.V.T;for(const[a,B]of s)n[a.toString()]=yZ(r,B,t.enumAsInteger);break}return t.emitDefaultValues||s.length>0?n:void 0}if(e.repeated){ns(Array.isArray(A));const n=[];switch(e.kind){case"scalar":for(let s=0;s<A.length;s++)n.push(OH(e.T,A[s]));break;case"enum":for(let s=0;s<A.length;s++)n.push(yZ(e.T,A[s],t.enumAsInteger));break;case"message":for(let s=0;s<A.length;s++)n.push(A[s].toJson(t));break}return t.emitDefaultValues||n.length>0?n:void 0}switch(e.kind){case"scalar":return OH(e.T,A);case"enum":return yZ(e.T,A,t.enumAsInteger);case"message":return TV(e.T,A).toJson(t)}}function yZ(e,A,t){var n;if(ns(typeof A=="number"),e.typeName=="google.protobuf.NullValue")return null;if(t)return A;const s=e.findNumber(A);return(n=s?.name)!==null&&n!==void 0?n:A}function OH(e,A){switch(e){case RA.INT32:case RA.SFIXED32:case RA.SINT32:case RA.FIXED32:case RA.UINT32:return ns(typeof A=="number"),A;case RA.FLOAT:case RA.DOUBLE:return ns(typeof A=="number"),Number.isNaN(A)?"NaN":A===Number.POSITIVE_INFINITY?"Infinity":A===Number.NEGATIVE_INFINITY?"-Infinity":A;case RA.STRING:return ns(typeof A=="string"),A;case RA.BOOL:return ns(typeof A=="boolean"),A;case RA.UINT64:case RA.FIXED64:case RA.INT64:case RA.SFIXED64:case RA.SINT64:return ns(typeof A=="bigint"||typeof A=="string"||typeof A=="number"),A.toString();case RA.BYTES:return ns(A instanceof Uint8Array),DV.enc(A)}}const Bw=Symbol("@bufbuild/protobuf/unknown-fields"),NV={readUnknownFields:!0,readerFactory:e=>new SQA(e)},zV={writeUnknownFields:!0,writerFactory:()=>new RQA};function _QA(e){return e?Object.assign(Object.assign({},NV),e):NV}function qQA(e){return e?Object.assign(Object.assign({},zV),e):zV}function $QA(){return{makeReadOptions:_QA,makeWriteOptions:qQA,listUnknownFields(e){var A;return(A=e[Bw])!==null&&A!==void 0?A:[]},discardUnknownFields(e){delete e[Bw]},writeUnknownFields(e,A){const n=e[Bw];if(n)for(const s of n)A.tag(s.no,s.wireType).raw(s.data)},onUnknownField(e,A,t,n){const s=e;Array.isArray(s[Bw])||(s[Bw]=[]),s[Bw].push({no:A,wireType:t,data:n})},readMessage(e,A,t,n,s){const r=e.getType(),a=s?A.len:A.pos+t;let B,c;for(;A.pos<a&&([B,c]=A.tag(),!(s===!0&&c==hs.EndGroup));){const l=r.fields.find(B);if(!l){const g=A.skip(c,B);n.readUnknownFields&&this.onUnknownField(e,B,c,g);continue}LV(e,A,l,c,n)}if(s&&(c!=hs.EndGroup||B!==t))throw new Error("invalid end group tag")},readField:LV,writeMessage(e,A,t){const n=e.getType();for(const s of n.fields.byNumber()){if(!xV(s,e)){if(s.req)throw new Error("cannot encode field ".concat(n.typeName,".").concat(s.name," to binary: required field not set"));continue}const r=s.oneof?e[s.oneof.localName].value:e[s.localName];XV(s,r,A,t)}return t.writeUnknownFields&&this.writeUnknownFields(e,A),A},writeField(e,A,t,n){A!==void 0&&XV(e,A,t,n)}}}function LV(e,A,t,n,s){let{repeated:r,localName:a}=t;switch(t.oneof&&(e=e[t.oneof.localName],e.case!=a&&delete e.value,e.case=a,a="value"),t.kind){case"scalar":case"enum":const B=t.kind=="enum"?RA.INT32:t.T;let c=KH;if(t.kind=="scalar"&&t.L>0&&(c=ebA),r){let f=e[a];if(n==hs.LengthDelimited&&B!=RA.STRING&&B!=RA.BYTES){let v=A.uint32()+A.pos;for(;A.pos<v;)f.push(c(A,B))}else f.push(c(A,B))}else e[a]=c(A,B);break;case"message":const l=t.T;r?e[a].push(JH(A,new l,s,t)):Ol(e[a])?JH(A,e[a],s,t):(e[a]=JH(A,new l,s,t),l.fieldWrapper&&!t.oneof&&!t.repeated&&(e[a]=l.fieldWrapper.unwrapField(e[a])));break;case"map":let[g,u]=AbA(t,A,s);e[a][g]=u;break}}function JH(e,A,t,n){const s=A.getType().runtime.bin,r=n?.delimited;return s.readMessage(A,e,r?n.no:e.uint32(),t,r),A}function AbA(e,A,t){const n=A.uint32(),s=A.pos+n;let r,a;for(;A.pos<s;){const[B]=A.tag();switch(B){case 1:r=KH(A,e.K);break;case 2:switch(e.V.kind){case"scalar":a=KH(A,e.V.T);break;case"enum":a=A.int32();break;case"message":a=JH(A,new e.V.T,t,void 0);break}break}}if(r===void 0&&(r=iw(e.K,pd.BIGINT)),typeof r!="string"&&typeof r!="number"&&(r=r.toString()),a===void 0)switch(e.V.kind){case"scalar":a=iw(e.V.T,pd.BIGINT);break;case"enum":a=e.V.T.values[0].no;break;case"message":a=new e.V.T;break}return[r,a]}function ebA(e,A){const t=KH(e,A);return typeof t=="bigint"?t.toString():t}function KH(e,A){switch(A){case RA.STRING:return e.string();case RA.BOOL:return e.bool();case RA.DOUBLE:return e.double();case RA.FLOAT:return e.float();case RA.INT32:return e.int32();case RA.INT64:return e.int64();case RA.UINT64:return e.uint64();case RA.FIXED64:return e.fixed64();case RA.BYTES:return e.bytes();case RA.FIXED32:return e.fixed32();case RA.SFIXED32:return e.sfixed32();case RA.SFIXED64:return e.sfixed64();case RA.SINT64:return e.sint64();case RA.UINT32:return e.uint32();case RA.SINT32:return e.sint32()}}function XV(e,A,t,n){ns(A!==void 0);const s=e.repeated;switch(e.kind){case"scalar":case"enum":let r=e.kind=="enum"?RA.INT32:e.T;if(s)if(ns(Array.isArray(A)),e.packed)nbA(t,r,e.no,A);else for(const a of A)AC(t,r,e.no,a);else AC(t,r,e.no,A);break;case"message":if(s){ns(Array.isArray(A));for(const a of A)OV(t,n,e,a)}else OV(t,n,e,A);break;case"map":ns(typeof A=="object"&&A!=null);for(const[a,B]of Object.entries(A))tbA(t,n,e,a,B);break}}function tbA(e,A,t,n,s){e.tag(t.no,hs.LengthDelimited),e.fork();let r=n;switch(t.K){case RA.INT32:case RA.FIXED32:case RA.UINT32:case RA.SFIXED32:case RA.SINT32:r=Number.parseInt(n);break;case RA.BOOL:ns(n=="true"||n=="false"),r=n=="true";break}switch(AC(e,t.K,1,r),t.V.kind){case"scalar":AC(e,t.V.T,2,s);break;case"enum":AC(e,RA.INT32,2,s);break;case"message":ns(s!==void 0),e.tag(2,hs.LengthDelimited).bytes(s.toBinary(A));break}e.join()}function OV(e,A,t,n){const s=TV(t.T,n);t.delimited?e.tag(t.no,hs.StartGroup).raw(s.toBinary(A)).tag(t.no,hs.EndGroup):e.tag(t.no,hs.LengthDelimited).bytes(s.toBinary(A))}function AC(e,A,t,n){ns(n!==void 0);let[s,r]=JV(A);e.tag(t,s)[r](n)}function nbA(e,A,t,n){if(!n.length)return;e.tag(t,hs.LengthDelimited).fork();let[,s]=JV(A);for(let r=0;r<n.length;r++)e[s](n[r]);e.join()}function JV(e){let A=hs.Varint;switch(e){case RA.BYTES:case RA.STRING:A=hs.LengthDelimited;break;case RA.DOUBLE:case RA.FIXED64:case RA.SFIXED64:A=hs.Bit64;break;case RA.FIXED32:case RA.SFIXED32:case RA.FLOAT:A=hs.Bit32;break}const t=RA[e].toLowerCase();return[A,t]}function sbA(){return{setEnumType:IV,initPartial(e,A){if(e===void 0)return;const t=A.getType();for(const n of t.fields.byMember()){const s=n.localName,r=A,a=e;if(a[s]!=null)switch(n.kind){case"oneof":const B=a[s].case;if(B===void 0)continue;const c=n.findField(B);let l=a[s].value;c&&c.kind=="message"&&!Ol(l,c.T)?l=new c.T(l):c&&c.kind==="scalar"&&c.T===RA.BYTES&&(l=eC(l)),r[s]={case:B,value:l};break;case"scalar":case"enum":let g=a[s];n.T===RA.BYTES&&(g=n.repeated?g.map(eC):eC(g)),r[s]=g;break;case"map":switch(n.V.kind){case"scalar":case"enum":if(n.V.T===RA.BYTES)for(const[w,v]of Object.entries(a[s]))r[s][w]=eC(v);else Object.assign(r[s],a[s]);break;case"message":const f=n.V.T;for(const w of Object.keys(a[s])){let v=a[s][w];f.fieldWrapper||(v=new f(v)),r[s][w]=v}break}break;case"message":const u=n.T;if(n.repeated)r[s]=a[s].map(f=>Ol(f,u)?f:new u(f));else{const f=a[s];u.fieldWrapper?u.typeName==="google.protobuf.BytesValue"?r[s]=eC(f):r[s]=f:r[s]=Ol(f,u)?f:new u(f)}break}}},equals(e,A,t){return A===t?!0:!A||!t?!1:e.fields.byMember().every(n=>{const s=A[n.localName],r=t[n.localName];if(n.repeated){if(s.length!==r.length)return!1;switch(n.kind){case"message":return s.every((a,B)=>n.T.equals(a,r[B]));case"scalar":return s.every((a,B)=>Hd(n.T,a,r[B]));case"enum":return s.every((a,B)=>Hd(RA.INT32,a,r[B]))}throw new Error("repeated cannot contain ".concat(n.kind))}switch(n.kind){case"message":let a=s,B=r;return n.T.fieldWrapper&&(a!==void 0&&!Ol(a)&&(a=n.T.fieldWrapper.wrapField(a)),B!==void 0&&!Ol(B)&&(B=n.T.fieldWrapper.wrapField(B))),n.T.equals(a,B);case"enum":return Hd(RA.INT32,s,r);case"scalar":return Hd(n.T,s,r);case"oneof":if(s.case!==r.case)return!1;const c=n.findField(s.case);if(c===void 0)return!0;switch(c.kind){case"message":return c.T.equals(s.value,r.value);case"enum":return Hd(RA.INT32,s.value,r.value);case"scalar":return Hd(c.T,s.value,r.value)}throw new Error("oneof cannot contain ".concat(c.kind));case"map":const l=Object.keys(s).concat(Object.keys(r));switch(n.V.kind){case"message":const g=n.V.T;return l.every(f=>g.equals(s[f],r[f]));case"enum":return l.every(f=>Hd(RA.INT32,s[f],r[f]));case"scalar":const u=n.V.T;return l.every(f=>Hd(u,s[f],r[f]))}break}})},clone(e){const A=e.getType(),t=new A,n=t;for(const s of A.fields.byMember()){const r=e[s.localName];let a;if(s.repeated)a=r.map(jH);else if(s.kind=="map"){a=n[s.localName];for(const[B,c]of Object.entries(r))a[B]=jH(c)}else s.kind=="oneof"?a=s.findField(r.case)?{case:r.case,value:jH(r.value)}:{case:void 0}:a=jH(r);n[s.localName]=a}for(const s of A.runtime.bin.listUnknownFields(e))A.runtime.bin.onUnknownField(n,s.no,s.wireType,s.data);return t}}}function jH(e){if(e===void 0)return e;if(Ol(e))return e.clone();if(e instanceof Uint8Array){const A=new Uint8Array(e.byteLength);return A.set(e),A}return e}function eC(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function rbA(e,A,t){return{syntax:e,json:JQA(),bin:$QA(),util:Object.assign(Object.assign({},sbA()),{newFieldList:A,initFields:t}),makeMessageType(n,s,r){return DQA(this,n,s,r)},makeEnum:UQA,makeEnumType:pV,getEnumType:kQA,makeExtension(n,s,r){return VQA(this,n,s,r)}}}class abA{constructor(A,t){this._fields=A,this._normalizer=t}findJsonName(A){if(!this.jsonNames){const t={};for(const n of this.list())t[n.jsonName]=t[n.name]=n;this.jsonNames=t}return this.jsonNames[A]}find(A){if(!this.numbers){const t={};for(const n of this.list())t[n.no]=n;this.numbers=t}return this.numbers[A]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((A,t)=>A.no-t.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];const A=this.members;let t;for(const n of this.list())n.oneof?n.oneof!==t&&(t=n.oneof,A.push(t)):A.push(n)}return this.members}}function KV(e,A){const t=jV(e);return A?t:gbA(lbA(t))}function ibA(e){return KV(e,!1)}const BbA=jV;function jV(e){let A=!1;const t=[];for(let n=0;n<e.length;n++){let s=e.charAt(n);switch(s){case"_":A=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":t.push(s),A=!1;break;default:A&&(A=!1,s=s.toUpperCase()),t.push(s);break}}return t.join("")}const obA=new Set(["constructor","toString","toJSON","valueOf"]),cbA=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),_V=e=>"".concat(e,"$"),lbA=e=>cbA.has(e)?_V(e):e,gbA=e=>obA.has(e)?_V(e):e;class dbA{constructor(A){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=A,this.localName=ibA(A)}addField(A){ns(A.oneof===this,"field ".concat(A.name," not one of ").concat(this.name)),this.fields.push(A)}findField(A){if(!this._lookup){this._lookup=Object.create(null);for(let t=0;t<this.fields.length;t++)this._lookup[this.fields[t].localName]=this.fields[t]}return this._lookup[A]}}function ubA(e,A){var t,n,s,r,a,B;const c=[];let l;for(const g of typeof e=="function"?e():e){const u=g;if(u.localName=KV(g.name,g.oneof!==void 0),u.jsonName=(t=g.jsonName)!==null&&t!==void 0?t:BbA(g.name),u.repeated=(n=g.repeated)!==null&&n!==void 0?n:!1,g.kind=="scalar"&&(u.L=(s=g.L)!==null&&s!==void 0?s:pd.BIGINT),u.delimited=(r=g.delimited)!==null&&r!==void 0?r:!1,u.req=(a=g.req)!==null&&a!==void 0?a:!1,u.opt=(B=g.opt)!==null&&B!==void 0?B:!1,g.packed===void 0&&(u.packed=g.kind=="enum"||g.kind=="scalar"&&g.T!=RA.BYTES&&g.T!=RA.STRING),g.oneof!==void 0){const f=typeof g.oneof=="string"?g.oneof:g.oneof.name;(!l||l.name!=f)&&(l=new dbA(f)),u.oneof=l,l.addField(u)}c.push(u)}return c}const GA=rbA("proto3",e=>new abA(e,A=>ubA(A)),e=>{for(const A of e.getType().fields.byMember()){if(A.opt)continue;const t=A.localName,n=e;if(A.repeated){n[t]=[];continue}switch(A.kind){case"oneof":n[t]={case:void 0};break;case"enum":n[t]=0;break;case"map":n[t]={};break;case"scalar":n[t]=iw(A.T,A.L);break}}});class qa extends pZ{constructor(A){super(),this.seconds=Tn.zero,this.nanos=0,GA.util.initPartial(A,this)}fromJson(A,t){if(typeof A!="string")throw new Error("cannot decode google.protobuf.Timestamp from JSON: ".concat(GA.json.debug(A)));const n=A.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!n)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const s=Date.parse(n[1]+"-"+n[2]+"-"+n[3]+"T"+n[4]+":"+n[5]+":"+n[6]+(n[8]?n[8]:"Z"));if(Number.isNaN(s))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(s<Date.parse("0001-01-01T00:00:00Z")||s>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=Tn.parse(s/1e3),this.nanos=0,n[7]&&(this.nanos=parseInt("1"+n[7]+"0".repeat(9-n[7].length))-1e9),this}toJson(A){const t=Number(this.seconds)*1e3;if(t<Date.parse("0001-01-01T00:00:00Z")||t>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");let n="Z";if(this.nanos>0){const s=(this.nanos+1e9).toString().substring(1);s.substring(3)==="000000"?n="."+s.substring(0,3)+"Z":s.substring(6)==="000"?n="."+s.substring(0,6)+"Z":n="."+s+"Z"}return new Date(t).toISOString().replace(".000Z",n)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return qa.fromDate(new Date)}static fromDate(A){const t=A.getTime();return new qa({seconds:Tn.parse(Math.floor(t/1e3)),nanos:t%1e3*1e6})}static fromBinary(A,t){return new qa().fromBinary(A,t)}static fromJson(A,t){return new qa().fromJson(A,t)}static fromJsonString(A,t){return new qa().fromJsonString(A,t)}static equals(A,t){return GA.util.equals(qa,A,t)}}qa.runtime=GA,qa.typeName="google.protobuf.Timestamp",qa.fields=GA.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);const GbA=GA.makeMessageType("livekit.MetricsBatch",()=>[{no:1,name:"timestamp_ms",kind:"scalar",T:3},{no:2,name:"normalized_timestamp",kind:"message",T:qa},{no:3,name:"str_data",kind:"scalar",T:9,repeated:!0},{no:4,name:"time_series",kind:"message",T:fbA,repeated:!0},{no:5,name:"events",kind:"message",T:wbA,repeated:!0}]),fbA=GA.makeMessageType("livekit.TimeSeriesMetric",()=>[{no:1,name:"label",kind:"scalar",T:13},{no:2,name:"participant_identity",kind:"scalar",T:13},{no:3,name:"track_sid",kind:"scalar",T:13},{no:4,name:"samples",kind:"message",T:hbA,repeated:!0},{no:5,name:"rid",kind:"scalar",T:13}]),hbA=GA.makeMessageType("livekit.MetricSample",()=>[{no:1,name:"timestamp_ms",kind:"scalar",T:3},{no:2,name:"normalized_timestamp",kind:"message",T:qa},{no:3,name:"value",kind:"scalar",T:2}]),wbA=GA.makeMessageType("livekit.EventMetric",()=>[{no:1,name:"label",kind:"scalar",T:13},{no:2,name:"participant_identity",kind:"scalar",T:13},{no:3,name:"track_sid",kind:"scalar",T:13},{no:4,name:"start_timestamp_ms",kind:"scalar",T:3},{no:5,name:"end_timestamp_ms",kind:"scalar",T:3,opt:!0},{no:6,name:"normalized_start_timestamp",kind:"message",T:qa},{no:7,name:"normalized_end_timestamp",kind:"message",T:qa,opt:!0},{no:8,name:"metadata",kind:"scalar",T:9},{no:9,name:"rid",kind:"scalar",T:13}]),qV=GA.makeEnum("livekit.BackupCodecPolicy",[{no:0,name:"PREFER_REGRESSION"},{no:1,name:"SIMULCAST"},{no:2,name:"REGRESSION"}]),ho=GA.makeEnum("livekit.TrackType",[{no:0,name:"AUDIO"},{no:1,name:"VIDEO"},{no:2,name:"DATA"}]),Ms=GA.makeEnum("livekit.TrackSource",[{no:0,name:"UNKNOWN"},{no:1,name:"CAMERA"},{no:2,name:"MICROPHONE"},{no:3,name:"SCREEN_SHARE"},{no:4,name:"SCREEN_SHARE_AUDIO"}]),YZ=GA.makeEnum("livekit.VideoQuality",[{no:0,name:"LOW"},{no:1,name:"MEDIUM"},{no:2,name:"HIGH"},{no:3,name:"OFF"}]),tC=GA.makeEnum("livekit.ConnectionQuality",[{no:0,name:"POOR"},{no:1,name:"GOOD"},{no:2,name:"EXCELLENT"},{no:3,name:"LOST"}]),nC=GA.makeEnum("livekit.ClientConfigSetting",[{no:0,name:"UNSET"},{no:1,name:"DISABLED"},{no:2,name:"ENABLED"}]),wo=GA.makeEnum("livekit.DisconnectReason",[{no:0,name:"UNKNOWN_REASON"},{no:1,name:"CLIENT_INITIATED"},{no:2,name:"DUPLICATE_IDENTITY"},{no:3,name:"SERVER_SHUTDOWN"},{no:4,name:"PARTICIPANT_REMOVED"},{no:5,name:"ROOM_DELETED"},{no:6,name:"STATE_MISMATCH"},{no:7,name:"JOIN_FAILURE"},{no:8,name:"MIGRATION"},{no:9,name:"SIGNAL_CLOSE"},{no:10,name:"ROOM_CLOSED"},{no:11,name:"USER_UNAVAILABLE"},{no:12,name:"USER_REJECTED"},{no:13,name:"SIP_TRUNK_FAILURE"},{no:14,name:"CONNECTION_TIMEOUT"},{no:15,name:"MEDIA_FAILURE"}]),WG=GA.makeEnum("livekit.ReconnectReason",[{no:0,name:"RR_UNKNOWN"},{no:1,name:"RR_SIGNAL_DISCONNECTED"},{no:2,name:"RR_PUBLISHER_FAILED"},{no:3,name:"RR_SUBSCRIBER_FAILED"},{no:4,name:"RR_SWITCH_CANDIDATE"}]),QbA=GA.makeEnum("livekit.SubscriptionError",[{no:0,name:"SE_UNKNOWN"},{no:1,name:"SE_CODEC_UNSUPPORTED"},{no:2,name:"SE_TRACK_NOTFOUND"}]),br=GA.makeEnum("livekit.AudioTrackFeature",[{no:0,name:"TF_STEREO"},{no:1,name:"TF_NO_DTX"},{no:2,name:"TF_AUTO_GAIN_CONTROL"},{no:3,name:"TF_ECHO_CANCELLATION"},{no:4,name:"TF_NOISE_SUPPRESSION"},{no:5,name:"TF_ENHANCED_NOISE_CANCELLATION"},{no:6,name:"TF_PRECONNECT_BUFFER"}]),_H=GA.makeMessageType("livekit.Room",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"empty_timeout",kind:"scalar",T:13},{no:14,name:"departure_timeout",kind:"scalar",T:13},{no:4,name:"max_participants",kind:"scalar",T:13},{no:5,name:"creation_time",kind:"scalar",T:3},{no:15,name:"creation_time_ms",kind:"scalar",T:3},{no:6,name:"turn_password",kind:"scalar",T:9},{no:7,name:"enabled_codecs",kind:"message",T:qH,repeated:!0},{no:8,name:"metadata",kind:"scalar",T:9},{no:9,name:"num_participants",kind:"scalar",T:13},{no:11,name:"num_publishers",kind:"scalar",T:13},{no:10,name:"active_recording",kind:"scalar",T:8},{no:13,name:"version",kind:"message",T:g8}]),qH=GA.makeMessageType("livekit.Codec",()=>[{no:1,name:"mime",kind:"scalar",T:9},{no:2,name:"fmtp_line",kind:"scalar",T:9}]),bbA=GA.makeMessageType("livekit.ParticipantPermission",()=>[{no:1,name:"can_subscribe",kind:"scalar",T:8},{no:2,name:"can_publish",kind:"scalar",T:8},{no:3,name:"can_publish_data",kind:"scalar",T:8},{no:9,name:"can_publish_sources",kind:"enum",T:GA.getEnumType(Ms),repeated:!0},{no:7,name:"hidden",kind:"scalar",T:8},{no:8,name:"recorder",kind:"scalar",T:8},{no:10,name:"can_update_metadata",kind:"scalar",T:8},{no:11,name:"agent",kind:"scalar",T:8},{no:12,name:"can_subscribe_metrics",kind:"scalar",T:8}]),NG=GA.makeMessageType("livekit.ParticipantInfo",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"identity",kind:"scalar",T:9},{no:3,name:"state",kind:"enum",T:GA.getEnumType(ow)},{no:4,name:"tracks",kind:"message",T:cw,repeated:!0},{no:5,name:"metadata",kind:"scalar",T:9},{no:6,name:"joined_at",kind:"scalar",T:3},{no:17,name:"joined_at_ms",kind:"scalar",T:3},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"version",kind:"scalar",T:13},{no:11,name:"permission",kind:"message",T:bbA},{no:12,name:"region",kind:"scalar",T:9},{no:13,name:"is_publisher",kind:"scalar",T:8},{no:14,name:"kind",kind:"enum",T:GA.getEnumType(sC)},{no:15,name:"attributes",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:16,name:"disconnect_reason",kind:"enum",T:GA.getEnumType(wo)},{no:18,name:"kind_details",kind:"enum",T:GA.getEnumType(CbA),repeated:!0},{no:19,name:"data_tracks",kind:"message",T:$H,repeated:!0}]),ow=GA.makeEnum("livekit.ParticipantInfo.State",[{no:0,name:"JOINING"},{no:1,name:"JOINED"},{no:2,name:"ACTIVE"},{no:3,name:"DISCONNECTED"}]),sC=GA.makeEnum("livekit.ParticipantInfo.Kind",[{no:0,name:"STANDARD"},{no:1,name:"INGRESS"},{no:2,name:"EGRESS"},{no:3,name:"SIP"},{no:4,name:"AGENT"},{no:7,name:"CONNECTOR"},{no:8,name:"BRIDGE"}]),CbA=GA.makeEnum("livekit.ParticipantInfo.KindDetail",[{no:0,name:"CLOUD_AGENT"},{no:1,name:"FORWARDED"},{no:2,name:"CONNECTOR_WHATSAPP"},{no:3,name:"CONNECTOR_TWILIO"},{no:4,name:"BRIDGE_RTSP"}]),ln=GA.makeEnum("livekit.Encryption.Type",[{no:0,name:"NONE"},{no:1,name:"GCM"},{no:2,name:"CUSTOM"}]),vbA=GA.makeMessageType("livekit.SimulcastCodecInfo",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"mid",kind:"scalar",T:9},{no:3,name:"cid",kind:"scalar",T:9},{no:4,name:"layers",kind:"message",T:md,repeated:!0},{no:5,name:"video_layer_mode",kind:"enum",T:GA.getEnumType($V)},{no:6,name:"sdp_cid",kind:"scalar",T:9}]),cw=GA.makeMessageType("livekit.TrackInfo",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:GA.getEnumType(ho)},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"muted",kind:"scalar",T:8},{no:5,name:"width",kind:"scalar",T:13},{no:6,name:"height",kind:"scalar",T:13},{no:7,name:"simulcast",kind:"scalar",T:8},{no:8,name:"disable_dtx",kind:"scalar",T:8},{no:9,name:"source",kind:"enum",T:GA.getEnumType(Ms)},{no:10,name:"layers",kind:"message",T:md,repeated:!0},{no:11,name:"mime_type",kind:"scalar",T:9},{no:12,name:"mid",kind:"scalar",T:9},{no:13,name:"codecs",kind:"message",T:vbA,repeated:!0},{no:14,name:"stereo",kind:"scalar",T:8},{no:15,name:"disable_red",kind:"scalar",T:8},{no:16,name:"encryption",kind:"enum",T:GA.getEnumType(ln)},{no:17,name:"stream",kind:"scalar",T:9},{no:18,name:"version",kind:"message",T:g8},{no:19,name:"audio_features",kind:"enum",T:GA.getEnumType(br),repeated:!0},{no:20,name:"backup_codec_policy",kind:"enum",T:GA.getEnumType(qV)}]),$H=GA.makeMessageType("livekit.DataTrackInfo",()=>[{no:1,name:"pub_handle",kind:"scalar",T:13},{no:2,name:"sid",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"encryption",kind:"enum",T:GA.getEnumType(ln)}]),IbA=GA.makeMessageType("livekit.DataTrackSubscriptionOptions",()=>[{no:1,name:"target_fps",kind:"scalar",T:13,opt:!0}]),md=GA.makeMessageType("livekit.VideoLayer",()=>[{no:1,name:"quality",kind:"enum",T:GA.getEnumType(YZ)},{no:2,name:"width",kind:"scalar",T:13},{no:3,name:"height",kind:"scalar",T:13},{no:4,name:"bitrate",kind:"scalar",T:13},{no:5,name:"ssrc",kind:"scalar",T:13},{no:6,name:"spatial_layer",kind:"scalar",T:5},{no:7,name:"rid",kind:"scalar",T:9},{no:8,name:"repair_ssrc",kind:"scalar",T:13}]),$V=GA.makeEnum("livekit.VideoLayer.Mode",[{no:0,name:"MODE_UNUSED"},{no:1,name:"ONE_SPATIAL_LAYER_PER_STREAM"},{no:2,name:"MULTIPLE_SPATIAL_LAYERS_PER_STREAM"},{no:3,name:"ONE_SPATIAL_LAYER_PER_STREAM_INCOMPLETE_RTCP_SR"}]),wa=GA.makeMessageType("livekit.DataPacket",()=>[{no:1,name:"kind",kind:"enum",T:GA.getEnumType(zG)},{no:4,name:"participant_identity",kind:"scalar",T:9},{no:5,name:"destination_identities",kind:"scalar",T:9,repeated:!0},{no:2,name:"user",kind:"message",T:ZZ,oneof:"value"},{no:3,name:"speaker",kind:"message",T:pbA,oneof:"value"},{no:6,name:"sip_dtmf",kind:"message",T:n8,oneof:"value"},{no:7,name:"transcription",kind:"message",T:HbA,oneof:"value"},{no:8,name:"metrics",kind:"message",T:GbA,oneof:"value"},{no:9,name:"chat_message",kind:"message",T:Am,oneof:"value"},{no:10,name:"rpc_request",kind:"message",T:kZ,oneof:"value"},{no:11,name:"rpc_ack",kind:"message",T:UZ,oneof:"value"},{no:12,name:"rpc_response",kind:"message",T:DZ,oneof:"value"},{no:13,name:"stream_header",kind:"message",T:em,oneof:"value"},{no:14,name:"stream_chunk",kind:"message",T:tm,oneof:"value"},{no:15,name:"stream_trailer",kind:"message",T:nm,oneof:"value"},{no:18,name:"encrypted_packet",kind:"message",T:A8,oneof:"value"},{no:16,name:"sequence",kind:"scalar",T:13},{no:17,name:"participant_sid",kind:"scalar",T:9}]),zG=GA.makeEnum("livekit.DataPacket.Kind",[{no:0,name:"RELIABLE"},{no:1,name:"LOSSY"}]),A8=GA.makeMessageType("livekit.EncryptedPacket",()=>[{no:1,name:"encryption_type",kind:"enum",T:GA.getEnumType(ln)},{no:2,name:"iv",kind:"scalar",T:12},{no:3,name:"key_index",kind:"scalar",T:13},{no:4,name:"encrypted_value",kind:"scalar",T:12}]),e8=GA.makeMessageType("livekit.EncryptedPacketPayload",()=>[{no:1,name:"user",kind:"message",T:ZZ,oneof:"value"},{no:3,name:"chat_message",kind:"message",T:Am,oneof:"value"},{no:4,name:"rpc_request",kind:"message",T:kZ,oneof:"value"},{no:5,name:"rpc_ack",kind:"message",T:UZ,oneof:"value"},{no:6,name:"rpc_response",kind:"message",T:DZ,oneof:"value"},{no:7,name:"stream_header",kind:"message",T:em,oneof:"value"},{no:8,name:"stream_chunk",kind:"message",T:tm,oneof:"value"},{no:9,name:"stream_trailer",kind:"message",T:nm,oneof:"value"}]),pbA=GA.makeMessageType("livekit.ActiveSpeakerUpdate",()=>[{no:1,name:"speakers",kind:"message",T:t8,repeated:!0}]),t8=GA.makeMessageType("livekit.SpeakerInfo",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:2},{no:3,name:"active",kind:"scalar",T:8}]),ZZ=GA.makeMessageType("livekit.UserPacket",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:5,name:"participant_identity",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",T:12},{no:3,name:"destination_sids",kind:"scalar",T:9,repeated:!0},{no:6,name:"destination_identities",kind:"scalar",T:9,repeated:!0},{no:4,name:"topic",kind:"scalar",T:9,opt:!0},{no:8,name:"id",kind:"scalar",T:9,opt:!0},{no:9,name:"start_time",kind:"scalar",T:4,opt:!0},{no:10,name:"end_time",kind:"scalar",T:4,opt:!0},{no:11,name:"nonce",kind:"scalar",T:12}]),n8=GA.makeMessageType("livekit.SipDTMF",()=>[{no:3,name:"code",kind:"scalar",T:13},{no:4,name:"digit",kind:"scalar",T:9}]),HbA=GA.makeMessageType("livekit.Transcription",()=>[{no:2,name:"transcribed_participant_identity",kind:"scalar",T:9},{no:3,name:"track_id",kind:"scalar",T:9},{no:4,name:"segments",kind:"message",T:mbA,repeated:!0}]),mbA=GA.makeMessageType("livekit.TranscriptionSegment",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"start_time",kind:"scalar",T:4},{no:4,name:"end_time",kind:"scalar",T:4},{no:5,name:"final",kind:"scalar",T:8},{no:6,name:"language",kind:"scalar",T:9}]),Am=GA.makeMessageType("livekit.ChatMessage",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"timestamp",kind:"scalar",T:3},{no:3,name:"edit_timestamp",kind:"scalar",T:3,opt:!0},{no:4,name:"message",kind:"scalar",T:9},{no:5,name:"deleted",kind:"scalar",T:8},{no:6,name:"generated",kind:"scalar",T:8}]),kZ=GA.makeMessageType("livekit.RpcRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"method",kind:"scalar",T:9},{no:3,name:"payload",kind:"scalar",T:9},{no:4,name:"response_timeout_ms",kind:"scalar",T:13},{no:5,name:"version",kind:"scalar",T:13}]),UZ=GA.makeMessageType("livekit.RpcAck",()=>[{no:1,name:"request_id",kind:"scalar",T:9}]),DZ=GA.makeMessageType("livekit.RpcResponse",()=>[{no:1,name:"request_id",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",T:9,oneof:"value"},{no:3,name:"error",kind:"message",T:s8,oneof:"value"}]),s8=GA.makeMessageType("livekit.RpcError",()=>[{no:1,name:"code",kind:"scalar",T:13},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"data",kind:"scalar",T:9}]),r8=GA.makeMessageType("livekit.ParticipantTracks",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"track_sids",kind:"scalar",T:9,repeated:!0}]),a8=GA.makeMessageType("livekit.ServerInfo",()=>[{no:1,name:"edition",kind:"enum",T:GA.getEnumType(i8)},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"protocol",kind:"scalar",T:5},{no:4,name:"region",kind:"scalar",T:9},{no:5,name:"node_id",kind:"scalar",T:9},{no:6,name:"debug_info",kind:"scalar",T:9},{no:7,name:"agent_protocol",kind:"scalar",T:5}]),i8=GA.makeEnum("livekit.ServerInfo.Edition",[{no:0,name:"Standard"},{no:1,name:"Cloud"}]),B8=GA.makeMessageType("livekit.ClientInfo",()=>[{no:1,name:"sdk",kind:"enum",T:GA.getEnumType(o8)},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"protocol",kind:"scalar",T:5},{no:4,name:"os",kind:"scalar",T:9},{no:5,name:"os_version",kind:"scalar",T:9},{no:6,name:"device_model",kind:"scalar",T:9},{no:7,name:"browser",kind:"scalar",T:9},{no:8,name:"browser_version",kind:"scalar",T:9},{no:9,name:"address",kind:"scalar",T:9},{no:10,name:"network",kind:"scalar",T:9},{no:11,name:"other_sdks",kind:"scalar",T:9}]),o8=GA.makeEnum("livekit.ClientInfo.SDK",[{no:0,name:"UNKNOWN"},{no:1,name:"JS"},{no:2,name:"SWIFT"},{no:3,name:"ANDROID"},{no:4,name:"FLUTTER"},{no:5,name:"GO"},{no:6,name:"UNITY"},{no:7,name:"REACT_NATIVE"},{no:8,name:"RUST"},{no:9,name:"PYTHON"},{no:10,name:"CPP"},{no:11,name:"UNITY_WEB"},{no:12,name:"NODE"},{no:13,name:"UNREAL"},{no:14,name:"ESP32"}]),c8=GA.makeMessageType("livekit.ClientConfiguration",()=>[{no:1,name:"video",kind:"message",T:l8},{no:2,name:"screen",kind:"message",T:l8},{no:3,name:"resume_connection",kind:"enum",T:GA.getEnumType(nC)},{no:4,name:"disabled_codecs",kind:"message",T:EbA},{no:5,name:"force_relay",kind:"enum",T:GA.getEnumType(nC)}]),l8=GA.makeMessageType("livekit.VideoConfiguration",()=>[{no:1,name:"hardware_encoder",kind:"enum",T:GA.getEnumType(nC)}]),EbA=GA.makeMessageType("livekit.DisabledCodecs",()=>[{no:1,name:"codecs",kind:"message",T:qH,repeated:!0},{no:2,name:"publish",kind:"message",T:qH,repeated:!0}]),g8=GA.makeMessageType("livekit.TimedVersion",()=>[{no:1,name:"unix_micro",kind:"scalar",T:3},{no:2,name:"ticks",kind:"scalar",T:5}]),FZ=GA.makeEnum("livekit.DataStream.OperationType",[{no:0,name:"CREATE"},{no:1,name:"UPDATE"},{no:2,name:"DELETE"},{no:3,name:"REACTION"}]),d8=GA.makeMessageType("livekit.DataStream.TextHeader",()=>[{no:1,name:"operation_type",kind:"enum",T:GA.getEnumType(FZ)},{no:2,name:"version",kind:"scalar",T:5},{no:3,name:"reply_to_stream_id",kind:"scalar",T:9},{no:4,name:"attached_stream_ids",kind:"scalar",T:9,repeated:!0},{no:5,name:"generated",kind:"scalar",T:8}],{localName:"DataStream_TextHeader"}),u8=GA.makeMessageType("livekit.DataStream.ByteHeader",()=>[{no:1,name:"name",kind:"scalar",T:9}],{localName:"DataStream_ByteHeader"}),em=GA.makeMessageType("livekit.DataStream.Header",()=>[{no:1,name:"stream_id",kind:"scalar",T:9},{no:2,name:"timestamp",kind:"scalar",T:3},{no:3,name:"topic",kind:"scalar",T:9},{no:4,name:"mime_type",kind:"scalar",T:9},{no:5,name:"total_length",kind:"scalar",T:4,opt:!0},{no:7,name:"encryption_type",kind:"enum",T:GA.getEnumType(ln)},{no:8,name:"attributes",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:9,name:"text_header",kind:"message",T:d8,oneof:"content_header"},{no:10,name:"byte_header",kind:"message",T:u8,oneof:"content_header"}],{localName:"DataStream_Header"}),tm=GA.makeMessageType("livekit.DataStream.Chunk",()=>[{no:1,name:"stream_id",kind:"scalar",T:9},{no:2,name:"chunk_index",kind:"scalar",T:4},{no:3,name:"content",kind:"scalar",T:12},{no:4,name:"version",kind:"scalar",T:5},{no:5,name:"iv",kind:"scalar",T:12,opt:!0}],{localName:"DataStream_Chunk"}),nm=GA.makeMessageType("livekit.DataStream.Trailer",()=>[{no:1,name:"stream_id",kind:"scalar",T:9},{no:2,name:"reason",kind:"scalar",T:9},{no:3,name:"attributes",kind:"map",K:9,V:{kind:"scalar",T:9}}],{localName:"DataStream_Trailer"}),ybA=GA.makeMessageType("livekit.SubscribedAudioCodec",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"enabled",kind:"scalar",T:8}]),Qo=GA.makeEnum("livekit.SignalTarget",[{no:0,name:"PUBLISHER"},{no:1,name:"SUBSCRIBER"}]),MZ=GA.makeEnum("livekit.StreamState",[{no:0,name:"ACTIVE"},{no:1,name:"PAUSED"}]),YbA=GA.makeEnum("livekit.CandidateProtocol",[{no:0,name:"UDP"},{no:1,name:"TCP"},{no:2,name:"TLS"}]),ZbA=GA.makeMessageType("livekit.SignalRequest",()=>[{no:1,name:"offer",kind:"message",T:Ed,oneof:"message"},{no:2,name:"answer",kind:"message",T:Ed,oneof:"message"},{no:3,name:"trickle",kind:"message",T:sm,oneof:"message"},{no:4,name:"add_track",kind:"message",T:rC,oneof:"message"},{no:5,name:"mute",kind:"message",T:rm,oneof:"message"},{no:6,name:"subscription",kind:"message",T:am,oneof:"message"},{no:7,name:"track_setting",kind:"message",T:w8,oneof:"message"},{no:8,name:"leave",kind:"message",T:im,oneof:"message"},{no:10,name:"update_layers",kind:"message",T:b8,oneof:"message"},{no:11,name:"subscription_permission",kind:"message",T:I8,oneof:"message"},{no:12,name:"sync_state",kind:"message",T:zZ,oneof:"message"},{no:13,name:"simulate",kind:"message",T:yc,oneof:"message"},{no:14,name:"ping",kind:"scalar",T:3,oneof:"message"},{no:15,name:"update_metadata",kind:"message",T:WZ,oneof:"message"},{no:16,name:"ping_req",kind:"message",T:m8,oneof:"message"},{no:17,name:"update_audio_track",kind:"message",T:VZ,oneof:"message"},{no:18,name:"update_video_track",kind:"message",T:Q8,oneof:"message"},{no:19,name:"publish_data_track_request",kind:"message",T:PZ,oneof:"message"},{no:20,name:"unpublish_data_track_request",kind:"message",T:RZ,oneof:"message"},{no:21,name:"update_data_subscription",kind:"message",T:f8,oneof:"message"}]),G8=GA.makeMessageType("livekit.SignalResponse",()=>[{no:1,name:"join",kind:"message",T:FbA,oneof:"message"},{no:2,name:"answer",kind:"message",T:Ed,oneof:"message"},{no:3,name:"offer",kind:"message",T:Ed,oneof:"message"},{no:4,name:"trickle",kind:"message",T:sm,oneof:"message"},{no:5,name:"update",kind:"message",T:PbA,oneof:"message"},{no:6,name:"track_published",kind:"message",T:SZ,oneof:"message"},{no:8,name:"leave",kind:"message",T:im,oneof:"message"},{no:9,name:"mute",kind:"message",T:rm,oneof:"message"},{no:10,name:"speakers_changed",kind:"message",T:TbA,oneof:"message"},{no:11,name:"room_update",kind:"message",T:RbA,oneof:"message"},{no:12,name:"connection_quality",kind:"message",T:VbA,oneof:"message"},{no:13,name:"stream_state_update",kind:"message",T:NbA,oneof:"message"},{no:14,name:"subscribed_quality_update",kind:"message",T:LbA,oneof:"message"},{no:15,name:"subscription_permission_update",kind:"message",T:ObA,oneof:"message"},{no:16,name:"refresh_token",kind:"scalar",T:9,oneof:"message"},{no:17,name:"track_unpublished",kind:"message",T:xbA,oneof:"message"},{no:18,name:"pong",kind:"scalar",T:3,oneof:"message"},{no:19,name:"reconnect",kind:"message",T:MbA,oneof:"message"},{no:20,name:"pong_resp",kind:"message",T:KbA,oneof:"message"},{no:21,name:"subscription_response",kind:"message",T:qbA,oneof:"message"},{no:22,name:"request_response",kind:"message",T:$bA,oneof:"message"},{no:23,name:"track_subscribed",kind:"message",T:ACA,oneof:"message"},{no:24,name:"room_moved",kind:"message",T:JbA,oneof:"message"},{no:25,name:"media_sections_requirement",kind:"message",T:nCA,oneof:"message"},{no:26,name:"subscribed_audio_codec_update",kind:"message",T:XbA,oneof:"message"},{no:27,name:"publish_data_track_response",kind:"message",T:TZ,oneof:"message"},{no:28,name:"unpublish_data_track_response",kind:"message",T:kbA,oneof:"message"},{no:29,name:"data_track_subscriber_handles",kind:"message",T:UbA,oneof:"message"}]),xZ=GA.makeMessageType("livekit.SimulcastCodec",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"cid",kind:"scalar",T:9},{no:4,name:"layers",kind:"message",T:md,repeated:!0},{no:5,name:"video_layer_mode",kind:"enum",T:GA.getEnumType($V)}]),rC=GA.makeMessageType("livekit.AddTrackRequest",()=>[{no:1,name:"cid",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"type",kind:"enum",T:GA.getEnumType(ho)},{no:4,name:"width",kind:"scalar",T:13},{no:5,name:"height",kind:"scalar",T:13},{no:6,name:"muted",kind:"scalar",T:8},{no:7,name:"disable_dtx",kind:"scalar",T:8},{no:8,name:"source",kind:"enum",T:GA.getEnumType(Ms)},{no:9,name:"layers",kind:"message",T:md,repeated:!0},{no:10,name:"simulcast_codecs",kind:"message",T:xZ,repeated:!0},{no:11,name:"sid",kind:"scalar",T:9},{no:12,name:"stereo",kind:"scalar",T:8},{no:13,name:"disable_red",kind:"scalar",T:8},{no:14,name:"encryption",kind:"enum",T:GA.getEnumType(ln)},{no:15,name:"stream",kind:"scalar",T:9},{no:16,name:"backup_codec_policy",kind:"enum",T:GA.getEnumType(qV)},{no:17,name:"audio_features",kind:"enum",T:GA.getEnumType(br),repeated:!0}]),PZ=GA.makeMessageType("livekit.PublishDataTrackRequest",()=>[{no:1,name:"pub_handle",kind:"scalar",T:13},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"encryption",kind:"enum",T:GA.getEnumType(ln)}]),TZ=GA.makeMessageType("livekit.PublishDataTrackResponse",()=>[{no:1,name:"info",kind:"message",T:$H}]),RZ=GA.makeMessageType("livekit.UnpublishDataTrackRequest",()=>[{no:1,name:"pub_handle",kind:"scalar",T:13}]),kbA=GA.makeMessageType("livekit.UnpublishDataTrackResponse",()=>[{no:1,name:"info",kind:"message",T:$H}]),UbA=GA.makeMessageType("livekit.DataTrackSubscriberHandles",()=>[{no:1,name:"sub_handles",kind:"map",K:13,V:{kind:"message",T:DbA}}]),DbA=GA.makeMessageType("livekit.DataTrackSubscriberHandles.PublishedDataTrack",()=>[{no:1,name:"publisher_identity",kind:"scalar",T:9},{no:2,name:"publisher_sid",kind:"scalar",T:9},{no:3,name:"track_sid",kind:"scalar",T:9}],{localName:"DataTrackSubscriberHandles_PublishedDataTrack"}),sm=GA.makeMessageType("livekit.TrickleRequest",()=>[{no:1,name:"candidateInit",kind:"scalar",T:9},{no:2,name:"target",kind:"enum",T:GA.getEnumType(Qo)},{no:3,name:"final",kind:"scalar",T:8}]),rm=GA.makeMessageType("livekit.MuteTrackRequest",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"muted",kind:"scalar",T:8}]),FbA=GA.makeMessageType("livekit.JoinResponse",()=>[{no:1,name:"room",kind:"message",T:_H},{no:2,name:"participant",kind:"message",T:NG},{no:3,name:"other_participants",kind:"message",T:NG,repeated:!0},{no:4,name:"server_version",kind:"scalar",T:9},{no:5,name:"ice_servers",kind:"message",T:C8,repeated:!0},{no:6,name:"subscriber_primary",kind:"scalar",T:8},{no:7,name:"alternative_url",kind:"scalar",T:9},{no:8,name:"client_configuration",kind:"message",T:c8},{no:9,name:"server_region",kind:"scalar",T:9},{no:10,name:"ping_timeout",kind:"scalar",T:5},{no:11,name:"ping_interval",kind:"scalar",T:5},{no:12,name:"server_info",kind:"message",T:a8},{no:13,name:"sif_trailer",kind:"scalar",T:12},{no:14,name:"enabled_publish_codecs",kind:"message",T:qH,repeated:!0},{no:15,name:"fast_publish",kind:"scalar",T:8}]),MbA=GA.makeMessageType("livekit.ReconnectResponse",()=>[{no:1,name:"ice_servers",kind:"message",T:C8,repeated:!0},{no:2,name:"client_configuration",kind:"message",T:c8},{no:3,name:"server_info",kind:"message",T:a8},{no:4,name:"last_message_seq",kind:"scalar",T:13}]),SZ=GA.makeMessageType("livekit.TrackPublishedResponse",()=>[{no:1,name:"cid",kind:"scalar",T:9},{no:2,name:"track",kind:"message",T:cw}]),xbA=GA.makeMessageType("livekit.TrackUnpublishedResponse",()=>[{no:1,name:"track_sid",kind:"scalar",T:9}]),Ed=GA.makeMessageType("livekit.SessionDescription",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"sdp",kind:"scalar",T:9},{no:3,name:"id",kind:"scalar",T:13},{no:4,name:"mid_to_track_id",kind:"map",K:9,V:{kind:"scalar",T:9}}]),PbA=GA.makeMessageType("livekit.ParticipantUpdate",()=>[{no:1,name:"participants",kind:"message",T:NG,repeated:!0}]),am=GA.makeMessageType("livekit.UpdateSubscription",()=>[{no:1,name:"track_sids",kind:"scalar",T:9,repeated:!0},{no:2,name:"subscribe",kind:"scalar",T:8},{no:3,name:"participant_tracks",kind:"message",T:r8,repeated:!0}]),f8=GA.makeMessageType("livekit.UpdateDataSubscription",()=>[{no:1,name:"updates",kind:"message",T:h8,repeated:!0}]),h8=GA.makeMessageType("livekit.UpdateDataSubscription.Update",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"subscribe",kind:"scalar",T:8},{no:3,name:"options",kind:"message",T:IbA}],{localName:"UpdateDataSubscription_Update"}),w8=GA.makeMessageType("livekit.UpdateTrackSettings",()=>[{no:1,name:"track_sids",kind:"scalar",T:9,repeated:!0},{no:3,name:"disabled",kind:"scalar",T:8},{no:4,name:"quality",kind:"enum",T:GA.getEnumType(YZ)},{no:5,name:"width",kind:"scalar",T:13},{no:6,name:"height",kind:"scalar",T:13},{no:7,name:"fps",kind:"scalar",T:13},{no:8,name:"priority",kind:"scalar",T:13}]),VZ=GA.makeMessageType("livekit.UpdateLocalAudioTrack",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"features",kind:"enum",T:GA.getEnumType(br),repeated:!0}]),Q8=GA.makeMessageType("livekit.UpdateLocalVideoTrack",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"width",kind:"scalar",T:13},{no:3,name:"height",kind:"scalar",T:13}]),im=GA.makeMessageType("livekit.LeaveRequest",()=>[{no:1,name:"can_reconnect",kind:"scalar",T:8},{no:2,name:"reason",kind:"enum",T:GA.getEnumType(wo)},{no:3,name:"action",kind:"enum",T:GA.getEnumType(lw)},{no:4,name:"regions",kind:"message",T:jbA}]),lw=GA.makeEnum("livekit.LeaveRequest.Action",[{no:0,name:"DISCONNECT"},{no:1,name:"RESUME"},{no:2,name:"RECONNECT"}]),b8=GA.makeMessageType("livekit.UpdateVideoLayers",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"layers",kind:"message",T:md,repeated:!0}]),WZ=GA.makeMessageType("livekit.UpdateParticipantMetadata",()=>[{no:1,name:"metadata",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"attributes",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:4,name:"request_id",kind:"scalar",T:13}]),C8=GA.makeMessageType("livekit.ICEServer",()=>[{no:1,name:"urls",kind:"scalar",T:9,repeated:!0},{no:2,name:"username",kind:"scalar",T:9},{no:3,name:"credential",kind:"scalar",T:9}]),TbA=GA.makeMessageType("livekit.SpeakersChanged",()=>[{no:1,name:"speakers",kind:"message",T:t8,repeated:!0}]),RbA=GA.makeMessageType("livekit.RoomUpdate",()=>[{no:1,name:"room",kind:"message",T:_H}]),SbA=GA.makeMessageType("livekit.ConnectionQualityInfo",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"quality",kind:"enum",T:GA.getEnumType(tC)},{no:3,name:"score",kind:"scalar",T:2}]),VbA=GA.makeMessageType("livekit.ConnectionQualityUpdate",()=>[{no:1,name:"updates",kind:"message",T:SbA,repeated:!0}]),WbA=GA.makeMessageType("livekit.StreamStateInfo",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"track_sid",kind:"scalar",T:9},{no:3,name:"state",kind:"enum",T:GA.getEnumType(MZ)}]),NbA=GA.makeMessageType("livekit.StreamStateUpdate",()=>[{no:1,name:"stream_states",kind:"message",T:WbA,repeated:!0}]),NZ=GA.makeMessageType("livekit.SubscribedQuality",()=>[{no:1,name:"quality",kind:"enum",T:GA.getEnumType(YZ)},{no:2,name:"enabled",kind:"scalar",T:8}]),zbA=GA.makeMessageType("livekit.SubscribedCodec",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"qualities",kind:"message",T:NZ,repeated:!0}]),LbA=GA.makeMessageType("livekit.SubscribedQualityUpdate",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"subscribed_qualities",kind:"message",T:NZ,repeated:!0},{no:3,name:"subscribed_codecs",kind:"message",T:zbA,repeated:!0}]),XbA=GA.makeMessageType("livekit.SubscribedAudioCodecUpdate",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"subscribed_audio_codecs",kind:"message",T:ybA,repeated:!0}]),v8=GA.makeMessageType("livekit.TrackPermission",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"all_tracks",kind:"scalar",T:8},{no:3,name:"track_sids",kind:"scalar",T:9,repeated:!0},{no:4,name:"participant_identity",kind:"scalar",T:9}]),I8=GA.makeMessageType("livekit.SubscriptionPermission",()=>[{no:1,name:"all_participants",kind:"scalar",T:8},{no:2,name:"track_permissions",kind:"message",T:v8,repeated:!0}]),ObA=GA.makeMessageType("livekit.SubscriptionPermissionUpdate",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"track_sid",kind:"scalar",T:9},{no:3,name:"allowed",kind:"scalar",T:8}]),JbA=GA.makeMessageType("livekit.RoomMovedResponse",()=>[{no:1,name:"room",kind:"message",T:_H},{no:2,name:"token",kind:"scalar",T:9},{no:3,name:"participant",kind:"message",T:NG},{no:4,name:"other_participants",kind:"message",T:NG,repeated:!0}]),zZ=GA.makeMessageType("livekit.SyncState",()=>[{no:1,name:"answer",kind:"message",T:Ed},{no:2,name:"subscription",kind:"message",T:am},{no:3,name:"publish_tracks",kind:"message",T:SZ,repeated:!0},{no:4,name:"data_channels",kind:"message",T:H8,repeated:!0},{no:5,name:"offer",kind:"message",T:Ed},{no:6,name:"track_sids_disabled",kind:"scalar",T:9,repeated:!0},{no:7,name:"datachannel_receive_states",kind:"message",T:p8,repeated:!0},{no:8,name:"publish_data_tracks",kind:"message",T:TZ,repeated:!0}]),p8=GA.makeMessageType("livekit.DataChannelReceiveState",()=>[{no:1,name:"publisher_sid",kind:"scalar",T:9},{no:2,name:"last_seq",kind:"scalar",T:13}]),H8=GA.makeMessageType("livekit.DataChannelInfo",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:13},{no:3,name:"target",kind:"enum",T:GA.getEnumType(Qo)}]),yc=GA.makeMessageType("livekit.SimulateScenario",()=>[{no:1,name:"speaker_update",kind:"scalar",T:5,oneof:"scenario"},{no:2,name:"node_failure",kind:"scalar",T:8,oneof:"scenario"},{no:3,name:"migration",kind:"scalar",T:8,oneof:"scenario"},{no:4,name:"server_leave",kind:"scalar",T:8,oneof:"scenario"},{no:5,name:"switch_candidate_protocol",kind:"enum",T:GA.getEnumType(YbA),oneof:"scenario"},{no:6,name:"subscriber_bandwidth",kind:"scalar",T:3,oneof:"scenario"},{no:7,name:"disconnect_signal_on_resume",kind:"scalar",T:8,oneof:"scenario"},{no:8,name:"disconnect_signal_on_resume_no_messages",kind:"scalar",T:8,oneof:"scenario"},{no:9,name:"leave_request_full_reconnect",kind:"scalar",T:8,oneof:"scenario"}]),m8=GA.makeMessageType("livekit.Ping",()=>[{no:1,name:"timestamp",kind:"scalar",T:3},{no:2,name:"rtt",kind:"scalar",T:3}]),KbA=GA.makeMessageType("livekit.Pong",()=>[{no:1,name:"last_ping_timestamp",kind:"scalar",T:3},{no:2,name:"timestamp",kind:"scalar",T:3}]),jbA=GA.makeMessageType("livekit.RegionSettings",()=>[{no:1,name:"regions",kind:"message",T:_bA,repeated:!0}]),_bA=GA.makeMessageType("livekit.RegionInfo",()=>[{no:1,name:"region",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"distance",kind:"scalar",T:3}]),qbA=GA.makeMessageType("livekit.SubscriptionResponse",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"err",kind:"enum",T:GA.getEnumType(QbA)}]),$bA=GA.makeMessageType("livekit.RequestResponse",()=>[{no:1,name:"request_id",kind:"scalar",T:13},{no:2,name:"reason",kind:"enum",T:GA.getEnumType(LG)},{no:3,name:"message",kind:"scalar",T:9},{no:4,name:"trickle",kind:"message",T:sm,oneof:"request"},{no:5,name:"add_track",kind:"message",T:rC,oneof:"request"},{no:6,name:"mute",kind:"message",T:rm,oneof:"request"},{no:7,name:"update_metadata",kind:"message",T:WZ,oneof:"request"},{no:8,name:"update_audio_track",kind:"message",T:VZ,oneof:"request"},{no:9,name:"update_video_track",kind:"message",T:Q8,oneof:"request"},{no:10,name:"publish_data_track",kind:"message",T:PZ,oneof:"request"},{no:11,name:"unpublish_data_track",kind:"message",T:RZ,oneof:"request"}]),LG=GA.makeEnum("livekit.RequestResponse.Reason",[{no:0,name:"OK"},{no:1,name:"NOT_FOUND"},{no:2,name:"NOT_ALLOWED"},{no:3,name:"LIMIT_EXCEEDED"},{no:4,name:"QUEUED"},{no:5,name:"UNSUPPORTED_TYPE"},{no:6,name:"UNCLASSIFIED_ERROR"},{no:7,name:"INVALID_HANDLE"},{no:8,name:"INVALID_NAME"},{no:9,name:"DUPLICATE_HANDLE"},{no:10,name:"DUPLICATE_NAME"}]),ACA=GA.makeMessageType("livekit.TrackSubscribed",()=>[{no:1,name:"track_sid",kind:"scalar",T:9}]),E8=GA.makeMessageType("livekit.ConnectionSettings",()=>[{no:1,name:"auto_subscribe",kind:"scalar",T:8},{no:2,name:"adaptive_stream",kind:"scalar",T:8},{no:3,name:"subscriber_allow_pause",kind:"scalar",T:8,opt:!0},{no:4,name:"disable_ice_lite",kind:"scalar",T:8},{no:5,name:"auto_subscribe_data_track",kind:"scalar",T:8,opt:!0}]),eCA=GA.makeMessageType("livekit.JoinRequest",()=>[{no:1,name:"client_info",kind:"message",T:B8},{no:2,name:"connection_settings",kind:"message",T:E8},{no:3,name:"metadata",kind:"scalar",T:9},{no:4,name:"participant_attributes",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:5,name:"add_track_requests",kind:"message",T:rC,repeated:!0},{no:6,name:"publisher_offer",kind:"message",T:Ed},{no:7,name:"reconnect",kind:"scalar",T:8},{no:8,name:"reconnect_reason",kind:"enum",T:GA.getEnumType(WG)},{no:9,name:"participant_sid",kind:"scalar",T:9},{no:10,name:"sync_state",kind:"message",T:zZ}]),tCA=GA.makeMessageType("livekit.WrappedJoinRequest",()=>[{no:1,name:"compression",kind:"enum",T:GA.getEnumType(LZ)},{no:2,name:"join_request",kind:"scalar",T:12}]),LZ=GA.makeEnum("livekit.WrappedJoinRequest.Compression",[{no:0,name:"NONE"},{no:1,name:"GZIP"}]),nCA=GA.makeMessageType("livekit.MediaSectionsRequirement",()=>[{no:1,name:"num_audios",kind:"scalar",T:13},{no:2,name:"num_videos",kind:"scalar",T:13}]);function sCA(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bm={exports:{}},rCA=Bm.exports,y8;function aCA(){return y8||(y8=1,(function(e){(function(A,t){e.exports?e.exports=t():A.log=t()})(rCA,function(){var A=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),s=["trace","debug","info","warn","error"],r={},a=null;function B(E,m){var Z=E[m];if(typeof Z.bind=="function")return Z.bind(E);try{return Function.prototype.bind.call(Z,E)}catch{return function(){return Function.prototype.apply.apply(Z,[E,arguments])}}}function c(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(E){return E==="debug"&&(E="log"),typeof console===t?!1:E==="trace"&&n?c:console[E]!==void 0?B(console,E):console.log!==void 0?B(console,"log"):A}function g(){for(var E=this.getLevel(),m=0;m<s.length;m++){var Z=s[m];this[Z]=m<E?A:this.methodFactory(Z,E,this.name)}if(this.log=this.debug,typeof console===t&&E<this.levels.SILENT)return"No console available for logging"}function u(E){return function(){typeof console!==t&&(g.call(this),this[E].apply(this,arguments))}}function f(E,m,Z){return l(E)||u.apply(this,arguments)}function w(E,m){var Z=this,D,T,S,F="loglevel";typeof E=="string"?F+=":"+E:typeof E=="symbol"&&(F=void 0);function V(rA){var iA=(s[rA]||"silent").toUpperCase();if(!(typeof window===t||!F)){try{window.localStorage[F]=iA;return}catch{}try{window.document.cookie=encodeURIComponent(F)+"="+iA+";"}catch{}}}function N(){var rA;if(!(typeof window===t||!F)){try{rA=window.localStorage[F]}catch{}if(typeof rA===t)try{var iA=window.document.cookie,hA=encodeURIComponent(F),fA=iA.indexOf(hA+"=");fA!==-1&&(rA=/^([^;]+)/.exec(iA.slice(fA+hA.length+1))[1])}catch{}return Z.levels[rA]===void 0&&(rA=void 0),rA}}function X(){if(!(typeof window===t||!F)){try{window.localStorage.removeItem(F)}catch{}try{window.document.cookie=encodeURIComponent(F)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function eA(rA){var iA=rA;if(typeof iA=="string"&&Z.levels[iA.toUpperCase()]!==void 0&&(iA=Z.levels[iA.toUpperCase()]),typeof iA=="number"&&iA>=0&&iA<=Z.levels.SILENT)return iA;throw new TypeError("log.setLevel() called with invalid level: "+rA)}Z.name=E,Z.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},Z.methodFactory=m||f,Z.getLevel=function(){return S??T??D},Z.setLevel=function(rA,iA){return S=eA(rA),iA!==!1&&V(S),g.call(Z)},Z.setDefaultLevel=function(rA){T=eA(rA),N()||Z.setLevel(rA,!1)},Z.resetLevel=function(){S=null,X(),g.call(Z)},Z.enableAll=function(rA){Z.setLevel(Z.levels.TRACE,rA)},Z.disableAll=function(rA){Z.setLevel(Z.levels.SILENT,rA)},Z.rebuild=function(){if(a!==Z&&(D=eA(a.getLevel())),g.call(Z),a===Z)for(var rA in r)r[rA].rebuild()},D=eA(a?a.getLevel():"WARN");var $=N();$!=null&&(S=eA($)),g.call(Z)}a=new w,a.getLogger=function(m){if(typeof m!="symbol"&&typeof m!="string"||m==="")throw new TypeError("You must supply a name when creating a logger.");var Z=r[m];return Z||(Z=r[m]=new w(m,a.methodFactory)),Z};var v=typeof window!==t?window.log:void 0;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=v),a},a.getLoggers=function(){return r},a.default=a,a})})(Bm)),Bm.exports}var om=aCA(),XZ;(function(e){e[e.trace=0]="trace",e[e.debug=1]="debug",e[e.info=2]="info",e[e.warn=3]="warn",e[e.error=4]="error",e[e.silent=5]="silent"})(XZ||(XZ={}));var Kr;(function(e){e.Default="livekit",e.Room="livekit-room",e.TokenSource="livekit-token-source",e.Participant="livekit-participant",e.Track="livekit-track",e.Publication="livekit-track-publication",e.Engine="livekit-engine",e.Signal="livekit-signal",e.PCManager="livekit-pc-manager",e.PCTransport="livekit-pc-transport",e.E2EE="lk-e2ee",e.DataTracks="livekit-data-tracks"})(Kr||(Kr={}));let Se=om.getLogger("livekit");Object.values(Kr).map(e=>om.getLogger(e)),Se.setDefaultLevel(XZ.info);function $a(e){const A=om.getLogger(e);return A.setDefaultLevel(Se.getLevel()),A}const iCA=om.getLogger("lk-e2ee"),aC=7e3,BCA=[0,300,4*300,9*300,16*300,aC,aC,aC,aC,aC];class oCA{constructor(A){this._retryDelays=A!==void 0?[...A]:BCA}nextRetryDelayInMs(A){if(A.retryCount>=this._retryDelays.length)return null;const t=this._retryDelays[A.retryCount];return A.retryCount<=1?t:t+Math.random()*1e3}}function cCA(e,A){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&A.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)A.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(t[n[s]]=e[n[s]]);return t}function nA(e,A,t,n){function s(r){return r instanceof t?r:new t(function(a){a(r)})}return new(t||(t=Promise))(function(r,a){function B(g){try{l(n.next(g))}catch(u){a(u)}}function c(g){try{l(n.throw(g))}catch(u){a(u)}}function l(g){g.done?r(g.value):s(g.value).then(B,c)}l((n=n.apply(e,A||[])).next())})}function Y8(e){var A=typeof Symbol=="function"&&Symbol.iterator,t=A&&e[A],n=0;if(t)return t.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")}function gw(e){return this instanceof gw?(this.v=e,this):new gw(e)}function lCA(e,A,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(e,A||[]),s,r=[];return s=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),B("next"),B("throw"),B("return",a),s[Symbol.asyncIterator]=function(){return this},s;function a(w){return function(v){return Promise.resolve(v).then(w,u)}}function B(w,v){n[w]&&(s[w]=function(E){return new Promise(function(m,Z){r.push([w,E,m,Z])>1||c(w,E)})},v&&(s[w]=v(s[w])))}function c(w,v){try{l(n[w](v))}catch(E){f(r[0][3],E)}}function l(w){w.value instanceof gw?Promise.resolve(w.value.v).then(g,u):f(r[0][2],w)}function g(w){c("next",w)}function u(w){c("throw",w)}function f(w,v){w(v),r.shift(),r.length&&c(r[0][0],r[0][1])}}function gCA(e){var A,t;return A={},n("next"),n("throw",function(s){throw s}),n("return"),A[Symbol.iterator]=function(){return this},A;function n(s,r){A[s]=e[s]?function(a){return(t=!t)?{value:gw(e[s](a)),done:!1}:r?r(a):a}:r}}function bo(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var A=e[Symbol.asyncIterator],t;return A?A.call(e):(e=typeof Y8=="function"?Y8(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(a){return new Promise(function(B,c){a=e[r](a),s(B,c,a.done,a.value)})}}function s(r,a,B,c){Promise.resolve(c).then(function(l){r({value:l,done:B})},a)}}typeof SuppressedError=="function"&&SuppressedError;var cm={exports:{}},Z8;function dCA(){if(Z8)return cm.exports;Z8=1;var e=typeof Reflect=="object"?Reflect:null,A=e&&typeof e.apply=="function"?e.apply:function(F,V,N){return Function.prototype.apply.call(F,V,N)},t;e&&typeof e.ownKeys=="function"?t=e.ownKeys:Object.getOwnPropertySymbols?t=function(F){return Object.getOwnPropertyNames(F).concat(Object.getOwnPropertySymbols(F))}:t=function(F){return Object.getOwnPropertyNames(F)};function n(S){console&&console.warn&&console.warn(S)}var s=Number.isNaN||function(F){return F!==F};function r(){r.init.call(this)}cm.exports=r,cm.exports.once=Z,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var a=10;function B(S){if(typeof S!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof S)}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(S){if(typeof S!="number"||S<0||s(S))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+S+".");a=S}}),r.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},r.prototype.setMaxListeners=function(F){if(typeof F!="number"||F<0||s(F))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+F+".");return this._maxListeners=F,this};function c(S){return S._maxListeners===void 0?r.defaultMaxListeners:S._maxListeners}r.prototype.getMaxListeners=function(){return c(this)},r.prototype.emit=function(F){for(var V=[],N=1;N<arguments.length;N++)V.push(arguments[N]);var X=F==="error",eA=this._events;if(eA!==void 0)X=X&&eA.error===void 0;else if(!X)return!1;if(X){var $;if(V.length>0&&($=V[0]),$ instanceof Error)throw $;var rA=new Error("Unhandled error."+($?" ("+$.message+")":""));throw rA.context=$,rA}var iA=eA[F];if(iA===void 0)return!1;if(typeof iA=="function")A(iA,this,V);else for(var hA=iA.length,fA=v(iA,hA),N=0;N<hA;++N)A(fA[N],this,V);return!0};function l(S,F,V,N){var X,eA,$;if(B(V),eA=S._events,eA===void 0?(eA=S._events=Object.create(null),S._eventsCount=0):(eA.newListener!==void 0&&(S.emit("newListener",F,V.listener?V.listener:V),eA=S._events),$=eA[F]),$===void 0)$=eA[F]=V,++S._eventsCount;else if(typeof $=="function"?$=eA[F]=N?[V,$]:[$,V]:N?$.unshift(V):$.push(V),X=c(S),X>0&&$.length>X&&!$.warned){$.warned=!0;var rA=new Error("Possible EventEmitter memory leak detected. "+$.length+" "+String(F)+" listeners added. Use emitter.setMaxListeners() to increase limit");rA.name="MaxListenersExceededWarning",rA.emitter=S,rA.type=F,rA.count=$.length,n(rA)}return S}r.prototype.addListener=function(F,V){return l(this,F,V,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(F,V){return l(this,F,V,!0)};function g(){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(S,F,V){var N={fired:!1,wrapFn:void 0,target:S,type:F,listener:V},X=g.bind(N);return X.listener=V,N.wrapFn=X,X}r.prototype.once=function(F,V){return B(V),this.on(F,u(this,F,V)),this},r.prototype.prependOnceListener=function(F,V){return B(V),this.prependListener(F,u(this,F,V)),this},r.prototype.removeListener=function(F,V){var N,X,eA,$,rA;if(B(V),X=this._events,X===void 0)return this;if(N=X[F],N===void 0)return this;if(N===V||N.listener===V)--this._eventsCount===0?this._events=Object.create(null):(delete X[F],X.removeListener&&this.emit("removeListener",F,N.listener||V));else if(typeof N!="function"){for(eA=-1,$=N.length-1;$>=0;$--)if(N[$]===V||N[$].listener===V){rA=N[$].listener,eA=$;break}if(eA<0)return this;eA===0?N.shift():E(N,eA),N.length===1&&(X[F]=N[0]),X.removeListener!==void 0&&this.emit("removeListener",F,rA||V)}return this},r.prototype.off=r.prototype.removeListener,r.prototype.removeAllListeners=function(F){var V,N,X;if(N=this._events,N===void 0)return this;if(N.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):N[F]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete N[F]),this;if(arguments.length===0){var eA=Object.keys(N),$;for(X=0;X<eA.length;++X)$=eA[X],$!=="removeListener"&&this.removeAllListeners($);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(V=N[F],typeof V=="function")this.removeListener(F,V);else if(V!==void 0)for(X=V.length-1;X>=0;X--)this.removeListener(F,V[X]);return this};function f(S,F,V){var N=S._events;if(N===void 0)return[];var X=N[F];return X===void 0?[]:typeof X=="function"?V?[X.listener||X]:[X]:V?m(X):v(X,X.length)}r.prototype.listeners=function(F){return f(this,F,!0)},r.prototype.rawListeners=function(F){return f(this,F,!1)},r.listenerCount=function(S,F){return typeof S.listenerCount=="function"?S.listenerCount(F):w.call(S,F)},r.prototype.listenerCount=w;function w(S){var F=this._events;if(F!==void 0){var V=F[S];if(typeof V=="function")return 1;if(V!==void 0)return V.length}return 0}r.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function v(S,F){for(var V=new Array(F),N=0;N<F;++N)V[N]=S[N];return V}function E(S,F){for(;F+1<S.length;F++)S[F]=S[F+1];S.pop()}function m(S){for(var F=new Array(S.length),V=0;V<F.length;++V)F[V]=S[V].listener||S[V];return F}function Z(S,F){return new Promise(function(V,N){function X($){S.removeListener(F,eA),N($)}function eA(){typeof S.removeListener=="function"&&S.removeListener("error",X),V([].slice.call(arguments))}T(S,F,eA,{once:!0}),F!=="error"&&D(S,X,{once:!0})})}function D(S,F,V){typeof S.on=="function"&&T(S,"error",F,V)}function T(S,F,V,N){if(typeof S.on=="function")N.once?S.once(F,V):S.on(F,V);else if(typeof S.addEventListener=="function")S.addEventListener(F,function X(eA){N.once&&S.removeEventListener(F,X),V(eA)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof S)}return cm.exports}var bB=dCA();let k8=!0,U8=!0;function iC(e,A,t){const n=e.match(A);return n&&n.length>=t&&parseFloat(n[t],10)}function XG(e,A,t){if(!e.RTCPeerConnection)return;const n=e.RTCPeerConnection.prototype,s=n.addEventListener;n.addEventListener=function(a,B){if(a!==A)return s.apply(this,arguments);const c=l=>{const g=t(l);g&&(B.handleEvent?B.handleEvent(g):B(g))};return this._eventMap=this._eventMap||{},this._eventMap[A]||(this._eventMap[A]=new Map),this._eventMap[A].set(B,c),s.apply(this,[a,c])};const r=n.removeEventListener;n.removeEventListener=function(a,B){if(a!==A||!this._eventMap||!this._eventMap[A])return r.apply(this,arguments);if(!this._eventMap[A].has(B))return r.apply(this,arguments);const c=this._eventMap[A].get(B);return this._eventMap[A].delete(B),this._eventMap[A].size===0&&delete this._eventMap[A],Object.keys(this._eventMap).length===0&&delete this._eventMap,r.apply(this,[a,c])},Object.defineProperty(n,"on"+A,{get(){return this["_on"+A]},set(a){this["_on"+A]&&(this.removeEventListener(A,this["_on"+A]),delete this["_on"+A]),a&&this.addEventListener(A,this["_on"+A]=a)},enumerable:!0,configurable:!0})}function uCA(e){return typeof e!="boolean"?new Error("Argument type: "+typeof e+". Please use a boolean."):(k8=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function GCA(e){return typeof e!="boolean"?new Error("Argument type: "+typeof e+". Please use a boolean."):(U8=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function D8(){if(typeof window=="object"){if(k8)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function OZ(e,A){U8&&console.warn(e+" is deprecated, please use "+A+" instead.")}function fCA(e){const A={browser:null,version:null};if(typeof e>"u"||!e.navigator||!e.navigator.userAgent)return A.browser="Not a browser.",A;const{navigator:t}=e;if(t.userAgentData&&t.userAgentData.brands){const n=t.userAgentData.brands.find(s=>s.brand==="Chromium");if(n)return{browser:"chrome",version:parseInt(n.version,10)}}if(t.mozGetUserMedia)A.browser="firefox",A.version=parseInt(iC(t.userAgent,/Firefox\/(\d+)\./,1));else if(t.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)A.browser="chrome",A.version=parseInt(iC(t.userAgent,/Chrom(e|ium)\/(\d+)\./,2));else if(e.RTCPeerConnection&&t.userAgent.match(/AppleWebKit\/(\d+)\./))A.browser="safari",A.version=parseInt(iC(t.userAgent,/AppleWebKit\/(\d+)\./,1)),A.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,A._safariVersion=iC(t.userAgent,/Version\/(\d+(\.?\d+))/,1);else return A.browser="Not a supported browser.",A;return A}function F8(e){return Object.prototype.toString.call(e)==="[object Object]"}function M8(e){return F8(e)?Object.keys(e).reduce(function(A,t){const n=F8(e[t]),s=n?M8(e[t]):e[t],r=n&&!Object.keys(s).length;return s===void 0||r?A:Object.assign(A,{[t]:s})},{}):e}function JZ(e,A,t){!A||t.has(A.id)||(t.set(A.id,A),Object.keys(A).forEach(n=>{n.endsWith("Id")?JZ(e,e.get(A[n]),t):n.endsWith("Ids")&&A[n].forEach(s=>{JZ(e,e.get(s),t)})}))}function x8(e,A,t){const n=t?"outbound-rtp":"inbound-rtp",s=new Map;if(A===null)return s;const r=[];return e.forEach(a=>{a.type==="track"&&a.trackIdentifier===A.id&&r.push(a)}),r.forEach(a=>{e.forEach(B=>{B.type===n&&B.trackId===a.id&&JZ(e,B,s)})}),s}const P8=D8;function T8(e,A){const t=e&&e.navigator;if(!t.mediaDevices)return;const n=function(B){if(typeof B!="object"||B.mandatory||B.optional)return B;const c={};return Object.keys(B).forEach(l=>{if(l==="require"||l==="advanced"||l==="mediaSource")return;const g=typeof B[l]=="object"?B[l]:{ideal:B[l]};g.exact!==void 0&&typeof g.exact=="number"&&(g.min=g.max=g.exact);const u=function(f,w){return f?f+w.charAt(0).toUpperCase()+w.slice(1):w==="deviceId"?"sourceId":w};if(g.ideal!==void 0){c.optional=c.optional||[];let f={};typeof g.ideal=="number"?(f[u("min",l)]=g.ideal,c.optional.push(f),f={},f[u("max",l)]=g.ideal,c.optional.push(f)):(f[u("",l)]=g.ideal,c.optional.push(f))}g.exact!==void 0&&typeof g.exact!="number"?(c.mandatory=c.mandatory||{},c.mandatory[u("",l)]=g.exact):["min","max"].forEach(f=>{g[f]!==void 0&&(c.mandatory=c.mandatory||{},c.mandatory[u(f,l)]=g[f])})}),B.advanced&&(c.optional=(c.optional||[]).concat(B.advanced)),c},s=function(B,c){if(A.version>=61)return c(B);if(B=JSON.parse(JSON.stringify(B)),B&&typeof B.audio=="object"){const l=function(g,u,f){u in g&&!(f in g)&&(g[f]=g[u],delete g[u])};B=JSON.parse(JSON.stringify(B)),l(B.audio,"autoGainControl","googAutoGainControl"),l(B.audio,"noiseSuppression","googNoiseSuppression"),B.audio=n(B.audio)}if(B&&typeof B.video=="object"){let l=B.video.facingMode;l=l&&(typeof l=="object"?l:{ideal:l});const g=A.version<66;if(l&&(l.exact==="user"||l.exact==="environment"||l.ideal==="user"||l.ideal==="environment")&&!(t.mediaDevices.getSupportedConstraints&&t.mediaDevices.getSupportedConstraints().facingMode&&!g)){delete B.video.facingMode;let u;if(l.exact==="environment"||l.ideal==="environment"?u=["back","rear"]:(l.exact==="user"||l.ideal==="user")&&(u=["front"]),u)return t.mediaDevices.enumerateDevices().then(f=>{f=f.filter(v=>v.kind==="videoinput");let w=f.find(v=>u.some(E=>v.label.toLowerCase().includes(E)));return!w&&f.length&&u.includes("back")&&(w=f[f.length-1]),w&&(B.video.deviceId=l.exact?{exact:w.deviceId}:{ideal:w.deviceId}),B.video=n(B.video),P8("chrome: "+JSON.stringify(B)),c(B)})}B.video=n(B.video)}return P8("chrome: "+JSON.stringify(B)),c(B)},r=function(B){return A.version>=64?B:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[B.name]||B.name,message:B.message,constraint:B.constraint||B.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}},a=function(B,c,l){s(B,g=>{t.webkitGetUserMedia(g,c,u=>{l&&l(r(u))})})};if(t.getUserMedia=a.bind(t),t.mediaDevices.getUserMedia){const B=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(c){return s(c,l=>B(l).then(g=>{if(l.audio&&!g.getAudioTracks().length||l.video&&!g.getVideoTracks().length)throw g.getTracks().forEach(u=>{u.stop()}),new DOMException("","NotFoundError");return g},g=>Promise.reject(r(g))))}}}function R8(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function S8(e){if(typeof e=="object"&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(t){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=t)},enumerable:!0,configurable:!0});const A=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=n=>{n.stream.addEventListener("addtrack",s=>{let r;e.RTCPeerConnection.prototype.getReceivers?r=this.getReceivers().find(B=>B.track&&B.track.id===s.track.id):r={track:s.track};const a=new Event("track");a.track=s.track,a.receiver=r,a.transceiver={receiver:r},a.streams=[n.stream],this.dispatchEvent(a)}),n.stream.getTracks().forEach(s=>{let r;e.RTCPeerConnection.prototype.getReceivers?r=this.getReceivers().find(B=>B.track&&B.track.id===s.id):r={track:s};const a=new Event("track");a.track=s,a.receiver=r,a.transceiver={receiver:r},a.streams=[n.stream],this.dispatchEvent(a)})},this.addEventListener("addstream",this._ontrackpoly)),A.apply(this,arguments)}}else XG(e,"track",A=>(A.transceiver||Object.defineProperty(A,"transceiver",{value:{receiver:A.receiver}}),A))}function V8(e){if(typeof e=="object"&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const A=function(s,r){return{track:r,get dtmf(){return this._dtmf===void 0&&(r.kind==="audio"?this._dtmf=s.createDTMFSender(r):this._dtmf=null),this._dtmf},_pc:s}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const s=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(B,c){let l=s.apply(this,arguments);return l||(l=A(this,B),this._senders.push(l)),l};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(B){r.apply(this,arguments);const c=this._senders.indexOf(B);c!==-1&&this._senders.splice(c,1)}}const t=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(r){this._senders=this._senders||[],t.apply(this,[r]),r.getTracks().forEach(a=>{this._senders.push(A(this,a))})};const n=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(r){this._senders=this._senders||[],n.apply(this,[r]),r.getTracks().forEach(a=>{const B=this._senders.find(c=>c.track===a);B&&this._senders.splice(this._senders.indexOf(B),1)})}}else if(typeof e=="object"&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const A=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const n=A.apply(this,[]);return n.forEach(s=>s._pc=this),n},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function W8(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const r=t.apply(this,[]);return r.forEach(a=>a._pc=this),r});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const r=n.apply(this,arguments);return r._pc=this,r}),e.RTCRtpSender.prototype.getStats=function(){const r=this;return this._pc.getStats().then(a=>x8(a,r.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const s=t.apply(this,[]);return s.forEach(r=>r._pc=this),s}),XG(e,"track",n=>(n.receiver._pc=n.srcElement,n)),e.RTCRtpReceiver.prototype.getStats=function(){const s=this;return this._pc.getStats().then(r=>x8(r,s.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype))return;const A=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const n=arguments[0];let s,r,a;return this.getSenders().forEach(B=>{B.track===n&&(s?a=!0:s=B)}),this.getReceivers().forEach(B=>(B.track===n&&(r?a=!0:r=B),B.track===n)),a||s&&r?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):s?s.getStats():r?r.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return A.apply(this,arguments)}}function N8(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(a=>this._shimmedLocalStreams[a][0])};const A=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(a,B){if(!B)return A.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const c=A.apply(this,arguments);return this._shimmedLocalStreams[B.id]?this._shimmedLocalStreams[B.id].indexOf(c)===-1&&this._shimmedLocalStreams[B.id].push(c):this._shimmedLocalStreams[B.id]=[B,c],c};const t=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(a){this._shimmedLocalStreams=this._shimmedLocalStreams||{},a.getTracks().forEach(l=>{if(this.getSenders().find(u=>u.track===l))throw new DOMException("Track already exists.","InvalidAccessError")});const B=this.getSenders();t.apply(this,arguments);const c=this.getSenders().filter(l=>B.indexOf(l)===-1);this._shimmedLocalStreams[a.id]=[a].concat(c)};const n=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(a){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[a.id],n.apply(this,arguments)};const s=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(a){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},a&&Object.keys(this._shimmedLocalStreams).forEach(B=>{const c=this._shimmedLocalStreams[B].indexOf(a);c!==-1&&this._shimmedLocalStreams[B].splice(c,1),this._shimmedLocalStreams[B].length===1&&delete this._shimmedLocalStreams[B]}),s.apply(this,arguments)}}function z8(e,A){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&A.version>=65)return N8(e);const t=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const g=t.apply(this);return this._reverseStreams=this._reverseStreams||{},g.map(u=>this._reverseStreams[u.id])};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(g){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},g.getTracks().forEach(u=>{if(this.getSenders().find(w=>w.track===u))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[g.id]){const u=new e.MediaStream(g.getTracks());this._streams[g.id]=u,this._reverseStreams[u.id]=g,g=u}n.apply(this,[g])};const s=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(g){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},s.apply(this,[this._streams[g.id]||g]),delete this._reverseStreams[this._streams[g.id]?this._streams[g.id].id:g.id],delete this._streams[g.id]},e.RTCPeerConnection.prototype.addTrack=function(g,u){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const f=[].slice.call(arguments,1);if(f.length!==1||!f[0].getTracks().find(E=>E===g))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(E=>E.track===g))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const v=this._streams[u.id];if(v)v.addTrack(g),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const E=new e.MediaStream([g]);this._streams[u.id]=E,this._reverseStreams[E.id]=u,this.addStream(E)}return this.getSenders().find(E=>E.track===g)};function r(l,g){let u=g.sdp;return Object.keys(l._reverseStreams||[]).forEach(f=>{const w=l._reverseStreams[f],v=l._streams[w.id];u=u.replace(new RegExp(v.id,"g"),w.id)}),new RTCSessionDescription({type:g.type,sdp:u})}function a(l,g){let u=g.sdp;return Object.keys(l._reverseStreams||[]).forEach(f=>{const w=l._reverseStreams[f],v=l._streams[w.id];u=u.replace(new RegExp(w.id,"g"),v.id)}),new RTCSessionDescription({type:g.type,sdp:u})}["createOffer","createAnswer"].forEach(function(l){const g=e.RTCPeerConnection.prototype[l],u={[l](){const f=arguments;return arguments.length&&typeof arguments[0]=="function"?g.apply(this,[v=>{const E=r(this,v);f[0].apply(null,[E])},v=>{f[1]&&f[1].apply(null,v)},arguments[2]]):g.apply(this,arguments).then(v=>r(this,v))}};e.RTCPeerConnection.prototype[l]=u[l]});const B=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type?B.apply(this,arguments):(arguments[0]=a(this,arguments[0]),B.apply(this,arguments))};const c=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const l=c.get.apply(this);return l.type===""?l:r(this,l)}}),e.RTCPeerConnection.prototype.removeTrack=function(g){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!g._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(g._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};let f;Object.keys(this._streams).forEach(w=>{this._streams[w].getTracks().find(E=>g.track===E)&&(f=this._streams[w])}),f&&(f.getTracks().length===1?this.removeStream(this._reverseStreams[f.id]):f.removeTrack(g.track),this.dispatchEvent(new Event("negotiationneeded")))}}function KZ(e,A){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&A.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],s={[t](){return arguments[0]=new(t==="addIceCandidate"?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=s[t]})}function L8(e,A){XG(e,"negotiationneeded",t=>{const n=t.target;if(!((A.version<72||n.getConfiguration&&n.getConfiguration().sdpSemantics==="plan-b")&&n.signalingState!=="stable"))return t})}var X8=Object.freeze({__proto__:null,fixNegotiationNeeded:L8,shimAddTrackRemoveTrack:z8,shimAddTrackRemoveTrackWithNative:N8,shimGetSendersWithDtmf:V8,shimGetUserMedia:T8,shimMediaStream:R8,shimOnTrack:S8,shimPeerConnection:KZ,shimSenderReceiverGetStats:W8});function O8(e,A){const t=e&&e.navigator,n=e&&e.MediaStreamTrack;if(t.getUserMedia=function(s,r,a){OZ("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),t.mediaDevices.getUserMedia(s).then(r,a)},!(A.version>55&&"autoGainControl"in t.mediaDevices.getSupportedConstraints())){const s=function(a,B,c){B in a&&!(c in a)&&(a[c]=a[B],delete a[B])},r=t.mediaDevices.getUserMedia.bind(t.mediaDevices);if(t.mediaDevices.getUserMedia=function(a){return typeof a=="object"&&typeof a.audio=="object"&&(a=JSON.parse(JSON.stringify(a)),s(a.audio,"autoGainControl","mozAutoGainControl"),s(a.audio,"noiseSuppression","mozNoiseSuppression")),r(a)},n&&n.prototype.getSettings){const a=n.prototype.getSettings;n.prototype.getSettings=function(){const B=a.apply(this,arguments);return s(B,"mozAutoGainControl","autoGainControl"),s(B,"mozNoiseSuppression","noiseSuppression"),B}}if(n&&n.prototype.applyConstraints){const a=n.prototype.applyConstraints;n.prototype.applyConstraints=function(B){return this.kind==="audio"&&typeof B=="object"&&(B=JSON.parse(JSON.stringify(B)),s(B,"autoGainControl","mozAutoGainControl"),s(B,"noiseSuppression","mozNoiseSuppression")),a.apply(this,[B])}}}}function hCA(e,A){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!(n&&n.video)){const s=new DOMException("getDisplayMedia without video constraints is undefined");return s.name="NotFoundError",s.code=8,Promise.reject(s)}return n.video===!0?n.video={mediaSource:A}:n.video.mediaSource=A,e.navigator.mediaDevices.getUserMedia(n)})}function J8(e){typeof e=="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function jZ(e,A){if(typeof e!="object"||!(e.RTCPeerConnection||e.mozRTCPeerConnection))return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),A.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(s){const r=e.RTCPeerConnection.prototype[s],a={[s](){return arguments[0]=new(s==="addIceCandidate"?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),r.apply(this,arguments)}};e.RTCPeerConnection.prototype[s]=a[s]});const t={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},n=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[r,a,B]=arguments;return n.apply(this,[r||null]).then(c=>{if(A.version<53&&!a)try{c.forEach(l=>{l.type=t[l.type]||l.type})}catch(l){if(l.name!=="TypeError")throw l;c.forEach((g,u)=>{c.set(u,Object.assign({},g,{type:t[g.type]||g.type}))})}return c}).then(a,B)}}function K8(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const A=e.RTCPeerConnection.prototype.getSenders;A&&(e.RTCPeerConnection.prototype.getSenders=function(){const s=A.apply(this,[]);return s.forEach(r=>r._pc=this),s});const t=e.RTCPeerConnection.prototype.addTrack;t&&(e.RTCPeerConnection.prototype.addTrack=function(){const s=t.apply(this,arguments);return s._pc=this,s}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function j8(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const A=e.RTCPeerConnection.prototype.getReceivers;A&&(e.RTCPeerConnection.prototype.getReceivers=function(){const n=A.apply(this,[]);return n.forEach(s=>s._pc=this),n}),XG(e,"track",t=>(t.receiver._pc=t.srcElement,t)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function _8(e){!e.RTCPeerConnection||"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(t){OZ("removeStream","removeTrack"),this.getSenders().forEach(n=>{n.track&&t.getTracks().includes(n.track)&&this.removeTrack(n)})})}function q8(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function $8(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const A=e.RTCPeerConnection.prototype.addTransceiver;A&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let n=arguments[1]&&arguments[1].sendEncodings;n===void 0&&(n=[]),n=[...n];const s=n.length>0;s&&n.forEach(a=>{if("rid"in a&&!/^[a-z0-9]{0,16}$/i.test(a.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in a&&!(parseFloat(a.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in a&&!(parseFloat(a.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const r=A.apply(this,arguments);if(s){const{sender:a}=r,B=a.getParameters();(!("encodings"in B)||B.encodings.length===1&&Object.keys(B.encodings[0]).length===0)&&(B.encodings=n,a.sendEncodings=n,this.setParametersPromises.push(a.setParameters(B).then(()=>{delete a.sendEncodings}).catch(()=>{delete a.sendEncodings})))}return r})}function AW(e){if(!(typeof e=="object"&&e.RTCRtpSender))return;const A=e.RTCRtpSender.prototype.getParameters;A&&(e.RTCRtpSender.prototype.getParameters=function(){const n=A.apply(this,arguments);return"encodings"in n||(n.encodings=[].concat(this.sendEncodings||[{}])),n})}function eW(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const A=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>A.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):A.apply(this,arguments)}}function tW(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const A=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>A.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):A.apply(this,arguments)}}var nW=Object.freeze({__proto__:null,shimAddTransceiver:$8,shimCreateAnswer:tW,shimCreateOffer:eW,shimGetDisplayMedia:hCA,shimGetParameters:AW,shimGetUserMedia:O8,shimOnTrack:J8,shimPeerConnection:jZ,shimRTCDataChannel:q8,shimReceiverGetStats:j8,shimRemoveStream:_8,shimSenderGetStats:K8});function sW(e){if(!(typeof e!="object"||!e.RTCPeerConnection)){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const A=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(n){this._localStreams||(this._localStreams=[]),this._localStreams.includes(n)||this._localStreams.push(n),n.getAudioTracks().forEach(s=>A.call(this,s,n)),n.getVideoTracks().forEach(s=>A.call(this,s,n))},e.RTCPeerConnection.prototype.addTrack=function(n){for(var s=arguments.length,r=new Array(s>1?s-1:0),a=1;a<s;a++)r[a-1]=arguments[a];return r&&r.forEach(B=>{this._localStreams?this._localStreams.includes(B)||this._localStreams.push(B):this._localStreams=[B]}),A.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(t){this._localStreams||(this._localStreams=[]);const n=this._localStreams.indexOf(t);if(n===-1)return;this._localStreams.splice(n,1);const s=t.getTracks();this.getSenders().forEach(r=>{s.includes(r.track)&&this.removeTrack(r)})})}}function rW(e){if(!(typeof e!="object"||!e.RTCPeerConnection)&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(t){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=t),this.addEventListener("track",this._onaddstreampoly=n=>{n.streams.forEach(s=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(s))return;this._remoteStreams.push(s);const r=new Event("addstream");r.stream=s,this.dispatchEvent(r)})})}});const A=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const n=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(s){s.streams.forEach(r=>{if(n._remoteStreams||(n._remoteStreams=[]),n._remoteStreams.indexOf(r)>=0)return;n._remoteStreams.push(r);const a=new Event("addstream");a.stream=r,n.dispatchEvent(a)})}),A.apply(n,arguments)}}}function aW(e){if(typeof e!="object"||!e.RTCPeerConnection)return;const A=e.RTCPeerConnection.prototype,t=A.createOffer,n=A.createAnswer,s=A.setLocalDescription,r=A.setRemoteDescription,a=A.addIceCandidate;A.createOffer=function(l,g){const u=arguments.length>=2?arguments[2]:arguments[0],f=t.apply(this,[u]);return g?(f.then(l,g),Promise.resolve()):f},A.createAnswer=function(l,g){const u=arguments.length>=2?arguments[2]:arguments[0],f=n.apply(this,[u]);return g?(f.then(l,g),Promise.resolve()):f};let B=function(c,l,g){const u=s.apply(this,[c]);return g?(u.then(l,g),Promise.resolve()):u};A.setLocalDescription=B,B=function(c,l,g){const u=r.apply(this,[c]);return g?(u.then(l,g),Promise.resolve()):u},A.setRemoteDescription=B,B=function(c,l,g){const u=a.apply(this,[c]);return g?(u.then(l,g),Promise.resolve()):u},A.addIceCandidate=B}function iW(e){const A=e&&e.navigator;if(A.mediaDevices&&A.mediaDevices.getUserMedia){const t=A.mediaDevices,n=t.getUserMedia.bind(t);A.mediaDevices.getUserMedia=s=>n(BW(s))}!A.getUserMedia&&A.mediaDevices&&A.mediaDevices.getUserMedia&&(A.getUserMedia=(function(n,s,r){A.mediaDevices.getUserMedia(n).then(s,r)}).bind(A))}function BW(e){return e&&e.video!==void 0?Object.assign({},e,{video:M8(e.video)}):e}function oW(e){if(!e.RTCPeerConnection)return;const A=e.RTCPeerConnection;e.RTCPeerConnection=function(n,s){if(n&&n.iceServers){const r=[];for(let a=0;a<n.iceServers.length;a++){let B=n.iceServers[a];B.urls===void 0&&B.url?(OZ("RTCIceServer.url","RTCIceServer.urls"),B=JSON.parse(JSON.stringify(B)),B.urls=B.url,delete B.url,r.push(B)):r.push(n.iceServers[a])}n.iceServers=r}return new A(n,s)},e.RTCPeerConnection.prototype=A.prototype,"generateCertificate"in A&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get(){return A.generateCertificate}})}function cW(e){typeof e=="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function lW(e){const A=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(n){if(n){typeof n.offerToReceiveAudio<"u"&&(n.offerToReceiveAudio=!!n.offerToReceiveAudio);const s=this.getTransceivers().find(a=>a.receiver.track.kind==="audio");n.offerToReceiveAudio===!1&&s?s.direction==="sendrecv"?s.setDirection?s.setDirection("sendonly"):s.direction="sendonly":s.direction==="recvonly"&&(s.setDirection?s.setDirection("inactive"):s.direction="inactive"):n.offerToReceiveAudio===!0&&!s&&this.addTransceiver("audio",{direction:"recvonly"}),typeof n.offerToReceiveVideo<"u"&&(n.offerToReceiveVideo=!!n.offerToReceiveVideo);const r=this.getTransceivers().find(a=>a.receiver.track.kind==="video");n.offerToReceiveVideo===!1&&r?r.direction==="sendrecv"?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":r.direction==="recvonly"&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):n.offerToReceiveVideo===!0&&!r&&this.addTransceiver("video",{direction:"recvonly"})}return A.apply(this,arguments)}}function gW(e){typeof e!="object"||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var dW=Object.freeze({__proto__:null,shimAudioContext:gW,shimCallbacksAPI:aW,shimConstraints:BW,shimCreateOfferLegacy:lW,shimGetUserMedia:iW,shimLocalStreamsAPI:sW,shimRTCIceServerUrls:oW,shimRemoteStreamsAPI:rW,shimTrackEventTransceiver:cW}),_Z={exports:{}},uW;function wCA(){return uW||(uW=1,(function(e){const A={};A.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},A.localCName=A.generateIdentifier(),A.splitLines=function(t){return t.trim().split(`
99
99
  `).map(n=>n.trim())},A.splitSections=function(t){return t.split(`
100
100
  m=`).map((s,r)=>(r>0?"m="+s:s).trim()+`\r