1/*! For license information please see main.fa795440.js.LICENSE.txt */ 2(()=>{var e={5834:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});n(5043);const r=n.p+"static/media/neuralward.5bbbed4644507afc40508cfccee3b808.svg"},9357:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(5043),i=n(1675),s=n(7663),o=n(5472),a=n(8556),l=n(6823),c=n(5662),u=n(579);const h=e=>{let{providedBanInfo:t=null}=e;const n=(0,i.Zp)(),h=(0,i.zy)(),{user:d,isBanned:f,banInfo:p,signOut:m}=(0,a.Jd)(),[g,v]=(0,r.useState)(300),[y,b]=(0,r.useState)(!1),[w,x]=(0,r.useState)(null),[S,E]=(0,r.useState)({message:"",contactInfo:""}),[k,T]=(0,r.useState)(!1),[_,C]=(0,r.useState)(null),[A,I]=(0,r.useState)(!0),P=t||p||{reason:"Violation of platform terms",timestamp:new Date,banType:"Account"};(0,r.useEffect)((()=>{"/banned"===h.pathname&&(f||t)&&sessionStorage.setItem("userIsBanned","true")}),[h.pathname,f,t]),(0,r.useEffect)((()=>{f||t||sessionStorage.getItem("userIsBanned")||n("/")}),[f,t,n]),(0,r.useEffect)((()=>{const e=localStorage.getItem("bannedUserAppeal");if(e)try{const t=JSON.parse(e);x(t),b(!0)}catch(t){console.error("Error parsing stored appeal:",t)}}),[]),(0,r.useEffect)((()=>{(async()=>{if(null!==d&&void 0!==d&&d.uid)try{const t=["banAppeals","appealRequests","appeals"];let n=[];for(const r of t)try{const e=(0,o.query)((0,o.collection)(c.db,r),(0,o.where)("userId","==",d.uid));(await(0,o.getDocs)(e)).forEach((e=>{n.push({id:e.id,...e.data()})}))}catch(e){console.log(`Could not check ${r}:`,e)}if(n.length>0&&(n.sort(((e,t)=>{var n,r,i,s;const o=(null===(n=e.createdAt)||void 0===n||null===(r=n.toDate)||void 0===r?void 0:r.call(n))||e.timestamp||new Date(0);return((null===(i=t.createdAt)||void 0===i||null===(s=i.toDate)||void 0===s?void 0:s.call(i))||t.timestamp||new Date(0))-o})),n.length>0)){const e=n[0];x(e),b(!0),localStorage.setItem("bannedUserAppeal",JSON.stringify(e))}}catch(t){console.error("Error checking for existing appeals:",t)}finally{I(!1)}else I(!1)})()}),[d]),(0,r.useEffect)((()=>(()=>{const e=localStorage.getItem("banScreenEndTime");let t;if(e){const n=parseInt(e,10),r=Date.now();n&&!isNaN(n)&&n>r?t=n:(t=Date.now()+3e5,localStorage.setItem("banScreenEndTime",t.toString()))}else t=Date.now()+3e5,localStorage.setItem("banScreenEndTime",t.toString());sessionStorage.setItem("userIsBanned","true");const r=()=>{const e=Date.now(),r=Math.max(0,Math.floor((t-e)/1e3));if(v(r),r<=0){clearInterval(i),localStorage.removeItem("banScreenEndTime"),localStorage.removeItem("bannedUserAppeal"),sessionStorage.removeItem("userIsBanned");(async()=>{try{await m(),n("/")}catch(e){console.error("Error signing out:",e),window.location.href="/"}})()}};r();const i=setInterval(r,1e3);return()=>clearInterval(i)})()),[n,m]);const N=e=>{if(!e)return"Unknown";let t;if(e.toDate)t=e.toDate();else if(e instanceof Date)t=e;else{if("object"!==typeof e||!e.seconds)return"Unknown";t=new o.Timestamp(e.seconds,e.nanoseconds).toDate()}return t.toLocaleDateString()+" at "+t.toLocaleTimeString()},R=e=>{const{name:t,value:n}=e.target;E((e=>({...e,[t]:n})))};return(0,u.jsx)(s.P.div,{initial:{opacity:0}
2,animate:{opacity:1},exit:{opacity:0},className:"min-h-screen bg-red-50 flex flex-col items-center justify-center p-4",children:(0,u.jsxs)("div",{className:"max-w-md w-full bg-white rounded-xl shadow-lg overflow-hidden",children:[(0,u.jsxs)("div",{className:"bg-red-600 py-6 text-center",children:[(0,u.jsx)("div",{className:"flex justify-center mb-2",children:(0,u.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),(0,u.jsx)("h1",{className:"text-2xl font-bold text-white",children:"Account Suspended"})]}),(0,u.jsxs)("div",{className:"p-6",children:[(0,u.jsxs)("div",{className:"mb-6",children:[(0,u.jsx)("p",{className:"text-gray-700 mb-4",children:"Your account has been suspended and you no longer have access to this platform."}),(0,u.jsxs)("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 mb-4",children:[(0,u.jsx)("h3",{className:"font-medium text-gray-900 mb-2",children:"Suspension Details"}),(0,u.jsxs)("p",{className:"text-sm text-gray-600 mb-1",children:[(0,u.jsx)("span",{className:"font-medium",children:"Reason:"})," ",(null===P||void 0===P?void 0:P.reason)||"Violation of platform terms"]}),(0,u.jsxs)("p",{className:"text-sm text-gray-600 mb-1",children:[(0,u.jsx)("span",{className:"font-medium",children:"Date:"})," ",null!==P&&void 0!==P&&P.timestamp?N(P.timestamp):"Unknown"]})]})]}),A?(0,u.jsxs)("div",{className:"text-center py-4",children:[(0,u.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-indigo-600 mx-auto"}),(0,u.jsx)("p",{className:"mt-2 text-gray-600",children:"Loading appeal information..."})]}):y?(0,u.jsx)("div",{className:"border-t border-gray-200 pt-4",children:(0,u.jsxs)("div",{className:"py-4",children:[(0,u.jsx)("div",{className:"text-green-500 mb-2 text-center",children:(0,u.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-12 w-12 mx-auto",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,u.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,u.jsx)("h3",{className:"text-lg font-medium text-gray-900 mb-2 text-center",children:"Appeal Submitted"}),(0,u.jsx)("p",{className:"text-gray-600 mb-4 text-center",children:"Our team will review your request."}),w&&(0,u.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4 mt-4",children:[(0,u.jsx)("h4",{className:"font-medium text-gray-900 mb-2",children:"Your Appeal"}),(0,u.jsxs)("div",{className:"text-sm text-gray-600",children:[(0,u.jsxs)("p",{className:"mb-2",children:[(0,u.jsx)("span",{className:"font-medium",children:"Status:"})," ",(0,u.jsx)("span",{className:"capitalize px-2 py-0.5 rounded-full text-xs "+("approved"===w.status?"bg-green-100 text-green-800":"rejected"===w.status?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"),children:w.status||"pending"})]}),(0,u.jsxs)("p",{className:"mb-2",children:[(0,u.jsx)("span",{className:"font-medium",children:"Submitted on:"})," ",w.timestamp?w.timestamp instanceof Date?w.timestamp.toLocaleString():N(w.timestamp):"Recently"]}),(0,u.jsx)("p",{className:"mb-2",children:(0,u.jsx)("span",{className:"font-medium",children:"Your message:"})}),(0,u.jsx)("div",{className:"bg-white p-3 rounded border border-gray-200 mb-2",children:w.message}),(0,u.jsxs)("p",{className:"mb-2",children:[(0,u.jsx)("span",{className:"font-medium",children:"Contact info:"})," ",w.contactInfo]}),w.notes&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("p",{className:"mt-4 font-medium text-gray-900",children:"Admin Response:"}),(0,u.jsx)("div",{className:"bg-white p-3 rounded border border-gray-200 mt-1",children:w.notes})]})]})]})]})}):(0,u.jsxs)("div",{className:"border-t border-gray-200 pt-4",children:[(0,u.jsx)("h3",{className:"text-lg font-medium text-gray-900 mb-3",children:"Request Appeal"}),(0,u.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),T(!0),C(null);try{const e=null===d||void 0===d?void 0:d.uid,t={type:"system",title:"Ban Appeal Request",message:S.message,contactInfo:S.contactInfo,timestamp:new Date,status:"pending",userId:e||null,userEmail:(null===d||void 0===d?void 0:d.email)||null,banInfo:P},n=await l.A.createAdminNotification(t),r={...t,id:n.id};localStorage.setItem("bannedUserAppeal",JSON.stringify(r)),b(!0),x(r),E({message:"",contactInfo:""})}catch(t){console.error("Error submitting appeal:",t),C("Failed to submit your appeal. Please try again later.")}finally{T(!1)}},children:[(0,u.jsxs)("div",{className:"mb-4",children:[(0,u.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Why should your account be reinstated?"}),(0,u.jsx)("textarea",{name:"message",rows:"3",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500",value:S.message,onChange:R,required:!0,placeholder:"Please provide details about why you believe this ban should be reviewed...",disabled:k})]}),(0,u.jsxs)("div",{className:"mb-4",children:[(0,u.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Contact information (email or phone)"}),(0,u.jsx)("input",{type:"text",name:"contactInfo",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500",value:S.contactInfo,onChange:R,required:!0,placeholder:"Where can we reach you?",disabled:k})]}),_&&(0,u.jsx)("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg text-red-700 text-sm",children:_}),(0,u.jsx)("button",{type:"submit",className:"w-full bg-indigo-600 text-white py-2 px-4 roun
2ded-lg hover:bg-indigo-700 transition-colors disabled:opacity-50",disabled:k,children:k?(0,u.jsxs)("span",{className:"flex items-center justify-center",children:[(0,u.jsxs)("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,u.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,u.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Submitting..."]}):"Submit Appeal"})]})]}),(0,u.jsxs)("div",{className:"mt-6",children:[(0,u.jsx)("div",{className:"text-center text-sm text-gray-500 mb-2",children:(0,u.jsxs)("p",{children:["You will be signed out in"," ",(0,u.jsxs)("span",{className:"font-medium",children:[Math.floor(g/60),":",(g%60).toString().padStart(2,"0")]})]})}),(0,u.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-2.5",children:(0,u.jsx)("div",{className:"bg-brandAlt h-2.5 rounded-full transition-all duration-1000",style:{width:g/300*100+"%"}})})]})]})]})})}},2267:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(5043),i=n(7663),s=n(5834),o=n(579);const a=e=>{let{isHovered:t}=e;const[n,a]=(0,r.useState)(0);return(0,r.useEffect)((()=>{t&&a((e=>e+360))}),[t]),(0,o.jsx)("div",{className:"relative flex items-center justify-center cursor-pointer perspective-1000 mr-2",style:{minWidth:"32px",minHeight:"32px"},children:(0,o.jsxs)(i.P.div,{className:"relative preserve-3d",animate:{rotateY:n,scale:t?1.1:1},transition:{rotateY:{duration:.96,ease:[.76,0,.24,1]},scale:{duration:.3,ease:"easeOut"}},children:[(0,o.jsx)("img",{src:s.A,alt:"",width:40,height:40,className:"h-10 w-10 drop-shadow-[0_0_15px_rgba(64,44,127,0.3)]",style:{minWidth:"32px",minHeight:"32px"},"aria-hidden":"true"}),(0,o.jsx)("div",{className:"absolute inset-0 bg-[#402c7f]/10 rounded-full blur-2xl backface-hidden",style:{transform:"rotateY(180deg)"}})]})})},l="\u30a2\u30a4\u30a6\u30a8\u30aa\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e6\u30e8\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f2\u30f3",c=e=>{let{char:t,isHovered:n,index:i,totalLength:s}=e;const[a,c]=(0,r.useState)(t);return(0,r.useEffect)((()=>{if(n){let e=0;const n=i/Math.max(1,s-1),r=Math.round(5+27*(1-Math.pow(1-n,1.5))),o=setInterval((()=>{e++,e>=r?(c(t),clearInterval(o)):c(l[Math.floor(46*Math.random())])}),30);return()=>clearInterval(o)}c(t)}),[n,t,i,s]),(0,o.jsxs)("span",{className:"relative inline-flex items-center justify-center",children:[(0,o.jsx)("span",{className:"invisible",children:t}),(0,o.jsx)("span",{className:"absolute",style:{color:a!==t?"#ee2a7b":void 0},children:a})]})},u=e=>{let{text:t,isHovered:n}=e;const r=t.split("");return(0,o.jsx)("div",{className:"flex animate-brand-text",children:r.map(((e,t)=>(0,o.jsx)(c,{char:e,isHovered:n,index:t,totalLength:r.length},t)))})},h=e=>{let{isHovered:t}=e;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("style",{children:"\n .perspective-1000 { perspective: 1000px; }\n .perspective-500 { perspective: 500px; }\n .preserve-3d { transform-style: preserve-3d; }\n .backface-hidden { backface-visibility: hidden; }\n \n @keyframes slideInBrandText {\n 0% { opacity: 0; transform: translateX(-20px); }\n 100% { opacity: 1; transform: translateX(0); }\n }\n .animate-brand-text {\n animation: slideInBrandText 0.5s ease-out 0.2s both;\n }\n "}),(0,o.jsx)(a,{isHovered:t}),(0,o.jsx)(u,{text:"neuralward",isHovered:t})]})}},9621:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(5043),i=n(1675),s=n(7663),o=n(3546),a=n(9247),l=n(8556),c=n(579);const u=e=>{let{isActive:t,children:n}=e;return(0,c.jsxs)("div",{className:"relative",children:[n,t&&(0,c.jsx)(s.P.div,{className:"absolute bottom-0 left-0 w-full h-0.5 bg-brandAccent",initial:{scaleX:0},animate:{scaleX:1},exit:{scaleX:0},transition:{duration:.2},layoutId:"dropdown-indicator"})]})},h=e=>{let{isOpen:t,onClick:n,className:r=""}=e;return(0,c.jsx)("button",{className:`lg:hidden p-2 text-brandPrimary hover:text-brandAccent transition-colors z-10 ${r}`,onClick:n,"aria-label":t?"Close menu":"Open menu",children:(0,c.jsxs)("div",{className:"relative w-6 h-6",children:[(0,c.jsx)(s.P.span,{className:"absolute bg-current roun
2ded-full w-6",style:{height:"2px",top:"0px",transformOrigin:"center"},animate:{y:t?8:0,rotate:t?45:0},transition:{duration:.3}}),(0,c.jsx)(s.P.span,{className:"absolute bg-current rounded-full w-6",style:{height:"2px",top:"8px"},animate:{opacity:t?0:1},transition:{duration:.3}}),(0,c.jsx)(s.P.span,{className:"absolute bg-current rounded-full w-6",style:{height:"2px",top:"16px",transformOrigin:"center"},animate:{y:t?-8:0,rotate:t?-45:0},transition:{duration:.3}})]})})};var d=n(2267);const f=(0,r.lazy)((()=>n.e(7196).then(n.bind(n,7196)))),p=(0,r.lazy)((()=>n.e(5596).then(n.bind(n,5596)))),m=(0,r.lazy)((()=>Promise.all([n.e(3611),n.e(1557),n.e(4953)]).then(n.bind(n,4953)))),g=()=>{const[e,t]=(0,r.useState)(!1),[n,g]=(0,r.useState)(!1),[v,y]=(0,r.useState)(null),[b,w]=(0,r.useState)(!1),[x,S]=(0,r.useState)(!1),E=(0,r.useRef)(!1),[k,T]=(0,r.useState)(null),_=(0,r.useRef)(0),C=(0,i.zy)(),A=(0,i.Zp)(),{user:I}=(0,l.Jd)(),P=(0,r.useRef)(null),N=(0,r.useRef)(null),R=(0,r.useRef)(null),D=(0,r.useRef)(!1),O=(0,r.useMemo)((()=>["overview","services","features","future","appcenter"]),[]),j=(0,r.useCallback)((()=>_.current>80?64:96),[]),L=(0,a.A)(O,j,20,!1,null),M=["/","/overview","/services","/features","/future","/appcenter"].includes(C.pathname),F=k||(M?"future"===L?"features":L:null),U=(0,r.useRef)(null);(0,r.useEffect)((()=>{const e=U.current;if(U.current=L,M)if(null===L){if(null===e)return;clearTimeout(R.current),T(null),"/"!==window.location.pathname&&window.history.replaceState(null,"","/")}else{const e=`/${L}`;window.location.pathname!==e&&window.history.replaceState(null,"",e)}}),[L,M]),(0,r.useEffect)((()=>{const e=()=>{const e=window.scrollY;_.current=e;const t=e>80;g((e=>e===t?e:t))},t=e=>{P.current&&!P.current.contains(e.target)&&y(null)},n=()=>{y(null)};return window.addEventListener("scroll",e,{passive:!0}),document.addEventListener("mousedown",t),window.addEventListener("resize",n),()=>{window.removeEventListener("scroll",e),document.removeEventListener("mousedown",t),window.removeEventListener("resize",n),clearTimeout(N.current),clearTimeout(R.current)}}),[]),(0,r.useEffect)((()=>{const e=e=>{e.target===document.body&&y(null)},t=()=>y(null);return document.body.addEventListener("mouseenter",e),document.addEventListener("mouseleave",t),()=>{document.body.removeEventListener("mouseenter",e),document.removeEventListener("mouseleave",t)}}),[]),(0,r.useEffect)((()=>{t(!1),y(null)}),[C.pathname]);const V=(e,t,n)=>{if(e.preventDefault(),y(null),!M)return void A(t);window.history.replaceState(null,"",t);T("future"===n?"features":n),clearTimeout(R.current);const r=document.getElementById(n);if(r){const e=r.getBoundingClientRect().top+window.pageYOffset;let t;if("overview"===n){const n=window.innerWidth<768?160:224;t=Math.max(0,e-n-150)}else t=Math.max(0,e-j()-20);window.scrollTo({top:t,behavior:"smooth"})}R.current=setTimeout((()=>{T(null)}),1e3)},z=e=>{D.current||(D.current=!0,v===e?y(null):null!==v?(y(null),setTimeout((()=>{y(e),D.current=!1}),50)):y(e),setTimeout((()=>{D.current=!1}),100))},B=e=>{clearTimeout(N.current),E.current=!1,w(!0),y(e)},$=()=>{b||(E.current=!0,N.current=setTimeout((()=>{E.current&&y(null)}),400))},q={solutions:{title:"Solutions",columns:[{title:"Core Capabilities",items:[{name:"Neural Networks",path:"/solutions/neural-networks",description:"Advanced neural architectures for enterprise"},{name:"Data Processing",path:"/solutions/data-processing",description:"Intelligent data handling at scale"},{name:"Predictive Analytics",path:"/solutions/predictive-analytics",description:"Future-focused business insights"},{name:"NLP Solutions",path:"/solutions/nlp",description:"Natural language understanding and generation"}]},{title:"Industry Solutions",items:[{name:"Finance & Banking",path:"/industries/finance",description:"AI-driven financial optimization"},{name:"Healthcare",path:"/industries/healthcare",description:"Medical intelligence systems"},{name:"Retail & E-commerce",path:"/industries/retail",description:"Smart shopping experiences"},{name:"Manufacturing",path:"/industries/manufacturing",description:"Intelligent production systems"}]},{title:"Deployment Models",items:[{name:"Cloud Integration",path:"/deployment/cloud",description:"Scalable cloud-based AI"},{name:"On-Premise Solutions",path:"/deployment/on-premise",description:"Secure local implementations"},{name:"Hybrid Systems",path:"/deployment/hybrid",description:"Best of both worlds"},{name:"Edge Computing",path:"/deployment/edge",description:"Intelligence at the edge"}]}],featured:{title:"Featured: NeuralOps Platform",description:"Our flagship AI operations platform combining performance, security, and scalability for enterprise needs.",imageSrc:"",videoSrc:"/videos/neuralops.webm",link:"/products/neuralops"}},products:{title:"Products",columns:[{title:"Enterprise Platforms",items:[{name:"NeuralOps",path:"/products/neuralops",description:"AI-integrated DevOps solution"},{name:"DataSynapse",path:"/products/datasynapse",description:"Advanced data processing platform"},{name:"SecureAI Vault",path:"/products/secureai-vault",description:"Privacy-first AI implementation"},{name:"IntelliFlow",path:"/products/intelliflow",description:"Workflow automation system"}]},{title:"Business Solutions",items:[{name:"CustomerAI",path:"/products/customerai",description:"Intelligent customer engagement"},{name:"SupplyGuard",path:"/products/supplyguard",description:"Supply chain optimization"},{name:"MarketSense",path:"/products/marketsense",description:"Predictive market analysis"},{name:"TalentNexus",path:"/products/talentnexus",description:"HR intelligence platform"}]},{title:"Developer Tools",items:[{name:"Neural SDK",path:"/products/neural-sdk",description:"Development toolkit for AI integration"},{name:"AI Sandbox",path:"/products/ai-sandbox",description:"Experimentation environment"},{name:"ModelForge",path:"/products/modelforge",description:"Custom model building platform"},{name:"API Gateway",path:"/products/api-gateway",description:"Unified API management"}]}],featured:{title:"New: IntelliFlow Automation",description:"Our latest release brings unprecedented workflow automation capabilities with adaptive AI learning.",imageSrc:"/app-images/intelliflow-bg.webp",link:"/products/intelliflow"}},resources:{title:"Resources",columns:[{title:"Learn",items:[{name:"Documentation",path:"/resources/docs",description:"Comprehensive product guides"},{name:"Tutorials",path:"/resources/tutorials",description:"Step-by-step learning"},{name:"Webinars",path:"/resources/webinars",description:"Expert-led online sessions"},{name:"Blog",path:"/resources/blog",description:"Insights and updates"}]},{title:"Support",items:[{name:"Knowledge Base",path:"/support/knowledge-base",description:"Self-service answers"},{name:"Community Forum",path:"/support/forum",description:"Connect with peers"},{name:"Technical Support",path:"/support/technical",description:"Expert assistance"},{name:"Status Page",path:"/support/status",description:"System performance updates"}]},{title:"Insights",items:[{name:"Case Studies",path:"/insights/case-studies",description:"Customer success stories"},{name:"White Papers",path:"/insights/white-papers",description:"In-depth research"},{name:"Industry Reports",path:"/insights/reports",description:"Market and trend anal
2ysis"},{name:"ROI Calculator",path:"/insights/roi-calculator",description:"Value assessment tool"}]}],featured:{title:"Featured: AI Readiness Assessment",description:"Take our interactive assessment to determine your organization's AI maturity and implementation roadmap.",imageSrc:"",videoSrc:"/videos/assessment.webm",link:"/insights/ai-readiness"}}};return(0,c.jsxs)("header",{className:"fixed w-full z-[100] bg-white shadow-md transition-all duration-300 "+(n?"h-16":"h-24"),ref:P,children:[(0,c.jsxs)("div",{className:"h-full flex items-center justify-between relative "+(I?"w-full px-3 md:px-6":"max-w-[1600px] mx-auto px-4 sm:px-4 md:px-2 lg:px-2"),children:[(0,c.jsx)(i.N_,{to:"/",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},onMouseEnter:()=>{y(null),S(!0)},onMouseLeave:()=>S(!1),className:"flex items-center text-2xl font-extrabold tracking-tight text-[#402c7f] z-10","aria-label":"Neuralward - Home",children:(0,c.jsx)(d.A,{isHovered:x})}),(0,c.jsxs)("div",{className:"flex items-center",children:[(0,c.jsxs)("nav",{className:"hidden lg:flex gap-2 lg:gap-2 xl:gap-2 text-gray-700 font-medium",children:[(0,c.jsx)("a",{href:"#overview",onClick:e=>V(e,"/overview","overview"),className:"px-2 lg:px-3 py-2 rounded-md hover:bg-brandPrimary/10 hover:text-brandAccent transition-all text-sm lg:text-base "+("overview"===F?"text-brandAccent bg-brandPrimary/10":""),onMouseEnter:()=>y(null),"aria-label":"View Company Overview",children:"Overview"}),(0,c.jsx)("a",{href:"#services",onClick:e=>V(e,"/services","services"),className:"px-2 lg:px-3 py-2 rounded-md hover:bg-brandPrimary/10 hover:text-brandAccent transition-all text-sm lg:text-base "+("services"===F?"text-brandAccent bg-brandPrimary/10":""),onMouseEnter:()=>y(null),"aria-label":"View Our Services",children:"Services"}),(0,c.jsx)("a",{href:"#features",onClick:e=>V(e,"/features","features"),className:"px-2 lg:px-3 py-2 rounded-md hover:bg-brandPrimary/10 hover:text-brandAccent transition-all text-sm lg:text-base "+("features"===F?"text-brandAccent bg-brandPrimary/10":""),onMouseEnter:()=>y(null),"aria-label":"View Key Features",children:"Features"}),(0,c.jsx)("a",{href:"#appcenter",onClick:e=>V(e,"/appcenter","appcenter"),className:"px-2 lg:px-3 py-2 rounded-md hover:bg-brandPrimary/10 hover:text-brandAccent transition-all text-sm lg:text-base "+("appcenter"===F?"text-brandAccent bg-brandPrimary/10":""),onMouseEnter:()=>y(null),"aria-label":"Visit AppCenter Store",children:"AppCenter"}),Object.keys(q).map((e=>(0,c.jsx)("div",{className:"relative",onMouseEnter:()=>B(e),onMouseLeave:$,children:(0,c.jsx)(u,{isActive:v===e,children:(0,c.jsxs)("button",{className:"flex items-center px-2 lg:px-3 py-2 rounded-md hover:bg-brandPrimary/10 hover:text-brandAccent transition-all "+(v===e?"text-brandAccent bg-brandPrimary/10":""),"aria-expanded":v===e,"aria-label":`Toggle ${q[e].title} menu`,onClick:()=>z(e),onMouseEnter:()=>B(e),children:[(0,c.jsx)("span",{className:"relative text-sm lg:text-base",children:q[e].title}),(0,c.jsx)(s.P.svg,{className:"ml-1 w-4 h-4 lg:w-5 lg:h-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",animate:{rotate:v===e?180:0},transition:{duration:.2},"aria-hidden":"true",children:(0,c.jsx)("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})]})})},e)))]}),(0,c.jsxs)("div",{className:"flex items-center",children:[(0,c.jsx)("div",{className:"hidden lg:block",children:(0,c.jsx)(s.P.div,{whileHover:{scale:1.05},whileTap:{scale:.98},transition:{type:"spring",stiffness:400},onMouseEnter:()=>y(null),children:(0,c.jsx)(i.N_,{to:"/get-started",className:"ml-4 xl:ml-6 inline-block bg-brandPrimary hover:bg-brandAccent text-white py-2 px-5 lg:px-5 xl:px-5 md:px-3 rounded-md transition-colors duration-300 text-sm lg:text-base","aria-label":"Get Started with Neuralward",children:(0,c.jsx)("span",{children:"Get Started"})})})}),I&&(0,c.jsx)(r.Suspense,{fallback:null,children:(0,c.jsx)(m,{})})]})]}),(0,c.jsx)("div",{className:"lg:hidden absolute right-4 top-1/2 transform -translate-y-1/2",children:(0,c.jsx)(h,{isOpen:e,onClick:()=>t(!e)})})]}),(0,c.jsx)(o.N,{children:v&&(0,c.jsx)(r.Suspense,{fallback:null,children:(0,c.jsx)(f,{menu:q[v],onItemClick:()=>y(null),onMouseEnter:()=>{clearTimeout(N.current),E.current=!1,w(!0)},onMouseLeave:()=>{w(!1),E.current=!0,N.current=setTimeout((()=>{E.current&&y(null)}),400)}})})}),(0,c.jsx)(r.Suspense,{fallback:null,children:(0,c.jsx)(p,{isOpen:e,dropdowns:q,activeDropdown:v,handleDropdownToggle:z,handleNavClick:V,handleClose:()=>t(!1)})})]})}}
2,4652:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(5043),i=n(7663),s=n(3546),o=n(1675),a=n(579);const l=e=>{if(!e)return"Just now";try{const t=e instanceof Date?e:"function"===typeof e.toDate?e.toDate():new Date(e),n=new Date-t,r=Math.round(n/1e3),i=Math.round(r/60),s=Math.round(i/60),o=Math.round(s/24);return r<60?"Just now":i<60?`${i} min${1===i?"":"s"} ago`:s<24?`${s} hour${1===s?"":"s"} ago`:o<30?`${o} day${1===o?"":"s"} ago`:t.toLocaleDateString()}catch(t){return console.error("Error formatting date:",t),"Unknown time"}},c=e=>{let{onClick:t,text:n,color:i}=e;const[s,o]=(0,r.useState)(!1);return(0,a.jsx)("button",{onClick:t,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),className:"h-full w-full px-6 py-4 text-sm font-medium flex items-center justify-center transition-colors",style:{color:i,backgroundColor:s?i+"20":"transparent"},children:n})},u=e=>{let{notification:t={},onClose:n,onDismiss:u,onRead:h,isInDropdown:d=!1}=e;const f=(0,o.Zp)(),[p,m]=(0,r.useState)(!1),[g,v]=(0,r.useState)(!1),[y,b]=(0,r.useState)(!1),[w,x]=(0,r.useState)(!1),{id:S="",title:E="",message:k="",type:T="info",link:_=null,linkText:C=null,status:A="active",createdAt:I=new Date,userAvatar:P=null,userName:N=null}=t||{};if((0,r.useEffect)((()=>{m((()=>{if(!t||"object"!==typeof t)return!1;if("dismissed"===A)return!0;const e=new Date;let n;if(e.setDate(e.getDate()-7),I instanceof Date)n=I;else if(I&&"function"===typeof I.toDate)n=I.toDate();else{if(!I)return!1;n=new Date(I)}return n<e})())}),[S,A,I,t]),(0,r.useEffect)((()=>{if("active"===A&&!d&&n){const e=setTimeout((()=>{n({id:S,markAsRead:!1})}),1e4);return()=>{clearTimeout(e)}}}),[A,d,n,S]),!t||"object"!==typeof t)return null;const R=(()=>{switch(T){case"success":return{color:"#4ade80",bgColor:"#f0fdf4",iconBg:"#22c55e",barColor:"bg-green-500",icon:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6 text-white",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("polyline",{points:"20 6 9 17 4 12"})})};case"error":return{color:"#f87171",bgColor:"#fef2f2",iconBg:"#ef4444",barColor:"bg-red-500",icon:(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6 text-white",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,a.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})};case"warning":return{color:"#facc15",bgColor:"#fefce8",iconBg:"#eab308",barColor:"bg-amber-500",icon:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6 text-white",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("path",{d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})};default:return{color:"#60a5fa",bgColor:"#eff6ff",iconBg:"#3b82f6",barColor:"bg-blue-500",icon:(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6 text-white",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,a.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,a.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"8"})]})}}})(),D=()=>{_&&n&&(_.startsWith("http")?window.open(_,"_blank"):f(_),d||n({id:S,markAsRead:!0}))},O=()=>{n&&n({id:S,markAsRead:!0})},j=()=>{h&&h(S)},L=E.length>30,M=k.length>65,F=()=>g?k:M?(0,a.jsxs)(a.Fragment,{children:[k.substring(0,61),(0,a.jsx)("span",{className:"text-xs text-brandPrimary mt-1",children:" ..."})]}):k,U=()=>g?E:L?(0,a.jsxs)(a.Fragment,{children:[E.substring(0,30),(0,a.jsx)("span",{className:"text-xs text-brandPrimary",children:" ..."})]}):E,V={collapsed:{height:"2.5rem",overflow:"hidden"},expanded:{height:"auto",overflow:"visible"}};if(d){const e="new"===A,t="read"===A||"dismissed"===A||p?.7:1,n=()=>{e&&h&&j()};return(0,a.jsxs)(i.P.div,{id:`notification-${S}`,initial:{opacity:0,y:5}
2,animate:{opacity:1,y:0},exit:{opacity:0,height:0},transition:{type:"spring",damping:20,stiffness:300},style:{opacity:t},className:"flex w-full border-b border-gray-200 select-none relative"+(e?" cursor-pointer":""),onMouseEnter:()=>{x(!0),(M||L)&&v(!0)},onMouseLeave:()=>{x(!1),(M||L)&&v(!1)},onClick:n,children:[e&&(0,a.jsx)("div",{className:"absolute left-0 top-0 z-20",children:(0,a.jsx)("div",{className:"w-3 h-3 rounded-full ml-2 mt-2",style:{backgroundColor:R.iconBg},children:(0,a.jsx)(i.P.div,{animate:{scale:[1,1.2,1],opacity:[.7,1,.7]},transition:{duration:2,repeat:1/0,repeatType:"loop"},className:"w-full h-full rounded-full",style:{backgroundColor:R.iconBg}})})}),(0,a.jsx)("div",{className:`absolute inset-0 ${e?R.barColor:"bg-gray-100"}`,style:{opacity:e?w?.25:.12:w?.15:.05,transition:"opacity 180ms cubic-bezier(0.25, 0.1, 0.25, 1.0)",zIndex:0}}),(0,a.jsxs)("div",{className:"absolute inset-0 overflow-hidden",style:{transition:"all 160ms cubic-bezier(0.2, 0, 0.1, 1)",zIndex:0,transform:w?"scale(1.02)":"scale(1)",opacity:w?1:0,boxShadow:w?"0 4px 24px 0 rgba(0, 0, 0, 0.05), 0 8px 24px 0 rgba(0, 0, 0, 0.15)":"none"},children:[(0,a.jsx)("div",{className:"absolute inset-0",style:{background:`linear-gradient(to bottom right, ${R.iconBg}30, ${R.iconBg}50)`,opacity:.5,zIndex:1,transition:"opacity 200ms cubic-bezier(0.2, 0, 0.1, 1)"}}),(0,a.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.2) 60%, rgba(255,255,255,0) 80%)",zIndex:2,transition:"opacity 150ms cubic-bezier(0.2, 0, 0.1, 1)",opacity:w?1:0}})]}),(0,a.jsx)("div",{className:"w-1 self-stretch flex-shrink-0 z-10 overflow-hidden",style:{backgroundColor:R.iconBg},children:e&&(0,a.jsx)(i.P.div,{initial:{y:"100%"},animate:{y:["-100%","100%"]},transition:{duration:2,repeat:1/0,repeatType:"loop"},className:"w-full h-full",style:{backgroundImage:`linear-gradient(to bottom, transparent, ${R.iconBg}, transparent)`,opacity:.8}})}),(0,a.jsx)("div",{className:"px-4 py-3 flex items-center z-10",children:(0,a.jsx)("div",{className:"w-10 h-10 rounded-full overflow-hidden flex items-center justify-center",children:P?(0,a.jsx)("img",{src:P,alt:"User",className:"w-full h-full object-cover"}):(0,a.jsx)("div",{className:"w-full h-full flex items-center justify-center",style:{backgroundColor:R.iconBg},children:R.icon})})}),(0,a.jsxs)("div",{className:"flex-1 py-3 pr-2 flex flex-col justify-center z-10",children:[N?(0,a.jsx)("p",{className:"text-sm font-semibold",style:{color:"#3b82f6"},children:N}):(0,a.jsx)("p",{className:"text-sm font-semibold",style:{color:R.iconBg},children:U()}),(0,a.jsx)("div",{className:"relative overflow-hidden",children:(0,a.jsx)(s.N,{initial:!1,children:(0,a.jsx)(i.P.div,{className:"text-sm text-gray-700 overflow-hidden",variants:V,initial:M?"collapsed":"expanded",animate:g||!M?"expanded":"collapsed",transition:{duration:.3,ease:"easeInOut"},children:F()})})}),(0,a.jsxs)("p",{className:"text-xs text-gray-400 mt-1",children:[e&&(0,a.jsx)("span",{className:"mr-2 font-semibold",style:{color:R.iconBg},children:"NEW"}),l(I)]})]}),(0,a.jsxs)("div",{className:"flex flex-col min-w-[80px] z-10",children:[_&&(0,a.jsx)("div",{className:"h-1/2",style:{borderLeft:"1px solid "+(w?`${R.iconBg}33`:"#e5e7eb"),transition:"border-color 160ms cubic-bezier(0.2, 0, 0.1, 1)"},children:(0,a.jsx)("button",{onClick:t=>{t.stopPropagation(),D(),e&&h&&j()},className:"w-full h-full px-4 py-3 text-sm text-brandPrimary font-medium hover:bg-brandPrimary hover:text-white flex items-center justify-center",style:{borderBottom:"1px solid "+(w?`${R.iconBg}33`:"#e5e7eb"),transition:"border-color 160ms cubic-bezier(0.2, 0, 0.1, 1)"},children:"Visit"})}),(0,a.jsx)("div",{className:""+(_?"h-1/2":"h-full"),style:{borderLeft:"1px solid "+(w?`${R.iconBg}33`:"#e5e7eb"),transition:"border-color 160ms cubic-bezier(0.2, 0, 0.1, 1)"},children:(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),(()=>{if(u&&(u(S),d)){const e=document.getElementById(`notification-${S}`);e&&(e.style.height="0",e.style.opacity="0",e.style.marginBottom="0",e.style.overflow="hidden",e.style.transition="all 0.3s ease-out")}})()},onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),className:"w-full h-full px-4 py-3 text-sm font-medium flex items-center justify-center transition-colors",style:{backgroundColor:y?R.iconBg:"transparent",color:y?"#ffffff"
2:R.iconBg},children:"Dismiss"})})]})]})}const z=p?.7:1;return(0,a.jsx)(i.P.div,{initial:{opacity:0,x:50},animate:{opacity:1,x:0},exit:{opacity:0,x:50},transition:{type:"spring",damping:20,stiffness:300},style:{opacity:z},className:"w-96 overflow-hidden shadow-lg rounded-md select-none relative",onMouseEnter:()=>{(M||L)&&v(!0)},onMouseLeave:()=>{(M||L)&&v(!1)},children:(0,a.jsxs)("div",{className:"flex rounded-md overflow-hidden relative",style:{backgroundColor:R.bgColor},children:[(0,a.jsx)(i.P.div,{className:`absolute top-0 bottom-0 left-0 z-0 ${R.barColor}`,style:{opacity:.15},initial:{width:"calc(100% - 80px)"},animate:{width:"0%"},transition:{duration:10,ease:"linear"}}),(0,a.jsx)("div",{className:"w-1.5 flex-shrink-0 self-stretch z-10 relative",style:{backgroundColor:R.iconBg}}),(0,a.jsxs)("div",{className:"flex flex-1 z-10 relative",children:[(0,a.jsx)("div",{className:"px-4 py-4 flex items-center",children:(0,a.jsx)("div",{className:"w-10 h-10 rounded-full overflow-hidden flex items-center justify-center",style:{backgroundColor:R.iconBg},children:R.icon})}),(0,a.jsxs)("div",{className:"flex-1 py-4 flex flex-col justify-center overflow-hidden",children:[(0,a.jsx)("p",{className:"font-medium",style:{color:R.iconBg},children:U()}),k&&(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(s.N,{initial:!1,children:(0,a.jsx)(i.P.div,{className:"text-sm text-gray-700 mt-1 overflow-hidden",variants:V,initial:M?"collapsed":"expanded",animate:g||!M?"expanded":"collapsed",transition:{duration:.3,ease:"easeInOut"},children:F()})})})]}),(0,a.jsx)("div",{className:"relative z-20",style:{borderLeft:"1px solid #e5e7eb"},children:_?(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[(0,a.jsx)("div",{style:{borderBottom:"1px solid #e5e7eb"},children:(0,a.jsx)(c,{onClick:D,text:C||"Visit",color:R.iconBg})}),(0,a.jsx)("div",{children:(0,a.jsx)(c,{onClick:O,text:"OK",color:R.iconBg})})]}):(0,a.jsx)(c,{onClick:O,text:"OK",color:R.iconBg})})]})]})})}},8558:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});n(5043);var r=n(579);const i=e=>{let{text:t="Loading...",theme:n="dark"}=e;const i="dark"===n;return(0,r.jsxs)("div",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:12,background:i?"rgba(255,255,255,0.12)":"rgba(255,255,255,1)",backdropFilter:i?"blur(8px)":"none",border:i?"1px solid rgba(255,255,255,0.18)":"1px solid rgba(0,0,0,0.05)",boxShadow:i?"none":"0 2px 8px rgba(0,0,0,0.05)",borderRadius:"999px",padding:"10px 20px"},children:[(0,r.jsx)("div",{style:{width:16,height:16,flexShrink:0,border:"2px solid "+(i?"rgba(255,255,255,0.3)":"rgba(0,0,0,0.1)"),borderTopColor:"#d34a9a",borderRadius:"50%",animation:"nw-spin 0.8s linear infinite"}}),(0,r.jsx)("span",{style:{color:i?"rgba(255,255,255,0.85)":"rgba(0,0,0,0.6)",fontSize:"13px",fontWeight:500,letterSpacing:"0.03em",whiteSpace:"nowrap"},children:t})]})}},8556:(e,t,n)=>{"use strict";n.d(t,{vu:()=>w,Jd:()=>x});var r=n(5043),i=n(2779),s=n(5662);function o(e){const t=new Uint8Array(e);return crypto.getRandomValues(t),btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}const a="https://o2bo2ah64basqr2kwap5i3c2fy0idgrv.lambda-url.us-west-2.on.aws/".replace(/\/$/,""),l=({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyCDh7j0aeW7vdWACbscpZXfilCtdOk_is4",REACT_APP_FIREBASE_AUTH_DOMAIN:"appcenter-cd3a5.firebaseapp.com",REACT_APP_FIREBASE_PROJECT_ID:"appcenter-cd3a5",REACT_APP_FIREBASE_STORAGE_BUCKET:"appcenter-cd3a5.firebasestorage.app",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"812030845655",REACT_APP_FIREBASE_APP_ID:"1:812030845655:web:aee95886ea9fe600c10692",REACT_APP_GOOGLE_CLIENT_ID:"812030845655-konlhpivvc0vhluqp60n1i8mq50b0mep.apps.googleusercontent.com",REACT_APP_AUTH_LAMBDA_URL:"https://o2bo2ah64basqr2kwap5i3c2fy0idgrv.lambda-url.us-west-2.on.aws/",REACT_APP_PAYPAL_CLIENT_ID:"BAAQZr370m-afgluC_24px7yi_TfXNiKXZ1tJc3-LG7IUTVupyC0Z9_kmDu9WFWFswwRpa3_TGIkwQrwdA",REACT_APP_MERCADOPAGO_USER_ID:"39781516",REACT_APP_API_URL:"https://4prb97zuq2.execute-api.us-west-2.amazonaws.com/prod",REACT_APP_S3_UPLOAD_API_URL:"https://d2vxq5dko3.execute-api.us-west-2.amazonaws.com/Prod/generate-upload-url",REACT_APP_MERCADOPAGO_PUBLIC_KEY:"APP_USR-3bc49a54-7b7e-4714-a9a2-9d68dae23d30",REACT_APP_GIFT_EMAIL_WEBHOOK:"https://4prb97zuq2.execute-api.us-west-2.amazonaws.com/prod/send-gift-email",REACT_APP_N8N_CHAT_WEBHOOK:"https://api.neuralward.com/chat",REACT_APP_N8N_LEAD_WEBHOOK:"https://n8n.srv1175638.hstgr.cloud/webhook/lead",REACT_APP_AI_ASSISTANT_NAME:"Neuralward AI",REACT_APP_CHAT_ROUTING:"n8n",REACT_APP_GEMINI_BUDGET:"30",REACT_APP_PADDLE_ENVIRONMENT:"sandbox",REACT_APP_PADDLE_CLIENT_TOKEN:"test_8bf4d1dee1e3bbda614d9ddfc16",REACT_APP_PADDLE_ALLOW_SANDBOX_IN_PROD:"true",REACT_APP_PADDLE_MODE:"dynamic",REACT_APP_PAYMENTS_API_URL:"https://api.neuralward.com"}.REACT_APP_OTP_LAMBDA_URL||a).replace(/\/$/,"");const c=new class{constructor(){this.auth=s.j,this._googleProvider=null,this._registrationInFlight=!1}isRegistrationInFlight(){return this._registrationInFlight}
2async getGoogleProvider(){if(!this._googleProvider){const{GoogleAuthProvider:e}=await Promise.resolve().then(n.bind(n,2779));this._googleProvider=new e,this._googleProvider.setCustomParameters({prompt:"select_account"})}return this._googleProvider}async initiateGoogleRedirect(e){const t="812030845655-konlhpivvc0vhluqp60n1i8mq50b0mep.apps.googleusercontent.com";const n=o(64),r=await async function(e){const t=(new TextEncoder).encode(e),n=await crypto.subtle.digest("SHA-256",t);return btoa(String.fromCharCode(...new Uint8Array(n))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}(n),i="string"===typeof e&&e.startsWith("/")&&!e.startsWith("//")?e:window.location.pathname+window.location.search,s=`${o(16)}.${btoa(unescape(encodeURIComponent(i))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}`;sessionStorage.setItem("pkce_code_verifier",n),sessionStorage.setItem("pkce_state",s),sessionStorage.setItem("google_return_path",i),sessionStorage.setItem("nw_oauth_return_path",i);const a=window.location.origin,l=new URLSearchParams({client_id:t,redirect_uri:a,response_type:"code",scope:"openid email profile",code_challenge:r,code_challenge_method:"S256",state:s,prompt:"select_account"});window.location.href=`https://accounts.google.com/o/oauth2/v2/auth?${l.toString()}`}async handleGoogleOAuthCallback(e,t){const n=sessionStorage.getItem("pkce_state"),r=sessionStorage.getItem("pkce_code_verifier");if(!n||t!==n)throw new Error("OAuth state mismatch \u2014 possible CSRF attack");if(!r)throw new Error("Missing PKCE code_verifier");sessionStorage.removeItem("pkce_state"),sessionStorage.removeItem("pkce_code_verifier");const i=window.location.origin,s=await fetch(`${a}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,code_verifier:r,redirect_uri:i,invite_token:sessionStorage.getItem("nw_invite")||void 0})}),o=await s.json();if(!s.ok||!o.id_token)throw new Error(o.error||"Token exchange failed");return await this.signInWithGISCredential(o.id_token)}async signInWithGISCredential(e){this._registrationInFlight=!0;try{const{GoogleAuthProvider:t,signInWithCredential:r,signOut:i}=await Promise.resolve().then(n.bind(n,2779)),s=t.credential(e),o=await r(this.auth,s),a=await this.handleUserAuth(o.user,"google");return null!==a&&void 0!==a&&a.isBanned?(await i(this.auth),{success:!1,banned:!0,banInfo:a.banInfo||{reason:"Your account has been suspended",timestamp:new Date}}):{success:!0,user:a}}catch(t){return console.error("Google sign-in error:",t),{success:!1,error:t.message}}finally{this._registrationInFlight=!1}}async requestEmailOtp(e){const t=await fetch(`${l}/auth/email-otp/request`,{method:"POST",body:JSON.stringify({email:e})}),n=await t.json().catch((()=>({})));if(!t.ok)throw new Error(n.error||"Could not send the sign-in code");return n}async verifyEmailOtp(e,t,r){this._registrationInFlight=!0;try{const s=await fetch(`${l}/auth/email-otp/verify`,{method:"POST",body:JSON.stringify({email:e,request_id:t,code:r,invite_token:sessionStorage.getItem("nw_invite")||void 0})}),o=await s.json().catch((()=>({})));if(!s.ok||!o.custom_token)throw new Error(o.error||"Could not verify the sign-in code");const{signOut:a}=await Promise.resolve().then(n.bind(n,2779)),c=await(0,i.p)(this.auth,o.custom_token),u=await this.handleUserAuth(c.user,"email_otp",{email:o.email||e});return u.isBanned?(await a(this.auth),{success:!1,banned:!0,banInfo:u.banInfo||{reason:"Your account has been suspended",timestamp:new Date}}):{success:!0,user:u}}catch(s){return console.error("Email OTP sign in error:",s),{success:!1,error:s.message}}finally{this._registrationInFlight=!1}}async handleUserAuth(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{doc:i,getDoc:o}=await Promise.resolve().then(n.bind(n,5472)),a=i(s.db,"users",e.uid);return(await o(a)).exists()?await this.updateExistingUser(e,t,r):await this.createNewUser(e,t,r)}async createNewUser(e,t){const r=await e.getIdToken(),i=await fetch(`${a}/auth/registration/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:r,provider:t,invite_token:sessionStorage.getItem("nw_invite")||void 0})}),o=await i.json().catch((()=>({})));if(!i.ok)throw new Error(o.error||"Could not complete registration");const{doc:l,getDoc:c}=await Promise.resolve().then(n.bind(n,5472));for(let n=0;n<4;n++){n>0&&await new Promise((e=>setTimeout(e,600)));const t=await c(l(s.db,"users",e.uid));if(t.exists())return t.data()}throw new Error("Registration record was not created")}async updateExistingUser(e,t){var r,i,o,a;let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{doc:c,getDoc:u,updateDoc:h,serverTimestamp:d}=await Promise.resolve().then(n.bind(n,5472)),f=c(s.db,"users",e.uid),p=(await u(f)).data();if(p.isBanned)return p;const m={lastLoginAt:d()},g=e.email||l.email||"",v=e.displayName||l.displayName||"",y=e.photoURL||l.photoURL||"",b="email_otp"===t&&v&&g&&v.toLowerCase()===g.toLowerCase(),w="google"===p.provider||(null===(r=p.authProviders)||void 0===r||null===(i=r.includes)||void 0===i?void 0:i.call(r,"google"))||!!p.photoURL;if(!v||b||p.displayName&&p.displayName===v||(m.displayName=v),!y||p.photoURL&&p.photoURL===y||(m.photoURL=y),!g||p.email&&p.email===g||(m.email=g),null===(o=p.authProviders)||void 0===o||null===(a=o.includes)||void 0===a||!a.call(o,t)){const{arrayUnion:e}=await Promise.resolve().then(n.bind(n,5472));m.authProviders=e(t)}if("google"===t){m.provider="google";const e=(m.displayName||p.displayName||"").trim(),t=(g||p.email||"").trim().toLowerCase(),n=!!e&&e.toLowerCase()!==t;m.profileComplete=n,m.requiresOnboarding=!n}else if("email_otp"===t&&!w){var x,S;m.profileComplete=null!==(x=p.profileComplete)&&void 0!==x&&x,m.requiresOnboarding=null===(S=p.requiresOnboarding)||void 0===S||S}await h(f,m);return(await u(f)).data()}async addUserToDefaultGroup(e){const{doc:t,getDoc:r,setDoc:i,updateDoc:o,arrayUnion:a,serverTimestamp:l}=await Promise.resolve().then(n.bind(n,5472)),c=t(s.db,"groups","users");try{const t=await r(c);if(t.exists()){const n=t.data();n.members&&n.members.includes(e)||await o(c,{members:a(e)})}else await i(c,{name:"users",displayName:"Users",description:"Default user group",permissions:{canPurchase:!0,canViewPrices:!0},members:[e],createdAt:l()})}catch(u){console.error("Error adding user to default group:",u)}}async signOut(){try{return await(0,i.signOut)(this.auth),{success:!0}}catch(e){return console.error("Sign out error:",e),{success:!1,error:e.message}}}getCurrentUser(){return this.auth.currentUser}onAuthStateChange(e){return(0,i.hg)(this.auth,e)}async checkUserPermission(e,t){const{doc:r,getDoc:i}=await Promise.resolve().then(n.bind(n,5472)),o=r(s.db,"users",e),a=await i(o);if(!a.exists())return!1;const l=a.data();return!l.isBanned&&(l.permissions[t]||!1)}async checkUserBanStatus(e){try{const{doc:t,getDoc:r}=await Promise.resolve().then(n.bind(n,5472)),i=t(s.db,"users",e),o=await r(i);if(!o.exists())return{isBanned:!1};const a=o.data();return a.isBanned?{isBanned:!0,banInfo:a.banInfo||{reason:"Your account has been suspended",timestamp:new Date}}:{isBanned:!1}}catch(t){return console.error("Error checking ban status:",t),{isBanned:!1}}}async getUserGroups(e){const{doc:t,getDoc:r}=await Promise.resolve().then(n.bind(n,5472)),i=t(s.db,"users",e),o=await r(i);if(!o.exists())return[];return o.data().groups||[]}async validateUserToken(e,t){const{doc:r,getDoc:i}=await Promise.resolve().then(n.bind(n,5472)),o=r(s.db,"users",e),a=await i(o);if(!a.exists())return!1;const l=a.data();return!l.isBanned&&l.userToken===t}async refreshUserProfile(e){try{const{doc:t,getDoc:r,updateDoc:i,serverTimestamp:o}=await Promise.resolve().then(n.bind(n,5472)),a=this.auth.currentUser;if(!a||a.uid!==e)throw new Error("User must be authenticated to refresh their profile");await a.reload();const l=t(s.db,"users",e),c=await r(l),u=c.exists()?c.data():{},h={displayName:a.displayName||u.displayName||"",photoURL:a.photoURL||u.photoURL||null,email:a.email||u.email||"",profileLastUpdated:o()};await i(l,h);return(await r(l)).data()}catch(t){throw console.error("Error refreshing user profile:",t),t}}};var u=n(5472),h=n(7663),d=n(111),f=n(3546),p=n(579);const m=()=>(0,p.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,p.jsx)("polyline",{points:"9 18 15 12 9 6"})}),g=()=>(0,p.jsxs)("svg",{width:"30",height:"30",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,p.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,p.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,p.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),v=e=>{let{reducedMotion:t}=e;const n=(e,n,r,i,s,o,a)=>(0,p.jsx)(h.P.div,{className:"absolute left-0 w-[200%] will-change-transform",style:{height:n,bottom:r,opacity:i},animate:t?{x:"0%"}:{x:o?["-50%","0%"]:["0%","-50%"]},transition:t?{duration:0}:{duration:s,ease:"linear",repeat:1/0},children:(0,p.jsx)("svg",{viewBox:"0 0 2880 320",preserveAspectRatio:"none",className:`h-full w-full ${e}`,children:(0,p.jsx)("path",{d:a})})});return(0,p.jsxs)("div",{className:"pointer-events-none absolute inset-0 z-0 overflow-hidden rounded-[28px] bg-white select-none",children:[n("fill-[#475569]","38%","-20px",.14,28,!1,"M0,160 Q360,260 720,160 T1440,160 T2160,160 T2880,160 L2880,320 L0,320 Z"),n("fill-[#64748b]","31%","-12px",.16,22,!0,"M0,120 Q360,40 720,120 T1440,120 T2160,120 T2880,120 L2880,320 L0,320 Z"),n("fill-[#94a3b8]","25%","-24px",.18,18,!1,"M0,190 Q360,100 720,190 T1440,190 T2160,190 T2880,190 L2880,320 L0,320 Z"),n("fill-[#cbd5e1]","19%","-8px",.22,15,!0,"M0,140 Q360,220 720,140 T1440,140 T2160,140 T2880,140 L2880,320 L0,320 Z"),n("fill-[#e2e8f0]","13%","-16px",.26,12,!1,"M0,170 Q360,90 720,170 T1440,170 T2160,170 T2880,170 L2880,320 L0,320 Z"),(0,p.jsx)("div",{className:"absolute inset-0 bg-white/20"}),(0,p.jsx)("div",{className:"absolute inset-0 bg-[#402c7f] opacity-0 mix-blend-color transition-opacity duration-500 group-hover:opacity-100"}),(0,p.jsx)("div",{className:"absolute inset-0 bg-[#402c7f]/[0.02] opacity-0 transition-opacity duration-500 group-hover:opacity-100"}),(0,p.jsx)("div",{className:"absolute inset-0 opacity-[0.03] mix-blend-overlay",children:(0,p.jsxs)("svg",{width:"100%",height:"100%",children:[(0,p.jsx)("filter",{id:"pending-grain",children:(0,p.jsx)("feTurbulence",{type:"fractalNoise",baseFrequency:".95",numOctaves:"4",stitchTiles:"stitch"})}
2),(0,p.jsx)("rect",{width:"100%",height:"100%",filter:"url(#pending-grain)"})]})})]})},y=e=>{let{open:t,onClose:n}=e;const r=(0,d.I)(),i=r?{duration:0}:{duration:.34,ease:[.16,1,.3,1]};return(0,p.jsx)(f.N,{children:t&&(0,p.jsxs)(h.P.div,{className:"fixed inset-0 z-[100] flex items-center justify-center p-5",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},role:"dialog","aria-modal":"true","aria-labelledby":"registration-pending-title",children:[(0,p.jsx)("button",{type:"button",onClick:n,"aria-label":"Close",className:"absolute inset-0 cursor-default bg-black/70 backdrop-blur-sm"}),(0,p.jsxs)(h.P.article,{initial:{opacity:0,y:r?0:22,scale:r?1:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8},transition:i,className:"group relative isolate flex min-h-[500px] w-full max-w-md flex-col overflow-hidden rounded-[28px] border border-zinc-200/60 bg-white p-8 shadow-2xl sm:p-10",children:[(0,p.jsx)(v,{reducedMotion:r}),(0,p.jsxs)("div",{className:"relative z-10 flex flex-grow flex-col justify-between",children:[(0,p.jsxs)("div",{children:[(0,p.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[(0,p.jsx)("span",{className:"text-[14px] font-semibold text-zinc-600",children:"Neuralward Access"}),(0,p.jsx)("span",{className:"rounded-full border border-zinc-200/50 bg-zinc-100/90 px-2.5 py-1 text-[10px] font-extrabold uppercase tracking-wider text-zinc-600 shadow-sm",children:"Awaiting Review"})]}),(0,p.jsx)("h2",{id:"registration-pending-title",className:"mb-3 text-2xl font-bold leading-tight tracking-tight text-zinc-900",children:"Your access request is in."}),(0,p.jsx)("p",{className:"mb-6 text-[15px] font-normal leading-relaxed text-zinc-600",children:"We\u2019ve verified your sign-in and added you to the Neuralward access list. We\u2019ll notify you the moment your portal access is approved."}),(0,p.jsxs)("div",{className:"relative z-10 mt-8 mb-4 flex items-center gap-4 roun
2ded-2xl border border-zinc-100 bg-white/80 p-4 text-[13px] text-zinc-600 shadow-sm backdrop-blur-[1px]",children:[(0,p.jsx)("span",{className:"shrink-0 text-[#ea3d95]",children:(0,p.jsx)(g,{})}),(0,p.jsxs)("span",{children:[(0,p.jsx)("strong",{className:"font-semibold text-zinc-800",children:"You can keep exploring."})," Available trials remain accessible; purchases unlock after approval."]})]})]}),(0,p.jsx)("div",{className:"mt-auto border-t border-zinc-200/50 pt-4",children:(0,p.jsxs)("button",{type:"button",onClick:n,className:"flex w-full items-center justify-between text-left text-[14px] font-semibold text-zinc-600 transition-colors hover:text-[#ea3d95] focus:outline-none",children:[(0,p.jsx)("span",{children:"Continue exploring"}),(0,p.jsx)("span",{className:"flex h-9 w-9 items-center justify-center rounded-full bg-zinc-900 text-white transition-all group-hover:scale-105 group-hover:bg-[#ea3d95]",children:(0,p.jsx)(m,{})})]})})]})]})]})})},b=(0,r.createContext)(),w=e=>{let{children:t}=e;const[n,i]=(0,r.useState)(null),[o,a]=(0,r.useState)(null),[l,h]=(0,r.useState)(!1),[d,f]=(0,r.useState)(!0),[m,g]=(0,r.useState)(null),[v,w]=(0,r.useState)(!1),[x,S]=(0,r.useState)(null),[E,k]=(0,r.useState)((()=>"1"===new URLSearchParams(window.location.search).get("nw_pending_registration"))),[T,_]=(0,r.useState)((()=>{const e=new URLSearchParams(window.location.search);return!!(e.get("code")&&e.get("state")&&sessionStorage.getItem("pkce_code_verifier"))}));(0,r.useEffect)((()=>{const e=new URLSearchParams(window.location.search),t=e.get("invite");if(t){sessionStorage.setItem("nw_invite",t),e.delete("invite");const n=e.toString();window.history.replaceState({},document.title,window.location.pathname+(n?`?${n}`:""))}const n=e.get("code"),r=e.get("state");if(!n||!r||!sessionStorage.getItem("pkce_code_verifier"))return;window.history.replaceState({},document.title,window.location.pathname);const i=(e=>{try{const t=e.split(".")[1];if(!t)return null;const n=t.replace(/-/g,"+").replace(/_/g,"/")+"===".slice((t.length+3)%4),r=decodeURIComponent(escape(atob(n)));return r.startsWith("/")&&!r.startsWith("//")?r:null}catch(t){return null}})(r)||sessionStorage.getItem("nw_oauth_return_path")||sessionStorage.getItem("google_return_path")||"/";(async()=>{f(!0),g(null);try{const t=await c.handleGoogleOAuthCallback(n,r);if(t.banned)return w(!0),S(t.banInfo),void f(!1);if(t.success){var e;if("pending"===(null===(e=t.user)||void 0===e?void 0:e.registrationStatus)){sessionStorage.removeItem("nw_oauth_return_path");const e=new URL(i,window.location.origin);return e.searchParams.set("nw_pending_registration","1"),void window.location.replace(e.pathname+e.search+e.hash)}sessionStorage.removeItem("nw_oauth_return_path"),window.location.replace(i)}else{if(console.error("Google sign-in failed:",t.error),"/"!==i)return void window.location.replace(i);g(t.error||"Google sign-in failed"),_(!1),f(!1)}}catch(t){if(console.error("Google sign-in failed:",t),"/"!==i)return void window.location.replace(i);g(t.message||"Google sign-in failed"),_(!1),f(!1)}})()}),[]),(0,r.useEffect)((()=>{let e,t;return t=c.onAuthStateChange((async t=>{if(t&&!t.isAnonymous){i(t),h(!1);const n=(0,u.doc)(s.db,"users",t.uid);e=(0,u.onSnapshot)(n,(e=>{if(e.exists()){const t=e.data();a(t),"pending"===t.registrationStatus&&k(!0),t.isBanned?(w(!0),S(t.banInfo||{reason:"Your account has been suspended",timestamp:new Date})):(w(!1),S(null))}else{if(!e.metadata.fromCache&&!c.isRegistrationInFlight())return void c.signOut();a(null)}h(!0)}),(e=>{"permission-denied"===e.code?(a(null),w(!1),S(null),h(!0)):console.error("Error listening to user data:",e)}))}else e&&e(),i(null),a(null),h(!0),w(!1),S(null);f(!1)})),()=>{t&&t(),e&&e()}}),[]);const C=e=>{var t;return!v&&(o&&(null===(t=o.permissions)||void 0===t?void 0:t[e])||!1)},A="pending"===(null===o||void 0===o?void 0:o.registrationStatus),I={user:n,authUser:n,userData:o,userProfileLoaded:l,loading:d,error:m,isProcessingOAuth:T,signInWithGoogle:async e=>{g(null);try{await c.initiateGoogleRedirect(e)}catch(t){g(t.message||"Could not start Google sign-in")}}
2,signInWithGoogleToken:async e=>{f(!0),g(null);const t=await c.signInWithGISCredential(e);return t.banned&&(w(!0),S(t.banInfo)),t.success||g(t.error),f(!1),t},requestEmailOtp:async e=>{g(null);try{return await c.requestEmailOtp(e)}catch(t){const e=t.message||"Could not send the sign-in code";throw g(e),t}},verifyEmailOtp:async(e,t,n)=>{f(!0),g(null);const r=await c.verifyEmailOtp(e,t,n);return r.banned&&(w(!0),S(r.banInfo)),r.success||g(r.error),f(!1),r},signOut:async()=>{f(!0),g(null);const e=await c.signOut();return e.success||g(e.error),w(!1),S(null),f(!1),e},hasPermission:C,isInGroup:e=>{var t;return!v&&(o&&(null===(t=o.groups)||void 0===t?void 0:t.includes(e))||!1)},canViewPrices:()=>C("canViewPrices"),canPurchase:()=>!A&&C("canPurchase"),isPendingRegistration:A,showPendingRegistration:()=>k(!0),isAdmin:()=>C("isAdmin"),isCorporateOwner:()=>C("isCorporateOwner"),isBanned:v,banInfo:x,checkBanStatus:async()=>{if(!n)return{isBanned:!1};if(v)return{isBanned:!0,banInfo:x};if("true"===sessionStorage.getItem("userIsBanned"))return{isBanned:!0,banInfo:x||{reason:"Your account has been suspended"}};try{const e=await c.checkUserBanStatus(n.uid);return e.isBanned!==v&&(w(e.isBanned),S(e.banInfo),e.isBanned&&sessionStorage.setItem("userIsBanned","true")),e}catch(m){return console.error("Error checking ban status:",m),{isBanned:!1}}}};return(0,p.jsxs)(b.Provider,{value:I,children:[t,(0,p.jsx)(y,{open:E,onClose:()=>{const e=new URL(window.location.href);e.searchParams.delete("nw_pending_registration"),window.history.replaceState({},document.title,e.pathname+e.search+e.hash),k(!1)}})]})},x=()=>{const e=(0,r.useContext)(b);if(void 0===e)throw new Error("useUser must be used within a UserProvider");return e}},5662:(e,t,n)=>{"use strict";n.d(t,{j:()=>a,db:()=>l,A:()=>c});var r=n(7150);(0,r.KO)("firebase","11.7.1","app");var i=n(2779),s=n(5472);const o=(0,r.Dk)().length?(0,r.Sx)():(0,r.Wp)({apiKey:"AIzaSyCDh7j0aeW7vdWACbscpZXfilCtdOk_is4",authDomain:"appcenter-cd3a5.firebaseapp.com",projectId:"appcenter-cd3a5",storageBucket:"appcenter-cd3a5.firebasestorage.app",messagingSenderId:"812030845655",appId:"1:812030845655:web:aee95886ea9fe600c10692",databaseURL:"https://appcenter-cd3a5-default-rtdb.firebaseio.com"}),a=(0,i.xI)(o),l=(0,s.aU)(o);console.log("Firebase initialized");const c=o},9963:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5043);function i(){const[e,t]=(0,r.useState)((()=>"visible"===document.visibilityState));return(0,r.useEffect)((()=>{const e=()=>t("visible"===document.visibilityState);return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)}),[]),e}},9247:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5043);const i=function(e,t){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const[s,o]=(0,r.useState)(null),a=(0,r.useRef)(e),l=(0,r.useRef)(t),c=(0,r.useRef)(i),u=(0,r.useRef)(n);(0,r.useEffect)((()=>{a.current=e,l.current=t,c.current=i,u.current=n}));const h=(0,r.useRef)(null),d=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(!u.current||!c.current)return;a.current.some((e=>null!==document.getElementById(e)))&&(s?c.current(`/${s}`,{replace:!0}):c.current("/",{replace:!0}))}),[s]),(0,r.useEffect)((()=>{const e=()=>{d.current||(d.current=!0,requestAnimationFrame((()=>{var e;const t=window.scrollY,n=a.current,r=window.innerHeight,i="function"===typeof l.current?l.current():null!==(e=l.current)&&void 0!==e?e:0;if(t<10)return null!==h.current&&(h.current=null,o(null)),void(d.current=!1);if(t+r>=document.body.scrollHeight-50){const e=n[n.length-1];return h.current!==e&&(h.current=e,o(e)),void(d.current=!1)}const s=.08*(r-i);let c=null,u=0,f=0;for(const o of n){const e=document.getElementById(o);if(!e)continue;const t=e.getBoundingClientRect(),n=Math.max(t.top,i),s=Math.min(t.bottom,r),a=Math.max(0,s-n),l=t.height>0?a/t.height:0;l>u&&(u=l,f=a,c=o)}const p=f>=s?c:null;p!==h.current&&(h.current=p,o(p)),d.current=!1})))};return window.addEventListener("scroll",e,{passive:!0}),e(),()=>window.removeEventListener("scroll",e)}),[]),s}},358:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>l,T4:()=>o,d2:()=>a});var r=n(5662),i=n(2779);const s="_nw_geo",o=7;function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return`${e.getFullYear()}
2-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}const l=new class{constructor(){this.isOnline=navigator.onLine,this.firestoreEnabled=!0,this.realtimeDbEnabled=!0,this.connectionListeners=new Set,this.initialized=!1,this.mySessionRef=null,this.sessionOnDisconnectArmed=!1,this.heartbeatTimer=null,this.totalClients=0,this.database=null,this.clientIp="",this.clientIpPromise=null,this.geo=null,this.visitLogged=!1,this.ipBanChecked=!1,this.ipBanListeners=new Set,this.myVisitRef=null,this.journeyKey=null,this.journeyPath=null,this.identity={registered:!1,uid:null,name:null,email:null},this.rtdb=null}async initialize(){if(!this.initialized)try{const e=await n.e(3611).then(n.bind(n,3611));this.rtdb=e;const{getDatabase:t,ref:s,onValue:o}=e;this.database=t();const a=this._getSessionId();this.mySessionRef=s(this.database,`active_sessions_list/${a}`);const l=s(this.database,".info/connected");this._fetchClientIp(),this.identity=this._readIdentity(),(0,i.hg)(r.j,(()=>{this.identity=this._readIdentity(),this._writeSession(),this._writeVisitIdentity(),this._writeLastSeen()})),window.addEventListener("online",this.handleOnline.bind(this)),window.addEventListener("offline",this.handleOffline.bind(this)),o(l,(e=>{e.val()?(this.notifyListeners({type:"realtime-db",connected:!0}),this._armSessionOnDisconnect(),this._writeSession(),this._startHeartbeat()):(this.notifyListeners({type:"realtime-db",connected:!1}),this._stopHeartbeat())}),(e=>{console.error("Error monitoring Realtime Database connection:",e)})),this.initialized=!0}catch(e){console.error("Error initializing connection service:",e)}}_getSessionId(){let e=sessionStorage.getItem("_nw_sid");return e||(e=Math.random().toString(36).slice(2)+Date.now().toString(36),sessionStorage.setItem("_nw_sid",e)),`s_${e}`}_readIdentity(){const e=r.j.currentUser,t=!(!e||e.isAnonymous);return{registered:t,uid:t?e.uid:null,name:t&&e.displayName||null,email:t&&e.email||null}}_onIpResolved(){return this._writeSession(),this._logVisit(),this._checkIpBan(),this.clientIp}_fetchClientIp(){if(this.clientIp)return Promise.resolve(this.clientIp);if(this.clientIpPromise)return this.clientIpPromise;const e=this._readCachedGeo();return e?(this.clientIpPromise=Promise.resolve().then((()=>(this.clientIp=e.ip,this.geo=e.geo||null,this._onIpResolved()))),this.clientIpPromise):(this.clientIpPromise=fetch("https://api.neuralward.com/auth/geo").then((e=>e.json())).then((e=>(this.clientIp=e.ip||"",e.country&&(this.geo={country:e.country,countryName:e.countryName||e.country,region:e.region||"",city:e.city||"",lat:"number"===typeof e.lat?e.lat:null,lon:"number"===typeof e.lon?e.lon:null}),this._cacheGeo(),this._onIpResolved()))).catch((()=>fetch("https://api.ipify.org?format=json").then((e=>e.json())).then((e=>(this.clientIp=e.ip||"",this._cacheGeo(),this._onIpResolved()))).catch((()=>(this.clientIp="",""))))),this.clientIpPromise)}_readCachedGeo(){try{const e=sessionStorage.getItem(s);if(!e)return null;const t=JSON.parse(e);return t&&t.ip?t:null}catch{return null}}_cacheGeo(){if(this.clientIp)try{sessionStorage.setItem(s,JSON.stringify({ip:this.clientIp,geo:this.geo}))}catch{}}onIpBanned(e){return this.ipBanListeners.add(e),()=>this.ipBanListeners.delete(e)}async _checkIpBan(){if(this.ipBanChecked||!this.clientIp)return;this.ipBanChecked=!0;const{isIpBanned:e}=await n.e(7744).then(n.bind(n,7744));await e(this.clientIp)&&this.ipBanListeners.forEach((e=>{try{e(this.clientIp)}catch(t){console.error("ConnectionService: ip-ban listener failed",t)}}))}_logVisit(){var e,t,n,r,i,s,o,l;if(this.visitLogged||!this.database||!this.rtdb)return;if(!this.clientIp)return;this.visitLogged=!0;const{ref:c,set:u,update:h,serverTimestamp:d}=this.rtdb,f=this._getSessionId(),p=a(),m=c(this.database,`visit_geo/${p}/${f}`);this.myVisitRef=m;const g=`_nw_visit_${p}`,v="1"===sessionStorage.getItem(g),y={ip:this.clientIp,country:(null===(e=this.geo)||void 0===e?void 0:e.country)||"",countryName:(null===(t=this.geo)||void 0===t?void 0:t.countryName)||"",region:(null===(n=this.geo)||void 0===n?void 0:n.region)||"",city:(null===(r=this.geo)||void 0===r?void 0:r.city)||"",lat:null!==(i=null===(s=this.geo)||void 0===s?void 0:s.lat)&&void 0!==i?i:null,lon:null!==(o=null===(l=this.geo)||void 0===l?void 0:l.lon)&&void 0!==o?o:null,registered:this.identity.registered,uid:this.identity.uid||null,name:this.identity.name||null,email:this.identity.email||null,lastSeen:d()};(v?h(m,y):u(m,{...y,at:d()})).then((()=>{sessionStorage.setItem(g,"1"),this._startJourneySegment(window.location.pathname),this._writeLastSeen()})).catch((e=>{this.myVisitRef=null,this.visitLogged=!1,console.error("ConnectionService: failed to log visit",e)}))}_writeVisitIdentity(){if(!this.myVisitRef||!this.rtdb||!this.identity.registered)return;const{update:e}=this.rtdb;e(this.myVisitRef,{registered:!0,uid:this.identity.uid||null,name:this.identity.name||null,email:this.identity.email||null}).catch((()=>{}))}_writeLastSeen(){if(!this.database||!this.rtdb||!this.identity.registered)return;if(!this.identity.uid)return;const{ref:e,update:t,serverTimestamp:n}=this.rtdb;t(e(this.database,`last_seen/${this.identity.uid}`),{at:n(),ip:this.clientIp||"",page:window.location.pathname}).catch((()=>{}))}notePage(e){this.myVisitRef&&e&&e!==this.journeyPath&&(this._closeJourneySegment(),this._startJourneySegment(e))}_closeJourneySegment(){if(!this.myVisitRef||!this.rtdb||!this.journeyKey)return;const{child:e,update:t,onDisconnect:n,serverTimestamp:r}=this.rtdb,i=e(this.myVisitRef,`journey/${this.journeyKey}`);n(i).cancel().catch((()=>{})),t(i,{to:r()}).catch((()=>{})),this.journeyKey=null,this.journeyPath=null}_startJourneySegment(e){if(!this.myVisitRef||!this.rtdb)return;const{push:t,child:n,set:r,onDisconnect:i,serverTimestamp:s}=this.rtdb,o=t(n(this.myVisitRef,"journey"));this.journeyKey=o.key,this.journeyPath=e,r(o,{path:String(e).slice(0,200),from:s(),to:s()}).then((()=>{i(o).update({to:s()}).catch((()=>{}))})).catch((()=>{this.journeyKey=null,this.journeyPath=null}))}_armSessionOnDisconnect(){if(this.sessionOnDisconnectArmed||!this.mySessionRef||!this.rtdb)return;const{onDisconnect:e}=this.rtdb;e(this.mySessionRef).remove().then((()=>{this.sessionOnDisconnectArmed=!0}
2)).catch((e=>{console.error("ConnectionService: failed to arm session onDisconnect",e)}))}_writeSession(){var e,t,n,r,i,s,o;if(!this.mySessionRef||!this.rtdb)return;const{set:a,serverTimestamp:l}=this.rtdb,c={ip:this.clientIp||"",country:(null===(e=this.geo)||void 0===e?void 0:e.country)||"",region:(null===(t=this.geo)||void 0===t?void 0:t.region)||"",city:(null===(n=this.geo)||void 0===n?void 0:n.city)||"",lat:null!==(r=null===(i=this.geo)||void 0===i?void 0:i.lat)&&void 0!==r?r:null,lon:null!==(s=null===(o=this.geo)||void 0===o?void 0:o.lon)&&void 0!==s?s:null,registered:this.identity.registered,uid:this.identity.uid||null,name:this.identity.name||null,email:this.identity.email||null,page:window.location.pathname,lastSeen:l()};a(this.mySessionRef,c).catch((e=>{console.error("ConnectionService: failed to write session",e)}))}_startHeartbeat(){this.heartbeatTimer||(this.heartbeatTimer=setInterval((()=>{if(!this.mySessionRef||!this.rtdb)return;const{update:e,serverTimestamp:t}=this.rtdb;if(e(this.mySessionRef,{lastSeen:t(),page:window.location.pathname}).catch((()=>{})),this.myVisitRef){const n={lastSeen:t()};this.journeyKey&&(n[`journey/${this.journeyKey}/to`]=t()),e(this.myVisitRef,n).catch((()=>{}))}this._writeLastSeen()}),45e3))}_stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}async subscribeToSessions(e){const{getDatabase:t,ref:r,onValue:i}=await n.e(3611).then(n.bind(n,3611));return i(r(this.database||t(),"active_sessions_list"),(t=>{const n=t.val()||{},r=Date.now(),i=new Map,s=new Map;Object.entries(n).forEach((e=>{let[t,n]=e;if(n&&"object"===typeof n&&!("number"!==typeof n.lastSeen||n.lastSeen<r-18e4))if(n.registered&&n.uid){const e=i.get(n.uid);(!e||n.lastSeen>e.lastSeen)&&i.set(n.uid,{...n,key:t})}else{const e=n.ip||`unknown_${t}`,r=s.get(e)||{ip:n.ip||"",page:n.page||"",lastSeen:0,count:0,country:"",region:"",city:"",lat:null,lon:null};r.count+=1,n.lastSeen>r.lastSeen&&(r.lastSeen=n.lastSeen,r.page=n.page||"",r.country=n.country||"",r.region=n.region||"",r.city=n.city||"",r.lat="number"===typeof n.lat?n.lat:null,r.lon="number"===typeof n.lon?n.lon:null),s.set(e,r)}}));const o=[...Array.from(i.values()).map((e=>({kind:"registered",uid:e.uid,ip:e.ip||"",name:e.name||null,email:e.email||null,page:e.page||"",lastSeen:e.lastSeen,count:1,country:e.country||"",region:e.region||"",city:e.city||"",lat:"number"===typeof e.lat?e.lat:null,lon:"number"===typeof e.lon?e.lon:null}))),...Array.from(s.values()).map((e=>({kind:"guest",uid:null,ip:e.ip||"",name:null,email:null,page:e.page||"",lastSeen:e.lastSeen,count:e.count,country:e.country||"",region:e.region||"",city:e.city||"",lat:"number"===typeof e.lat?e.lat:null,lon:"number"===typeof e.lon?e.lon:null})))];this.totalClients=o.length,e({count:o.length,sessions:o,registeredCount:i.size,guestCount:s.size})}),(t=>{console.error("ConnectionService: error subscribing to sessions:",t),e({count:0,sessions:[],registeredCount:0,guestCount:0})}))}async handleOnline(){this.isOnline=!0,await this.updateConnectionState(!0),this.notifyListeners({type:"browser",connected:!0})}async handleOffline(){this.isOnline=!1,await this.updateConnectionState(!1),this.notifyListeners({type:"browser",connected:!1})}async updateConnectionState(e){try{const{enableNetwork:t,disableNetwork:i}=await Promise.resolve().then(n.bind(n,5472));if(e){if(this.firestoreEnabled||(await t(r.db),this.firestoreEnabled=!0),this.database&&!this.realtimeDbEnabled){const{goOnline:e}=await n.e(3611).then(n.bind(n,3611));e(this.database),this.realtimeDbEnabled=!0}}else if(this.firestoreEnabled&&(await i(r.db),this.firestoreEnabled=!1),this.database&&this.realtimeDbEnabled){const{goOffline:e}=await n.e(3611).then(n.bind(n,3611));e(this.database),this.realtimeDbEnabled=!1}}catch(t){console.error("Error updating Firebase connection state:",t)}}addConnectionListener(e){if("function"!==typeof e)throw new Error("Connection listener must be a function");return this.connectionListeners.add(e),()=>{this.connectionListeners.delete(e)}}
2notifyListeners(e){this.connectionListeners.forEach((t=>{try{t(e)}catch(n){console.error("Error in connection listener:",n)}}))}getConnectionStatus(){return{browser:this.isOnline,firestore:this.firestoreEnabled,realtimeDb:this.realtimeDbEnabled,initialized:this.initialized,totalClients:this.totalClients}}async forceReconnect(){if(this.initialized)try{await this.updateConnectionState(!1),setTimeout((async()=>{await this.updateConnectionState(!0)}),1e3)}catch(e){console.error("Error during forced reconnection:",e)}}cleanup(){if(this.initialized&&(window.removeEventListener("online",this.handleOnline.bind(this)),window.removeEventListener("offline",this.handleOffline.bind(this)),this.connectionListeners.clear(),this._stopHeartbeat(),this.initialized=!1,this.mySessionRef&&this.rtdb)){const{onDisconnect:e,remove:t}=this.rtdb;e(this.mySessionRef).cancel().catch((()=>{})),t(this.mySessionRef).catch((()=>{})),this.mySessionRef=null,this.sessionOnDisconnectArmed=!1}}}},6823:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5662);const i=new class{constructor(){this.listeners=new Map,this.notifications=new Map,this.unsubscribe=null}async startListening(e,t){if(!e)return;this.unsubscribe&&this.unsubscribe();const{collection:i,query:s,where:o,orderBy:a,onSnapshot:l}=await Promise.resolve().then(n.bind(n,5472)),c=s(i(r.db,"notifications"),o("userId","==",e),o("status","!=","deleted"),a("status","asc"),a("createdAt","desc"));this.unsubscribe=l(c,(e=>{const n=[];e.forEach((e=>{var t,r;const i=e.data(),s={id:e.id,...i,createdAt:(null===(t=i.createdAt)||void 0===t?void 0:t.toDate())||new Date,statusUpdatedAt:(null===(r=i.statusUpdatedAt)||void 0===r?void 0:r.toDate())||null};n.push(s)})),this.notifications.clear(),n.forEach((e=>{this.notifications.set(e.id,e)})),this.listeners.forEach((e=>{e(n)})),t&&t(n)}),(e=>{console.error("Error in notification listener:",e)}))}stopListening(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null),this.notifications.clear(),this.listeners.clear()}subscribe(e,t){if(!e||"function"!==typeof t)return()=>{};if(this.listeners.set(e,t),this.notifications.size>0){t(Array.from(this.notifications.values()))}return()=>{this.listeners.delete(e)}}async createNotification(e,t){try{if(!e)throw new Error("userId is required");const{collection:i,doc:s,setDoc:o,serverTimestamp:a,Timestamp:l}=await Promise.resolve().then(n.bind(n,5472)),c=s(i(r.db,"notifications")),u=["success","error","warning","info","system"].includes(t.type)?t.type:"info",h={id:c.id,userId:e,title:t.title||"Notification",message:t.message||"",type:u,link:t.link||null,linkText:t.linkText||null,status:"active",statusUpdatedAt:a(),createdAt:a(),expiresAt:l.fromDate(new Date(Date.now()+2592e6))};return t.userName&&(h.userName=t.userName),t.userAvatar&&(h.userAvatar=t.userAvatar),t.action&&(h.action=t.action),t.meta&&(h.meta=t.meta),await o(c,h),h}catch(i){throw console.error("Error creating notification:",i),i}}async createAdminNotification(e){try{const{collection:s,addDoc:o,doc:a,getDoc:l,getDocs:c,query:u,where:h,serverTimestamp:d}=await Promise.resolve().then(n.bind(n,5472)),f=await o(s(r.db,"banAppeals"),{...e,status:"pending",createdAt:d(),reviewedBy:null,reviewedAt:null,decision:null}),p=r.j.currentUser;try{if(p){var t;const n=(await l(a(r.db,"users",p.uid))).data();if(null!==n&&void 0!==n&&null!==(t=n.permissions)&&void 0!==t&&t.isAdmin){const t=u(s(r.db,"users"),h("permissions.isAdmin","==",!0)),n=await c(t),i=[];if(n.forEach((e=>{i.push({id:e.id,...e.data()})})),i.length>0){const t=i.map((t=>this.createNotification(t.id,{title:"Ban Appeal Request"+(e.userId?` from User ${e.userId}`:""),message:e.message.substring(0,100)+(e.message.length>100?"...":""),type:"system",link:`/admin/appeals/${f.id}`,meta:{appealId:f.id}})));await Promise.all(t)}}}}catch(i){console.error("Error notifying admins about appeal:",i)}return{id:f.id,...e}}catch(i){throw console.error("Error creating admin notification:",i),i}}async createStatusNotification(e,t){let{title:n,message:r,type:i="info",link:s=null,linkText:o=null}=t;return e?this.createNotification(e,{title:n,message:r,type:i,link:s,linkText:o}):null}async createSocialNotification(e,t){let{userName:n,userAvatar:r,action:i,message:s,link:o=null}=t;return e?this.createNotification(e,{title:n,message:s,type:"info",link:o,userName:n,userAvatar:r,action:i}):null}async markAsRead(e){try{if(!e)return;const{doc:t,updateDoc:i,serverTimestamp:s}
2=await Promise.resolve().then(n.bind(n,5472)),o=t(r.db,"notifications",e),a=this.notifications.get(e);a&&["active","new"].includes(a.status)&&await i(o,{status:"read",statusUpdatedAt:s()})}catch(t){throw console.error("Error marking notification as read:",t),t}}async markAllAsRead(e){try{if(!e)return;const{collection:t,query:i,where:s,getDocs:o,updateDoc:a,serverTimestamp:l}=await Promise.resolve().then(n.bind(n,5472)),c=i(t(r.db,"notifications"),s("userId","==",e),s("status","==","new")),u=(await o(c)).docs.map((e=>a(e.ref,{status:"read",statusUpdatedAt:l()})));await Promise.all(u)}catch(t){throw console.error("Error marking all notifications as read:",t),t}}async closeNotification(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{if(!e)return;const{doc:i,updateDoc:s,serverTimestamp:o}=await Promise.resolve().then(n.bind(n,5472)),a=i(r.db,"notifications",e),l=t.markAsRead?"read":"new";await s(a,{status:l,statusUpdatedAt:o()})}catch(i){throw console.error("Error closing notification:",i),i}}async reopenNotification(e){try{if(!e)return;const{doc:t,updateDoc:i,serverTimestamp:s}=await Promise.resolve().then(n.bind(n,5472)),o=t(r.db,"notifications",e);await i(o,{status:"active",statusUpdatedAt:s()})}catch(t){throw console.error("Error reopening notification:",t),t}}async dismissNotification(e){try{if(!e)return;const{doc:t,updateDoc:i,serverTimestamp:s}=await Promise.resolve().then(n.bind(n,5472)),o=t(r.db,"notifications",e);await i(o,{status:"dismissed",statusUpdatedAt:s()})}catch(t){throw console.error("Error dismissing notification:",t),t}}async cleanupExpiredNotifications(e){try{if(!e)return;const{collection:t,query:i,where:s,getDocs:o,updateDoc:a,serverTimestamp:l,Timestamp:c}=await Promise.resolve().then(n.bind(n,5472)),u=i(t(r.db,"notifications"),s("userId","==",e),s("expiresAt","<=",c.now()),s("status","!=","deleted")),h=(await o(u)).docs.map((e=>a(e.ref,{status:"deleted",statusUpdatedAt:l(),deletionReason:"expired"})));await Promise.all(h)}catch(t){console.error("Error cleaning up expired notifications:",t)}}async cleanupOldNotifications(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30;try{if(!e)return;const{collection:s,query:o,where:a,orderBy:l,getDocs:c,updateDoc:u,serverTimestamp:h}=await Promise.resolve().then(n.bind(n,5472)),d=o(s(r.db,"notifications"),a("userId","==",e),a("status","!=","deleted"),l("createdAt","desc")),f=(await c(d)).docs.map((e=>{var t;return{id:e.id,ref:e.ref,...e.data(),createdAt:(null===(t=e.data().createdAt)||void 0===t?void 0:t.toDate())||new Date}})),p=new Date;p.setDate(p.getDate()-t);const m=[],g=f.filter((e=>e.createdAt<p));m.push(...g);const v=f.filter((e=>!m.includes(e)));v.length>i&&(v.sort(((e,t)=>e.createdAt-t.createdAt)),m.push(...v.slice(0,v.length-i)));const y=m.map((e=>u(e.ref,{status:"deleted",statusUpdatedAt:h(),deletionReason:"automatic-cleanup"})));await Promise.all(y)}catch(s){console.error("Error cleaning up old notifications:",s)}}getActiveCount(){let e=0;return this.notifications.forEach((t=>{"active"===t.status&&e++})),e}getUnreadCount(){let e=0;return this.notifications.forEach((t=>{"new"===t.status&&e++})),e}}},2578:(e,t,n)=>{"use strict";n.d(t,{C:()=>l,s:()=>a});const r=["pointerdown","pointermove","keydown","wheel","touchstart","scroll"];let i=!1;const s=new Set;function o(){i||(i=!0,r.forEach((e=>window.removeEventListener(e,o))),s.forEach((e=>{try{e()}catch(t){console.error("firstInteraction callback failed:",t)}})),s.clear())}function a(e){i?e():s.add(e)}function l(){return i}r.forEach((e=>window.addEventListener(e,o,{passive:!0})))},1283:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a,_Q:()=>c,ow:()=>l});var r=n(2578);const i="ti-js",s="//app.truconversion.com/ti-js/63556/60922.js";function o(){if(document.getElementById(i))return;const e=document.createElement("script");e.id=i,e.async=!0,e.src=window.location.protocol+s;const t=document.getElementsByTagName("script")[0];t&&t.parentNode?t.parentNode.insertBefore(e,t):document.head.appendChild(e)}function a(){"1"===new URLSearchParams(window.location.search).get("tc")?o():(0,r.s)(o)}function l(e){e&&window._tip.push(["_trackIdentity",e])}function c(e){if(e&&"function"===typeof window.tcjs)try{window.tcjs("trigger","cf",e)}catch(t){console.warn("TruConversion trigger failed:",e,t)}}"undefined"!==typeof window&&(window._tip=window._tip||[])}
2,1529:(e,t,n)=>{"use strict";n.d(t,{cY:()=>w,FA:()=>D,g:()=>R,gz:()=>Q,vA:()=>i,Hk:()=>s,K3:()=>a,u:()=>h,KA:()=>c,Uj:()=>u,gR:()=>V,Fy:()=>x,tD:()=>Y,A4:()=>d,bD:()=>q,dI:()=>Z,hp:()=>K,T9:()=>y,Tj:()=>g,yU:()=>v,XA:()=>b,mS:()=>p,Ku:()=>ne,ZQ:()=>S,qc:()=>U,sr:()=>T,zJ:()=>re,c1:()=>k,Im:()=>B,lT:()=>C,zW:()=>P,jZ:()=>E,$g:()=>A,lV:()=>_,nr:()=>I,Cv:()=>F,$L:()=>j,kH:()=>$,gE:()=>ie,Am:()=>W,I9:()=>G,yw:()=>z,OE:()=>te,kj:()=>ee,As:()=>L,eX:()=>N});const r={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},i=function(e,t){if(!e)throw s(t)},s=function(e){return new Error("Firebase Database ("+r.SDK_VERSION+") INTERNAL ASSERT FAILED: "+e)},o=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296===(64512&i)&&r+1<e.length&&56320===(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},a={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"===typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<e.length;i+=3){const t=e[i],s=i+1<e.length,o=s?e[i+1]:0,a=i+2<e.length,l=a?e[i+2]:0,c=t>>2,u=(3&t)<<4|o>>4;let h=(15&o)<<2|l>>6,d=63&l;a||(d=64,s||(h=64)),r.push(n[c],n[u],n[h],n[d])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(o(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&s)}else if(i>239&&i<365){const s=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(s>>10)),t[r++]=String.fromCharCode(56320+(1023&s))}else{const s=e[n++],o=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&s)<<6|63&o)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<e.length;){const t=n[e.charAt(i++)],s=i<e.length?n[e.charAt(i)]:0;++i;const o=i<e.length?n[e.charAt(i)]:64;++i;const a=i<e.length?n[e.charAt(i)]:64;if(++i,null==t||null==s||null==o||null==a)throw new l;const c=t<<2|s>>4;if(r.push(c),64!==o){const e=s<<4&240|o>>2;if(r.push(e),64!==a){const e=o<<6&192|a;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class l extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const c=function(e){const t=o(e);return a.encodeByteArray(t,!0)},u=function(e){return c(e).replace(/\./g,"")},h=function(e){try{return a.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function d(e){return f(void 0,e)}function f(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(const n in t)t.hasOwnProperty(n)&&"__proto__"!==n&&(e[n]=f(e[n],t[n]));return e}function p(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n.g)return n.g;throw new Error("Unable to locate global object.")}const m=()=>{try{return p().__FIREBASE_DEFAULTS__||(()=>{if("undefined"===typeof process)return;const e={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyCDh7j0aeW7vdWACbscpZXfilCtdOk_is4",REACT_APP_FIREBASE_AUTH_DOMAIN:"appcenter-cd3a5.firebaseapp.com",REACT_APP_FIREBASE_PROJECT_ID:"appcenter-cd3a5",REACT_APP_FIREBASE_STORAGE_BUCKET:"appcenter-cd3a5.firebasestorage.app",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"812030845655",REACT_APP_FIREBASE_APP_ID:"1:812030845655:web
2:aee95886ea9fe600c10692",REACT_APP_GOOGLE_CLIENT_ID:"812030845655-konlhpivvc0vhluqp60n1i8mq50b0mep.apps.googleusercontent.com",REACT_APP_AUTH_LAMBDA_URL:"https://o2bo2ah64basqr2kwap5i3c2fy0idgrv.lambda-url.us-west-2.on.aws/",REACT_APP_PAYPAL_CLIENT_ID:"BAAQZr370m-afgluC_24px7yi_TfXNiKXZ1tJc3-LG7IUTVupyC0Z9_kmDu9WFWFswwRpa3_TGIkwQrwdA",REACT_APP_MERCADOPAGO_USER_ID:"39781516",REACT_APP_API_URL:"https://4prb97zuq2.execute-api.us-west-2.amazonaws.com/prod",REACT_APP_S3_UPLOAD_API_URL:"https://d2vxq5dko3.execute-api.us-west-2.amazonaws.com/Prod/generate-upload-url",REACT_APP_MERCADOPAGO_PUBLIC_KEY:"APP_USR-3bc49a54-7b7e-4714-a9a2-9d68dae23d30",REACT_APP_GIFT_EMAIL_WEBHOOK:"https://4prb97zuq2.execute-api.us-west-2.amazonaws.com/prod/send-gift-email",REACT_APP_N8N_CHAT_WEBHOOK:"https://api.neuralward.com/chat",REACT_APP_N8N_LEAD_WEBHOOK:"https://n8n.srv1175638.hstgr.cloud/webhook/lead",REACT_APP_AI_ASSISTANT_NAME:"Neuralward AI",REACT_APP_CHAT_ROUTING:"n8n",REACT_APP_GEMINI_BUDGET:"30",REACT_APP_PADDLE_ENVIRONMENT:"sandbox",REACT_APP_PADDLE_CLIENT_TOKEN:"test_8bf4d1dee1e3bbda614d9ddfc16",REACT_APP_PADDLE_ALLOW_SANDBOX_IN_PROD:"true",REACT_APP_PADDLE_MODE:"dynamic",REACT_APP_PAYMENTS_API_URL:"https://api.neuralward.com"}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"===typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(n){return}const t=e&&h(e[1]);return t&&JSON.parse(t)})()}catch(e){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`)}},g=e=>{var t,n;return null===(n=null===(t=m())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},v=e=>{const t=g(e);
2if(!t)return;const n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error(`Invalid host ${t} with no separate hostname and port!`);const r=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),r]:[t.substring(0,n),r]},y=()=>{var e;return null===(e=m())||void 0===e?void 0:e.config},b=e=>{var t;return null===(t=m())||void 0===t?void 0:t[`_${e}`]};class w{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"===typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,n))}}}function x(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const s=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[u(JSON.stringify({alg:"none",type:"JWT"})),u(JSON.stringify(s)),""].join(".")}function S(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function E(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(S())}function k(){return"undefined"!==typeof navigator&&"Cloudflare-Workers"===navigator.userAgent}function T(){const e="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof e&&void 0!==e.id}function _(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function C(){const e=S();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function A(){return!0===r.NODE_CLIENT||!0===r.NODE_ADMIN}function I(){return!function(){var e;const t=null===(e=m())||void 0===e?void 0:e.forceEnvironment;if("node"===t)return!0;if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(n.g.process)}catch(r){return!1}}()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function P(){try{return"object"===typeof indexedDB}catch(e){return!1}}function N(){return new Promise(((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(n){t(n)}}))}class R extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,R.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,D.prototype.create)}}class D{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e){const t=(arguments.length<=1?void 0:arguments[1])||{},n=`${this.service}/${e}`,r=this.errors[e],i=r?function(e,t){return e.replace(O,((e,n)=>{const r=t[n];return null!=r?String(r):`<${n}?>`}))}(r,t):"Error",s=`${this.serviceName}: ${i} (${n}).`;return new R(n,s,t)}}const O=/\{\$([^}]+)}/g;function j(e){return JSON.parse(e)}function L(e){return JSON.stringify(e)}const M=function(e){let t={},n={},r={},i="";try{const s=e.split(".");t=j(h(s[0])||""),n=j(h(s[1])||""),i=s[2],r=n.d||{},delete n.d}catch(s){}return{header:t,claims:n,data:r,signature:i}},F=function(e){const t=M(e).claims;return!!t&&"object"===typeof t&&t.hasOwnProperty("iat")},U=function(e){const t=M(e).claims;return"object"===typeof t&&!0===t.admin};function V(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function z(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0}function B(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function $(e,t,n){const r={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t.call(n,e[i],i,e));return r}function q(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const n=e[i],s=t[i];if(H(n)&&H(s)){if(!q(n,s))return!1}else if(n!==s)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function H(e){return null!==e&&"object"===typeof e}function W(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach((e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))})):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function G(e){const t={};return e.replace(/^\?/,"").split("&").forEach((e=>{if(e){const[n,r]=e.split("=");
2t[decodeURIComponent(n)]=decodeURIComponent(r)}})),t}function K(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}class Q{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(let e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}reset(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0}compress_(e,t){t||(t=0);const n=this.W_;if("string"===typeof e)for(let u=0;u<16;u++)n[u]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(let u=0;u<16;u++)n[u]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(let u=16;u<80;u++){const e=n[u-3]^n[u-8]^n[u-14]^n[u-16];n[u]=4294967295&(e<<1|e>>>31)}let r,i,s=this.chain_[0],o=this.chain_[1],a=this.chain_[2],l=this.chain_[3],c=this.chain_[4];for(let u=0;u<80;u++){u<40?u<20?(r=l^o&(a^l),i=1518500249):(r=o^a^l,i=1859775393):u<60?(r=o&a|l&(o|a),i=2400959708):(r=o^a^l,i=3395469782);const e=(s<<5|s>>>27)+r+c+i+n[u]&4294967295;c=l,l=a,a=4294967295&(o<<30|o>>>2),o=s,s=e}this.chain_[0]=this.chain_[0]+s&4294967295,this.chain_[1]=this.chain_[1]+o&4294967295,this.chain_[2]=this.chain_[2]+a&4294967295,this.chain_[3]=this.chain_[3]+l&4294967295,this.chain_[4]=this.chain_[4]+c&4294967295}update(e,t){if(null==e)return;void 0===t&&(t=e.length);const n=t-this.blockSize;let r=0;const i=this.buf_;let s=this.inbuf_;for(;r<t;){if(0===s)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"===typeof e){for(;r<t;)if(i[s]=e.charCodeAt(r),++s,++r,s===this.blockSize){this.compress_(i),s=0;break}}else for(;r<t;)if(i[s]=e[r],++s,++r,s===this.blockSize){this.compress_(i),s=0;break}}this.inbuf_=s,this.total_+=t}digest(){const e=[];let t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(let r=this.blockSize-1;r>=56;r--)this.buf_[r]=255&t,t/=256;this.compress_(this.buf_);let n=0;for(let r=0;r<5;r++)for(let t=24;t>=0;t-=8)e[n]=this.chain_[r]>>t&255,++n;return e}}function Y(e,t){const n=new X(e,t);return n.subscribe.bind(n)}class X{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((()=>{e(this)})).catch((e=>{this.error(e)}))}next(e){this.forEachObserver((t=>{t.next(e)}))}error(e){this.forEachObserver((t=>{t.error(e)})),this.close(e)}complete(){this.forEachObserver((e=>{e.complete()})),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");r=function(e,t){if("object"!==typeof e||null===e)return!1;for(const n of t)if(n in e&&"function"===typeof e[n])return!0;return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n},void 0===r.next&&(r.next=J),void 0===r.error&&(r.error=J),void 0===r.complete&&(r.complete=J);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}})),this.observers.push(r),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then((()=>
2{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(n){"undefined"!==typeof console&&console.error&&console.error(n)}}))}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((()=>{this.observers=void 0,this.onNoObservers=void 0})))}}function J(){}function Z(e,t){return`${e} failed: ${t} argument `}const ee=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);if(s>=55296&&s<=56319){const t=s-55296;r++,i(r<e.length,"Surrogate pair missing trail surrogate.");s=65536+(t<<10)+(e.charCodeAt(r)-56320)}s<128?t[n++]=s:s<2048?(t[n++]=s>>6|192,t[n++]=63&s|128):s<65536?(t[n++]=s>>12|224,t[n++]=s>>6&63|128,t[n++]=63&s|128):(t[n++]=s>>18|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128,t[n++]=63&s|128)}return t},te=function(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);r<128?t++:r<2048?t+=2:r>=55296&&r<=56319?(t+=4,n++):t+=3}return t};function ne(e){return e&&e._delegate?e._delegate:e}function re(e){return e.endsWith(".cloudworkstations.dev")}async function ie(e){return(await fetch(e,{credentials:"include"})).ok}},2740:e=>{"use strict";e.exports=function(e,t,n,r,i,s,o,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,s,o,a],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},7004:(e,t,n)=>{"use strict";var r=n(8853),i=n(5043),s=n(7950);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}var l=Symbol.for("react.element"),c=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),m=Symbol.for("react.consumer"),g=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),x=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var S=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var E=Symbol.for("react.memo_cache_sentinel"),k=Symbol.iterator;function T(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=k&&e[k]||e["@@iterator"])?e:null}var _=Symbol.for("react.client.reference");function C(e){if(null==e)return null;if("function"===typeof e)return e.$$typeof===_?null:e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case h:return"Fragment";case u:return"Portal";case f:return"Profiler";case d:return"StrictMode";case y:return"Suspense";case b:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case g:return(e.displayName||"Context")+".Provider";case m:return(e._context.displayName||"Context")+".Consumer";case v:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case w:return null!==(t=e.displayName||null)?t:C(e.type)||"Memo";case x:t=e._payload,e=e._init;try{return C(e(t))}catch(n){}}return null}var A,I,P=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=Object.assign;function R(e){if(void 0===A)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);A=t&&t[1]||"",I=-1<n.stack.indexOf("\n at")?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+A+e+I}var D=!1;function O(e,t){if(!e||D)return"";D=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(i){var r=i}Reflect.construct(e,[],n)}
vendor: 5,108 bytes, line 2
2else{try{n.call()}catch(s){r=s}e.call(n.prototype)}}else{try{throw Error()}catch(o){r=o}(n=e())&&"function"===typeof n.catch&&n.catch((function(){}))}}catch(a){if(a&&r&&"string"===typeof a.stack)return[a.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=r.DetermineComponentFrameRoot(),o=s[0],a=s[1];if(o&&a){var l=o.split("\n"),c=a.split("\n");for(i=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;i<c.length&&!c[i].includes("DetermineComponentFrameRoot");)i++;if(r===l.length||i===c.length)for(r=l.length-1,i=c.length-1;1<=r&&0<=i&&l[r]!==c[i];)i--;for(;1<=r&&0<=i;r--,i--)if(l[r]!==c[i]){if(1!==r||1!==i)do{if(r--,0>--i||l[r]!==c[i]){var u="\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=r&&0<=i);break}}}finally{D=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?R(n):""}function j(e){switch(e.tag){case 26:case 27:case 5:return R(e.type);case 16:return R("Lazy");case 13:return R("Suspense");case 19:return R("SuspenseList");case 0:case 15:return e=O(e.type,!1);case 11:return e=O(e.type.render,!1);case 1:return e=O(e.type,!0);default:return""}}function L(e){try{var t="";do{t+=j(e),e=e.return}while(e);return t}catch(n){return"\nError generating stack: "+n.message+"\n"+n.stack}}function M(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function F(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function U(e){if(M(e)!==e)throw Error(o(188))}function V(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=V(e)))return t;e=e.sibling}return null}var z=Array.isArray,B=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},q=[],H=-1;function W(e){return{current:e}}function G(e){0>H||(e.current=q[H],q[H]=null,H--)}function K(e,t){H++,q[H]=e.current,e.current=t}var Q=W(null),Y=W(null),X=W(null),J=W(null);function Z(e,t){switch(K(X,t),K(Y,e),K(Q,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?Yu(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=Xu(e=Yu(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}G(Q),K(Q,t)}function ee(){G(Q),G(Y),G(X)}function te(e){null!==e.memoizedState&&K(J,e);var t=Q.current,n=Xu(t,e.type);t!==n&&(K(Y,e),K(Q,n))}function ne(e){Y.current===e&&(G(Q),G(Y)),J.current===e&&(G(J),Lh._currentValue=$)}var re=Object.prototype.hasOwnProperty,ie=r.unstable_scheduleCallback,se=r.unstable_cancelCallback,oe=r.unstable_shouldYield,ae=r.unstable_requestPaint,le=r.unstable_now,ce=r.unstable_getCurrentPriorityLevel,ue=r.unstable_ImmediatePriority,he=r.unstable_UserBlockingPriority,de=r.unstable_NormalPriority,fe=r.unstable_LowPriority,pe=r.unstable_IdlePriority,me=r.log,ge=r.unstable_setDisableYieldValue,ve=null,ye=null;function be(e){if("function"===typeof me&&ge(e),ye&&"function"===typeof ye.setStrictMode)try{ye.setStrictMode(ve,e)}catch(t){}}var we=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(xe(e)/Se|0)|0},xe=Math.log,Se=Math.LN2;var Ee=128,ke=4194304;function Te(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function _e(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=e.warmLanes;e=0!==e.finishedLanes;var a=134217727&n;return 0!==a?0!==(n=a&~i)?r=Te(n):0!==(s&=a)?r=Te(s):e||0!==(o=a&~o)&&(r=Te(o)):0!==(a=n&~i)?r=Te(a):0!==s?r=Te(s):e||0!==(o=n&~o)&&(r=Te(o)),0===r?0:0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||32===i&&0!==(4194176&o))?t:r}function Ce(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Ae(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Ie(){var e=Ee;return 0===(4194176&(Ee<<=1))&&(Ee=128),e}function Pe(){var e=ke;return 0===(62914560&(ke<<=1))&&(ke=4194304),e}function Ne(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}
2function Re(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function De(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-we(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194218&n}function Oe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-we(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function je(e){return 2<(e&=-e)?8<e?0!==(134217727&e)?32:268435456:8:2}function Le(){var e=B.p;return 0!==e?e:void 0===(e=window.event)?32:Xh(e.type)}var Me=Math.random().toString(36).slice(2),Fe="__reactFiber$"+Me,Ue="__reactProps$"+Me,Ve="__reactContainer$"+Me,ze="__reactEvents$"+Me,Be="__reactListeners$"+Me,$e="__reactHandles$"+Me,qe="__reactResources$"+Me,He="__reactMarker$"+Me;function We(e){delete e[Fe],delete e[Ue],delete e[ze],delete e[Be],delete e[$e]}function Ge(e){var t=e[Fe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ve]||n[Fe]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=lh(e);null!==e;){if(n=e[Fe])return n;e=lh(e)}return t}n=(e=n).parentNode}return null}function Ke(e){if(e=e[Fe]||e[Ve]){var t=e.tag;if(5===t||6===t||13===t||26===t||27===t||3===t)return e}return null}function Qe(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(o(33))}function Ye(e){var t=e[qe];return t||(t=e[qe]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Xe(e){e[He]=!0}var Je=new Set,Ze={};function et(e,t){tt(e,t),tt(e+"Capture",t)}function tt(e,t){for(Ze[e]=t,e=0;e<t.length;e++)Je.add(t[e])}var nt=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),rt=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),it={},st={};function ot(e,t,n){if(i=t,re.call(st,i)||!re.call(it,i)&&(rt.test(i)?st[i]=!0:(it[i]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var i}function at(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function lt(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function ct(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ut(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ht(e){e._valueTracker||(e._valueTracker=function(e){var t=ut(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,s.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function dt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ut(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function ft(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var pt=/[\n"\\]/g;function mt(e){return e.replace(pt,(function(e){return"\\"+e.charCodeAt(0).toString(16)+" "}))}function gt(e,t,n,r,i,s,o,a){e.name="",null!=o&&"function"!==typeof o&&"symbol"!==typeof o&&"boolean"!==typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+ct(t)):e.value!==""+ct(t)&&(e.value=""+ct(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?yt(e,o,ct(t)):null!=n?yt(e,o,ct(n)):null!=r&&e.removeAttribute("value"),null==i&&null!=s&&(e.defaultChecked=!!s),null!=i&&(e.checked=i&&"function"!==typeof i&&"symbol"!==typeof i),null!=a&&"function"!==typeof a&&"symbol"!==typeof a&&"boolean"!==typeof a?e.name=""+ct(a):e.removeAttribute("name")}function vt(e,t,n,r,i,s,o,a){if(null!=s&&"function"!==typeof s&&"symbol"!==typeof s&&"boolean"!==typeof s&&(e.type=s),null!=t||null!=n){if(!("submit"!==s&&"reset"!==s||void 0!==t&&null!==t))return;n=null!=n?""+ct(n):"",t=null!=t?""+ct(t):n,a||t===e.value||(e.value=t),e.defaultValue=t}r="function"!==typeof(r=null!=r?r:i)&&"symbol"!==typeof r&&!!r,e.checked=a?e.checked:!!r,e.defaultChecked=!!r,null!=o&&"function"!==typeof o&&"symbol"!==typeof o&&"boolean"!==typeof o&&(e.name=o)}function yt(e,t,n){"number"===t&&ft(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function bt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ct(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function wt(e,t,n){null==t||((t=""+ct(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+ct(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function xt(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(o(92));if(z(r)){if(1<r.length)throw Error(o(93));r=r[0]}n=r}null==n&&(n=""),t=n}n=ct(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r)}function St(e,t){if(t){var n=e.firstChild;
2if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Et=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function kt(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"===typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!==typeof n||0===n||Et.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Tt(e,t,n){if(null!=t&&"object"!==typeof t)throw Error(o(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&kt(e,i,r)}else for(var s in t)t.hasOwnProperty(s)&&kt(e,s,t[s])}function _t(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ct=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode
2-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),At=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function It(e){return At.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Pt=null;function Nt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Rt=null,Dt=null;function Ot(e){var t=Ke(e);if(t&&(e=t.stateNode)){var n=e[Ue]||null;e:switch(e=t.stateNode,t.type){case"input":if(gt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+mt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Ue]||null;if(!i)throw Error(o(90));gt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&dt(r)}break e;case"textarea":wt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&bt(e,!!n.multiple,t,!1)}}}var jt=!1;function Lt(e,t,n){if(jt)return e(t,n);jt=!0;try{return e(t)}finally{if(jt=!1,(null!==Rt||null!==Dt)&&(Fc(),Rt&&(t=Rt,e=Dt,Dt=Rt=null,Ot(t),e)))for(t=0;t<e.length;t++)Ot(e[t])}}function Mt(e,t){var n=e.stateNode;if(null===n)return null;var r=n[Ue]||null;if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(o(231,t,typeof n));return n}var Ft=!1;if(nt)try{var Ut={};Object.defineProperty(Ut,"passive",{get:function(){Ft=!0}}),window.addEventListener("test",Ut,Ut),window.removeEventListener("test",Ut,Ut)}catch(xd){Ft=!1}var Vt=null,zt=null,Bt=null;function $t(){if(Bt)return Bt;var e,t,n=zt,r=n.length,i="value"in Vt?Vt.value:Vt.textContent,s=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[s-t];t++);return Bt=i.slice(e,1<t?1-t:void 0)}function qt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Ht(){return!0}function Wt(){return!1}function Gt(e){function t(t,n,r,i,s){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=s,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?Ht:Wt,this.isPropagationStopped=Wt,this}return N(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Ht)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Ht)},persist:function(){},isPersistent:Ht}),t}var Kt,Qt,Yt,Xt={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jt=Gt(Xt),Zt=N({},Xt,{view:0,detail:0}),en=Gt(Zt),tn=N({},Zt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Yt&&(Yt&&"mousemove"===e.type?(Kt=e.screenX-Yt.screenX,Qt=e.screenY-Yt.screenY):Qt=Kt=0,Yt=e),Kt)},movementY:function(e){return"movementY"in e?e.movementY:Qt}}),nn=Gt(tn),rn=Gt(N({},tn,{dataTransfer:0})),sn=Gt(N({},Zt,{relatedTarget:0})),on=Gt(N({},Xt,{animationName:0,elapsedTime:0,pseudoElement:0})),an=Gt(N({},Xt,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),ln=Gt(N({},Xt,{data:0})),cn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},un={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},hn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=hn[e])&&!!t[e]}function fn(){return dn}var pn=Gt(N({},Zt,{key:function(e){if(e.key){var t=cn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=qt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"ke
2yup"===e.type?un[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fn,charCode:function(e){return"keypress"===e.type?qt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?qt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),mn=Gt(N({},tn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),gn=Gt(N({},Zt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fn})),vn=Gt(N({},Xt,{propertyName:0,elapsedTime:0,pseudoElement:0})),yn=Gt(N({},tn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),bn=Gt(N({},Xt,{newState:0,oldState:0})),wn=[9,13,27,32],xn=nt&&"CompositionEvent"in window,Sn=null;nt&&"documentMode"in document&&(Sn=document.documentMode);var En=nt&&"TextEvent"in window&&!Sn,kn=nt&&(!xn||Sn&&8<Sn&&11>=Sn),Tn=String.fromCharCode(32),_n=!1;function Cn(e,t){switch(e){case"keyup":return-1!==wn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function An(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var In=!1;var Pn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Nn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Pn[e.type]:"textarea"===t}function Rn(e,t,n,r){Rt?Dt?Dt.push(r):Dt=[r]:Rt=r,0<(t=Lu(t,"onChange")).length&&(n=new Jt("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Dn=null,On=null;function jn(e){Au(e,0)}function Ln(e){if(dt(Qe(e)))return e}function Mn(e,t){if("change"===e)return t}var Fn=!1;if(nt){var Un;if(nt){var Vn="oninput"in document;if(!Vn){var zn=document.createElement("div");zn.setAttribute("oninput","return;"),Vn="function"===typeof zn.oninput}Un=Vn}else Un=!1;Fn=Un&&(!document.documentMode||9<document.documentMode)}function Bn(){Dn&&(Dn.detachEvent("onpropertychange",$n),On=Dn=null)}function $n(e){if("value"===e.propertyName&&Ln(On)){var t=[];Rn(t,On,e,Nt(e)),Lt(jn,t)}}function qn(e,t,n){"focusin"===e?(Bn(),On=n,(Dn=t).attachEvent("onpropertychange",$n)):"focusout"===e&&Bn()}function Hn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Ln(On)}function Wn(e,t){if("click"===e)return Ln(t)}function Gn(e,t){if("input"===e||"change"===e)return Ln(t)}var Kn="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function Qn(e,t){if(Kn(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!re.call(t,i)||!Kn(e[i],t[i]))return!1}return!0}function Yn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xn(e,t){var n,r=Yn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Yn(r)}}function Jn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Jn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Zn(e){for(var t=ft((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=ft((e=t.contentWindow).document)}return t}function er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function tr(e,t){var n=Zn(t);t=e.focusedElem;var r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Jn(t.ownerDocument.documentElement,t)){if(null!==r&&er(t))if(e=r.start,void 0===(n=r.end)&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if((n=(e=t.ownerDocument||document)&&e.defaultView||window).getSelection){n=n.getSelection();var i=t.textContent.length,s=Math.min(r.start,i);r=void 0===r.end?s:Math.min(r.end,i),!n.extend&&s>r&&(i=r,r=s,s=i),i=Xn(t,s);var o=Xn(t,r);i&&o&&(1!==n.rangeCount||n.anchorNode!==i.node||n.anchorOffset!==i.offset||n.focusNode!==o.node||n.focusOffset!==o.offset)&&((e=e.createRange()).setStart(i.node,i.offset),n.removeAllRanges(),s>r?(n.addRange(e),n.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),n.addRange(e)))}for(e=[],n=t;n=n.parentNode;)1===n.nodeType&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});
vendor: 30,103 bytes, line 2
2for("function"===typeof t.focus&&t.focus(),t=0;t<e.length;t++)(n=e[t]).element.scrollLeft=n.left,n.element.scrollTop=n.top}}var nr=nt&&"documentMode"in document&&11>=document.documentMode,rr=null,ir=null,sr=null,or=!1;function ar(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;or||null==rr||rr!==ft(r)||("selectionStart"in(r=rr)&&er(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},sr&&Qn(sr,r)||(sr=r,0<(r=Lu(ir,"onSelect")).length&&(t=new Jt("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=rr)))}function lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var cr={animationend:lr("Animation","AnimationEnd"),animationiteration:lr("Animation","AnimationIteration"),animationstart:lr("Animation","AnimationStart"),transitionrun:lr("Transition","TransitionRun"),transitionstart:lr("Transition","TransitionStart"),transitioncancel:lr("Transition","TransitionCancel"),transitionend:lr("Transition","TransitionEnd")},ur={},hr={};function dr(e){if(ur[e])return ur[e];if(!cr[e])return e;var t,n=cr[e];for(t in n)if(n.hasOwnProperty(t)&&t in hr)return ur[e]=n[t];return e}nt&&(hr=document.createElement("div").style,"AnimationEvent"in window||(delete cr.animationend.animation,delete cr.animationiteration.animation,delete cr.animationstart.animation),"TransitionEvent"in window||delete cr.transitionend.transition);var fr=dr("animationend"),pr=dr("animationiteration"),mr=dr("animationstart"),gr=dr("transitionrun"),vr=dr("transitionstart"),yr=dr("transitioncancel"),br=dr("transitionend"),wr=new Map,xr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function Sr(e,t){wr.set(e,t),et(t,[e])}var Er=[],kr=0,Tr=0;function _r(){for(var e=kr,t=Tr=kr=0;t<e;){var n=Er[t];Er[t++]=null;var r=Er[t];Er[t++]=null;var i=Er[t];Er[t++]=null;var s=Er[t];if(Er[t++]=null,null!==r&&null!==i){var o=r.pending;null===o?i.next=i:(i.next=o.next,o.next=i),r.pending=i}0!==s&&Pr(n,i,s)}}function Cr(e,t,n,r){Er[kr++]=e,Er[kr++]=t,Er[kr++]=n,Er[kr++]=r,Tr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Ar(e,t,n,r){return Cr(e,t,n,r),Nr(e)}function Ir(e,t){return Cr(e,null,null,t),Nr(e)}function Pr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var i=!1,s=e.return;null!==s;)s.childLanes|=n,null!==(r=s.alternate)&&(r.childLanes|=n),22===s.tag&&(null===(e=s.stateNode)||1&e._visibility||(i=!0)),e=s,s=s.return;i&&null!==t&&3===e.tag&&(s=e.stateNode,i=31-we(n),null===(e=(s=s.hiddenUpdates)[i])?s[i]=[t]:e.push(t),t.lane=536870912|n)}function Nr(e){if(50<Ac)throw Ac=0,Ic=null,Error(o(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Rr={},Dr=new WeakMap;function Or(e,t){if("object"===typeof e&&null!==e){var n=Dr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:L(t)},Dr.set(e,t),t)}return{value:e,source:t,stack:L(t)}}var jr=[],Lr=0,Mr=null,Fr=0,Ur=[],Vr=0,zr=null,Br=1,$r="";function qr(e,t){jr[Lr++]=Fr,jr[Lr++]=Mr,Mr=e,Fr=t}function Hr(e,t,n){Ur[Vr++]=Br,Ur[Vr++]=$r,Ur[Vr++]=zr,zr=e;var r=Br;e=$r;var i=32-we(r)-1;r&=~(1<<i),n+=1;var s=32-we(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Br=1<<32-we(t)+i|n<<i|r,$r=s+e}else Br=1<<s|n<<i|r,$r=e}function Wr(e){null!==e.return&&(qr(e,1),Hr(e,1,0))}function Gr(e){for(;e===Mr;)Mr=jr[--Lr],jr[Lr]=null,Fr=jr[--Lr],jr[Lr]=null;for(;e===zr;)zr=Ur[--Vr],Ur[Vr]=null,$r=Ur[--Vr],Ur[Vr]=null,Br=Ur[--Vr],Ur[Vr]=null}var Kr=null,Qr=null,Yr=!1,Xr=null,Jr=!1,Zr=Error(o(519));function ei(e){throw si(Or(Error(o(418,"")),e)),Zr}function ti(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Fe]=e,t[Ue]=r,n){case"dialog":Iu("cancel",t),Iu("close",t);break;case"iframe":case"object":case"embed":Iu("load",t);break;case"video":case"audio":for(n=0;n<_u.length;n++)Iu(_u[n],t);break;case"source":Iu("error",t);break;case"img":case"image":case"link":Iu("error",t),Iu("load",t);break;case"details":Iu("toggle",t);break;case"input":Iu("invalid",t),vt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0),ht(t);break;case"select":Iu("invalid",t);break;case"textarea":Iu("invalid",t),xt(t,r.value,r.defaultValue,r.children),ht(t)}"string"!==typeof(n=r.children)&&"number"!==typeof n&&"bigint"!==typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||Bu(t.textContent,n)?(null!=r.popover&&(Iu("beforetoggle",t),Iu("toggle",t)),null!=r.onScroll&&Iu("scroll",t),null!=r.onScrollEnd&&Iu("scrollend",t),null!=r.onClick&&(t.onclick=$u),t=!0):t=!1,t||ei(e)}function ni(e){for(Kr=e.return;Kr;)switch(Kr.tag){case 3:case 27:return void(Jr=!0);case 5:case 13:return void(Jr=!1);default:Kr=Kr.return}}function ri(e){if(e!==Kr)return!1;if(!Yr)return ni(e),Yr=!0,!1;var t,n=!1;if((t=3!==e.tag&&27!==e.tag)&&((t=5===e.tag)&&(t=!("form"!==(t=e.type)&&"button"!==t)||Ju(e.type,e.memoizedProps)),t=!t),t&&(n=!0),n&&Qr&&ei(e),ni(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,n=0;e;){if(8===e.nodeType)if("/$"===(t=e.data)){if(0===n){Qr=ah(e.nextSibling);break e}n--}else"$"!==t&&"$!"!==t&&"$?"!==t||n++;e=e.nextSibling}Qr=null}}else Qr=Kr?ah(e.stateNode.nextSibling):null;return!0}function ii(){Qr=Kr=null,Yr=!1}function si(e){null===Xr?Xr=[e]:Xr.push(e)}var oi=Error(o(460)),ai=Error(o(474)),li={then:function(){}};function ci(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ui(){}function hi(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(ui,ui),t=n),t.status){case"fulfilled":return t.value;case"rejected":if((e=t.reason)===oi)throw Error(o(483));throw e;default:if("string"===typeof t.status)t.then(ui,ui);else{if(null!==(e=tc)&&100<e.shellSuspendCounter)throw Error(o(482));(e=t).status="pending",e.then((function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}}),(function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}}))}switch(t.status){case"fulfilled":return t.value;case"rejected":if((e=t.reason)===oi)throw Error(o(483));throw e}throw di=t,oi}}var di=null;function fi(){if(null===di)throw Error(o(459));var e=di;return di=null,e}var pi=null,mi=0;function gi(e){var t=mi;return mi+=1,null===pi&&(pi=[]),hi(pi,e,t)}function vi(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function yi(e,t){if(t.$$typeof===l)throw Error(o(525));throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bi(e){return(0,e._init)(e._payload)}function wi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(e,t){return(e=Ml(e,t)).index=0,e.sibling=null,e}function s(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=33554434,n):r:(t.flags|=33554434,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=33554434),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Bl(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n,r){var s=n.type;return s===h?p(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===s||"object"===typeof s&&null!==s&&s.$$typeof===x&&bi(s)===t.type)?(vi(t=i(t,n.props),n),t.return=e,t):(vi(t=Ul(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function f(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=$l(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function p(e,t,n,r,s){return null===t||7!==t.tag?((t=Vl(n,e.mode,r,s)).return=e,t):((t=i(t,n)).return=e,t)}function m(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t||"bigint"===typeof t)return(t=Bl(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case c:return vi(n=Ul(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case u:return(t=$l(t,e.mode,n)).return=e,t;case x:return m(e,t=(0,t._init)(t._payload),n)}if(z(t)||T(t))return(t=Vl(t,e.mode,n,null)).return=e,t;if("function"===typeof t.then)return m(e,gi(t),n);if(t.$$typeof===g)return m(e,_a(e,t),n);yi(e,t)}return null}function v(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n||"bigint"===typeof n)return null!==i?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case c:return n.key===i?d(e,t,n,r):null;case u:return n.key===i?f(e,t,n,r):null;case x:return v(e,t,n=(i=n._init)(n._payload),r)}if(z(n)||T(n))return null!==i?null:p(e,t,n,r,null);if("function"===typeof n.then)return v(e,t,gi(n),r);if(n.$$typeof===g)return v(e,t,_a(e,n),r);yi(e,n)}return null}function y(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r||"bigint"===typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case c:return d(t,e=e.get(null===r.key?n:r.key)||null,r,i);case u:return f(t,e=e.get(null===r.key?n:r.key)||null,r,i);case x:return y(e,t,n,r=(0,r._init)(r._payload),i)}if(z(r)||T(r))return p(t,e=e.get(n)||null,r,i,null);if("function"===typeof r.then)return y(e,t,n,gi(r),i);if(r.$$typeof===g)return y(e,t,n,_a(t,r),i);yi(t,r)}return null}function b(l,d,f,p){if("object"===typeof f&&null!==f&&f.type===h&&null===f.key&&(f=f.props.children),"object"===typeof f&&null!==f){switch(f.$$typeof){case c:e:{for(var w=f.key;null!==d;){if(d.key===w){if((w=f.type)===h){if(7===d.tag){n(l,d.sibling),(p=i(d,f.props.children)).return=l,l=p;break e}}else if(d.elementType===w||"object"===typeof w&&null!==w&&w.$$typeof===x&&bi(w)===d.type){n(l,d.sibling),vi(p=i(d,f.props),f),p.return=l,l=p;break e}n(l,d);break}t(l,d),d=d.sibling}f.type===h?((p=Vl(f.props.children,l.mode,p,f.key)).return=l,l=p):(vi(p=Ul(f.type,f.key,f.props,null,l.mode,p),f),p.return=l,l=p)}return a(l);case u:e:{for(w=f.key;null!==d;){if(d.key===w){if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){n(l,d.sibling),(p=i(d,f.children||[])).return=l,l=p;break e}n(l,d);break}t(l,d),d=d.sibling}(p=$l(f,l.mode,p)).return=l,l=p}return a(l);case x:return b(l,d,f=(w=f._init)(f._payload),p)}if(z(f))return function(i,o,a,l){for(var c=null,u=null,h=o,d=o=0,f=null;null!==h&&d<a.length;d++){h.index>d?(f=h,h=null):f=h.sibling;var p=v(i,h,a[d],l);if(null===p){null===h&&(h=f);break}e&&h&&null===p.alternate&&t(i,h),o=s(p,o,d),null===u?c=p:u.sibling=p,u=p,h=f}if(d===a.length)return n(i,h),Yr&&qr(i,d),c;if(null===h){for(;d<a.length;d++)null!==(h=m(i,a[d],l))&&(o=s(h,o,d),null===u?c=h:u.sibling=h,u=h);return Yr&&qr(i,d),c}for(h=r(h);d<a.length;d++)null!==(f=y(h,i,d,a[d],l))&&(e&&null!==f.alternate&&h.delete(null===f.key?d:f.key),o=s(f,o,d),null===u?c=f:u.sibling=f,u=f);return e&&h.forEach((function(e){return t(i,e)})),Yr&&qr(i,d),c}(l,d,f,p);if(T(f)){if("function"!==typeof(w=T(f)))throw Error(o(150));return function(i,a,l,c){if(null==l)throw Error(o(151));for(var u=null,h=null,d=a,f=a=0,p=null,g=l.next();null!==d&&!g.done;f++,g=l.next()){d.index>f?(p=d,d=null):p=d.sibling;var b=v(i,d,g.value,c);if(null===b){null===d&&(d=p);break}e&&d&&null===b.alternate&&t(i,d),a=s(b,a,f),null===h?u=b:h.sibling=b,h=b,d=p}if(g.done)return n(i,d),Yr&&qr(i,f),u;if(null===d){for(;!g.done;f++,g=l.next())null!==(g=m(i,g.value,c))&&(a=s(g,a,f),null===h?u=g:h.sibling=g,h=g);return Yr&&qr(i,f),u}for(d=r(d);!g.done;f++,g=l.next())null!==(g=y(d,i,f,g.value,c))&&(e&&null!==g.alternate&&d.delete(null===g.key?f:g.key),a=s(g,a,f),null===h?u=g:h.sibling=g,h=g);return e&&d.forEach((function(e){return t(i,e)})),Yr&&qr(i,f),u}(l,d,f=w.call(f),p)}if("function"===typeof f.then)return b(l,d,gi(f),p);if(f.$$typeof===g)return b(l,d,_a(l,f),p);yi(l,f)}return"string"===typeof f&&""!==f||"number"===typeof f||"bigint"===typeof f?(f=""+f,null!==d&&6===d.tag?(n(l,d.sibling),(p=i(d,f)).return=l,l=p):(n(l,d),(p=Bl(f,l.mode,p)).return=l,l=p),a(l)):n(l,d)}return function(e,t,n,r){try{mi=0;var i=b(e,t,n,r);return pi=null,i}catch(o){if(o===oi)throw o;var s=jl(29,o,null,e.mode);return s.lanes=r,s.return=e,s}}}var xi=wi(!0),Si=wi(!1),Ei=W(null),ki=W(0);function Ti(e,t){K(ki,e=cc),K(Ei,t),cc=e|t.baseLanes}function _i(){K(ki,cc),K(Ei,Ei.current)}function Ci(){cc=ki.current,G(Ei),G(ki)}var Ai=W(null),Ii=null;function Pi(e){var t=e.alternate;K(Oi,1&Oi.current),K(Ai,e),null===Ii&&(null===t||null!==Ei.current||null!==t.memoizedState)&&(Ii=e)}function Ni(e){if(22===e.tag){if(K(Oi,Oi.current),K(Ai,e),null===Ii){var t=e.alternate;null!==t&&null!==t.memoizedState&&(Ii=e)}}else Ri()}function Ri(){K(Oi,Oi.current),K(Ai,Ai.current)}function Di(e){G(Ai),Ii===e&&(Ii=null),G(Oi)}var Oi=W(0);function ji(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Li="undefined"!==typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach((function(e){return e()}))}},Mi=r.unstable_scheduleCallback,Fi=r.unstable_NormalPriority,Ui={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vi(){return{controller:new Li,data:new Map,refCount:0}}function zi(e){e.refCount--,0===e.refCount&&Mi(Fi,(function(){e.controller.abort()}))}var Bi=null,$i=0,qi=0,Hi=null;function Wi(){if(0===--$i&&null!==Bi){null!==Hi&&(Hi.status="fulfilled");var e=Bi;Bi=null,qi=0,Hi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Gi=P.S;P.S=function(e,t){"object"===typeof t&&null!==t&&"function"===typeof t.then&&function(e,t){if(null===Bi){var n=Bi=[];$i=0,qi=xu(),Hi={status:"pending",value:void 0,then:function(e){n.push(e)}}}$i++,t.then(Wi,Wi)}(0,t),null!==Gi&&Gi(e,t)};var Ki=W(null);function Qi(){var e=Ki.current;return null!==e?e:tc.pooledCache}function Yi(e,t){K(Ki,null===t?Ki.current:t.pool)}function Xi(){var e=Qi();return null===e?null:{parent:Ui._currentValue,pool:e}}var Ji=0,Zi=null,es=null,ts=null,ns=!1,rs=!1,is=!1,ss=0,os=0,as=null,ls=0;function cs(){throw Error(o(321))}function us(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Kn(e[n],t[n]))return!1;return!0}function hs(e,t,n,r,i,s){return Ji=s,Zi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=null===e||null===e.memoizedState?_o:Co,is=!1,s=n(r,i),is=!1,rs&&(s=fs(t,n,r,i)),ds(e),s}function ds(e){P.H=To;var t=null!==es&&null!==es.next;if(Ji=0,ts=es=Zi=null,ns=!1,os=0,as=null,t)throw Error(o(300));null===e||qo||null!==(e=e.dependencies)&&Ea(e)&&(qo=!0)}function fs(e,t,n,r){Zi=e;var i=0;do{if(rs&&(as=null),os=0,rs=!1,25<=i)throw Error(o(301));if(i+=1,ts=es=null,null!=e.updateQueue){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,null!=s.memoCache&&(s.memoCache.index=0)}P.H=Ao,s=t(n,r)}while(rs);return s}function ps(){var e=P.H,t=e.useState()[0];return t="function"===typeof t.then?ws(t):t,e=e.useState()[0],(null!==es?es.memoizedState:null)!==e&&(Zi.flags|=1024),t}function ms(){var e=0!==ss;return ss=0,e}function gs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function vs(e){if(ns){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}ns=!1}Ji=0,ts=es=Zi=null,rs=!1,os=ss=0,as=null}function ys(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ts?Zi.memoizedState=ts=e:ts=ts.next=e,ts}function bs(){if(null===es){var e=Zi.alternate;e=null!==e?e.memoizedState:null}else e=es.next;var t=null===ts?Zi.memoizedState:ts.next;if(null!==t)ts=t,es=e;else{if(null===e){if(null===Zi.alternate)throw Error(o(467));throw Error(o(310))}e={memoizedState:(es=e).memoizedState,baseState:es.baseState,baseQueue:es.baseQueue,queue:es.queue,next:null},null===ts?Zi.memoizedState=ts=e:ts=ts.next=e}return ts}function ws(e){var t=os;return os+=1,null===as&&(as=[]),e=hi(as,e,t),t=Zi,null===(null===ts?t.memoizedState:ts.next)&&(t=t.alternate,P.H=null===t||null===t.memoizedState?_o:Co),e}function xs(e){if(null!==e&&"object"===typeof e){if("function"===typeof e.then)return ws(e);if(e.$$typeof===g)return Ta(e)}throw Error(o(438,String(e)))}function Ss(e){var t=null,n=Zi.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Zi.alternate;null!==r&&(null!==(r=r.updateQueue)&&(null!=(r=r.memoCache)&&(t={data:r.data.map((function(e){return e.slice()})),index:0})))}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Zi.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=E;return t.index++,n}function Es(e,t){return"function"===typeof t?t(e):t}function ks(e){return Ts(bs(),es,e)}function Ts(e,t,n){var r=e.queue;if(null===r)throw Error(o(311));r.lastRenderedReducer=n;var i=e.baseQueue,s=r.pending;if(null!==s){if(null!==i){var a=i.next;i.next=s.next,s.next=a}t.baseQueue=i=s,r.pending=null}if(s=e.baseState,null===i)e.memoizedState=s;else{var l=a=null,c=null,u=t=i.next,h=!1;do{var d=-536870913&u.lane;if(d!==u.lane?(rc&d)===d:(Ji&d)===d){var f=u.revertLane;if(0===f)null!==c&&(c=c.next={lane:0,revertLane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===qi&&(h=!0);else{if((Ji&f)===f){u=u.next,f===qi&&(h=!0);continue}d={lane:0,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=d,a=s):c=c.next=d,Zi.lanes|=f,hc|=f}d=u.action,is&&n(s,d),s=u.hasEagerState?u.eagerState:n(s,d)}else f={lane:d,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=f,a=s):c=c.next=f,Zi.lanes|=d,hc|=d;u=u.next}while(null!==u&&u!==t);if(null===c?a=s:c.next=l,!Kn(s,e.memoizedState)&&(qo=!0,h&&null!==(n=Hi)))throw n;e.memoizedState=s,e.baseState=a,e.baseQueue=c,r.lastRenderedState=s}return null===i&&(r.lanes=0),[e.memoizedState,r.dispatch]}function _s(e){var t=bs(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{s=e(s,a.action),a=a.next}while(a!==i);Kn(s,t.memoizedState)||(qo=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Cs(e,t,n){var r=Zi,i=bs(),s=Yr;if(s){if(void 0===n)throw Error(o(407));n=n()}else n=t();var a=!Kn((es||i).memoizedState,n);if(a&&(i.memoizedState=n,qo=!0),i=i.queue,Js(Ps.bind(null,r,i,e),[e]),i.getSnapshot!==t||a||null!==ts&&1&ts.memoizedState.tag){if(r.flags|=2048,Gs(9,Is.bind(null,r,i,n,t),{destroy:void 0},null),null===tc)throw Error(o(349));s||0!==(60&Ji)||As(r,t,n)}return n}function As(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Zi.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Zi.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Is(e,t,n,r){t.value=n,t.getSnapshot=r,Ns(t)&&Rs(e)}function Ps(e,t,n){return n((function(){Ns(t)&&Rs(e)}))}function Ns(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Kn(e,n)}catch(r){return!0}}function Rs(e){var t=Ir(e,2);null!==t&&Rc(t,e,2)}function Ds(e){var t=ys();if("function"===typeof e){var n=e;if(e=n(),is){be(!0);try{n()}finally{be(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Es,lastRenderedState:e},t}function Os(e,t,n,r){return e.baseState=n,Ts(e,es,"function"===typeof r?r:Es)}function js(e,t,n,r,i){if(So(e))throw Error(o(485));if(null!==(e=t.action)){var s={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){s.listeners.push(e)}};null!==P.T?n(!0):s.isTransition=!1,r(s),null===(n=t.pending)?(s.next=t.pending=s,Ls(t,s)):(s.next=n.next,t.pending=n.next=s)}}function Ls(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var s=P.T,o={};P.T=o;try{var a=n(i,r),l=P.S;null!==l&&l(o,a),Ms(e,t,a)}catch(c){Us(e,t,c)}finally{P.T=s}}else try{Ms(e,t,s=n(i,r))}catch(u){Us(e,t,u)}}function Ms(e,t,n){null!==n&&"object"===typeof n&&"function"===typeof n.then?n.then((function(n){Fs(e,t,n)}),(function(n){return Us(e,t,n)})):Fs(e,t,n)}function Fs(e,t,n){t.status="fulfilled",t.value=n,Vs(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Ls(e,n)))}function Us(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Vs(t),t=t.next}while(t!==r)}e.action=null}function Vs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function zs(e,t){return t}function Bs(e,t){if(Yr){var n=tc.formState;if(null!==n){e:{var r=Zi;if(Yr){if(Qr){t:{for(var i=Qr,s=Jr;8!==i.nodeType;){if(!s){i=null;break t}if(null===(i=ah(i.nextSibling))){i=null;break t}}i="F!"===(s=i.data)||"F"===s?i:null}if(i){Qr=ah(i.nextSibling),r="F!"===i.data;break e}}ei(r)}r=!1}r&&(t=n[0])}}return(n=ys()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zs,lastRenderedState:t},n.queue=r,n=bo.bind(null,Zi,r),r.dispatch=n,r=Ds(!1),s=xo.bind(null,Zi,!1,r.queue),i={state:t,dispatch:null,action:e,pending:null},(r=ys()).queue=i,n=js.bind(null,Zi,i,s,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function $s(e){return qs(bs(),es,e)}function qs(e,t,n){t=Ts(e,t,zs)[0],e=ks(Es)[0],t="object"===typeof t&&null!==t&&"function"===typeof t.then?ws(t):t;var r=bs(),i=r.queue,s=i.dispatch;return n!==r.memoizedState&&(Zi.flags|=2048,Gs(9,Hs.bind(null,i,n),{destroy:void 0},null)),[t,s,e]}function Hs(e,t){e.action=t}function Ws(e){var t=bs(),n=es;if(null!==n)return qs(t,n,e);bs(),t=t.memoizedState;var r=(n=bs()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Gs(e,t,n,r){return e={tag:e,create:t,inst:n,deps:r,next:null},null===(t=Zi.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Zi.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ks(){return bs().memoizedState}function Qs(e,t,n,r){var i=ys();Zi.flags|=e,i.memoizedState=Gs(1|t,n,{destroy:void 0},void 0===r?null:r)}function Ys(e,t,n,r){var i=bs();r=void 0===r?null:r;var s=i.memoizedState.inst;null!==es&&null!==r&&us(r,es.memoizedState.deps)?i.memoizedState=Gs(t,n,s,r):(Zi.flags|=e,i.memoizedState=Gs(1|t,n,s,r))}function Xs(e,t){Qs(8390656,8,e,t)}function Js(e,t){Ys(2048,8,e,t)}function Zs(e,t){return Ys(4,2,e,t)}function eo(e,t){return Ys(4,4,e,t)}function to(e,t){if("function"===typeof t){e=e();var n=t(e);return function(){"function"===typeof n?n():t(null)}}if(null!==t&&void 0!==t)return e=e(),t.current=e,function(){t.current=null}}function no(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null,Ys(4,4,to.bind(null,t,e),n)}function ro(){}function io(e,t){var n=bs();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&us(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function so(e,t){var n=bs();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&us(t,r[1]))return r[0];if(r=e(),is){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[r,t],r}function oo(e,t,n){return void 0===n||0!==(1073741824&Ji)?e.memoizedState=t:(e.memoizedState=n,e=Nc(),Zi.lanes|=e,hc|=e,n)}function ao(e,t,n,r){return Kn(n,t)?n:null!==Ei.current?(e=oo(e,n,r),Kn(e,t)||(qo=!0),e):0===(42&Ji)?(qo=!0,e.memoizedState=n):(e=Nc(),Zi.lanes|=e,hc|=e,t)}function lo(e,t,n,r,i){var s=B.p;B.p=0!==s&&8>s?s:8;var o=P.T,a={};P.T=a,xo(e,!1,t,n);try{var l=i(),c=P.S;if(null!==c&&c(a,l),null!==l&&"object"===typeof l&&"function"===typeof l.then)wo(e,t,function(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(e){n.push(e)}};return e.then((function(){r.status="fulfilled",r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)}),(function(e){for(r.status="rejected",r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)})),r}(l,r),Pc());else wo(e,t,r,Pc())}catch(u){wo(e,t,{then:function(){},status:"rejected",reason:u},Pc())}finally{B.p=s,P.T=o}}function co(){}function uo(e,t,n,r){if(5!==e.tag)throw Error(o(476));var i=ho(e).queue;lo(e,i,t,$,null===n?co:function(){return fo(e),n(r)})}function ho(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Es,lastRenderedState:$},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Es,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function fo(e){wo(e,ho(e).next.queue,{},Pc())}function po(){return Ta(Lh)}function mo(){return bs().memoizedState}function go(){return bs().memoizedState}function vo(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Pc(),r=Ra(t,e=Na(n),n);return null!==r&&(Rc(r,t,n),Da(r,t,n)),t={cache:Vi()},void(e.payload=t)}t=t.return}}function yo(e,t,n){var r=Pc();n={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},So(e)?Eo(t,n):null!==(n=Ar(e,t,n,r))&&(Rc(n,e,r),ko(n,t,r))}function bo(e,t,n){wo(e,t,n,Pc())}function wo(e,t,n,r){var i={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(So(e))Eo(t,i);else{var s=e.alternate;if(0===e.lanes&&(null===s||0===s.lanes)&&null!==(s=t.lastRenderedReducer))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Kn(a,o))return Cr(e,t,i,0),null===tc&&_r(),!1}catch(l){}if(null!==(n=Ar(e,t,i,r)))return Rc(n,e,r),ko(n,t,r),!0}return!1}function xo(e,t,n,r){if(r={lane:2,revertLane:xu(),action:r,hasEagerState:!1,eagerState:null,next:null},So(e)){if(t)throw Error(o(479))}else null!==(t=Ar(e,n,r,2))&&Rc(t,e,2)}function So(e){var t=e.alternate;return e===Zi||null!==t&&t===Zi}function Eo(e,t){rs=ns=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ko(e,t,n){if(0!==(4194176&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Oe(e,n)}}var To={readContext:Ta,use:xs,useCallback:cs,useContext:cs,useEffect:cs,useImperativeHandle:cs,useLayoutEffect:cs,useInsertionEffect:cs,useMemo:cs,useReducer:cs,useRef:cs,useState:cs,useDebugValue:cs,useDeferredValue:cs,useTransition:cs,useSyncExternalStore:cs,useId:cs};To.useCacheRefresh=cs,To.useMemoCache=cs,To.useHostTransitionStatus=cs,To.useFormState=cs,To.useActionState=cs,To.useOptimistic=cs;var _o={readContext:Ta,use:xs,useCallback:function(e,t){return ys().memoizedState=[e,void 0===t?null:t],e},useContext:Ta,useEffect:Xs,useImperativeHandle:function(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null,Qs(4194308,4,to.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qs(4194308,4,e,t)},useInsertionEffect:function(e,t){Qs(4,2,e,t)},useMemo:function(e,t){var n=ys();t=void 0===t?null:t;var r=e();if(is){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ys();if(void 0!==n){var i=n(t);if(is){be(!0);try{n(t)}finally{be(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=yo.bind(null,Zi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ys().memoizedState=e},useState:function(e){var t=(e=Ds(e)).queue,n=bo.bind(null,Zi,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ro,useDeferredValue:function(e,t){return oo(ys(),e,t)},useTransition:function(){var e=Ds(!1);return e=lo.bind(null,Zi,e.queue,!0,!1),ys().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Zi,i=ys();if(Yr){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===tc)throw Error(o(349));0!==(60&rc)||As(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Xs(Ps.bind(null,r,s,e),[e]),r.flags|=2048,Gs(9,Is.bind(null,r,s,n,t),{destroy:void 0},null),n},useId:function(){var e=ys(),t=tc.identifierPrefix;if(Yr){var n=$r;t=":"+t+"R"+(n=(Br&~(1<<32-we(Br)-1)).toString(32)+n),0<(n=ss++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ls++).toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return ys().memoizedState=vo.bind(null,Zi)}};_o.useMemoCache=Ss,_o.useHostTransitionStatus=po,_o.useFormState=Bs,_o.useActionState=Bs,_o.useOptimistic=function(e){var t=ys();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=xo.bind(null,Zi,!0,n),n.dispatch=t,[e,t]};var Co={readContext:Ta,use:xs,useCallback:io,useContext:Ta,useEffect:Js,useImperativeHandle:no,useInsertionEffect:Zs,useLayoutEffect:eo,useMemo:so,useReducer:ks,useRef:Ks,useState:function(){return ks(Es)},useDebugValue:ro,useDeferredValue:function(e,t){return ao(bs(),es.memoizedState,e,t)},useTransition:function(){var e=ks(Es)[0],t=bs().memoizedState;return["boolean"===typeof e?e:ws(e),t]},useSyncExternalStore:Cs,useId:mo};Co.useCacheRefresh=go,Co.useMemoCache=Ss,Co.useHostTransitionStatus=po,Co.useFormState=$s,Co.useActionState=$s,Co.useOptimistic=function(e,t){return Os(bs(),0,e,t)};var Ao={readContext:Ta,use:xs,useCallback:io,useContext:Ta,useEffect:Js,useImperativeHandle:no,useInsertionEffect:Zs,useLayoutEffect:eo,useMemo:so,useReducer:_s,useRef
2:Ks,useState:function(){return _s(Es)},useDebugValue:ro,useDeferredValue:function(e,t){var n=bs();return null===es?oo(n,e,t):ao(n,es.memoizedState,e,t)},useTransition:function(){var e=_s(Es)[0],t=bs().memoizedState;return["boolean"===typeof e?e:ws(e),t]},useSyncExternalStore:Cs,useId:mo};function Io(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:N({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}Ao.useCacheRefresh=go,Ao.useMemoCache=Ss,Ao.useHostTransitionStatus=po,Ao.useFormState=Ws,Ao.useActionState=Ws,Ao.useOptimistic=function(e,t){var n=bs();return null!==es?Os(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])};var Po={isMounted:function(e){return!!(e=e._reactInternals)&&M(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Pc(),i=Na(r);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=Ra(e,i,r))&&(Rc(t,e,r),Da(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Pc(),i=Na(r);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=Ra(e,i,r))&&(Rc(t,e,r),Da(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pc(),r=Na(n);r.tag=2,void 0!==t&&null!==t&&(r.callback=t),null!==(t=Ra(e,r,n))&&(Rc(t,e,n),Da(t,e,n))}};function No(e,t,n,r,i,s,o){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,s,o):!t.prototype||!t.prototype.isPureReactComponent||(!Qn(n,r)||!Qn(i,s))}function Ro(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Po.enqueueReplaceState(t,t.state,null)}function Do(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=N({},n)),e)void 0===n[i]&&(n[i]=e[i]);return n}var Oo="function"===typeof reportError?reportError:function(e){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof e&&null!==e&&"string"===typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"===typeof process&&"function"===typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function jo(e){Oo(e)}function Lo(e){console.error(e)}function Mo(e){Oo(e)}function Fo(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(n){setTimeout((function(){throw n}))}}function Uo(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(r){setTimeout((function(){throw r}))}}function Vo(e,t,n){return(n=Na(n)).tag=3,n.payload={element:null},n.callback=function(){Fo(e,t)},n}function zo(e){return(e=Na(e)).tag=3,e}function Bo(e,t,n,r){var i=n.type.getDerivedStateFromError;if("function"===typeof i){var s=r.value;e.payload=function(){return i(s)},e.callback=function(){Uo(t,n,r)}}var o=n.stateNode;null!==o&&"function"===typeof o.componentDidCatch&&(e.callback=function(){Uo(t,n,r),"function"!==typeof i&&(null===Sc?Sc=new Set([this]):Sc.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var $o=Error(o(461)),qo=!1;function Ho(e,t,n,r){t.child=null===e?Si(t,null,n,r):xi(t,e.child,n,r)}function Wo(e,t,n,r,i){n=n.render;var s=t.ref;if("ref"in r){var o={};for(var a in r)"ref"!==a&&(o[a]=r[a])}else o=r;return ka(t),r=hs(e,t,n,o,s,i),a=ms(),null===e||qo?(Yr&&a&&Wr(t),t.flags|=1,Ho(e,t,r,i),t.child):(gs(e,t,i),da(e,t,i))}function Go(e,t,n,r,i){if(null===e){var s=n.type;return"function"!==typeof s||Ll(s)||void 0!==s.defaultProps||null!==n.compare?((e=Ul(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=s,Ko(e,t,s,r,i))}if(s=e.child,!fa(e,i)){var o=s.memoizedProps;if((n=null!==(n=n.compare)?n:Qn)(o,r)&&e.ref===t.ref)return da(e,t,i)}return t.flags|=1,(e=Ml(s,r)).ref=t.ref,e.return=t,t.child=e}function Ko(e,t,n,r,i){if(null!==e){var s=e.memoizedProps;if(Qn(s,r)&&e.ref===t.ref){if(qo=!1,t.pendingProps=r=s,!fa(e,i))return t.lanes=e.lanes,da(e,t,i);0!==(131072&e.flags)&&(qo=!0)}}return Jo(e,t,n,r,i)}
2function Qo(e,t,n){var r=t.pendingProps,i=r.children,s=0!==(2&t.stateNode._pendingVisibility),o=null!==e?e.memoizedState:null;if(Xo(e,t),"hidden"===r.mode||s){if(0!==(128&t.flags)){if(r=null!==o?o.baseLanes|n:n,null!==e){for(i=t.child=e.child,s=0;null!==i;)s=s|i.lanes|i.childLanes,i=i.sibling;t.childLanes=s&~r}else t.childLanes=0,t.child=null;return Yo(e,t,r,n)}if(0===(536870912&n))return t.lanes=t.childLanes=536870912,Yo(e,t,null!==o?o.baseLanes|n:n,n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Yi(0,null!==o?o.cachePool:null),null!==o?Ti(t,o):_i(),Ni(t)}else null!==o?(Yi(0,o.cachePool),Ti(t,o),Ri(),t.memoizedState=null):(null!==e&&Yi(0,null),_i(),Ri());return Ho(e,t,i,n),t.child}function Yo(e,t,n,r){var i=Qi();return i=null===i?null:{parent:Ui._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},null!==e&&Yi(0,null),_i(),Ni(t),null!==e&&Sa(e,t,r,!0),null}function Xo(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=2097664);else{if("function"!==typeof n&&"object"!==typeof n)throw Error(o(284));null!==e&&e.ref===n||(t.flags|=2097664)}}function Jo(e,t,n,r,i){return ka(t),n=hs(e,t,n,r,void 0,i),r=ms(),null===e||qo?(Yr&&r&&Wr(t),t.flags|=1,Ho(e,t,n,i),t.child):(gs(e,t,i),da(e,t,i))}function Zo(e,t,n,r,i,s){return ka(t),t.updateQueue=null,n=fs(t,r,n,i),ds(e),r=ms(),null===e||qo?(Yr&&r&&Wr(t),t.flags|=1,Ho(e,t,n,s),t.child):(gs(e,t,s),da(e,t,s))}function ea(e,t,n,r,i){if(ka(t),null===t.stateNode){var s=Rr,o=n.contextType;"object"===typeof o&&null!==o&&(s=Ta(o)),s=new n(r,s),t.memoizedState=null!==s.state&&void 0!==s.state?s.state:null,s.updater=Po,t.stateNode=s,s._reactInternals=t,(s=t.stateNode).props=r,s.state=t.memoizedState,s.refs={},Ia(t),o=n.contextType,s.context="object"===typeof o&&null!==o?Ta(o):Rr,s.state=t.memoizedState,"function"===typeof(o=n.getDerivedStateFromProps)&&(Io(t,n,o,r),s.state=t.memoizedState),"function"===typeof n.getDerivedStateFromProps||"function"===typeof s.getSnapshotBeforeUpdate||"function"!==typeof s.UNSAFE_componentWillMount&&"function"!==typeof s.componentWillMount||(o=s.state,"function"===typeof s.componentWillMount&&s.componentWillMount(),"function"===typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount(),o!==s.state&&Po.enqueueReplaceState(s,s.state,null),Ma(t,r,s,i),La(),s.state=t.memoizedState),"function"===typeof s.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){s=t.stateNode;var a=t.memoizedProps,l=Do(n,a);s.props=l;var c=s.context,u=n.contextType;o=Rr,"object"===typeof u&&null!==u&&(o=Ta(u));var h=n.getDerivedStateFromProps;u="function"===typeof h||"function"===typeof s.getSnapshotBeforeUpdate,a=t.pendingProps!==a,u||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a||c!==o)&&Ro(t,s,r,o),Aa=!1;var d=t.memoizedState;s.state=d,Ma(t,r,s,i),La(),c=t.memoizedState,a||d!==c||Aa?("function"===typeof h&&(Io(t,n,h,r),c=t.memoizedState),(l=Aa||No(t,n,l,r,d,c,o))?(u||"function"!==typeof s.UNSAFE_componentWillMount&&"function"!==typeof s.componentWillMount||("function"===typeof s.componentWillMount&&s.componentWillMount(),"function"===typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"===typeof s.componentDidMount&&(t.flags|=4194308)):("function"===typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=o,r=l):("function"===typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Pa(e,t),u=Do(n,o=t.memoizedProps),s.props=u,h=t.pendingProps,d=s.context,c=n.contextType,l=Rr,"object"===typeof c&&null!==c&&(l=Ta(c)),(c="function"===typeof(a=n.getDerivedStateFromProps)||"function"===typeof s.getSnapshotBeforeUpdate)||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(o!==h||d!==l)&&Ro(t,s,r,l),Aa=!1,d=t.memoizedState,s.state=d,Ma(t,r,s,i),La();var f=t.memoizedState;o!==h||d!==f||Aa||null!==e&&null!==e.dependencies&&Ea(e.dependencies)?("function"===typeof a&&(Io(t,n,a,r),f=t.memoizedState),(u=Aa||No(t,n,u,r,d,f,l)||null!==e&&null!==e.dependencies&&Ea(e.dependencies))?(c||"function"!==typeof s.UNSAFE_componentWillUpdate&&"function"!==typeof s.componentWillUpdate||("function"===typeof s.componentWillUpdate&&s.componentWillUpdate(r,f,l),"function"===typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,f,l)),"function"===typeof s.componentDidUpdate&&(t.flags|=4),"function"===typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof s.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),s.props=r,s.state=f,s.context=l,r=u):("function"!==typeof s.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return s=r,Xo(e,t),r=0!==(128&t.flags),s||r?(s=t.stateNode,n=r&&"function"!==typeof n.getDerivedStateFromError?null:s.render(),t.flags|=1,null!==e&&r?(t.child=xi(t,e.child,null,i),t.child=xi(t,null,n,i)):Ho(e,t,n,i),t.memoizedState=s.state,e=t.child):e=da(e,t,i),e}function ta(e,t,n,r){return ii(),t.flags|=256,Ho(e,t,n,r),t.child}var na={dehydrated:null,treeContext:null,retryLane:0};function ra(e){return{baseLanes:e,cachePool:Xi()}}function ia(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=pc),e}function sa(e,t,n){var r,i=t.pendingProps,s=!1,a=0!==(128&t.flags);if((r=a)||(r=(null===e||null!==e.memoizedState)&&0!==(2&Oi.current)),r&&(s=!0,t.flags&=-129),r=0!==(32&t.flags),t.flags&=-33,null===e){if(Yr){if(s?Pi(t):Ri(),Yr){var l,c=Qr;if(l=c){e:{for(l=c,c=Jr;
vendor: 35,076 bytes, line 2
28!==l.nodeType;){if(!c){c=null;break e}if(null===(l=ah(l.nextSibling))){c=null;break e}}c=l}null!==c?(t.memoizedState={dehydrated:c,treeContext:null!==zr?{id:Br,overflow:$r}:null,retryLane:536870912},(l=jl(18,null,null,0)).stateNode=c,l.return=t,t.child=l,Kr=t,Qr=null,l=!0):l=!1}l||ei(t)}if(null!==(c=t.memoizedState)&&null!==(c=c.dehydrated))return"$!"===c.data?t.lanes=16:t.lanes=536870912,null;Di(t)}return c=i.children,i=i.fallback,s?(Ri(),c=aa({mode:"hidden",children:c},s=t.mode),i=Vl(i,s,n,null),c.return=t,i.return=t,c.sibling=i,t.child=c,(s=t.child).memoizedState=ra(n),s.childLanes=ia(e,r,n),t.memoizedState=na,i):(Pi(t),oa(t,c))}if(null!==(l=e.memoizedState)&&null!==(c=l.dehydrated)){if(a)256&t.flags?(Pi(t),t.flags&=-257,t=la(e,t,n)):null!==t.memoizedState?(Ri(),t.child=e.child,t.flags|=128,t=null):(Ri(),s=i.fallback,c=t.mode,i=aa({mode:"visible",children:i.children},c),(s=Vl(s,c,n,null)).flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,xi(t,e.child,null,n),(i=t.child).memoizedState=ra(n),i.childLanes=ia(e,r,n),t.memoizedState=na,t=s);else if(Pi(t),"$!"===c.data){if(r=c.nextSibling&&c.nextSibling.dataset)var u=r.dgst;r=u,(i=Error(o(419))).stack="",i.digest=r,si({value:i,source:null,stack:null}),t=la(e,t,n)}else if(qo||Sa(e,t,n,!1),r=0!==(n&e.childLanes),qo||r){if(null!==(r=tc)){if(0!==(42&(i=n&-n)))i=1;else switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=64;break;case 268435456:i=134217728;break;default:i=0}if(0!==(i=0!==(i&(r.suspendedLanes|n))?0:i)&&i!==l.retryLane)throw l.retryLane=i,Ir(e,i),Rc(r,e,i),$o}"$?"===c.data||qc(),t=la(e,t,n)}else"$?"===c.data?(t.flags|=128,t.child=e.child,t=au.bind(null,e),c._reactRetry=t,t=null):(e=l.treeContext,Qr=ah(c.nextSibling),Kr=t,Yr=!0,Xr=null,Jr=!1,null!==e&&(Ur[Vr++]=Br,Ur[Vr++]=$r,Ur[Vr++]=zr,Br=e.id,$r=e.overflow,zr=t),(t=oa(t,i.children)).flags|=4096);return t}return s?(Ri(),s=i.fallback,c=t.mode,u=(l=e.child).sibling,(i=Ml(l,{mode:"hidden",children:i.children})).subtreeFlags=31457280&l.subtreeFlags,null!==u?s=Ml(u,s):(s=Vl(s,c,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,null===(c=e.child.memoizedState)?c=ra(n):(null!==(l=c.cachePool)?(u=Ui._currentValue,l=l.parent!==u?{parent:u,pool:u}:l):l=Xi(),c={baseLanes:c.baseLanes|n,cachePool:l}),s.memoizedState=c,s.childLanes=ia(e,r,n),t.memoizedState=na,i):(Pi(t),e=(n=e.child).sibling,(n=Ml(n,{mode:"visible",children:i.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function oa(e,t){return(t=aa({mode:"visible",children:t},e.mode)).return=e,e.child=t}function aa(e,t){return zl(e,t,0,null)}function la(e,t,n){return xi(t,e.child,null,n),(e=oa(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function ca(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),wa(e.return,t,n)}function ua(e,t,n,r,i){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function ha(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Ho(e,t,r.children,n),0!==(2&(r=Oi.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ca(e,n,t);else if(19===e.tag)ca(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}switch(K(Oi,r),i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ji(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ua(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ji(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ua(t,!0,n,null,s);break;case"together":ua(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function da(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),hc|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Sa(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Ml(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ml(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function fa(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Ea(e))}function pa(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)qo=!0;else{if(!fa(e,n)&&0===(128&t.flags))return qo=!1,function(e,t,n){switch(t.tag){case 3:Z(t,t.stateNode.containerInfo),ya(t,Ui,e.memoizedState.cache),ii();break;case 27:case 5:te(t);break;case 4:Z(t,t.stateNode.containerInfo);break;case 10:ya(t,t.type,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Pi(t),t.flags|=128,null):0!==(n&t.child.childLanes)?sa(e,t,n):(Pi(t),null!==(e=da(e,t,n))?e.sibling:null);Pi(t);break;case 19:var i=0!==(128&e.flags);if((r=0!==(n&t.childLanes))||(Sa(e,t,n,!1),r=0!==(n&t.childLanes)),i){if(r)return ha(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),K(Oi,Oi.current),r)break;return null;case 22:case 23:return t.lanes=0,Qo(e,t,n);case 24:ya(t,Ui,e.memoizedState.cache)}return da(e,t,n)}(e,t,n);qo=0!==(131072&e.flags)}else qo=!1,Yr&&0!==(1048576&t.flags)&&Hr(t,Fr,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var r=t.elementType,i=r._init;if(r=i(r._payload),t.type=r,"function"!==typeof r){if(void 0!==r&&null!==r){if((i=r.$$typeof)===v){t.tag=11,t=Wo(null,t,r,e,n);break e}if(i===w){t.tag=14,t=Go(null,t,r,e,n);break e}}throw t=C(r)||r,Error(o(306,t,""))}Ll(r)?(e=Do(r,e),t.tag=1,t=ea(null,t,r,e,n)):(t.tag=0,t=Jo(null,t,r,e,n))}return t;case 0:return Jo(e,t,t.type,t.pendingProps,n);case 1:return ea(e,t,r=t.type,i=Do(r,t.pendingProps),n);case 3:e:{if(Z(t,t.stateNode.containerInfo),null===e)throw Error(o(387));var s=t.pendingProps;r=(i=t.memoizedState).element,Pa(e,t),Ma(t,s,null,n);var a=t.memoizedState;if(s=a.cache,ya(t,Ui,s),s!==i.cache&&xa(t,[Ui],n,!0),La(),s=a.element,i.isDehydrated){if(i={element:s,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=ta(e,t,s,n);break e}if(s!==r){si(r=Or(Error(o(424)),t)),t=ta(e,t,s,n);break e}for(Qr=ah(t.stateNode.containerInfo.firstChild),Kr=t,Yr=!0,Xr=null,Jr=!0,n=Si(t,null,s,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ii(),s===r){t=da(e,t,n);break e}Ho(e,t,s,n)}t=t.child}return t;case 26:return Xo(e,t),null===e?(n=gh(t.type,null,t.pendingProps,null))?t.memoizedState=n:Yr||(n=t.type,e=t.pendingProps,(r=Qu(X.current).createElement(n))[Fe]=t,r[Ue]=e,Wu(r,n,e),Xe(r),t.stateNode=r):t.memoizedState=gh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return te(t),null===e&&Yr&&(r=t.stateNode=ch(t.type,t.pendingProps,X.current),Kr=t,Jr=!0,Qr=ah(r.firstChild)),r=t.pendingProps.children,null!==e||Yr?Ho(e,t,r,n):t.child=xi(t,null,r,n),Xo(e,t),t.child;case 5:return null===e&&Yr&&((i=r=Qr)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[He])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(s=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(s!==i.rel||e.getAttribute("href")!==(null==i.href?null:i.href)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin)||e.getAttribute("title")!==(null==i.title?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((s=e.getAttribute("src"))!==(null==i.src?null:i.src)||e.getAttribute("type")!==(null==i.type?null:i.type)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var s=null==i.name?null:""+i.name;if("hidden"===i.type&&e.getAttribute("name")===s)return e}if(null===(e=ah(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,Jr))?(t.stateNode=r,Kr=t,Qr=ah(r.firstChild),Jr=!1,i=!0):i=!1),i||ei(t)),te(t),i=t.type,s=t.pendingProps,a=null!==e?e.memoizedProps:null,r=s.children,Ju(i,s)?r=null:null!==a&&Ju(i,a)&&(t.flags|=32),null!==t.memoizedState&&(i=hs(e,t,ps,null,null,n),Lh._currentValue=i),Xo(e,t),Ho(e,t,r,n),t.child;case 6:return null===e&&Yr&&((e=n=Qr)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=ah(e.nextSibling)))return null}return e}(n,t.pendingProps,Jr))?(t.stateNode=n,Kr=t,Qr=null,e=!0):e=!1),e||ei(t)),null;case 13:return sa(e,t,n);case 4:return Z(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=xi(t,null,r,n):Ho(e,t,r,n),t.child;case 11:return Wo(e,t,t.type,t.pendingProps,n);case 7:return Ho(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ho(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ya(t,t.type,r.value),Ho(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,ka(t),r=r(i=Ta(i)),t.flags|=1,Ho(e,t,r,n),t.child;case 14:return Go(e,t,t.type,t.pendingProps,n);case 15:return Ko(e,t,t.type,t.pendingProps,n);case 19:return ha(e,t,n);case 22:return Qo(e,t,n);case 24:return ka(t),r=Ta(Ui),null===e?(null===(i=Qi())&&(i=tc,s=Vi(),i.pooledCache=s,s.refCount++,null!==s&&(i.pooledCacheLanes|=n),i=s),t.memoizedState={parent:r,cache:i},Ia(t),ya(t,Ui,i)):(0!==(e.lanes&n)&&(Pa(e,t),Ma(t,null,null,n),La()),i=e.memoizedState,s=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=i),ya(t,Ui,r)):(r=s.cache,ya(t,Ui,r),r!==i.cache&&xa(t,[Ui],n,!0))),Ho(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}var ma=W(null),ga=null,va=null;function ya(e,t,n){K(ma,t._currentValue),t._currentValue=n}function ba(e){e._currentValue=ma.current,G(ma)}function wa(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function xa(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var s=i.dependencies;if(null!==s){var a=i.child;s=s.firstContext;e:for(;null!==s;){var l=s;s=i;for(var c=0;c<t.length;c++)if(l.context===t[c]){s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),wa(s.return,n,e),r||(a=null);break e}s=l.next}}else if(18===i.tag){if(null===(a=i.return))throw Error(o(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),wa(a,n,e),a=null}else a=i.child;if(null!==a)a.return=i;else for(a=i;null!==a;){if(a===e){a=null;break}if(null!==(i=a.sibling)){i.return=a.return,a=i;break}a=a.return}i=a}}function Sa(e,t,n,r){e=null;for(var i=t,s=!1;null!==i;){if(!s)if(0!==(524288&i.flags))s=!0;else if(0!==(262144&i.flags))break;if(10===i.tag){var a=i.alternate;if(null===a)throw Error(o(387));if(null!==(a=a.memoizedProps)){var l=i.type;Kn(i.pendingProps.value,a.value)||(null!==e?e.push(l):e=[l])}}else if(i===J.current){if(null===(a=i.alternate))throw Error(o(387));a.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(null!==e?e.push(Lh):e=[Lh])}i=i.return}null!==e&&xa(t,e,n,r),t.flags|=262144}function Ea(e){for(e=e.firstContext;null!==e;){if(!Kn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ka(e){ga=e,va=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Ta(e){return Ca(ga,e)}function _a(e,t){return null===ga&&ka(e),Ca(e,t)}function Ca(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===va){if(null===e)throw Error(o(308));va=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else va=va.next=t;return n}var Aa=!1;function Ia(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ra(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&ec)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Nr(e),Pr(e,null,n),t}return Cr(e,r,t,n),Nr(e)}function Da(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194176&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Oe(e,n)}}function Oa(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,s=null;if(null!==(n=n.firstBaseUpdate)){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===s?i=s=o:s=s.next=o,n=n.next}while(null!==n);null===s?i=s=t:s=s.next=t}else i=s=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ja=!1;function La(){if(ja){if(null!==Hi)throw Hi}}function Ma(e,t,n,r){ja=!1;var i=e.updateQueue;Aa=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var l=a,c=l.next;l.next=null,null===o?s=c:o.next=c,o=l;var u=e.alternate;null!==u&&((a=(u=u.updateQueue).lastBaseUpdate)!==o&&(null===a?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(null!==s){var h=i.baseState;for(o=0,u=c=l=null,a=s;;){var d=-536870913&a.lane,f=d!==a.lane;if(f?(rc&d)===d:(r&d)===d){0!==d&&d===qi&&(ja=!0),null!==u&&(u=u.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var p=e,m=a;d=t;var g=n;switch(m.tag){case 1:if("function"===typeof(p=m.payload)){h=p.call(g,h,d);break e}h=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(d="function"===typeof(p=m.payload)?p.call(g,h,d):p)||void 0===d)break e;h=N({},h,d);break e;case 2:Aa=!0}}null!==(d=a.callback)&&(e.flags|=64,f&&(e.flags|=8192),null===(f=i.callbacks)?i.callbacks=[d]:f.push(d))}else f={lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(c=u=f,l=h):u=u.next=f,o|=d;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(f=a).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}null===u&&(l=h),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null===s&&(i.shared.lanes=0),hc|=o,e.lanes=o,e.memoizedState=h}}function Fa(e,t){if("function"!==typeof e)throw Error(o(191,e));e.call(t)}function Ua(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Fa(n[e],t)}function Va(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var s=n.create,o=n.inst;r=s(),o.destroy=r}n=n.next}while(n!==i)}}catch(a){ru(t,t.return,a)}}function za(e,t,n){try{var r=t.updateQueue,i=null!==r?r.lastEffect:null;if(null!==i){var s=i.next;r=s;do{if((r.tag&e)===e){var o=r.inst,a=o.destroy;if(void 0!==a){o.destroy=void 0,i=t;var l=n;try{a()}catch(c){ru(i,l,c)}}}r=r.next}while(r!==s)}}catch(c){ru(t,t.return,c)}}function Ba(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Ua(t,n)}catch(r){ru(e,e.return,r)}}}function $a(e,t,n){n.props=Do(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){ru(e,t,r)}}function qa(e,t){try{var n=e.ref;if(null!==n){var r=e.stateNode;switch(e.tag){case 26:case 27:case 5:var i=r;break;default:i=r}"function"===typeof n?e.refCleanup=n(i):n.current=i}}catch(s){ru(e,t,s)}}function Ha(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"===typeof r)try{r()}catch(i){ru(e,t,i)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"===typeof n)try{n(null)}catch(s){ru(e,t,s)}else n.current=null}function Wa(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(i){ru(e,e.return,i)}}function Ga(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,s=null,a=null,l=null,c=null,u=null,h=null;for(p in n){var d=n[p];if(n.hasOwnProperty(p)&&null!=d)switch(p){case"checked":case"value":break;case"defaultValue":c=d;default:r.hasOwnProperty(p)||qu(e,t,p,null,r,d)}}for(var f in r){var p=r[f];if(d=n[f],r.hasOwnProperty(f)&&(null!=p||null!=d))switch(f){case"type":s=p;break;case"name":i=p;break;case"checked":u=p;break;case"defaultChecked":h=p;break;case"value":a=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(o(137,t));break;default:p!==d&&qu(e,t,f,p,r,d)}}return void gt(e,a,l,c,u,h,s,i);case"select":for(s in p=a=l=f=null,n)if(c=n[s],n.hasOwnProperty(s)&&null!=c)switch(s){case"value":break;case"multiple":p=c;default:r.hasOwnProperty(s)||qu(e,t,s,null,r,c)}for(i in r)if(s=r[i],c=n[i],r.hasOwnProperty(i)&&(null!=s||null!=c))switch(i){case"value":f=s;break;case"defaultValue":l=s;break;case"multiple":a=s;default:s!==c&&qu(e,t,i,s,r,c)}return t=l,n=a,r=p,void(null!=f?bt(e,!!n,f,!1):!!r!==!!n&&(null!=t?bt(e,!!n,t,!0):bt(e,!!n,n?[]:"",!1)));case"textarea":for(l in p=f=null,n)if(i=n[l],n.hasOwnProperty(l)&&null!=i&&!r.hasOwnProperty(l))switch(l){case"value":case"children":break;default:qu(e,t,l,null,r,i)}for(a in r)if(i=r[a],s=n[a],r.hasOwnProperty(a)&&(null!=i||null!=s))switch(a){case"value":f=i;break;case"defaultValue":p=i;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=i)throw Error(o(91));break;default:i!==s&&qu(e,t,a,i,r,s)}return void wt(e,f,p);case"option":for(var m in n)if(f=n[m],n.hasOwnProperty(m)&&null!=f&&!r.hasOwnProperty(m))if("selected"===m)e.selected=!1;else qu(e,t,m,null,r,f);for(c in r)if(f=r[c],p=n[c],r.hasOwnProperty(c)&&f!==p&&(null!=f||null!=p))if("selected"===c)e.selected=f&&"function"!==typeof f&&"symbol"!==typeof f;else qu(e,t,c,f,r,p);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)f=n[g],n.hasOwnProperty(g)&&null!=f&&!r.hasOwnProperty(g)&&qu(e,t,g,null,r,f);for(u in r)if(f=r[u],p=n[u],r.hasOwnProperty(u)&&f!==p&&(null!=f||null!=p))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=f)throw Error(o(137,t));break;default:qu(e,t,u,f,r,p)}return;default:if(_t(t)){for(var v in n)f=n[v],n.hasOwnProperty(v)&&void 0!==f&&!r.hasOwnProperty(v)&&Hu(e,t,v,void 0,r,f);for(h in r)f=r[h],p=n[h],!r.hasOwnProperty(h)||f===p||void 0===f&&void 0===p||Hu(e,t,h,f,r,p);return}}for(var y in n)f=n[y],n.hasOwnProperty(y)&&null!=f&&!r.hasOwnProperty(y)&&qu(e,t,y,null,r,f);for(d in r)f=r[d],p=n[d],!r.hasOwnProperty(d)||f===p||null==f&&null==p||qu(e,t,d,f,r,p)}(r,e.type,n,t),r[Ue]=t}catch(i){ru(e,e.return,i)}}function Ka(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag||4===e.tag}function Qa(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Ka(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&27!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Ya(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=$u));else if(4!==r&&27!==r&&null!==(e=e.child))for(Ya(e,t,n),e=e.sibling;null!==e;)Ya(e,t,n),e=e.sibling}function Xa(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&27!==r&&null!==(e=e.child))for(Xa(e,t,n),e=e.sibling;null!==e;)Xa(e,t,n),e=e.sibling}var Ja=!1,Za=!1,el=!1,tl="function"===typeof WeakSet?WeakSet:Set,nl=null,rl=!1;function il(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:vl(e,n),4&r&&Va(5,n);break;case 1:if(vl(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(a){ru(n,n.return,a)}else{var i=Do(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){ru(n,n.return,l)}}64&r&&Ba(n),512&r&&qa(n,n.return);break;case 3:if(vl(e,n),64&r&&null!==(r=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:e=n.child.stateNode}try{Ua(r,e)}catch(a){ru(n,n.return,a)}}break;case 26:vl(e,n),512&r&&qa(n,n.return);break;case 27:case 5:vl(e,n),null===t&&4&r&&Wa(n),512&r&&qa(n,n.return);break;case 12:default:vl(e,n);break;case 13:vl(e,n),4&r&&ul(e,n);break;case 22:if(!(i=null!==n.memoizedState||Ja)){t=null!==t&&null!==t.memoizedState||Za;var s=Ja,o=Za;Ja=i,(Za=t)&&!o?bl(e,n,0!==(8772&n.subtreeFlags)):vl(e,n),Ja=s,Za=o}512&r&&("manual"===n.memoizedProps.mode?qa(n,n.return):Ha(n,n.return))}}function sl(e){var t=e.alternate;null!==t&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&We(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ol=null,al=!1;function ll(e,t,n){for(n=n.child;null!==n;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(ye&&"function"===typeof ye.onCommitFiberUnmount)try{ye.onCommitFiberUnmount(ve,n)}catch(o){}switch(n.tag){case 26:Za||Ha(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Za||Ha(n,t);var r=ol,i=al;for(ol=n.stateNode,ll(e,t,n),t=(n=n.stateNode).attributes;t.length;)n.removeAttributeNode(t[0]);We(n),ol=r,al=i;break;case 5:Za||Ha(n,t);case 6:i=ol;var s=al;if(ol=null,ll(e,t,n),al=s,null!==(ol=i))if(al)try{e=ol,r=n.stateNode,8===e.nodeType?e.parentNode.removeChild(r):e.removeChild(r)}catch(a){ru(n,t,a)}else try{ol.removeChild(n.stateNode)}catch(a){ru(n,t,a)}break;case 18:null!==ol&&(al?(t=ol,n=n.stateNode,8===t.nodeType?sh(t.parentNode,n):1===t.nodeType&&sh(t,n),md(t)):sh(ol,n.stateNode));break;case 4:r=ol,i=al,ol=n.stateNode.containerInfo,al=!0,ll(e,t,n),ol=r,al=i;break;case 0:case 11:case 14:case 15:Za||za(2,n,t),Za||za(4,n,t),ll(e,t,n);break;case 1:Za||(Ha(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount&&$a(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:Za||Ha(n,t),Za=(r=Za)||null!==n.memoizedState,ll(e,t,n),Za=r;break;default:ll(e,t,n)}}function ul(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{md(e)}catch(n){ru(t,t.return,n)}}function hl(e,t){var n=function(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new tl),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new tl),t;default:throw Error(o(435,e.tag))}}(e);t.forEach((function(t){var r=lu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}function dl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r],s=e,a=t,l=a;e:for(;null!==l;){switch(l.tag){case 27:case 5:ol=l.stateNode,al=!1;break e;case 3:case 4:ol=l.stateNode.containerInfo,al=!0;break e}l=l.return}if(null===ol)throw Error(o(160));cl(s,a,i),ol=null,al=!1,null!==(s=i.alternate)&&(s.return=null),i.return=null}if(13878&t.subtreeFlags)for(t=t.child;null!==t;)pl(t,e),t=t.sibling}var fl=null;function pl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:dl(t,e),ml(e),4&r&&(za(3,e,e.return),Va(3,e),za(5,e,e.return));break;case 1:dl(t,e),ml(e),512&r&&(Za||null===n||Ha(n,n.return)),64&r&&Ja&&(null!==(e=e.updateQueue)&&(null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r))));break;case 26:var i=fl;if(dl(t,e),ml(e),512&r&&(Za||null===n||Ha(n,n.return)),4&r){var s=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(r){case"title":(!(s=i.getElementsByTagName("title")[0])||s[He]||s[Fe]||"http://www.w3.org/2000/svg"===s.namespaceURI||s.hasAttribute("itemprop"))&&(s=i.createElement(r),i.head.insertBefore(s,i.querySelector("head > title"))),Wu(s,r,n),s[Fe]=e,Xe(s),r=s;break e;case"link":var a=Ch("link","href",i).get(r+(n.href||""));if(a)for(var l=0;l<a.length;l++)if((s=a[l]).getAttribute("href")===(null==n.href?null:n.href)&&s.getAttribute("rel")===(null==n.rel?null:n.rel)&&s.getAttribute("title")===(null==n.title?null:n.title)&&s.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){a.splice(l,1);break t}Wu(s=i.createElement(r),r,n),i.head.appendChild(s);break;case"meta":if(a=Ch("meta","content",i).get(r+(n.content||"")))for(l=0;l<a.length;l++)if((s=a[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&s.getAttribute("name")===(null==n.name?null:n.name)&&s.getAttribute("property")===(null==n.property?null:n.property)&&s.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&s.getAttribute("charset")===(null==n.charSet?null:n.charSet)){a.splice(l,1);break t}Wu(s=i.createElement(r),r,n),i.head.appendChild(s);break;default:throw Error(o(468,r))}s[Fe]=e,Xe(s),r=s}e.stateNode=r}else Ah(i,e.type,e.stateNode);else e.stateNode=Sh(i,r,e.memoizedProps);else s!==r?(null===s?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):s.count--,null===r?Ah(i,e.type,e.stateNode):Sh(i,r,e.memoizedProps)):null===r&&null!==e.stateNode&&Ga(e,e.memoizedProps,n.memoizedProps)}break;case 27:if(4&r&&null===e.alternate){i=e.stateNode,s=e.memoizedProps;try{for(var c=i.firstChild;c;){var u=c.nextSibling,h=c.nodeName;c[He]||"HEAD"===h||"BODY"===h||"SCRIPT"===h||"STYLE"===h||"LINK"===h&&"stylesheet"===c.rel.toLowerCase()||i.removeChild(c),c=u}for(var d=e.type,f=i.attributes;f.length;)i.removeAttributeNode(f[0]);Wu(i,d,s),i[Fe]=e,i[Ue]=s}catch(m){ru(e,e.return,m)}}case 5:if(dl(t,e),ml(e),512&r&&(Za||null===n||Ha(n,n.return)),32&e.flags){i=e.stateNode;try{St(i,"")}catch(m){ru(e,e.return,m)}}4&r&&null!=e.stateNode&&Ga(e,i=e.memoizedProps,null!==n?n.memoizedProps:i),1024&r&&(el=!0);break;case 6:if(dl(t,e),ml(e),4&r){if(null===e.stateNode)throw Error(o(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(m){ru(e,e.return,m)}}break;case 3:if(_h=null,i=fl,fl=dh(t.containerInfo),dl(t,e),fl=i,ml(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{md(t.containerInfo)}catch(m){ru(e,e.return,m)}el&&(el=!1,gl(e));break;case 4:r=fl,fl=dh(e.stateNode.containerInfo),dl(t,e),ml(e),fl=r;break;case 12:dl(t,e),ml(e);break;case 13:dl(t,e),ml(e),8192&e.child.flags&&null!==e.memoizedState!==(null!==n&&null!==n.memoizedState)&&(bc=le()),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,hl(e,r)));break;case 22:if(512&r&&(Za||null===n||Ha(n,n.return)),c=null!==e.memoizedState,u=null!==n&&null!==n.memoizedState,Ja=(h=Ja)||c,Za=(d=Za)||u,dl(t,e),Za=d,Ja=h,ml(e),(t=e.stateNode)._current=e,t._visibility&=-3,t._visibility|=2&t._pendingVisibility,8192&r&&(t._visibility=c?-2&t._visibility:1|t._visibility,c&&(t=Ja||Za,null===n||u||t||yl(e)),null===e.memoizedProps||"manual"!==e.memoizedProps.mode))e:for(n=null,t=e;;){if(5===t.tag||26===t.tag||27===t.tag){if(null===n){u=n=t;try{if(i=u.stateNode,c)"function"===typeof(s=i.style).setProperty?s.setProperty("display","none","important"):s.display="none";else{a=u.stateNode;var p=void 0!==(l=u.memoizedProps.style)&&null!==l&&l.hasOwnProperty("display")?l.display:null;a.style.display=null==p||"boolean"===typeof p?"":(""+p).trim()}}catch(m){ru(u,u.return,m)}}}else if(6===t.tag){if(null===n){u=t;try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(m){ru(u,u.return,m)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&(null!==(r=e.updateQueue)&&(null!==(n=r.retryQueue)&&(r.retryQueue=null,hl(e,n))));break;case 19:dl(t,e),ml(e),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,hl(e,r)));break;case 21:break;default:dl(t,e),ml(e)}}function ml(e){var t=e.flags;if(2&t){try{if(27!==e.tag){e:{for(var n=e.return;null!==n;){if(Ka(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 27:var i=r.stateNode;Xa(e,Qa(e),i);break;case 5:var s=r.stateNode;32&r.flags&&(St(s,""),r.flags&=-33),Xa(e,Qa(e),s);break;case 3:case 4:var a=r.stateNode.containerInfo;Ya(e,Qa(e),a);break;default:throw Error(o(161))}}}catch(l){ru(e,e.return,l)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function gl(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;gl(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)il(e,t.alternate,t),t=t.sibling}function yl(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:za(4,t,t.return),yl(t);break;case 1:Ha(t,t.return);var n=t.stateNode;"function"===typeof n.componentWillUnmount&&$a(t,t.return,n),yl(t);break;case 26:case 27:case 5:Ha(t,t.return),yl(t);break;case 22:Ha(t,t.return),null===t.memoizedState&&yl(t);break;default:yl(t)}e=e.sibling}}function bl(e,t,n){for(n=n&&0!==(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,i=e,s=t,o=s.flags;switch(s.tag){case 0:case 11:case 15:bl(i,s,n),Va(4,s);break;case 1:if(bl(i,s,n),"function"===typeof(i=(r=s).stateNode).componentDidMount)try{i.componentDidMount()}catch(c){ru(r,r.return,c)}if(null!==(i=(r=s).updateQueue)){var a=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(null!==l)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Fa(l[i],a)}catch(c){ru(r,r.return,c)}}n&&64&o&&Ba(s),qa(s,s.return);break;case 26:case 27:case 5:bl(i,s,n),n&&null===r&&4&o&&Wa(s),qa(s,s.return);break;case 12:default:bl(i,s,n);break;case 13:bl(i,s,n),n&&4&o&&ul(i,s);break;case 22:null===s.memoizedState&&bl(i,s,n),qa(s,s.return)}t=t.sibling}}function wl(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&zi(n))}function xl(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&zi(e))}function Sl(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Sl(e,t,n,r),2048&i&&Va(9,t);break;case 3:Sl(e,t,n,r),2048&i&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&zi(e)));break;case 12:if(2048&i){Sl(e,t,n,r),e=t.stateNode;try{var s=t.memoizedProps,o=s.id,a=s.onPostCommit;"function"===typeof a&&a(o,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(l){ru(t,t.return,l)}}else Sl(e,t,n,r);break;case 23:break;case 22:s=t.stateNode,null!==t.memoizedState?4&s._visibility?Sl(e,t,n,r):Tl(e,t):4&s._visibility?Sl(e,t,n,r):(s._visibility|=4,kl(e,t,n,r,0!==(10256&t.subtreeFlags))),2048&i&&wl(t.alternate,t);break;case 24:Sl(e,t,n,r),2048&i&&xl(t.alternate,t);break;default:Sl(e,t,n,r)}}function kl(e,t,n,r,i){for(i=i&&0!==(10256&t.subtreeFlags),t=t.child;null!==t;){var s=e,o=t,a=n,l=r,c=o.flags;switch(o.tag){case 0:case 11:case 15:kl(s,o,a,l,i),Va(8,o);break;case 23:break;case 22:var u=o.stateNode;null!==o.memoizedState?4&u._visibility?kl(s,o,a,l,i):Tl(s,o):(u._visibility|=4,kl(s,o,a,l,i)),i&&2048&c&&wl(o.alternate,o);break;case 24:kl(s,o,a,l,i),i&&2048&c&&xl(o.alternate,o);break;default:kl(s,o,a,l,i)}t=t.sibling}}function Tl(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Tl(n,r),2048&i&&wl(r.alternate,r);break;case 24:Tl(n,r),2048&i&&xl(r.alternate,r);break;default:Tl(n,r)}t=t.sibling}}var _l=8192;function Cl(e){if(e.subtreeFlags&_l)for(e=e.child;null!==e;)Al(e),e=e.sibling}function Al(e){switch(e.tag){case 26:Cl(e),e.flags&_l&&null!==e.memoizedState&&function(e,t,n){if(null===Ph)throw Error(o(475));var r=Ph;if("stylesheet"===t.type&&("string"!==typeof n.media||!1!==matchMedia(n.media).matches)&&0===(4&t.state.loading)){if(null===t.instance){var i=vh(n.href),s=e.querySelector(yh(i));if(s)return null!==(e=s._p)&&"object"===typeof e&&"function"===typeof e.then&&(r.count++,r=Rh.bind(r),e.then(r,r)),t.state.loading|=4,t.instance=s,void Xe(s);s=e.ownerDocument||e,n=bh(n),(i=uh.get(i))&&kh(n,i),Xe(s=s.createElement("link"));var a=s;a._p=new Promise((function(e,t){a.onload=e,a.onerror=t})),Wu(s,"link",n),t.instance=s}null===r.stylesheets&&(r.stylesheets=new Map),r.stylesheets.set(t,e),(e=t.state.preload)&&0===(3&t.state.loading)&&(r.count++,t=Rh.bind(r),e.addEventListener("load",t),e.addEventListener("error",t))}}(fl,e.memoizedState,e.memoizedProps);break;case 5:default:Cl(e);break;case 3:case 4:var t=fl;fl=dh(e.stateNode.containerInfo),Cl(e),fl=t;break;case 22:null===e.memoizedState&&(null!==(t=e.alternate)&&null!==t.memoizedState?(t=_l,_l=16777216,Cl(e),_l=t):Cl(e))}}function Il(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function Pl(e){var t=e.deletions;if(0!==(16&e.flags)){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];nl=r,Dl(r,e)}Il(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)Nl(e),e=e.sibling}function Nl(e){switch(e.tag){case 0:case 11:case 15:Pl(e),2048&e.flags&&za(9,e,e.return);break;case 3:case 12:default:Pl(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&4&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-5,Rl(e)):Pl(e)}}function Rl(e){var t=e.deletions;if(0!==(16&e.flags)){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];nl=r,Dl(r,e)}Il(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:za(8,t,t.return),Rl(t);break;case 22:4&(n=t.stateNode)._visibility&&(n._visibility&=-5,Rl(t));break;default:Rl(t)}e=e.sibling}}function Dl(e,t){for(;null!==nl;){var n=nl;switch(n.tag){case 0:case 11:case 15:za(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:zi(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,nl=r;else e:for(n=e;null!==nl;){var i=(r=nl).sibling,s=r.return;if(sl(r),r===n){nl=null;break e}if(null!==i){i.return=s,nl=i;break e}nl=s}}}function Ol(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.t
2ype=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jl(e,t,n,r){return new Ol(e,t,n,r)}function Ll(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ml(e,t){var n=e.alternate;return null===n?((n=jl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=31457280&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Fl(e,t){e.flags&=31457282;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ul(e,t,n,r,i,s){var a=0;if(r=e,"function"===typeof e)Ll(e)&&(a=1);else if("string"===typeof e)a=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!==typeof t.precedence||"string"!==typeof t.href||""===t.href)break;return!0;case"link":if("string"!==typeof t.rel||"string"!==typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"===typeof t.precedence&&null==e);case"script":if(t.async&&"function"!==typeof t.async&&"symbol"!==typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"===typeof t.src)return!0}return!1}(e,n,Q.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case h:return Vl(n.children,i,s,t);case d:a=8,i|=24;break;case f:return(e=jl(12,n,t,2|i)).elementType=f,e.lanes=s,e;case y:return(e=jl(13,n,t,i)).elementType=y,e.lanes=s,e;case b:return(e=jl(19,n,t,i)).elementType=b,e.lanes=s,e;case S:return zl(n,i,s,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case p:case g:a=10;break e;case m:a=9;break e;case v:a=11;break e;case w:a=14;break e;case x:a=16,r=null;break e}a=29,n=Error(o(130,null===e?"null":typeof e,"")),r=null}return(t=jl(a,n,t,i)).elementType=e,t.type=r,t.lanes=s,t}function Vl(e,t,n,r){return(e=jl(7,e,r,t)).lanes=n,e}function zl(e,t,n,r){(e=jl(22,e,r,t)).elementType=S,e.lanes=n;var i={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var e=i._current;if(null===e)throw Error(o(456));if(0===(2&i._pendingVisibility)){var t=Ir(e,2);null!==t&&(i._pendingVisibility|=2,Rc(t,e,2))}},attach:function(){var e=i._current;if(null===e)throw Error(o(456));if(0!==(2&i._pendingVisibility)){var t=Ir(e,2);null!==t&&(i._pendingVisibility&=-3,Rc(t,e,2))}}};return e.stateNode=i,e}function Bl(e,t,n){return(e=jl(6,e,null,t)).lanes=n,e}function $l(e,t,n){return(t=jl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ql(e){e.flags|=4}function Hl(e,t){if("stylesheet"!==t.type||0!==(4&t.state.loading))e.flags&=-16777217;else if(e.flags|=16777216,!Ih(t)){if(null!==(t=Ai.current)&&((4194176&rc)===rc?null!==Ii:(62914560&rc)!==rc&&0===(536870912&rc)||t!==Ii))throw di=li,ai;e.flags|=8192}}function Wl(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Pe():536870912,e.lanes|=t,mc|=t)}function Gl(e,t){if(!Yr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Kl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=31457280&i.subtreeFlags,r|=31457280&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ql(e,t,n){var r=t.pendingProps;switch(Gr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return Kl(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ba(Ui),ee(),n.pe
vendor: 13,939 bytes, line 2
2ndingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(ri(t)?ql(t):null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==Xr&&(Oc(Xr),Xr=null))),Kl(t),null;case 26:return n=t.memoizedState,null===e?(ql(t),null!==n?(Kl(t),Hl(t,n)):(Kl(t),t.flags&=-16777217)):n?n!==e.memoizedState?(ql(t),Kl(t),Hl(t,n)):(Kl(t),t.flags&=-16777217):(e.memoizedProps!==r&&ql(t),Kl(t),t.flags&=-16777217),null;case 27:ne(t),n=X.current;var i=t.type;if(null!==e&&null!=t.stateNode)e.memoizedProps!==r&&ql(t);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Kl(t),null}e=Q.current,ri(t)?ti(t):(e=ch(i,r,n),t.stateNode=e,ql(t))}return Kl(t),null;case 5:if(ne(t),n=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&ql(t);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Kl(t),null}if(e=Q.current,ri(t))ti(t);else{switch(i=Qu(X.current),e){case 1:e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":(e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"===typeof r.is?i.createElement("select",{is:r.is}):i.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"===typeof r.is?i.createElement(n,{is:r.is}):i.createElement(n)}}e[Fe]=t,e[Ue]=r;e:for(i=t.child;null!==i;){if(5===i.tag||6===i.tag)e.appendChild(i.stateNode);else if(4!==i.tag&&27!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;null===i.sibling;){if(null===i.return||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=e;e:switch(Wu(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&ql(t)}}return Kl(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&ql(t);else{if("string"!==typeof r&&null===t.stateNode)throw Error(o(166));if(e=X.current,ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(i=Kr))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Fe]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||Bu(e.nodeValue,n)))||ei(t)}else(e=Qu(e).createTextNode(r))[Fe]=t,t.stateNode=e}return Kl(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=ri(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(o(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(o(317));i[Fe]=t}else ii(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Kl(t),i=!1}else null!==Xr&&(Oc(Xr),Xr=null),i=!0;if(!i)return 256&t.flags?(Di(t),t):(Di(t),null)}if(Di(t),0!==(128&t.flags))return t.lanes=n,t;if(n=null!==r,e=null!==e&&null!==e.memoizedState,n){i=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(i=r.alternate.memoizedState.cachePool.pool);var s=null;null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(s=r.memoizedState.cachePool.pool),s!==i&&(r.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Wl(t,t.updateQueue),Kl(t),null;case 4:return ee(),null===e&&Ru(t.stateNode.containerInfo),Kl(t),null;case 10:return ba(t.type),Kl(t),null;case 19:if(G(Oi),null===(i=t.memoizedState))return Kl(t),null;if(r=0!==(128&t.flags),null===(s=i.rendering))if(r)Gl(i,!1);else{if(0!==uc||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(s=ji(e))){for(t.flags|=128,Gl(i,!1),e=s.updateQueue,t.updateQueue=e,Wl(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Fl(n,e),n=n.sibling;return K(Oi,1&Oi.current|2),t.child}e=e.sibling}null!==i.tail&&le()>wc&&(t.flags|=128,r=!0,Gl(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ji(s))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Wl(t,e),Gl(i,!0),null===i.tail&&"hidden"===i.tailMode&&!s.alternate&&!Yr)return Kl(t),null}else 2*le()-i.renderingStartTime>wc&&536870912!==n&&(t.flags|=128,r=!0,Gl(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(null!==(e=i.last)?e.sibling=s:t.child=s,i.last=s)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=le(),t.sibling=null,e=Oi.current,K(Oi,r?1&e|2:1&e),t):(Kl(t),null);case 22:case 23:return Di(t),Ci(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!==(536870912&n)&&0===(128&t.flags)&&(Kl(t),6&t.subtreeFlags&&(t.flags|=8192)):Kl(t),null!==(n=t.updateQueue)&&Wl(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&G(Ki),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ba(Ui),Kl(t),null;case 25:return null}throw Error(o(156,t.tag))}function Yl(e,t){switch(Gr(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ba(Ui),ee(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return ne(t),null;case 13:if(Di(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));ii()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return G(Oi),null;case 4:return ee(),null;case 10:return ba(t.type),null;case 22:case 23:return Di(t),Ci(),null!==e&&G(Ki),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return ba(Ui),null;default:return null}}function Xl(e,t){switch(Gr(t),t.tag){case 3:ba(Ui),ee();break;case 26:case 27:case 5:ne(t);break;case 4:ee();break;case 13:Di(t);break;case 19:G(Oi);break;case 10:ba(t.type);break;case 22:case 23:Di(t),Ci(),null!==e&&G(Ki);break;case 24:ba(Ui)}}var Jl={getCacheForType:function(e){var t=Ta(Ui),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n}},Zl="function"===typeof WeakMap?WeakMap:Map,ec=0,tc=null,nc=null,rc=0,ic=0,sc=null,oc=!1,ac=!1,lc=!1,cc=0,uc=0,hc=0,dc=0,fc=0,pc=0,mc=0,gc=null,vc=null,yc=!1,bc=0,wc=1/0,xc=null,Sc=null,Ec=!1,kc=null,Tc=0,_c=0,Cc=null,Ac=0,Ic=null;function Pc(){if(0!==(2&ec)&&0!==rc)return rc&-rc;if(null!==P.T){return 0!==qi?qi:xu()}return Le()}function Nc(){0===pc&&(pc=0===(536870912&rc)||Yr?Ie():536870912);var e=Ai.current;return null!==e&&(e.flags|=32),pc}function Rc(e,t,n){(e===tc&&2===ic||null!==e.cancelPendingCommit)&&(Vc(e,0),Mc(e,rc,pc,!1)),Re(e,n),0!==(2&ec)&&e===tc||(e===tc&&(0===(2&ec)&&(dc|=n),4===uc&&Mc(e,rc,pc,!1)),mu(e))}function Dc(e,t,n){if(0!==(6&ec))throw Error(o(327));for(var r=!n&&0===(60&t)&&0===(t&e.expiredLanes)||Ce(e,t),i=r?function(e,t){var n=ec;ec|=2;var r=Bc(),i=$c();tc!==e||rc!==t?(xc=null,wc=le()+500,Vc(e,t)):ac=Ce(e,t);e:for(;;)try{if(0!==ic&&null!==nc){t=nc;var s=sc;t:switch(ic){case 1:ic=0,sc=null,Yc(e,t,s,1);break;case 2:if(ci(s)){ic=0,sc=null,Qc(t);break}t=function(){2===ic&&tc===e&&(ic=7),mu(e)},s.then(t,t);break e;case 3:ic=7;break e;case 4:ic=5;break e;case 7:ci(s)?(ic=0,sc=null,Qc(t)):(ic=0,sc=null,Yc(e,t,s,7));break;case 5:var a=null;switch(nc.tag){case 26:a=nc.memoizedState;case 5:case 27:var l=nc;if(!a||Ih(a)){ic=0,sc=null;var c=l.sibling;if(null!==c)nc=c;else{var u=l.return;null!==u?(nc=u,Xc(u)):nc=null}break t}}ic=0,sc=null,Yc(e,t,s,5);break;case 6:ic=0,sc=null,Yc(e,t,s,6);break;case 8:Uc(),uc=6;break e;default:throw Error(o(462))}}Gc();break}catch(h){zc(e,h)}return va=ga=null,P.H=r,P.A=i,ec=n,null!==nc?0:(tc=null,rc=0,_r(),uc)}(e,t):Hc(e,t,!0),s=r;;){if(0===i){ac&&!r&&Mc(e,t,0,!1);break}if(6===i)Mc(e,t,0,!oc);else{if(n=e.current.alternate,s&&!Lc(n)){i=Hc(e,t,!1),s=!1;continue}if(2===i){if(s=t,e.errorRecoveryDisabledLanes&s)var a=0;else a=0!==(a=-536870913&e.pendingLanes)?a:536870912&a?536870912:0;if(0!==a){t=a;e:{var l=e;i=gc;var c=l.current.memoizedState.isDehydrated;if(c&&(Vc(l,a).flags|=256),2!==(a=Hc(l,a,!1))){if(lc&&!c){l.errorRecoveryDisabledLanes|=s,dc|=s,i=4;break e}s=vc,vc=i,null!==s&&Oc(s)}i=a}if(s=!1,2!==i)continue}}if(1===i){Vc(e,0),Mc(e,t,0,!0);break}e:{switch(r=e,i){case 0:case 1:throw Error(o(345));case 4:if((4194176&t)===t){Mc(r,t,pc,!oc);break e}break;case 2:vc=null;break;case 3:case 5:break;default:throw Error(o(329))}if(r.finishedWork=n,r.finishedLanes=t,(62914560&t)===t&&10<(s=bc+300-le())){if(Mc(r,t,pc,!oc),0!==_e(r,0))break e;r.timeoutHandle=eh(jc.bind(null,r,n,vc,xc,yc,t,pc,dc,mc,oc,2,-0,0),s)}else jc(r,n,vc,xc,yc,t,pc,dc,mc,oc,0,-0,0)}}break}mu(e)}function Oc(e){null===vc?vc=e:vc.push.apply(vc,e)}function jc(e,t,n,r,i,s,a,l,c,u,h,d,f){var p=t.subtreeFlags;if((8192&p||16785408===(16785408&p))&&(Ph={stylesheets:null,count:0,unsuspend:Nh},Al(t),null!==(t=function(){if(null===Ph)throw Error(o(475));var e=Ph;return e.stylesheets&&0===e.count&&Oh(e,e.stylesheets),0<e.count?function(t){var n=setTimeout((function(){if(e.stylesheets&&Oh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}),6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}())))return e.cancelPendingCommit=t(Zc.bind(null,e,n,r,i,a,l,c,1,d,f)),void Mc(e,s,a,!u);Zc(e,n,r,i,a,l,c,h,d,f)}function Lc(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Kn(s(),i))return!1}catch(o){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Mc(e,t,n,r){t&=~fc,t&=~dc,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var s=31-we(i),o=1<<s;r[s]=-1,i&=~o}0!==n&&De(e,n,t)}function Fc(){return 0!==(6&ec)||(gu(0,!1),!1)}function Uc(){if(null!==nc){if(0===ic)var e=nc.return;else va=ga=null,vs(e=nc),pi=null,mi=0,e=nc;for(;null!==e;)Xl(e.alternate,e),e=e.return;nc=null}}function Vc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,th(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Uc(),tc=e,nc=n=Ml(e.current,null),rc=t,ic=0,sc=null,oc=!1,ac=Ce(e,t),lc=!1,mc=pc=fc=dc=hc=uc=0,vc=gc=null,yc=!1,0!==(8&t)&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var i=31-we(r),s=1<<i;t|=e[i],r&=~s}return cc=t,_r(),n}function zc(e,t){Zi=null,P.H=To,t===oi?(t=fi(),ic=3):t===ai?(t=fi(),ic=4):ic=t===$o?8:null!==t&&"object"===typeof t&&"function"===typeof t.then?6:1,sc=t,null===nc&&(uc=1,Fo(e,Or(t,e.current)))}function Bc(){var e=P.H;return P.H=To,null===e?To:e}function $c(){var e=P.A;return P.A=Jl,e}function qc(){uc=4,oc||(4194176&rc)!==rc&&null!==Ai.current||(ac=!0),0===(134217727&hc)&&0===(134217727&dc)||null===tc||Mc(tc,rc,pc,!1)}function Hc(e,t,n){var r=ec;ec|=2;var i=Bc(),s=$c();tc===e&&rc===t||(xc=null,Vc(e,t)),t=!1;var o=uc;e:for(;;)try{if(0!==ic&&null!==nc){var a=nc,l=sc;switch(ic){case 8:Uc(),o=6;break e;case 3:case 2:case 6:null===Ai.current&&(t=!0);var c=ic;if(ic=0,sc=null,Yc(e,a,l,c),n&&ac){o=0;break e}break;default:c=ic,ic=0,sc=null,Yc(e,a,l,c)}}Wc(),o=uc;break}catch(u){zc(e,u)}return t&&e.shellSuspendCounter++,va=ga=null,ec=r,P.H=i,P.A=s,null===nc&&(tc=null,rc=0,_r()),o}function Wc(){for(;null!==nc;)Kc(nc)}function Gc(){for(;null!==nc&&!oe();)Kc(nc)}function Kc(e){var t=pa(e.alternate,e,cc);e.memoizedProps=e.pendingProps,null===t?Xc(e):nc=t}function Qc(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Zo(n,t,t.pendingProps,t.type,void 0,rc);break;case 11:t=Zo(n,t,t.pendingProps,t.type.render,t.ref,rc);break;case 5:vs(t);default:Xl(n,t),t=pa(n,t=nc=Fl(t,cc),cc)}e.memoizedProps=e.pendingProps,null===t?Xc(e):nc=t}function Yc(e,t,n,r){va=ga=null,vs(t),pi=null,mi=0;var i=t.return;try{if(function(e,t,n,r,i){if(n.flags|=32768,null!==r&&"object"===typeof r&&"function"===typeof r.then){if(null!==(t=n.alternate)&&Sa(t,n,i,!0),null!==(n=Ai.current)){switch(n.tag){case 13:return null===Ii?qc():null===n.alternate&&0===uc&&(uc=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===li?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),iu(e,r,i)),!1;case 22:return n.flags|=65536,r===li?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),iu(e,r,i)),!1}throw Error(o(435,n.tag))}return iu(e,r,i),qc(),!1}if(Yr)return null!==(t=Ai.current)?(0===(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Zr&&si(Or(e=Error(o(422),{cause:r}),n))):(r!==Zr&&si(Or(t=Error(o(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,i&=-i,e.lanes|=i,r=Or(r,n),Oa(e,i=Vo(e.stateNode,r,i)),4!==uc&&(uc=2)),!1;var s=Error(o(520),{cause:r});if(s=Or(s,n),null===gc?gc=[s]:gc.push(s),4!==uc&&(uc=2),null===t)return!0;r=Or(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,Oa(n,e=Vo(n.stateNode,r,e)),!1;case 1:if(t=n.type,s=n.stateNode,0===(128&n.flags)&&("function"===typeof t.getDerivedStateFromError||null!==s&&"function"===typeof s.componentDidCatch&&(null===Sc||!Sc.has(s))))return n.flags|=65536,i&=-i,n.lanes|=i,Bo(i=zo(i),e,n,r),Oa(n,i),!1}n=n.return}while(null!==n);return!1}(e,i,t,n,rc))return uc=1,Fo(e,Or(n,e.current)),void(nc=null)}catch(s){if(null!==i)throw nc=i,s;return uc=1,Fo(e,Or(n,e.current)),void(nc=null)}32768&t.flags?(Yr||1===r?e=!0:ac||0!==(536870912&rc)?e=!1:(oc=e=!0,(2===r||3===r||6===r)&&(null!==(r=Ai.current)&&13===r.tag&&(r.flags|=16384))),Jc(t,e)):Xc(t)}function Xc(e){var t=e;do{if(0!==(32768&t.flags))return void Jc(t,oc);e=t.return;var n=Ql(t.alternate,t,cc);if(null!==n)return void(nc=n);if(null!==(t=t.sibling))return void(nc=t);nc=t=e}while(null!==t);0===uc&&(uc=5)}
2function Jc(e,t){do{var n=Yl(e.alternate,e);if(null!==n)return n.flags&=32767,void(nc=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(nc=e);nc=e=n}while(null!==e);uc=6,nc=null}function Zc(e,t,n,r,i,s,a,l,c,u){var h=P.T,d=B.p;try{B.p=2,P.T=null,function(e,t,n,r,i,s,a,l){do{tu()}while(null!==kc);if(0!==(6&ec))throw Error(o(327));var c=e.finishedWork;if(r=e.finishedLanes,null===c)return null;if(e.finishedWork=null,e.finishedLanes=0,c===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var u=c.lanes|c.childLanes;if(function(e,t,n,r,i,s){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var a=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-we(n),h=1<<u;a[u]=0,l[u]=-1;var d=c[u];if(null!==d)for(c[u]=null,u=0;u<d.length;u++){var f=d[u];null!==f&&(f.lane&=-536870913)}n&=~h}0!==r&&De(e,r,0),0!==s&&0===i&&0!==e.tag&&(e.suspendedLanes|=s&~(o&~t))}(e,r,u|=Tr,s,a,l),e===tc&&(nc=tc=null,rc=0),0===(10256&c.subtreeFlags)&&0===(10256&c.flags)||Ec||(Ec=!0,_c=u,Cc=n,function(e,t){ie(e,t)}(de,(function(){return tu(),null}))),n=0!==(15990&c.flags),0!==(15990&c.subtreeFlags)||n?(n=P.T,P.T=null,s=B.p,B.p=2,a=ec,ec|=4,function(e,t){if(e=e.containerInfo,Gu=qh,er(e=Zn(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch(g){n=null;break e}var a=0,l=-1,c=-1,u=0,h=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==i&&3!==d.nodeType||(l=a+i),d!==s||0!==r&&3!==d.nodeType||(c=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===i&&(l=a),f===s&&++h===r&&(c=a),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ku={focusedElem:e,selectionRange:n},qh=!1,nl=t;null!==nl;)if(e=(t=nl).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,nl=e;else for(;null!==nl;){switch(s=(t=nl).alternate,e=t.flags,t.tag){case 0:case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(0!==(1024&e)&&null!==s){e=void 0,n=t,i=s.memoizedProps,s=s.memoizedState,r=n.stateNode;try{var m=Do(n.type,i,(n.elementType,n.type));e=r.getSnapshotBeforeUpdate(m,s),r.__reactInternalSnapshotBeforeUpdate=e}catch(v){ru(n,n.return,v)}}break;case 3:if(0!==(1024&e))if(9===(n=(e=t.stateNode.containerInfo).nodeType))oh(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":oh(e);break;default:e.textContent=""}break;default:if(0!==(1024&e))throw Error(o(163))}if(null!==(e=t.sibling)){e.return=t.return,nl=e;break}nl=t.return}m=rl,rl=!1}(e,c),pl(c,e),tr(Ku,e.containerInfo),qh=!!Gu,Ku=Gu=null,e.current=c,il(e,c.alternate,c),ae(),ec=a,B.p=s,P.T=n):e.current=c,Ec?(Ec=!1,kc=e,Tc=r):eu(e,u),u=e.pendingLanes,0===u&&(Sc=null),function(e){if(ye&&"function"===typeof ye.onCommitFiberRoot)try{ye.onCommitFiberRoot(ve,e,void 0,128===(128&e.current.flags))}catch(t){}}(c.stateNode),mu(e),null!==t)for(i=e.onRecoverableError,c=0;c<t.length;c++)u=t[c],i(u.value,{componentStack:u.stack});0!==(3&Tc)&&tu(),u=e.pendingLanes,0!==(4194218&r)&&0!==(42&u)?e===Ic?Ac++:(Ac=0,Ic=e):Ac=0,gu(0,!1)}(e,t,n,r,d,i,s,a)}finally{P.T=h,B.p=d}}function eu(e,t){0===(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,zi(t)))}function tu(){if(null!==kc){var e=kc,t=_c;_c=0;var n=je(Tc),r=P.T,i=B.p;try{if(B.p=32>n?32:n,P.T=null,null===kc)var s=!1;else{n=Cc,Cc=null;var a=kc,l=Tc;if(kc=null,Tc=0,0!==(6&ec))throw Error(o(331));var c=ec;if(ec|=4,Nl(a.current),El(a,a.current,l,n),ec=c,gu(0,!1),ye&&"function"===typeof ye.onPostCommitFiberRoot)try{ye.onPostCommitFiberRoot(ve,a)}catch(u){}s=!0}return s}finally{B.p=i,P.T=r,eu(e,t)}}return!1}function nu(e,t,n){t=Or(n,t),null!==(e=Ra(e,t=Vo(e.stateNode,t,2),2))&&(Re(e,2),mu(e))}function ru(e,t,n){if(3===e.tag)nu(e,e,n);else for(;null!==t;){if(3===t.tag){nu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Sc||!Sc.has(r))){e=Or(n,e),null!==(r=Ra(t,n=zo(2),2))&&(Bo(n,r,t,e),Re(r,2),mu(r));break}}t=t.return}}function iu(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Zl;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(lc=!0,i.add(n),e=su.bind(null,e,t,n),t.then(e,e))}function su(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,tc===e&&(rc&n)===n&&(4===uc||3===uc&&(62914560&rc)===rc&&300>le()-bc?0===(2&ec)&&Vc(e,0):fc|=n,mc===rc&&(mc=0)),mu(e)}function ou(e,t){0===t&&(t=Pe()),null!==(e=Ir(e,t))&&(Re(e,t),mu(e))}function au(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),ou(e,n)}function lu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}null!==r&&r.delete(t),ou(e,n)}var cu=null,uu=null,hu=!1,du=!1,fu=!1,pu=0;function mu(e){var t;e!==uu&&null===e.next&&(null===uu?cu=uu=e:uu=uu.next=e),du=!0,hu||(hu=!0,t=vu,rh((function(){0!==(6&ec)?ie(ue,t):t()})))}function gu(e,t){if(!fu&&du){fu=!0;do{for(var n=!1,r=cu;null!==r;){if(!t)if(0!==e){var i=r.pendingLanes;if(0===i)var s=0;else{var o=r.suspendedLanes,a=r.pingedLanes;s=(1<<31-we(42|e)+1)-1,s=201326677&(s&=i&~(o&~a))?201326677&s|1:s?2|s:0}0!==s&&(n=!0,wu(r,s))}else s=rc,0===(3&(s=_e(r,r===tc?s:0)))||Ce(r,s)||(n=!0,wu(r,s));r=r.next}}while(n);fu=!1}}function vu(){du=hu=!1;var e=0;0!==pu&&(function(){var e=window.event;if(e&&"popstate"===e.type)return e!==Zu&&(Zu=e,!0);return Zu=null,!1}()&&(e=pu),pu=0);for(var t=le(),n=null,r=cu;null!==r;){var i=r.next,s=yu(r,t);0===s?(r.next=null,null===n?cu=i:n.next=i,null===i&&(uu=n)):(n=r,(0!==e||0!==(3&s))&&(du=!0)),r=i}gu(e,!1)}function yu(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=-62914561&e.pendingLanes;0<s;){var o=31-we(s),a=1<<o,l=i[o];-1===l?0!==(a&n)&&0===(a&r)||(i[o]=Ae(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}if(n=rc,n=_e(e,e===(t=tc)?n:0),r=e.callbackNode,0===n||e===t&&2===ic||null!==e.cancelPendingCommit)return null!==r&&null!==r&&se(r),e.callbackNode=null,e.callbackPriority=0;if(0===(3&n)||Ce(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&se(r),je(n)){case 2:case 8:n=he;break;case 32:default:n=de;break;case 268435456:n=pe}return r=bu.bind(null,e),n=ie(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&se(r),e.callbackPriority=2,e.callbackNode=null,2}function bu(e,t){var n=e.callbackNode;if(tu()&&e.callbackNode!==n)return null;var r=rc;return 0===(r=_e(e,e===tc?r:0))?null:(Dc(e,r,t),yu(e,le()),null!=e.callbackNode&&e.callbackNode===n?bu.bind(null,e):null)}function wu(e,t){if(tu())return null;Dc(e,t,!0)}function xu(){return 0===pu&&(pu=Ie()),pu}function Su(e){return null==e||"symbol"===typeof e||"boolean"===typeof e?null:"function"===typeof e?e:It(""+e)}function Eu(e,t){var n=t.ownerDocument.createElement("input");
vendor: 9,305 bytes, line 2
2return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var ku=0;ku<xr.length;ku++){var Tu=xr[ku];Sr(Tu.toLowerCase(),"on"+(Tu[0].toUpperCase()+Tu.slice(1)))}Sr(fr,"onAnimationEnd"),Sr(pr,"onAnimationIteration"),Sr(mr,"onAnimationStart"),Sr("dblclick","onDoubleClick"),Sr("focusin","onFocus"),Sr("focusout","onBlur"),Sr(gr,"onTransitionRun"),Sr(vr,"onTransitionStart"),Sr(yr,"onTransitionCancel"),Sr(br,"onTransitionEnd"),tt("onMouseEnter",["mouseout","mouseover"]),tt("onMouseLeave",["mouseout","mouseover"]),tt("onPointerEnter",["pointerout","pointerover"]),tt("onPointerLeave",["pointerout","pointerover"]),et("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),et("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),et("onBeforeInput",["compositionend","keypress","textInput","paste"]),et("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),et("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),et("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _u="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cu=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_u));function Au(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;s=a,i.currentTarget=c;try{s(i)}catch(u){Oo(u)}i.currentTarget=null,s=l}else for(o=0;o<r.length;o++){if(l=(a=r[o]).instance,c=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;s=a,i.currentTarget=c;try{s(i)}catch(u){Oo(u)}i.currentTarget=null,s=l}}}}function Iu(e,t){var n=t[ze];void 0===n&&(n=t[ze]=new Set);var r=e+"__bubble";n.has(r)||(Du(t,e,2,!1),n.add(r))}function Pu(e,t,n){var r=0;t&&(r|=4),Du(n,e,r,t)}var Nu="_reactListening"+Math.random().toString(36).slice(2);function Ru(e){if(!e[Nu]){e[Nu]=!0,Je.forEach((function(t){"selectionchange"!==t&&(Cu.has(t)||Pu(t,!1,e),Pu(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Nu]||(t[Nu]=!0,Pu("selectionchange",!1,t))}}function Du(e,t,n,r){switch(Xh(t)){case 2:var i=Hh;break;case 8:i=Wh;break;default:i=Gh}n=i.bind(null,t,n,e),i=void 0,!Ft||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ou(e,t,n,r,i){var s=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var a=r.stateNode.containerInfo;if(a===i||8===a.nodeType&&a.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var l=o.tag;if((3===l||4===l)&&((l=o.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;o=o.return}for(;null!==a;){if(null===(o=Ge(a)))return;if(5===(l=o.tag)||6===l||26===l||27===l){r=s=o;continue e}a=a.parentNode}}r=r.return}Lt((function(){var r=s,i=Nt(n),o=[];e:{var a=wr.get(e);if(void 0!==a){var l=Jt,c=e;switch(e){case"keypress":if(0===qt(n))break e;case"keydown":case"keyup":l=pn;break;case"focusin":c="focus",l=sn;break;case"focusout":c="blur",l=sn;break;case"beforeblur":case"afterblur":l=sn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=nn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=rn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=gn;break;case fr:case pr:case mr:l=on;break;case br:l=vn;break;case"scroll":case"scrollend":l=en;break;case"wheel":l=yn;break;case"copy":case"cut":case"paste":l=an;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=mn;break;case"toggle":case"beforetoggle":l=bn}var u=0!==(4&t),h=!u&&("scroll"===e||"scrollend"===e),d=u?null!==a?a+"Capture":null:a;u=[];for(var f,p=r;null!==p;){var m=p;if(f=m.stateNode,5!==(m=m.tag)&&26!==m&&27!==m||null===f||null===d||null!=(m=Mt(p,d))&&u.push(ju(p,m,f)),h)break;p=p.return}0<u.length&&(a=new l(a,c,null,n,i),o.push({event:a,listeners:u}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===Pt||!(c=n.relatedTarget||n.fromElement)||!Ge(c)&&!c[Ve])&&(l||a)&&(a=i.window===i?i:(a=i.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?Ge(c):null)&&(h=M(c),u=c.tag,c!==h||5!==u&&27!==u&&6!==u)&&(c=null)):(l=null,c=r),l!==c)){if(u=nn,m="onMouseLeave",d="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=mn,m="onPointerLeave",d="onPointerEnter",p="pointer"),h=null==l?a:Qe(l),f=null==c?a:Qe(c),(a=new u(m,p+"leave",l,n,i)).target=h,a.relatedTarget=f,m=null,Ge(i)===r&&((u=new u(d,p+"enter",c,n,i)).target=f,u.relatedTarget=h,m=u),h=m,l&&c)e:{for(d=c,p=0,f=u=l;f;f=Mu(f))p++;for(f=0,m=d;m;m=Mu(m))f++;for(;0<p-f;)u=Mu(u),p--;for(;0<f-p;)d=Mu(d),f--;for(;p--;){if(u===d||null!==d&&u===d.alternate)break e;u=Mu(u),d=Mu(d)}u=null}else u=null;null!==l&&Fu(o,a,l,u,!1),null!==c&&null!==h&&Fu(o,h,c,u,!0)}if("select"===(l=(a=r?Qe(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var g=Mn;else if(Nn(a))if(Fn)g=Gn;else{g=Hn;var v=qn}else!(l=a.nodeName)||"input"!==l.toLowerCase()||"checkbox"!==a.type&&"radio"!==a.type?r&&_t(r.elementType)&&(g=Mn):g=Wn;switch(g&&(g=g(e,r))?Rn(o,g,n,i):(v&&v(e,a,r),"focusout"===e&&r&&"number"===a.type&&null!=r.memoizedProps.value&&yt(a,"number",a.value)),v=r?Qe(r):window,e){case"focusin":(Nn(v)||"true"===v.contentEditable)&&(rr=v,ir=r,sr=null);break;case"focusout":sr=ir=rr=null;break;case"mousedown":or=!0;break;case"contextmenu":case"mouseup":case"dragend":or=!1,ar(o,n,i);break;case"selectionchange":if(nr)break;case"keydown":case"keyup":ar(o,n,i)}var y;if(xn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else In?Cn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(kn&&"ko"!==n.locale&&(In||"onCompositionStart"!==b?"onCompositionEnd"===b&&In&&(y=$t()):(zt="value"in(Vt=i)?Vt.value:Vt.textContent,In=!0)),0<(v=Lu(r,b)).length&&(b=new ln(b,e,null,n,i),o.push({event:b,listeners:v}),y?b.data=y:null!==(y=An(n))&&(b.data=y))),(y=En?function(e,t){switch(e){case"compositionend":return An(t);case"keypress":return 32!==t.which?null:(_n=!0,Tn);case"textInput":return(e=t.data)===Tn&&_n?null:e;default:return null}}(e,n):function(e,t){if(In)return"compositionend"===e||!xn&&Cn(e,t)?(e=$t(),Bt=zt=Vt=null,In=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return kn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(b=Lu(r,"onBeforeInput")).length&&(v=new ln("onBeforeInput","beforeinput",null,n,i),o.push({event:v,listeners:b}),v.data=y)),function(e,t,n,r,i){if("submit"===t&&n&&n.stateNode===i){var s=Su((i[Ue]||null).action),o=r.submitter;o&&null!==(t=(t=o[Ue]||null)?Su(t.formAction):o.getAttribute("formAction"))&&(s=t,o=null);var a=new Jt("action","action",null,r,i);e.push({event:a,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==pu){var e=o?Eu(i,o):new FormData(i);uo(n,{pending:!0,data:e,method:i.method,action:s},null,e)}}else"function"===typeof s&&(a.preventDefault(),e=o?Eu(i,o):new FormData(i),uo(n,{pending:!0,data:e,method:i.method,action:s},s,e))},currentTarget:i}]})}}(o,e,r,n,i)}Au(o,t)}))}function ju(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Lu(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,s=i.stateNode;5!==(i=i.tag)&&26!==i&&27!==i||null===s||(null!=(i=Mt(e,n))&&r.unshift(ju(e,i,s)),null!=(i=Mt(e,t))&&r.push(ju(e,i,s))),e=e.return}return r}function Mu(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function Fu(e,t,n,r,i){for(var s=t._reactName,o=[];null!==n&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(a=a.tag,null!==l&&l===r)break;5!==a&&26!==a&&27!==a||null===c||(l=c,i?null!=(c=Mt(n,s))&&o.unshift(ju(n,c,l)):i||null!=(c=Mt(n,s))&&o.push(ju(n,c,l))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var Uu=/\r\n?/g,Vu=/\u0000|\uFFFD/g;function zu(e){return("string"===typeof e?e:""+e).replace(Uu,"\n").replace(Vu,"")}function Bu(e,t){return t=zu(t),zu(e)===t}function $u(){}function qu(e,t,n,r,i,s){switch(n){case"children":"string"===typeof r?"body"===t||"textarea"===t&&""===r||St(e,r):("number"===typeof r||"bigint"===typeof r)&&"body"!==t&&St(e,""+r);break;
2case"className":at(e,"class",r);break;case"tabIndex":at(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":at(e,n,r);break;case"style":Tt(e,r,s);break;case"data":if("object"!==t){at(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==r||"function"===typeof r||"symbol"===typeof r||"boolean"===typeof r){e.removeAttribute(n);break}r=It(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"===typeof r){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"===typeof s&&("formAction"===n?("input"!==t&&qu(e,t,"name",i.name,i,null),qu(e,t,"formEncType",i.formEncType,i,null),qu(e,t,"formMethod",i.formMethod,i,null),qu(e,t,"formTarget",i.formTarget,i,null)):(qu(e,t,"encType",i.encType,i,null),qu(e,t,"method",i.method,i,null),qu(e,t,"target",i.target,i,null))),null==r||"symbol"===typeof r||"boolean"===typeof r){e.removeAttribute(n);break}r=It(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=$u);break;case"onScroll":null!=r&&Iu("scroll",e);break;case"onScrollEnd":null!=r&&Iu("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!==typeof r||!("__html"in r))throw Error(o(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(o(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!==typeof r&&"symbol"!==typeof r;break;case"muted":e.muted=r&&"function"!==typeof r&&"symbol"!==typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"===typeof r||"boolean"===typeof r||"symbol"===typeof r){e.removeAttribute("xlink:href");break}n=It(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=r&&"function"!==typeof r&&"symbol"!==typeof r?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&"function"!==typeof r&&"symbol"!==typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!==typeof r&&"symbol"!==typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!==typeof r&&"symbol"!==typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"===typeof r||"symbol"===typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Iu("beforetoggle",e),Iu("toggle",e),ot(e,"popover",r);break;case"xlinkActuate":lt(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":lt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":lt(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":lt(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":lt(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":lt(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":lt(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":lt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":lt(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":ot(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&ot(e,n=Ct.get(n)||n,r)}}function Hu(e,t,n,r,i,s){switch(n){case"style":Tt(e,r,s);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!==typeof r||!("__html"in r))throw Error(o(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(o(60));e.innerHTML=n}}break;case"children":"string"===typeof r?St(e,r):("number"===typeof r||"bigint"===typeof r)&&St(e,""+r);break;case"onScroll":null!=r&&Iu("scroll",e);break;case"onScrollEnd":null!=r&&Iu("scrollend",e);break;case"onClick":null!=r&&(e.onclick=$u);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:Ze.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),"function"===typeof(s=null!=(s=e[Ue]||null)?s[n]:null)&&e.removeEventListener(t,s,i),"function"!==typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):ot(e,n,r):("function"!==typeof s&&null!==s&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i)))}}function Wu(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Iu("error",e),Iu("load",e);var r,i=!1,s=!1;for(r in n)if(n.hasOwnProperty(r)){var a=n[r];if(null!=a)switch(r){case"src":i=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:qu(e,t,r,a,n,null)}}return s&&qu(e,t,"srcSet",n.srcSet,n,null),void(i&&qu(e,t,"src",n.src,n,null));case"input":Iu("invalid",e);var l=r=a=s=null,c=null,u=null;for(i in n)if(n.hasOwnProperty(i)){var h=n[i];if(null!=h)switch(i){case"name":s=h;break;case"type":a=h;break;case"checked":c=h;break;case"defaultChecked":u=h;break;case"value":r=h;break;case"defaultValue":l=h;break;case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(o(137,t));break;default:qu(e,t,i,h,n,null)}}return vt(e,r,l,c,u,a,s,!1),void ht(e);case"select":for(s in Iu("invalid",e),i=a=r=null,n)if(n.hasOwnProperty(s)&&null!=(l=n[s]))switch(s){case"value":r=l;break;case"defaultValue":a=l;break;case"multiple":i=l;default:qu(e,t,s,l,n,null)}return t=r,n=a,e.multiple=!!i,void(null!=t?bt(e,!!i,t,!1):null!=n&&bt(e,!!i,n,!0));case"textarea":for(a in Iu("invalid",e),r=s=i=null,n)if(n.hasOwnProperty(a)&&null!=(l=n[a]
vendor: 9,250 bytes, line 2
2))switch(a){case"value":i=l;break;case"defaultValue":s=l;break;case"children":r=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(o(91));break;default:qu(e,t,a,l,n,null)}return xt(e,i,s,r),void ht(e);case"option":for(c in n)if(n.hasOwnProperty(c)&&null!=(i=n[c]))if("selected"===c)e.selected=i&&"function"!==typeof i&&"symbol"!==typeof i;else qu(e,t,c,i,n,null);return;case"dialog":Iu("cancel",e),Iu("close",e);break;case"iframe":case"object":Iu("load",e);break;case"video":case"audio":for(i=0;i<_u.length;i++)Iu(_u[i],e);break;case"image":Iu("error",e),Iu("load",e);break;case"details":Iu("toggle",e);break;case"embed":case"source":case"link":Iu("error",e),Iu("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&null!=(i=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:qu(e,t,u,i,n,null)}return;default:if(_t(t)){for(h in n)n.hasOwnProperty(h)&&(void 0!==(i=n[h])&&Hu(e,t,h,i,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(null!=(i=n[l])&&qu(e,t,l,i,n,null))}var Gu=null,Ku=null;function Qu(e){return 9===e.nodeType?e:e.ownerDocument}function Yu(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Xu(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function Ju(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"bigint"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Zu=null;var eh="function"===typeof setTimeout?setTimeout:void 0,th="function"===typeof clearTimeout?clearTimeout:void 0,nh="function"===typeof Promise?Promise:void 0,rh="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof nh?function(e){return nh.resolve(null).then(e).catch(ih)}:eh;function ih(e){setTimeout((function(){throw e}))}function sh(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void md(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);md(t)}function oh(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":oh(n),We(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function ah(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"F!"===t||"F"===t)break;if("/$"===t)return null}}return e}function lh(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}function ch(e,t,n){switch(t=Qu(n),e){case"html":if(!(e=t.documentElement))throw Error(o(452));return e;case"head":if(!(e=t.head))throw Error(o(453));return e;case"body":if(!(e=t.body))throw Error(o(454));return e;default:throw Error(o(451))}}var uh=new Map,hh=new Set;function dh(e){return"function"===typeof e.getRootNode?e.getRootNode():e.ownerDocument}var fh=B.d;B.d={f:function(){var e=fh.f(),t=Fc();return e||t},r:function(e){var t=Ke(e);null!==t&&5===t.tag&&"form"===t.type?fo(t):fh.r(e)},D:function(e){fh.D(e),mh("dns-prefetch",e,null)},C:function(e,t){fh.C(e,t),mh("preconnect",e,t)},L:function(e,t,n){fh.L(e,t,n);var r=ph;if(r&&e&&t){var i='link[rel="preload"][as="'+mt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(i+='[imagesrcset="'+mt(n.imageSrcSet)+'"]',"string"===typeof n.imageSizes&&(i+='[imagesizes="'+mt(n.imageSizes)+'"]')):i+='[href="'+mt(e)+'"]';var s=i;switch(t){case"style":s=vh(e);break;case"script":s=wh(e)}uh.has(s)||(e=N({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),uh.set(s,e),null!==r.querySelector(i)||"style"===t&&r.querySelector(yh(s))||"script"===t&&r.querySelector(xh(s))||(Wu(t=r.createElement("link"),"link",e),Xe(t),r.head.appendChild(t)))}},m:function(e,t){fh.m(e,t);var n=ph;if(n&&e){var r=t&&"string"===typeof t.as?t.as:"script",i='link[rel="modulepreload"][as="'+mt(r)+'"][href="'+mt(e)+'"]',s=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=wh(e)}if(!uh.has(s)&&(e=N({rel:"modulepreload",href:e},t),uh.set(s,e),null===n.querySelector(i))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(xh(s)))return}Wu(r=n.createElement("link"),"link",e),Xe(r),n.head.appendChild(r)}}},X:function(e,t){fh.X(e,t);var n=ph;if(n&&e){var r=Ye(n).hoistableScripts,i=wh(e),s=r.get(i);s||((s=n.querySelector(xh(i)))||(e=N({src:e,async:!0},t),(t=uh.get(i))&&Th(e,t),Xe(s=n.createElement("script")),Wu(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},r.set(i,s))}},S:function(e,t,n){fh.S(e,t,n);var r=ph;if(r&&e){var i=Ye(r).hoistableStyles,s=vh(e);t=t||"default";var o=i.get(s);if(!o){var a={loading:0,preload:null};if(o=r.querySelector(yh(s)))a.loading=5;else{e=N({rel:"stylesheet",href:e,"data-precedence":t},n),(n=uh.get(s))&&kh(e,n);var l=o=r.createElement("link");Xe(l),Wu(l,"link",e),l._p=new Promise((function(e,t){l.onload=e,l.onerror=t})),l.addEventListener("load",(function(){a.loading|=1})),l.addEventListener("error",(function(){a.loading|=2})),a.loading|=4,Eh(o,t,r)}o={type:"stylesheet",instance:o,count:1,state:a},i.set(s,o)}}},M:function(e,t){fh.M(e,t);var n=ph;if(n&&e){var r=Ye(n).hoistableScripts,i=wh(e),s=r.get(i);s||((s=n.querySelector(xh(i)))||(e=N({src:e,async:!0,type:"module"},t),(t=uh.get(i))&&Th(e,t),Xe(s=n.createElement("script")),Wu(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},r.set(i,s))}}};var ph="undefined"===typeof document?null:document;function mh(e,t,n){var r=ph;if(r&&"string"===typeof t&&t){var i=mt(t);i='link[rel="'+e+'"][href="'+i+'"]',"string"===typeof n&&(i+='[crossorigin="'+n+'"]'),hh.has(i)||(hh.add(i),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(i)&&(Wu(t=r.createElement("link"),"link",e),Xe(t),r.head.appendChild(t)))}}function gh(e,t,n,r){var i,s,a,l,c=(c=X.current)?dh(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return"string"===typeof n.precedence&&"string"===typeof n.href?(t=vh(n.href),(r=(n=Ye(c).hoistableStyles).get(t))||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"===typeof n.href&&"string"===typeof n.precedence){e=vh(n.href);var u=Ye(c).hoistableStyles,h=u.get(e);if(h||(c=c.ownerDocument||c,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=c.querySelector(yh(e)))&&!u._p&&(h.instance=u,h.state.loading=5),uh.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},uh.set(e,n),u||(i=c,s=e,a=n,l=h.state,i.querySelector('link[rel="preload"][as="style"]['+s+"]")?l.loading=1:(s=i.createElement("link"),l.preload=s,s.addEventListener("load",(function(){return l.loading|=1})),s.addEventListener("error",(function(){return l.loading|=2})),Wu(s,"link",a),Xe(s),i.head.appendChild(s))))),t&&null===r)throw Error(o(528,""));return h}if(t&&null!==r)throw Error(o(529,""));return null;case"script":return t=n.async,"string"===typeof(n=n.src)&&t&&"function"!==typeof t&&"symbol"!==typeof t?(t=wh(n),(r=(n=Ye(c).hoistableScripts).get(t))||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function vh(e){return'href="'+mt(e)+'"'}function yh(e){return'link[rel="stylesheet"]['+e+"]"}function bh(e){return N({},e,{"data-precedence":e.precedence,precedence:null})}function wh(e){return'[src="'+mt(e)+'"]'}function xh(e){return"script[async]"+e}function Sh(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+mt(n.href)+'"]');if(r)return t.instance=r,Xe(r),r;var i=N({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return Xe(r=(e.ownerDocument||e).createElement("style")),Wu(r,"style",i),Eh(r,n.precedence,e),t.instance=r;case"stylesheet":i=vh(n.href);var s=e.querySelector(yh(i));if(s)return t.state.loading|=4,t.instance=s,Xe(s),s;r=bh(n),(i=uh.get(i))&&kh(r,i),Xe(s=(e.ownerDocument||e).createElement("link"));var a=s;return a._p=new Promise((function(e,t){a.onload=e,a.onerror=t})),Wu(s,"link",r),t.state.loading|=4,Eh(s,n.precedence,e),t.instance=s;case"script":return s=wh(n.src),(i=e.querySelector(xh(s)))?(t.instance=i,Xe(i),i):(r=n,(i=uh.get(s))&&Th(r=N({},n),i),Xe(i=(e=e.ownerDocument||e).createElement("script")),Wu(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(o(443,t.type))}else"stylesheet"===t.type&&0===(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,Eh(r,n.precedence,e));return t.instance}
vendor: 5,357 bytes, line 2
2function Eh(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,s=i,o=0;o<r.length;o++){var a=r[o];if(a.dataset.precedence===t)s=a;else if(s!==i)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function kh(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function Th(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var _h=null;function Ch(e,t,n){if(null===_h){var r=new Map,i=_h=new Map;i.set(n,r)}else(r=(i=_h).get(n))||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var s=n[i];if(!(s[He]||s[Fe]||"link"===e&&"stylesheet"===s.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==s.namespaceURI){var o=s.getAttribute(t)||"";o=e+o;var a=r.get(o);a?a.push(s):r.set(o,[s])}}return r}function Ah(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function Ih(e){return"stylesheet"!==e.type||0!==(3&e.state.loading)}var Ph=null;function Nh(){}function Rh(){if(this.count--,0===this.count)if(this.stylesheets)Oh(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var Dh=null;function Oh(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,Dh=new Map,t.forEach(jh,e),Dh=null,Rh.call(e))}function jh(e,t){if(!(4&t.state.loading)){var n=Dh.get(e);if(n)var r=n.get(null);else{n=new Map,Dh.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<i.length;s++){var o=i[s];"LINK"!==o.nodeName&&"not all"===o.getAttribute("media")||(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}o=(i=t.instance).getAttribute("data-precedence"),(s=n.get(o)||r)===r&&n.set(null,i),n.set(o,i),this.count++,r=Rh.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),s?s.parentNode.insertBefore(i,s.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(i,e.firstChild),t.state.loading|=4}}var Lh={$$typeof:g,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function Mh(e,t,n,r,i,s,o,a){this.tag=1,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ne(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ne(0),this.hiddenUpdates=Ne(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=s,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=a,this.incompleteTransitions=new Map}function Fh(e,t,n,r,i,s,o,a,l,c,u,h){return e=new Mh(e,t,n,o,a,l,c,h),t=1,!0===s&&(t|=24),s=jl(3,null,null,t),e.current=s,s.stateNode=e,(t=Vi()).refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:r,isDehydrated:n,cache:t},Ia(s),e}function Uh(e){return e?e=Rr:Rr}function Vh(e,t,n,r,i,s){i=Uh(i),null===r.context?r.context=i:r.pendingContext=i,(r=Na(t)).payload={element:n},null!==(s=void 0===s?null:s)&&(r.callback=s),null!==(n=Ra(e,r,t))&&(Rc(n,0,t),Da(n,e,t))}function zh(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Bh(e,t){zh(e,t),(e=e.alternate)&&zh(e,t)}function $h(e){if(13===e.tag){var t=Ir(e,67108864);null!==t&&Rc(t,0,67108864),Bh(e,67108864)}}var qh=!0;function Hh(e,t,n,r){var i=P.T;P.T=null;var s=B.p;try{B.p=2,Gh(e,t,n,r)}finally{B.p=s,P.T=i}}function Wh(e,t,n,r){var i=P.T;P.T=null;var s=B.p;try{B.p=8,Gh(e,t,n,r)}finally{B.p=s,P.T=i}}function Gh(e,t,n,r){if(qh){var i=Kh(r);if(null===i)Ou(e,t,r,Qh,n),od(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Zh=ad(Zh,e,t,n,r,i),!0;case"dragenter":return ed=ad(ed,e,t,n,r,i),!0;case"mouseover":return td=ad(td,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return nd.set(s,ad(nd.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,rd.set(s,ad(rd.get(s)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(od(e,r),4&t&&-1<sd.indexOf(e)){for(;null!==i;){var s=Ke(i);if(null!==s)switch(s.tag){case 3:if((s=s.stateNode).current.memoizedState.isDehydrated){var o=Te(s.pendingLanes);if(0!==o){var a=s;for(a.pendingLanes|=2,a.entangledLanes|=2;o;){var l=1<<31-we(o);a.entanglements[1]|=l,o&=~l}mu(s),0===(6&ec)&&(wc=le()+500,gu(0,!1))}}break;case 13:null!==(a=Ir(s,2))&&Rc(a,0,2),Fc(),Bh(s,2)}if(null===(s=Kh(r))&&Ou(e,t,r,Qh,n),s===i)break;i=s}null!==i&&r.stopPropagation()}else Ou(e,t,r,null,n)}}function Kh(e){return Yh(e=Nt(e))}var Qh=null;function Yh(e){if(Qh=null,null!==(e=Ge(e))){var t=M(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=F(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Qh=e,null}function Xh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close"
vendor: 7,202 bytes, line 2
2:case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ce()){case ue:return 2;case he:return 8;case de:case fe:return 32;case pe:return 268435456;default:return 32}default:return 32}}var Jh=!1,Zh=null,ed=null,td=null,nd=new Map,rd=new Map,id=[],sd="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function od(e,t){switch(e){case"focusin":case"focusout":Zh=null;break;case"dragenter":case"dragleave":ed=null;break;case"mouseover":case"mouseout":td=null;break;case"pointerover":case"pointerout":nd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":rd.delete(t.pointerId)}}function ad(e,t,n,r,i,s){return null===e||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},null!==t&&(null!==(t=Ke(t))&&$h(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function ld(e){var t=Ge(e.target);if(null!==t){var n=M(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=F(n)))return e.blockedOn=t,void function(e,t){var n=B.p;try{return B.p=e,t()}finally{B.p=n}}(e.priority,(function(){if(13===n.tag){var e=Pc(),t=Ir(n,e);null!==t&&Rc(t,0,e),Bh(n,e)}}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function cd(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Kh(e.nativeEvent);if(null!==n)return null!==(t=Ke(n))&&$h(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Pt=r,n.target.dispatchEvent(r),Pt=null,t.shift()}return!0}function ud(e,t,n){cd(e)&&n.delete(t)}function hd(){Jh=!1,null!==Zh&&cd(Zh)&&(Zh=null),null!==ed&&cd(ed)&&(ed=null),null!==td&&cd(td)&&(td=null),nd.forEach(ud),rd.forEach(ud)}function dd(e,t){e.blockedOn===t&&(e.blockedOn=null,Jh||(Jh=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,hd)))}var fd=null;function pd(e){fd!==e&&(fd=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,(function(){fd===e&&(fd=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if("function"!==typeof r){if(null===Yh(r||n))continue;break}var s=Ke(n);null!==s&&(e.splice(t,3),t-=3,uo(s,{pending:!0,data:i,method:n.method,action:r},r,i))}})))}function md(e){function t(t){return dd(t,e)}null!==Zh&&dd(Zh,e),null!==ed&&dd(ed,e),null!==td&&dd(td,e),nd.forEach(t),rd.forEach(t);for(var n=0;n<id.length;n++){var r=id[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<id.length&&null===(n=id[0]).blockedOn;)ld(n),null===n.blockedOn&&id.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var i=n[r],s=n[r+1],o=i[Ue]||null;if("function"===typeof s)o||pd(n);else if(o){var a=null;if(s&&s.hasAttribute("formAction")){if(i=s,o=s[Ue]||null)a=o.formAction;else if(null!==Yh(i))continue}else a=o.action;"function"===typeof a?n[r+1]=a:(n.splice(r,3),r-=3),pd(n)}}}function gd(e){this._internalRoot=e}function vd(e){this._internalRoot=e}vd.prototype.render=gd.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Vh(t.current,Pc(),e,t,null,null)},vd.prototype.unmount=gd.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;0===e.tag&&tu(),Vh(e.current,2,null,e,null,null),Fc(),t[Ve]=null}},vd.prototype.unstable_scheduleHydration=function(e){if(e){var t=Le();e={blockedOn:null,target:e,priority:t};for(var n=0;n<id.length&&0!==t&&t<id[n].priority;n++);id.splice(n,0,e),0===n&&ld(e)}};var yd=i.version;if("19.0.0"!==yd)throw Error(o(527,yd,"19.0.0"));B.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=M(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var s=i.alternate;if(null===s){if(null!==(r=i.return)){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return U(i),e;if(s===r)return U(i),t;s=s.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=s;else{for(var a=!1,l=i.child;l;){if(l===n){a=!0,n=i,r=s;break}if(l===r){a=!0,r=i,n=s;break}l=l.sibling}if(!a){for(l=s.child;l;){if(l===n){a=!0,n=s,r=i;break}if(l===r){a=!0,r=s,n=i;break}l=l.sibling}if(!a)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?V(e):null)?null:e.stateNode};var bd={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:P,findFiberByHostInstance:Ge,reconcilerVersion:"19.0.0"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var wd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wd.isDisabled&&wd.supportsFiber)try{ve=wd.inject(bd),ye=wd}catch(Sd){}}t.createRoot=function(e,t){if(!a(e))throw Error(o(299));var n=!1,r="",i=jo,s=Lo,l=Mo;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onUncaughtError&&(i=t.onUncaughtError),void 0!==t.onCaughtError&&(s=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError),void 0!==t.unstable_transitionCallbacks&&t.unstable_transitionCallbacks),t=Fh(e,1,!1,null,0,n,r,i,s,l,0,null),e[Ve]=t.current,Ru(8===e.nodeType?e.parentNode:e),new gd(t)},t.hydrateRoot=function(e,t,n){if(!a(e))throw Error(o(299));var r=!1,i="",s=jo,l=Lo,c=Mo,u=null;return null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onUncaughtError&&(s=n.onUncaughtError),void 0!==n.onCaughtError&&(l=n.onCaughtError),void 0!==n.onRecoverableError&&(c=n.onRecoverableError),void 0!==n.unstable_transitionCallbacks&&n.unstable_transitionCallbacks,void 0!==n.formState&&(u=n.formState)),(t=Fh(e,1,!0,t,0,r,i,s,l,c,0,u)).context=Uh(null),n=t.current,(i=Na(r=Pc())).callback=null,Ra(n,i,r),t.current.lanes=r,Re(t,r),mu(t),e[Ve]=t.current,Ru(e),new vd(t)},t.version="19.0.0"}
2,6672:(e,t,n)=>{"use strict";var r=n(5043);function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var o={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},a=Symbol.for("react.portal");var l=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){return"font"===e?"":"string"===typeof t?"use-credentials"===t?t:"":void 0}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(i(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:a,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.flushSync=function(e){var t=l.T,n=o.p;try{if(l.T=null,o.p=2,e)return e()}finally{l.T=t,o.p=n,o.d.f()}},t.preconnect=function(e,t){"string"===typeof e&&(t?t="string"===typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,o.d.C(e,t))},t.prefetchDNS=function(e){"string"===typeof e&&o.d.D(e)},t.preinit=function(e,t){if("string"===typeof e&&t&&"string"===typeof t.as){var n=t.as,r=c(n,t.crossOrigin),i="string"===typeof t.integrity?t.integrity:void 0,s="string"===typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?o.d.S(e,"string"===typeof t.precedence?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:s}):"script"===n&&o.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:s,nonce:"string"===typeof t.nonce?t.nonce:void 0})}},t.preinitModule=function(e,t){if("string"===typeof e)if("object"===typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=c(t.as,t.crossOrigin);o.d.M(e,{crossOrigin:n,integrity:"string"===typeof t.integrity?t.integrity:void 0,nonce:"string"===typeof t.nonce?t.nonce:void 0})}}else null==t&&o.d.M(e)},t.preload=function(e,t){if("string"===typeof e&&"object"===typeof t&&null!==t&&"string"===typeof t.as){var n=t.as,r=c(n,t.crossOrigin);o.d.L(e,n,{crossOrigin:r,integrity:"string"===typeof t.integrity?t.integrity:void 0,nonce:"string"===typeof t.nonce?t.nonce:void 0,type:"string"===typeof t.type?t.type:void 0,fetchPriority:"string"===typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"===typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"===typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"===typeof t.imageSizes?t.imageSizes:void 0,media:"string"===typeof t.media?t.media:void 0})}},t.preloadModule=function(e,t){if("string"===typeof e)if(t){var n=c(t.as,t.crossOrigin);o.d.m(e,{as:"string"===typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"===typeof t.integrity?t.integrity:void 0})}else o.d.m(e)},t.requestFormReset=function(e){o.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},t.useFormStatus=function(){return l.H.useHostTransitionStatus()},t.version="19.0.0"},4391:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(7004)},7950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(6672)},6366:e=>{var t="undefined"!==typeof Element,n="function"===typeof Map,r="function"===typeof Set,i="function"===typeof ArrayBuffer&&!!ArrayBuffer.isView;function s(e,o){if(e===o)return!0;if(e&&o&&"object"==typeof e&&"object"==typeof o){if(e.constructor!==o.constructor)return!1;var a,l,c,u;if(Array.isArray(e)){if((a=e.length)!=o.length)return!1;for(l=a;0!==l--;)if(!s(e[l],o[l]))return!1;return!0}if(n&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!o.has(l.value[0]))return!1;for(u=e.entries();!(l=u.next()).done;)if(!s(l.value[1],o.get(l.value[0])))return!1;return!0}
2if(r&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(u=e.entries();!(l=u.next()).done;)if(!o.has(l.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if((a=e.length)!=o.length)return!1;for(l=a;0!==l--;)if(e[l]!==o[l])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"===typeof e.valueOf&&"function"===typeof o.valueOf)return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString&&"function"===typeof e.toString&&"function"===typeof o.toString)return e.toString()===o.toString();if((a=(c=Object.keys(e)).length)!==Object.keys(o).length)return!1;for(l=a;0!==l--;)if(!Object.prototype.hasOwnProperty.call(o,c[l]))return!1;if(t&&e instanceof Element)return!1;for(l=a;0!==l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!e.$$typeof)&&!s(e[c[l]],o[c[l]]))return!1;return!0}return e!==e&&o!==o}e.exports=function(e,t){try{return s(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},9367:(e,t,n)=>{"use strict";n.d(t,{mg:()=>se,vd:()=>W});var r=n(5043),i=n(6366),s=n.n(i),o=n(2740),a=n.n(o),l=n(7324),c=n.n(l),u=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(u||{}),h={rel:["amphtml","canonical","alternate"]},d={type:["application/ld+json"]},f={charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},p=Object.values(u),m={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},g=Object.entries(m).reduce(((e,t)=>{let[n,r]=t;return e[r]=n,e}),{}),v="data-rh",y="defaultTitle",b="defer",w="encodeSpecialCharacters",x="onChangeClientState",S="titleTemplate",E="prioritizeSeoTags",k=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},T=e=>{let t=k(e,"title");const n=k(e,S);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,(()=>t));const r=k(e,y);return t||r||void 0},_=e=>k(e,x)||(()=>{}),C=(e,t)=>t.filter((t=>"undefined"!==typeof t[e])).map((t=>t[e])).reduce(((e,t)=>({...e,...t})),{}),A=(e,t)=>t.filter((e=>"undefined"!==typeof e.base)).map((e=>e.base)).reverse().reduce(((t,n)=>{if(!t.length){const r=Object.keys(n);for(let i=0;i<r.length;i+=1){const s=r[i].toLowerCase();if(-1!==e.indexOf(s)&&n[s])return t.concat(n)}}return t}),[]),I=(e,t,n)=>{const r={};return n.filter((t=>{return!!Array.isArray(t[e])||("undefined"!==typeof t[e]&&(n=`Helmet: ${e} should be of type "Array". Instead found type "${typeof t[e]}"`,console&&"function"===typeof console.warn&&console.warn(n)),!1);var n})).map((t=>t[e])).reverse().reduce(((e,n)=>{const i={};n.filter((e=>{let n;const s=Object.keys(e);for(let r=0;r<s.length;r+=1){const i=s[r],o=i.toLowerCase();-1===t.indexOf(o)||"rel"===n&&"canonical"===e[n].toLowerCase()||"rel"===o&&"stylesheet"===e[o].toLowerCase()||(n=o),-1===t.indexOf(i)||"innerHTML"!==i&&"cssText"!==i&&"itemprop"!==i||(n=i)}if(!n||!e[n])return!1;const o=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][o]&&(i[n][o]=!0,!0)})).reverse().forEach((t=>e.push(t)));const s=Object.keys(i);for(let t=0;t<s.length;t+=1){const e=s[t],n={...r[e],...i[e]};r[e]=n}return e}),[]).reverse()},P=(e,t)=>{if(Array.isArray(e)&&e.length)for(let n=0;n<e.length;n+=1){if(e[n][t])return!0}return!1},N=e=>Array.isArray(e)?e.join(""):e,R=(e,t)=>Array.isArray(e)?e.reduce(((e,n)=>(((e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1})(n,t)?e.priority.push(n):e.default.push(n),e)),{priority:[],default:[]}):{default:e,priority:[]},D=(e,t)=>({...e,[t]:void 0}),O=["noscript","script","style"],j=function(e){return!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},L=e=>Object.keys(e).reduce(((t,n)=>{const r="undefined"!==typeof e[n]?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r}),""),M=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(((t,n)=>(t[m[n]||n]=e[n],t)),t)},F=(e,t)=>t.map(((t,n)=>{const i={key:n,[v]:!0};return Object.keys(t).forEach((e=>{const n=m[e]||e;if("innerHTML"===n||"cssText"===n){const e=t.innerHTML||t.cssText;i.dangerouslySetInnerHTML={__html:e}}else i[n]=t[e]})),r.createElement(e,i)})),U=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];switch(e){case"title":return{toComponent:()=>((e,t,n)=>{const i=M(n,{key:t,[v]:!0});return[r.createElement("title",i,t)]})(0,t.title,t.titleAttributes),toString:()=>((e,t,n,r)=>{const i=L(n),s=N(t);return i?`<${e} ${v}="true" ${i}>${j(s,r)}</${e}>`:`<${e} ${v}="true">${j(s,r)}</${e}>`})(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>M(t),toString:()=>L(t)};default:return{toComponent:()=>F(e,t),toString:()=>function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return t.reduce(((t,r)=>{const i=r,s=Object.keys(i).filter((e=>!("innerHTML"===e||"cssText"===e))).reduce(((e,t)=>{const r="undefined"===typeof i[t]?t:`${t}="${j(i[t],n)}"`;return e?`${e} ${r}`:r}),""),o=i.innerHTML||i.cssText||"",a=-1===O.indexOf(e);return`${t}<${e} ${v}="true" ${s}${a?"/>
2":`>${o}</${e}>`}`}),"")}(e,t,n)}}},V=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:i,noscriptTags:s,styleTags:o,title:a="",titleAttributes:l,prioritizeSeoTags:c}=e;let{linkTags:u,metaTags:p,scriptTags:m}=e,g={toComponent:()=>[],toString:()=>""};return c&&({priorityMethods:g,linkTags:u,metaTags:p,scriptTags:m}=(e=>{let{metaTags:t,linkTags:n,scriptTags:r,encode:i}=e;const s=R(t,f),o=R(n,h),a=R(r,d);return{priorityMethods:{toComponent:()=>[...F("meta",s.priority),...F("link",o.priority),...F("script",a.priority)],toString:()=>`${U("meta",s.priority,i)} ${U("link",o.priority,i)} ${U("script",a.priority,i)}`},metaTags:s.default,linkTags:o.default,scriptTags:a.default}})(e)),{priority:g,base:U("base",t,r),bodyAttributes:U("bodyAttributes",n,r),htmlAttributes:U("htmlAttributes",i,r),link:U("link",u,r),meta:U("meta",p,r),noscript:U("noscript",s,r),script:U("script",m,r),style:U("style",o,r),title:U("title",{title:a,titleAttributes:l},r)}},z=[],B=!("undefined"===typeof window||!window.document||!window.document.createElement),$=class{instances=[];canUseDOM=(()=>B)();context;value={setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?z:this.instances,add:e=>{(this.canUseDOM?z:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?z:this.instances).indexOf(e);(this.canUseDOM?z:this.instances).splice(t,1)}}};constructor(e,t){this.context=e,this.canUseDOM=t||!1,t||(e.helmet=V({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},q=parseInt(r.version.split(".")[0],10)>=19,H=r.createContext({}),W=class e extends r.Component{static canUseDOM=(()=>B)();helmetData;constructor(t){super(t),this.helmetData=q?null:new $(this.props.context||{},e.canUseDOM)}render(){return q?r.createElement(r.Fragment,null,this.props.children):r.createElement(H.Provider,{value:this.helmetData.value},this.props.children)}},G=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${v}]`),i=[].slice.call(r),s=[];let o;return t&&t.length&&t.forEach((t=>{const n=document.createElement(e);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))if("innerHTML"===e)n.innerHTML=t.innerHTML;else if("cssText"===e){const e=t.cssText;n.appendChild(document.createTextNode(e))}else{const r=e,i="undefined"===typeof t[r]?"":t[r];n.setAttribute(e,i)}n.setAttribute(v,"true"),i.some(((e,t)=>(o=t,n.isEqualNode(e))))?i.splice(o,1):s.push(n)})),i.forEach((e=>e.parentNode?.removeChild(e))),s.forEach((e=>n.appendChild(e))),{oldTags:i,newTags:s}},K=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(v),i=r?r.split(","):[],s=[...i],o=Object.keys(t);for(const a of o){const e=t[a]||"";n.getAttribute(a)!==e&&n.setAttribute(a,e),-1===i.indexOf(a)&&i.push(a);const r=s.indexOf(a);-1!==r&&s.splice(r,1)}for(let a=s.length-1;a>=0;a-=1)n.removeAttribute(s[a]);i.length===s.length?n.removeAttribute(v):n.getAttribute(v)!==o.join(",")&&n.setAttribute(v,o.join(","))},Q=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:i,linkTags:s,metaTags:o,noscriptTags:a,onChangeClientState:l,scriptTags:c,styleTags:u,title:h,titleAttributes:d}=e;K("body",r),K("html",i),((e,t)=>{"undefined"!==typeof e&&document.title!==e&&(document.title=N(e)),K("title",t)})(h,d);const f={baseTag:G("base",n),linkTags:G("link",s),metaTags:G("meta",o),noscriptTags:G("noscript",a),scriptTags:G("script",c),styleTags:G("style",u)},p={},m={};Object.keys(f).forEach((e=>{const{newTags:t,oldTags:n}=f[e];t.length&&(p[e]=t),n.length&&(m[e]=f[e].oldTags)})),t&&t(),l(e,p,m)},Y=null,X=e=>{Y&&cancelAnimationFrame(Y),e.defer?Y=requestAnimationFrame((()=>{Q(e,(()=>{Y=null}))})):(Q(e),Y=null)},J=class extends r.Component{rendered=!1;shouldComponentUpdate(e){return!c()(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){const{helmetInstances:e,setHelmet:t}=this.props.context;let n=null;const r=(i=e.get().map((e=>{const{context:t,...n}=e.props;return n})),{baseTag:A(["href"],i),bodyAttributes:C("bodyAttributes",i),defer:k(i,b),encode:k(i,w),htmlAttributes:C("htmlAttributes",i),linkTags:I("link",["rel","href"],i),metaTags:I("meta",["name","charset","http-equiv","property","itemprop"],i),noscriptTags:I("noscript",["innerHTML"],i),onChangeClientState:_(i),scriptTags:I("script",["src","innerHTML"],i),styleTags:I("style",["cssText"],i),title:T(i),titleAttributes:C("titleAttributes",i),prioritizeSeoTags:P(i,E)});var i;W.canUseDOM?X(r):V&&(n=V(r)),t(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},Z=[],ee=e=>{const t={};for(const n of Object.keys(e))t[g[n]||n]=e[n];return t},te=e=>{const t={};for(const n of Object.keys(e)){t[m[n]||n]=e[n]}return t},ne=(e,t)=>{if(!B)return;const n=document.getElementsByTagName(e)[0];if(!n)return;const r="data-rh-managed",i=n.getAttribute(r),s=i?i.split(","):[],o=Object.keys(t);for(const a of s)o.includes(a)||n.removeAttribute(a);for(const a of o){const e=t[a];void 0===e||null===e||!1===e?n.removeAttribute(a):!0===e?n.setAttribute(a,""):n.setAttribute(a,String(e))}o.length>0?n.setAttribute(r,o.join(",")):n.removeAttribute(r)},re=()=>{const e={},t={};for(const n of Z){const{htmlAttributes:r,bodyAttributes:i}=n.props;r&&Object.assign(e,ee(r)),i&&Object.assign(t,ee(i))}ne("html",e),ne("body",t)},ie=class extends r.Component{componentDidMount(){Z.push(this),re()}componentDidUpdate(){re()}componentWillUnmount(){const e=Z.indexOf(this);-1!==e&&Z.splice(e,1),re()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,(()=>Array.isArray(e)?e.join(""):e)):e||n||void 0}renderTitle(){const e=this.resolveTitle();if(void 0===e)return null;const t=this.props.titleAttributes||{};return r.createElement("title",te(t),e)}renderBase(){const{base:e}=this.props;return e?r.createElement("base",te(e)):null}renderMeta(){const{meta:e}=this.props;return e&&Array.isArray(e)?e.map(((e,t)=>r.createElement("meta",{key:t,...te(e)}))):null}renderLink(){const{link:e}=this.props;return e&&Array.isArray(e)?e.map(((e,t)=>r.createElement("link",{key:t,...te(e)}))):null}renderScript(){const{script:e}=this.props;return e&&Array.isArray(e)?e.map(((e,t)=>{const{innerHTML:n,...i}=e,s=te(i);return n&&(s.dangerouslySetInnerHTML={__html:n}),r.createElement("script",{key:t,...s})})):null}renderStyle(){const{style:e}=this.props;return e&&Array.isArray(e)?e.map(((e,t)=>{const{cssText:n,...i}=e,s=te(i);return n&&(s.dangerouslySetInnerHTML={__html:n}),r.createElement("style",{key:t,...s})})):null}renderNoscript(){const{noscript:e}=this.props;return e&&Array.isArray(e)?e.map(((e,t)=>{const{innerHTML:n,...i}=e,s=te(i);return n&&(s.dangerouslySetInnerHTML={__html:n}),r.createElement("noscript",{key:t,...s})})):null}render(){return r.createElement(r.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},se=class extends r.Component{static defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1};shouldComponentUpdate(e){return!s()(D(this.props,"helmetData"),D(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach((t=>{n={...n,[t]:e[t]}})),n}
2warnOnInvalidChildren(e,t){return a()(p.some((t=>e.type===t)),"function"===typeof e.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${p.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),a()(!t||"string"===typeof t||Array.isArray(t)&&!t.some((e=>"string"!==typeof e)),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return r.Children.forEach(e,(e=>{if(!e||!e.props)return;const{children:r,...i}=e.props,s=Object.keys(i).reduce(((e,t)=>(e[g[t]||t]=i[t],e)),{});let{type:o}=e;switch("symbol"===typeof o?o=o.toString():this.warnOnInvalidChildren(e,r),o){case"Symbol(react.fragment)":t=this.mapChildrenToProps(r,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(e,n,s,r);break;default:t=this.mapObjectTypeChildren(e,t,s,r)}})),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:i}=t;if(e&&(n=this.mapChildrenToProps(e,n)),i&&!(i instanceof $)){i=new $(i.context,!0),delete n.helmetData}return q?r.createElement(ie,{...n}):i?r.createElement(J,{...n,context:i.value}):r.createElement(H.Consumer,null,(e=>r.createElement(J,{...n,context:e})))}}},4358:(e,t)=>{"use strict";const n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,r=/^[\u0021-\u003A\u003C-\u007E]*$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,s=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,a=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function l(e,t,n){do{const n=e.charCodeAt(t);if(32!==n&&9!==n)return t}while(++t<n);return n}function c(e,t,n){for(;t>n;){const n=e.charCodeAt(--t);if(32!==n&&9!==n)return t+1}return n}function u(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}},2799:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(e,t,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),"key"in t)for(var s in r={},t)"key"!==s&&(r[s]=t[s]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:i,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=i,t.jsxs=i},4288:(e,t)=>
2{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var w=b.prototype=new y;w.constructor=b,m(w,v.prototype),w.isPureReactComponent=!0;var x=Array.isArray,S={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function k(e,t,r,i,s,o){return r=o.ref,{$$typeof:n,type:e,key:t,ref:void 0!==r?r:null,props:o}}function T(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var _=/\/+/g;function C(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function A(){}function I(e,t,i,s,o){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l,c,u=!1;if(null===e)u=!0;else switch(a){case"bigint":case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case n:case r:u=!0;break;case d:return I((u=e._init)(e._payload),t,i,s,o)}}if(u)return o=o(e),u=""===s?"."+C(e,0):s,x(o)?(i="",null!=u&&(i=u.replace(_,"$&/")+"/"),I(o,t,i,"",(function(e){return e}))):null!=o&&(T(o)&&(l=o,c=i+(null==o.key||e&&e.key===o.key?"":(""+o.key).replace(_,"$&/")+"/")+u,o=k(l.type,c,void 0,0,0,l.props)),t.push(o)),1;u=0;var h,p=""===s?".":s+":";if(x(e))for(var m=0;m<e.length;m++)u+=I(s=e[m],t,i,a=p+C(s,m),o);else if("function"===typeof(m=null===(h=e)||"object"!==typeof h?null:"function"===typeof(h=f&&h[f]||h["@@iterator"])?h:null))for(e=m.call(e),m=0;!(s=e.next()).done;)u+=I(s=s.value,t,i,a=p+C(s,m++),o);else if("object"===a){if("function"===typeof e.then)return I(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"===typeof e.status?e.then(A,A):(e.status="pending",e.then((function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)}),(function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)}))),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,i,s,o);throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return u}function P(e,t,n){if(null==e)return e;var r=[],i=0;return I(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function N(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R="function"===typeof reportError?reportError:function(e){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof e&&null!==e&&"string"===typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"===typeof process&&"function"===typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function D(){}t.Children={map:P,forEach:function(e,t,n){P(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return P(e,(function(){t++})),t},toArray:function(e){return P(e,(function(e){return e}))||[]},only:function(e){if(!T(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=i,t.Profiler=o,t.PureComponent=b,t.StrictMode=s,t.Suspense=u,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,t.act=function(){throw Error("act(...) is not supported in production builds of React.")},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error("The argument must be a React element, but you passed "+e+".");var r=m({},e.props),i=e.key;if(null!=t)for(s in void 0!==t.ref&&void 0,void 0!==t.key&&(i=""+t.key),t)!E.
vendor: 5,952 bytes, line 2
2call(t,s)||"key"===s||"__self"===s||"__source"===s||"ref"===s&&void 0===t.ref||(r[s]=t[s]);var s=arguments.length-2;if(1===s)r.children=n;else if(1<s){for(var o=Array(s),a=0;a<s;a++)o[a]=arguments[a+2];r.children=o}return k(e.type,i,void 0,0,0,r)},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:a,_context:e},e},t.createElement=function(e,t,n){var r,i={},s=null;if(null!=t)for(r in void 0!==t.key&&(s=""+t.key),t)E.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(i[r]=t[r]);var o=arguments.length-2;if(1===o)i.children=n;else if(1<o){for(var a=Array(o),l=0;l<o;l++)a[l]=arguments[l+2];i.children=a}if(e&&e.defaultProps)for(r in o=e.defaultProps)void 0===i[r]&&(i[r]=o[r]);return k(e,s,void 0,0,0,i)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=T,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:N}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=S.T,n={};S.T=n;try{var r=e(),i=S.S;null!==i&&i(n,r),"object"===typeof r&&null!==r&&"function"===typeof r.then&&r.then(D,R)}catch(s){R(s)}finally{S.T=t}},t.unstable_useCacheRefresh=function(){return S.H.useCacheRefresh()},t.use=function(e){return S.H.use(e)},t.useActionState=function(e,t,n){return S.H.useActionState(e,t,n)},t.useCallback=function(e,t){return S.H.useCallback(e,t)},t.useContext=function(e){return S.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return S.H.useDeferredValue(e,t)},t.useEffect=function(e,t){return S.H.useEffect(e,t)},t.useId=function(){return S.H.useId()},t.useImperativeHandle=function(e,t,n){return S.H.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return S.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return S.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return S.H.useMemo(e,t)},t.useOptimistic=function(e,t){return S.H.useOptimistic(e,t)},t.useReducer=function(e,t,n){return S.H.useReducer(e,t,n)},t.useRef=function(e){return S.H.useRef(e)},t.useState=function(e){return S.H.useState(e)},t.useSyncExternalStore=function(e,t,n){return S.H.useSyncExternalStore(e,t,n)},t.useTransition=function(){return S.H.useTransition()},t.version="19.0.0"},5043:(e,t,n)=>{"use strict";e.exports=n(4288)},579:(e,t,n)=>{"use strict";e.exports=n(2799)},5896:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<s(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var a=2*(r+1)-1,l=e[a],c=a+1,u=e[c];if(0>s(l,n))c<i&&0>s(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[a]=n,r=a);else{if(!(c<i&&0>s(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function s(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"===typeof performance&&"function"===typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],u=[],h=1,d=null,f=3,p=!1,m=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function x(e){if(g=!1,w(e),!m)if(null!==r(c))m=!0,N();else{var t=r(u);null!==t&&R(x,t.startTime-e)}}var S,E=!1,k=-1,T=5,_=-1;function C(){return!(t.unstable_now()-_<T)}function A(){if(E){var e=t.unstable_now();_=e;var n=!0;try{e:{m=!1,g&&(g=!1,y(k),k=-1),p=!0;var s=f;try{t:{for(w(e),d=r(c);null!==d&&!(d.expirationTime>e&&C());){var o=d.callback;if("function"===typeof o){d.callback=null,f=d.priorityLevel;var a=o(d.expirationTime<=e);if(e=t.unstable_now(),"function"===typeof a){d.callback=a,w(e),n=!0;break t}d===r(c)&&i(c),w(e)}else i(c);d=r(c)}if(null!==d)n=!0;else{var l=r(u);null!==l&&R(x,l.startTime-e),n=!1}}break e}finally{d=null,f=s,p=!1}n=void 0}}finally{n?S():E=!1}}}if("function"===typeof b)S=function(){b(A)};else if("undefined"!==typeof MessageChannel){var I=new MessageChannel,P=I.port2;I.port1.onmessage=A,S=function(){P.postMessage(null)}}else S=function(){v(A,0)};function N(){E||(E=!0,S())}function R(e,n){k=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,N())},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,i,s){var o=t.unstable_now();switch("object"===typeof s&&null!==s?s="number"===typeof(s=s.delay)&&0<s?o+s:o:s=o,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return e={id:h++,callback:i,priorityLevel:e,startTime:s,expirationTime:a=s+a,sortIndex:-1},s>o?(e.sortIndex=s,n(u,e),null===r(c)&&e===r(u)&&(g?(y(k),k=-1):g=!0,R(x,s-o))):(e.sortIndex=a,n(c,e),m||p||(m=!0,N())
2),e},t.unstable_shouldYield=C,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},8853:(e,t,n)=>{"use strict";e.exports=n(5896)},7324:e=>{e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var s=Object.keys(e),o=Object.keys(t);if(s.length!==o.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(t),l=0;l<s.length;l++){var c=s[l];if(!a(c))return!1;var u=e[c],h=t[c];if(!1===(i=n?n.call(r,u,h,c):void 0)||void 0===i&&u!==h)return!1}return!0}},7150:(e,t,n)=>{"use strict";n.d(t,{MF:()=>ue,j6:()=>se,xZ:()=>oe,om:()=>ie,Sx:()=>de,Dk:()=>fe,Wp:()=>he,KO:()=>pe});var r=n(8812),i=n(443),s=n(1529);let o,a;const l=new WeakMap,c=new WeakMap,u=new WeakMap,h=new WeakMap,d=new WeakMap;let f={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return c.get(e);if("objectStoreNames"===t)return e.objectStoreNames||u.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return g(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function p(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(a||(a=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(v(this),n),g(l.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return g(e.apply(v(this),n))}:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];const s=e.call(v(this),t,...r);return u.set(s,t.sort?t.sort():[t]),g(s)}}function m(e){return"function"===typeof e?p(e):(e instanceof IDBTransaction&&function(e){if(c.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",s),e.removeEventListener("abort",s)},i=()=>{t(),r()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",s),e.addEventListener("abort",s)}));c.set(e,t)}(e),t=e,(o||(o=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,f):e);var t}function g(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",s)},i=()=>{t(g(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",s)}));return t.then((t=>{t instanceof IDBCursor&&l.set(t,e)})).catch((()=>{})),d.set(t,e),t}(e);if(h.has(e))return h.get(e);const t=m(e);return t!==e&&(h.set(e,t),d.set(t,e)),t}const v=e=>d.get(e);const y=["get","getKey","getAll","getAllKeys","count"],b=["put","add","delete","clear"],w=new Map;function x(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(w.get(t))return w.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=b.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!y.includes(n))return;const s=async function(e){const t=this.transaction(e,i?"readwrite":"readonly");let s=t.store;for(var o=arguments.length,a=new Array(o>1?o-1:0),l=1;l<o;l++)a[l-1]=arguments[l];return r&&(s=s.index(a.shift())),(await Promise.all([s[n](...a),i&&t.done]))[0]};return w.set(t,s),s}f=(e=>({...e,get:(t,n,r)=>x(t,n)||e.get(t,n,r),has:(t,n)=>!!x(t,n)||e.has(t,n)}))(f);class S{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null===t||void 0===t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const E="@firebase/app",k="0.12.1",T=new i.Vy("@firebase/app"),_="@firebase/app-compat",C="@firebase/analytics-compat",A="@firebase/analytics",I="@firebase/app-check-compat",P="@firebase/app-check",N="@firebase/auth",R="@firebase/auth-compat",D="@firebase/database",O="@firebase/data-connect",j="@firebase/database-compat",L="@firebase/functions",M="@firebase/functions-compat",F="@firebase/installations",U="@firebase/installations-compat",V="@firebase/messaging",z="@firebase/messaging-compat",B="@firebase/performance",$="@firebase/performance-compat",q="@firebase/remote-config",H="@firebase/remote-config-compat",W="@firebase/storage",G="@firebase/storage-compat",K="@firebase/firestore",Q="@firebase/vertexai",Y="@firebase/firestore-compat",X="firebase",J="[DEFAULT]",Z={[E]:"fire-core",[_]:"fire-core-compat",[A]:"fire-analytics",[C]:"fire-analytics-compat",[P]:"fire-app-check",[I]:"fire-app-check-compat",[N]:"fire-auth",[R]:"fire-auth-compat",[D]:"fire-rtdb",[O]:"fire-data-connect",[j]:"fire-rtdb-compat",[L]:"fire-fn",[M]:"fire-fn-compat",[F]:"fire-iid",[U]:"fire-iid-compat",[V]:"fire-fcm",[z]:"fire-fcm-compat",[B]:"fire-perf",[$]:"fire-perf-compat",[q]:"fire-rc",[H]:"fire-rc-compat",[W]:"fire-g
2cs",[G]:"fire-gcs-compat",[K]:"fire-fst",[Y]:"fire-fst-compat",[Q]:"fire-vertex","fire-js":"fire-js",[X]:"fire-js-all"},ee=new Map,te=new Map,ne=new Map;function re(e,t){try{e.container.addComponent(t)}catch(n){T.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function ie(e){const t=e.name;if(ne.has(t))return T.debug(`There were multiple attempts to register component ${t}.`),!1;ne.set(t,e);for(const n of ee.values())re(n,e);for(const n of te.values())re(n,e);return!0}function se(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function oe(e){return null!==e&&void 0!==e&&void 0!==e.settings}const ae={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
2d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},le=new s.FA("app","Firebase",ae);class ce{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new r.uA("app",(()=>this),"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw le.create("app-deleted",{appName:this._name})}}const ue="11.7.1";function he(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;if("object"!==typeof t){t={name:t}}const i=Object.assign({name:J,automaticDataCollectionEnabled:!1},t),o=i.name;if("string"!==typeof o||!o)throw le.create("bad-app-name",{appName:String(o)});if(n||(n=(0,s.T9)()),!n)throw le.create("no-options");const a=ee.get(o);if(a){if((0,s.bD)(n,a.options)&&(0,s.bD)(i,a.config))return a;throw le.create("duplicate-app",{appName:o})}const l=new r.h1(o);for(const r of ne.values())l.addComponent(r);const c=new ce(n,i,l);return ee.set(o,c),c}function de(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J;const t=ee.get(e);if(!t&&e===J&&(0,s.T9)())return he();if(!t)throw le.create("no-app",{appName:e});return t}function fe(){return Array.from(ee.values())}function pe(e,t,n){var i;let s=null!==(i=Z[e])&&void 0!==i?i:e;n&&(s+=`-${n}`);const o=s.match(/\s|\//),a=t.match(/\s|\//);if(o||a){const e=[`Unable to register library "${s}" with version "${t}":`];return o&&e.push(`library name "${s}" contains illegal characters (whitespace or "/")`),o&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void T.warn(e.join(" "))}ie(new r.uA(`${s}-version`,(()=>({library:s,version:t})),"VERSION"))}const me="firebase-heartbeat-store";let ge=null;function ve(){return ge||(ge=function(e,t){let{blocked:n,upgrade:r,blocking:i,terminated:s}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=indexedDB.open(e,t),a=g(o);return r&&o.addEventListener("upgradeneeded",(e=>{r(g(o.result),e.oldVersion,e.newVersion,g(o.transaction),e)})),n&&o.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{s&&e.addEventListener("close",(()=>s())),i&&e.addEventListener("versionchange",(e=>i(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a}("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(me)}catch(n){console.warn(n)}}}).catch((e=>{throw le.create("idb-open",{originalErrorMessage:e.message})}))),ge}async function ye(e,t){try{const n=(await ve()).transaction(me,"readwrite"),r=n.objectStore(me);await r.put(t,be(e)),await n.done}catch(n){if(n instanceof s.g)T.warn(n.message);else{const e=le.create("idb-set",{originalErrorMessage:null===n||void 0===n?void 0:n.message});T.warn(e.message)}}}function be(e){return`${e.name}!${e.options.appId}`}class we{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new Se(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){var e,t;try{const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=xe();if(null==(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)&&(this._heartbeatsCache=await this._heartbeatsCachePromise,null==(null===(t=this._heartbeatsCache)||void 0===t?void 0:t.heartbeats)))return;if(this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some((e=>e.date===r)))return;if(this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats.length>30){const e=function(e){if(0===e.length)return-1;let t=0,n=e[0].date;for(let r=1;r<e.length;r++)e[r].date<n&&(n=e[r].date,t=r);return t}(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(e,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(n){T.warn(n)}}async getHeartbeatsHeader(){var e;try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null==(null===(e=this._heartbeatsCache)||void 0===e?void 0:e.heartbeats)||0===this._heartbeatsCache.heartbeats.length)return"";const t=xe(),{heartbeatsToSend:n,unsentEntries:r}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1024;const n=[];let r=e.slice();for(const i of e){const e=n.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),Ee(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),Ee(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),i=(0,s.Uj)(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(t){return T.warn(t),""}}}function xe(){return(new Date).toISOString().substring(0,10)}class Se{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!(0,s.zW)()&&(0,s.eX)().then((()=>!0)).catch((()=>!1))}async read(){if(await this._canUseIndexedDBPromise){const e=await async function(e){try{const t=(await ve()).transaction(me),n=await t.objectStore(me).get(be(e));return await t.done,n}catch(t){if(t instanceof s.g)T.warn(t.message);else{const e=le.create("idb-get",{originalErrorMessage:null===t||void 0===t?void 0:t.message});T.warn(e.message)}}}(this.app);return(null===e||void 0===e?void 0:e.heartbeats)?e:{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return ye(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return ye(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function Ee(e){return(0,s.Uj)(JSON.stringify({version:2,heartbeats:e})).length}var ke;ke="",ie(new r.uA("platform-logger",(e=>new S(e)),"PRIVATE")),ie(new r.uA("heartbeat",(e=>new we(e)),"PRIVATE")),pe(E,k,ke),pe(E,k,"esm2017"),pe("fire-js","")}
2,8812:(e,t,n)=>{"use strict";n.d(t,{Kq:()=>o,h1:()=>a,uA:()=>i});var r=n(1529);class i{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}const s="[DEFAULT]";class o{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new r.cY;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(n){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(null===e||void 0===e?void 0:e.identifier),r=null!==(t=null===e||void 0===e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(i){if(r)return null;throw i}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:s})}catch(t){}for(const[e,n]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:r});n.resolve(e)}catch(t){}}}}clearInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter((e=>"INTERNAL"in e)).map((e=>e.INTERNAL.delete())),...e.filter((e=>"_delete"in e)).map((e=>e._delete()))])}isComponentSet(){return null!=this.component}isInitialized(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;return this.instances.has(e)}getOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;return this.instancesOptions.get(e)||{}}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[i,s]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(i)&&s.resolve(r)}return r}onInit(e,t){var n;const r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);const s=this.instances.get(r);return s&&e(s,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const i of n)try{i(e,t)}catch(r){}}getOrInitializeService(e){let{instanceIdentifier:t,options:n={}}=e,r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:(i=t,i===s?void 0:i),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch(o){}var i;return r||null}normalizeInstanceIdentifier(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;return this.component?this.component.multipleInstances?e:s:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class a{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new o(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}}
2,443:(e,t,n)=>{"use strict";n.d(t,{$b:()=>i,Vy:()=>c});const r=[];var i;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(i||(i={}));const s={debug:i.DEBUG,verbose:i.VERBOSE,info:i.INFO,warn:i.WARN,error:i.ERROR,silent:i.SILENT},o=i.INFO,a={[i.DEBUG]:"log",[i.VERBOSE]:"log",[i.INFO]:"info",[i.WARN]:"warn",[i.ERROR]:"error"},l=function(e,t){if(t<e.logLevel)return;const n=(new Date).toISOString(),r=a[t];if(!r)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);for(var i=arguments.length,s=new Array(i>2?i-2:0),o=2;o<i;o++)s[o-2]=arguments[o];console[r](`[${n}] ${e.name}:`,...s)};class c{constructor(e){this.name=e,this._logLevel=o,this._logHandler=l,this._userLogHandler=null,r.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in i))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"===typeof e?s[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!==typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler(this,i.DEBUG,...t),this._logHandler(this,i.DEBUG,...t)}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler(this,i.VERBOSE,...t),this._logHandler(this,i.VERBOSE,...t)}info(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler(this,i.INFO,...t),this._logHandler(this,i.INFO,...t)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler(this,i.WARN,...t),this._logHandler(this,i.WARN,...t)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._userLogHandler&&this._userLogHandler(this,i.ERROR,...t),this._logHandler(this,i.ERROR,...t)}}},2779:(e,t,n)=>{"use strict";n.d(t,{GoogleAuthProvider:()=>Qe,xI:()=>Dn,hg:()=>ct,zK:()=>tt,signInWithCredential:()=>at,p:()=>lt,signOut:()=>ut});var r=n(7150),i=n(1529),s=n(443);function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}Object.create;Object.create;"function"===typeof SuppressedError&&SuppressedError;var a=n(8812);function l(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const c=l,u=new i.FA("auth","Firebase",{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}),h=new s.Vy("@firebase/auth");function d(e){if(h.logLevel<=s.$b.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];h.error(`Auth (${r.MF}): ${e}`,...n)}}function f(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw v(e,...n)}function p(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return v(e,...n)}function m(e,t,n){const r=Object.assign(Object.assign({},c()),{[t]:n});return new i.FA("auth","Firebase",r).create(t,{appName:e.name})}function g(e){return m(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function v(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("string"!==typeof e){const t=n[0],r=[...n.slice(1)];
2return r[0]&&(r[0].appName=e.name),e._errorFactory.create(t,...r)}return u.create(e,...n)}function y(e,t){if(!e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];throw v(t,...r)}}function b(e){const t="INTERNAL ASSERTION FAILED: "+e;throw d(t),new Error(t)}function w(e,t){e||b(t)}function x(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function S(){return"http:"===E()||"https:"===E()}function E(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}class k{constructor(e,t){this.shortDelay=e,this.longDelay=t,w(t>e,"Short delay should be less than long delay!"),this.isMobile=(0,i.jZ)()||(0,i.lV)()}get(){return"undefined"!==typeof navigator&&navigator&&"onLine"in navigator&&"boolean"===typeof navigator.onLine&&(S()||(0,i.sr)()||"connection"in navigator)&&!navigator.onLine?Math.min(5e3,this.shortDelay):this.isMobile?this.longDelay:this.shortDelay}}function T(e,t){w(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}class _{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!==typeof self&&"fetch"in self?self.fetch:"undefined"!==typeof globalThis&&globalThis.fetch?globalThis.fetch:"undefined"!==typeof fetch?fetch:void b("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!==typeof self&&"Headers"in self?self.Headers:"undefined"!==typeof globalThis&&globalThis.Headers?globalThis.Headers:"undefined"!==typeof Headers?Headers:void b("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!==typeof self&&"Response"in self?self.Response:"undefined"!==typeof globalThis&&globalThis.Response?globalThis.Response:"undefined"!==typeof Response?Response:void b("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const C={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-rec
2aptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},A=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],I=new k(3e4,6e4);function P(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function N(e,t,n,r){return R(e,arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},(async()=>{let s={},o={};r&&("GET"===t?o=r:s={body:JSON.stringify(r)});const a=(0,i.Am)(Object.assign({key:e.config.apiKey},o)).slice(1),l=await e._getAdditionalHeaders();l["Content-Type"]="application/json",e.languageCode&&(l["X-Firebase-Locale"]=e.languageCode);const c=Object.assign({method:t,headers:l},s);return(0,i.c1)()||(c.referrerPolicy="no-referrer"),e.emulatorConfig&&(0,i.zJ)(e.emulatorConfig.host)&&(c.credentials="include"),_.fetch()(await O(e,e.config.apiHost,n,a),c)}))}async function R(e,t,n){e._canInitEmulator=!1;const r=Object.assign(Object.assign({},C),t);try{const t=new L(e),i=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();const s=await i.json();if("needConfirmation"in s)throw M(e,"account-exists-with-different-credential",s);if(i.ok&&!("errorMessage"in s))return s;{const t=i.ok?s.errorMessage:s.error.message,[n,o]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===n)throw M(e,"credential-already-in-use",s);if("EMAIL_EXISTS"===n)throw M(e,"email-already-in-use",s);if("USER_DISABLED"===n)throw M(e,"user-disabled",s);const a=r[n]||n.toLowerCase().replace(/[_\s]+/g,"-");if(o)throw m(e,a,o);f(e,a)}}catch(s){if(s instanceof i.g)throw s;f(e,"network-request-failed",{message:String(s)})}}async function D(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const s=await N(e,t,n,r,i);return"mfaPendingCredential"in s&&f(e,"multi-factor-auth-required",{_serverResponse:s}),s}async function O(e,t,n,r){const i=`${t}${n}?${r}`,s=e,o=s.config.emulator?T(e.config,i):`${e.config.apiScheme}://${i}`;if(A.includes(n)&&(await s._persistenceManagerAvailable,"COOKIE"===s._getPersistenceType())){return s._getPersistence()._getFinalTarget(o).toString()}return o}function j(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class L{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise(((e,t)=>{this.timer=setTimeout((()=>t(p(this.auth,"network-request-failed"))),I.get())}))}}function M(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=p(e,t,r);return i.customData._tokenResponse=n,i}function F(e){return void 0!==e&&void 0!==e.enterprise}class U{constructor(e){if(this.siteKey="",this.recaptchaEnforcementState=[],void 0===e.recaptchaKey)throw new Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=e.recaptchaEnforcementState}getProviderEnforcementState(e){if(!this.recaptchaEnforcementState||0===this.recaptchaEnforcementState.length)return null;for(const t of this.recaptchaEnforcementState)if(t.provider&&t.provider===e)return j(t.enforcementState);return null}isProviderEnabled(e){return"ENFORCE"===this.getProviderEnforcementState(e)||"AUDIT"===this.getProviderEnforcementState(e)}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}}async function V(e,t){return N(e,"GET","/v2/recaptchaConfig",P(e,t))}async function z(e,t){return N(e,"POST","/v1/accounts:lookup",t)}function B(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(t){}}function $(e){return 1e3*Number(e)}function q(e){const[t,n,r]=e.split(".");if(void 0===t||void 0===n||void 0===r)return d("JWT malformed, contained fewer than 3 sections"),null;try{const e=(0,i.u)(n);return e?JSON.parse(e):(d("Failed to decode base64 JWT payload"),null)}catch(s){return d("Caught error parsing JWT payload as JSON",null===s||void 0===s?void 0:s.toString()),null}}function H(e){const t=q(e);return y(t,"internal-error"),y("undefined"!==typeof t.exp,"internal-error"),y("undefined"!==typeof t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}async function W(e,t){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])return t;try{return await t}
2catch(n){throw n instanceof i.g&&function(e){let{code:t}=e;return"auth/user-disabled"===t||"auth/user-token-expired"===t}(n)&&e.auth.currentUser===e&&await e.auth.signOut(),n}}class G{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){const e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}{this.errorBackoff=3e4;const e=(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5;return Math.max(0,e)}}schedule(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout((async()=>{await this.iteration()}),t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){return void("auth/network-request-failed"===(null===e||void 0===e?void 0:e.code)&&this.schedule(!0))}this.schedule()}}class K{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=B(this.lastLoginAt),this.creationTime=B(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function Q(e){var t;const n=e.auth,r=await e.getIdToken(),i=await W(e,z(n,{idToken:r}));y(null===i||void 0===i?void 0:i.users.length,n,"internal-error");const s=i.users[0];e._notifyReloadListener(s);const o=(null===(t=s.providerUserInfo)||void 0===t?void 0:t.length)?Y(s.providerUserInfo):[],a=(l=e.providerData,c=o,[...l.filter((e=>!c.some((t=>t.providerId===e.providerId)))),...c]);var l,c;const u=e.isAnonymous,h=!(e.email&&s.passwordHash)&&!(null===a||void 0===a?void 0:a.length),d=!!u&&h,f={uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:a,metadata:new K(s.createdAt,s.lastLoginAt),isAnonymous:d};Object.assign(e,f)}function Y(e){return e.map((e=>{var{providerId:t}=e,n=o(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}}))}class X{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){y(e.idToken,"internal-error"),y("undefined"!==typeof e.idToken,"internal-error"),y("undefined"!==typeof e.refreshToken,"internal-error");const t="expiresIn"in e&&"undefined"!==typeof e.expiresIn?Number(e.expiresIn):H(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){y(0!==e.length,"internal-error");const t=H(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||!this.accessToken||this.isExpired?(y(this.refreshToken,e,"user-token-expired"),this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null):this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){const{accessToken:n,refreshToken:r,expiresIn:s}=await async function(e,t){const n=await R(e,{},(async()=>{const n=(0,i.Am)({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:s}=e.config,o=await O(e,r,"/v1/token",`key=${s}`),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",_.fetch()(o,{method:"POST",headers:a,body:n})}));return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}(e,t);this.updateTokensAndExpiration(n,r,Number(s))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){const{refreshToken:n,accessToken:r,expirationTime:i}=t,s=new X;return n&&(y("string"===typeof n,"internal-error",{appName:e}),s.refreshToken=n),r&&(y("string"===typeof r,"internal-error",{appName:e}),s.accessToken=r),i&&(y("number"===typeof i,"internal-error",{appName:e}),s.expirationTime=i),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new X,this.toJSON())}_performRefresh(){return b("not implemented")}}function J(e,t){y("string"===typeof e||"undefined"===typeof e,"internal-error",{appName:t})}class Z{constructor(e){var{uid:t,auth:n,stsTokenManager:r}=e,i=o(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new G(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new K(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const t=await W(this,this.stsTokenManager.getToken(this.auth,e));return y(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=(0,i.Ku)(e),r=await n.getIdToken(t),s=q(r);y(s&&s.exp&&s.auth_time&&s.iat,n.auth,"internal-error");const o="object"===typeof s.firebase?s.firebase:void 0,a=null===o||void 0===o?void 0:o.sign_in_provider;return{claims:s,token:r,authTime:B($(s.auth_time)),issuedAtTime:B($(s.iat)),expirationTime:B($(s.exp)),signInProvider:a||null,signInSecondFactor:(null===o||void 0===o?void 0:o.sign_in_second_factor)||null}}(this,e)}reload(){return async function(e){const t=(0,i.Ku)(e);await Q(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}(this)}_assign(e){this!==e&&(y(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.ph
vendor: 14,759 bytes, line 2
2otoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map((e=>Object.assign({},e))),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const t=new Z(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){y(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await Q(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){if((0,r.xZ)(this.auth.app))return Promise.reject(g(this.auth));const e=await this.getIdToken();return await W(this,async function(e,t){return N(e,"POST","/v1/accounts:delete",t)}(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map((e=>Object.assign({},e))),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var n,r,i,s,o,a,l,c;const u=null!==(n=t.displayName)&&void 0!==n?n:void 0,h=null!==(r=t.email)&&void 0!==r?r:void 0,d=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(s=t.photoURL)&&void 0!==s?s:void 0,p=null!==(o=t.tenantId)&&void 0!==o?o:void 0,m=null!==(a=t._redirectEventId)&&void 0!==a?a:void 0,g=null!==(l=t.createdAt)&&void 0!==l?l:void 0,v=null!==(c=t.lastLoginAt)&&void 0!==c?c:void 0,{uid:b,emailVerified:w,isAnonymous:x,providerData:S,stsTokenManager:E}=t;y(b&&E,e,"internal-error");const k=X.fromJSON(this.name,E);y("string"===typeof b,e,"internal-error"),J(u,e.name),J(h,e.name),y("boolean"===typeof w,e,"internal-error"),y("boolean"===typeof x,e,"internal-error"),J(d,e.name),J(f,e.name),J(p,e.name),J(m,e.name),J(g,e.name),J(v,e.name);const T=new Z({uid:b,auth:e,email:h,emailVerified:w,displayName:u,isAnonymous:x,photoURL:f,phoneNumber:d,tenantId:p,stsTokenManager:k,createdAt:g,lastLoginAt:v});return S&&Array.isArray(S)&&(T.providerData=S.map((e=>Object.assign({},e)))),m&&(T._redirectEventId=m),T}static async _fromIdTokenResponse(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=new X;r.updateFromServerResponse(t);const i=new Z({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await Q(i),i}static async _fromGetAccountInfoResponse(e,t,n){const r=t.users[0];y(void 0!==r.localId,"internal-error");const i=void 0!==r.providerUserInfo?Y(r.providerUserInfo):[],s=!(r.email&&r.passwordHash)&&!(null===i||void 0===i?void 0:i.length),o=new X;o.updateFromIdToken(n);const a=new Z({uid:r.localId,auth:e,stsTokenManager:o,isAnonymous:s}),l={uid:r.localId,displayName:r.displayName||null,photoURL:r.photoUrl||null,email:r.email||null,emailVerified:r.emailVerified||!1,phoneNumber:r.phoneNumber||null,tenantId:r.tenantId||null,providerData:i,metadata:new K(r.createdAt,r.lastLoginAt),isAnonymous:!(r.email&&r.passwordHash)&&!(null===i||void 0===i?void 0:i.length)};return Object.assign(a,l),a}}const ee=new Map;function te(e){w(e instanceof Function,"Expected a class definition");let t=ee.get(e);return t?(w(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,ee.set(e,t),t)}class ne{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){const t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}ne.type="NONE";const re=ne;function ie(e,t,n){return`firebase:${e}:${t}:${n}`}class se{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const{config:r,name:i}=this.auth;this.fullUserKey=ie(this.userKey,r.apiKey,i),this.fullPersistenceKey=ie("persistence",r.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);if(!e)return null;if("string"===typeof e){const t=await z(this.auth,{idToken:e}).catch((()=>{}));return t?Z._fromGetAccountInfoResponse(this.auth,t,e):null}return Z._fromJSON(this.auth,e)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const t=await this.getCurrentUser();return await this.removeCurrentUser(),this.persistence=e,t?this.setCurrentUser(t):void 0}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"authUser";if(!t.length)return new se(te(re),e,n);const r=(await Promise.all(t.map((async e=>{if(await e._isAvailable())return e})))).filter((e=>e));let i=r[0]||te(re);const s=ie(n,e.config.apiKey,e.name);let o=null;for(const c of t)try{const t=await c._get(s);if(t){let n;if("string"===typeof t){const r=await z(e,{idToken:t}).catch((()=>{}));if(!r)break;n=await Z._fromGetAccountInfoResponse(e,r,t)}else n=Z._fromJSON(e,t);c!==i&&(o=n),i=c;break}}catch(l){}const a=r.filter((e=>e._shouldAllowMigration));return i._shouldAllowMigration&&a.length?(i=a[0],o&&await i._set(s,o.toJSON()),await Promise.all(t.map((async e=>{if(e!==i)try{await e._remove(s)}catch(l){}}))),new se(i,e,n)):new se(i,e,n)}}function oe(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(ue(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(ae(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(de(t))return"Blackberry";if(fe(t))return"Webos";if(le(t))return"Safari";if((t.includes("chrome/")||ce(t))&&!t.includes("edge/"))return"Chrome";if(he(t))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=e.match(t);if(2===(null===n||void 0===n?void 0:n.length))return n[1]}return"Other"}function ae(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.ZQ)();return/firefox\//i.test(e)}function le(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.ZQ)()).toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function ce(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.ZQ)();return/crios\//i.test(e)}function ue(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.ZQ)();return/iemobile/i.test(e)}function he(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.ZQ)();return/android/i.test(e)}function de(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.ZQ)();return/blackberry/i.test(e)}function fe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.ZQ)();return/webos/i.test(e)}function pe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.ZQ)();return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function me(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.ZQ)();return pe(e)||he(e)||fe(e)||de(e)||/windows phone/i.test(e)||ue(e)}function ge(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];switch(e){case"Browser":t=oe((0,i.ZQ)());break;case"Worker":t=`${oe((0,i.ZQ)())}-${e}`;break;default:t=e}const s=n.length?n.join(","):"FirebaseCore-web";return`${t}/JsCore/${r.MF}/${s}`}class ve{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const n=t=>new Promise(((n,r)=>{try{n(e(t))}catch(i){r(i)}}));n.onAbort=t,this.queue.push(n);const r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(n){t.reverse();for(const e of t)try{e()}catch(r){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null===n||void 0===n?void 0:n.message})}}}class ye{constructor(e){var t,n,r,i;const s=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!==(t=s.minPasswordLength)&&void 0!==t?t:6,s.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=s.maxPasswordLength),void 0!==s.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=s.containsLowercaseCharacter),void 0!==s.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=s.containsUppercaseCharacter),void 0!==s.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=s.containsNumericCharacter),void 0!==s.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=s.containsNonAlphanumericCharacter),this.enforcementState=e.enforcementState,"ENFORCEMENT_STATE_UNSPECIFIED"===this.enforcementState&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=null!==(r=null===(n=e.allowedNonAlphanumericCharacters)||void 0===n?void 0:n.join(""))&&void 0!==r?r:"",this.forceUpgradeOnSignin=null!==(i=e.forceUpgradeOnSignin)&&void 0!==i&&i,this.schemaVersion=e.schemaVersion}validatePassword(e){var t,n,r,i,s,o;const a={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,a),this.validatePasswordCharacterOptions(e,a),a.isValid&&(a.isValid=null===(t=a.meetsMinPasswordLength)||void 0===t||t),a.isValid&&(a.isValid=null===(n=a.meetsMaxPasswordLength)||void 0===n||n),a.isValid&&(a.isValid=null===(r=a.containsLowercaseLetter)||void 0===r||r),a.isValid&&(a.isValid=null===(i=a.containsUppercaseLetter)||void 0===i||i),a.isValid&&(a.isValid=null===(s=a.containsNumericCharacter)||void 0===s||s),a.isValid&&(a.isValid=null===(o=a.containsNonAlphanumericCharacter)||void 0===o||o),a}validatePasswordLengthOptions(e,t){const n=this.customStrengthOptions.minPasswordLength,r=this.customStrengthOptions.maxPasswordLength;n&&(t.meetsMinPasswordLength=e.length>=n),r&&(t.meetsMaxPasswordLength=e.length<=r)}validatePasswordCharacterOptions(e,t){let n;this.updatePasswordCharacterOptionsStatuses(t,!1,!1,!1,!1);for(let r=0;r<e.length;r++)n=e.charAt(r),this.updatePasswordCharacterOptionsStatuses(t,n>="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(e,t,n,r,i){this.customStrengthOptions.containsLowercaseLetter&&(e.containsLowercaseLetter||(e.containsLowercaseLetter=t)),this.customStrengthOptions.containsUppercaseLetter&&(e.containsUppercaseLetter||(e.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(e.containsNumericCharacter||(e.containsNumericCharacter=r)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(e.containsNonAlphanumericCharacter||(e.containsNonAlphanumericCharacter=i))}}class be{constructor(e,t,n,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new xe(this),this.idTokenSubscription=new xe(this),this.beforeStateQueue=new ve(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=u,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=r.sdkClientVersion,this._persistenceManagerAvailable=new Promise((e=>this._resolvePersistenceManagerAvailable=e))}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=te(t)),this._initializationPromise=this.queue((async()=>{var n,r,i;if(!this._deleted&&(this.persistenceManager=await se.create(this,e),null===(n=this._resolvePersistenceManagerAvailable)||void 0===n||n.call(this),!this._deleted)){if(null===(r=this._popupRedirectResolver)||void 0===r?void 0:r._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(s){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(i=this.currentUser)||void 0===i?void 0:i.uid)||null,this._deleted||(this._isInitialized=!0)}})),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();return this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),void await this.currentUser.getIdToken()):void await this._updateCurrentUser(e,!0):void 0}async initializeCurrentUserFromIdToken(e){try{const t=await z(this,{idToken:e}),n=await Z._fromGetAccountInfoResponse(this,t,e);await this.directlySetCurrentUser(n)}catch(t){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",t),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(e){var t;if((0,r.xZ)(this.app)){const e=this.app.settings.authIdToken;return e?new Promise((t=>{setTimeout((()=>this.initializeCurrentUserFromIdToken(e).then(t,t)))})):this.directlySetCurrentUser(null)}const n=await this.assertedPersistence.getCurrentUser();let i=n,s=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const n=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,r=null===i||void 0===i?void 0:i._redirectEventId,o=await this.tryRedirectSignIn(e);n&&n!==r||!(null===o||void 0===o?void 0:o.user)||(i=o.user,s=!0)}if(!i)return this.directlySetCurrentUser(null);
2if(!i._redirectEventId){if(s)try{await this.beforeStateQueue.runMiddleware(i)}catch(o){i=n,this._popupRedirectResolver._overrideRedirectResult(this,(()=>Promise.reject(o)))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return y(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(n){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await Q(e)}catch(t){if("auth/network-request-failed"!==(null===t||void 0===t?void 0:t.code))return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"===typeof navigator)return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}async updateCurrentUser(e){if((0,r.xZ)(this.app))return Promise.reject(g(this));const t=e?(0,i.Ku)(e):null;return t&&y(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this._deleted)return e&&y(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue((async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()}))}async signOut(){return(0,r.xZ)(this.app)?Promise.reject(g(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return(0,r.xZ)(this.app)?Promise.reject(g(this)):this.queue((async()=>{await this.assertedPersistence.setPersistence(te(e))}))}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(e){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const t=this._getPasswordPolicyInternal();return t.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):t.validatePassword(e)}_getPasswordPolicyInternal(){return null===this.tenantId?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const e=await async function(e){return N(e,"GET","/v2/passwordPolicy",P(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}(this),t=new ye(e);null===this.tenantId?this._projectPasswordPolicy=t:this._tenantPasswordPolicies[this.tenantId]=t}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(e){this._errorFactory=new i.FA("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}authStateReady(){return new Promise(((e,t)=>{if(this.currentUser)e();else{const n=this.onAuthStateChanged((()=>{n(),e()}),t)}}))}async revokeAccessToken(e){if(this.currentUser){const t={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:await this.currentUser.getIdToken()};null!=this.tenantId&&(t.tenantId=this.tenantId),await async function(e,t){return N(e,"POST","/v2/accounts:revokeToken",P(e,t))}(this,t)}}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){const n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&te(e)||this._popupRedirectResolver;y(t,this,"argument-error"),this.redirectPersistenceManager=await se.create(this,[te(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return this._isInitialized&&await this.queue((async()=>{})),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e?this._currentUser:(null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue((async()=>this.directlySetCurrentUser(e)))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};const i="function"===typeof t?t:t.next.bind(t);let s=!1;const o=this._isInitialized?Promise.resolve():this._initializationPromise;if(y(o,this,"internal-error"),o.then((()=>{s||i(this.currentUser)})),"function"===typeof t){const i=e.addObserver(t,n,r);return()=>{s=!0,i()}}{const n=e.addObserver(t);return()=>{s=!0,n()}}}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return y(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=ge(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const n=await(null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());n&&(t["X-Firebase-Client"]=n);const r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t}async _getAppCheckToken(){var e;if((0,r.xZ)(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const t=await(null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null===t||void 0===t?void 0:t.error)&&function(e){if(h.logLevel<=s.$b.WARN){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];h.warn(`Auth (${r.MF}): ${e}`,...n)}}(`Error while retrieving App Check token: ${t.error}`),null===t||void 0===t?void 0:t.token}}function we(e){return(0,i.Ku)(e)}class xe{constructor(e){this.auth=e,this.observer=null,this.addObserver=(0,i.tD)((e=>this.observer=e))}get next(){return y(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let Se={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function Ee(e){return Se.loadJS(e)}function ke(e){return`__${e}${Math.floor(1e6*Math.random())}`}class Te{constructor(){this.enterprise=new _e}ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}class _e{ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}const Ce="NO_RECAPTCHA";class Ae{constructor(e){this.type="recaptcha-enterprise",this.auth=we(e)}async verify(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"verify",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function n(t,n,r){const i=window.grecaptcha;F(i)?i.enterprise.ready((()=>{i.enterprise.execute(t,{action:e}).then((e=>{n(e)})).catch((()=>{n(Ce)}))})):r(Error("No reCAPTCHA enterprise script loaded."))}if(this.auth.settings.appVerificationDisabledForTesting){return(new Te).execute("siteKey",{action:"verify"})}return new Promise(((e,r)=>{(async function(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise((async(t,n)=>
2{V(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then((r=>{if(void 0!==r.recaptchaKey){const n=new U(r);return null==e.tenantId?e._agentRecaptchaConfig=n:e._tenantRecaptchaConfigs[e.tenantId]=n,t(n.siteKey)}n(new Error("recaptcha Enterprise site key undefined"))})).catch((e=>{n(e)}))}))})(this.auth).then((i=>{if(!t&&F(window.grecaptcha))n(i,e,r);else{if("undefined"===typeof window)return void r(new Error("RecaptchaVerifier is only supported in browser"));let t=Se.recaptchaEnterpriseScript;0!==t.length&&(t+=i),Ee(t).then((()=>{n(i,e,r)})).catch((e=>{r(e)}))}})).catch((e=>{r(e)}))}))}}async function Ie(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const s=new Ae(e);let o;if(i)o=Ce;else try{o=await s.verify(n)}catch(l){o=await s.verify(n,!0)}const a=Object.assign({},t);if("mfaSmsEnrollment"===n||"mfaSmsSignIn"===n){if("phoneEnrollmentInfo"in a){const e=a.phoneEnrollmentInfo.phoneNumber,t=a.phoneEnrollmentInfo.recaptchaToken;Object.assign(a,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:t,captchaResponse:o,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in a){const e=a.phoneSignInInfo.recaptchaToken;Object.assign(a,{phoneSignInInfo:{recaptchaToken:e,captchaResponse:o,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return a}return r?Object.assign(a,{captchaResp:o}):Object.assign(a,{captchaResponse:o}),Object.assign(a,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(a,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),a}async function Pe(e,t,n,r,i){var s,o;if("EMAIL_PASSWORD_PROVIDER"===i){if(null===(s=e._getRecaptchaConfig())||void 0===s?void 0:s.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const i=await Ie(e,t,n,"getOobCode"===n);return r(e,i)}return r(e,t).catch((async i=>{if("auth/missing-recaptcha-token"===i.code){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const i=await Ie(e,t,n,"getOobCode"===n);return r(e,i)}return Promise.reject(i)}))}if("PHONE_PROVIDER"===i){if(null===(o=e._getRecaptchaConfig())||void 0===o?void 0:o.isProviderEnabled("PHONE_PROVIDER")){const i=await Ie(e,t,n);return r(e,i).catch((async i=>{var s;if("AUDIT"===(null===(s=e._getRecaptchaConfig())||void 0===s?void 0:s.getProviderEnforcementState("PHONE_PROVIDER"))&&("auth/missing-recaptcha-token"===i.code||"auth/invalid-app-credential"===i.code)){console.log(`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${n} flow.`);const i=await Ie(e,t,n,!1,!0);return r(e,i)}return Promise.reject(i)}))}{const i=await Ie(e,t,n,!1,!0);return r(e,i)}}return Promise.reject(i+" provider is not supported.")}async function Ne(e){const t=we(e),n=await V(t,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}),r=new U(n);if(null==t.tenantId?t._agentRecaptchaConfig=r:t._tenantRecaptchaConfigs[t.tenantId]=r,r.isAnyProviderEnabled()){new Ae(t).verify()}}function Re(e,t,n){const r=we(e);y(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const s=!!(null===n||void 0===n?void 0:n.disableWarnings),o=De(t),{host:a,port:l}=function(e){const t=De(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const e=i[1];return{host:e,port:Oe(r.substr(e.length+1))}}{const[e,t]=r.split(":");return{host:e,port:Oe(t)}}}(t),c=null===l?"":`:${l}`,u={url:`${o}//${a}${c}/`},h=Object.freeze({host:a,port:l,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:s})});if(!r._canInitEmulator)return y(r.config.emulator&&r.emulatorConfig,r,"emulator-config-failed"),void y((0,i.bD)(u,r.config.emulator)&&(0,i.bD)(h,r.emulatorConfig),r,"emulator-config-failed");r.config.emulator=u,r.emulatorConfig=h,r.settings.appVerificationDisabledForTesting=!0,s||function(){function e(){const e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!==typeof console&&"function"===typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials.");"undefined"!==typeof window&&"undefined"!==typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}(),(0,i.zJ)(a)&&(0,i.gE)(`${o}//${a}${c}`)}function De(e){const t=e.indexOf(":");
2return t<0?"":e.substr(0,t+1)}function Oe(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}class je{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return b("not implemented")}_getIdTokenResponse(e){return b("not implemented")}_linkToIdToken(e,t){return b("not implemented")}_getReauthenticationResolver(e){return b("not implemented")}}async function Le(e,t){return N(e,"POST","/v1/accounts:signUp",t)}async function Me(e,t){return D(e,"POST","/v1/accounts:signInWithPassword",P(e,t))}class Fe extends je{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new Fe(e,t,"password")}static _fromEmailAndCode(e,t){return new Fe(e,t,"emailLink",arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const t="string"===typeof e?JSON.parse(e):e;if((null===t||void 0===t?void 0:t.email)&&(null===t||void 0===t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return Pe(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",Me,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return async function(e,t){return D(e,"POST","/v1/accounts:signInWithEmailLink",P(e,t))}(e,{email:this._email,oobCode:this._password});default:f(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return Pe(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",Le,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return async function(e,t){return D(e,"POST","/v1/accounts:signInWithEmailLink",P(e,t))}(e,{idToken:t,email:this._email,oobCode:this._password});default:f(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function Ue(e,t){return D(e,"POST","/v1/accounts:signInWithIdp",P(e,t))}class Ve extends je{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new Ve(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):f("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
2once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const t="string"===typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,i=o(t,["providerId","signInMethod"]);if(!n||!r)return null;const s=new Ve(n,r);return s.idToken=i.idToken||void 0,s.accessToken=i.accessToken||void 0,s.secret=i.secret,s.nonce=i.nonce,s.pendingToken=i.pendingToken||null,s}_getIdTokenResponse(e){return Ue(e,this.buildRequest())}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,Ue(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,Ue(e,t)}buildRequest(){const e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=(0,i.Am)(t)}return e}}async function ze(e,t){return N(e,"POST","/v1/accounts:sendVerificationCode",P(e,t))}const Be={USER_NOT_FOUND:"user-not-found"};class $e extends je{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new $e({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new $e({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return async function(e,t){return D(e,"POST","/v1/accounts:signInWithPhoneNumber",P(e,t))}(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return async function(e,t){const n=await D(e,"POST","/v1/accounts:signInWithPhoneNumber",P(e,t));if(n.temporaryProof)throw M(e,"account-exists-with-different-credential",n);return n}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return async function(e,t){return D(e,"POST","/v1/accounts:signInWithPhoneNumber",P(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),Be)}(e,this._makeVerificationRequest())}_makeVerificationRequest(){const{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){const e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"===typeof e&&(e=JSON.parse(e));const{verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}=e;return n||t||r||i?new $e({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}):null}}class qe{constructor(e){var t,n,r,s,o,a;const l=(0,i.I9)((0,i.hp)(e)),c=null!==(t=l.apiKey)&&void 0!==t?t:null,u=null!==(n=l.oobCode)&&void 0!==n?n:null,h=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(r=l.mode)&&void 0!==r?r:null);y(c&&u&&h,"argument-error"),this.apiKey=c,this.operation=h,this.code=u,this.continueUrl=null!==(s=l.continueUrl)&&void 0!==s?s:null,this.languageCode=null!==(o=l.lang)&&void 0!==o?o:null,this.tenantId=null!==(a=l.tenantId)&&void 0!==a?a:null}static parseLink(e){const t=function(e){const t=(0,i.I9)((0,i.hp)(e)).link,n=t?(0,i.I9)((0,i.hp)(t)).deep_link_id:null,r=(0,i.I9)((0,i.hp)(e)).deep_link_id;return(r?(0,i.I9)((0,i.hp)(r)).link:null)||r||n||t||e}(e);try{return new qe(t)}catch(n){return null}}}class He{constructor(){this.providerId=He.PROVIDER_ID}static credential(e,t){return Fe._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){const n=qe.parseLink(t);return y(n,"argument-error"),Fe._fromEmailAndCode(e,n.code,n.tenantId)}}He.PROVIDER_ID="password",He.EMAIL_PASSWORD_SIGN_IN_METHOD="password",He.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class We{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}class Ge extends We{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class Ke extends Ge{constructor(){super("facebook.com")}static credential(e){return Ve._fromParams({providerId:Ke.PROVIDER_ID,signInMethod:Ke.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Ke.credentialFromTaggedObject(e)}static credentialFromError(e){return Ke.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return Ke.credential(t.oauthAccessToken)}catch(n){return null}}}Ke.FACEBOOK_SIGN_IN_METHOD="facebook.com",Ke.PROVIDER_ID="facebook.com";class Qe extends Ge{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return Ve._fromParams({providerId:Qe.PROVIDER_ID,signInMethod:Qe.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return Qe.credentialFromTaggedObject(e)}static credentialFromError(e){return Qe.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t)return null;const{oauthIdToken:n,oauthAccessToken:r}=t;if(!n&&!r)return null;try{return Qe.credential(n,r)}catch(i){return null}}}Qe.GOOGLE_SIGN_IN_METHOD="google.com",Qe.PROVIDER_ID="google.com";class Ye extends Ge{constructor(){super("github.com")}static credential(e){return Ve._fromParams({providerId:Ye.PROVIDER_ID,signInMethod:Ye.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Ye.credentialFromTaggedObject(e)}static credentialFromError(e){return Ye.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return Ye.credential(t.oauthAccessToken)}catch(n){return null}}}
2Ye.GITHUB_SIGN_IN_METHOD="github.com",Ye.PROVIDER_ID="github.com";class Xe extends Ge{constructor(){super("twitter.com")}static credential(e,t){return Ve._fromParams({providerId:Xe.PROVIDER_ID,signInMethod:Xe.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return Xe.credentialFromTaggedObject(e)}static credentialFromError(e){return Xe.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=t;if(!n||!r)return null;try{return Xe.credential(n,r)}catch(i){return null}}}async function Je(e,t){return D(e,"POST","/v1/accounts:signUp",P(e,t))}Xe.TWITTER_SIGN_IN_METHOD="twitter.com",Xe.PROVIDER_ID="twitter.com";class Ze{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=await Z._fromIdTokenResponse(e,n,r),s=et(n);return new Ze({user:i,providerId:s,_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);const r=et(n);return new Ze({user:e,providerId:r,_tokenResponse:n,operationType:t})}}function et(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}async function tt(e){var t;if((0,r.xZ)(e.app))return Promise.reject(g(e));const n=we(e);if(await n._initializationPromise,null===(t=n.currentUser)||void 0===t?void 0:t.isAnonymous)return new Ze({user:n.currentUser,providerId:null,operationType:"signIn"});const i=await Je(n,{returnSecureToken:!0}),s=await Ze._fromIdTokenResponse(n,"signIn",i,!0);return await n._updateCurrentUser(s.user),s}class nt extends i.g{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,nt.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,r){return new nt(e,t,n,r)}}function rt(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch((n=>{if("auth/multi-factor-auth-required"===n.code)throw nt._fromErrorAndOperation(e,n,t,r);throw n}))}async function it(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=await W(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return Ze._forOperation(e,"link",r)}async function st(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{auth:i}=e;if((0,r.xZ)(i.app))return Promise.reject(g(i));const s="reauthenticate";try{const r=await W(e,rt(i,s,t,e),n);y(r.idToken,i,"internal-error");const o=q(r.idToken);y(o,i,"internal-error");const{sub:a}=o;return y(e.uid===a,i,"user-mismatch"),Ze._forOperation(e,s,r)}catch(o){throw"auth/user-not-found"===(null===o||void 0===o?void 0:o.code)&&f(i,"user-mismatch"),o}}async function ot(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if((0,r.xZ)(e.app))return Promise.reject(g(e));const i="signIn",s=await rt(e,i,t),o=await Ze._fromIdTokenResponse(e,i,s);return n||await e._updateCurrentUser(o.user),o}async function at(e,t){return ot(we(e),t)}async function lt(e,t){if((0,r.xZ)(e.app))return Promise.reject(g(e));const n=we(e),i=await async function(e,t){return D(e,"POST","/v1/accounts:signInWithCustomToken",P(e,t))}(n,{token:t,returnSecureToken:!0}),s=await Ze._fromIdTokenResponse(n,"signIn",i);return await n._updateCurrentUser(s.user),s}function ct(e,t,n,r){return(0,i.Ku)(e).onAuthStateChanged(t,n,r)}function ut(e){return(0,i.Ku)(e).signOut()}function ht(e,t){return N(e,"POST","/v2/accounts/mfaEnrollment:start",P(e,t))}new WeakMap;const dt="__sak";class ft{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(dt,"1"),this.storage.removeItem(dt),Promise.resolve(!0)):Promise.resolve(!1)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){const t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class pt extends ft{constructor(){super((()=>window.localStorage),"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=me(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];
2if(!e.key)return void this.forAllChangedKeys(((e,t,n)=>{this.notifyListeners(e,n)}));const n=e.key;t?this.detachListener():this.stopPolling();const r=()=>{const e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},s=this.storage.getItem(n);(0,i.lT)()&&10===document.documentMode&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const r of Array.from(n))r(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((()=>{this.forAllChangedKeys(((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)}))}),1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}pt.type="LOCAL";const mt=pt;function gt(e){var t,n;const r=e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),i=RegExp(`${r}=([^;]+)`);return null!==(n=null===(t=document.cookie.match(i))||void 0===t?void 0:t[1])&&void 0!==n?n:null}function vt(e){return`${"http:"===window.location.protocol?"__dev_":"__HOST-"}FIREBASE_${e.split(":")[3]}`}class yt{constructor(){this.type="COOKIE",this.listenerUnsubscribes=new Map}_getFinalTarget(e){if(void 0===typeof window)return e;const t=new URL(`${window.location.origin}/__cookies__`);return t.searchParams.set("finalTarget",e),t}async _isAvailable(){var e;return!("boolean"===typeof isSecureContext&&!isSecureContext)&&("undefined"!==typeof navigator&&"undefined"!==typeof document&&(null===(e=navigator.cookieEnabled)||void 0===e||e))}async _set(e,t){}async _get(e){if(!this._isAvailable())return null;const t=vt(e);if(window.cookieStore){const e=await window.cookieStore.get(t);return null===e||void 0===e?void 0:e.value}return gt(t)}async _remove(e){if(!this._isAvailable())return;if(!await this._get(e))return;const t=vt(e);document.cookie=`${t}=;Max-Age=34560000;Partitioned;Secure;SameSite=Strict;Path=/;Priority=High`,await fetch("/__cookies__",{method:"DELETE"}).catch((()=>{}))}_addListener(e,t){if(!this._isAvailable())return;const n=vt(e);if(window.cookieStore){const e=e=>{const r=e.changed.find((e=>e.name===n));r&&t(r.value);e.deleted.find((e=>e.name===n))&&t(null)},r=()=>window.cookieStore.removeEventListener("change",e);return this.listenerUnsubscribes.set(t,r),window.cookieStore.addEventListener("change",e)}let r=gt(n);const i=setInterval((()=>{const e=gt(n);e!==r&&(t(e),r=e)}),1e3);this.listenerUnsubscribes.set(t,(()=>clearInterval(i)))}_removeListener(e,t){const n=this.listenerUnsubscribes.get(t);n&&(n(),this.listenerUnsubscribes.delete(t))}}yt.type="COOKIE";class bt extends ft{constructor(){super((()=>window.sessionStorage),"SESSION")}_addListener(e,t){}_removeListener(e,t){}}bt.type="SESSION";const wt=bt;class xt{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const t=this.receivers.find((t=>t.isListeningto(e)));if(t)return t;const n=new xt(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:n,eventType:r,data:i}=t.data,s=this.handlersMap[r];if(!(null===s||void 0===s?void 0:s.size))return;t.ports[0].postMessage({status:"ack",eventId:n,eventType:r});const o=Array.from(s).map((async e=>e(t.origin,i))),a=await function(e){return Promise.all(e.map((async e=>{try{return{fulfilled:!0,value:await e}}catch(t){return{fulfilled:!1,reason:t}}})))}(o);t.ports[0].postMessage({status:"done",eventId:n,eventType:r,response:a})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}function St(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n="";for(let r=0;r<t;r++)n+=Math.floor(10*Math.random());return e+n}
vendor: 4,780 bytes, line 2
2xt.receivers=[];class Et{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50;const r="undefined"!==typeof MessageChannel?new MessageChannel:null;if(!r)throw new Error("connection_unavailable");let i,s;return new Promise(((o,a)=>{const l=St("",20);r.port1.start();const c=setTimeout((()=>{a(new Error("unsupported_event"))}),n);s={messageChannel:r,onMessage(e){const t=e;if(t.data.eventId===l)switch(t.data.status){case"ack":clearTimeout(c),i=setTimeout((()=>{a(new Error("timeout"))}),3e3);break;case"done":clearTimeout(i),o(t.data.response);break;default:clearTimeout(c),clearTimeout(i),a(new Error("invalid_response"))}}},this.handlers.add(s),r.port1.addEventListener("message",s.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[r.port2])})).finally((()=>{s&&this.removeMessageHandler(s)}))}}function kt(){return window}function Tt(){return"undefined"!==typeof kt().WorkerGlobalScope&&"function"===typeof kt().importScripts}const _t="firebaseLocalStorageDb",Ct="firebaseLocalStorage",At="fbase_key";class It{constructor(e){this.request=e}toPromise(){return new Promise(((e,t)=>{this.request.addEventListener("success",(()=>{e(this.request.result)})),this.request.addEventListener("error",(()=>{t(this.request.error)}))}))}}function Pt(e,t){return e.transaction([Ct],t?"readwrite":"readonly").objectStore(Ct)}function Nt(){const e=indexedDB.open(_t,1);return new Promise(((t,n)=>{e.addEventListener("error",(()=>{n(e.error)})),e.addEventListener("upgradeneeded",(()=>{const t=e.result;try{t.createObjectStore(Ct,{keyPath:At})}catch(r){n(r)}})),e.addEventListener("success",(async()=>{const n=e.result;n.objectStoreNames.contains(Ct)?t(n):(n.close(),await function(){const e=indexedDB.deleteDatabase(_t);return new It(e).toPromise()}(),t(await Nt()))}))}))}async function Rt(e,t,n){const r=Pt(e,!0).put({[At]:t,value:n});return new It(r).toPromise()}function Dt(e,t){const n=Pt(e,!0).delete(t);return new It(n).toPromise()}class Ot{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then((()=>{}),(()=>{}))}async _openDb(){return this.db||(this.db=await Nt()),this.db}async _withRetries(e){let t=0;for(;;)try{const t=await this._openDb();return await e(t)}catch(n){if(t++>3)throw n;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Tt()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=xt._getInstance(Tt()?self:null),this.receiver._subscribe("keyChanged",(async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)}))),this.receiver._subscribe("ping",(async(e,t)=>["keyChanged"]))}async initializeSender(){var e,t;if(this.activeServiceWorker=await async function(){if(!(null===navigator||void 0===navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}(),!this.activeServiceWorker)return;this.sender=new Et(this.activeServiceWorker);const n=await this.sender._send("ping",{},800);n&&(null===(e=n[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=n[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(this.sender&&this.activeServiceWorker&&function(){var e;return(null===(e=null===navigator||void 0===navigator?void 0:navigator.serviceWorker)||void 0===e?void 0:e.controller)||null}()===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(t){}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await Nt();return await Rt(e,dt,"1"),await Dt(e,dt),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite((async()=>(await this._withRetries((n=>Rt(n,e,t))),this.localCache[e]=t,this.notifyServiceWorker(e))))}async _get(e){const t=await this._withRetries((t=>async function(e,t){const n=Pt(e,!1).get(t),r=await new It(n).toPromise();return void 0===r?null:r.value}(t,e)));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite((async()=>(await this._withRetries((t=>Dt(t,e))),delete this.localCache[e],this.notifyServiceWorker(e))))}async _poll(){const e=await this._withRetries((e=>{const t=Pt(e,!1).getAll();
2return new It(t).toPromise()}));if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],n=new Set;if(0!==e.length)for(const{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(const r of Object.keys(this.localCache))this.localCache[r]&&!n.has(r)&&(this.notifyListeners(r,null),t.push(r));return t}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const r of Array.from(n))r(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval((async()=>this._poll()),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}Ot.type="LOCAL";const jt=Ot;function Lt(e,t){return N(e,"POST","/v2/accounts/mfaSignIn:start",P(e,t))}ke("rcb"),new k(3e4,6e4);const Mt="recaptcha";async function Ft(e,t,n){var r;if(!e._getRecaptchaConfig())try{await Ne(e)}catch(i){console.log("Failed to initialize reCAPTCHA Enterprise config. Triggering the reCAPTCHA v2 verification.")}try{let i;if(i="string"===typeof t?{phoneNumber:t}:t,"session"in i){const t=i.session;if("phoneNumber"in i){y("enroll"===t.type,e,"internal-error");const r={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:i.phoneNumber,clientType:"CLIENT_TYPE_WEB"}},s=Pe(e,r,"mfaSmsEnrollment",(async(e,t)=>{if(t.phoneEnrollmentInfo.captchaResponse===Ce){y((null===n||void 0===n?void 0:n.type)===Mt,e,"argument-error");return ht(e,await Ut(e,t,n))}return ht(e,t)}),"PHONE_PROVIDER");return(await s.catch((e=>Promise.reject(e)))).phoneSessionInfo.sessionInfo}{y("signin"===t.type,e,"internal-error");const s=(null===(r=i.multiFactorHint)||void 0===r?void 0:r.uid)||i.multiFactorUid;y(s,e,"missing-multi-factor-info");const o={mfaPendingCredential:t.credential,mfaEnrollmentId:s,phoneSignInInfo:{clientType:"CLIENT_TYPE_WEB"}},a=Pe(e,o,"mfaSmsSignIn",(async(e,t)=>{if(t.phoneSignInInfo.captchaResponse===Ce){y((null===n||void 0===n?void 0:n.type)===Mt,e,"argument-error");return Lt(e,await Ut(e,t,n))}return Lt(e,t)}),"PHONE_PROVIDER");return(await a.catch((e=>Promise.reject(e)))).phoneResponseInfo.sessionInfo}}{const t={phoneNumber:i.phoneNumber,clientType:"CLIENT_TYPE_WEB"},r=Pe(e,t,"sendVerificationCode",(async(e,t)=>{if(t.captchaResponse===Ce){y((null===n||void 0===n?void 0:n.type)===Mt,e,"argument-error");return ze(e,await Ut(e,t,n))}return ze(e,t)}),"PHONE_PROVIDER");return(await r.catch((e=>Promise.reject(e)))).sessionInfo}}finally{null===n||void 0===n||n._reset()}}async function Ut(e,t,n){y(n.type===Mt,e,"argument-error");const r=await n.verify();y("string"===typeof r,e,"argument-error");const i=Object.assign({},t);if("phoneEnrollmentInfo"in i){const e=i.phoneEnrollmentInfo.phoneNumber,t=i.phoneEnrollmentInfo.captchaResponse,n=i.phoneEnrollmentInfo.clientType,s=i.phoneEnrollmentInfo.recaptchaVersion;return Object.assign(i,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:r,captchaResponse:t,clientType:n,recaptchaVersion:s}}),i}if("phoneSignInInfo"in i){const e=i.phoneSignInInfo.captchaResponse,t=i.phoneSignInInfo.clientType,n=i.phoneSignInInfo.recaptchaVersion;return Object.assign(i,{phoneSignInInfo:{recaptchaToken:r,captchaResponse:e,clientType:t,recaptchaVersion:n}}),i}return Object.assign(i,{recaptchaToken:r}),i}class Vt{constructor(e){this.providerId=Vt.PROVIDER_ID,this.auth=we(e)}verifyPhoneNumber(e,t){return Ft(this.auth,e,(0,i.Ku)(t))}static credential(e,t){return $e._fromVerification(e,t)}static credentialFromResult(e){const t=e;return Vt.credentialFromTaggedObject(t)}static credentialFromError(e){return Vt.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let{_tokenResponse:t}=e;if(!t)return null;const{phoneNumber:n,temporaryProof:r}=t;return n&&r?$e._fromTokenResponse(n,r):null}}function zt(e,t){return t?te(t):(y(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}
vendor: 4,421 bytes, line 2
2Vt.PROVIDER_ID="phone",Vt.PHONE_SIGN_IN_METHOD="phone";class Bt extends je{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Ue(e,this._buildIdpRequest())}_linkToIdToken(e,t){return Ue(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return Ue(e,this._buildIdpRequest())}_buildIdpRequest(e){const t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function $t(e){return ot(e.auth,new Bt(e),e.bypassAuthState)}function qt(e){const{auth:t,user:n}=e;return y(n,t,"internal-error"),st(n,new Bt(e),e.bypassAuthState)}async function Ht(e){const{auth:t,user:n}=e;return y(n,t,"internal-error"),it(n,new Bt(e),e.bypassAuthState)}class Wt{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise((async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(n){this.reject(n)}}))}async onAuthEvent(e){const{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:s,type:o}=e;if(s)return void this.reject(s);const a={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(o)(a))}catch(l){this.reject(l)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return $t;case"linkViaPopup":case"linkViaRedirect":return Ht;case"reauthViaPopup":case"reauthViaRedirect":return qt;default:f(this.auth,"internal-error")}}resolve(e){w(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){w(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}const Gt=new k(2e3,1e4);class Kt extends Wt{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,Kt.currentPopupAction&&Kt.currentPopupAction.cancel(),Kt.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return y(e,this.auth,"internal-error"),e}async onExecution(){w(1===this.filter.length,"Popup operations only handle one event");const e=St();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch((e=>{this.reject(e)})),this.resolver._isIframeWebStorageSupported(this.auth,(e=>{e||this.reject(p(this.auth,"web-storage-unsupported"))})),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(p(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,Kt.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,n;(null===(n=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===n?void 0:n.closed)?this.pollId=window.setTimeout((()=>{this.pollId=null,this.reject(p(this.auth,"popup-closed-by-user"))}),8e3):this.pollId=window.setTimeout(e,Gt.get())};e()}}Kt.currentPopupAction=null;const Qt=new Map;class Yt extends Wt{constructor(e,t){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,arguments.length>2&&void 0!==arguments[2]&&arguments[2]),this.eventId=null}async execute(){let e=Qt.get(this.auth._key());if(!e){try{const t=await async function(e,t){const n=Zt(t),r=Jt(e);if(!await r._isAvailable())return!1;const i="true"===await r._get(n);return await r._remove(n),i}(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}Qt.set(this.auth._key(),e)}return this.bypassAuthState||Qt.set(this.auth._key(),(()=>Promise.resolve(null))),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);
2if("unknown"!==e.type){if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}else this.resolve(null)}async onExecution(){}cleanUp(){}}function Xt(e,t){Qt.set(e._key(),t)}function Jt(e){return te(e._redirectPersistence)}function Zt(e){return ie("pendingRedirect",e.config.apiKey,e.name)}async function en(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if((0,r.xZ)(e.app))return Promise.reject(g(e));const i=we(e),s=zt(i,t),o=new Yt(i,s,n),a=await o.execute();return a&&!n&&(delete a.user._redirectEventId,await i._persistUserIfCurrent(a.user),await i._setRedirectUser(null,t)),a}class tn{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach((n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))})),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return rn(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!rn(e)){const r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(p(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){const n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(nn(e))}saveEventToCache(e){this.cachedEventUids.add(nn(e)),this.lastProcessedEventTime=Date.now()}}function nn(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter((e=>e)).join("-")}function rn(e){let{type:t,error:n}=e;return"unknown"===t&&"auth/no-auth-event"===(null===n||void 0===n?void 0:n.code)}const sn=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,on=/^https?/;async function an(e){if(e.config.emulator)return;const{authorizedDomains:t}=await async function(e){return N(e,"GET","/v1/projects",arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e);for(const r of t)try{if(ln(r))return}catch(n){}f(e,"unauthorized-domain")}function ln(e){const t=x(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const i=new URL(e);return""===i.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&i.hostname===r}if(!on.test(n))return!1;if(sn.test(e))return r===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}const cn=new k(3e4,6e4);function un(){const e=kt().___jsl;if(null===e||void 0===e?void 0:e.H)for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let n=0;n<e.CP.length;n++)e.CP[n]=null}function hn(e){return new Promise(((t,n)=>{var r,i,s;function o(){un(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{un(),n(p(e,"network-request-failed"))},timeout:cn.get()})}if(null===(i=null===(r=kt().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(s=kt().gapi)||void 0===s?void 0:s.load)){const t=ke("iframefcb");return kt()[t]=()=>{gapi.load?o():n(p(e,"network-request-failed"))},Ee(`${Se.gapiScript}?onload=${t}`).catch((e=>n(e)))}o()}})).catch((e=>{throw dn=null,e}))}let dn=null;const fn=new k(5e3,15e3),pn={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},mn=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function gn(e){const t=e.config;y(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?T(t,"emulator/auth/iframe"):`https://${e.config.authDomain}
2/__/auth/iframe`,s={apiKey:t.apiKey,appName:e.name,v:r.MF},o=mn.get(e.config.apiHost);o&&(s.eid=o);const a=e._getFrameworks();return a.length&&(s.fw=a.join(",")),`${n}?${(0,i.Am)(s).slice(1)}`}async function vn(e){const t=await function(e){return dn=dn||hn(e),dn}(e),n=kt().gapi;return y(n,e,"internal-error"),t.open({where:document.body,url:gn(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:pn,dontclear:!0},(t=>new Promise((async(n,r)=>{await t.restyle({setHideOnLeave:!1});const i=p(e,"network-request-failed"),s=kt().setTimeout((()=>{r(i)}),fn.get());function o(){kt().clearTimeout(s),n(t)}t.ping(o).then(o,(()=>{r(i)}))}))))}const yn={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class bn{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}function wn(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:600;const o=Math.max((window.screen.availHeight-s)/2,0).toString(),a=Math.max((window.screen.availWidth-r)/2,0).toString();let l="";const c=Object.assign(Object.assign({},yn),{width:r.toString(),height:s.toString(),top:o,left:a}),u=(0,i.ZQ)().toLowerCase();n&&(l=ce(u)?"_blank":n),ae(u)&&(t=t||"http://localhost",c.scrollbars="yes");const h=Object.entries(c).reduce(((e,t)=>{let[n,r]=t;return`${e}${n}=${r},`}),"");if(function(){var e;return pe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.ZQ)())&&!!(null===(e=window.navigator)||void 0===e?void 0:e.standalone)}(u)&&"_self"!==l)return function(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}(t||"",l),new bn(null);const d=window.open(t||"",l,h);y(d,e,"popup-blocked");try{d.focus()}catch(f){}return new bn(d)}const xn="__/auth/handler",Sn="emulator/auth/handler",En=encodeURIComponent("fac");async function kn(e,t,n,s,o,a){y(e.config.authDomain,e,"auth-domain-config-required"),y(e.config.apiKey,e,"invalid-api-key");const l={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:s,v:r.MF,eventId:o};if(t instanceof We){t.setDefaultLanguage(e.languageCode),l.providerId=t.providerId||"",(0,i.Im)(t.getCustomParameters())||(l.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries(a||{}))l[e]=t}if(t instanceof Ge){const e=t.getScopes().filter((e=>""!==e));e.length>0&&(l.scopes=e.join(","))}e.tenantId&&(l.tid=e.tenantId);const c=l;for(const r of Object.keys(c))void 0===c[r]&&delete c[r];const u=await e._getAppCheckToken(),h=u?`#${En}=${encodeURIComponent(u)}`:"";return`${function(e){let{config:t}=e;if(!t.emulator)return`https://${t.authDomain}/${xn}`;return T(t,Sn)}(e)}?${(0,i.Am)(c).slice(1)}${h}`}const Tn="webStorageSupport";const _n=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=wt,this._completeRedirectFn=en,this._overrideRedirectResult=Xt}async _openPopup(e,t,n,r){var i;w(null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,"_initialize() not called before _openPopup()");return wn(e,await kn(e,t,n,x(),r),St())}async _openRedirect(e,t,n,r){await this._originValidation(e);return function(e){kt().location.href=e}(await kn(e,t,n,x(),r)),new Promise((()=>{}))}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(w(n,"If manager is not set, promise should be"),n)}const n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch((()=>{delete this.eventManagers[t]})),n}async initAndGetManager(e){const t=await vn(e),n=new tn(e);return t.register("authEvent",(t=>{y(null===t||void 0===t?void 0:t.authEvent,e,"invalid-auth-event");return{status:n.onEvent(t.authEvent)?"ACK":"ERROR"}}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(Tn,{type:Tn},(n=>{var r;const i=null===(r=null===n||void 0===n?void 0:n[0])||void 0===r?void 0:r[Tn];void 0!==i&&t(!!i),f(e,"internal-error")}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=an(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return me()||le()||pe()}};var Cn="@firebase/auth",An="1.10.2";class In{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){if(this.assertAuthConfigured(),await this.auth._initializationPromise,!this.auth.currentUser)return null;return{accessToken:await this.auth.currentUser.getIdToken(e)}}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged((t=>{e((null===t||void 0===t?void 0:t.stsTokenManager.accessToken)||null)}));this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){y(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}const Pn=(0,i.XA)("authIdTokenMaxAge")||300;let Nn=null;const Rn=e=>async t=>{const n=t&&await t.getIdTokenResult(),r=n&&((new Date).getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>Pn)return;const i=null===n||void 0===n?void 0:n.token;Nn!==i&&(Nn=i,await fetch(e,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function Dn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,r.Sx)();const t=(0,r.j6)(e,"auth");if(t.isInitialized())return t.getImmediate();const n=function(e,t){const n=(0,r.j6)(e,"auth");if(n.isInitialized()){const e=n.getImmediate(),r=n.getOptions();if((0,i.bD)(r,null!==t&&void 0!==t?t:{}))return e;f(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:_n,persistence:[jt,mt,wt]}),s=(0,i.XA)("authTokenSyncURL");if(s&&"boolean"===typeof isSecureContext&&isSecureContext){const e=new URL(s,location.origin);if(location.origin===e.origin){const t=Rn(e.toString());!function(e,t,n){(0,i.Ku)(e).beforeAuthStateChanged(t,n)}(n,t,(()=>t(n.currentUser))),function(e,t,n,r){(0,i.Ku)(e).onIdTokenChanged(t,n,r)}(n,(e=>t(e)))}}const o=(0,i.Tj)("auth");return o&&Re(n,`http://${o}`),n}var On;Se={loadJS:e=>
2new Promise(((t,n)=>{const r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=e=>{const t=p("internal-error");t.customData=e,n(t)},r.type="text/javascript",r.charset="UTF-8",function(){var e,t;return null!==(t=null===(e=document.getElementsByTagName("head"))||void 0===e?void 0:e[0])&&void 0!==t?t:document}().appendChild(r)})),gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="},On="Browser",(0,r.om)(new a.uA("auth",((e,t)=>{let{options:n}=t;const r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:o,authDomain:a}=r.options;y(o&&!o.includes(":"),"invalid-api-key",{appName:r.name});const l={apiKey:o,authDomain:a,clientPlatform:On,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ge(On)},c=new be(r,i,s,l);return function(e,t){const n=(null===t||void 0===t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(te);(null===t||void 0===t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null===t||void 0===t?void 0:t.popupRedirectResolver)}(c,n),c}),"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback(((e,t,n)=>{e.getProvider("auth-internal").initialize()}))),(0,r.om)(new a.uA("auth-internal",(e=>(e=>new In(e))(we(e.getProvider("auth").getImmediate()))),"PRIVATE").setInstantiationMode("EXPLICIT")),(0,r.KO)(Cn,An,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}(On)),(0,r.KO)(Cn,An,"esm2017")},5472:(e,t,n)=>{"use strict";n.d(t,{Timestamp:()=>ne,addDoc:()=>Nc,arrayUnion:()=>$c,collection:()=>ol,U9:()=>bc,deleteDoc:()=>Pc,CL:()=>zc,disableNetwork:()=>vl,doc:()=>al,enableNetwork:()=>gl,O_:()=>jc,getDoc:()=>Tc,getDocs:()=>Cc,aU:()=>fl,AB:()=>lc,onSnapshot:()=>Rc,orderBy:()=>oc,query:()=>tc,c4:()=>Vc,serverTimestamp:()=>Bc,setDoc:()=>Ac,HM:()=>uc,cz:()=>yc,updateDoc:()=>Ic,where:()=>rc});var r,i,s=n(7150),o=n(8812),a=n(443),l=n(1529),c="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{},u={};(function(){var e;function t(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}function n(e,t,n){n||(n=0);var r=Array(16);if("string"===typeof t)for(var i=0;16>i;++i)r[i]=t.charCodeAt(n++)|t.charCodeAt(n++)<<8|t.charCodeAt(n++)<<16|t.charCodeAt(n++)<<24;else for(i=0;16>i;++i)r[i]=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;t=e.g[0],n=e.g[1],i=e.g[2];var s=e.g[3],o=t+(s^n&(i^s))+r[0]+3614090360&4294967295;o=(n=(i=(s=(t=(n=(i=(s=(t=(n=(i=(s=(t=(n=(i=(s=(t=(n=(i=(s=(t=(n=(i=(s=(t=(n=(i=(s=(t=(n=(i=(s=(t=(n=(i=(s=(t=(n=(i=(s=(t=(n=(i=(s=(t=(n=(i=(s=(t=(n=(i=(s=(t=(n=(i=(s=(t=(n=(i=(s=(t=n+(o<<7&4294967295|o>>>25))+((o=s+(i^t&(n^i))+r[1]+3905402710&4294967295)<<12&4294967295|o>>>20))+((o=i+(n^s&(t^n))+r[2]+606105819&4294967295)<<17&4294967295|o>>>15))+((o=n+(t^i&(s^t))+r[3]+3250441966&4294967295)<<22&4294967295|o>>>10))+((o=t+(s^n&(i^s))+r[4]+4118548399&4294967295)<<7&4294967295|o>>>25))+((o=s+(i^t&(n^i))+r[5]+1200080426&4294967295)<<12&4294967295|o>>>20))+((o=i+(n^s&(t^n))+r[6]+2821735955&4294967295)<<17&4294967295|o>>>15))+((o=n+(t^i&(s^t))+r[7]+4249261313&4294967295)<<22&4294967295|o>>>10))+((o=t+(s^n&(i^s))+r[8]+1770035416&4294967295)<<7&4294967295|o>>>25))+((o=s+(i^t&(n^i))+r[9]+2336552879&4294967295)<<12&4294967295|o>>>20))+((o=i+(n^s&(t^n))+r[10]+4294925233&4294967295)<<17&4294967295|o>>>15))+((o=n+(t^i&(s^t))+r[11]+2304563134&4294967295)<<22&4294967295|o>>>10))+((o=t+(s^n&(i^s))+r[12]+1804603682&4294967295)<<7&4294967295|o>>>25))+((o=s+(i^t&(n^i))+r[13]+4254626195&4294967295)<<12&4294967295|o>>>20))+((o=i+(n^s&(t^n))+r[14]+2792965006&4294967295)<<17&4294967295|o>>>15))+((o=n+(t^i&(s^t))+r[15]+1236535329&4294967295)<<22&4294967295|o>>>10))+((o=t+(i^s&(n^i))+r[1]+4129170786&4294967295)<<5&4294967295|o>>>27))+((o=s+(n^i&(t^n))+r[6]+3225465664&4294967295)<<9&4294967295|o>>>23))+((o=i+(t^n&(s^t))+r[11]+643717713&4294967295)<<14&4294967295|o>>>18))+((o=n+(s^t&(i^s))+r[0]+3921069994&4294967295)<<20&4294967295|o>>>
212))+((o=t+(i^s&(n^i))+r[5]+3593408605&4294967295)<<5&4294967295|o>>>27))+((o=s+(n^i&(t^n))+r[10]+38016083&4294967295)<<9&4294967295|o>>>23))+((o=i+(t^n&(s^t))+r[15]+3634488961&4294967295)<<14&4294967295|o>>>18))+((o=n+(s^t&(i^s))+r[4]+3889429448&4294967295)<<20&4294967295|o>>>12))+((o=t+(i^s&(n^i))+r[9]+568446438&4294967295)<<5&4294967295|o>>>27))+((o=s+(n^i&(t^n))+r[14]+3275163606&4294967295)<<9&4294967295|o>>>23))+((o=i+(t^n&(s^t))+r[3]+4107603335&4294967295)<<14&4294967295|o>>>18))+((o=n+(s^t&(i^s))+r[8]+1163531501&4294967295)<<20&4294967295|o>>>12))+((o=t+(i^s&(n^i))+r[13]+2850285829&4294967295)<<5&4294967295|o>>>27))+((o=s+(n^i&(t^n))+r[2]+4243563512&4294967295)<<9&4294967295|o>>>23))+((o=i+(t^n&(s^t))+r[7]+1735328473&4294967295)<<14&4294967295|o>>>18))+((o=n+(s^t&(i^s))+r[12]+2368359562&4294967295)<<20&4294967295|o>>>12))+((o=t+(n^i^s)+r[5]+4294588738&4294967295)<<4&4294967295|o>>>28))+((o=s+(t^n^i)+r[8]+2272392833&4294967295)<<11&4294967295|o>>>21))+((o=i+(s^t^n)+r[11]+1839030562&4294967295)<<16&4294967295|o>>>16))+((o=n+(i^s^t)+r[14]+4259657740&4294967295)<<23&4294967295|o>>>9))+((o=t+(n^i^s)+r[1]+2763975236&4294967295)<<4&4294967295|o>>>28))+((o=s+(t^n^i)+r[4]+1272893353&4294967295)<<11&4294967295|o>>>21))+((o=i+(s^t^n)+r[7]+4139469664&4294967295)<<16&4294967295|o>>>16))+((o=n+(i^s^t)+r[10]+3200236656&4294967295)<<23&4294967295|o>>>9))+((o=t+(n^i^s)+r[13]+681279174&4294967295)<<4&4294967295|o>>>28))+((o=s+(t^n^i)+r[0]+3936430074&4294967295)<<11&4294967295|o>>>21))+((o=i+(s^t^n)+r[3]+3572445317&4294967295)<<16&4294967295|o>>>16))+((o=n+(i^s^t)+r[6]+76029189&4294967295)<<23&4294967295|o>>>9))+((o=t+(n^i^s)+r[9]+3654602809&4294967295)<<4&4294967295|o>>>28))+((o=s+(t^n^i)+r[12]+3873151461&4294967295)<<11&4294967295|o>>>21))+((o=i+(s^t^n)+r[15]+530742520&4294967295)<<16&4294967295|o>>>16))+((o=n+(i^s^t)+r[2]+3299628645&4294967295)<<23&4294967295|o>>>9))+((o=t+(i^(n|~s))+r[0]+4096336452&4294967295)<<6&4294967295|o>>>26))+((o=s+(n^(t|~i))+r[7]+1126891415&4294967295)<<10&4294967295|o>>>22))+((o=i+(t^(s|~n))+r[14]+2878612391&4294967295)<<15&4294967295|o>>>17))+((o=n+(s^(i|~t))+r[5]+4237533241&4294967295)<<21&4294967295|o>>>11))+((o=t+(i^(n|~s))+r[12]+1700485571&4294967295)<<6&4294967295|o>>>26))+((o=s+(n^(t|~i))+r[3]+2399980690&4294967295)<<10&4294967295|o>>>22))+((o=i+(t^(s|~n))+r[10]+4293915773&4294967295)<<15&4294967295|o>>>17))+((o=n+(s^(i|~t))+r[1]+2240044497&4294967295)<<21&4294967295|o>>>11))+((o=t+(i^(n|~s))+r[8]+1873313359&4294967295)<<6&4294967295|o>>>26))+((o=s+(n^(t|~i))+r[15]+4264355552&4294967295)<<10&4294967295|o>>>22))+((o=i+(t^(s|~n))+r[6]+2734768916&4294967295)<<15&4294967295|o>>>17))+((o=n+(s^(i|~t))+r[13]+1309151649&4294967295)<<21&4294967295|o>>>11))+((s=(t=n+((o=t+(i^(n|~s))+r[4]+4149444226&4294967295)<<6&4294967295|o>>>26))+((o=s+(n^(t|~i))+r[11]+3174756917&4294967295)<<10&4294967295|o>>>22))^((i=s+((o=i+(t^(s|~n))+r[2]+718787259&4294967295)<<15&4294967295|o>>>17))|~t))+r[9]+3951481745&4294967295,e.g[0]=e.g[0]+t&4294967295,e.g[1]=e.g[1]+(i+(o<<21&4294967295|o>>>11))&4294967295,e.g[2]=e.g[2]+i&4294967295,e.g[3]=e.g[3]+s&4294967295}function s(e,t){this.h=t;for(var n=[],r=!0,i=e.length-1;0<=i;i--){var s=0|e[i];r&&s==t||(n[i]=s,r=!1)}this.g=n}!function(e,t){function n(){}n.prototype=t.prototype,e.D=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.C=function(e,n,r){for(var i=Array(arguments.length-2),s=2;s<arguments.length;s++)i[s-2]=arguments[s];return t.prototype[n].apply(e,i)}}(t,(function(){this.blockSize=-1})),t.prototype.s=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0},t.prototype.u=function(e,t){void 0===t&&(t=e.length);for(var r=t-this.blockSize,i=this.B,s=this.h,o=0;o<t;){if(0==s)for(;o<=r;)n(this,e,o),o+=this.blockSize;if("string"===typeof e){for(;o<t;)if(i[s++]=e.charCodeAt(o++),s==this.blockSize){n(this,i),s=0;break}}else for(;o<t;)if(i[s++]=e[o++],s==this.blockSize){n(this,i),s=0;break}}this.h=s,this.o+=t},t.prototype.v=function(){var e=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);e[0]=128;for(var t=1;t<e.length-8;++t)e[t]=0;var n=8*this.o;for(t=e.length-8;t<e.length;++t)e[t]=255&n,n/=256;for(this.u(e),e=Array(16),t=n=0;4>t;++t)for(var r=0;32>r;r+=8)e[n++]=this.g[t]>>>r&255;return e};var o={};function a(e){return-128<=e&&128>e?function(e,t){var n=o;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}(e,(function(e){return new s([0|e],0>e?-1:0)})):new s([0|e],0>e?-1:0)}function l(e){if(isNaN(e)||!isFinite(e))return c;if(0>e)return m(l(-e));for(var t=[],n=1,r=0;e>=n;r++)t[r]=e/n|0,n*=4294967296;return new s(t,0)}var c=a(0),h=a(1),d=a(16777216);function f(e){if(0!=e.h)return!1;for(var t=0;t<e.g.length;t++)if(0!=e.g[t])return!1;return!0}function p(e){return-1==e.h}function m(e){for(var t=e.g.length,n=[],r=0;r<t;r++)n[r]=~e.g[r];return new s(n,~e.h).add(h)}function g(e,t){return e.add(m(t))}function v(e,t){for(;(65535&e[t])!=e[t];)e[t+1]+=e[t]>>>16,e[t]&=65535,t++}function y(e,t){this.g=e,this.h=t}function b(e,t){if(f(t))throw Error("division by zero");if(f(e))return new y(c,c);if(p(e))return t=b(m(e),t),new y(m(t.g),m(t.h));if(p(t))return t=b(e,m(t)),new y(m(t.g),t.h);if(30<e.g.length){if(p(e)||p(t))throw Error("slowDivide_ only works with positive integers.");for(var n=h,r=t;0>=r.l(e);)n=w(n),r=w(r);var i=x(n,1),s=x(r,1);for(r=x(r,2),n=x(n,2);!f(r);){var o=s.add(r);0>=o.l(e)&&(i=i.add(n),s=o),r=x(r,1),n=x(n,1)}return t=g(e,i.j(t)),new y(i,t)}for(i=c;0<=e.l(t);){for(n=Math.max(1,Math.floor(e.m()/t.m())),r=48>=(r=Math.ceil(Math.log(n)/Math.LN2))?1:Math.pow(2,r-48),o=(s=l(n)).j(t);p(o)||0<o.l(e);)o=(s=l(n-=r)).j(t);f(s)&&(s=h),i=i.add(s),e=g(e,o)}return new y(i,e)}function w(e){for(var t=e.g.length+1,n=[],r=0;r<t;r++)n[r]=e.i(r)<<1|e.i(r-1)>>>31;return new s(n,e.h)}function x(e,t){var n=t>>5;t%=32;for(var r=e.g.length-n,i=[],o=0;o<r;o++)i[o]=0<t?e.i(o+n)>>>t|e.i(o+n+1)<<32-t:e.i(o+n);return new s(i,e.h)}(e=s.prototype).m=function(){if(p(this))return-m(this).m();for(var e=0,t=1,n=0;n<this.g.length;n++){var r=this.i(n);e+=(0<=r?r:4294967296+r)*t,t*=4294967296}return e},e.toString=function(e){if(2>(e=e||10)||36<e)throw Error("radix out of range: "+e);if(f(this))return"0";if(p(this))return"-"+m(this).toString(e);for(var t=l(Math.pow(e,6)),n=this,r="";;){var i=b(n,t).g,s=((0<(n=g(n,i.j(t))).g.length?n.g[0]:n.h)>>>0).toString(e);if(f(n=i))return s+r;for(;6>s.length;)s="0"+s;r=s+r}},e.i=function(e){return 0>e?0:e<this.g.length?this.g[e]:this.h},e.l=function(e){return p(e=g(this,e))?-1:f(e)?0:1}
2,e.abs=function(){return p(this)?m(this):this},e.add=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0,i=0;i<=t;i++){var o=r+(65535&this.i(i))+(65535&e.i(i)),a=(o>>>16)+(this.i(i)>>>16)+(e.i(i)>>>16);r=a>>>16,o&=65535,a&=65535,n[i]=a<<16|o}return new s(n,-2147483648&n[n.length-1]?-1:0)},e.j=function(e){if(f(this)||f(e))return c;if(p(this))return p(e)?m(this).j(m(e)):m(m(this).j(e));if(p(e))return m(this.j(m(e)));if(0>this.l(d)&&0>e.l(d))return l(this.m()*e.m());for(var t=this.g.length+e.g.length,n=[],r=0;r<2*t;r++)n[r]=0;for(r=0;r<this.g.length;r++)for(var i=0;i<e.g.length;i++){var o=this.i(r)>>>16,a=65535&this.i(r),u=e.i(i)>>>16,h=65535&e.i(i);n[2*r+2*i]+=a*h,v(n,2*r+2*i),n[2*r+2*i+1]+=o*h,v(n,2*r+2*i+1),n[2*r+2*i+1]+=a*u,v(n,2*r+2*i+1),n[2*r+2*i+2]+=o*u,v(n,2*r+2*i+2)}for(r=0;r<t;r++)n[r]=n[2*r+1]<<16|n[2*r];for(r=t;r<2*t;r++)n[r]=0;return new s(n,0)},e.A=function(e){return b(this,e).h},e.and=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.i(r)&e.i(r);return new s(n,this.h&e.h)},e.or=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.i(r)|e.i(r);return new s(n,this.h|e.h)},e.xor=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.i(r)^e.i(r);return new s(n,this.h^e.h)},t.prototype.digest=t.prototype.v,t.prototype.reset=t.prototype.s,t.prototype.update=t.prototype.u,i=u.Md5=t,s.prototype.add=s.prototype.add,s.prototype.multiply=s.prototype.j,s.prototype.modulo=s.prototype.A,s.prototype.compare=s.prototype.l,s.prototype.toNumber=s.prototype.m,s.prototype.toString=s.prototype.toString,s.prototype.getBits=s.prototype.i,s.fromNumber=l,s.fromString=function e(t,n){if(0==t.length)throw Error("number format error: empty string");if(2>(n=n||10)||36<n)throw Error("radix out of range: "+n);if("-"==t.charAt(0))return m(e(t.substring(1),n));if(0<=t.indexOf("-"))throw Error('number format error: interior "-" character');for(var r=l(Math.pow(n,8)),i=c,s=0;s<t.length;s+=8){var o=Math.min(8,t.length-s),a=parseInt(t.substring(s,s+o),n);8>o?(o=l(Math.pow(n,o)),i=i.j(o).add(l(a))):i=(i=i.j(r)).add(l(a))}return i},r=u.Integer=s}).apply("undefined"!==typeof c?c:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{});var h,d,f,p,m,g,v,y,b="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{},w={};(function(){var e,t="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};var n=function(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof b&&b];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}(this);!function(e,r){if(r)e:{var i=n;e=e.split(".");for(var s=0;s<e.length-1;s++){var o=e[s];if(!(o in i))break e;i=i[o]}(r=r(s=i[e=e[e.length-1]]))!=s&&null!=r&&t(i,e,{configurable:!0,writable:!0,value:r})}}("Array.prototype.values",(function(e){return e||function(){return function(e,t){e instanceof String&&(e+="");var n=0,r=!1,i={next:function(){if(!r&&n<e.length){var i=n++;return{value:t(i,e[i]),done:!1}}return r=!0,{done:!0,value:void 0}}};return i[Symbol.iterator]=function(){return i},i}(this,(function(e,t){return t}))}}));var r=r||{},i=this||self;function s(e){var t=typeof e;return"array"==(t="object"!=t?t:e?Array.isArray(e)?"array":t:"null")||"object"==t&&"number"==typeof e.length}function o(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function a(e,t,n){return e.call.apply(e.bind,arguments)}function l(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function c(e,t,n){return(c=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?a:l).apply(null,arguments)}
2function u(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function x(e,t){function n(){}n.prototype=t.prototype,e.aa=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Qb=function(e,n,r){for(var i=Array(arguments.length-2),s=2;s<arguments.length;s++)i[s-2]=arguments[s];return t.prototype[n].apply(e,i)}}function S(e){const t=e.length;if(0<t){const n=Array(t);for(let r=0;r<t;r++)n[r]=e[r];return n}return[]}function E(e,t){for(let n=1;n<arguments.length;n++){const t=arguments[n];if(s(t)){const n=e.length||0,r=t.length||0;e.length=n+r;for(let i=0;i<r;i++)e[n+i]=t[i]}else e.push(t)}}function k(e){return/^[\s\xa0]*$/.test(e)}function T(){var e=i.navigator;return e&&(e=e.userAgent)?e:""}function _(e){return _[" "](e),e}_[" "]=function(){};var C=-1!=T().indexOf("Gecko")&&!(-1!=T().toLowerCase().indexOf("webkit")&&-1==T().indexOf("Edge"))&&!(-1!=T().indexOf("Trident")||-1!=T().indexOf("MSIE"))&&-1==T().indexOf("Edge");function A(e,t,n){for(const r in e)t.call(n,e[r],r,e)}function I(e){const t={};for(const n in e)t[n]=e[n];return t}const P="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function N(e,t){let n,r;for(let i=1;i<arguments.length;i++){for(n in r=arguments[i],r)e[n]=r[n];for(let t=0;t<P.length;t++)n=P[t],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function R(e){var t=1;e=e.split(":");const n=[];for(;0<t&&e.length;)n.push(e.shift()),t--;return e.length&&n.push(e.join(":")),n}function D(e){i.setTimeout((()=>{throw e}),0)}function O(){var e=U;let t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var j=new class{constructor(e,t){this.i=e,this.j=t,this.h=0,this.g=null}get(){let e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}((()=>new L),(e=>e.reset()));class L{constructor(){this.next=this.g=this.h=null}set(e,t){this.h=e,this.g=t,this.next=null}reset(){this.next=this.g=this.h=null}}let M,F=!1,U=new class{constructor(){this.h=this.g=null}add(e,t){const n=j.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}},V=()=>{const e=i.Promise.resolve(void 0);M=()=>{e.then(z)}};var z=()=>{for(var e;e=O();){try{e.h.call(e.g)}catch(n){D(n)}var t=j;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}F=!1};function B(){this.s=this.s,this.C=this.C}function $(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}B.prototype.s=!1,B.prototype.ma=function(){this.s||(this.s=!0,this.N())},B.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()},$.prototype.h=function(){this.defaultPrevented=!0};var q=function(){if(!i.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{const e=()=>{};i.addEventListener("test",e,t),i.removeEventListener("test",e,t)}catch(n){}return e}();function H(e,t){if($.call(this,e?e.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if(C){e:{try{_(t.nodeName);var i=!0;break e}catch(s){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"===typeof e.pointerType?e.pointerType:W[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&H.aa.h.call(this)}}x(H,$);var W={2:"touch",3:"pen",4:"mouse"};H.prototype.h=function(){H.aa.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var G="closure_listenable_"+(1e6*Math.random()|0),K=0;function Q(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.ha=i,this.key=++K,this.da=this.fa=!1}function Y(e){e.da=!0,e.listener=null,e.proxy=null,e.src=null,e.ha=null}function X(e){this.src=e,this.g={},this.h=0}function J(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],s=Array.prototype.indexOf.call(i,t,void 0);(r=0<=s)&&Array.prototype.splice.call(i,s,1),r&&(Y(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function Z(e,t,n,r){for(var i=0;i<e.length;++i){var s=e[i];if(!s.da&&s.listener==t&&s.capture==!!n&&s.ha==r)return i}return-1}X.prototype.add=function(e,t,n,r,i){var s=e.toString();(e=this.g[s])||(e=this.g[s]=[],this.h++);var o=Z(e,t,r,i);return-1<o?(t=e[o],n||(t.fa=!1)):((t=new Q(t,this.src,s,!!r,i)).fa=n,e.push(t)),t};var ee="closure_lm_"+(1e6*Math.random()|0),te={};function ne(e,t,n,r,i){if(r&&r.once)return ie(e,t,n,r,i);if(Array.isArray(t)){for(var s=0;s<t.length;s++)ne(e,t[s],n,r,i);return null}return n=he(n),e&&e[G]?e.K(t,n,o(r)?!!r.capture:!!r,i):re(e,t,n,!1,r,i)}function re(e,t,n,r,i,s){if(!t)throw Error("Invalid event type");var a=o(i)?!!i.capture:!!i,l=ce(e);if(l||(e[ee]=l=new X(e)),(n=l.add(t,n,r,a,s)).proxy)return n;if(r=function(){function e(n){return t.call(e.src,e.listener,n)}const t=le;return e}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)q||(i=a),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(ae(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function ie(e,t,n,r,i){if(Array.isArray(t)){for(var s=0;s<t.length;s++)ie(e,t[s],n,r,i);return null}return n=he(n),e&&e[G]?e.L(t,n,o(r)?!!r.capture:!!r,i):re(e,t,n,!0,r,i)}function se(e,t,n,r,i){if(Array.isArray(t))for(var s=0;s<t.length;s++)se(e,t[s],n,r,i);else r=o(r)?!!r.capture:!!r,n=he(n),e&&e[G]?(e=e.i,(t=String(t).toString())in e.g&&(-1<(n=Z(s=e.g[t],n,r,i))&&(Y(s[n]),Array.prototype.splice.call(s,n,1),0==s.length&&(delete e.g[t],e.h--))
2)):e&&(e=ce(e))&&(t=e.g[t.toString()],e=-1,t&&(e=Z(t,n,r,i)),(n=-1<e?t[e]:null)&&oe(n))}function oe(e){if("number"!==typeof e&&e&&!e.da){var t=e.src;if(t&&t[G])J(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(ae(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=ce(t))?(J(n,e),0==n.h&&(n.src=null,t[ee]=null)):Y(e)}}}function ae(e){return e in te?te[e]:te[e]="on"+e}function le(e,t){if(e.da)e=!0;else{t=new H(t,this);var n=e.listener,r=e.ha||e.src;e.fa&&oe(e),e=n.call(r,t)}return e}function ce(e){return(e=e[ee])instanceof X?e:null}var ue="__closure_events_fn_"+(1e9*Math.random()>>>0);function he(e){return"function"===typeof e?e:(e[ue]||(e[ue]=function(t){return e.handleEvent(t)}),e[ue])}function de(){B.call(this),this.i=new X(this),this.M=this,this.F=null}function fe(e,t){var n,r=e.F;if(r)for(n=[];r;r=r.F)n.push(r);if(e=e.M,r=t.type||t,"string"===typeof t)t=new $(t,e);else if(t instanceof $)t.target=t.target||e;else{var i=t;N(t=new $(r,e),i)}if(i=!0,n)for(var s=n.length-1;0<=s;s--){var o=t.g=n[s];i=pe(o,r,!0,t)&&i}if(i=pe(o=t.g=e,r,!0,t)&&i,i=pe(o,r,!1,t)&&i,n)for(s=0;s<n.length;s++)i=pe(o=t.g=n[s],r,!1,t)&&i}function pe(e,t,n,r){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var i=!0,s=0;s<t.length;++s){var o=t[s];if(o&&!o.da&&o.capture==n){var a=o.listener,l=o.ha||o.src;o.fa&&J(e.i,o),i=!1!==a.call(l,r)&&i}}return i&&!r.defaultPrevented}function me(e,t,n){if("function"===typeof e)n&&(e=c(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=c(e.handleEvent,e)}return 2147483647<Number(t)?-1:i.setTimeout(e,t||0)}function ge(e){e.g=me((()=>{e.g=null,e.i&&(e.i=!1,ge(e))}),e.l);const t=e.h;e.h=null,e.m.apply(null,t)}x(de,B),de.prototype[G]=!0,de.prototype.removeEventListener=function(e,t,n,r){se(this,e,t,n,r)},de.prototype.N=function(){if(de.aa.N.call(this),this.i){var e,t=this.i;for(e in t.g){for(var n=t.g[e],r=0;r<n.length;r++)Y(n[r]);delete t.g[e],t.h--}}this.F=null},de.prototype.K=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},de.prototype.L=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};class ve extends B{constructor(e,t){super(),this.m=e,this.l=t,this.h=null,this.i=!1,this.g=null}j(e){this.h=arguments,this.g?this.i=!0:ge(this)}N(){super.N(),this.g&&(i.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function ye(e){B.call(this),this.h=e,this.g={}}x(ye,B);var be=[];function we(e){A(e.g,(function(e,t){this.g.hasOwnProperty(t)&&oe(e)}),e),e.g={}}ye.prototype.N=function(){ye.aa.N.call(this),we(this)},ye.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var xe=i.JSON.stringify,Se=i.JSON.parse,Ee=class{stringify(e){return i.JSON.stringify(e,void 0)}parse(e){return i.JSON.parse(e,void 0)}};function ke(){}function Te(e){return e.h||(e.h=e.i())}function _e(){}ke.prototype.h=null;var Ce={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function Ae(){$.call(this,"d")}function Ie(){$.call(this,"c")}x(Ae,$),x(Ie,$);var Pe={},Ne=null;function Re(){return Ne=Ne||new de}function De(e){$.call(this,Pe.La,e)}function Oe(e){const t=Re();fe(t,new De(t))}function je(e,t){$.call(this,Pe.STAT_EVENT,e),this.stat=t}function Le(e){const t=Re();fe(t,new je(t,e))}function Me(e,t){$.call(this,Pe.Ma,e),this.size=t}function Fe(e,t){if("function"!==typeof e)throw Error("Fn must not be null and must be a function");return i.setTimeout((function(){e()}),t)}function Ue(){this.g=!0}function Ve(e,t,n,r){e.info((function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.g)return t;if(!t)return null;try{var n=JSON.parse(t);if(n)for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var s=i[0];if("noop"!=s&&"stop"!=s&&"close"!=s)for(var o=1;o<i.length;o++)i[o]=""}}}return xe(n)}catch(a){return t}}(e,n)+(r?" "+r:"")}))}Pe.La="serverreachability",x(De,$),Pe.STAT_EVENT="statevent",x(je,$),Pe.Ma="timingevent",x(Me,$),Ue.prototype.xa=function(){this.g=!1},Ue.prototype.info=function(){};var ze,Be={NO_ERROR:0,gb:1,tb:2,sb:3,nb:4,rb:5,ub:6,Ia:7,TIMEOUT:8,xb:9},$e={lb:"complete",Hb:"success",Ja:"error",Ia:"abort",zb:"ready",Ab:"readystatechange",TIMEOUT:"timeout",vb:"incrementaldata",yb:"progress",ob:"downloadprogress",Pb:"uploadprogress"};function qe(){}function He(e,t,n,r){this.j=e,this.i=t,this.l=n,this.R=r||1,this.U=new ye(this),this.I=45e3,this.H=null,this.o=!1,this.m=this.A=this.v=this.L=this.F=this.S=this.B=null,this.D=[],this.g=null,this.C=0,this.s=this.u=null,this.X=-1,this.J=!1,this.O=0,this.M=null,this.W=this.K=this.T=this.P=!1,this.h=new We}function We(){this.i=null,this.g="",this.h=!1}x(qe,ke),qe.prototype.g=function(){return new XMLHttpRequest},qe.prototype.i=function(){return{}},ze=new qe;var Ge={},Ke={};function Qe(e,t,n){e.L=1,e.v=xt(gt(t)),e.m=n,e.P=!0,Ye(e,null)}function Ye(e,t){e.F=Date.now(),Ze(e),e.A=gt(e.v);var n=e.A,r=e.R;Array.isArray(r)||(r=[String(r)]),jt(n.i,"t",r),e.C=0,n=e.j.J,e.h=new We,e.g=En(e.j,n?t:null,!e.m),
20<e.O&&(e.M=new ve(c(e.Y,e,e.g),e.O)),t=e.U,n=e.g,r=e.ca;var i="readystatechange";Array.isArray(i)||(i&&(be[0]=i.toString()),i=be);for(var s=0;s<i.length;s++){var o=ne(n,i[s],r||t.handleEvent,!1,t.h||t);if(!o)break;t.g[o.key]=o}t=e.H?I(e.H):{},e.m?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ea(e.A,e.u,e.m,t)):(e.u="GET",e.g.ea(e.A,e.u,null,t)),Oe(),function(e,t,n,r,i,s){e.info((function(){if(e.g)if(s)for(var o="",a=s.split("&"),l=0;l<a.length;l++){var c=a[l].split("=");if(1<c.length){var u=c[0];c=c[1];var h=u.split("_");o=2<=h.length&&"type"==h[1]?o+(u+"=")+c+"&":o+(u+"=redacted&")}}else o=null;else o=s;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+o}))}(e.i,e.u,e.A,e.l,e.R,e.m)}function Xe(e){return!!e.g&&("GET"==e.u&&2!=e.L&&e.j.Ca)}function Je(e,t){var n=e.C,r=t.indexOf("\n",n);return-1==r?Ke:(n=Number(t.substring(n,r)),isNaN(n)?Ge:(r+=1)+n>t.length?Ke:(t=t.slice(r,r+n),e.C=r+n,t))}function Ze(e){e.S=Date.now()+e.I,et(e,e.I)}function et(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=Fe(c(e.ba,e),t)}function tt(e){e.B&&(i.clearTimeout(e.B),e.B=null)}function nt(e){0==e.j.G||e.J||yn(e.j,e)}function rt(e){tt(e);var t=e.M;t&&"function"==typeof t.ma&&t.ma(),e.M=null,we(e.U),e.g&&(t=e.g,e.g=null,t.abort(),t.ma())}function it(e,t){try{var n=e.j;if(0!=n.G&&(n.g==e||ct(n.h,e)))if(!e.K&&ct(n.h,e)&&3==n.G){try{var r=n.Da.g.parse(t)}catch(u){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){e:if(!n.u){if(n.g){if(!(n.g.F+3e3<e.F))break e;vn(n),an(n)}pn(n),Le(18)}}else n.za=i[1],0<n.za-n.T&&37500>i[2]&&n.F&&0==n.v&&!n.C&&(n.C=Fe(c(n.Za,n),6e3));if(1>=lt(n.h)&&n.ca){try{n.ca()}catch(u){}n.ca=void 0}}else wn(n,11)}else if((e.K||n.g==e)&&vn(n),!k(t))for(i=n.Da.g.parse(t),t=0;t<i.length;t++){let c=i[t];if(n.T=c[0],c=c[1],2==n.G)if("c"==c[0]){n.K=c[1],n.ia=c[2];const t=c[3];null!=t&&(n.la=t,n.j.info("VER="+n.la));const i=c[4];null!=i&&(n.Aa=i,n.j.info("SVER="+n.Aa));const u=c[5];null!=u&&"number"===typeof u&&0<u&&(r=1.5*u,n.L=r,n.j.info("backChannelRequestTimeoutMs_="+r)),r=n;const h=e.g;if(h){const e=h.g?h.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(e){var s=r.h;s.g||-1==e.indexOf("spdy")&&-1==e.indexOf("quic")&&-1==e.indexOf("h2")||(s.j=s.l,s.g=new Set,s.h&&(ut(s,s.h),s.h=null))}if(r.D){const e=h.g?h.g.getResponseHeader("X-HTTP-Session-Id"):null;e&&(r.ya=e,wt(r.I,r.D,e))}}n.G=3,n.l&&n.l.ua(),n.ba&&(n.R=Date.now()-e.F,n.j.info("Handshake RTT: "+n.R+"ms"));var o=e;if((r=n).qa=Sn(r,r.J?r.ia:null,r.W),o.K){ht(r.h,o);var a=o,l=r.L;l&&(a.I=l),a.B&&(tt(a),Ze(a)),r.g=o}else fn(r);0<n.i.length&&cn(n)}else"stop"!=c[0]&&"close"!=c[0]||wn(n,7);else 3==n.G&&("stop"==c[0]||"close"==c[0]?"stop"==c[0]?wn(n,7):on(n):"noop"!=c[0]&&n.l&&n.l.ta(c),n.v=0)}Oe()}catch(u){}}He.prototype.ca=function(e){e=e.target;const t=this.M;t&&3==tn(e)?t.j():this.Y(e)},He.prototype.Y=function(e){try{if(e==this.g)e:{const d=tn(this.g);var t=this.g.Ba();this.g.Z();if(!(3>d)&&(3!=d||this.g&&(this.h.h||this.g.oa()||nn(this.g)))){this.J||4!=d||7==t||Oe(),tt(this);var n=this.g.Z();this.X=n;t:if(Xe(this)){var r=nn(this.g);e="";var s=r.length,o=4==tn(this.g);if(!this.h.i){if("undefined"===typeof TextDecoder){rt(this),nt(this);var a="";break t}this.h.i=new i.TextDecoder}for(t=0;t<s;t++)this.h.h=!0,e+=this.h.i.decode(r[t],{stream:!(o&&t==s-1)});r.length=0,this.h.g+=e,this.C=0,a=this.h.g}else a=this.g.oa();if(this.o=200==n,function(e,t,n,r,i,s,o){e.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+s+" "+o}))}(this.i,this.u,this.A,this.l,this.R,d,n),this.o){if(this.T&&!this.K){t:{if(this.g){var l,c=this.g;if((l=c.g?c.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!k(l)){var u=l;break t}}u=null}if(!(n=u)){this.o=!1,this.s=3,Le(12),rt(this),nt(this);break e}Ve(this.i,this.l,n,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,it(this,n)}if(this.P){let e;for(n=!0;!this.J&&this.C<a.length;){if(e=Je(this,a),e==Ke){4==d&&(this.s=4,Le(14),n=!1),Ve(this.i,this.l,null,"[Incomplete Response]");break}if(e==Ge){this.s=4,Le(15),Ve(this.i,this.l,a,"[Invalid Chunk]"),n=!1;break}Ve(this.i,this.l,e,null),it(this,e)}if(Xe(this)&&0!=this.C&&(this.h.g=this.h.g.slice(this.C),this.C=0),4!=d||0!=a.length||this.h.h||(this.s=1,Le(16),n=!1),this.o=this.o&&n,n){if(0<a.length&&!this.W){this.W=!0;var h=this.j;h.g==this&&h.ba&&!h.M&&(h.j.info("Great, no buffering proxy detected. Bytes received: "+a.length),mn(h),h.M=!0,Le(11))}}else Ve(this.i,this.l,a,"[Invalid Chunked Response]"),rt(this),nt(this)}else Ve(this.i,this.l,a,null),it(this,a);4==d&&rt(this),this.o&&!this.J&&(4==d?yn(this.j,this):(this.o=!1,Ze(this)))}else(function(e){const t={};e=(e.g&&2<=tn(e)&&e.g.getAllResponseHeaders()||"").split("\r\n");for(let r=0;r<e.length;r++){if(k(e[r]))continue;var n=R(e[r]);const i=n[0];if("string"!==typeof(n=n[1]))continue;n=n.trim();const s=t[i]||[];t[i]=s,s.push(n)}!function(e,t){for(const n in e)t.call(void 0,e[n],n,e)}(t,(function(e){return e.join(", ")}))})(this.g),400==n&&0<a.indexOf("Unknown SID")?(this.s=3,Le(12)):(this.s=0,Le(13)),rt(this),nt(this)}}}catch(d){}},He.prototype.cancel=function(){this.J=!0,rt(this)},He.prototype.ba=function(){this.B=null;const e=Date.now();0<=e-this.S?(function(e,t){e.info((function(){return"TIMEOUT: "+t}))}(this.i,this.A),2!=this.L&&(Oe(),Le(17)),rt(this),this.s=2,nt(this)):et(this,this.S-e)};var st=class{constructor(e,t){this.g=e,this.map=t}};function ot(e){this.l=e||10,i.PerformanceNavigationTiming?e=0<(e=i.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(i.chrome&&i.chrome.loadTimes&&i.chrome.loadTimes()&&i.chrome.loadTimes().wasFetchedViaSpdy),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}function at(e){return!!e.h||!!e.g&&e.g.size>=e.j}function lt(e){return e.h?1:e.g?e.g.size:0}function ct(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function ut(e,t){e.g?e.g.add(t):e.h=t}function ht(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function dt(e){if(null!=e.h)return e.i.concat(e.h.D);if(null!=e.g&&0!==e.g.size){let t=e.i;for(const n of e.g.values())t=t.concat(n.D);return t}return S(e.i)}function ft(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(s(e)||"string"===typeof e)Array.prototype.forEach.call(e,t,void 0);else for(var n=function(e){if(e.na&&"function"==typeof e.na)return e.na();if(!e.V||"function"!=typeof e.V){if("undefined"!==typeof Map&&e instanceof Map)return Array.from(e.keys());if(!("undefined"!==typeof Set&&e instanceof Set)){if(s(e)||"string"===typeof e){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}t=[],n=0;for(const r in e)t[n++]=r;return t}}}(e),r=function(e){if(e.V&&"function"==typeof e.V)return e.V();if("undefined"!==typeof Map&&e instanceof Map||"undefined"!==typeof Set&&e instanceof Set)return Array.from(e.values());if("string"===typeof e)return e.split("");
2if(s(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}(e),i=r.length,o=0;o<i;o++)t.call(void 0,r[o],n&&n[o],e)}ot.prototype.cancel=function(){if(this.i=dt(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(const e of this.g.values())e.cancel();this.g.clear()}};var pt=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function mt(e){if(this.g=this.o=this.j="",this.s=null,this.m=this.l="",this.h=!1,e instanceof mt){this.h=e.h,vt(this,e.j),this.o=e.o,this.g=e.g,yt(this,e.s),this.l=e.l;var t=e.i,n=new Nt;n.i=t.i,t.g&&(n.g=new Map(t.g),n.h=t.h),bt(this,n),this.m=e.m}else e&&(t=String(e).match(pt))?(this.h=!1,vt(this,t[1]||"",!0),this.o=St(t[2]||""),this.g=St(t[3]||"",!0),yt(this,t[4]),this.l=St(t[5]||"",!0),bt(this,t[6]||"",!0),this.m=St(t[7]||"")):(this.h=!1,this.i=new Nt(null,this.h))}function gt(e){return new mt(e)}function vt(e,t,n){e.j=n?St(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function yt(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.s=t}else e.s=null}function bt(e,t,n){t instanceof Nt?(e.i=t,function(e,t){t&&!e.j&&(Rt(e),e.i=null,e.g.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(Dt(this,t),jt(this,n,e))}),e)),e.j=t}(e.i,e.h)):(n||(t=Et(t,It)),e.i=new Nt(t,e.h))}function wt(e,t,n){e.i.set(t,n)}function xt(e){return wt(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function St(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Et(e,t,n){return"string"===typeof e?(e=encodeURI(e).replace(t,kt),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function kt(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}mt.prototype.toString=function(){var e=[],t=this.j;t&&e.push(Et(t,_t,!0),":");var n=this.g;return(n||"file"==t)&&(e.push("//"),(t=this.o)&&e.push(Et(t,_t,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.s)&&e.push(":",String(n))),(n=this.l)&&(this.g&&"/"!=n.charAt(0)&&e.push("/"),e.push(Et(n,"/"==n.charAt(0)?At:Ct,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.m)&&e.push("#",Et(n,Pt)),e.join("")};var Tt,_t=/[#\/\?@]/g,Ct=/[#\?:]/g,At=/[#\?]/g,It=/[#\?@]/g,Pt=/#/g;function Nt(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function Rt(e){e.g||(e.g=new Map,e.h=0,e.i&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var s=e[n].substring(0,r);i=e[n].substring(r+1)}else s=e[n];t(s,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.i,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function Dt(e,t){Rt(e),t=Lt(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function Ot(e,t){return Rt(e),t=Lt(e,t),e.g.has(t)}function jt(e,t,n){Dt(e,t),0<n.length&&(e.i=null,e.g.set(Lt(e,t),S(n)),e.h+=n.length)}function Lt(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}function Mt(e,t,n,r,i){try{i&&(i.onload=null,i.onerror=null,i.onabort=null,i.ontimeout=null),r(n)}catch(s){}}function Ft(){this.g=new Ee}function Ut(e,t,n){const r=n||"";try{ft(e,(function(e,n){let i=e;o(e)&&(i=xe(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function Vt(e){this.l=e.Ub||null,this.j=e.eb||!1}function zt(e,t){de.call(this),this.D=e,this.o=t,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.u=new Headers,this.h=null,this.B="GET",this.A="",this.g=!1,this.v=this.j=this.l=null}function Bt(e){e.j.read().then(e.Pa.bind(e)).catch(e.ga.bind(e))}function $t(e){e.readyState=4,e.l=null,e.j=null,e.v=null,qt(e)}function qt(e){e.onreadystatechange&&e.onreadystatechange.call(e)}function Ht(e){let t="";return A(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}function Wt(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=Ht(n),"string"===typeof e?null!=n&&encodeURIComponent(String(n)):wt(e,t,n))}function Gt(e){de.call(this),this.headers=new Map,this.o=e||null,this.h=!1,this.v=this.g=null,this.D="",this.m=0,this.l="",this.j=this.B=this.u=this.A=!1,this.I=null,this.H="",this.J=!1}(e=Nt.prototype).add=function(e,t){Rt(this),this.i=null,e=Lt(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},e.forEach=function(e,t){Rt(this),this.g.forEach((function(n,r){n.forEac
2h((function(n){e.call(t,n,r,this)}),this)}),this)},e.na=function(){Rt(this);const e=Array.from(this.g.values()),t=Array.from(this.g.keys()),n=[];for(let r=0;r<t.length;r++){const i=e[r];for(let e=0;e<i.length;e++)n.push(t[r])}return n},e.V=function(e){Rt(this);let t=[];if("string"===typeof e)Ot(this,e)&&(t=t.concat(this.g.get(Lt(this,e))));else{e=Array.from(this.g.values());for(let n=0;n<e.length;n++)t=t.concat(e[n])}return t},e.set=function(e,t){return Rt(this),this.i=null,Ot(this,e=Lt(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},e.get=function(e,t){return e&&0<(e=this.V(e)).length?String(e[0]):t},e.toString=function(){if(this.i)return this.i;if(!this.g)return"";const e=[],t=Array.from(this.g.keys());for(var n=0;n<t.length;n++){var r=t[n];const s=encodeURIComponent(String(r)),o=this.V(r);for(r=0;r<o.length;r++){var i=s;""!==o[r]&&(i+="="+encodeURIComponent(String(o[r]))),e.push(i)}}return this.i=e.join("&")},x(Vt,ke),Vt.prototype.g=function(){return new zt(this.l,this.j)},Vt.prototype.i=(Tt={},function(){return Tt}),x(zt,de),(e=zt.prototype).open=function(e,t){if(0!=this.readyState)throw this.abort(),Error("Error reopening a connection");this.B=e,this.A=t,this.readyState=1,qt(this)},e.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;const t={headers:this.u,method:this.B,credentials:this.m,cache:void 0};e&&(t.body=e),(this.D||i).fetch(new Request(this.A,t)).then(this.Sa.bind(this),this.ga.bind(this))},e.abort=function(){this.response=this.responseText="",this.u=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch((()=>{})),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,$t(this)),this.readyState=0},e.Sa=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,qt(this)),this.g&&(this.readyState=3,qt(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if("undefined"!==typeof i.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;Bt(this)}else e.text().then(this.Ra.bind(this),this.ga.bind(this))},e.Pa=function(e){if(this.g){if(this.o&&e.value)this.response.push(e.value);else if(!this.o){var t=e.value?e.value:new Uint8Array(0);(t=this.v.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?$t(this):qt(this),3==this.readyState&&Bt(this)}},e.Ra=function(e){this.g&&(this.response=this.responseText=e,$t(this))},e.Qa=function(e){this.g&&(this.response=e,$t(this))},e.ga=function(){this.g&&$t(this)},e.setRequestHeader=function(e,t){this.u.append(e,t)},e.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},e.getAllResponseHeaders=function(){if(!this.h)return"";const e=[],t=this.h.entries();for(var n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(zt.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}}),x(Gt,de);var Kt=/^https?$/i,Qt=["POST","PUT"];function Yt(e,t){e.h=!1,e.g&&(e.j=!0,e.g.abort(),e.j=!1),e.l=t,e.m=5,Xt(e),Zt(e)}function Xt(e){e.A||(e.A=!0,fe(e,"complete"),fe(e,"error"))}function Jt(e){if(e.h&&"undefined"!=typeof r&&(!e.v[1]||4!=tn(e)||2!=e.Z()))if(e.u&&4==tn(e))me(e.Ea,0,e);else if(fe(e,"readystatechange"),4==tn(e)){e.h=!1;try{const r=e.Z();e:switch(r){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t=!0;break e;default:t=!1}var n;if(!(n=t)){var s;if(s=0===r){var o=String(e.D).match(pt)[1]||null;!o&&i.self&&i.self.location&&(o=i.self.location.protocol.slice(0,-1)),s=!Kt.test(o?o.toLowerCase():"")}n=s}if(n)fe(e,"complete"),fe(e,"success");else{e.m=6;try{var a=2<tn(e)?e.g.statusText:""}catch(l){a=""}e.l=a+" ["+e.Z()+"]",Xt(e)}}finally{Zt(e)}}}function Zt(e,t){if(e.g){en(e);const r=e.g,i=e.v[0]?()=>{}:null;e.g=null,e.v=null,t||fe(e,"ready");try{r.onreadystatechange=i}catch(n){}}}function en(e){e.I&&(i.clearTimeout(e.I),e.I=null)}function tn(e){return e.g?e.g.readyState:0}function nn(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.H){case"":case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(t){return null}}
2function rn(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function sn(e){this.Aa=0,this.i=[],this.j=new Ue,this.ia=this.qa=this.I=this.W=this.g=this.ya=this.D=this.H=this.m=this.S=this.o=null,this.Ya=this.U=0,this.Va=rn("failFast",!1,e),this.F=this.C=this.u=this.s=this.l=null,this.X=!0,this.za=this.T=-1,this.Y=this.v=this.B=0,this.Ta=rn("baseRetryDelayMs",5e3,e),this.cb=rn("retryDelaySeedMs",1e4,e),this.Wa=rn("forwardChannelMaxRetries",2,e),this.wa=rn("forwardChannelRequestTimeoutMs",2e4,e),this.pa=e&&e.xmlHttpFactory||void 0,this.Xa=e&&e.Tb||void 0,this.Ca=e&&e.useFetchStreams||!1,this.L=void 0,this.J=e&&e.supportsCrossDomainXhr||!1,this.K="",this.h=new ot(e&&e.concurrentRequestLimit),this.Da=new Ft,this.P=e&&e.fastHandshake||!1,this.O=e&&e.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=e&&e.Rb||!1,e&&e.xa&&this.j.xa(),e&&e.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&e&&e.detectBufferingProxy||!1,this.ja=void 0,e&&e.longPollingTimeout&&0<e.longPollingTimeout&&(this.ja=e.longPollingTimeout),this.ca=void 0,this.R=0,this.M=!1,this.ka=this.A=null}function on(e){if(ln(e),3==e.G){var t=e.U++,n=gt(e.I);if(wt(n,"SID",e.K),wt(n,"RID",t),wt(n,"TYPE","terminate"),hn(e,n),(t=new He(e,e.j,t)).L=2,t.v=xt(gt(n)),n=!1,i.navigator&&i.navigator.sendBeacon)try{n=i.navigator.sendBeacon(t.v.toString(),"")}catch(r){}!n&&i.Image&&((new Image).src=t.v,n=!0),n||(t.g=En(t.j,null),t.g.ea(t.v)),t.F=Date.now(),Ze(t)}xn(e)}function an(e){e.g&&(mn(e),e.g.cancel(),e.g=null)}function ln(e){an(e),e.u&&(i.clearTimeout(e.u),e.u=null),vn(e),e.h.cancel(),e.s&&("number"===typeof e.s&&i.clearTimeout(e.s),e.s=null)}function cn(e){if(!at(e.h)&&!e.s){e.s=!0;var t=e.Ga;M||V(),F||(M(),F=!0),U.add(t,e),e.B=0}}function un(e,t){var n;n=t?t.l:e.U++;const r=gt(e.I);wt(r,"SID",e.K),wt(r,"RID",n),wt(r,"AID",e.T),hn(e,r),e.m&&e.o&&Wt(r,e.m,e.o),n=new He(e,e.j,n,e.B+1),null===e.m&&(n.H=e.o),t&&(e.i=t.D.concat(e.i)),t=dn(e,n,1e3),n.I=Math.round(.5*e.wa)+Math.round(.5*e.wa*Math.random()),ut(e.h,n),Qe(n,r,t)}function hn(e,t){e.H&&A(e.H,(function(e,n){wt(t,n,e)})),e.l&&ft({},(function(e,n){wt(t,n,e)}))}function dn(e,t,n){n=Math.min(e.i.length,n);var r=e.l?c(e.l.Na,e.l,e):null;e:{var i=e.i;let t=-1;for(;;){const e=["count="+n];-1==t?0<n?(t=i[0].g,e.push("ofs="+t)):t=0:e.push("ofs="+t);let o=!0;for(let a=0;a<n;a++){let n=i[a].g;const l=i[a].map;if(n-=t,0>n)t=Math.max(0,i[a].g-100),o=!1;else try{Ut(l,e,"req"+n+"_")}catch(s){r&&r(l)}}if(o){r=e.join("&");break e}}}return e=e.i.splice(0,n),t.D=e,r}function fn(e){if(!e.g&&!e.u){e.Y=1;var t=e.Fa;M||V(),F||(M(),F=!0),U.add(t,e),e.v=0}}function pn(e){return!(e.g||e.u||3<=e.v)&&(e.Y++,e.u=Fe(c(e.Fa,e),bn(e,e.v)),e.v++,!0)}function mn(e){null!=e.A&&(i.clearTimeout(e.A),e.A=null)}function gn(e){e.g=new He(e,e.j,"rpc",e.Y),null===e.m&&(e.g.H=e.o),e.g.O=0;var t=gt(e.qa);wt(t,"RID","rpc"),wt(t,"SID",e.K),wt(t,"AID",e.T),wt(t,"CI",e.F?"0":"1"),!e.F&&e.ja&&wt(t,"TO",e.ja),wt(t,"TYPE","xmlhttp"),hn(e,t),e.m&&e.o&&Wt(t,e.m,e.o),e.L&&(e.g.I=e.L);var n=e.g;e=e.ia,n.L=1,n.v=xt(gt(t)),n.m=null,n.P=!0,Ye(n,e)}function vn(e){null!=e.C&&(i.clearTimeout(e.C),e.C=null)}function yn(e,t){var n=null;if(e.g==t){vn(e),mn(e),e.g=null;var r=2}else{if(!ct(e.h,t))return;n=t.D,ht(e.h,t),r=1}if(0!=e.G)if(t.o)if(1==r){n=t.m?t.m.length:0,t=Date.now()-t.F;var i=e.B;fe(r=Re(),new Me(r,n)),cn(e)}else fn(e);else if(3==(i=t.s)||0==i&&0<t.X||!(1==r&&function(e,t){return!(lt(e.h)>=e.h.j-(e.s?1:0))&&(e.s?(e.i=t.D.concat(e.i),!0):!(1==e.G||2==e.G||e.B>=(e.Va?0:e.Wa))&&(e.s=Fe(c(e.Ga,e,t),bn(e,e.B)),e.B++,!0))}(e,t)||2==r&&pn(e)))switch(n&&0<n.length&&(t=e.h,t.i=t.i.concat(n)),i){case 1:wn(e,5);break;case 4:wn(e,10);break;case 3:wn(e,6);break;default:wn(e,2)}}function bn(e,t){let n=e.Ta+Math.floor(Math.random()*e.cb);return e.isActive()||(n*=2),n*t}function wn(e,t){if(e.j.info("Error code "+t),2==t){var n=c(e.fb,e),r=e.Xa;const t=!r;r=new mt(r||"//www.google.com/images/cleardot.gif"),i.location&&"http"==i.location.protocol||vt(r,"https"),xt(r),t?function(e,t){const n=new Ue;if(i.Image){const r=new Image;r.onload=u(Mt,n,"TestLoadImage: loaded",!0,t,r),r.onerror=u(Mt,n,"TestLoadImage: error",!1,t,r),r.onabort=u(Mt,n,"TestLoadImage: abort",!1,t,r),r.ontimeout=u(Mt,n,"TestLoadImage: timeout",!1,t,r),i.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}(r.toString(),n):function(e,t){new Ue;const n=new AbortController,r=setTimeout((()=>{n.abort(),Mt(0,0,!1,t)}),1e4);fetch(e,{signal:n.signal}).then((e=>{clearTimeout(r),e.ok?Mt(0,0,!0,t):Mt(0,0,!1,t)})).catch((()=>{clearTimeout(r),Mt(0,0,!1,t)}))}(r.toString(),n)}else Le(2);e.G=0,e.l&&e.l.sa(t),xn(e),ln(e)}function xn(e){if(e.G=0,e.ka=[],e.l){const t=dt(e.h);
20==t.length&&0==e.i.length||(E(e.ka,t),E(e.ka,e.i),e.h.i.length=0,S(e.i),e.i.length=0),e.l.ra()}}function Sn(e,t,n){var r=n instanceof mt?gt(n):new mt(n);if(""!=r.g)t&&(r.g=t+"."+r.g),yt(r,r.s);else{var s=i.location;r=s.protocol,t=t?t+"."+s.hostname:s.hostname,s=+s.port;var o=new mt(null);r&&vt(o,r),t&&(o.g=t),s&&yt(o,s),n&&(o.l=n),r=o}return n=e.D,t=e.ya,n&&t&&wt(r,n,t),wt(r,"VER",e.la),hn(e,r),r}function En(e,t,n){if(t&&!e.J)throw Error("Can't create secondary domain capable XhrIo object.");return(t=e.Ca&&!e.pa?new Gt(new Vt({eb:n})):new Gt(e.pa)).Ha(e.J),t}function kn(){}function Tn(){}function _n(e,t){de.call(this),this.g=new sn(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.o=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.va&&(e?e["X-WebChannel-Client-Profile"]=t.va:e={"X-WebChannel-Client-Profile":t.va}),this.g.S=e,(e=t&&t.Sb)&&!k(e)&&(this.g.m=e),this.v=t&&t.supportsCrossDomainXhr||!1,this.u=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!k(t)&&(this.g.D=t,null!==(e=this.h)&&t in e&&(t in(e=this.h)&&delete e[t])),this.j=new In(this)}function Cn(e){Ae.call(this),e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var t=e.__sm__;if(t){e:{for(const n in t){e=n;break e}e=void 0}(this.i=e)&&(e=this.i,t=null!==t&&e in t?t[e]:void 0),this.data=t}else this.data=e}function An(){Ie.call(this),this.status=1}function In(e){this.g=e}(e=Gt.prototype).Ha=function(e){this.J=e},e.ea=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+e);t=t?t.toUpperCase():"GET",this.D=e,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():ze.g(),this.v=this.o?Te(this.o):Te(ze),this.g.onreadystatechange=c(this.Ea,this);try{this.B=!0,this.g.open(t,String(e),!0),this.B=!1}catch(o){return void Yt(this,o)}if(e=n||"",n=new Map(this.headers),r)if(Object.getPrototypeOf(r)===Object.prototype)for(var s in r)n.set(s,r[s]);else{if("function"!==typeof r.keys||"function"!==typeof r.get)throw Error("Unknown input type for opt_headers: "+String(r));for(const e of r.keys())n.set(e,r.get(e))}r=Array.from(n.keys()).find((e=>"content-type"==e.toLowerCase())),s=i.FormData&&e instanceof i.FormData,!(0<=Array.prototype.indexOf.call(Qt,t,void 0))||r||s||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[i,a]of n)this.g.setRequestHeader(i,a);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{en(this),this.u=!0,this.g.send(e),this.u=!1}catch(o){Yt(this,o)}},e.abort=function(e){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=e||7,fe(this,"complete"),fe(this,"abort"),Zt(this))},e.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),Zt(this,!0)),Gt.aa.N.call(this)},e.Ea=function(){this.s||(this.B||this.u||this.j?Jt(this):this.bb())},e.bb=function(){Jt(this)},e.isActive=function(){return!!this.g},e.Z=function(){try{return 2<tn(this)?this.g.status:-1}catch(Tt){return-1}},e.oa=function(){try{return this.g?this.g.responseText:""}catch(Tt){return""}},e.Oa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),Se(t)}},e.Ba=function(){return this.m},e.Ka=function(){return"string"===typeof this.l?this.l:String(this.l)},(e=sn.prototype).la=8,e.G=1,e.connect=function(e,t,n,r){Le(0),this.W=e,this.H=t||{},n&&void 0!==r&&(this.H.OSID=n,this.H.OAID=r),this.F=this.X,this.I=Sn(this,null,this.W),cn(this)},e.Ga=function(e){if(this.s)if(this.s=null,1==this.G){if(!e){this.U=Math.floor(1e5*Math.random()),e=this.U++;const i=new He(this,this.j,e);let s=this.o;if(this.S&&(s?(s=I(s),N(s,this.S)):s=this.S),null!==this.m||this.O||(i.H=s,s=null),this.P)e:{for(var t=0,n=0;n<this.i.length;n++){var r=this.i[n];if(void 0===(r="__data__"in r.map&&"string"===typeof(r=r.map.__data__)?r.length:void 0))break;if(4096<(t+=r)){t=n;break e}if(4096===t||n===this.i.length-1){t=n+1;break e}}t=1e3}else t=1e3;
2t=dn(this,i,t),wt(n=gt(this.I),"RID",e),wt(n,"CVER",22),this.D&&wt(n,"X-HTTP-Session-Id",this.D),hn(this,n),s&&(this.O?t="headers="+encodeURIComponent(String(Ht(s)))+"&"+t:this.m&&Wt(n,this.m,s)),ut(this.h,i),this.Ua&&wt(n,"TYPE","init"),this.P?(wt(n,"$req",t),wt(n,"SID","null"),i.T=!0,Qe(i,n,null)):Qe(i,n,t),this.G=2}}else 3==this.G&&(e?un(this,e):0==this.i.length||at(this.h)||un(this))},e.Fa=function(){if(this.u=null,gn(this),this.ba&&!(this.M||null==this.g||0>=this.R)){var e=2*this.R;this.j.info("BP detection timer enabled: "+e),this.A=Fe(c(this.ab,this),e)}},e.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,Le(10),an(this),gn(this))},e.Za=function(){null!=this.C&&(this.C=null,an(this),pn(this),Le(19))},e.fb=function(e){e?(this.j.info("Successfully pinged google.com"),Le(2)):(this.j.info("Failed to ping google.com"),Le(1))},e.isActive=function(){return!!this.l&&this.l.isActive(this)},(e=kn.prototype).ua=function(){},e.ta=function(){},e.sa=function(){},e.ra=function(){},e.isActive=function(){return!0},e.Na=function(){},Tn.prototype.g=function(e,t){return new _n(e,t)},x(_n,de),_n.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},_n.prototype.close=function(){on(this.g)},_n.prototype.o=function(e){var t=this.g;if("string"===typeof e){var n={};n.__data__=e,e=n}else this.u&&((n={}).__data__=xe(e),e=n);t.i.push(new st(t.Ya++,e)),3==t.G&&cn(t)},_n.prototype.N=function(){this.g.l=null,delete this.j,on(this.g),delete this.g,_n.aa.N.call(this)},x(Cn,Ae),x(An,Ie),x(In,kn),In.prototype.ua=function(){fe(this.g,"a")},In.prototype.ta=function(e){fe(this.g,new Cn(e))},In.prototype.sa=function(e){fe(this.g,new An)},In.prototype.ra=function(){fe(this.g,"b")},Tn.prototype.createWebChannel=Tn.prototype.g,_n.prototype.send=_n.prototype.o,_n.prototype.open=_n.prototype.m,_n.prototype.close=_n.prototype.close,y=w.createWebChannelTransport=function(){return new Tn},v=w.getStatEventTarget=function(){return Re()},g=w.Event=Pe,m=w.Stat={mb:0,pb:1,qb:2,Jb:3,Ob:4,Lb:5,Mb:6,Kb:7,Ib:8,Nb:9,PROXY:10,NOPROXY:11,Gb:12,Cb:13,Db:14,Bb:15,Eb:16,Fb:17,ib:18,hb:19,jb:20},Be.NO_ERROR=0,Be.TIMEOUT=8,Be.HTTP_ERROR=6,p=w.ErrorCode=Be,$e.COMPLETE="complete",f=w.EventType=$e,_e.EventType=Ce,Ce.OPEN="a",Ce.CLOSE="b",Ce.ERROR="c",Ce.MESSAGE="d",de.prototype.listen=de.prototype.K,d=w.WebChannel=_e,w.FetchXmlHttpFactory=Vt,Gt.prototype.listenOnce=Gt.prototype.L,Gt.prototype.getLastError=Gt.prototype.Ka,Gt.prototype.getLastErrorCode=Gt.prototype.Ba,Gt.prototype.getStatus=Gt.prototype.Z,Gt.prototype.getResponseJson=Gt.prototype.Oa,Gt.prototype.getResponseText=Gt.prototype.oa,Gt.prototype.send=Gt.prototype.ea,Gt.prototype.setWithCredentials=Gt.prototype.Ha,h=w.XhrIo=Gt}).apply("undefined"!==typeof b?b:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{});const x="@firebase/firestore",S="4.7.12";class E{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}E.UNAUTHENTICATED=new E(null),E.GOOGLE_CREDENTIALS=new E("google-credentials-uid"),E.FIRST_PARTY=new E("first-party-uid"),E.MOCK_USER=new E("mock-user");let k="11.7.0";const T=new a.Vy("@firebase/firestore");function _(){return T.logLevel}function C(e){if(T.logLevel<=a.$b.DEBUG){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i=n.map(P);T.debug(`Firestore (${k}): ${e}`,...i)}}function A(e){if(T.logLevel<=a.$b.ERROR){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i=n.map(P);T.error(`Firestore (${k}): ${e}`,...i)}}function I(e){if(T.logLevel<=a.$b.WARN){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i=n.map(P);T.warn(`Firestore (${k}): ${e}`,...i)}}function P(e){if("string"==typeof e)return e;try{return function(e){return JSON.stringify(e)}(e)}catch(t){return e}}function N(e,t,n){let r="Unexpected state";"string"==typeof t?r=t:n=t,R(e,r,n)}function R(e,t,n){let r=`FIRESTORE (${k}) INTERNAL ASSERTION FAILED: ${t} (ID: ${e.toString(16)})`;if(void 0!==n)try{r+=" CONTEXT: "+JSON.stringify(n)}catch(e){r+=" CONTEXT: "+n}throw A(r),new Error(r)}function D(e,t,n,r){let i="Unexpected state";"string"==typeof n?i=n:r=n,e||R(t,i,r)}function O(e,t){return e}const j={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENT
vendor: 4,287 bytes, line 2
2ED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class L extends l.g{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class M{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}}class F{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class U{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable((()=>t(E.UNAUTHENTICATED)))}shutdown(){}}class V{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable((()=>t(this.token.user)))}shutdown(){this.changeListener=null}}class z{constructor(e){this.t=e,this.currentUser=E.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){D(void 0===this.o,42304);let n=this.i;const r=e=>this.i!==n?(n=this.i,t(e)):Promise.resolve();let i=new M;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new M,e.enqueueRetryable((()=>r(this.currentUser)))};const s=()=>{const t=i;e.enqueueRetryable((async()=>{await t.promise,await r(this.currentUser)}))},o=e=>{C("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=e,this.o&&(this.auth.addAuthTokenListener(this.o),s())};this.t.onInit((e=>o(e))),setTimeout((()=>{if(!this.auth){const e=this.t.getImmediate({optional:!0});e?o(e):(C("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new M)}}),0),s()}getToken(){const e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then((t=>this.i!==e?(C("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):t?(D("string"==typeof t.accessToken,31837,{l:t}),new F(t.accessToken,this.currentUser)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){const e=this.auth&&this.auth.getUid();return D(null===e||"string"==typeof e,2055,{h:e}),new E(e)}}class B{constructor(e,t,n){this.P=e,this.T=t,this.I=n,this.type="FirstParty",this.user=E.FIRST_PARTY,this.A=new Map}R(){return this.I?this.I():null}get headers(){this.A.set("X-Goog-AuthUser",this.P);const e=this.R();return e&&this.A.set("Authorization",e),this.T&&this.A.set("X-Goog-Iam-Authorization-Token",this.T),this.A}}class ${constructor(e,t,n){this.P=e,this.T=t,this.I=n}getToken(){return Promise.resolve(new B(this.P,this.T,this.I))}start(e,t){e.enqueueRetryable((()=>t(E.FIRST_PARTY)))}shutdown(){}invalidateToken(){}}class q{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class H{constructor(e,t){this.V=t,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,(0,s.xZ)(e)&&e.settings.appCheckToken&&(this.p=e.settings.appCheckToken)}start(e,t){D(void 0===this.o,3512);const n=e=>{null!=e.error&&C("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${e.error.message}`);const n=e.token!==this.m;return this.m=e.token,C("FirebaseAppCheckTokenProvider",`Received ${n?"new":"existing"} token.`),n?t(e.token):Promise.resolve()};this.o=t=>{e.enqueueRetryable((()=>n(t)))};const r=e=>{C("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=e,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit((e=>r(e))),setTimeout((()=>{if(!this.appCheck){const e=this.V.getImmediate({optional:!0});e?r(e):C("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}}),0)}getToken(){if(this.p)return Promise.resolve(new q(this.p));const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then((e=>e?(D("string"==typeof e.token,44558,{tokenResult:e}),this.m=e.token,new q(e.token)):null)):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}function W(e){const t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(let r=0;r<e;
2r++)n[r]=Math.floor(256*Math.random());return n}function G(){return new TextEncoder}class K{static newId(){const e=62*Math.floor(256/62);let t="";for(;t.length<20;){const n=W(40);for(let r=0;r<n.length;++r)t.length<20&&n[r]<e&&(t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(n[r]%62))}return t}}function Q(e,t){return e<t?-1:e>t?1:0}function Y(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=e.codePointAt(n),i=t.codePointAt(n);if(r!==i){if(r<128&&i<128)return Q(r,i);{const s=G(),o=J(s.encode(X(e,n)),s.encode(X(t,n)));return 0!==o?o:Q(r,i)}}n+=r>65535?2:1}return Q(e.length,t.length)}function X(e,t){return e.codePointAt(t)>65535?e.substring(t,t+2):e.substring(t,t+1)}function J(e,t){for(let n=0;n<e.length&&n<t.length;++n)if(e[n]!==t[n])return Q(e[n],t[n]);return Q(e.length,t.length)}function Z(e,t,n){return e.length===t.length&&e.every(((e,r)=>n(e,t[r])))}const ee=-62135596800,te=1e6;class ne{static now(){return ne.fromMillis(Date.now())}static fromDate(e){return ne.fromMillis(e.getTime())}static fromMillis(e){const t=Math.floor(e/1e3),n=Math.floor((e-1e3*t)*te);return new ne(t,n)}constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new L(j.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new L(j.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<ee)throw new L(j.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new L(j.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/te}_compareTo(e){return this.seconds===e.seconds?Q(this.nanoseconds,e.nanoseconds):Q(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const e=this.seconds-ee;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}class re{static fromTimestamp(e){return new re(e)}static min(){return new re(new ne(0,0))}static max(){return new re(new ne(253402300799,999999999))}constructor(e){this.timestamp=e}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}const ie="__name__";class se{constructor(e,t,n){void 0===t?t=0:t>e.length&&N(637,{offset:t,range:e.length}),void 0===n?n=e.length-t:n>e.length-t&&N(1746,{length:n,range:e.length-t}),this.segments=e,this.offset=t,this.len=n}get length(){return this.len}isEqual(e){return 0===se.comparator(this,e)}child(e){const t=this.segments.slice(this.offset,this.limit());return e instanceof se?e.forEach((e=>{t.push(e)})):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,t){const n=Math.min(e.length,t.length);for(let r=0;r<n;r++){const n=se.compareSegments(e.get(r),t.get(r));if(0!==n)return n}return Q(e.length,t.length)}static compareSegments(e,t){const n=se.isNumericId(e),r=se.isNumericId(t);return n&&!r?-1:!n&&r?1:n&&r?se.extractNumericId(e).compare(se.extractNumericId(t)):Y(e,t)}static isNumericId(e){return e.startsWith("__id")&&e.endsWith("__")}static extractNumericId(e){return r.fromString(e.substring(4,e.length-2))}}class oe extends se{construct(e,t,n){return new oe(e,t,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}
vendor: 11,633 bytes, line 2
2toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(){const e=[];for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(const i of n){if(i.indexOf("//")>=0)throw new L(j.INVALID_ARGUMENT,`Invalid segment (${i}). Paths must not contain // in them.`);e.push(...i.split("/").filter((e=>e.length>0)))}return new oe(e)}static emptyPath(){return new oe([])}}const ae=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class le extends se{construct(e,t,n){return new le(e,t,n)}static isValidIdentifier(e){return ae.test(e)}canonicalString(){return this.toArray().map((e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),le.isValidIdentifier(e)||(e="`"+e+"`"),e))).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&this.get(0)===ie}static keyField(){return new le([ie])}static fromServerFormat(e){const t=[];let n="",r=0;const i=()=>{if(0===n.length)throw new L(j.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(n),n=""};let s=!1;for(;r<e.length;){const t=e[r];if("\\"===t){if(r+1===e.length)throw new L(j.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const t=e[r+1];if("\\"!==t&&"."!==t&&"`"!==t)throw new L(j.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);n+=t,r+=2}else"`"===t?(s=!s,r++):"."!==t||s?(n+=t,r++):(i(),r++)}if(i(),s)throw new L(j.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new le(t)}static emptyPath(){return new le([])}}class ce{constructor(e){this.path=e}static fromPath(e){return new ce(oe.fromString(e))}static fromName(e){return new ce(oe.fromString(e).popFirst(5))}static empty(){return new ce(oe.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===oe.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return oe.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new ce(new oe(e.slice()))}}const ue=-1;class he{constructor(e,t,n,r){this.indexId=e,this.collectionGroup=t,this.fields=n,this.indexState=r}}he.UNKNOWN_ID=-1;function de(e,t){const n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=re.fromTimestamp(1e9===r?new ne(n+1,0):new ne(n,r));return new pe(i,ce.empty(),t)}function fe(e){return new pe(e.readTime,e.key,ue)}class pe{constructor(e,t,n){this.readTime=e,this.documentKey=t,this.largestBatchId=n}static min(){return new pe(re.min(),ce.empty(),ue)}static max(){return new pe(re.max(),ce.empty(),ue)}}function me(e,t){let n=e.readTime.compareTo(t.readTime);return 0!==n?n:(n=ce.comparator(e.documentKey,t.documentKey),0!==n?n:Q(e.largestBatchId,t.largestBatchId))}const ge="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class ve{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach((e=>e()))}}async function ye(e){if(e.code!==j.FAILED_PRECONDITION||e.message!==ge)throw e;C("LocalStore","Unexpectedly lost primary lease")}class be{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e((e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)}),(e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)}))}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&N(59440),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new be(((n,r)=>{this.nextCallback=t=>{this.wrapSuccess(e,t).next(n,r)},this.catchCallback=e=>{this.wrapFailure(t,e).next(n,r)}}))}toPromise(){return new Promise(((e,t)=>{this.next(e,t)}))}wrapUserFunction(e){try{const t=e();return t instanceof be?t:be.resolve(t)}catch(e){return be.reject(e)}}wrapSuccess(e,t){return e?this.wrapUserFunction((()=>e(t))):be.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction((()=>e(t))):be.reject(t)}static resolve(e){return new be(((t,n)=>{t(e)}))}static reject(e){return new be(((t,n)=>{n(e)}))}static waitFor(e){return new be(((t,n)=>{let r=0,i=0,s=!1;e.forEach((e=>{++r,e.next((()=>{++i,s&&i===r&&t()}),(e=>n(e)))})),s=!0,i===r&&t()}))}static or(e){let t=be.resolve(!1);for(const n of e)t=t.next((e=>e?be.resolve(e):n()));return t}static forEach(e,t){const n=[];return e.forEach(((e,r)=>{n.push(t.call(this,e,r))})),this.waitFor(n)}static mapArray(e,t){return new be(((n,r)=>{const i=e.length,s=new Array(i);let o=0;for(let a=0;a<i;a++){const l=a;t(e[l]).next((e=>{s[l]=e,++o,o===i&&n(s)}),(e=>r(e)))}}))}static doWhile(e,t){return new be(((n,r)=>{const i=()=>{!0===e()?t().next((()=>{i()}),r):n()};i()}))}}function we(e){const t=e.match(/Android ([\d.]+)/i),n=t?t[1].split(".").slice(0,2).join("."):"-1";return Number(n)}function xe(e){return"IndexedDbTransactionError"===e.name}class Se{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=e=>this.ue(e),this.ce=e=>t.writeSequenceNumber(e))}ue(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.ce&&this.ce(e),e}}Se.le=-1;const Ee=-1;function ke(e){return null==e}function Te(e){return 0===e&&1/e==-1/0}function _e(e){return"number"==typeof e&&Number.isInteger(e)&&!Te(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}const Ce="\x01";function Ae(e){let t="";for(let n=0;n<e.length;n++)t.length>0&&(t=Pe(t)),t=Ie(e.get(n),t);return Pe(t)}function Ie(e,t){let n=t;const r=e.length;for(let i=0;i<r;i++){const t=e.charAt(i);switch(t){case"\0":n+="\x01\x10";break;case Ce:n+="\x01\x11";break;default:n+=t}}return n}function Pe(e){return e+Ce+"\x01"}const Ne="remoteDocuments",Re="owner",De="mutationQueues",Oe="mutations";const je="documentMutations",Le="remoteDocumentsV14",Me="remoteDocumentGlobal",Fe="targets",Ue="targetDocuments",Ve="targetGlobal",ze="collectionParents",Be="clientMetadata",$e="bundles",qe="namedQueries",He="indexConfiguration",We="indexState",Ge="indexEntries",Ke="documentOverlays",Qe="globals",Ye=[De,Oe,je,Ne,Fe,Re,Ve,Ue,Be,Me,ze,$e,qe],Xe=[De,Oe,je,Le,Fe,Re,Ve,Ue,Be,Me,ze,$e,qe,Ke],Je=Xe,Ze=[...Je,He,We,Ge];function et(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function tt(e,t){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function nt(e,t){const n=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.push(t(e[r],r,e));return n}function rt(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}class it{constructor(e,t){this.comparator=e,this.root=t||ot.EMPTY}insert(e,t){return new it(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,ot.BLACK,null,null))}remove(e){return new it(this.comparator,this.root.remove(e,this.comparator).copy(null,null,ot.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){const n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}indexOf(e){let t=0,n=this.root;for(;!n.isEmpty();){const r=this.comparator(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal(((t,n)=>(e(t,n),!1)))}toString(){const e=[];return this.inorderTraversal(((t,n)=>(e.push(`${t}:${n}`),!1))),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new st(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new st(this.root,e,this.comparator,!1)}getReverseIterator(){return new st(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new st(this.root,e,this.comparator,!0)}}class st{constructor(e,t,n,r){this.isReverse=r,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=t?n(e.key,t):1,t&&r&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(0===i){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class ot{constructor(e,t,n,r,i){this.key=e,this.value=t,this.color=null!=n?n:ot.RED,this.left=null!=r?r:ot.EMPTY,this.right=null!=i?i:ot.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,n,r,i){return new ot(null!=e?e:this.key,null!=t?t:this.value,null!=n?n:this.color,null!=r?r:this.left,null!=i?i:this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,n){let r=this;const i=n(e,r.key);return r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n)),r.fixUp()}removeMin(){if(this.left.isEmpty())return ot.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,t){let n,r=this;if(t(e,r.key)<0)r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(e,t),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===t(e,r.key)){if(r.right.isEmpty())return ot.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(e,t))}return r.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,ot.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,ot.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw N(43730,{key:this.key,value:this.value});if(this.right.isRed())throw N(14113,{key:this.key,value:this.value});const e=this.left.check();if(e!==this.right.check())throw N(27949);return e+(this.isRed()?0:1)}}
vendor: 5,261 bytes, line 2
2ot.EMPTY=null,ot.RED=!0,ot.BLACK=!1,ot.EMPTY=new class{constructor(){this.size=0}get key(){throw N(57766)}get value(){throw N(16141)}get color(){throw N(16727)}get left(){throw N(29726)}get right(){throw N(36894)}copy(e,t,n,r,i){return this}insert(e,t,n){return new ot(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class at{constructor(e){this.comparator=e,this.data=new it(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal(((t,n)=>(e(t),!1)))}forEachInRange(e,t){const n=this.data.getIteratorFrom(e[0]);for(;n.hasNext();){const r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}}forEachWhile(e,t){let n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return}firstAfterOrEqual(e){const t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new lt(this.data.getIterator())}getIteratorFrom(e){return new lt(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size<e.size&&(t=e,e=this),e.forEach((e=>{t=t.add(e)})),t}isEqual(e){if(!(e instanceof at))return!1;if(this.size!==e.size)return!1;const t=this.data.getIterator(),n=e.data.getIterator();for(;t.hasNext();){const e=t.getNext().key,r=n.getNext().key;if(0!==this.comparator(e,r))return!1}return!0}toArray(){const e=[];return this.forEach((t=>{e.push(t)})),e}toString(){const e=[];return this.forEach((t=>e.push(t))),"SortedSet("+e.toString()+")"}copy(e){const t=new at(this.comparator);return t.data=e,t}}class lt{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class ct{constructor(e){this.fields=e,e.sort(le.comparator)}static empty(){return new ct([])}unionWith(e){let t=new at(le.comparator);for(const n of this.fields)t=t.add(n);for(const n of e)t=t.add(n);return new ct(t.toArray())}covers(e){for(const t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return Z(this.fields,e.fields,((e,t)=>e.isEqual(t)))}}class ut extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class ht{constructor(e){this.binaryString=e}static fromBase64String(e){const t=function(e){try{return atob(e)}catch(e){throw"undefined"!=typeof DOMException&&e instanceof DOMException?new ut("Invalid base64 string: "+e):e}}(e);return new ht(t)}static fromUint8Array(e){const t=function(e){let t="";for(let n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(e);return new ht(t)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return e=this.binaryString,btoa(e);var e}toUint8Array(){return function(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return Q(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}ht.EMPTY_BYTE_STRING=new ht("");const dt=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function ft(e){if(D(!!e,39018),"string"==typeof e){let t=0;const n=dt.exec(e);if(D(!!n,46558,{timestamp:e}),n[1]){let e=n[1];e=(e+"000000000").substr(0,9),t=Number(e)}const r=new Date(e);return{seconds:Math.floor(r.getTime()/1e3),nanos:t}}return{seconds:pt(e.seconds),nanos:pt(e.nanos)}}function pt(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function mt(e){return"string"==typeof e?ht.fromBase64String(e):ht.fromUint8Array(e)}const gt="server_timestamp",vt="__type__",yt="__previous_value__",bt="__local_write_time__";function wt(e){var t,n;return(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{})[vt])||void 0===n?void 0:n.stringValue)===gt}function xt(e){const t=e.mapValue.fields[yt];return wt(t)?xt(t):t}function St(e){const t=ft(e.mapValue.fields[bt].timestampValue);return new ne(t.seconds,t.nanos)}class Et{constructor(e,t,n,r,i,s,o,a,l,c){this.databaseId=e,this.appId=t,this.persistenceKey=n,this.host=r,this.ssl=i,this.forceLongPolling=s,this.autoDetectLongPolling=o,this.longPollingOptions=a,this.useFetchStreams=l,this.isUsingEmulator=c}}const kt="(default)";class Tt{constructor(e,t){this.projectId=e,this.database=t||kt}static empty(){return new Tt("","")}get isDefaultDatabase(){return this.database===kt}isEqual(e){return e instanceof Tt&&e.projectId===this.projectId&&e.database===this.database}}const _t="__type__",Ct="__max__",At={mapValue:{fields:{__type__:{stringValue:Ct}}}},It="__vector__",Pt="value";function Nt(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?wt
2(e)?4:Kt(e)?9007199254740991:Wt(e)?10:11:N(28295,{value:e})}function Rt(e,t){if(e===t)return!0;const n=Nt(e);if(n!==Nt(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return St(e).isEqual(St(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;const n=ft(e.timestampValue),r=ft(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(e,t){return mt(e.bytesValue).isEqual(mt(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return pt(e.geoPointValue.latitude)===pt(t.geoPointValue.latitude)&&pt(e.geoPointValue.longitude)===pt(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return pt(e.integerValue)===pt(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){const n=pt(e.doubleValue),r=pt(t.doubleValue);return n===r?Te(n)===Te(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return Z(e.arrayValue.values||[],t.arrayValue.values||[],Rt);case 10:case 11:return function(e,t){const n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(et(n)!==et(r))return!1;for(const i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!Rt(n[i],r[i])))return!1;return!0}(e,t);default:return N(52216,{left:e})}}function Dt(e,t){return void 0!==(e.values||[]).find((e=>Rt(e,t)))}function Ot(e,t){if(e===t)return 0;const n=Nt(e),r=Nt(t);if(n!==r)return Q(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Q(e.booleanValue,t.booleanValue);case 2:return function(e,t){const n=pt(e.integerValue||e.doubleValue),r=pt(t.integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return jt(e.timestampValue,t.timestampValue);case 4:return jt(St(e),St(t));case 5:return Y(e.stringValue,t.stringValue);case 6:return function(e,t){const n=mt(e),r=mt(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){const n=e.split("/"),r=t.split("/");for(let i=0;i<n.length&&i<r.length;i++){const e=Q(n[i],r[i]);if(0!==e)return e}return Q(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){const n=Q(pt(e.latitude),pt(t.latitude));return 0!==n?n:Q(pt(e.longitude),pt(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return Lt(e.arrayValue,t.arrayValue);case 10:return function(e,t){var n,r,i,s;const o=e.fields||{},a=t.fields||{},l=null===(n=o[Pt])||void 0===n?void 0:n.arrayValue,c=null===(r=a[Pt])||void 0===r?void 0:r.arrayValue,u=Q((null===(i=null==l?void 0:l.values)||void 0===i?void 0:i.length)||0,(null===(s=null==c?void 0:c.values)||void 0===s?void 0:s.length)||0);return 0!==u?u:Lt(l,c)}(e.mapValue,t.mapValue);case 11:return function(e,t){if(e===At.mapValue&&t===At.mapValue)return 0;if(e===At.mapValue)return 1;if(t===At.mapValue)return-1;const n=e.fields||{},r=Object.keys(n),i=t.fields||{},s=Object.keys(i);r.sort(),s.sort();for(let o=0;o<r.length&&o<s.length;++o){const e=Y(r[o],s[o]);if(0!==e)return e;const t=Ot(n[r[o]],i[s[o]]);if(0!==t)return t}return Q(r.length,s.length)}(e.mapValue,t.mapValue);default:throw N(23264,{Pe:n})}}function jt(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return Q(e,t);const n=ft(e),r=ft(t),i=Q(n.seconds,r.seconds);return 0!==i?i:Q(n.nanos,r.nanos)}function Lt(e,t){const n=e.values||[],r=t.values||[];for(let i=0;i<n.length&&i<r.length;++i){const e=Ot(n[i],r[i]);if(e)return e}return Q(n.length,r.length)}function Mt(e){return Ft(e)}function Ft(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(e){const t=ft(e);return`time(${t.seconds},${t.nanos})`}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?function(e){return mt(e).toBase64()}(e.bytesValue):"referenceValue"in e?function(e){return ce.fromName(e).toString()}(e.referenceValue):"geoPointValue"in e?function(e){return`geo(${e.latitude},${e.longitude})`}(e.geoPointValue):"arrayValue"in e?function(e){let t="[",n=!0;for(const r of e.values||[])n?n=!1:t+=",",t+=Ft(r);return t+"]"}(e.arrayValue):"mapValue"in e?function(e){const t=Object.keys(e.fields||{}).sort();let n="{",r=!0;for(const i of t)r?r=!1:n+=",",n+=`${i}:${Ft(e.fields[i])}`;return n+"}"}(e.mapValue):N(61005,{value:e})}function Ut(e){switch(Nt(e)){case 0:case 1:return 4;case 2:return 8;case 3:case 8:return 16;case 4:const t=xt(e);return t?16+Ut(t):16;case 5:return 2*e.stringValue.length;case 6:return mt(e.bytesValue).approximateByteSize();case 7:return e.referenceValue.length;case 9:return function(e){return(e.values||[]).reduce(((e,t)=>e+Ut(t)),0)}(e.arrayValue);case 10:case 11:return function(e){let t=0;return tt(e.fields,((e,n)=>{t+=e.length+Ut(n)})),t}(e.mapValue);default:throw N(13486,{value:e})}}function Vt(e,t){return{referenceValue:`projects/${e.projectId}/databases/${e.database}/documents/${t.path.canonicalString()}`}}function zt(e){return!!e&&"integerValue"in e}function Bt(e){return!!e&&"arrayValue"in e}function $t(e){return!!e&&"nullValue"in e}function qt(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function Ht(e){return!!e&&"mapValue"in e}function Wt(e){var t,n;return(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{})[_t])||void 0===n?void 0:n.stringValue)===It}function Gt(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue&&"object"==typeof e.timestampValue)return{timestampValue:Object.assign({},e.timestampValue)};if(e.mapValue){const t={mapValue:{fields:{}}};return tt(e.mapValue.fields,((e,n)=>t.mapValue.fields[e]=Gt(n))),t}if(e.arrayValue){const t={arrayValue:{values:[]}};for(let n=0;n<(e.arrayValue.values||[]).length;++n)t.arrayValue.values[n]=Gt(e.arrayValue.values[n]);return t}return Object.assign({},e)}function Kt(e){return(((e.mapValue||{}).fields||{}).__type__||{}).stringValue===Ct}class Qt{constructor(e){this.value=e}static empty(){return new Qt({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let n=0;n<e.length-1;++n)if(t=(t.mapValue.fields||{})[e.get(n)],!Ht(t))return null;return t=(t.mapValue.fields||{})[e.lastSegment()],t||null}}set(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=Gt(t)}setAll(e){let t=le.emptyPath(),n={},r=[];e.forEach(((e,i)=>{if(!t.isImmediateParentOf(i)){const e=this.getFieldsMap(t);this.applyChanges(e,n,r),n={},r=[],t=i.popLast()}e?n[i.lastSegment()]=Gt(e):r.push(i.lastSegment())}
vendor: 5,228 bytes, line 2
2));const i=this.getFieldsMap(t);this.applyChanges(i,n,r)}delete(e){const t=this.field(e.popLast());Ht(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return Rt(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let n=0;n<e.length;++n){let r=t.mapValue.fields[e.get(n)];Ht(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields}applyChanges(e,t,n){tt(t,((t,n)=>e[t]=n));for(const r of n)delete e[r]}clone(){return new Qt(Gt(this.value))}}function Yt(e){const t=[];return tt(e.fields,((e,n)=>{const r=new le([e]);if(Ht(n)){const e=Yt(n.mapValue).fields;if(0===e.length)t.push(r);else for(const n of e)t.push(r.child(n))}else t.push(r)})),new ct(t)}class Xt{constructor(e,t,n,r,i,s,o){this.key=e,this.documentType=t,this.version=n,this.readTime=r,this.createTime=i,this.data=s,this.documentState=o}static newInvalidDocument(e){return new Xt(e,0,re.min(),re.min(),re.min(),Qt.empty(),0)}static newFoundDocument(e,t,n,r){return new Xt(e,1,t,re.min(),n,r,0)}static newNoDocument(e,t){return new Xt(e,2,t,re.min(),re.min(),Qt.empty(),0)}static newUnknownDocument(e,t){return new Xt(e,3,t,re.min(),re.min(),Qt.empty(),2)}convertToFoundDocument(e,t){return!this.createTime.isEqual(re.min())||2!==this.documentType&&0!==this.documentType||(this.createTime=e),this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=Qt.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=Qt.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=re.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(e){return e instanceof Xt&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new Xt(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}class Jt{constructor(e,t){this.position=e,this.inclusive=t}}function Zt(e,t,n){let r=0;for(let i=0;i<e.position.length;i++){const s=t[i],o=e.position[i];if(r=s.field.isKeyField()?ce.comparator(ce.fromName(o.referenceValue),n.key):Ot(o,n.data.field(s.field)),"desc"===s.dir&&(r*=-1),0!==r)break}return r}function en(e,t){if(null===e)return null===t;if(null===t)return!1;if(e.inclusive!==t.inclusive||e.position.length!==t.position.length)return!1;for(let n=0;n<e.position.length;n++)if(!Rt(e.position[n],t.position[n]))return!1;return!0}class tn{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";this.field=e,this.dir=t}}function nn(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}class rn{}class sn extends rn{constructor(e,t,n){super(),this.field=e,this.op=t,this.value=n}static create(e,t,n){return e.isKeyField()?"in"===t||"not-in"===t?this.createKeyFieldInFilter(e,t,n):new fn(e,t,n):"array-contains"===t?new vn(e,n):"in"===t?new yn(e,n):"not-in"===t?new bn(e,n):"array-contains-any"===t?new wn(e,n):new sn(e,t,n)}static createKeyFieldInFilter(e,t,n){return"in"===t?new pn(e,n):new mn(e,n)}matches(e){const t=e.data.field(this.field);return"!="===this.op?null!==t&&void 0===t.nullValue&&this.matchesComparison(Ot(t,this.value)):null!==t&&Nt(this.value)===Nt(t)&&this.matchesComparison(Ot(t,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return N(47266,{operator:this.op})}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class on extends rn{constructor(e,t){super(),this.filters=e,this.op=t,this.Te=null}static create(e,t){return new on(e,t)}matches(e){return an(this)?void 0===this.filters.find((t=>!t.matches(e))):void 0!==this.filters.find((t=>t.matches(e)))}getFlattenedFilters(){return null!==this.Te||(this.Te=this.filters.reduce(((e,t)=>e.concat(t.getFlattenedFilters())),[])),this.Te}getFilters(){return Object.assign([],this.filters)}}function an(e){return"and"===e.op}function ln(e){return cn(e)&&an(e)}function cn(e){for(const t of e.filters)if(t instanceof on)return!1;return!0}function un(e){if(e instanceof sn)return e.field.canonicalString()+e.op.toString()+Mt(e.value);if(ln(e))return e.filters.map((e=>un(e))).join(",");{const t=e.filters.map((e=>un(e))).join(",");
2return`${e.op}(${t})`}}function hn(e,t){return e instanceof sn?function(e,t){return t instanceof sn&&e.op===t.op&&e.field.isEqual(t.field)&&Rt(e.value,t.value)}(e,t):e instanceof on?function(e,t){return t instanceof on&&e.op===t.op&&e.filters.length===t.filters.length&&e.filters.reduce(((e,n,r)=>e&&hn(n,t.filters[r])),!0)}(e,t):void N(19439)}function dn(e){return e instanceof sn?function(e){return`${e.field.canonicalString()} ${e.op} ${Mt(e.value)}`}(e):e instanceof on?function(e){return e.op.toString()+" {"+e.getFilters().map(dn).join(" ,")+"}"}(e):"Filter"}class fn extends sn{constructor(e,t,n){super(e,t,n),this.key=ce.fromName(n.referenceValue)}matches(e){const t=ce.comparator(e.key,this.key);return this.matchesComparison(t)}}class pn extends sn{constructor(e,t){super(e,"in",t),this.keys=gn("in",t)}matches(e){return this.keys.some((t=>t.isEqual(e.key)))}}class mn extends sn{constructor(e,t){super(e,"not-in",t),this.keys=gn("not-in",t)}matches(e){return!this.keys.some((t=>t.isEqual(e.key)))}}function gn(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((e=>ce.fromName(e.referenceValue)))}class vn extends sn{constructor(e,t){super(e,"array-contains",t)}matches(e){const t=e.data.field(this.field);return Bt(t)&&Dt(t.arrayValue,this.value)}}class yn extends sn{constructor(e,t){super(e,"in",t)}matches(e){const t=e.data.field(this.field);return null!==t&&Dt(this.value.arrayValue,t)}}class bn extends sn{constructor(e,t){super(e,"not-in",t)}matches(e){if(Dt(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const t=e.data.field(this.field);return null!==t&&void 0===t.nullValue&&!Dt(this.value.arrayValue,t)}}class wn extends sn{constructor(e,t){super(e,"array-contains-any",t)}matches(e){const t=e.data.field(this.field);return!(!Bt(t)||!t.arrayValue.values)&&t.arrayValue.values.some((e=>Dt(this.value.arrayValue,e)))}}class xn{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;this.path=e,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=s,this.endAt=o,this.Ie=null}}function Sn(e){return new xn(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,arguments.length>6&&void 0!==arguments[6]?arguments[6]:null)}function En(e){const t=O(e);if(null===t.Ie){let e=t.path.canonicalString();null!==t.collectionGroup&&(e+="|cg:"+t.collectionGroup),e+="|f:",e+=t.filters.map((e=>un(e))).join(","),e+="|ob:",e+=t.orderBy.map((e=>function(e){return e.field.canonicalString()+e.dir}(e))).join(","),ke(t.limit)||(e+="|l:",e+=t.limit),t.startAt&&(e+="|lb:",e+=t.startAt.inclusive?"b:":"a:",e+=t.startAt.position.map((e=>Mt(e))).join(",")),t.endAt&&(e+="|ub:",e+=t.endAt.inclusive?"a:":"b:",e+=t.endAt.position.map((e=>Mt(e))).join(",")),t.Ie=e}return t.Ie}function kn(e,t){if(e.limit!==t.limit)return!1;if(e.orderBy.length!==t.orderBy.length)return!1;for(let n=0;n<e.orderBy.length;n++)if(!nn(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(let n=0;n<e.filters.length;n++)if(!hn(e.filters[n],t.filters[n]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!en(e.startAt,t.startAt)&&en(e.endAt,t.endAt)}function Tn(e){return ce.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}class _n{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"F",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;this.path=e,this.collectionGroup=t,this.explicitOrderBy=n,this.filters=r,this.limit=i,this.limitType=s,this.startAt=o,this.endAt=a,this.Ee=null,this.de=null,this.Ae=null,this.startAt,this.endAt}}function Cn(e,t,n,r,i,s,o,a){return new _n(e,t,n,r,i,s,o,a)}function An(e){return new _n(e)}function In(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.explicitOrderBy.length||1===e.explicitOrderBy.length&&e.explicitOrderBy[0].field.isKeyField())}function Pn(e){return null!==e.collectionGroup}function Nn(e){const t=O(e);if(null===t.Ee){t.Ee=[];const e=new Set;for(const i of t.explicitOrderBy)t.Ee.push(i),e.add(i.field.canonicalString());const n=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc",r=function(e){let t=new at(le.comparator);
vendor: 5,825 bytes, line 2
2return e.filters.forEach((e=>{e.getFlattenedFilters().forEach((e=>{e.isInequality()&&(t=t.add(e.field))}))})),t}(t);r.forEach((r=>{e.has(r.canonicalString())||r.isKeyField()||t.Ee.push(new tn(r,n))})),e.has(le.keyField().canonicalString())||t.Ee.push(new tn(le.keyField(),n))}return t.Ee}function Rn(e){const t=O(e);return t.de||(t.de=On(t,Nn(e))),t.de}function Dn(e){const t=O(e);return t.Ae||(t.Ae=On(t,e.explicitOrderBy)),t.Ae}function On(e,t){if("F"===e.limitType)return Sn(e.path,e.collectionGroup,t,e.filters,e.limit,e.startAt,e.endAt);{t=t.map((e=>{const t="desc"===e.dir?"asc":"desc";return new tn(e.field,t)}));const n=e.endAt?new Jt(e.endAt.position,e.endAt.inclusive):null,r=e.startAt?new Jt(e.startAt.position,e.startAt.inclusive):null;return Sn(e.path,e.collectionGroup,t,e.filters,e.limit,n,r)}}function jn(e,t){const n=e.filters.concat([t]);return new _n(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}function Ln(e,t,n){return new _n(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function Mn(e,t){return kn(Rn(e),Rn(t))&&e.limitType===t.limitType}function Fn(e){return`${En(Rn(e))}|lt:${e.limitType}`}function Un(e){return`Query(target=${function(e){let t=e.path.canonicalString();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=`, filters: [${e.filters.map((e=>dn(e))).join(", ")}]`),ke(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=`, orderBy: [${e.orderBy.map((e=>function(e){return`${e.field.canonicalString()} (${e.dir})`}(e))).join(", ")}]`),e.startAt&&(t+=", startAt: ",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map((e=>Mt(e))).join(",")),e.endAt&&(t+=", endAt: ",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map((e=>Mt(e))).join(",")),`Target(${t})`}(Rn(e))}; limitType=${e.limitType})`}function Vn(e,t){return t.isFoundDocument()&&function(e,t){const n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):ce.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){for(const n of Nn(e))if(!n.field.isKeyField()&&null===t.data.field(n.field))return!1;return!0}(e,t)&&function(e,t){for(const n of e.filters)if(!n.matches(t))return!1;return!0}(e,t)&&function(e,t){return!(e.startAt&&!function(e,t,n){const r=Zt(e,t,n);return e.inclusive?r<=0:r<0}(e.startAt,Nn(e),t))&&!(e.endAt&&!function(e,t,n){const r=Zt(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,Nn(e),t))}(e,t)}function zn(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function Bn(e){return(t,n)=>{let r=!1;for(const i of Nn(e)){const e=$n(i,t,n);if(0!==e)return e;r=r||i.field.isKeyField()}return 0}}function $n(e,t,n){const r=e.field.isKeyField()?ce.comparator(t.key,n.key):function(e,t,n){const r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?Ot(r,i):N(42886)}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return N(19790,{direction:e.dir})}}class qn{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){const t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n)for(const[r,i]of n)if(this.equalsFn(r,e))return i}has(e){return void 0!==this.get(e)}set(e,t){const n=this.mapKeyFn(e),r=this.inner[n];if(void 0===r)return this.inner[n]=[[e,t]],void this.innerSize++;for(let i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return void(r[i]=[e,t]);r.push([e,t]),this.innerSize++}delete(e){const t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(let r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return 1===n.length?delete this.inner[t]:n.splice(r,1),this.innerSize--,!0;return!1}forEach(e){tt(this.inner,((t,n)=>{for(const[r,i]of n)e(r,i)}))}isEmpty(){return rt(this.inner)}size(){return this.innerSize}}const Hn=new it(ce.comparator);function Wn(){return Hn}const Gn=new it(ce.comparator);function Kn(){let e=Gn;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(const i of n)e=e.insert(i.key,i);return e}function Qn(e){let t=Gn;return e.forEach(((e,n)=>t=t.insert(e,n.overlayedDocument))),t}function Yn(){return Jn()}function Xn(){return Jn()}function Jn(){return new qn((e=>e.toString()),((e,t)=>e.isEqual(t)))}const Zn=new it(ce.comparator),er=new at(ce.comparator);function tr(){let e=er;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(const i of n)e=e.add(i);return e}const nr=new at(Q);function rr(){return nr}function ir(e,t){if(e.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Te(t)?"-0":t}}function sr(e){return{integerValue:""+e}}function or(e,t){return _e(t)?sr(t):ir(e,t)}class ar{constructor(){this._=void 0}}function lr(e,t,n){return e instanceof hr?function(e,t){const n={fields:{[vt]:{stringValue:gt},[bt]:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&wt(t)&&(t=xt(t)),t&&(n.fields[yt]=t),{mapValue:n}}(n,t):e instanceof dr?fr(e,t):e instanceof pr?mr(e,t):function(e,t){const n=ur(e,t),r=vr(n)+vr(e.Re);return zt(n)&&zt(e.Re)?sr(r):ir(e.serializer,r)}(e,t)}function cr(e,t,n){return e instanceof dr?fr(e,t):e instanceof pr?mr(e,t):n}function ur(e,t){return e instanceof gr?function(e){return zt(e)||function(e){return!!e&&"doubleValue"in e}(e)}(t)?t:{integerValue:0}:null}class hr extends ar{}class dr extends ar{constructor(e){super(),this.elements=e}}function fr(e,t){const n=yr(t);for(const r of e.elements)n.some((e=>Rt(e,r)))||n.push(r);return{arrayValue:{values:n}}}class pr extends ar{constructor(e){super(),this.elements=e}}function mr(e,t){let n=yr(t);for(const r of e.elements)n=n.filter((e=>!Rt(e,r)));return{arrayValue:{values:n}}}
2class gr extends ar{constructor(e,t){super(),this.serializer=e,this.Re=t}}function vr(e){return pt(e.integerValue||e.doubleValue)}function yr(e){return Bt(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class br{constructor(e,t){this.field=e,this.transform=t}}class wr{constructor(e,t){this.version=e,this.transformResults=t}}class xr{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new xr}static exists(e){return new xr(void 0,e)}static updateTime(e){return new xr(e)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function Sr(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}class Er{}function kr(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new Or(e.key,xr.none()):new Ir(e.key,e.data,xr.none());{const n=e.data,r=Qt.empty();let i=new at(le.comparator);for(let e of t.fields)if(!i.has(e)){let t=n.field(e);null===t&&e.length>1&&(e=e.popLast(),t=n.field(e)),null===t?r.delete(e):r.set(e,t),i=i.add(e)}return new Pr(e.key,r,new ct(i.toArray()),xr.none())}}function Tr(e,t,n){e instanceof Ir?function(e,t,n){const r=e.value.clone(),i=Rr(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(e,t,n):e instanceof Pr?function(e,t,n){if(!Sr(e.precondition,t))return void t.convertToUnknownDocument(n.version);const r=Rr(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(Nr(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function _r(e,t,n,r){return e instanceof Ir?function(e,t,n,r){if(!Sr(e.precondition,t))return n;const i=e.value.clone(),s=Dr(e.fieldTransforms,r,t);return i.setAll(s),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof Pr?function(e,t,n,r){if(!Sr(e.precondition,t))return n;const i=Dr(e.fieldTransforms,r,t),s=t.data;return s.setAll(Nr(e)),s.setAll(i),t.convertToFoundDocument(t.version,s).setHasLocalMutations(),null===n?null:n.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map((e=>e.field)))}(e,t,n,r):function(e,t,n){return Sr(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}(e,t,n)}function Cr(e,t){let n=null;for(const r of e.fieldTransforms){const e=t.data.field(r.field),i=ur(r.transform,e||null);null!=i&&(null===n&&(n=Qt.empty()),n.set(r.field,i))}return n||null}function Ar(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&!!function(e,t){return void 0===e&&void 0===t||!(!e||!t)&&Z(e,t,((e,t)=>function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof dr&&t instanceof dr||e instanceof pr&&t instanceof pr?Z(e.elements,t.elements,Rt):e instanceof gr&&t instanceof gr?Rt(e.Re,t.Re):e instanceof hr&&t instanceof hr}(e.transform,t.transform)}(e,t)))}(e.fieldTransforms,t.fieldTransforms)&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}class Ir extends Er{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];super(),this.key=e,this.value=t,this.precondition=n,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}}class Pr extends Er{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];super(),this.key=e,this.data=t,this.fieldMask=n,this.precondition=r,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}}function Nr(e){const t=new Map;return e.fieldMask.fields.forEach((n=>{if(!n.isEmpty()){const r=e.data.field(n);t.set(n,r)}})),t}function Rr(e,t,n){const r=new Map;D(e.length===n.length,32656,{Ve:n.length,me:e.length});for(let i=0;i<n.length;i++){const s=e[i],o=s.transform,a=t.data.field(s.field);r.set(s.field,cr(o,a,n[i]))}return r}function Dr(e,t,n){const r=new Map;for(const i of e){const e=i.transform,s=n.data.field(i.field);r.set(i.field,lr(e,s,t))}return r}
vendor: 4,195 bytes, line 2
2class Or extends Er{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class jr extends Er{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}class Lr{constructor(e,t,n,r){this.batchId=e,this.localWriteTime=t,this.baseMutations=n,this.mutations=r}applyToRemoteDocument(e,t){const n=t.mutationResults;for(let r=0;r<this.mutations.length;r++){const t=this.mutations[r];t.key.isEqual(e.key)&&Tr(t,e,n[r])}}applyToLocalView(e,t){for(const n of this.baseMutations)n.key.isEqual(e.key)&&(t=_r(n,e,t,this.localWriteTime));for(const n of this.mutations)n.key.isEqual(e.key)&&(t=_r(n,e,t,this.localWriteTime));return t}applyToLocalDocumentSet(e,t){const n=Xn();return this.mutations.forEach((r=>{const i=e.get(r.key),s=i.overlayedDocument;let o=this.applyToLocalView(s,i.mutatedFields);o=t.has(r.key)?null:o;const a=kr(s,o);null!==a&&n.set(r.key,a),s.isValidDocument()||s.convertToNoDocument(re.min())})),n}keys(){return this.mutations.reduce(((e,t)=>e.add(t.key)),tr())}isEqual(e){return this.batchId===e.batchId&&Z(this.mutations,e.mutations,((e,t)=>Ar(e,t)))&&Z(this.baseMutations,e.baseMutations,((e,t)=>Ar(e,t)))}}class Mr{constructor(e,t,n,r){this.batch=e,this.commitVersion=t,this.mutationResults=n,this.docVersions=r}static from(e,t,n){D(e.mutations.length===n.length,58842,{fe:e.mutations.length,ge:n.length});let r=Zn;const i=e.mutations;for(let s=0;s<i.length;s++)r=r.insert(i[s].key,n[s].version);return new Mr(e,t,n,r)}}class Fr{constructor(e,t){this.largestBatchId=e,this.mutation=t}getKey(){return this.mutation.key}isEqual(e){return null!==e&&this.mutation===e.mutation}toString(){return`Overlay{\n largestBatchId: ${this.largestBatchId},\n mutation: ${this.mutation.toString()}\n }`}}class Ur{constructor(e,t,n){this.alias=e,this.aggregateType=t,this.fieldPath=n}}class Vr{constructor(e,t){this.count=e,this.unchangedNames=t}}var zr,Br;function $r(e){switch(e){case j.OK:return N(64938);case j.CANCELLED:case j.UNKNOWN:case j.DEADLINE_EXCEEDED:case j.RESOURCE_EXHAUSTED:case j.INTERNAL:case j.UNAVAILABLE:case j.UNAUTHENTICATED:return!1;case j.INVALID_ARGUMENT:case j.NOT_FOUND:case j.ALREADY_EXISTS:case j.PERMISSION_DENIED:case j.FAILED_PRECONDITION:case j.ABORTED:case j.OUT_OF_RANGE:case j.UNIMPLEMENTED:case j.DATA_LOSS:return!0;default:return N(15467,{code:e})}}function qr(e){if(void 0===e)return A("GRPC error has no .code"),j.UNKNOWN;switch(e){case zr.OK:return j.OK;case zr.CANCELLED:return j.CANCELLED;case zr.UNKNOWN:return j.UNKNOWN;case zr.DEADLINE_EXCEEDED:return j.DEADLINE_EXCEEDED;case zr.RESOURCE_EXHAUSTED:return j.RESOURCE_EXHAUSTED;case zr.INTERNAL:return j.INTERNAL;case zr.UNAVAILABLE:return j.UNAVAILABLE;case zr.UNAUTHENTICATED:return j.UNAUTHENTICATED;case zr.INVALID_ARGUMENT:return j.INVALID_ARGUMENT;case zr.NOT_FOUND:return j.NOT_FOUND;case zr.ALREADY_EXISTS:return j.ALREADY_EXISTS;case zr.PERMISSION_DENIED:return j.PERMISSION_DENIED;case zr.FAILED_PRECONDITION:return j.FAILED_PRECONDITION;case zr.ABORTED:return j.ABORTED;case zr.OUT_OF_RANGE:return j.OUT_OF_RANGE;case zr.UNIMPLEMENTED:return j.UNIMPLEMENTED;case zr.DATA_LOSS:return j.DATA_LOSS;default:return N(39323,{code:e})}}(Br=zr||(zr={}))[Br.OK=0]="OK",Br[Br.CANCELLED=1]="CANCELLED",Br[Br.UNKNOWN=2]="UNKNOWN",Br[Br.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Br[Br.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Br[Br.NOT_FOUND=5]="NOT_FOUND",Br[Br.ALREADY_EXISTS=6]="ALREADY_EXISTS",Br[Br.PERMISSION_DENIED=7]="PERMISSION_DENIED",Br[Br.UNAUTHENTICATED=16]="UNAUTHENTICATED",Br[Br.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Br[Br.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Br[Br.ABORTED=10]="ABORTED",Br[Br.OUT_OF_RANGE=11]="OUT_OF_RANGE",Br[Br.UNIMPLEMENTED=12]="UNIMPLEMENTED",Br[Br.INTERNAL=13]="INTERNAL",Br[Br.UNAVAILABLE=14]="UNAVAILABLE",Br[Br.DATA_LOSS=15]="DATA_LOSS";let Hr=null;const Wr=new r([4294967295,4294967295],0);function Gr(e){const t=G().encode(e),n=new i;return n.update(t),new Uint8Array(n.digest())}function Kr(e){const t=new DataView(e.buffer),n=t.getUint32(0,!0),i=t.getUint32(4,!0),s=t.getUint32(8,!0),o=t.getUint32(12,!0);
2return[new r([n,i],0),new r([s,o],0)]}class Qr{constructor(e,t,n){if(this.bitmap=e,this.padding=t,this.hashCount=n,t<0||t>=8)throw new Yr(`Invalid padding: ${t}`);if(n<0)throw new Yr(`Invalid hash count: ${n}`);if(e.length>0&&0===this.hashCount)throw new Yr(`Invalid hash count: ${n}`);if(0===e.length&&0!==t)throw new Yr(`Invalid padding when bitmap length is 0: ${t}`);this.pe=8*e.length-t,this.ye=r.fromNumber(this.pe)}we(e,t,n){let i=e.add(t.multiply(r.fromNumber(n)));return 1===i.compare(Wr)&&(i=new r([i.getBits(0),i.getBits(1)],0)),i.modulo(this.ye).toNumber()}be(e){return!!(this.bitmap[Math.floor(e/8)]&1<<e%8)}mightContain(e){if(0===this.pe)return!1;const t=Gr(e),[n,r]=Kr(t);for(let i=0;i<this.hashCount;i++){const e=this.we(n,r,i);if(!this.be(e))return!1}return!0}static create(e,t,n){const r=e%8==0?0:8-e%8,i=new Uint8Array(Math.ceil(e/8)),s=new Qr(i,r,t);return n.forEach((e=>s.insert(e))),s}insert(e){if(0===this.pe)return;const t=Gr(e),[n,r]=Kr(t);for(let i=0;i<this.hashCount;i++){const e=this.we(n,r,i);this.Se(e)}}Se(e){const t=Math.floor(e/8),n=e%8;this.bitmap[t]|=1<<n}}class Yr extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}class Xr{constructor(e,t,n,r,i){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=n,this.documentUpdates=r,this.resolvedLimboDocuments=i}static createSynthesizedRemoteEventForCurrentChange(e,t,n){const r=new Map;return r.set(e,Jr.createSynthesizedTargetChangeForCurrentChange(e,t,n)),new Xr(re.min(),r,new it(Q),Wn(),tr())}}class Jr{constructor(e,t,n,r,i){this.resumeToken=e,this.current=t,this.addedDocuments=n,this.modifiedDocuments=r,this.removedDocuments=i}static createSynthesizedTargetChangeForCurrentChange(e,t,n){return new Jr(n,t,tr(),tr(),tr())}}class Zr{constructor(e,t,n,r){this.De=e,this.removedTargetIds=t,this.key=n,this.ve=r}}class ei{constructor(e,t){this.targetId=e,this.Ce=t}}class ti{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ht.EMPTY_BYTE_STRING,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r}}class ni{constructor(){this.Fe=0,this.Me=si(),this.xe=ht.EMPTY_BYTE_STRING,this.Oe=!1,this.Ne=!0}get current(){return this.Oe}get resumeToken(){return this.xe}get Be(){return 0!==this.Fe}get Le(){return this.Ne}ke(e){e.approximateByteSize()>0&&(this.Ne=!0,this.xe=e)}qe(){let e=tr(),t=tr(),n=tr();return this.Me.forEach(((r,i)=>{switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:N(38017,{changeType:i})}})),new Jr(this.xe,this.Oe,e,t,n)}Qe(){this.Ne=!1,this.Me=si()}$e(e,t){this.Ne=!0,this.Me=this.Me.insert(e,t)}Ue(e){this.Ne=!0,this.Me=this.Me.remove(e)}Ke(){this.Fe+=1}We(){this.Fe-=1,D(this.Fe>=0,3241,{Fe:this.Fe})}Ge(){this.Ne=!0,this.Oe=!0}}class ri{constructor(e){this.ze=e,this.je=new Map,this.He=Wn(),this.Je=ii(),this.Ye=ii(),this.Ze=new it(Q)}Xe(e){for(const t of e.De)e.ve&&e.ve.isFoundDocument()?this.et(t,e.ve):this.tt(t,e.key,e.ve);for(const t of e.removedTargetIds)this.tt(t,e.key,e.ve)}nt(e){this.forEachTarget(e,(t=>{const n=this.rt(t);switch(e.state){case 0:this.it(t)&&n.ke(e.resumeToken);break;case 1:n.We(),n.Be||n.Qe(),n.ke(e.resumeToken);break;case 2:n.We(),n.Be||this.removeTarget(t);break;case 3:this.it(t)&&(n.Ge(),n.ke(e.resumeToken));break;case 4:this.it(t)&&(this.st(t),n.ke(e.resumeToken));break;default:N(56790,{state:e.state})}}))}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.je.forEach(((e,n)=>{this.it(n)&&t(n)}))}ot(e){const t=e.targetId,n=e.Ce.count,r=this._t(t);if(r){const i=r.target;if(Tn(i))if(0===n){const e=new ce(i.path);this.tt(t,e,Xt.newNoDocument(e,re.min()))}else D(1===n,20013,{expectedCount:n});else{const r=this.ut(t);if(r!==n){const n=this.ct(e),i=n?this.lt(n,e,r):1;if(0!==i){this.st(t);const e=2===i?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Ze=this.Ze.insert(t,e)}null==Hr||Hr.ht(function(e,t,n,r,i){var s,o,a,l,c,u;const h={localCacheCount:e,existenceFilterCount:t.count,databaseId:n.database,projectId:n.projectId},d=t.unchangedNames;return d&&(h.bloomFilter={applied:0===i,hashCount:null!==(s=null==d?void 0:d.hashCount)&&void 0!==s?s:0,bitmapLength:null!==(l=null===(a=null===(o=null==d?void 0:d.bits)||void 0===o?void 0:o.bitmap)||void 0===a?void 0:a.length)&&void 0!==l?l:0,padding:null!==(u=null===(c=null==d?void 0:d.bits)||void 0===c?void 0:c.padding)&&void 0!==u?u:0,mightContain:e=>{var t;return null!==(t=null==r?void 0:r.mightContain(e))&&void 0!==t&&t}}),h}(r,e.Ce,this.ze.Pt(),n,i))}}}}ct(e){const t=e.Ce.unchangedNames;if(!t||!t.bits)return null;const{bits:{bitmap:n="",padding:r=0},hashCount:i=0}=t;let s,o;try{s=mt(n).toUint8Array()}catch(e){if(e instanceof ut)return I("Decoding the base64 bloom filter in existence filter failed ("+e.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw e}try{o=new Qr(s,r,i)}catch(e){return I(e instanceof Yr?"BloomFilter error: ":"Applying bloom filter failed: ",e),null}return 0===o.pe?null:o}lt(e,t,n){return t.Ce.count===n-this.Tt(e,t.targetId)?0:2}Tt(e,t){const n=this.ze.getRemoteKeysForTarget(t);let r=0;
2return n.forEach((n=>{const i=this.ze.Pt(),s=`projects/${i.projectId}/databases/${i.database}/documents/${n.path.canonicalString()}`;e.mightContain(s)||(this.tt(t,n,null),r++)})),r}It(e){const t=new Map;this.je.forEach(((n,r)=>{const i=this._t(r);if(i){if(n.current&&Tn(i.target)){const t=new ce(i.target.path);this.Et(t).has(r)||this.dt(r,t)||this.tt(r,t,Xt.newNoDocument(t,e))}n.Le&&(t.set(r,n.qe()),n.Qe())}}));let n=tr();this.Ye.forEach(((e,t)=>{let r=!0;t.forEachWhile((e=>{const t=this._t(e);return!t||"TargetPurposeLimboResolution"===t.purpose||(r=!1,!1)})),r&&(n=n.add(e))})),this.He.forEach(((t,n)=>n.setReadTime(e)));const r=new Xr(e,t,this.Ze,this.He,n);return this.He=Wn(),this.Je=ii(),this.Ye=ii(),this.Ze=new it(Q),r}et(e,t){if(!this.it(e))return;const n=this.dt(e,t.key)?2:0;this.rt(e).$e(t.key,n),this.He=this.He.insert(t.key,t),this.Je=this.Je.insert(t.key,this.Et(t.key).add(e)),this.Ye=this.Ye.insert(t.key,this.At(t.key).add(e))}tt(e,t,n){if(!this.it(e))return;const r=this.rt(e);this.dt(e,t)?r.$e(t,1):r.Ue(t),this.Ye=this.Ye.insert(t,this.At(t).delete(e)),this.Ye=this.Ye.insert(t,this.At(t).add(e)),n&&(this.He=this.He.insert(t,n))}removeTarget(e){this.je.delete(e)}ut(e){const t=this.rt(e).qe();return this.ze.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}Ke(e){this.rt(e).Ke()}rt(e){let t=this.je.get(e);return t||(t=new ni,this.je.set(e,t)),t}At(e){let t=this.Ye.get(e);return t||(t=new at(Q),this.Ye=this.Ye.insert(e,t)),t}Et(e){let t=this.Je.get(e);return t||(t=new at(Q),this.Je=this.Je.insert(e,t)),t}it(e){const t=null!==this._t(e);return t||C("WatchChangeAggregator","Detected inactive target",e),t}_t(e){const t=this.je.get(e);return t&&t.Be?null:this.ze.Rt(e)}st(e){this.je.set(e,new ni),this.ze.getRemoteKeysForTarget(e).forEach((t=>{this.tt(e,t,null)}))}dt(e,t){return this.ze.getRemoteKeysForTarget(e).has(t)}}function ii(){return new it(ce.comparator)}function si(){return new it(ce.comparator)}const oi={asc:"ASCENDING",desc:"DESCENDING"},ai={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},li={and:"AND",or:"OR"};class ci{constructor(e,t){this.databaseId=e,this.useProto3Json=t}}function ui(e,t){return e.useProto3Json||ke(t)?t:{value:t}}function hi(e,t){return e.useProto3Json?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function di(e,t){return e.useProto3Json?t.toBase64():t.toUint8Array()}function fi(e,t){return hi(e,t.toTimestamp())}function pi(e){return D(!!e,49232),re.fromTimestamp(function(e){const t=ft(e);return new ne(t.seconds,t.nanos)}(e))}function mi(e,t){return gi(e,t).canonicalString()}function gi(e,t){const n=function(e){return new oe(["projects",e.projectId,"databases",e.database])}(e).child("documents");return void 0===t?n:n.child(t)}function vi(e){const t=oe.fromString(e);return D(Fi(t),10190,{key:t.toString()}),t}function yi(e,t){return mi(e.databaseId,t.path)}function bi(e,t){const n=vi(t);if(n.get(1)!==e.databaseId.projectId)throw new L(j.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new L(j.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new ce(Ei(n))}function wi(e,t){return mi(e.databaseId,t)}function xi(e){const t=vi(e);return 4===t.length?oe.emptyPath():Ei(t)}function Si(e){return new oe(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function Ei(e){return D(e.length>4&&"documents"===e.get(4),29091,{key:e.toString()}),e.popFirst(5)}function ki(e,t,n){return{name:yi(e,t),fields:n.value.mapValue.fields}}function Ti(e,t){let n;if(t instanceof Ir)n={update:ki(e,t.key,t.value)};else if(t instanceof Or)n={delete:yi(e,t.key)};else if(t instanceof Pr)n={update:ki(e,t.key,t.data),updateMask:Mi(t.fieldMask)};
2else{if(!(t instanceof jr))return N(16599,{ft:t.type});n={verify:yi(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map((e=>function(e,t){const n=t.transform;if(n instanceof hr)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof dr)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof pr)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof gr)return{fieldPath:t.field.canonicalString(),increment:n.Re};throw N(20930,{transform:t.transform})}(0,e)))),t.precondition.isNone||(n.currentDocument=function(e,t){return void 0!==t.updateTime?{updateTime:fi(e,t.updateTime)}:void 0!==t.exists?{exists:t.exists}:N(27497)}(e,t.precondition)),n}function _i(e,t){return{documents:[wi(e,t.path)]}}function Ci(e,t){const n={structuredQuery:{}},r=t.path;let i;null!==t.collectionGroup?(i=r,n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(i=r.popLast(),n.structuredQuery.from=[{collectionId:r.lastSegment()}]),n.parent=wi(e,i);const s=function(e){if(0!==e.length)return Li(on.create(e,"and"))}(t.filters);s&&(n.structuredQuery.where=s);const o=function(e){if(0!==e.length)return e.map((e=>function(e){return{field:Oi(e.field),direction:Ni(e.dir)}}(e)))}(t.orderBy);o&&(n.structuredQuery.orderBy=o);const a=ui(e,t.limit);return null!==a&&(n.structuredQuery.limit=a),t.startAt&&(n.structuredQuery.startAt=function(e){return{before:e.inclusive,values:e.position}}(t.startAt)),t.endAt&&(n.structuredQuery.endAt=function(e){return{before:!e.inclusive,values:e.position}}(t.endAt)),{gt:n,parent:i}}function Ai(e,t,n,r){const{gt:i,parent:s}=Ci(e,t),o={},a=[];let l=0;return n.forEach((e=>{const t=r?e.alias:"aggregate_"+l++;o[t]=e.alias,"count"===e.aggregateType?a.push({alias:t,count:{}}):"avg"===e.aggregateType?a.push({alias:t,avg:{field:Oi(e.fieldPath)}}):"sum"===e.aggregateType&&a.push({alias:t,sum:{field:Oi(e.fieldPath)}})})),{request:{structuredAggregationQuery:{aggregations:a,structuredQuery:i.structuredQuery},parent:i.parent},yt:o,parent:s}}function Ii(e){let t=xi(e.parent);const n=e.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){D(1===r,65062);const e=n.from[0];e.allDescendants?i=e.collectionId:t=t.child(e.collectionId)}let s=[];n.where&&(s=function(e){const t=Pi(e);return t instanceof on&&ln(t)?t.getFilters():[t]}(n.where));let o=[];n.orderBy&&(o=function(e){return e.map((e=>function(e){return new tn(ji(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e)))}(n.orderBy));let a=null;n.limit&&(a=function(e){let t;return t="object"==typeof e?e.value:e,ke(t)?null:t}(n.limit));let l=null;n.startAt&&(l=function(e){const t=!!e.before,n=e.values||[];return new Jt(n,t)}(n.startAt));let c=null;return n.endAt&&(c=function(e){const t=!e.before,n=e.values||[];return new Jt(n,t)}(n.endAt)),Cn(t,i,o,s,a,"F",l,c)}function Pi(e){return void 0!==e.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":const t=ji(e.unaryFilter.field);return sn.create(t,"==",{doubleValue:NaN});case"IS_NULL":const n=ji(e.unaryFilter.field);return sn.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const r=ji(e.unaryFilter.field);return sn.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const i=ji(e.unaryFilter.field);return sn.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":return N(61313);default:return N(60726)}}(e):void 0!==e.fieldFilter?function(e){return sn.create(ji(e.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":return N(58110);default:return N(50506)}}(e.fieldFilter.op),e.fieldFilter.value)}(e):void 0!==e.compositeFilter?function(e){return on.create(e.compositeFilter.filters.map((e=>Pi(e))),function(e){switch(e){case"AND":return"and";case"OR":return"or";default:return N(1026)}}(e.compositeFilter.op))}(e):N(30097,{filter:e})}function Ni(e){return oi[e]}function Ri(e){return ai[e]}function Di(e){return li[e]}function Oi(e){return{fieldPath:e.canonicalString()}}function ji(e){return le.fromServerFormat(e.fieldPath)}function Li(e){return e instanceof sn?function(e){if("=="===e.op){if(qt(e.value))return{unaryFilter:{field:Oi(e.field),op:"IS_NAN"}};if($t(e.value))return{unaryFilter:{field:Oi(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(qt(e.value))return{unaryFilter:{field:Oi(e.field),op:"IS_NOT_NA
2N"}};if($t(e.value))return{unaryFilter:{field:Oi(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Oi(e.field),op:Ri(e.op),value:e.value}}}(e):e instanceof on?function(e){const t=e.getFilters().map((e=>Li(e)));return 1===t.length?t[0]:{compositeFilter:{op:Di(e.op),filters:t}}}(e):N(54877,{filter:e})}function Mi(e){const t=[];return e.fields.forEach((e=>t.push(e.canonicalString()))),{fieldPaths:t}}function Fi(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}class Ui{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:re.min(),s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:re.min(),o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:ht.EMPTY_BYTE_STRING,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;this.target=e,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=o,this.expectedCount=a}withSequenceNumber(e){return new Ui(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,t){return new Ui(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new Ui(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new Ui(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}class Vi{constructor(e){this.wt=e}}function zi(e){const t=Ii({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?Ln(t,t.limit,"L"):t}class Bi{constructor(){}vt(e,t){this.Ct(e,t),t.Ft()}Ct(e,t){if("nullValue"in e)this.Mt(t,5);else if("booleanValue"in e)this.Mt(t,10),t.xt(e.booleanValue?1:0);else if("integerValue"in e)this.Mt(t,15),t.xt(pt(e.integerValue));else if("doubleValue"in e){const n=pt(e.doubleValue);isNaN(n)?this.Mt(t,13):(this.Mt(t,15),Te(n)?t.xt(0):t.xt(n))}else if("timestampValue"in e){let n=e.timestampValue;this.Mt(t,20),"string"==typeof n&&(n=ft(n)),t.Ot(`${n.seconds||""}`),t.xt(n.nanos||0)}else if("stringValue"in e)this.Nt(e.stringValue,t),this.Bt(t);else if("bytesValue"in e)this.Mt(t,30),t.Lt(mt(e.bytesValue)),this.Bt(t);else if("referenceValue"in e)this.kt(e.referenceValue,t);else if("geoPointValue"in e){const n=e.geoPointValue;this.Mt(t,45),t.xt(n.latitude||0),t.xt(n.longitude||0)}else"mapValue"in e?Kt(e)?this.Mt(t,Number.MAX_SAFE_INTEGER):Wt(e)?this.qt(e.mapValue,t):(this.Qt(e.mapValue,t),this.Bt(t)):"arrayValue"in e?(this.$t(e.arrayValue,t),this.Bt(t)):N(19022,{Ut:e})}Nt(e,t){this.Mt(t,25),this.Kt(e,t)}Kt(e,t){t.Ot(e)}Qt(e,t){const n=e.fields||{};this.Mt(t,55);for(const r of Object.keys(n))this.Nt(r,t),this.Ct(n[r],t)}qt(e,t){var n,r;const i=e.fields||{};this.Mt(t,53);const s=Pt,o=(null===(r=null===(n=i[s].arrayValue)||void 0===n?void 0:n.values)||void 0===r?void 0:r.length)||0;this.Mt(t,15),t.xt(pt(o)),this.Nt(s,t),this.Ct(i[s],t)}$t(e,t){const n=e.values||[];this.Mt(t,50);for(const r of n)this.Ct(r,t)}kt(e,t){this.Mt(t,37),ce.fromName(e).path.forEach((e=>{this.Mt(t,60),this.Kt(e,t)}))}Mt(e,t){e.xt(t)}Bt(e){e.xt(2)}}Bi.Wt=new Bi;class $i{constructor(){this.yn=new qi}addToCollectionParentIndex(e,t){return this.yn.add(t),be.resolve()}getCollectionParents(e,t){return be.resolve(this.yn.getEntries(t))}addFieldIndex(e,t){return be.resolve()}deleteFieldIndex(e,t){return be.resolve()}deleteAllFieldIndexes(e){return be.resolve()}createTargetIndexes(e,t){return be.resolve()}getDocumentsMatchingTarget(e,t){return be.resolve(null)}getIndexType(e,t){return be.resolve(0)}getFieldIndexes(e,t){return be.resolve([])}getNextCollectionGroupToUpdate(e){return be.resolve(null)}getMinOffset(e,t){return be.resolve(pe.min())}getMinOffsetFromCollectionGroup(e,t){return be.resolve(pe.min())}updateCollectionGroup(e,t,n){return be.resolve()}updateIndexEntries(e,t){return be.resolve()}}class qi{constructor(){this.index={}}add(e){const t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new at(oe.comparator),i=!r.has(n);return this.index[t]=r.add(n),i}has(e){const t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)}getEntries(e){return(this.index[e]||new at(oe.comparator)).toArray()}}new Uint8Array(0);const Hi={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},Wi=41943040;class Gi{static withCacheSize(e){return new Gi(e,Gi.DEFAULT_COLLECTION_PE
vendor: 4,844 bytes, line 2
2RCENTILE,Gi.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor(e,t,n){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}}Gi.DEFAULT_COLLECTION_PERCENTILE=10,Gi.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Gi.DEFAULT=new Gi(Wi,Gi.DEFAULT_COLLECTION_PERCENTILE,Gi.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Gi.DISABLED=new Gi(-1,0,0);class Ki{constructor(e){this.nr=e}next(){return this.nr+=2,this.nr}static rr(){return new Ki(0)}static ir(){return new Ki(-1)}}const Qi="LruGarbageCollector",Yi=1048576;function Xi(e,t){let[n,r]=e,[i,s]=t;const o=Q(n,i);return 0===o?Q(r,s):o}class Ji{constructor(e){this.cr=e,this.buffer=new at(Xi),this.lr=0}hr(){return++this.lr}Pr(e){const t=[e,this.hr()];if(this.buffer.size<this.cr)this.buffer=this.buffer.add(t);else{const e=this.buffer.last();Xi(t,e)<0&&(this.buffer=this.buffer.delete(e).add(t))}}get maxValue(){return this.buffer.last()[0]}}class Zi{constructor(e,t,n){this.garbageCollector=e,this.asyncQueue=t,this.localStore=n,this.Tr=null}start(){-1!==this.garbageCollector.params.cacheSizeCollectionThreshold&&this.Ir(6e4)}stop(){this.Tr&&(this.Tr.cancel(),this.Tr=null)}get started(){return null!==this.Tr}Ir(e){C(Qi,`Garbage collection scheduled in ${e}ms`),this.Tr=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,(async()=>{this.Tr=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(e){xe(e)?C(Qi,"Ignoring IndexedDB error during garbage collection: ",e):await ye(e)}await this.Ir(3e5)}))}}class es{constructor(e,t){this.Er=e,this.params=t}calculateTargetCount(e,t){return this.Er.dr(e).next((e=>Math.floor(t/100*e)))}nthSequenceNumber(e,t){if(0===t)return be.resolve(Se.le);const n=new Ji(t);return this.Er.forEachTarget(e,(e=>n.Pr(e.sequenceNumber))).next((()=>this.Er.Ar(e,(e=>n.Pr(e))))).next((()=>n.maxValue))}removeTargets(e,t,n){return this.Er.removeTargets(e,t,n)}removeOrphanedDocuments(e,t){return this.Er.removeOrphanedDocuments(e,t)}collect(e,t){return-1===this.params.cacheSizeCollectionThreshold?(C("LruGarbageCollector","Garbage collection skipped; disabled"),be.resolve(Hi)):this.getCacheSize(e).next((n=>n<this.params.cacheSizeCollectionThreshold?(C("LruGarbageCollector",`Garbage collection skipped; Cache size ${n} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),Hi):this.Rr(e,t)))}getCacheSize(e){return this.Er.getCacheSize(e)}Rr(e,t){let n,r,i,s,o,l,c;const u=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next((t=>(t>this.params.maximumSequenceNumbersToCollect?(C("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${t}`),r=this.params.maximumSequenceNumbersToCollect):r=t,s=Date.now(),this.nthSequenceNumber(e,r)))).next((r=>(n=r,o=Date.now(),this.removeTargets(e,n,t)))).next((t=>(i=t,l=Date.now(),this.removeOrphanedDocuments(e,n)))).next((e=>(c=Date.now(),_()<=a.$b.DEBUG&&C("LruGarbageCollector",`LRU Garbage Collection\n\tCounted targets in ${s-u}ms\n\tDetermined least recently used ${r} in `+(o-s)+"ms\n"+`\tRemoved ${i} targets in `+(l-o)+"ms\n"+`\tRemoved ${e} documents in `+(c-l)+"ms\n"+`Total Duration: ${c-u}ms`),be.resolve({didRun:!0,sequenceNumbersCollected:r,targetsRemoved:i,documentsRemoved:e}))))}}function ts(e,t){return new es(e,t)}class ns{constructor(){this.changes=new qn((e=>e.toString()),((e,t)=>e.isEqual(t))),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,Xt.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();const n=this.changes.get(t);return void 0!==n?be.resolve(n):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}class rs{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}class is{constructor(e,t,n,r){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=n,this.indexManager=r}getDocument(e,t){let n=null;return this.documentOverlayCache.getOverlay(e,t).next((r=>(n=r,this.remoteDocumentCache.getEntry(e,t)))).next((e=>(null!==n&&_r(n.mutation,e,ct.empty(),ne.now()),e)))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next((t=>this.getLocalViewOfDocuments(e,t,tr()).next((()=>t))))}getLocalViewOfDocuments(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tr();const r=Yn();return this.populateOverlays(e,r,t).next((()=>this.computeViews(e,t,r,n).next((e=>{let t=Kn();return e.forEach(((e,n)=>{t=t.insert(e,n.overlayedDocument)})),t}))))}getOverlayedDocuments(e,t){const n=Yn();return this.populateOverlays(e,n,t).next((()=>this.computeViews(e,t,n,tr())))}populateOverlays(e,t,n){const r=[];
vendor: 6,521 bytes, line 2
2return n.forEach((e=>{t.has(e)||r.push(e)})),this.documentOverlayCache.getOverlays(e,r).next((e=>{e.forEach(((e,n)=>{t.set(e,n)}))}))}computeViews(e,t,n,r){let i=Wn();const s=Jn(),o=Jn();return t.forEach(((e,t)=>{const o=n.get(t.key);r.has(t.key)&&(void 0===o||o.mutation instanceof Pr)?i=i.insert(t.key,t):void 0!==o?(s.set(t.key,o.mutation.getFieldMask()),_r(o.mutation,t,o.mutation.getFieldMask(),ne.now())):s.set(t.key,ct.empty())})),this.recalculateAndSaveOverlays(e,i).next((e=>(e.forEach(((e,t)=>s.set(e,t))),t.forEach(((e,t)=>{var n;return o.set(e,new rs(t,null!==(n=s.get(e))&&void 0!==n?n:null))})),o)))}recalculateAndSaveOverlays(e,t){const n=Jn();let r=new it(((e,t)=>e-t)),i=tr();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next((e=>{for(const i of e)i.keys().forEach((e=>{const s=t.get(e);if(null===s)return;let o=n.get(e)||ct.empty();o=i.applyToLocalView(s,o),n.set(e,o);const a=(r.get(i.batchId)||tr()).add(e);r=r.insert(i.batchId,a)}))})).next((()=>{const s=[],o=r.getReverseIterator();for(;o.hasNext();){const r=o.getNext(),a=r.key,l=r.value,c=Xn();l.forEach((e=>{if(!i.has(e)){const r=kr(t.get(e),n.get(e));null!==r&&c.set(e,r),i=i.add(e)}})),s.push(this.documentOverlayCache.saveOverlays(e,a,c))}return be.waitFor(s)})).next((()=>n))}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next((t=>this.recalculateAndSaveOverlays(e,t)))}getDocumentsMatchingQuery(e,t,n,r){return function(e){return ce.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.getDocumentsMatchingDocumentQuery(e,t.path):Pn(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,n,r):this.getDocumentsMatchingCollectionQuery(e,t,n,r)}getNextDocuments(e,t,n,r){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,n,r).next((i=>{const s=r-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,n.largestBatchId,r-i.size):be.resolve(Yn());let o=ue,a=i;return s.next((t=>be.forEach(t,((t,n)=>(o<n.largestBatchId&&(o=n.largestBatchId),i.get(t)?be.resolve():this.remoteDocumentCache.getEntry(e,t).next((e=>{a=a.insert(t,e)}))))).next((()=>this.populateOverlays(e,t,i))).next((()=>this.computeViews(e,a,t,tr()))).next((e=>({batchId:o,changes:Qn(e)})))))}))}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new ce(t)).next((e=>{let t=Kn();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))}getDocumentsMatchingCollectionGroupQuery(e,t,n,r){const i=t.collectionGroup;let s=Kn();return this.indexManager.getCollectionParents(e,i).next((o=>be.forEach(o,(o=>{const a=function(e,t){return new _n(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,o.child(i));return this.getDocumentsMatchingCollectionQuery(e,a,n,r).next((e=>{e.forEach(((e,t)=>{s=s.insert(e,t)}))}))})).next((()=>s))))}getDocumentsMatchingCollectionQuery(e,t,n,r){let i;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,n.largestBatchId).next((s=>(i=s,this.remoteDocumentCache.getDocumentsMatchingQuery(e,t,n,i,r)))).next((e=>{i.forEach(((t,n)=>{const r=n.getKey();null===e.get(r)&&(e=e.insert(r,Xt.newInvalidDocument(r)))}));let n=Kn();return e.forEach(((e,r)=>{const s=i.get(e);void 0!==s&&_r(s.mutation,r,ct.empty(),ne.now()),Vn(t,r)&&(n=n.insert(e,r))})),n}))}}class ss{constructor(e){this.serializer=e,this.Fr=new Map,this.Mr=new Map}getBundleMetadata(e,t){return be.resolve(this.Fr.get(t))}saveBundleMetadata(e,t){return this.Fr.set(t.id,function(e){return{id:e.id,version:e.version,createTime:pi(e.createTime)}}(t)),be.resolve()}getNamedQuery(e,t){return be.resolve(this.Mr.get(t))}saveNamedQuery(e,t){return this.Mr.set(t.name,function(e){return{name:e.name,query:zi(e.bundledQuery),readTime:pi(e.readTime)}}(t)),be.resolve()}}class os{constructor(){this.overlays=new it(ce.comparator),this.Or=new Map}getOverlay(e,t){return be.resolve(this.overlays.get(t))}getOverlays(e,t){const n=Yn();return be.forEach(t,(t=>this.getOverlay(e,t).next((e=>{null!==e&&n.set(t,e)})))).next((()=>n))}saveOverlays(e,t,n){return n.forEach(((n,r)=>{this.St(e,t,r)})),be.resolve()}removeOverlaysForBatchId(e,t,n){const r=this.Or.get(n);return void 0!==r&&(r.forEach((e=>this.overlays=this.overlays.remove(e))),this.Or.delete(n)),be.resolve()}getOverlaysForCollection(e,t,n){const r=Yn(),i=t.length+1,s=new ce(t.child("")),o=this.overlays.getIteratorFrom(s);for(;o.hasNext();){const e=o.getNext().value,s=e.getKey();if(!t.isPrefixOf(s.path))break;s.path.length===i&&e.largestBatchId>n&&r.set(e.getKey(),e)}return be.resolve(r)}getOverlaysForCollectionGroup(e,t,n,r){let i=new it(((e,t)=>e-t));const s=this.overlays.getIterator();for(;s.hasNext();){const e=s.getNext().value;if(e.getKey().getCollectionGroup()===t&&e.largestBatchId>n){let t=i.get(e.largestBatchId);null===t&&(t=Yn(),i=i.insert(e.largestBatchId,t)),t.set(e.getKey(),e)}}const o=Yn(),a=i.getIterator();for(;a.hasNext()&&(a.getNext().value.forEach(((e,t)=>o.set(e,t))),!(o.size()>=r)););return be.resolve(o)}St(e,t,n){const r=this.overlays.get(n.key);if(null!==r){const e=this.Or.get(r.largestBatchId).delete(n.key);this.Or.set(r.largestBatchId,e)}this.overlays=this.overlays.insert(n.key,new Fr(t,n));let i=this.Or.get(t);void 0===i&&(i=tr(),this.Or.set(t,i)),this.Or.set(t,i.add(n.key))}}class as{constructor(){this.sessionToken=ht.EMPTY_BYTE_STRING}getSessionToken(e){return be.resolve(this.sessionToken)}setSessionToken(e,t){return this.sessionToken=t,be.resolve()}}class ls{constructor(){this.Nr=new at(cs.Br),this.Lr=new at(cs.kr)}isEmpty(){return this.Nr.isEmpty()}addReference(e,t){const n=new cs(e,t);this.Nr=this.Nr.add(n),this.Lr=this.Lr.add(n)}qr(e,t){e.forEach((e=>this.addReference(e,t)))}removeReference(e,t){this.Qr(new cs(e,t))}$r(e,t){e.forEach((e=>this.removeReference(e,t)))}Ur(e){const t=new ce(new oe([])),n=new cs(t,e),r=new cs(t,e+1),i=[];return this.Lr.forEachInRange([n,r],(e=>{this.Qr(e),i.push(e.key)})),i}Kr(){this.Nr.forEach((e=>this.Qr(e)))}Qr(e){this.Nr=this.Nr.delete(e),this.Lr=this.Lr.delete(e)}Wr(e){const t=new ce(new oe([])),n=new cs(t,e),r=new cs(t,e+1);let i=tr();return this.Lr.forEachInRange([n,r],(e=>{i=i.add(e.key)})),i}containsKey(e){const t=new cs(e,0),n=this.Nr.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}class cs{constructor(e,t){this.key=e,this.Gr=t}static Br(e,t){return ce.comparator(e.key,t.key)||Q(e.Gr,t.Gr)}static kr(e,t){return Q(e.Gr,t.Gr)||ce.comparator(e.key,t.key)}}class us{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutation
vendor: 13,944 bytes, line 2
2Queue=[],this.Jn=1,this.zr=new at(cs.Br)}checkEmpty(e){return be.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,n,r){const i=this.Jn;this.Jn++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const s=new Lr(i,t,n,r);this.mutationQueue.push(s);for(const o of r)this.zr=this.zr.add(new cs(o.key,i)),this.indexManager.addToCollectionParentIndex(e,o.key.path.popLast());return be.resolve(s)}lookupMutationBatch(e,t){return be.resolve(this.jr(t))}getNextMutationBatchAfterBatchId(e,t){const n=t+1,r=this.Hr(n),i=r<0?0:r;return be.resolve(this.mutationQueue.length>i?this.mutationQueue[i]:null)}getHighestUnacknowledgedBatchId(){return be.resolve(0===this.mutationQueue.length?Ee:this.Jn-1)}getAllMutationBatches(e){return be.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){const n=new cs(t,0),r=new cs(t,Number.POSITIVE_INFINITY),i=[];return this.zr.forEachInRange([n,r],(e=>{const t=this.jr(e.Gr);i.push(t)})),be.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let n=new at(Q);return t.forEach((e=>{const t=new cs(e,0),r=new cs(e,Number.POSITIVE_INFINITY);this.zr.forEachInRange([t,r],(e=>{n=n.add(e.Gr)}))})),be.resolve(this.Jr(n))}getAllMutationBatchesAffectingQuery(e,t){const n=t.path,r=n.length+1;let i=n;ce.isDocumentKey(i)||(i=i.child(""));const s=new cs(new ce(i),0);let o=new at(Q);return this.zr.forEachWhile((e=>{const t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(o=o.add(e.Gr)),!0)}),s),be.resolve(this.Jr(o))}Jr(e){const t=[];return e.forEach((e=>{const n=this.jr(e);null!==n&&t.push(n)})),t}removeMutationBatch(e,t){D(0===this.Yr(t.batchId,"removed"),55003),this.mutationQueue.shift();let n=this.zr;return be.forEach(t.mutations,(r=>{const i=new cs(r.key,t.batchId);return n=n.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,r.key)})).next((()=>{this.zr=n}))}Xn(e){}containsKey(e,t){const n=new cs(t,0),r=this.zr.firstAfterOrEqual(n);return be.resolve(t.isEqual(r&&r.key))}performConsistencyCheck(e){return this.mutationQueue.length,be.resolve()}Yr(e,t){return this.Hr(e)}Hr(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}jr(e){const t=this.Hr(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}class hs{constructor(e){this.Zr=e,this.docs=new it(ce.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){const n=t.key,r=this.docs.get(n),i=r?r.size:0,s=this.Zr(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:s}),this.size+=s-i,this.indexManager.addToCollectionParentIndex(e,n.path.popLast())}removeEntry(e){const t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){const n=this.docs.get(t);return be.resolve(n?n.document.mutableCopy():Xt.newInvalidDocument(t))}getEntries(e,t){let n=Wn();return t.forEach((e=>{const t=this.docs.get(e);n=n.insert(e,t?t.document.mutableCopy():Xt.newInvalidDocument(e))})),be.resolve(n)}getDocumentsMatchingQuery(e,t,n,r){let i=Wn();const s=t.path,o=new ce(s.child("__id-9223372036854775808__")),a=this.docs.getIteratorFrom(o);for(;a.hasNext();){const{key:e,value:{document:o}}=a.getNext();if(!s.isPrefixOf(e.path))break;e.path.length>s.length+1||me(fe(o),n)<=0||(r.has(o.key)||Vn(t,o))&&(i=i.insert(o.key,o.mutableCopy()))}return be.resolve(i)}getAllFromCollectionGroup(e,t,n,r){N(9500)}Xr(e,t){return be.forEach(this.docs,(e=>t(e)))}newChangeBuffer(e){return new ds(this)}getSize(e){return be.resolve(this.size)}}class ds extends ns{constructor(e){super(),this.vr=e}applyChanges(e){const t=[];return this.changes.forEach(((n,r)=>{r.isValidDocument()?t.push(this.vr.addEntry(e,r)):this.vr.removeEntry(n)})),be.waitFor(t)}getFromCache(e,t){return this.vr.getEntry(e,t)}getAllFromCache(e,t){return this.vr.getEntries(e,t)}}class fs{constructor(e){this.persistence=e,this.ei=new qn((e=>En(e)),kn),this.lastRemoteSnapshotVersion=re.min(),this.highestTargetId=0,this.ti=0,this.ni=new ls,this.targetCount=0,this.ri=Ki.rr()}forEachTarget(e,t){return this.ei.forEach(((e,n)=>t(n))),be.resolve()}getLastRemoteSnapshotVersion(e){return be.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return be.resolve(this.ti)}allocateTargetId(e){return this.highestTargetId=this.ri.next(),be.resolve(this.highestTargetId)}setTargetsMetadata(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.ti&&(this.ti=t),be.resolve()}ar(e){this.ei.set(e.target,e);const t=e.targetId;t>this.highestTargetId&&(this.ri=new Ki(t),this.highestTargetId=t),e.sequenceNumber>this.ti&&(this.ti=e.sequenceNumber)}addTargetData(e,t){return this.ar(t),this.targetCount+=1,be.resolve()}updateTargetData(e,t){return this.ar(t),be.resolve()}removeTargetData(e,t){return this.ei.delete(t.target),this.ni.Ur(t.targetId),this.targetCount-=1,be.resolve()}removeTargets(e,t,n){let r=0;const i=[];return this.ei.forEach(((s,o)=>{o.sequenceNumber<=t&&null===n.get(o.targetId)&&(this.ei.delete(s),i.push(this.removeMatchingKeysForTargetId(e,o.targetId)),r++)})),be.waitFor(i).next((()=>r))}getTargetCount(e){return be.resolve(this.targetCount)}getTargetData(e,t){const n=this.ei.get(t)||null;return be.resolve(n)}addMatchingKeys(e,t,n){return this.ni.qr(t,n),be.resolve()}removeMatchingKeys(e,t,n){this.ni.$r(t,n);const r=this.persistence.referenceDelegate,i=[];return r&&t.forEach((t=>{i.push(r.markPotentiallyOrphaned(e,t))})),be.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this.ni.Ur(t),be.resolve()}getMatchingKeysForTargetId(e,t){const n=this.ni.Wr(t);return be.resolve(n)}containsKey(e,t){return be.resolve(this.ni.containsKey(t))}}class ps{constructor(e,t){this.ii={},this.overlays={},this.si=new Se(0),this.oi=!1,this.oi=!0,this._i=new as,this.referenceDelegate=e(this),this.ai=new fs(this),this.indexManager=new $i,this.remoteDocumentCache=function(e){return new hs(e)}((e=>this.referenceDelegate.ui(e))),this.serializer=new Vi(t),this.ci=new ss(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.oi=!1,Promise.resolve()}get started(){return this.oi}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new os,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let n=this.ii[e.toKey()];return n||(n=new us(t,this.referenceDelegate),this.ii[e.toKey()]=n),n}getGlobalsCache(){return this._i}getTargetCache(){return this.ai}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.ci}runTransaction(e,t,n){C("MemoryPersistence","Starting transaction:",e);const r=new ms(this.si.next());return this.referenceDelegate.li(),n(r).next((e=>this.referenceDelegate.hi(r).next((()=>e)))).toPromise().then((e=>(r.raiseOnCommittedEvent(),e)))}Pi(e,t){return be.or(Object.values(this.ii).map((n=>()=>n.containsKey(e,t))))}}class ms extends ve{constructor(e){super(),this.currentSequenceNumber=e}}class gs{constructor(e){this.persistence=e,this.Ti=new ls,this.Ii=null}static Ei(e){return new gs(e)}get di(){if(this.Ii)return this.Ii;throw N(60996)}addReference(e,t,n){return this.Ti.addReference(n,t),this.di.delete(n.toString()),be.resolve()}removeReference(e,t,n){return this.Ti.removeReference(n,t),this.di.add(n.toString()),be.resolve()}markPotentiallyOrphaned(e,t){return this.di.add(t.toString()),be.resolve()}removeTarget(e,t){this.Ti.Ur(t.targetId).forEach((e=>this.di.add(e.toString())));const n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(e,t.targetId).next((e=>{e.forEach((e=>this.di.add(e.toString())))})).next((()=>n.removeTargetData(e,t)))}li(){this.Ii=new Set}hi(e){const t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return be.forEach(this.di,(n=>{const r=ce.fromPath(n);return this.Ai(e,r).next((e=>{e||t.removeEntry(r,re.min())}))})).next((()=>(this.Ii=null,t.apply(e))))}updateLimboDocument(e,t){return this.Ai(e,t).next((e=>{e?this.di.delete(t.toString()):this.di.add(t.toString())}))}ui(e){return 0}Ai(e,t){return be.or([()=>be.resolve(this.Ti.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Pi(e,t)])}}class vs{constructor(e,t){this.persistence=e,this.Ri=new qn((e=>Ae(e.path)),((e,t)=>e.isEqual(t))),this.garbageCollector=ts(this,t)}static Ei(e,t){return new vs(e,t)}li(){}hi(e){return be.resolve()}forEachTarget(e,t){return this.persistence.getTargetCache().forEachTarget(e,t)}dr(e){const t=this.Vr(e);return this.persistence.getTargetCache().getTargetCount(e).next((e=>t.next((t=>e+t))))}Vr(e){let t=0;return this.Ar(e,(e=>{t++})).next((()=>t))}Ar(e,t){return be.forEach(this.Ri,((n,r)=>this.gr(e,n,r).next((e=>e?be.resolve():t(r)))))}removeTargets(e,t,n){return this.persistence.getTargetCache().removeTargets(e,t,n)}removeOrphanedDocuments(e,t){let n=0;const r=this.persistence.getRemoteDocumentCache(),i=r.newChangeBuffer();return r.Xr(e,(r=>this.gr(e,r,t).next((e=>{e||(n++,i.removeEntry(r,re.min()))})))).next((()=>i.apply(e))).next((()=>n))}markPotentiallyOrphaned(e,t){return this.Ri.set(t,e.currentSequenceNumber),be.resolve()}removeTarget(e,t){const n=t.withSequenceNumber(e.currentSequenceNumber);return this.persistence.getTargetCache().updateTargetData(e,n)}addReference(e,t,n){return this.Ri.set(n,e.currentSequenceNumber),be.resolve()}removeReference(e,t,n){return this.Ri.set(n,e.currentSequenceNumber),be.resolve()}updateLimboDocument(e,t){return this.Ri.set(t,e.currentSequenceNumber),be.resolve()}ui(e){let t=e.key.toString().length;return e.isFoundDocument()&&(t+=Ut(e.data.value)),t}gr(e,t,n){return be.or([()=>this.persistence.Pi(e,t),()=>this.persistence.getTargetCache().containsKey(e,t),()=>{const e=this.Ri.get(t);return be.resolve(void 0!==e&&e>n)}])}getCacheSize(e){return this.persistence.getRemoteDocumentCache().getSize(e)}}class ys{constructor(e,t,n,r){this.targetId=e,this.fromCache=t,this.ls=n,this.hs=r}static Ps(e,t){let n=tr(),r=tr();for(const i of t.docChanges)switch(i.type){case 0:n=n.add(i.doc.key);break;case 1:r=r.add(i.doc.key)}return new ys(e,t.fromCache,n,r)}}class bs{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}class ws{constructor(){this.Ts=!1,this.Is=!1,this.Es=100,this.ds=(0,l.nr)()?8:we((0,l.ZQ)())>0?6:4}initialize(e,t){this.As=e,this.indexManager=t,this.Ts=!0}getDocumentsMatchingQuery(e,t,n,r){const i={result:null};return this.Rs(e,t).next((e=>{i.result=e})).next((()=>{if(!i.result)return this.Vs(e,t,r,n).next((e=>{i.result=e}))})).next((()=>{if(i.result)return;const n=new bs;return this.fs(e,t,n).next((r=>{if(i.result=r,this.Is)return this.gs(e,t,n,r.size)}))})).next((()=>i.result))}gs(e,t,n,r){return n.documentReadCount<this.Es?(_()<=a.$b.DEBUG&&C("QueryEngine","SDK will not create cache indexes for query:",Un(t),"since it only creates cache indexes for collection contains","more than or equal to",this.Es,"documents"),be.resolve()):(_()<=a.$b.DEBUG&&C("QueryEngine","Query:",Un(t),"scans",n.documentReadCount,"local documents and returns",r,"documents as results."),n.documentReadCount>this.ds*r?(_()<=a.$b.DEBUG&&C("QueryEngine","The SDK decides to create cache indexes for query:",Un(t),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,Rn(t))):be.resolve())}Rs(e,t){if(In(t))return be.resolve(null);let n=Rn(t);return this.indexManager.getIndexType(e,n).next((r=>0===r?null:(null!==t.limit&&1===r&&(t=Ln(t,null,"F"),n=Rn(t)),this.indexManager.getDocumentsMatchingTarget(e,n).next((r=>{const i=tr(...r);return this.As.getDocuments(e,i).next((r=>this.indexManager.getMinOffset(e,n).next((n=>{const s=this.ps(t,r);return this.ys(t,s,i,n.readTime)?this.Rs(e,Ln(t,null,"F")):this.ws(e,s,t,n)}))))})))))}Vs(e,t,n,r){return In(t)||r.isEqual(re.min())?be.resolve(null):this.As.getDocuments(e,n).next((i=>{const s=this.ps(t,i);return this.ys(t,s,n,r)?be.resolve(null):(_()<=a.$b.DEBUG&&C("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),Un(t)),this.ws(e,s,t,de(r,ue)).next((e=>e)))}))}ps(e,t){let n=new at(Bn(e));return t.forEach(((t,r)=>{Vn(e,r)&&(n=n.add(r))})),n}ys(e,t,n,r){if(null===e.limit)return!1;if(n.size!==t.size)return!0;const i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)}fs(e,t,n){return _()<=a.$b.DEBUG&&C("QueryEngine","Using full collection scan to execute query:",Un(t)),this.As.getDocumentsMatchingQuery(e,t,pe.min(),n)}ws(e,t,n,r){return this.As.getDocumentsMatchingQuery(e,n,r).next((e=>(t.forEach((t=>{e=e.insert(t.key,t)})),e)))}}const xs="LocalStore",Ss=3e8;class Es{constructor(e,t,n,r){this.persistence=e,this.bs=t,this.serializer=r,this.Ss=new it(Q),this.Ds=new qn((e=>En(e)),kn),this.vs=new Map,this.Cs=e.getRemoteDocumentCache(),this.ai=e.getTargetCache(),this.ci=e.getBundleCache(),this.Fs(n)}Fs(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new is(this.Cs,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Cs.setIndexManager(this.indexManager),this.bs.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",(t=>e.collect(t,this.Ss)))}}function ks(e,t,n,r){return new Es(e,t,n,r)}async function Ts(e,t){const n=O(e);return await n.persistence.runTransaction("Handle user change","readonly",(e=>{let r;return n.mutationQueue.getAllMutationBatches(e).next((i=>(r=i,n.Fs(t),n.mutationQueue.getAllMutationBatches(e)))).next((t=>{const i=[],s=[];let o=tr();for(const e of r){i.push(e.batchId);for(const t of e.mutations)o=o.add(t.key)}for(const e of t){s.push(e.batchId);for(const t of e.mutations)o=o.add(t.key)}return n.localDocuments.getDocuments(e,o).next((e=>({Ms:e,removedBatchIds:i,addedBatchIds:s})))}
2))}))}function _s(e){const t=O(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(e=>t.ai.getLastRemoteSnapshotVersion(e)))}function Cs(e,t,n){let r=tr(),i=tr();return n.forEach((e=>r=r.add(e))),t.getEntries(e,r).next((e=>{let r=Wn();return n.forEach(((n,s)=>{const o=e.get(n);s.isFoundDocument()!==o.isFoundDocument()&&(i=i.add(n)),s.isNoDocument()&&s.version.isEqual(re.min())?(t.removeEntry(n,s.readTime),r=r.insert(n,s)):!o.isValidDocument()||s.version.compareTo(o.version)>0||0===s.version.compareTo(o.version)&&o.hasPendingWrites?(t.addEntry(s),r=r.insert(n,s)):C(xs,"Ignoring outdated watch update for ",n,". Current version:",o.version," Watch version:",s.version)})),{xs:r,Os:i}}))}function As(e,t){const n=O(e);return n.persistence.runTransaction("Get next mutation batch","readonly",(e=>(void 0===t&&(t=Ee),n.mutationQueue.getNextMutationBatchAfterBatchId(e,t))))}function Is(e,t){const n=O(e);return n.persistence.runTransaction("Allocate target","readwrite",(e=>{let r;return n.ai.getTargetData(e,t).next((i=>i?(r=i,be.resolve(r)):n.ai.allocateTargetId(e).next((i=>(r=new Ui(t,i,"TargetPurposeListen",e.currentSequenceNumber),n.ai.addTargetData(e,r).next((()=>r)))))))})).then((e=>{const r=n.Ss.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.Ss=n.Ss.insert(e.targetId,e),n.Ds.set(t,e.targetId)),e}))}async function Ps(e,t,n){const r=O(e),i=r.Ss.get(t),s=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",s,(e=>r.persistence.referenceDelegate.removeTarget(e,i)))}catch(e){if(!xe(e))throw e;C(xs,`Failed to update sequence numbers for target ${t}: ${e}`)}r.Ss=r.Ss.remove(t),r.Ds.delete(i.target)}function Ns(e,t,n){const r=O(e);let i=re.min(),s=tr();return r.persistence.runTransaction("Execute query","readwrite",(e=>function(e,t,n){const r=O(e),i=r.Ds.get(n);return void 0!==i?be.resolve(r.Ss.get(i)):r.ai.getTargetData(t,n)}(r,e,Rn(t)).next((t=>{if(t)return i=t.lastLimboFreeSnapshotVersion,r.ai.getMatchingKeysForTargetId(e,t.targetId).next((e=>{s=e}))})).next((()=>r.bs.getDocumentsMatchingQuery(e,t,n?i:re.min(),n?s:tr()))).next((e=>(Rs(r,zn(t),e),{documents:e,Ns:s})))))}function Rs(e,t,n){let r=e.vs.get(t)||re.min();n.forEach(((e,t)=>{t.readTime.compareTo(r)>0&&(r=t.readTime)})),e.vs.set(t,r)}class Ds{constructor(){this.activeTargetIds=rr()}$s(e){this.activeTargetIds=this.activeTargetIds.add(e)}Us(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Qs(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class Os{constructor(){this.So=new Ds,this.Do={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,n){}addLocalQueryTarget(e){return(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&this.So.$s(e),this.Do[e]||"not-current"}updateQueryState(e,t,n){this.Do[e]=t}removeLocalQueryTarget(e){this.So.Us(e)}isLocalQueryTarget(e){return this.So.activeTargetIds.has(e)}clearQueryState(e){delete this.Do[e]}getAllActiveQueryTargets(){return this.So.activeTargetIds}isActiveQueryTarget(e){return this.So.activeTargetIds.has(e)}start(){return this.So=new Ds,Promise.resolve()}handleUserChange(e,t,n){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}class js{vo(e){}shutdown(){}}const Ls="ConnectivityMonitor";class Ms{constructor(){this.Co=()=>this.Fo(),this.Mo=()=>this.xo(),this.Oo=[],this.No()}vo(e){this.Oo.push(e)}shutdown(){window.removeEventListener("online",this.Co),window.removeEventListener("offline",this.Mo)}No(){window.addEventListener("online",this.Co),window.addEventListener("offline",this.Mo)}Fo(){C(Ls,"Network connectivity changed: AVAILABLE");for(const e of this.Oo)e(0)}xo(){C(Ls,"Network connectivity changed: UNAVAILABLE");for(const e of this.Oo)e(1)}static C(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}let Fs=null;function Us(){return null===Fs?Fs=268435456+Math.round(2147483648*Math.random()):Fs++,"0x"+Fs.toString(16)}const Vs="RestConnection",zs={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregation
2Query:"runAggregationQuery"};class Bs{get Bo(){return!1}constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const t=e.ssl?"https":"http",n=encodeURIComponent(this.databaseId.projectId),r=encodeURIComponent(this.databaseId.database);this.Lo=t+"://"+e.host,this.ko=`projects/${n}/databases/${r}`,this.qo=this.databaseId.database===kt?`project_id=${n}`:`project_id=${n}&database_id=${r}`}Qo(e,t,n,r,i){const s=Us(),o=this.$o(e,t.toUriEncodedString());C(Vs,`Sending RPC '${e}' ${s}:`,o,n);const a={"google-cloud-resource-prefix":this.ko,"x-goog-request-params":this.qo};this.Uo(a,r,i);const{host:c}=new URL(o),u=(0,l.zJ)(c);return this.Ko(e,o,a,n,u).then((t=>(C(Vs,`Received RPC '${e}' ${s}: `,t),t)),(t=>{throw I(Vs,`RPC '${e}' ${s} failed with error: `,t,"url: ",o,"request:",n),t}))}Wo(e,t,n,r,i,s){return this.Qo(e,t,n,r,i)}Uo(e,t,n){e["X-Goog-Api-Client"]="gl-js/ fire/"+k,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach(((t,n)=>e[n]=t)),n&&n.headers.forEach(((t,n)=>e[n]=t))}$o(e,t){const n=zs[e];return`${this.Lo}/v1/${t}:${n}`}terminate(){}}class $s{constructor(e){this.Go=e.Go,this.zo=e.zo}jo(e){this.Ho=e}Jo(e){this.Yo=e}Zo(e){this.Xo=e}onMessage(e){this.e_=e}close(){this.zo()}send(e){this.Go(e)}t_(){this.Ho()}n_(){this.Yo()}r_(e){this.Xo(e)}i_(e){this.e_(e)}}const qs="WebChannelConnection";class Hs extends Bs{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}Ko(e,t,n,r,i){const s=Us();return new Promise(((i,o)=>{const a=new h;a.setWithCredentials(!0),a.listenOnce(f.COMPLETE,(()=>{try{switch(a.getLastErrorCode()){case p.NO_ERROR:const t=a.getResponseJson();C(qs,`XHR for RPC '${e}' ${s} received:`,JSON.stringify(t)),i(t);break;case p.TIMEOUT:C(qs,`RPC '${e}' ${s} timed out`),o(new L(j.DEADLINE_EXCEEDED,"Request time out"));break;case p.HTTP_ERROR:const n=a.getStatus();if(C(qs,`RPC '${e}' ${s} failed with status:`,n,"response text:",a.getResponseText()),n>0){let e=a.getResponseJson();Array.isArray(e)&&(e=e[0]);const t=null==e?void 0:e.error;if(t&&t.status&&t.message){const e=function(e){const t=e.toLowerCase().replace(/_/g,"-");return Object.values(j).indexOf(t)>=0?t:j.UNKNOWN}(t.status);o(new L(e,t.message))}else o(new L(j.UNKNOWN,"Server responded with status "+a.getStatus()))}else o(new L(j.UNAVAILABLE,"Connection failed."));break;default:N(9055,{s_:e,streamId:s,o_:a.getLastErrorCode(),__:a.getLastError()})}}finally{C(qs,`RPC '${e}' ${s} completed.`)}}));const l=JSON.stringify(r);C(qs,`RPC '${e}' ${s} sending request:`,r),a.send(t,"POST",l,n,15)}))}a_(e,t,n){const r=Us(),i=[this.Lo,"/","google.firestore.v1.Firestore","/",e,"/channel"],s=y(),o=v(),a={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},l=this.longPollingOptions.timeoutSeconds;void 0!==l&&(a.longPollingTimeout=Math.round(1e3*l)),this.useFetchStreams&&(a.useFetchStreams=!0),this.Uo(a.initMessageHeaders,t,n),a.encodeInitMessageHeaders=!0;const c=i.join("");C(qs,`Creating RPC '${e}' stream ${r}: ${c}`,a);const u=s.createWebChannel(c,a);let h=!1,f=!1;const p=new $s({Go:t=>{f?C(qs,`Not sending because RPC '${e}' stream ${r} is closed:`,t):(h||(C(qs,`Opening RPC '${e}' stream ${r} transport.`),u.open(),h=!0),C(qs,`RPC '${e}' stream ${r} sending:`,t),u.send(t))},zo:()=>u.close()}),b=(e,t,n)=>{e.listen(t,(e=>{try{n(e)}catch(e){setTimeout((()=>{throw e}),0)}}))};return b(u,d.EventType.OPEN,(()=>{f||(C(qs,`RPC '${e}' stream ${r} transport opened.`),p.t_())})),b(u,d.EventType.CLOSE,(()=>{f||(f=!0,C(qs,`RPC '${e}' stream ${r} transport closed`),p.r_())})),b(u,d.EventType.ERROR,(t=>{f||(f=!0,I(qs,`RPC '${e}' stream ${r} transport errored. Name:`,t.name,"Message:",t.message),p.r_(new L(j.UNAVAILABLE,"The operation could not be completed")))})),b(u,d.EventType.MESSAGE,(t=>{var n;if(!f){const i=t.data[0];D(!!i,16349);const s=i,o=(null==s?void 0:s.error)||(null===(n=s[0])||void 0===n?void 0:n.error);if(o){C(qs,`RPC '${e}' stream ${r} received error:`,o);const t=o.status;let n=function(e){const t=zr[e];
vendor: 6,931 bytes, line 2
2if(void 0!==t)return qr(t)}(t),i=o.message;void 0===n&&(n=j.INTERNAL,i="Unknown error status: "+t+" with message "+o.message),f=!0,p.r_(new L(n,i)),u.close()}else C(qs,`RPC '${e}' stream ${r} received:`,i),p.i_(i)}})),b(o,g.STAT_EVENT,(t=>{t.stat===m.PROXY?C(qs,`RPC '${e}' stream ${r} detected buffering proxy`):t.stat===m.NOPROXY&&C(qs,`RPC '${e}' stream ${r} detected no buffering proxy`)})),setTimeout((()=>{p.n_()}),0),p}}function Ws(){return"undefined"!=typeof document?document:null}function Gs(e){return new ci(e,!0)}class Ks{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1.5,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:6e4;this.bi=e,this.timerId=t,this.u_=n,this.c_=r,this.l_=i,this.h_=0,this.P_=null,this.T_=Date.now(),this.reset()}reset(){this.h_=0}I_(){this.h_=this.l_}E_(e){this.cancel();const t=Math.floor(this.h_+this.d_()),n=Math.max(0,Date.now()-this.T_),r=Math.max(0,t-n);r>0&&C("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.h_} ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`),this.P_=this.bi.enqueueAfterDelay(this.timerId,r,(()=>(this.T_=Date.now(),e()))),this.h_*=this.c_,this.h_<this.u_&&(this.h_=this.u_),this.h_>this.l_&&(this.h_=this.l_)}A_(){null!==this.P_&&(this.P_.skipDelay(),this.P_=null)}cancel(){null!==this.P_&&(this.P_.cancel(),this.P_=null)}d_(){return(Math.random()-.5)*this.h_}}const Qs="PersistentStream";class Ys{constructor(e,t,n,r,i,s,o,a){this.bi=e,this.R_=n,this.V_=r,this.connection=i,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=o,this.listener=a,this.state=0,this.m_=0,this.f_=null,this.g_=null,this.stream=null,this.p_=0,this.y_=new Ks(e,t)}w_(){return 1===this.state||5===this.state||this.b_()}b_(){return 2===this.state||3===this.state}start(){this.p_=0,4!==this.state?this.auth():this.S_()}async stop(){this.w_()&&await this.close(0)}D_(){this.state=0,this.y_.reset()}v_(){this.b_()&&null===this.f_&&(this.f_=this.bi.enqueueAfterDelay(this.R_,6e4,(()=>this.C_())))}F_(e){this.M_(),this.stream.send(e)}async C_(){if(this.b_())return this.close(0)}M_(){this.f_&&(this.f_.cancel(),this.f_=null)}x_(){this.g_&&(this.g_.cancel(),this.g_=null)}async close(e,t){this.M_(),this.x_(),this.y_.cancel(),this.m_++,4!==e?this.y_.reset():t&&t.code===j.RESOURCE_EXHAUSTED?(A(t.toString()),A("Using maximum backoff delay to prevent overloading the backend."),this.y_.I_()):t&&t.code===j.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.O_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.Zo(t)}O_(){}auth(){this.state=1;const e=this.N_(this.m_),t=this.m_;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then((e=>{let[n,r]=e;this.m_===t&&this.B_(n,r)}),(t=>{e((()=>{const e=new L(j.UNKNOWN,"Fetching auth token failed: "+t.message);return this.L_(e)}))}))}B_(e,t){const n=this.N_(this.m_);this.stream=this.k_(e,t),this.stream.jo((()=>{n((()=>this.listener.jo()))})),this.stream.Jo((()=>{n((()=>(this.state=2,this.g_=this.bi.enqueueAfterDelay(this.V_,1e4,(()=>(this.b_()&&(this.state=3),Promise.resolve()))),this.listener.Jo())))})),this.stream.Zo((e=>{n((()=>this.L_(e)))})),this.stream.onMessage((e=>{n((()=>1==++this.p_?this.q_(e):this.onNext(e)))}))}S_(){this.state=5,this.y_.E_((async()=>{this.state=0,this.start()}))}L_(e){return C(Qs,`close with error: ${e}`),this.stream=null,this.close(4,e)}N_(e){return t=>{this.bi.enqueueAndForget((()=>this.m_===e?t():(C(Qs,"stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())))}}}class Xs extends Ys{constructor(e,t,n,r,i,s){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,n,r,s),this.serializer=i}k_(e,t){return this.connection.a_("Listen",e,t)}q_(e){return this.onNext(e)}onNext(e){this.y_.reset();const t=function(e,t){let n;if("targetChange"in t){t.targetChange;const r=function(e){return"NO_CHANGE"===e?0:"ADD"===e?1:"REMOVE"===e?2:"CURRENT"===e?3:"RESET"===e?4:N(39313,{state:e})}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],s=function(e,t){return e.useProto3Json?(D(void 0===t||"string"==typeof t,58123),ht.fromBase64String(t||"")):(D(void 0===t||t instanceof Buffer||t instanceof Uint8Array,16193),ht.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),o=t.targetChange.cause,a=o&&function(e){const t=void 0===e.code?j.UNKNOWN:qr(e.code);return new L(t,e.message||"")}(o);n=new ti(r,i,s,a||null)}else if("documentChange"in t){t.documentChange;const r=t.documentChange;r.document,r.document.name,r.document.updateTime;const i=bi(e,r.document.name),s=pi(r.document.updateTime),o=r.document.createTime?pi(r.document.createTime):re.min(),a=new Qt({mapValue:{fields:r.document.fields}}),l=Xt.newFoundDocument(i,s,o,a),c=r.targetIds||[],u=r.removedTargetIds||[];n=new Zr(c,u,l.key,l)}else if("documentDelete"in t){t.documentDelete;const r=t.documentDelete;r.document;const i=bi(e,r.document),s=r.readTime?pi(r.readTime):re.min(),o=Xt.newNoDocument(i,s),a=r.removedTargetIds||[];n=new Zr([],a,o.key,o)}else if("documentRemove"in t){t.documentRemove;const r=t.documentRemove;r.document;const i=bi(e,r.document),s=r.removedTargetIds||[];n=new Zr([],s,i,null)}else{if(!("filter"in t))return N(11601,{Vt:t});{t.filter;const e=t.filter;e.targetId;const{count:r=0,unchangedNames:i}=e,s=new Vr(r,i),o=e.targetId;n=new ei(o,s)}}return n}(this.serializer,e),n=function(e){if(!("targetChange"in e))return re.min();const t=e.targetChange;return t.targetIds&&t.targetIds.length?re.min():t.readTime?pi(t.readTime):re.min()}(e);return this.listener.Q_(t,n)}U_(e){const t={};t.database=Si(this.serializer),t.addTarget=function(e,t){let n;const r=t.target;if(n=Tn(r)?{documents:_i(e,r)}:{query:Ci(e,r).gt},n.targetId=t.targetId,t.resumeToken.approximateByteSize()>0){n.resumeToken=di(e,t.resumeToken);const r=ui(e,t.expectedCount);null!==r&&(n.expectedCount=r)}else if(t.snapshotVersion.compareTo(re.min())>0){n.readTime=hi(e,t.snapshotVersion.toTimestamp());const r=ui(e,t.expectedCount);null!==r&&(n.expectedCount=r)}return n}(this.serializer,e);const n=function(e,t){const n=function(e){switch(e){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return N(28987,{purpose:e})}}(t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.serializer,e);n&&(t.labels=n),this.F_(t)}K_(e){const t={};t.database=Si(this.serializer),t.removeTarget=e,this.F_(t)}}class Js extends Ys{constructor(e,t,n,r,i,s){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,n,r,s
2),this.serializer=i}get W_(){return this.p_>0}start(){this.lastStreamToken=void 0,super.start()}O_(){this.W_&&this.G_([])}k_(e,t){return this.connection.a_("Write",e,t)}q_(e){return D(!!e.streamToken,31322),this.lastStreamToken=e.streamToken,D(!e.writeResults||0===e.writeResults.length,55816),this.listener.z_()}onNext(e){D(!!e.streamToken,12678),this.lastStreamToken=e.streamToken,this.y_.reset();const t=function(e,t){return e&&e.length>0?(D(void 0!==t,14353),e.map((e=>function(e,t){let n=e.updateTime?pi(e.updateTime):pi(t);return n.isEqual(re.min())&&(n=pi(t)),new wr(n,e.transformResults||[])}(e,t)))):[]}(e.writeResults,e.commitTime),n=pi(e.commitTime);return this.listener.j_(n,t)}H_(){const e={};e.database=Si(this.serializer),this.F_(e)}G_(e){const t={streamToken:this.lastStreamToken,writes:e.map((e=>Ti(this.serializer,e)))};this.F_(t)}}class Zs{}class eo extends Zs{constructor(e,t,n,r){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=n,this.serializer=r,this.J_=!1}Y_(){if(this.J_)throw new L(j.FAILED_PRECONDITION,"The client has already been terminated.")}Qo(e,t,n,r){return this.Y_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((i=>{let[s,o]=i;return this.connection.Qo(e,gi(t,n),r,s,o)})).catch((e=>{throw"FirebaseError"===e.name?(e.code===j.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new L(j.UNKNOWN,e.toString())}))}Wo(e,t,n,r,i){return this.Y_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then((s=>{let[o,a]=s;return this.connection.Wo(e,gi(t,n),r,o,a,i)})).catch((e=>{throw"FirebaseError"===e.name?(e.code===j.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new L(j.UNKNOWN,e.toString())}))}terminate(){this.J_=!0,this.connection.terminate()}}class to{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.Z_=0,this.X_=null,this.ea=!0}ta(){0===this.Z_&&(this.na("Unknown"),this.X_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(()=>(this.X_=null,this.ra("Backend didn't respond within 10 seconds."),this.na("Offline"),Promise.resolve()))))}ia(e){"Online"===this.state?this.na("Unknown"):(this.Z_++,this.Z_>=1&&(this.sa(),this.ra(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.na("Offline")))}set(e){this.sa(),this.Z_=0,"Online"===e&&(this.ea=!1),this.na(e)}na(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}ra(e){const t=`Could not reach Cloud Firestore backend. ${e}\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.ea?(A(t),this.ea=!1):C("OnlineStateTracker",t)}sa(){null!==this.X_&&(this.X_.cancel(),this.X_=null)}}const no="RemoteStore";class ro{constructor(e,t,n,r,i){this.localStore=e,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.oa=[],this._a=new Map,this.aa=new Set,this.ua=[],this.ca=i,this.ca.vo((e=>{n.enqueueAndForget((async()=>{fo(this)&&(C(no,"Restarting streams for network reachability change."),await async function(e){const t=O(e);t.aa.add(4),await so(t),t.la.set("Unknown"),t.aa.delete(4),await io(t)}(this))}))})),this.la=new to(n,r)}}async function io(e){if(fo(e))for(const t of e.ua)await t(!0)}async function so(e){for(const t of e.ua)await t(!1)}function oo(e,t){const n=O(e);n._a.has(t.targetId)||(n._a.set(t.targetId,t),ho(n)?uo(n):Ro(n).b_()&&lo(n,t))}function ao(e,t){const n=O(e),r=Ro(n);n._a.delete(t),r.b_()&&co(n,t),0===n._a.size&&(r.b_()?r.v_():fo(n)&&n.la.set("Unknown"))}function lo(e,t){if(e.ha.Ke(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(re.min())>0){const n=e.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(n)}Ro(e).U_(t)}function co(e,t){e.ha.Ke(t),Ro(e).K_(t)}function uo(e){e.ha=new ri({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),Rt:t=>e._a.get(t)||null,Pt:()=>e.datastore.serializer.databaseId}),Ro(e).start(),e.la.ta()}function ho(e){return fo(e)&&!Ro(e).w_()&&e._a.size>0}function fo(e){return 0===O(e).aa.size}function po(e){e.ha=void 0}async function mo(e){e.la.set("Online")}async function go(e){e._a.forEach(((t,n)=>{lo(e,t)}))}async function vo(e,t){po(e),ho(e)?(e.la.ia(t),uo(e)):e.la.set("Unknown")}async function yo(e,t,n){if(e.la.set("Online"),t instanceof ti&&2===t.state&&t.cause)try{await async function(e,t){const n=t.cause;for(const r of t.targetIds)e._a.has(r)&&(await e.remoteSyncer.rejectListen(r,n),e._a.delete(r),e.ha.removeTarget(r))}(e,t)}catch(n){C(no,"Failed to remove targets %s: %s ",t.targetIds.join(","),n),await bo(e,n)}else if(t instanceof Zr?e.ha.Xe(t):t instanceof ei?e.ha.ot(t):e.ha.nt(t),!n.isEqual(re.min()))try{const t=await _s(e.localStore);n.compareTo(t)>=0&&await function(e,t){const n=e.ha.It(t);
vendor: 8,015 bytes, line 2
2return n.targetChanges.forEach(((n,r)=>{if(n.resumeToken.approximateByteSize()>0){const i=e._a.get(r);i&&e._a.set(r,i.withResumeToken(n.resumeToken,t))}})),n.targetMismatches.forEach(((t,n)=>{const r=e._a.get(t);if(!r)return;e._a.set(t,r.withResumeToken(ht.EMPTY_BYTE_STRING,r.snapshotVersion)),co(e,t);const i=new Ui(r.target,t,n,r.sequenceNumber);lo(e,i)})),e.remoteSyncer.applyRemoteEvent(n)}(e,n)}catch(t){C(no,"Failed to raise snapshot:",t),await bo(e,t)}}async function bo(e,t,n){if(!xe(t))throw t;e.aa.add(1),await so(e),e.la.set("Offline"),n||(n=()=>_s(e.localStore)),e.asyncQueue.enqueueRetryable((async()=>{C(no,"Retrying IndexedDB access"),await n(),e.aa.delete(1),await io(e)}))}function wo(e,t){return t().catch((n=>bo(e,n,t)))}async function xo(e){const t=O(e),n=Do(t);let r=t.oa.length>0?t.oa[t.oa.length-1].batchId:Ee;for(;So(t);)try{const e=await As(t.localStore,r);if(null===e){0===t.oa.length&&n.v_();break}r=e.batchId,Eo(t,e)}catch(e){await bo(t,e)}ko(t)&&To(t)}function So(e){return fo(e)&&e.oa.length<10}function Eo(e,t){e.oa.push(t);const n=Do(e);n.b_()&&n.W_&&n.G_(t.mutations)}function ko(e){return fo(e)&&!Do(e).w_()&&e.oa.length>0}function To(e){Do(e).start()}async function _o(e){Do(e).H_()}async function Co(e){const t=Do(e);for(const n of e.oa)t.G_(n.mutations)}async function Ao(e,t,n){const r=e.oa.shift(),i=Mr.from(r,t,n);await wo(e,(()=>e.remoteSyncer.applySuccessfulWrite(i))),await xo(e)}async function Io(e,t){t&&Do(e).W_&&await async function(e,t){if(function(e){return $r(e)&&e!==j.ABORTED}(t.code)){const n=e.oa.shift();Do(e).D_(),await wo(e,(()=>e.remoteSyncer.rejectFailedWrite(n.batchId,t))),await xo(e)}}(e,t),ko(e)&&To(e)}async function Po(e,t){const n=O(e);n.asyncQueue.verifyOperationInProgress(),C(no,"RemoteStore received new credentials");const r=fo(n);n.aa.add(3),await so(n),r&&n.la.set("Unknown"),await n.remoteSyncer.handleCredentialChange(t),n.aa.delete(3),await io(n)}async function No(e,t){const n=O(e);t?(n.aa.delete(2),await io(n)):t||(n.aa.add(2),await so(n),n.la.set("Unknown"))}function Ro(e){return e.Pa||(e.Pa=function(e,t,n){const r=O(e);return r.Y_(),new Xs(t,r.connection,r.authCredentials,r.appCheckCredentials,r.serializer,n)}(e.datastore,e.asyncQueue,{jo:mo.bind(null,e),Jo:go.bind(null,e),Zo:vo.bind(null,e),Q_:yo.bind(null,e)}),e.ua.push((async t=>{t?(e.Pa.D_(),ho(e)?uo(e):e.la.set("Unknown")):(await e.Pa.stop(),po(e))}))),e.Pa}function Do(e){return e.Ta||(e.Ta=function(e,t,n){const r=O(e);return r.Y_(),new Js(t,r.connection,r.authCredentials,r.appCheckCredentials,r.serializer,n)}(e.datastore,e.asyncQueue,{jo:()=>Promise.resolve(),Jo:_o.bind(null,e),Zo:Io.bind(null,e),z_:Co.bind(null,e),j_:Ao.bind(null,e)}),e.ua.push((async t=>{t?(e.Ta.D_(),await xo(e)):(await e.Ta.stop(),e.oa.length>0&&(C(no,`Stopping write stream with ${e.oa.length} pending writes`),e.oa=[]))}))),e.Ta}class Oo{constructor(e,t,n,r,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new M,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((e=>{}))}get promise(){return this.deferred.promise}static createAndSchedule(e,t,n,r,i){const s=Date.now()+n,o=new Oo(e,t,s,r,i);return o.start(n),o}start(e){this.timerHandle=setTimeout((()=>this.handleDelayElapsed()),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new L(j.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget((()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then((e=>this.deferred.resolve(e)))):Promise.resolve()))}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function jo(e,t){if(A("AsyncQueue",`${t}: ${e}`),xe(e))return new L(j.UNAVAILABLE,`${t}: ${e}`);throw e}class Lo{static emptySet(e){return new Lo(e.comparator)}constructor(e){this.comparator=e?(t,n)=>e(t,n)||ce.comparator(t.key,n.key):(e,t)=>ce.comparator(e.key,t.key),this.keyedMap=Kn(),this.sortedSet=new it(this.comparator)}has(e){return null!=this.keyedMap.get(e)}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal(((t,n)=>(e(t),!1)))}add(e){const t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){const t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof Lo))return!1;if(this.size!==e.size)return!1;const t=this.sortedSet.getIterator(),n=e.sortedSet.getIterator();for(;t.hasNext();){const e=t.getNext().key,r=n.getNext().key;if(!e.isEqual(r))return!1}return!0}toString(){const e=[];return this.forEach((t=>{e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"}copy(e,t){const n=new Lo;return n.comparator=this.comparator,n.keyedMap=e,n.sortedSet=t,n}}class Mo{constructor(){this.Ia=new it(ce.comparator)}track(e){const t=e.doc.key,n=this.Ia.get(t);n?0!==e.type&&3===n.type?this.Ia=this.Ia.insert(t,e):3===e.type&&1!==n.type?this.Ia=this.Ia.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.Ia=this.Ia.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.Ia=this.Ia.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.Ia=this.Ia.remove(t):1===e.type&&2===n.type?this.Ia=this.Ia.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.Ia=this.Ia.insert(t,{type:2,doc:e.doc}):N(63341,{Vt:e,Ea:n}):this.Ia=this.Ia.insert(t,e)}da(){const e=[];return this.Ia.inorderTraversal(((t,n)=>{e.push(n)})),e}}class Fo{constructor(e,t,n,r,i,s,o,a,l){this.query=e,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=i,this.fromCache=s,this.syncStateChanged=o,this.excludesMetadataChanges=a,this.hasCachedResults=l}static fromInitialDocuments(e,t,n,r,i){const s=[];return t.forEach((e=>{s.push({type:0,doc:e})})),new Fo(e,t,Lo.emptySet(t),s,n,r,!0,!1,i)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Mn(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(t[r].type!==n[r].type||!t[r].doc.isEqual(n[r].doc))return!1;return!0}}class Uo{constructor(){this.Aa=void 0,this.Ra=[]}Va(){return this.Ra.some((e=>e.ma()))}}class Vo{constructor(){this.queries=zo(),this.onlineState="Unknown",this.fa=new Set}terminate(){!function(e,t){const n=O(e),r=n.queries;n.queries=zo(),r.forEach(((e,n)=>{for(const r of n.Ra)r.onError(t)}))}(this,new L(j.ABORTED,"Firestore shutting down"))}}function zo(){return new qn((e=>Fn(e)),Mn)}async function Bo(e,t){const n=O(e);let r=3;const i=t.query;let s=n.queries.get(i);s?!s.Va()&&t.ma()&&(r=2):(s=new Uo,r=t.ma()?0:1);try{switch(r){case 0:s.Aa=await n.onListen(i,!0);break;case 1:s.Aa=await n.onListen(i,!1);break;case 2:await n.onFirstRemoteStoreListen(i)}}catch(e){const n=jo(e,`Initialization of query '${Un(t.query)}' failed`);return void t.onError(n)}n.queries.set(i,s),s.Ra.push(t),t.ga(n.onlineState),s.Aa&&t.pa(s.Aa)&&Wo(n)}async function $o(e,t){const n=O(e),r=t.query;let i=3;const s=n.queries.get(r);if(s){const e=s.Ra.indexOf(t);e>=0&&(s.Ra.splice(e,1),0===s.Ra.length?i=t.ma()?0:1:!s.Va()&&t.ma()&&(i=2))}switch(i){case 0:return n.queries.delete(r),n.onUnlisten(r,!0);case 1:return n.queries.delete(r),n.onUnlisten(r,!1);case 2:return n.onLastRemoteStoreUnlisten(r);default:return}}function qo(e,t){const n=O(e);let r=!1;for(const i of t){const e=i.query,t=n.queries.get(e);if(t){for(const e of t.Ra)e.pa(i)&&(r=!0);t.Aa=i}}r&&Wo(n)}
2function Ho(e,t,n){const r=O(e),i=r.queries.get(t);if(i)for(const s of i.Ra)s.onError(n);r.queries.delete(t)}function Wo(e){e.fa.forEach((e=>{e.next()}))}var Go,Ko;(Ko=Go||(Go={})).ya="default",Ko.Cache="cache";class Qo{constructor(e,t,n){this.query=e,this.wa=t,this.ba=!1,this.Sa=null,this.onlineState="Unknown",this.options=n||{}}pa(e){if(!this.options.includeMetadataChanges){const t=[];for(const n of e.docChanges)3!==n.type&&t.push(n);e=new Fo(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.ba?this.Da(e)&&(this.wa.next(e),t=!0):this.va(e,this.onlineState)&&(this.Ca(e),t=!0),this.Sa=e,t}onError(e){this.wa.error(e)}ga(e){this.onlineState=e;let t=!1;return this.Sa&&!this.ba&&this.va(this.Sa,e)&&(this.Ca(this.Sa),t=!0),t}va(e,t){if(!e.fromCache)return!0;if(!this.ma())return!0;const n="Offline"!==t;return(!this.options.Fa||!n)&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}Da(e){if(e.docChanges.length>0)return!0;const t=this.Sa&&this.Sa.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}Ca(e){e=Fo.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.ba=!0,this.wa.next(e)}ma(){return this.options.source!==Go.Cache}}class Yo{constructor(e){this.key=e}}class Xo{constructor(e){this.key=e}}class Jo{constructor(e,t){this.query=e,this.qa=t,this.Qa=null,this.hasCachedResults=!1,this.current=!1,this.$a=tr(),this.mutatedKeys=tr(),this.Ua=Bn(e),this.Ka=new Lo(this.Ua)}get Wa(){return this.qa}Ga(e,t){const n=t?t.za:new Mo,r=t?t.Ka:this.Ka;let i=t?t.mutatedKeys:this.mutatedKeys,s=r,o=!1;const a="F"===this.query.limitType&&r.size===this.query.limit?r.last():null,l="L"===this.query.limitType&&r.size===this.query.limit?r.first():null;if(e.inorderTraversal(((e,t)=>{const c=r.get(e),u=Vn(this.query,t)?t:null,h=!!c&&this.mutatedKeys.has(c.key),d=!!u&&(u.hasLocalMutations||this.mutatedKeys.has(u.key)&&u.hasCommittedMutations);let f=!1;c&&u?c.data.isEqual(u.data)?h!==d&&(n.track({type:3,doc:u}),f=!0):this.ja(c,u)||(n.track({type:2,doc:u}),f=!0,(a&&this.Ua(u,a)>0||l&&this.Ua(u,l)<0)&&(o=!0)):!c&&u?(n.track({type:0,doc:u}),f=!0):c&&!u&&(n.track({type:1,doc:c}),f=!0,(a||l)&&(o=!0)),f&&(u?(s=s.add(u),i=d?i.add(e):i.delete(e)):(s=s.delete(e),i=i.delete(e)))})),null!==this.query.limit)for(;s.size>this.query.limit;){const e="F"===this.query.limitType?s.last():s.first();s=s.delete(e.key),i=i.delete(e.key),n.track({type:1,doc:e})}return{Ka:s,za:n,ys:o,mutatedKeys:i}}ja(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,n,r){const i=this.Ka;this.Ka=e.Ka,this.mutatedKeys=e.mutatedKeys;const s=e.za.da();s.sort(((e,t)=>function(e,t){const n=e=>{switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return N(20277,{Vt:e})}};return n(e)-n(t)}(e.type,t.type)||this.Ua(e.doc,t.doc))),this.Ha(n),r=null!=r&&r;const o=t&&!r?this.Ja():[],a=0===this.$a.size&&this.current&&!r?1:0,l=a!==this.Qa;return this.Qa=a,0!==s.length||l?{snapshot:new Fo(this.query,e.Ka,i,s,e.mutatedKeys,0===a,l,!1,!!n&&n.resumeToken.approximateByteSize()>0),Ya:o}:{Ya:o}}ga(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({Ka:this.Ka,za:new Mo,mutatedKeys:this.mutatedKeys,ys:!1},!1)):{Ya:[]}}Za(e){return!this.qa.has(e)&&!!this.Ka.has(e)&&!this.Ka.get(e).hasLocalMutations}Ha(e){e&&(e.addedDocuments.forEach((e=>this.qa=this.qa.add(e))),e.modifiedDocuments.forEach((e=>{})),e.removedDocuments.forEach((e=>this.qa=this.qa.delete(e))),this.current=e.current)}Ja(){if(!this.current)return[];const e=this.$a;this.$a=tr(),this.Ka.forEach((e=>{this.Za(e.key)&&(this.$a=this.$a.add(e.key))}));const t=[];return e.forEach((e=>{this.$a.has(e)||t.push(new Xo(e))})),this.$a.forEach((n=>{e.has(n)||t.push(new Yo(n))})),t}Xa(e){this.qa=e.Ns,this.$a=tr();const t=this.Ga(e.documents);return this.applyChanges(t,!0)}eu(){return Fo.fromInitialDocuments(this.query,this.Ka,this.mutatedKeys,0===this.Qa,this.hasCachedResults)}}const Zo="SyncEngine";class ea{constructor(e,t,n){this.query=e,this.targetId=t,this.view=n}}class ta{constructor(e){this.key=e,this.tu=!1}}class na{constructor(e,t,n,r,i,s){this.localStore=e,this.remoteStore=t,this.eventManager=n,this.sharedCl
2ientState=r,this.currentUser=i,this.maxConcurrentLimboResolutions=s,this.nu={},this.ru=new qn((e=>Fn(e)),Mn),this.iu=new Map,this.su=new Set,this.ou=new it(ce.comparator),this._u=new Map,this.au=new ls,this.uu={},this.cu=new Map,this.lu=Ki.ir(),this.onlineState="Unknown",this.hu=void 0}get isPrimaryClient(){return!0===this.hu}}async function ra(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=ka(e);let i;const s=r.ru.get(t);return s?(r.sharedClientState.addLocalQueryTarget(s.targetId),i=s.view.eu()):i=await sa(r,t,n,!0),i}async function ia(e,t){const n=ka(e);await sa(n,t,!0,!1)}async function sa(e,t,n,r){const i=await Is(e.localStore,Rn(t)),s=i.targetId,o=e.sharedClientState.addLocalQueryTarget(s,n);let a;return r&&(a=await oa(e,t,s,"current"===o,i.resumeToken)),e.isPrimaryClient&&n&&oo(e.remoteStore,i),a}async function oa(e,t,n,r,i){e.Pu=(t,n,r)=>async function(e,t,n,r){let i=t.view.Ga(n);i.ys&&(i=await Ns(e.localStore,t.query,!1).then((e=>{let{documents:n}=e;return t.view.Ga(n,i)})));const s=r&&r.targetChanges.get(t.targetId),o=r&&null!=r.targetMismatches.get(t.targetId),a=t.view.applyChanges(i,e.isPrimaryClient,s,o);return ya(e,t.targetId,a.Ya),a.snapshot}(e,t,n,r);const s=await Ns(e.localStore,t,!0),o=new Jo(t,s.Ns),a=o.Ga(s.documents),l=Jr.createSynthesizedTargetChangeForCurrentChange(n,r&&"Offline"!==e.onlineState,i),c=o.applyChanges(a,e.isPrimaryClient,l);ya(e,n,c.Ya);const u=new ea(t,n,o);return e.ru.set(t,u),e.iu.has(n)?e.iu.get(n).push(t):e.iu.set(n,[t]),c.snapshot}async function aa(e,t,n){const r=O(e),i=r.ru.get(t),s=r.iu.get(i.targetId);if(s.length>1)return r.iu.set(i.targetId,s.filter((e=>!Mn(e,t)))),void r.ru.delete(t);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedCl
vendor: 4,404 bytes, line 2
2ientState.isActiveQueryTarget(i.targetId)||await Ps(r.localStore,i.targetId,!1).then((()=>{r.sharedClientState.clearQueryState(i.targetId),n&&ao(r.remoteStore,i.targetId),ga(r,i.targetId)})).catch(ye)):(ga(r,i.targetId),await Ps(r.localStore,i.targetId,!0))}async function la(e,t){const n=O(e),r=n.ru.get(t),i=n.iu.get(r.targetId);n.isPrimaryClient&&1===i.length&&(n.sharedClientState.removeLocalQueryTarget(r.targetId),ao(n.remoteStore,r.targetId))}async function ca(e,t){const n=O(e);try{const e=await function(e,t){const n=O(e),r=t.snapshotVersion;let i=n.Ss;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(e=>{const s=n.Cs.newChangeBuffer({trackRemovals:!0});i=n.Ss;const o=[];t.targetChanges.forEach(((s,a)=>{const l=i.get(a);if(!l)return;o.push(n.ai.removeMatchingKeys(e,s.removedDocuments,a).next((()=>n.ai.addMatchingKeys(e,s.addedDocuments,a))));let c=l.withSequenceNumber(e.currentSequenceNumber);null!==t.targetMismatches.get(a)?c=c.withResumeToken(ht.EMPTY_BYTE_STRING,re.min()).withLastLimboFreeSnapshotVersion(re.min()):s.resumeToken.approximateByteSize()>0&&(c=c.withResumeToken(s.resumeToken,r)),i=i.insert(a,c),function(e,t,n){return 0===e.resumeToken.approximateByteSize()||(t.snapshotVersion.toMicroseconds()-e.snapshotVersion.toMicroseconds()>=Ss||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0)}(l,c,s)&&o.push(n.ai.updateTargetData(e,c))}));let a=Wn(),l=tr();if(t.documentUpdates.forEach((r=>{t.resolvedLimboDocuments.has(r)&&o.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),o.push(Cs(e,s,t.documentUpdates).next((e=>{a=e.xs,l=e.Os}))),!r.isEqual(re.min())){const t=n.ai.getLastRemoteSnapshotVersion(e).next((t=>n.ai.setTargetsMetadata(e,e.currentSequenceNumber,r)));o.push(t)}return be.waitFor(o).next((()=>s.apply(e))).next((()=>n.localDocuments.getLocalViewOfDocuments(e,a,l))).next((()=>a))})).then((e=>(n.Ss=i,e)))}(n.localStore,t);t.targetChanges.forEach(((e,t)=>{const r=n._u.get(t);r&&(D(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1,22616),e.addedDocuments.size>0?r.tu=!0:e.modifiedDocuments.size>0?D(r.tu,14607):e.removedDocuments.size>0&&(D(r.tu,42227),r.tu=!1))})),await xa(n,e,t)}catch(e){await ye(e)}}function ua(e,t,n){const r=O(e);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){const e=[];r.ru.forEach(((n,r)=>{const i=r.view.ga(t);i.snapshot&&e.push(i.snapshot)})),function(e,t){const n=O(e);n.onlineState=t;let r=!1;n.queries.forEach(((e,n)=>{for(const i of n.Ra)i.ga(t)&&(r=!0)})),r&&Wo(n)}(r.eventManager,t),e.length&&r.nu.Q_(e),r.onlineState=t,r.isPrimaryClient&&r.sharedClientState.setOnlineState(t)}}async function ha(e,t,n){const r=O(e);r.sharedClientState.updateQueryState(t,"rejected",n);const i=r._u.get(t),s=i&&i.key;if(s){let e=new it(ce.comparator);e=e.insert(s,Xt.newNoDocument(s,re.min()));const n=tr().add(s),i=new Xr(re.min(),new Map,new it(Q),e,n);await ca(r,i),r.ou=r.ou.remove(s),r._u.delete(t),wa(r)}else await Ps(r.localStore,t,!1).then((()=>ga(r,t,n))).catch(ye)}async function da(e,t){const n=O(e),r=t.batch.batchId;try{const e=await function(e,t){const n=O(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(e=>{const r=t.batch.keys(),i=n.Cs.newChangeBuffer({trackRemovals:!0});return function(e,t,n,r){const i=n.batch,s=i.keys();let o=be.resolve();return s.forEach((e=>{o=o.next((()=>r.getEntry(t,e))).next((t=>{const s=n.docVersions.get(e);D(null!==s,48541),t.version.compareTo(s)<0&&(i.applyToRemoteDocument(t,n),t.isValidDocument()&&(t.setReadTime(n.commitVersion),r.addEntry(t)))}))})),o.next((()=>e.mutationQueue.removeMutationBatch(t,i)))}(n,e,t,i).next((()=>i.apply(e))).next((()=>n.mutationQueue.performConsistencyCheck(e))).next((()=>n.documentOverlayCache.removeOverlaysForBatchId(e,r,t.batch.batchId))).next((()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,function(e){let t=tr();for(let n=0;n<e.mutationResults.length;++n)e.mutationResults[n].transformResults.length>0&&(t=t.add(e.batch.mutations[n].key));return t}(t)))).next((()=>n.localDocuments.getDocuments(e,r)))}))}(n.localStore,t);ma(n,r,null),pa(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await xa(n,e)}catch(e){await ye(e)}}async function fa(e,t,n){const r=O(e);try{const e=await function(e,t){const n=O(e);return n.persistence.runTransaction("Reject batch","readwrite-primary",(e=>{let r;
2return n.mutationQueue.lookupMutationBatch(e,t).next((t=>(D(null!==t,37113),r=t.keys(),n.mutationQueue.removeMutationBatch(e,t)))).next((()=>n.mutationQueue.performConsistencyCheck(e))).next((()=>n.documentOverlayCache.removeOverlaysForBatchId(e,r,t))).next((()=>n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e,r))).next((()=>n.localDocuments.getDocuments(e,r)))}))}(r.localStore,t);ma(r,t,n),pa(r,t),r.sharedClientState.updateMutationState(t,"rejected",n),await xa(r,e)}catch(n){await ye(n)}}function pa(e,t){(e.cu.get(t)||[]).forEach((e=>{e.resolve()})),e.cu.delete(t)}function ma(e,t,n){const r=O(e);let i=r.uu[r.currentUser.toKey()];if(i){const e=i.get(t);e&&(n?e.reject(n):e.resolve(),i=i.remove(t)),r.uu[r.currentUser.toKey()]=i}}function ga(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.sharedClientState.removeLocalQueryTarget(t);for(const r of e.iu.get(t))e.ru.delete(r),n&&e.nu.Tu(r,n);e.iu.delete(t),e.isPrimaryClient&&e.au.Ur(t).forEach((t=>{e.au.containsKey(t)||va(e,t)}))}function va(e,t){e.su.delete(t.path.canonicalString());const n=e.ou.get(t);null!==n&&(ao(e.remoteStore,n),e.ou=e.ou.remove(t),e._u.delete(n),wa(e))}function ya(e,t,n){for(const r of n)r instanceof Yo?(e.au.addReference(r.key,t),ba(e,r)):r instanceof Xo?(C(Zo,"Document no longer in limbo: "+r.key),e.au.removeReference(r.key,t),e.au.containsKey(r.key)||va(e,r.key)):N(19791,{Iu:r})}function ba(e,t){const n=t.key,r=n.path.canonicalString();e.ou.get(n)||e.su.has(r)||(C(Zo,"New document in limbo: "+n),e.su.add(r),wa(e))}function wa(e){for(;e.su.size>0&&e.ou.size<e.maxConcurrentLimboResolutions;){const t=e.su.values().next().value;e.su.delete(t);const n=new ce(oe.fromString(t)),r=e.lu.next();e._u.set(r,new ta(n)),e.ou=e.ou.insert(n,r),oo(e.remoteStore,new Ui(Rn(An(n.path)),r,"TargetPurposeLimboResolution",Se.le))}}async function xa(e,t,n){const r=O(e),i=[],s=[],o=[];r.ru.isEmpty()||(r.ru.forEach(((e,a)=>{o.push(r.Pu(a,t,n).then((e=>{var t;if((e||n)&&r.isPrimaryClient){const i=e?!e.fromCache:null===(t=null==n?void 0:n.targetChanges.get(a.targetId))||void 0===t?void 0:t.current;
2r.sharedClientState.updateQueryState(a.targetId,i?"current":"not-current")}if(e){i.push(e);const t=ys.Ps(a.targetId,e);s.push(t)}})))})),await Promise.all(o),r.nu.Q_(i),await async function(e,t){const n=O(e);try{await n.persistence.runTransaction("notifyLocalViewChanges","readwrite",(e=>be.forEach(t,(t=>be.forEach(t.ls,(r=>n.persistence.referenceDelegate.addReference(e,t.targetId,r))).next((()=>be.forEach(t.hs,(r=>n.persistence.referenceDelegate.removeReference(e,t.targetId,r)))))))))}catch(e){if(!xe(e))throw e;C(xs,"Failed to update sequence numbers: "+e)}for(const r of t){const e=r.targetId;if(!r.fromCache){const t=n.Ss.get(e),r=t.snapshotVersion,i=t.withLastLimboFreeSnapshotVersion(r);n.Ss=n.Ss.insert(e,i)}}}(r.localStore,s))}async function Sa(e,t){const n=O(e);if(!n.currentUser.isEqual(t)){C(Zo,"User change. New user:",t.toKey());const e=await Ts(n.localStore,t);n.currentUser=t,function(e,t){e.cu.forEach((e=>{e.forEach((e=>{e.reject(new L(j.CANCELLED,t))}))})),e.cu.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(t,e.removedBatchIds,e.addedBatchIds),await xa(n,e.Ms)}}function Ea(e,t){const n=O(e),r=n._u.get(t);if(r&&r.tu)return tr().add(r.key);{let e=tr();const r=n.iu.get(t);if(!r)return e;for(const t of r){const r=n.ru.get(t);e=e.unionWith(r.view.Wa)}return e}}function ka(e){const t=O(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=ca.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=Ea.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=ha.bind(null,t),t.nu.Q_=qo.bind(null,t.eventManager),t.nu.Tu=Ho.bind(null,t.eventManager),t}function Ta(e){const t=O(e);return t.remoteStore.remoteSyncer.applySuccessfulWrite=da.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=fa.bind(null,t),t}class _a{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=Gs(e.databaseInfo.databaseId),this.sharedClientState=this.Au(e),this.persistence=this.Ru(e),await this.persistence.start(),this.localStore=this.Vu(e),this.gcScheduler=this.mu(e,this.localStore),this.indexBackfillerScheduler=this.fu(e,this.localStore)}mu(e,t){return null}fu(e,t){return null}Vu(e){return ks(this.persistence,new ws,e.initialUser,this.serializer)}Ru(e){return new ps(gs.Ei,this.serializer)}Au(e){return new Os}async terminate(){var e,t;null===(e=this.gcScheduler)||void 0===e||e.stop(),null===(t=this.indexBackfillerScheduler)||void 0===t||t.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}_a.provider={build:()=>new _a};class Ca extends _a{constructor(e){super(),this.cacheSizeBytes=e}mu(e,t){D(this.persistence.referenceDelegate instanceof vs,46915);const n=this.persistence.referenceDelegate.garbageCollector;return new Zi(n,e.asyncQueue,t)}Ru(e){const t=void 0!==this.cacheSizeBytes?Gi.withCacheSize(this.cacheSizeBytes):Gi.DEFAULT;return new ps((e=>vs.Ei(e,t)),this.serializer)}}class Aa{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=e=>ua(this.syncEngine,e,1),this.remoteStore.remoteSyncer.handleCredentialChange=Sa.bind(null,this.syncEngine),await No(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new Vo}createDatastore(e){const t=Gs(e.databaseInfo.databaseId),n=function(e){return new Hs(e)}(e.databaseInfo);return function(e,t,n,r){return new eo(e,t,n,r)}(e.authCredentials,e.appCheckCredentials,n,t)}createRemoteStore(e){return function(e,t,n,r,i){return new ro(e,t,n,r,i)}(this.localStore,this.datastore,e.asyncQueue,(e=>ua(this.syncEngine,e,0)),Ms.C()?new Ms:new js)}createSyncEngine(e,t){return function(e,t,n,r,i,s,o){const a=new na(e,t,n,r,i,s);return o&&(a.hu=!0),a}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}async terminate(){var e,t;await async function(e){const t=O(e);C(no,"RemoteStore shutting down."),t.aa.add(5),await so(t),t.ca.shutdown(),t.la.set("Unknown")}(this.remoteStore),null===(e=this.datastore)||void 0===e||e.terminate(),null===(t=this.eventManager)||void 0===t||t.terminate()}}Aa.provider={build:()=>new Aa};class Ia{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.pu(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.pu(this.observer.error,e):A("Uncaught Error in snapshot listener:",e.toString()))}yu(){this.muted=!0}
vendor: 6,249 bytes, line 2
2pu(e,t){setTimeout((()=>{this.muted||e(t)}),0)}}class Pa{constructor(e){this.datastore=e,this.readVersions=new Map,this.mutations=[],this.committed=!1,this.lastTransactionError=null,this.writtenDocs=new Set}async lookup(e){if(this.ensureCommitNotCalled(),this.mutations.length>0)throw this.lastTransactionError=new L(j.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes."),this.lastTransactionError;const t=await async function(e,t){const n=O(e),r={documents:t.map((e=>yi(n.serializer,e)))},i=await n.Wo("BatchGetDocuments",n.serializer.databaseId,oe.emptyPath(),r,t.length),s=new Map;i.forEach((e=>{const t=function(e,t){return"found"in t?function(e,t){D(!!t.found,43571),t.found.name,t.found.updateTime;const n=bi(e,t.found.name),r=pi(t.found.updateTime),i=t.found.createTime?pi(t.found.createTime):re.min(),s=new Qt({mapValue:{fields:t.found.fields}});return Xt.newFoundDocument(n,r,i,s)}(e,t):"missing"in t?function(e,t){D(!!t.missing,3894),D(!!t.readTime,22933);const n=bi(e,t.missing),r=pi(t.readTime);return Xt.newNoDocument(n,r)}(e,t):N(7234,{result:t})}(n.serializer,e);s.set(t.key.toString(),t)}));const o=[];return t.forEach((e=>{const t=s.get(e.toString());D(!!t,55234,{key:e}),o.push(t)})),o}(this.datastore,e);return t.forEach((e=>this.recordVersion(e))),t}set(e,t){this.write(t.toMutation(e,this.precondition(e))),this.writtenDocs.add(e.toString())}update(e,t){try{this.write(t.toMutation(e,this.preconditionForUpdate(e)))}catch(e){this.lastTransactionError=e}this.writtenDocs.add(e.toString())}delete(e){this.write(new Or(e,this.precondition(e))),this.writtenDocs.add(e.toString())}async commit(){if(this.ensureCommitNotCalled(),this.lastTransactionError)throw this.lastTransactionError;const e=this.readVersions;this.mutations.forEach((t=>{e.delete(t.key.toString())})),e.forEach(((e,t)=>{const n=ce.fromPath(t);this.mutations.push(new jr(n,this.precondition(n)))})),await async function(e,t){const n=O(e),r={writes:t.map((e=>Ti(n.serializer,e)))};await n.Qo("Commit",n.serializer.databaseId,oe.emptyPath(),r)}(this.datastore,this.mutations),this.committed=!0}recordVersion(e){let t;if(e.isFoundDocument())t=e.version;else{if(!e.isNoDocument())throw N(50498,{xu:e.constructor.name});t=re.min()}const n=this.readVersions.get(e.key.toString());if(n){if(!t.isEqual(n))throw new L(j.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(e.key.toString(),t)}precondition(e){const t=this.readVersions.get(e.toString());return!this.writtenDocs.has(e.toString())&&t?t.isEqual(re.min())?xr.exists(!1):xr.updateTime(t):xr.none()}preconditionForUpdate(e){const t=this.readVersions.get(e.toString());if(!this.writtenDocs.has(e.toString())&&t){if(t.isEqual(re.min()))throw new L(j.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return xr.updateTime(t)}return xr.exists(!0)}write(e){this.ensureCommitNotCalled(),this.mutations.push(e)}ensureCommitNotCalled(){}}class Na{constructor(e,t,n,r,i){this.asyncQueue=e,this.datastore=t,this.options=n,this.updateFunction=r,this.deferred=i,this.Ou=n.maxAttempts,this.y_=new Ks(this.asyncQueue,"transaction_retry")}Nu(){this.Ou-=1,this.Bu()}Bu(){this.y_.E_((async()=>{const e=new Pa(this.datastore),t=this.Lu(e);t&&t.then((t=>{this.asyncQueue.enqueueAndForget((()=>e.commit().then((()=>{this.deferred.resolve(t)})).catch((e=>{this.ku(e)}))))})).catch((e=>{this.ku(e)}))}))}Lu(e){try{const t=this.updateFunction(e);return!ke(t)&&t.catch&&t.then?t:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(e){return this.deferred.reject(e),null}}ku(e){this.Ou>0&&this.qu(e)?(this.Ou-=1,this.asyncQueue.enqueueAndForget((()=>(this.Bu(),Promise.resolve())))):this.deferred.reject(e)}qu(e){if("FirebaseError"===e.name){const t=e.code;return"aborted"===t||"failed-precondition"===t||"already-exists"===t||!$r(t)}return!1}}const Ra="FirestoreClient";class Da{constructor(e,t,n,r,i){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=n,this.databaseInfo=r,this.user=E.UNAUTHENTICATED,this.clientId=K.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=i,this.authCredentials.start(n,(async e=>{C(Ra,"Received user=",e.uid),await this.authCredentialListener(e),this.user=e})),this.appCheckCredentials.start(n,(e=>(C(Ra,"Received new app check token=",e),this.appCheckCredentialListener(e,this.user))))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}terminate(){this.asyncQueue.enterRestrictedMode();const e=new M;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(t){const n=jo(t,"Failed to shutdown persistence");e.reject(n)}})),e.promise}}async function Oa(e,t){e.asyncQueue.verifyOperationInProgress(),C(Ra,"Initializing OfflineComponentProvider");const n=e.configuration;await t.initialize(n);let r=n.initialUser;e.setCredentialChangeListener((async e=>{r.isEqual(e)||(await Ts(t.localStore,e),r=e)})),t.persistence.setDatabaseDeletedListener((()=>e.terminate())),e._offlineComponents=t}async function ja(e,t){e.asyncQueue.verifyOperationInProgress();const n=await La(e);C(Ra,"Initializing OnlineComponentProvider"),await t.initialize(n,e.configuration),e.setCredentialChangeListener((e=>Po(t.remoteStore,e))),e.setAppCheckTokenChangeListener(((e,n)=>Po(t.remoteStore,n))),e._onlineComponents=t}async function La(e){if(!e._offlineComponents)if(e._uninitializedComponentsProvider){C(Ra,"Using user provided OfflineComponentProvider");try{await Oa(e,e._uninitializedComponentsProvider._offline)}catch(t){const n=t;if(!function(e){return"FirebaseError"===e.name?e.code===j.FAILED_PRECONDITION||e.code===j.UNIMPLEMENT
2ED:!("undefined"!=typeof DOMException&&e instanceof DOMException)||22===e.code||20===e.code||11===e.code}(n))throw n;I("Error using user provided cache. Falling back to memory cache: "+n),await Oa(e,new _a)}}else C(Ra,"Using default OfflineComponentProvider"),await Oa(e,new Ca(void 0));return e._offlineComponents}async function Ma(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(C(Ra,"Using user provided OnlineComponentProvider"),await ja(e,e._uninitializedComponentsProvider._online)):(C(Ra,"Using default OnlineComponentProvider"),await ja(e,new Aa))),e._onlineComponents}function Fa(e){return La(e).then((e=>e.persistence))}function Ua(e){return Ma(e).then((e=>e.remoteStore))}function Va(e){return Ma(e).then((e=>e.syncEngine))}function za(e){return Ma(e).then((e=>e.datastore))}async function Ba(e){const t=await Ma(e),n=t.eventManager;return n.onListen=ra.bind(null,t.syncEngine),n.onUnlisten=aa.bind(null,t.syncEngine),n.onFirstRemoteStoreListen=ia.bind(null,t.syncEngine),n.onLastRemoteStoreUnlisten=la.bind(null,t.syncEngine),n}function $a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new M;return e.asyncQueue.enqueueAndForget((async()=>function(e,t,n,r,i){const s=new Ia({next:a=>{s.yu(),t.enqueueAndForget((()=>$o(e,o)));const l=a.docs.has(n);!l&&a.fromCache?i.reject(new L(j.UNAVAILABLE,"Failed to get document because the client is offline.")):l&&a.fromCache&&r&&"server"===r.source?i.reject(new L(j.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):i.resolve(a)},error:e=>i.reject(e)}),o=new Qo(An(n.path),s,{includeMetadataChanges:!0,Fa:!0});return Bo(e,o)}(await Ba(e),e.asyncQueue,t,n,r))),r.promise}function qa(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new M;return e.asyncQueue.enqueueAndForget((async()=>function(e,t,n,r,i){const s=new Ia({next:n=>{s.yu(),t.enqueueAndForget((()=>$o(e,o))),n.fromCache&&"server"===r.source?i.reject(new L(j.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:e=>i.reject(e)}),o=new Qo(n,s,{includeMetadataChanges:!0,Fa:!0});return Bo(e,o)}(await Ba(e),e.asyncQueue,t,n,r))),r.promise}function Ha(e){const t={};return void 0!==e.timeoutSeconds&&(t.timeoutSeconds=e.timeoutSeconds),t}const Wa=new Map;function Ga(e,t,n){if(!n)throw new L(j.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${t}.`)}function Ka(e){if(!ce.isDocumentKey(e))throw new L(j.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function Qa(e){if(ce.isDocumentKey(e))throw new L(j.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function Ya(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{const t=function(e){return e.constructor?e.constructor.name:null}(e);return t?`a custom ${t} object`:"an object"}}return"function"==typeof e?"a function":N(12329,{type:typeof e})}function Xa(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new L(j.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=Ya(e);throw new L(j.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${n}`)}}return e}function Ja(e,t){if(t<=0)throw new L(j.INVALID_ARGUMENT,`Function ${e}() requires a positive number, but it was: ${t}.`)}const Za="firestore.googleapis.com",el=!0;class tl{constructor(e){var t,n;if(void 0===e.host){if(void 0!==e.ssl)throw new L(j.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=Za,this.ssl=el}else this.host=e.host,this.ssl=null!==(t=e.ssl)&&void 0!==t?t:el;if(this.isUsingEmulator=void 0!==e.emulatorOptions,this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,void 0===e.cacheSizeBytes)this.cacheSizeBytes=Wi;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<Yi)throw new L(j.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}(function(e,t,n,r){if(!0===t&&!0===r)throw new L(j.INVALID_ARGUMENT,`${e} and ${n} cannot be used together.`)})("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:void 0===e.experimentalAutoDetectLongPolling?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=Ha(null!==(n=e.experimentalLongPollingOptions)&&void 0!==n?n:{}),function(e){if(void 0!==e.timeoutSeconds){if(isNaN(e.timeoutSeconds))throw new L(j.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (must not be NaN)`);if(e.timeoutSeconds<5)throw new L(j.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (minimum allowed value is 5)`);if(e.timeoutSeconds>30)throw new L(j.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&function(e,t){return e.timeoutSeconds===t.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class nl{constructor(e,t,n,r){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=n,this._app=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new tl({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new L(j.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return"notTerminated"!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new L(j.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new tl(e),this._emulatorOptions=e.emulatorOptions||{},void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new U;switch(e.type){case"firstParty":return new $(e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new L(j.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invali
2d credential type")}}(e.credentials))}_getSettings(){return this._settings}_getEmulatorOptions(){return this._emulatorOptions}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return"notTerminated"===this._terminateTask&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){"notTerminated"===this._terminateTask?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){const t=Wa.get(e);t&&(C("ComponentProvider","Removing Datastore"),Wa.delete(e),t.terminate())}(this),Promise.resolve()}}class rl{constructor(e,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=e}withConverter(e){return new rl(this.firestore,e,this._query)}}class il{constructor(e,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new sl(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new il(this.firestore,e,this._key)}}class sl extends rl{constructor(e,t,n){super(e,t,An(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new il(this.firestore,null,new ce(e))}withConverter(e){return new sl(this.firestore,e,this._path)}}function ol(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(e=(0,l.Ku)(e),Ga("collection","path",t),e instanceof nl){const n=oe.fromString(t,...r);return Qa(n),new sl(e,null,n)}{if(!(e instanceof il||e instanceof sl))throw new L(j.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const n=e._path.child(oe.fromString(t,...r));return Qa(n),new sl(e.firestore,null,n)}}function al(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(e=(0,l.Ku)(e),1===arguments.length&&(t=K.newId()),Ga("doc","path",t),e instanceof nl){const n=oe.fromString(t,...r);return Ka(n),new il(e,null,new ce(n))}{if(!(e instanceof il||e instanceof sl))throw new L(j.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const n=e._path.child(oe.fromString(t,...r));return Ka(n),new il(e.firestore,e instanceof sl?e.converter:null,new ce(n))}}const ll="AsyncQueue";class cl{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Promise.resolve();this.Qu=[],this.$u=!1,this.Uu=[],this.Ku=null,this.Wu=!1,this.Gu=!1,this.zu=[],this.y_=new Ks(this,"async_queue_retry"),this.ju=()=>{const e=Ws();e&&C(ll,"Visibility state changed to "+e.visibilityState),this.y_.A_()},this.Hu=e;const t=Ws();t&&"function"==typeof t.addEventListener&&t.addEventListener("visibilitychange",this.ju)}get isShuttingDown(){return this.$u}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.Ju(),this.Yu(e)}enterRestrictedMode(e){if(!this.$u){this.$u=!0,this.Gu=e||!1;const t=Ws();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.ju)}}enqueue(e){if(this.Ju(),this.$u)return new Promise((()=>{}));const t=new M;return this.Yu((()=>this.$u&&this.Gu?Promise.resolve():(e().then(t.resolve,t.reject),t.promise))).then((()=>t.promise))}enqueueRetryable(e){this.enqueueAndForget((()=>(this.Qu.push(e),this.Zu())))}async Zu(){if(0!==this.Qu.length){try{await this.Qu[0](),this.Qu.shift(),this.y_.reset()}catch(e){if(!xe(e))throw e;C(ll,"Operation failed with retryable error: "+e)}this.Qu.length>0&&this.y_.E_((()=>this.Zu()))}}Yu(e){const t=this.Hu.then((()=>(this.Wu=!0,e().catch((e=>{throw this.Ku=e,this.Wu=!1,A("INTERNAL UNHANDLED ERROR: ",ul(e)),e})).then((e=>(this.Wu=!1,e))))));return this.Hu=t,t}enqueueAfterDelay(e,t,n){this.Ju(),this.zu.indexOf(e)>-1&&(t=0);const r=Oo.createAndSchedule(this,e,t,n,(e=>
2this.Xu(e)));return this.Uu.push(r),r}Ju(){this.Ku&&N(47125,{ec:ul(this.Ku)})}verifyOperationInProgress(){}async tc(){let e;do{e=this.Hu,await e}while(e!==this.Hu)}nc(e){for(const t of this.Uu)if(t.timerId===e)return!0;return!1}rc(e){return this.tc().then((()=>{this.Uu.sort(((e,t)=>e.targetTimeMs-t.targetTimeMs));for(const t of this.Uu)if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.tc()}))}sc(e){this.zu.push(e)}Xu(e){const t=this.Uu.indexOf(e);this.Uu.splice(t,1)}}function ul(e){let t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}function hl(e){return function(e,t){if("object"!=typeof e||null===e)return!1;const n=e;for(const r of t)if(r in n&&"function"==typeof n[r])return!0;return!1}(e,["next","error","complete"])}class dl extends nl{constructor(e,t,n,r){super(e,t,n,r),this.type="firestore",this._queue=new cl,this._persistenceKey=(null==r?void 0:r.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const e=this._firestoreClient.terminate();this._queue=new cl(e),this._firestoreClient=void 0,await e}}}function fl(e,t){const n="object"==typeof e?e:(0,s.Sx)(),r="string"==typeof e?e:t||kt,i=(0,s.j6)(n,"firestore").getImmediate({identifier:r});if(!i._initialized){const e=(0,l.yU)("firestore");e&&function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};var i;e=Xa(e,nl);const s=(0,l.zJ)(t),o=e._getSettings(),a=Object.assign(Object.assign({},o),{emulatorOptions:e._getEmulatorOptions()}),c=`${t}:${n}`;s&&(0,l.gE)(`https://${c}`),o.host!==Za&&o.host!==c&&I("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");const u=Object.assign(Object.assign({},o),{host:c,ssl:s,emulatorOptions:r});if(!(0,l.bD)(u,a)&&(e._setSettings(u),r.mockUserToken)){let t,n;if("string"==typeof r.mockUserToken)t=r.mockUserToken,n=E.MOCK_USER;else{t=(0,l.Fy)(r.mockUserToken,null===(i=e._app)||void 0===i?void 0:i.options.projectId);const s=r.mockUserToken.sub||r.mockUserToken.user_id;if(!s)throw new L(j.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");n=new E(s)}e._authCredentials=new V(new F(t,n))}}(i,...e)}return i}function pl(e){if(e._terminated)throw new L(j.FAILED_PRECONDITION,"The client has already been terminated.");return e._firestoreClient||ml(e),e._firestoreClient}function ml(e){var t,n,r;const i=e._freezeSettings(),s=function(e,t,n,r){return new Et(e,t,n,r.host,r.ssl,r.experimentalForceLongPolling,r.experimentalAutoDetectLongPolling,Ha(r.experimentalLongPollingOptions),r.useFetchStreams,r.isUsingEmulator)}(e._databaseId,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,i);e._componentsProvider||(null===(n=i.localCache)||void 0===n?void 0:n._offlineComponentProvider)&&(null===(r=i.localCache)||void 0===r?void 0:r._onlineComponentProvider)&&(e._componentsProvider={_offline:i.localCache._offlineComponentProvider,_online:i.localCache._onlineComponentProvider}),e._firestoreClient=new Da(e._authCredentials,e._appCheckCredentials,e._queue,s,e._componentsProvider&&function(e){const t=null==e?void 0:e._online.build();return{_offline:null==e?void 0:e._offline.build(t),_online:t}}(e._componentsProvider))}function gl(e){return function(e){return e.asyncQueue.enqueue((async()=>{const t=await Fa(e),n=await Ua(e);return t.setNetworkEnabled(!0),function(e){const t=O(e);return t.aa.delete(0),io(t)}(n)}))}(pl(e=Xa(e,dl)))}function vl(e){return function(e){return e.asyncQueue.enqueue((async()=>{const t=await Fa(e),n=await Ua(e);return t.setNetworkEnabled(!1),async function(e){const t=O(e);t.aa.add(0),await so(t),t.la.set("Offline")}(n)}))}(pl(e=Xa(e,dl)))}class yl{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"count",t=arguments.length>1?arguments[1]:void 0;this._internalFieldPath=t,this.type="AggregateField",this.aggregateType=e}}class bl{constructor(e,t,n){this._userDataWriter=t,this._data=n,this.type="AggregateQuerySnapshot",this.query=e}data(){return this._userDataWriter.convertObjectMap(this._data)}}class wl{constructor(e){this._byteString=e}static fromBase64String(e){try{return new wl(ht.fromBase64String(e))}catch(e){throw new L(j.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(e){return new wl(ht.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}class xl{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(let r=0;r<t.length;++r)if(0===t[r].length)throw new L(j.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new le(t)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}class Sl{constructor(e){this._methodName=e}}class El{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new L(j.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new L(j.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return Q(this._lat,e._lat)||Q(this._long,e._long)}}class kl{constructor(e){this._values=(e||[]).map((e=>e))}toArray(){return this._values.map((e=>e))}isEqual(e){return function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0}(this._values,e._values)}}const Tl=/^__.*__$/;class _l{constructor(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}toMutation(e,t){return null!==this.fieldMask?new Pr(e,this.data,this.fieldMask,t,this.fieldTransforms):new Ir(e,this.data,t,this.fieldTransforms)}}class Cl{constructor(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}toMutation(e,t){return new Pr(e,this.data,this.fieldMask,t,this.fieldTransforms)}}function Al(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw N(40011,{oc:e})}}class Il{constructor(e,t,n,r,i,s){this.settings=e,this.databaseId=t,this.serializer
2=n,this.ignoreUndefinedProperties=r,void 0===i&&this._c(),this.fieldTransforms=i||[],this.fieldMask=s||[]}get path(){return this.settings.path}get oc(){return this.settings.oc}ac(e){return new Il(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}uc(e){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ac({path:n,cc:!1});return r.lc(e),r}hc(e){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.ac({path:n,cc:!1});return r._c(),r}Pc(e){return this.ac({path:void 0,cc:!0})}Tc(e){return Gl(e,this.settings.methodName,this.settings.Ic||!1,this.path,this.settings.Ec)}contains(e){return void 0!==this.fieldMask.find((t=>e.isPrefixOf(t)))||void 0!==this.fieldTransforms.find((t=>e.isPrefixOf(t.field)))}_c(){if(this.path)for(let e=0;e<this.path.length;e++)this.lc(this.path.get(e))}lc(e){if(0===e.length)throw this.Tc("Document fields must not be empty");if(Al(this.oc)&&Tl.test(e))throw this.Tc('Document fields cannot begin and end with "__"')}}class Pl{constructor(e,t,n){this.databaseId=e,this.ignoreUndefinedProperties=t,this.serializer=n||Gs(e)}dc(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new Il({oc:e,methodName:t,Ec:n,path:le.emptyPath(),cc:!1,Ic:r},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function Nl(e){const t=e._freezeSettings(),n=Gs(e._databaseId);return new Pl(e._databaseId,!!t.ignoreUndefinedProperties,n)}function Rl(e,t,n,r,i){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const o=e.dc(s.merge||s.mergeFields?2:0,t,n,i);$l("Data must be an object, but it was:",o,r);const a=zl(r,o);let l,c;if(s.merge)l=new ct(o.fieldMask),c=o.fieldTransforms;else if(s.mergeFields){const e=[];for(const r of s.mergeFields){const i=ql(t,r,n);if(!o.contains(i))throw new L(j.INVALID_ARGUMENT,`Field '${i}' is specified in your field mask but missing from your input data.`);Kl(e,i)||e.push(i)}l=new ct(e),c=o.fieldTransforms.filter((e=>l.covers(e.field)))}else l=null,c=o.fieldTransforms;return new _l(new Qt(a),l,c)}class Dl extends Sl{_toFieldTransform(e){if(2!==e.oc)throw 1===e.oc?e.Tc(`${this._methodName}() can only appear at the top level of your update data`):e.Tc(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof Dl}}function Ol(e,t,n){return new Il({oc:3,Ec:t.settings.Ec,methodName:e._methodName,cc:n},t.databaseId,t.serializer,t.ignoreUndefinedProperties)}class jl extends Sl{_toFieldTransform(e){return new br(e.path,new hr)}isEqual(e){return e instanceof jl}}class Ll extends Sl{constructor(e,t){super(e),this.Ac=t}_toFieldTransform(e){const t=Ol(this,e,!0),n=this.Ac.map((e=>Vl(e,t))),r=new dr(n);return new br(e.path,r)}isEqual(e){return e instanceof Ll&&(0,l.bD)(this.Ac,e.Ac)}}function Ml(e,t,n,r){const i=e.dc(1,t,n);$l("Data must be an object, but it was:",i,r);const s=[],o=Qt.empty();tt(r,((e,r)=>{const a=Wl(t,e,n);r=(0,l.Ku)(r);const c=i.hc(a);if(r instanceof Dl)s.push(a);else{const e=Vl(r,c);null!=e&&(s.push(a),o.set(a,e))}}));const a=new ct(s);return new Cl(o,a,i.fieldTransforms)}function Fl(e,t,n,r,i,s){const o=e.dc(1,t,n),a=[ql(t,r,n)],c=[i];if(s.length%2!=0)throw new L(j.INVALID_ARGUMENT,`Function ${t}() needs to be called with an even number of arguments that alternate between field names and values.`);for(let l=0;l<s.length;l+=2)a.push(ql(t,s[l])),c.push(s[l+1]);const u=[],h=Qt.empty();for(let f=a.length-1;f>=0;--f)if(!Kl(u,a[f])){const e=a[f];let t=c[f];t=(0,l.Ku)(t);const n=o.hc(e);if(t instanceof Dl)u.push(e);else{const r=Vl(t,n);null!=r&&(u.push(e),h.set(e,r))}}const d=new ct(u);return new Cl(h,d,o.fieldTransforms)}function Ul(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Vl(n,e.dc(r?4:3,t))}function Vl(e,t){if(Bl(e=(0,l.Ku)(e)))return $l("Unsupported field value:",t,e),zl(e,t);if(e instanceof Sl)return function(e,t){if(!Al(t.oc))throw t.Tc(`${e._methodName}() can only be used with update() and set()`);
2if(!t.path)throw t.Tc(`${e._methodName}() is not currently supported inside arrays`);const n=e._toFieldTransform(t);n&&t.fieldTransforms.push(n)}(e,t),null;if(void 0===e&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.cc&&4!==t.oc)throw t.Tc("Nested arrays are not supported");return function(e,t){const n=[];let r=0;for(const i of e){let e=Vl(i,t.Pc(r));null==e&&(e={nullValue:"NULL_VALUE"}),n.push(e),r++}return{arrayValue:{values:n}}}(e,t)}return function(e,t){if(null===(e=(0,l.Ku)(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return or(t.serializer,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){const n=ne.fromDate(e);return{timestampValue:hi(t.serializer,n)}}if(e instanceof ne){const n=new ne(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:hi(t.serializer,n)}}if(e instanceof El)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof wl)return{bytesValue:di(t.serializer,e._byteString)};if(e instanceof il){const n=t.databaseId,r=e.firestore._databaseId;if(!r.isEqual(n))throw t.Tc(`Document reference is for database ${r.projectId}/${r.database} but should be for database ${n.projectId}/${n.database}`);return{referenceValue:mi(e.firestore._databaseId||t.databaseId,e._key.path)}}if(e instanceof kl)return function(e,t){return{mapValue:{fields:{[_t]:{stringValue:It},[Pt]:{arrayValue:{values:e.toArray().map((e=>{if("number"!=typeof e)throw t.Tc("VectorValues must only contain numeric values.");return ir(t.serializer,e)}))}}}}}}(e,t);throw t.Tc(`Unsupported field value: ${Ya(e)}`)}(e,t)}function zl(e,t){const n={};return rt(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):tt(e,((e,r)=>{const i=Vl(r,t.uc(e));null!=i&&(n[e]=i)})),{mapValue:{fields:n}}}function Bl(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof ne||e instanceof El||e instanceof wl||e instanceof il||e instanceof Sl||e instanceof kl)}function $l(e,t,n){if(!Bl(n)||!function(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}(n)){const r=Ya(n);throw"an object"===r?t.Tc(e+" a custom object"):t.Tc(e+" "+r)}}function ql(e,t,n){if((t=(0,l.Ku)(t))instanceof xl)return t._internalPath;if("string"==typeof t)return Wl(e,t);throw Gl("Field path arguments must be of type string or ",e,!1,void 0,n)}const Hl=new RegExp("[~\\*/\\[\\]]");function Wl(e,t,n){if(t.search(Hl)>=0)throw Gl(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,n);try{return new xl(...t.split("."))._internalPath}catch(r){throw Gl(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,n)}}function Gl(e,t,n,r,i){const s=r&&!r.isEmpty(),o=void 0!==i;let a=`Function ${t}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(s||o)&&(l+=" (found",s&&(l+=` in field ${r}`),o&&(l+=` in document ${i}`),l+=")"),new L(j.INVALID_ARGUMENT,a+e+l)}function Kl(e,t){return e.some((e=>e.isEqual(t)))}class Ql{constructor(e,t,n,r,i){this._firestore=e,this._userDataWriter=t,this._key=n,this._document=r,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new il(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const e=new Yl(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const t=this._document.data.field(Xl("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class Yl extends Ql{data(){return super.data()}}function Xl(e,t){return"string"==typeof t?Wl(e,t):t instanceof xl?t._internalPath:t._delegate._internalPath}function Jl(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new L(j.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class Zl{}class ec extends Zl{}function tc(e,t){let n=[];for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];t instanceof Zl&&n.push(t),n=n.concat(i),function(e){const t=e.filter((e=>e instanceof ic)).length,n=e.filter((e=>e instanceof nc)).length;if(t>1||t>0&&n>0)throw new L(j.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(n);for(const o of n)e=o._apply(e);return e}class nc extends ec{constructor(e,t,n){super(),this._field=e,this._op=t,this._value=n,this.type="where"}static _create(e,t,n){return new nc(e,t,n)}_apply(e){const t=this._parse(e);return pc(e._query,t),new rl(e.firestore,e.converter,jn(e._query,t))}_parse(e){const t=Nl(e.firestore),n=function(e,t,n,r,i,s,o){let a;
2if(i.isKeyField()){if("array-contains"===s||"array-contains-any"===s)throw new L(j.INVALID_ARGUMENT,`Invalid Query. You can't perform '${s}' queries on documentId().`);if("in"===s||"not-in"===s){fc(o,s);const t=[];for(const n of o)t.push(dc(r,e,n));a={arrayValue:{values:t}}}else a=dc(r,e,o)}else"in"!==s&&"not-in"!==s&&"array-contains-any"!==s||fc(o,s),a=Ul(n,t,o,"in"===s||"not-in"===s);return sn.create(i,s,a)}(e._query,"where",t,e.firestore._databaseId,this._field,this._op,this._value);return n}}function rc(e,t,n){const r=t,i=Xl("where",e);return nc._create(i,r,n)}class ic extends Zl{constructor(e,t){super(),this.type=e,this._queryConstraints=t}static _create(e,t){return new ic(e,t)}_parse(e){const t=this._queryConstraints.map((t=>t._parse(e))).filter((e=>e.getFilters().length>0));return 1===t.length?t[0]:on.create(t,this._getOperator())}_apply(e){const t=this._parse(e);return 0===t.getFilters().length?e:(function(e,t){let n=e;const r=t.getFlattenedFilters();for(const i of r)pc(n,i),n=jn(n,i)}(e._query,t),new rl(e.firestore,e.converter,jn(e._query,t)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return"and"===this.type?"and":"or"}}class sc extends ec{constructor(e,t){super(),this._field=e,this._direction=t,this.type="orderBy"}static _create(e,t){return new sc(e,t)}_apply(e){const t=function(e,t,n){if(null!==e.startAt)throw new L(j.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==e.endAt)throw new L(j.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new tn(t,n)}(e._query,this._field,this._direction);return new rl(e.firestore,e.converter,function(e,t){const n=e.explicitOrderBy.concat([t]);return new _n(e.path,e.collectionGroup,n,e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(e._query,t))}}function oc(e){const t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc",n=Xl("orderBy",e);return sc._create(n,t)}class ac extends ec{constructor(e,t,n){super(),this.type=e,this._limit=t,this._limitType=n}static _create(e,t,n){return new ac(e,t,n)}_apply(e){return new rl(e.firestore,e.converter,Ln(e._query,this._limit,this._limitType))}}function lc(e){return Ja("limit",e),ac._create("limit",e,"F")}class cc extends ec{constructor(e,t,n){super(),this.type=e,this._docOrFields=t,this._inclusive=n}static _create(e,t,n){return new cc(e,t,n)}_apply(e){const t=hc(e,this.type,this._docOrFields,this._inclusive);return new rl(e.firestore,e.converter,function(e,t){return new _n(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,t,e.endAt)}(e._query,t))}}function uc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return cc._create("startAfter",t,!1)}function hc(e,t,n,r){if(n[0]=(0,l.Ku)(n[0]),n[0]instanceof Ql)return function(e,t,n,r,i){if(!r)throw new L(j.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${n}().`);const s=[];for(const o of Nn(e))if(o.field.isKeyField())s.push(Vt(t,r.key));else{const e=r.data.field(o.field);if(wt(e))throw new L(j.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+o.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===e){const e=o.field.canonicalString();throw new L(j.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${e}' (used as the orderBy) does not exist.`)}s.push(e)}return new Jt(s,i)}(e._query,e.firestore._databaseId,t,n[0]._document,r);{const i=Nl(e.firestore);return function(e,t,n,r,i,s){const o=e.explicitOrderBy;if(i.length>o.length)throw new L(j.INVALID_ARGUMENT,`Too many arguments provided to ${r}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);const a=[];for(let l=0;l<i.length;l++){const s=i[l];if(o[l].field.isKeyField()){if("string"!=typeof s)throw new L(j.INVALID_ARGUMENT,`Invalid query. Expected a string for document ID in ${r}(), but got a ${typeof s}`);if(!Pn(e)&&-1!==s.indexOf("/"))throw new L(j.INVALID_ARGUMENT,`Invalid query. When querying a collection and ordering by documentId(), the value passed to ${r}() must be a plain document ID, but '${s}' contains a slash.`);const n=e.path.child(oe.fromString(s));if(!ce.isDocumentKey(n))throw new L(j.INVALID_ARGUMENT,`Invalid query. When querying a collection group and ordering by documentId(), the value passed to ${r}() must result in a valid document path, but '${n}
2' is not because it contains an odd number of segments.`);const i=new ce(n);a.push(Vt(t,i))}else{const e=Ul(n,r,s);a.push(e)}}return new Jt(a,s)}(e._query,e.firestore._databaseId,i,t,n,r)}}function dc(e,t,n){if("string"==typeof(n=(0,l.Ku)(n))){if(""===n)throw new L(j.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!Pn(t)&&-1!==n.indexOf("/"))throw new L(j.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);const r=t.path.child(oe.fromString(n));if(!ce.isDocumentKey(r))throw new L(j.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return Vt(e,new ce(r))}if(n instanceof il)return Vt(e,n._key);throw new L(j.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${Ya(n)}.`)}function fc(e,t){if(!Array.isArray(e)||0===e.length)throw new L(j.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${t.toString()}' filters.`)}function pc(e,t){const n=function(e,t){for(const n of e)for(const e of n.getFlattenedFilters())if(t.indexOf(e.op)>=0)return e.op;return null}(e.filters,function(e){switch(e){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(t.op));if(null!==n)throw n===t.op?new L(j.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${t.op.toString()}' filter.`):new L(j.INVALID_ARGUMENT,`Invalid query. You cannot use '${t.op.toString()}' filters with '${n.toString()}' filters.`)}class mc{convertValue(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";switch(Nt(e)){case 0:return null;case 1:return e.booleanValue;case 2:return pt(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(mt(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 11:return this.convertObject(e.mapValue,t);case 10:return this.convertVectorValue(e.mapValue);default:throw N(62114,{value:e})}}convertObject(e,t){return this.convertObjectMap(e.fields,t)}convertObjectMap(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";const n={};return tt(e,((e,r)=>{n[e]=this.convertValue(r,t)})),n}convertVectorValue(e){var t,n,r;const i=null===(r=null===(n=null===(t=e.fields)||void 0===t?void 0:t[Pt].arrayValue)||void 0===n?void 0:n.values)||void 0===r?void 0:r.map((e=>pt(e.doubleValue)));return new kl(i)}convertGeoPoint(e){return new El(pt(e.latitude),pt(e.longitude))}convertArray(e,t){return(e.values||[]).map((e=>this.convertValue(e,t)))}convertServerTimestamp(e,t){switch(t){case"previous":const n=xt(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(St(e));default:return null}}convertTimestamp(e){const t=ft(e);return new ne(t.seconds,t.nanos)}convertDocumentKey(e,t){const n=oe.fromString(e);D(Fi(n),9688,{name:e});const r=new Tt(n.get(1),n.get(3)),i=new ce(n.popFirst(5));return r.isEqual(t)||A(`Document ${i} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),i}}function gc(e,t,n){let r;return r=e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t,r}class vc extends mc{constructor(e){super(),this.firestore=e}convertBytes(e){return new wl(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return new il(this.firestore,null,t)}}function yc(e){return new yl("sum",ql("sum",e))}function bc(){return new yl("count")}class wc{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}
2class xc extends Ql{constructor(e,t,n,r,i,s){super(e,t,n,r,s),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._document){if(this._converter){const t=new Sc(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._document){const n=this._document.data.field(Xl("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}class Sc extends xc{data(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return super.data(e)}}class Ec{constructor(e,t,n,r){this._firestore=e,this._userDataWriter=t,this._snapshot=r,this.metadata=new wc(r.hasPendingWrites,r.fromCache),this.query=n}get docs(){const e=[];return this.forEach((t=>e.push(t))),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach((n=>{e.call(t,new Sc(this._firestore,this._userDataWriter,n.key,n,new wc(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))}))}docChanges(){const e=!!(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).includeMetadataChanges;if(e&&this._snapshot.excludesMetadataChanges)throw new L(j.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===e||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){let t=0;return e._snapshot.docChanges.map((n=>{const r=new Sc(e._firestore,e._userDataWriter,n.doc.key,n.doc,new wc(e._snapshot.mutatedKeys.has(n.doc.key),e._snapshot.fromCache),e.query.converter);return n.doc,{type:"added",doc:r,oldIndex:-1,newIndex:t++}}))}{let n=e._snapshot.oldDocs;return e._snapshot.docChanges.filter((e=>t||3!==e.type)).map((t=>{const r=new Sc(e._firestore,e._userDataWriter,t.doc.key,t.doc,new wc(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter);let i=-1,s=-1;return 0!==t.type&&(i=n.indexOf(t.doc.key),n=n.delete(t.doc.key)),1!==t.type&&(n=n.add(t.doc),s=n.indexOf(t.doc.key)),{type:kc(t.type),doc:r,oldIndex:i,newIndex:s}}))}}(this,e),this._cachedChangesIncludeMetadataChanges=e),this._cachedChanges}}function kc(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return N(61501,{type:e})}}function Tc(e){e=Xa(e,il);const t=Xa(e.firestore,dl);return $a(pl(t),e._key).then((n=>Oc(t,e,n)))}class _c extends mc{constructor(e){super(),this.firestore=e}convertBytes(e){return new wl(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return new il(this.firestore,null,t)}}function Cc(e){e=Xa(e,rl);const t=Xa(e.firestore,dl),n=pl(t),r=new _c(t);return Jl(e._query),qa(n,e._query).then((n=>new Ec(t,r,e,n)))}function Ac(e,t,n){e=Xa(e,il);const r=Xa(e.firestore,dl),i=gc(e.converter,t,n);return Dc(r,[Rl(Nl(r),"setDoc",e._key,i,null!==e.converter,n).toMutation(e._key,xr.none())])}function Ic(e,t,n){e=Xa(e,il);const r=Xa(e.firestore,dl),i=Nl(r);let s;for(var o=arguments.length,a=new Array(o>3?o-3:0),c=3;c<o;c++)a[c-3]=arguments[c];return s="string"==typeof(t=(0,l.Ku)(t))||t instanceof xl?Fl(i,"updateDoc",e._key,t,n,a):Ml(i,"updateDoc",e._key,t),Dc(r,[s.toMutation(e._key,xr.exists(!0))])}function Pc(e){return Dc(Xa(e.firestore,dl),[new Or(e._key,xr.none())])}function Nc(e,t){const n=Xa(e.firestore,dl),r=al(e),i=gc(e.converter,t);return Dc(n,[Rl(Nl(e.firestore),"addDoc",r._key,i,null!==e.converter,{}).toMutation(r._key,xr.exists(!1))]).then((()=>r))}function Rc(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i,s,o;e=(0,l.Ku)(e);let a={includeMetadataChanges:!1,source:"default"},c=0;"object"!=typeof n[c]||hl(n[c])||(a=n[c],c++);const u={includeMetadataChanges:a.includeMetadataChanges,source:a.source};if(hl(n[c])){const e=n[c];n[c]=null===(i=e.next)||void 0===i?void 0:i.bind(e),n[c+1]=null===(s=e.error)||void 0===s?void 0:s.bind(e),n[c+2]=null===(o=e.complete)||void 0===o?void 0:o.bind(e)}let h,d,f;if(e instanceof il)d=Xa(e.firestore,dl),f=An(e._key.path),h={next:t=>{n[c]&&n[c](Oc(d,e,t))},error:n[c+1],complete:n[c+2]};else{const t=Xa(e,rl);d=Xa(t.firestore,dl),f=t._query;const r=new _c(d);h={next:e=>{n[c]&&n[c](new Ec(d,r,t,e))},error:n[c+1],complete:n[c+2]},Jl(e._query)}return function(e,t,n,r){const i=new Ia(r),s=new Qo(t,i,n);return e.asyncQueue.enqueueAndForget((async()=>Bo(await Ba(e),s))),()=>{i.yu(),e.asyncQueue.enqueueAndForget((async()=>$o(await Ba(e),s)))}}(pl(d),f,u,h)}function Dc(e,t){return function(e,t){const n=new M;return e.asyncQueue.enqueueAndForget((async()=>async function(e,t,n){const r=Ta(e);try{const e=await function(e,t){const n=O(e),r=ne.now(),i=t.reduce(((e,t)=>e.add(t.key)),tr());let s,o;return n.persistence.runTransaction("Locally write mutations","readwrite",(e=>{let a=Wn(),l=tr();return n.Cs.getEntries(e,i).next((e=>{a=e,a.forEach(((e,t)=>{t.isValidDocument()||(l=l.add(e))}))})).next((()=>
2n.localDocuments.getOverlayedDocuments(e,a))).next((i=>{s=i;const o=[];for(const e of t){const t=Cr(e,s.get(e.key).overlayedDocument);null!=t&&o.push(new Pr(e.key,t,Yt(t.value.mapValue),xr.exists(!0)))}return n.mutationQueue.addMutationBatch(e,r,o,t)})).next((t=>{o=t;const r=t.applyToLocalDocumentSet(s,l);return n.documentOverlayCache.saveOverlays(e,t.batchId,r)}))})).then((()=>({batchId:o.batchId,changes:Qn(s)})))}(r.localStore,t);r.sharedClientState.addPendingMutation(e.batchId),function(e,t,n){let r=e.uu[e.currentUser.toKey()];r||(r=new it(Q)),r=r.insert(t,n),e.uu[e.currentUser.toKey()]=r}(r,e.batchId,n),await xa(r,e.changes),await xo(r.remoteStore)}catch(e){const t=jo(e,"Failed to persist write");n.reject(t)}}(await Va(e),t,n))),n.promise}(pl(e),t)}function Oc(e,t,n){const r=n.docs.get(t._key),i=new _c(e);return new xc(e,i,t._key,r,new wc(n.hasPendingWrites,n.fromCache),t.converter)}function jc(e,t){const n=Xa(e.firestore,dl),r=pl(n),i=nt(t,((e,t)=>new Ur(t,e.aggregateType,e._internalFieldPath)));return function(e,t,n){const r=new M;return e.asyncQueue.enqueueAndForget((async()=>{try{const i=await za(e);r.resolve(async function(e,t,n){var r;const i=O(e),{request:s,yt:o,parent:a}=Ai(i.serializer,Dn(t),n);i.connection.Bo||delete s.parent;const l=(await i.Wo("RunAggregationQuery",i.serializer.databaseId,a,s,1)).filter((e=>!!e.result));D(1===l.length,64727);const c=null===(r=l[0].result)||void 0===r?void 0:r.aggregateFields;return Object.keys(c).reduce(((e,t)=>(e[o[t]]=c[t],e)),{})}(i,t,n))}catch(e){r.reject(e)}})),r.promise}(r,e._query,i).then((t=>function(e,t,n){const r=new _c(e);return new bl(t,r,n)}(n,e,t)))}const Lc={maxAttempts:5};function Mc(e,t){if((e=(0,l.Ku)(e)).firestore!==t)throw new L(j.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e}class Fc{constructor(e,t){this._firestore=e,this._transaction=t,this._dataReader=Nl(e)}get(e){const t=Mc(e,this._firestore),n=new vc(this._firestore);return this._transaction.lookup([t._key]).then((e=>{if(!e||1!==e.length)return N(24041);const r=e[0];if(r.isFoundDocument())return new Ql(this._firestore,n,r.key,r,t.converter);if(r.isNoDocument())return new Ql(this._firestore,n,t._key,null,t.converter);throw N(18433,{doc:r})}))}set(e,t,n){const r=Mc(e,this._firestore),i=gc(r.converter,t,n),s=Rl(this._dataReader,"Transaction.set",r._key,i,null!==r.converter,n);return this._transaction.set(r._key,s),this}update(e,t,n){const r=Mc(e,this._firestore);let i;for(var s=arguments.length,o=new Array(s>3?s-3:0),a=3;a<s;a++)o[a-3]=arguments[a];return i="string"==typeof(t=(0,l.Ku)(t))||t instanceof xl?Fl(this._dataReader,"Transaction.update",r._key,t,n,o):Ml(this._dataReader,"Transaction.update",r._key,t),this._transaction.update(r._key,i),this}delete(e){const t=Mc(e,this._firestore);return this._transaction.delete(t._key),this}}class Uc extends Fc{constructor(e,t){super(e,t),this._firestore=e}get(e){const t=Mc(e,this._firestore),n=new _c(this._firestore);return super.get(e).then((e=>new xc(this._firestore,n,t._key,e._document,new wc(!1,!1),t.converter)))}}function Vc(e,t,n){e=Xa(e,dl);const r=Object.assign(Object.assign({},Lc),n);return function(e){if(e.maxAttempts<1)throw new L(j.INVALID_ARGUMENT,"Max attempts must be at least 1")}(r),function(e,t,n){const r=new M;return e.asyncQueue.enqueueAndForget((async()=>{const i=await za(e);new Na(e.asyncQueue,i,n,t,r).Nu()})),r.promise}(pl(e),(n=>t(new Uc(e,n))),r)}function zc(){return new Dl("deleteField")}function Bc(){return new jl("serverTimestamp")}function $c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Ll("arrayUnion",t)}new WeakMap;!function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];!function(e){k=e}(s.MF),(0,s.om)(new o.uA("firestore",((e,n)=>{let{instanceIdentifier:r,options:i}=n;const s=e.getProvider("app").getImmediate(),o=new dl(new z(e.getProvider("auth-internal")),new H(s,e.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new L(j.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Tt(e.options.projectId,t)}(s,r),s);return i=Object.assign({useFetchStreams:t},i),o._setSettings(i),o}),"PUBLIC").setMultipleInstances(!0)),(0,s.KO)(x,S,e),(0,s.KO)(x,S,"esm2017")}()},9795:(e,t,n)=>{"use strict";n.d(t,{z:()=>o});var r=n(8160),i=n(2769),s=n(6588);function o(e,t,n){const o=(0,i.S)(e)?e:(0,r.OQ)(e);return o.start((0,s.f)("",o,t,n)),o.animation}},3953:(e,t,n)=>{"use strict";n.d(t,{o:()=>g});var r=n(7540),i=n(3084),s=n(4773),o=n(3931);const a={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};var l=n(9565);const c=.001;function u(e){let t,n,{duration:r=a.duration,bounce:o=a.bounce,velocity:u
2=a.velocity,mass:f=a.mass}=e;(0,l.$)(r<=(0,i.f)(a.maxDuration),"Spring duration must be 10 seconds or less");let p=1-o;p=(0,s.q)(a.minDamping,a.maxDamping,p),r=(0,s.q)(a.minDuration,a.maxDuration,(0,i.X)(r)),p<1?(t=e=>{const t=e*p,n=t*r,i=t-u,s=d(e,p),o=Math.exp(-n);return c-i/s*o},n=e=>{const n=e*p*r,i=n*u+u,s=Math.pow(p,2)*Math.pow(e,2)*r,o=Math.exp(-n),a=d(Math.pow(e,2),p);return(-t(e)+c>0?-1:1)*((i-s)*o)/a}):(t=e=>Math.exp(-e*r)*((e-u)*r+1)-c,n=e=>Math.exp(-e*r)*(r*r*(u-e)));const m=function(e,t,n){let r=n;for(let i=1;i<h;i++)r-=e(r)/t(r);return r}(t,n,5/r);if(r=(0,i.f)(r),isNaN(m))return{stiffness:a.stiffness,damping:a.damping,duration:r};{const e=Math.pow(m,2)*f;return{stiffness:e,damping:2*p*Math.sqrt(f*e),duration:r}}}const h=12;function d(e,t){return e*Math.sqrt(1-t*t)}const f=["duration","bounce"],p=["stiffness","damping","mass"];function m(e,t){return t.some((t=>void 0!==e[t]))}function g(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.visualDuration,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.bounce;const n="object"!==typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:l,restDelta:c}=n;const h=n.keyframes[0],g=n.keyframes[n.keyframes.length-1],v={done:!1,value:h},{stiffness:y,damping:b,mass:w,duration:x,velocity:S,isResolvedFromDuration:E}=function(e){let t={velocity:a.velocity,stiffness:a.stiffness,damping:a.damping,mass:a.mass,isResolvedFromDuration:!1,...e};if(!m(e,p)&&m(e,f))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),i=r*r,o=2*(0,s.q)(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:a.mass,stiffness:i,damping:o}}else{const n=u(e);t={...t,...n,mass:a.mass},t.isResolvedFromDuration=!0}return t}({...n,velocity:-(0,i.X)(n.velocity||0)}),k=S||0,T=b/(2*Math.sqrt(y*w)),_=g-h,C=(0,i.X)(Math.sqrt(y/w)),A=Math.abs(_)<5;let I;if(l||(l=A?a.restSpeed.granular:a.restSpeed.default),c||(c=A?a.restDelta.granular:a.restDelta.default),T<1){const e=d(C,T);I=t=>{const n=Math.exp(-T*C*t);return g-n*((k+T*C*_)/e*Math.sin(e*t)+_*Math.cos(e*t))}}else if(1===T)I=e=>g-Math.exp(-C*e)*(_+(k+C*_)*e);else{const e=C*Math.sqrt(T*T-1);I=t=>{const n=Math.exp(-T*C*t),r=Math.min(e*t,300);return g-n*((k+T*C*_)*Math.sinh(r)+e*_*Math.cosh(r))/e}}const P={calculatedDuration:E&&x||null,next:e=>{const t=I(e);if(E)v.done=e>=x;else{let n=0;T<1&&(n=0===e?(0,i.f)(k):(0,o.Y)(I,e,t));const r=Math.abs(n)<=l,s=Math.abs(g-t)<=c;v.done=r&&s}return v.value=v.done?g:t,v},toString:()=>{const e=Math.min((0,r.tu)(P),r.YE),t=(0,r.KZ)((t=>P.next(e*t).value),e,30);return e+"ms "+t}};return P}},3931:(e,t,n)=>{"use strict";n.d(t,{Y:()=>s});var r=n(7852);const i=5;function s(e,t,n){const s=Math.max(t-i,0);return(0,r.f)(n-e(s),t-s)}},9927:(e,t,n)=>{"use strict";n.d(t,{s:()=>u});var r=n(9565),i=n(3077),s=n(4084);function o(e,t){[...t].reverse().forEach((n=>{const r=e.getVariant(n);r&&(0,i.U)(e,r),e.variantChildren&&e.variantChildren.forEach((e=>{o(e,t)}))}))}function a(){let e=!1;const t=new Set,n={subscribe:e=>(t.add(e),()=>{t.delete(e)}),start(n,i){(0,r.V)(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const o=[];return t.forEach((e=>{o.push((0,s._)(e,n,{transitionOverride:i}))})),Promise.all(o)},set:n=>((0,r.V)(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),t.forEach((e=>{!function(e,t){Array.isArray(t)?o(e,t):"string"===typeof t?o(e,[t]):(0,i.U)(e,t)}(e,n)}))),stop(){t.forEach((e=>{!function(e){e.values.forEach((e=>e.stop()))}(e)}))},mount:()=>(e=!0,()=>{e=!1,n.stop()})};return n}var l=n(4930),c=n(293);const u=function(){const e=(0,l.M)(a);return(0,c.E)(e.mount,[]),e}},6588:(e,t,n)=>{"use strict";n.d(t,{f:()=>te});var r=n(7540),i=n(3084),s=n(8721),o=n(5211);const a=!1;var l=n(4760);const c=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function u(e,t,n,r){if(e===t&&n===r)return l.l;const i=t=>function(e,t,n,r,i){let s,o,a=0;do{o=t+(n-t)/2,s=c(o,r,i)-e,s>0?n=o:t=o}while(Math.abs(s)>1e-7&&++a<12);return o}(t,0,1,e,n);return e=>0===e||1===e?e:c(i(e),t,r)}var h=n(5836),d=n(9333);const f=u(.33,1.53,.69,.99),p=(0,d.G)(f),m=(0,h.V)(p),g=e=>(e*=2)<1?.5*p(e):.5*(2-Math.pow(2,-10*(e-1)));var v=n(4569),y=n(2248),b=n(4175),w=n(8876),x=n(9565),S=n(3945);const E=(e,t)=>"zIndex"!==t&&(!("number"!==typeof e&&!Array.isArray(e))||!("string"!==typeof e||!S.f.test(e)&&"0"!==e||e.startsWith("url(")));const k=e=>null!==e;function T(e,t,n){let{repeat:r,repeatType:i="loop"}=t;const s=e.filter(k),o=r&&"loop"!==i&&r%2===1?0:s.length-1;return o&&void 0!==n?n:s[o]}class _{constructor(e){let{autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:
2o="loop",...a}=e;this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=b.k.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(0,w.q)(),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=b.k.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:s,delay:o,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!function(e,t,n,i){const s=e[0];if(null===s)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],a=E(s,t),l=E(o,t);return(0,x.$)(a===l,`You are trying to animate ${t} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`),!(!a||!l)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||(0,r.WH)(n))&&i)}(e,n,i,s)){if(a||!o)return c&&c(T(e,this.options,t)),l&&l(),void this.resolveFinishedPromise();this.options.duration=0}const h=this.initPlayback(e,t);!1!==h&&(this._resolved={keyframes:e,finalKeyframe:t,...h},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}var C=n(4773),A=n(5591),I=n(604),P=n(3953),N=n(3931);function R(e){let{keyframes:t,velocity:n=0,power:r=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:h}=e;const d=t[0],f={done:!1,value:d},p=e=>void 0===l?c:void 0===c||Math.abs(l-e)<Math.abs(c-e)?l:c;let m=r*n;const g=d+m,v=void 0===a?g:a(g);v!==g&&(m=v-d);const y=e=>-m*Math.exp(-e/i),b=e=>v+y(e),w=e=>{const t=y(e),n=b(e);f.done=Math.abs(t)<=u,f.value=f.done?v:n};let x,S;const E=e=>{var t;(t=f.value,void 0!==l&&t<l||void 0!==c&&t>c)&&(x=e,S=(0,P.o)({keyframes:[f.value,p(f.value)],velocity:(0,N.Y)(b,e,f.value),damping:s,stiffness:o,restDelta:u,restSpeed:h}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return S||void 0!==x||(t=!0,w(e),E(e)),void 0!==x&&e>=x?S.next(e-x):(!t&&w(e),f)}}}const D=u(.42,0,1,1),O=u(0,0,.58,1),j=u(.42,0,.58,1);var L=n(5968);const M={linear:l.l,easeIn:D,easeInOut:j,easeOut:O,circIn:v.po,circInOut:v.tn,circOut:v.yT,backIn:p,backInOut:m,backOut:f,anticipate:g},F=e=>{if((0,r.DW)(e)){(0,x.V)(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return u(t,n,r,i)}return"string"===typeof e?((0,x.V)(void 0!==M[e],`Invalid easing type '${e}'`),M[e]):e};var U=n(7029),V=n(6862);function z(e){let{duration:t=300,keyframes:n,times:r,ease:i="easeInOut"}=e;const s=(0,L.h)(i)?i.map(F):F(i),o={done:!1,value:n[0]},a=function(e,t){return e.map((e=>e*t))}(r&&r.length===n.length?r:(0,V.Z)(n),t),l=(0,U.G)(a,n,{ease:Array.isArray(s)?s:(c=n,u=s,c.map((()=>u||j)).splice(0,c.length-1))});var c,u;return{calculatedDuration:t,next:e=>(o.value=l(e),o.done=e>=t,o)}}const B=e=>{const t=t=>{let{timestamp:n}=t;return e(n)};return{start:()=>s.Gt.update(t,!0),stop:()=>(0,s.WG)(t),now:()=>s.uv.isProcessing?s.uv.timestamp:b.k.now()}},$={decay:R,inertia:R,tween:z,keyframes:z,spring:P.o},q=e=>e/100;class H extends _{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:i}=this.options,s=(null===r||void 0===r?void 0:r.KeyframeResolver)||w.h;this.resolver=new s(i,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=(0,r.WH)(t)?t:$[t]||z;let l,c;a!==z&&"number"!==typeof e[0]&&(l=(0,I.F)(q,(0,A.j)(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});"mirror"===s&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=(0,r.tu)(u));const{calculatedDuration:h}=u,d=h+i;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:d,totalDuration:d*(n+1)-i}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:i,mirroredGenerator:s,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return i.next(0);const{delay:h,repeat:d,repeatType:f,repeatDelay:p,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let y=this.currentTime,b=i;if(d){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,d+1);Boolean(t%2)&&("reverse"===f?(n=1-n,p&&(n-=p/u)):"mirror"===f&&(b=s)),y=(0,C.q)(0,1,n)*u}const w=v?{done:!1,value:a[0]}:b.next(y);o&&(w.value=o(w.value));let{done:x}=w;v||null===l||(x=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return S&&void 0!==r&&(w.value=T(a,this.options,r)),m&&m(w.value),S&&this.finish(),w}get duration(){const{resolved:e}=this;return e?(0,i.X)(e.calculatedDuration):0}
2get time(){return(0,i.X)(this.currentTime)}set time(e){e=(0,i.f)(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=(0,i.X)(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=B,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!==n&&void 0!==n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const W=new Set(["opacity","clipPath","filter","transform"]);const G=(0,n(9930).p)((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const K={anticipate:g,backInOut:m,circInOut:v.tn};class Q extends _{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new y.K(i,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;var u;if("string"===typeof s&&(0,r.nL)()&&s in K&&(s=K[s]),u=this.options,(0,r.WH)(u.type)||"spring"===u.type||!(0,r.yL)(u.ease)){const{onComplete:t,onUpdate:r,motionValue:a,element:l,...c}=this.options,u=function(e,t){const n=new H({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<2e4;)r=n.sample(s),i.push(r.value),s+=10;return{times:void 0,keyframes:i,duration:s-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),n=u.duration,i=u.times,s=u.ease,o="keyframes"}const h=function(e,t,n){let{delay:i=0,duration:s=300,repeat:o=0,repeatType:a="loop",ease:l="easeInOut",times:c}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const u={[t]:n};c&&(u.offset=c);const h=(0,r.TU)(l,s);return Array.isArray(h)&&(u.easing=h),e.animate(u,{delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===a?"alternate":"normal"})}(a.owner.current,l,e,{...this.options,duration:n,times:i,ease:s});return h.startTime=null!==c&&void 0!==c?c:this.calcStartTime(),this.pendingTimeline?((0,r.vG)(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:n}=this.options;a.set(T(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:n,times:i,type:o,ease:s,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return(0,i.X)(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return(0,i.X)(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=(0,i.f)(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return l.l;const{animation:n}=t;(0,r.vG)(n,e)}else this.pendingTimeline=e;return l.l}
2play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:s,ease:o,times:a}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:l,element:c,...u}=this.options,h=new H({...u,keyframes:n,duration:r,type:s,ease:o,times:a,isGenerator:!0}),d=(0,i.f)(this.time);e.setWithVelocity(h.sample(d-10).value,h.sample(d).value,10)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:o}=e;if(!t||!t.owner||!(t.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=t.owner.getProps();return G()&&n&&W.has(n)&&!a&&!l&&!r&&"mirror"!==i&&0!==s&&"inertia"!==o}}var Y=n(6124);const X={type:"spring",stiffness:500,damping:25,restSpeed:10},J={type:"keyframes",duration:.8},Z={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ee=(e,t)=>
2{let{keyframes:n}=t;return n.length>2?J:Y.f.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===n[1]?2*Math.sqrt(550):30,restSpeed:10}:X:Z};const te=function(e,t,n){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=arguments.length>4?arguments[4]:void 0,u=arguments.length>5?arguments[5]:void 0;return h=>{const d=(0,r.rU)(l,e)||{},f=d.delay||l.delay||0;let{elapsed:p=0}=l;p-=(0,i.f)(f);let m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...d,delay:-p,onUpdate:e=>{t.set(e),d.onUpdate&&d.onUpdate(e)},onComplete:()=>{h(),d.onComplete&&d.onComplete()},name:e,motionValue:t,element:u?void 0:c};(function(e){let{when:t,delay:n,delayChildren:r,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:a,repeatDelay:l,from:c,elapsed:u,...h}=e;return!!Object.keys(h).length})(d)||(m={...m,...ee(e,m)}),m.duration&&(m.duration=(0,i.f)(m.duration)),m.repeatDelay&&(m.repeatDelay=(0,i.f)(m.repeatDelay)),void 0!==m.from&&(m.keyframes[0]=m.from);let g=!1;if((!1===m.type||0===m.duration&&!m.repeatDelay)&&(m.duration=0,0===m.delay&&(g=!0)),(a||o.W.skipAnimations)&&(g=!0,m.duration=0,m.delay=0),g&&!u&&void 0!==t.get()){const e=T(m.keyframes,d);if(void 0!==e)return s.Gt.update((()=>{m.onUpdate(e),m.onComplete()})),new r.P6([])}return!u&&Q.supports(m)?new Q(m):new H(m)}}},1453:(e,t,n)=>{"use strict";n.d(t,{$:()=>h});var r=n(7540),i=n(7517),s=n(3077),o=n(6268),a=n(6485),l=n(6588),c=n(8721);function u(e,t){let{protectedKeys:n,needsAnimating:r}=e;const i=n.hasOwnProperty(t)&&!0!==r[t];return r[t]=!1,i}function h(e,t){let{delay:n=0,transitionOverride:h,type:d}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var f;let{transition:p=e.getDefaultTransition(),transitionEnd:m,...g}=t;h&&(p=h);const v=[],y=d&&e.animationState&&e.animationState.getState()[d];for(const s in g){const t=e.getValue(s,null!==(f=e.latestValues[s])&&void 0!==f?f:null),h=g[s];if(void 0===h||y&&u(y,s))continue;const d={delay:n,...(0,r.rU)(p||{},s)};let m=!1;if(window.MotionHandoffAnimation){const t=(0,a.P)(e);if(t){const e=window.MotionHandoffAnimation(t,s,c.Gt);null!==e&&(d.startTime=e,m=!0)}}(0,o.g)(e,s),t.start((0,l.f)(s,t,h,e.shouldReduceMotion&&i.$.has(s)?{type:!1}:d,e,m));const b=t.animation;b&&v.push(b)}return m&&Promise.all(v).then((()=>{c.Gt.update((()=>{m&&(0,s.U)(e,m)}))})),v}},4084:(e,t,n)=>{"use strict";n.d(t,{_:()=>a});var r=n(260),i=n(1453);function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var a;const l=(0,r.K)(e,t,"exit"===n.type?null===(a=e.presenceContext)||void 0===a?void 0:a.custom:void 0);let{transition:c=e.getDefaultTransition()||{}}=l||{};n.transitionOverride&&(c=n.transitionOverride);const u=l?()=>Promise.all((0,i.$)(e,l,n)):()=>Promise.resolve(),h=e.variantChildren&&e.variantChildren.size?function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const{delayChildren:i=0,staggerChildren:a,staggerDirection:l}=c;return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=arguments.length>5?arguments[5]:void 0;const l=[],c=(e.variantChildren.size-1)*r,u=1===i?function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)*r}:function(){return c-(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)*r};return Array.from(e.variantChildren).sort(o).forEach(((e,r)=>{e.notify("AnimationStart",t),l.push(s(e,t,{...a,delay:n+u(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(l)}(e,t,i+r,a,l,n)}:()=>Promise.resolve(),{when:d}=c;if(d){const[e,t]="beforeChildren"===d?[u,h]:[h,u];return e().then((()=>t()))}return Promise.all([u(),h(n.delay)])}function o(e,t){return e.sortNodePosition(t)}function a(e,t){let n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.notify("AnimationStart",t),Array.isArray(t)){const r=t.map((t=>s(e,t,o)));n=Promise.all(r)}else if("string"===typeof t)n=s(e,t,o);else{const s="function"===typeof t?(0,r.K)(e,t,o.custom):t;n=Promise.all((0,i.$)(e,s,o))}return n.then((()=>
2{e.notify("AnimationComplete",t)}))}},971:(e,t,n)=>{"use strict";n.d(t,{n:()=>r});const r="data-"+(0,n(2093).I)("framerAppearId")},6485:(e,t,n)=>{"use strict";n.d(t,{P:()=>i});var r=n(971);function i(e){return e.props[r.n]}},9615:(e,t,n)=>{"use strict";function r(e){return null!==e&&"object"===typeof e&&"function"===typeof e.start}n.d(t,{N:()=>r})},1485:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});const r=e=>Array.isArray(e)},3546:(e,t,n)=>{"use strict";n.d(t,{N:()=>v});var r=n(579),i=n(5043),s=n(2190),o=n(4930),a=n(9674),l=n(1051);class c extends i.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=t.offsetParent,n=e instanceof HTMLElement&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function u(e){let{children:t,isPresent:n,anchorX:s}=e;const o=(0,i.useId)(),a=(0,i.useRef)(null),u=(0,i.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:h}=(0,i.useContext)(l.Q);return(0,i.useInsertionEffect)((()=>{const{width:e,height:t,top:r,left:i,right:l}=u.current;if(n||!a.current||!e||!t)return;const c="left"===s?`left: ${i}`:`right: ${l}`;a.current.dataset.motionPopId=o;const d=document.createElement("style");return h&&(d.nonce=h),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`\n [data-motion-pop-id="${o}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n ${c}px !important;\n top: ${r}px !important;\n }\n `),()=>{document.head.removeChild(d)}}),[n]),(0,r.jsx)(c,{isPresent:n,childRef:a,sizeRef:u,children:i.cloneElement(t,{ref:a})})}const h=e=>{let{children:t,initial:n,isPresent:s,onExitComplete:l,custom:c,presenceAffectsLayout:h,mode:f,anchorX:p}=e;const m=(0,o.M)(d),g=(0,i.useId)(),v=(0,i.useCallback)((e=>{m.set(e,!0);for(const t of m.values())if(!t)return;l&&l()}),[m,l]),y=(0,i.useMemo)((()=>({id:g,initial:n,isPresent:s,custom:c,onExitComplete:v,register:e=>(m.set(e,!1),()=>m.delete(e))})),h?[Math.random(),v]:[s,v]);return(0,i.useMemo)((()=>{m.forEach(((e,t)=>m.set(t,!1)))}),[s]),i.useEffect((()=>{!s&&!m.size&&l&&l()}),[s]),"popLayout"===f&&(t=(0,r.jsx)(u,{isPresent:s,anchorX:p,children:t})),(0,r.jsx)(a.t.Provider,{value:y,children:t})};function d(){return new Map}var f=n(8917);const p=e=>e.key||"";function m(e){const t=[];return i.Children.forEach(e,(e=>{(0,i.isValidElement)(e)&&t.push(e)})),t}var g=n(293);const v=e=>{let{children:t,custom:n,initial:a=!0,onExitComplete:l,presenceAffectsLayout:c=!0,mode:u="sync",propagate:d=!1,anchorX:v="left"}=e;const[y,b]=(0,f.xQ)(d),w=(0,i.useMemo)((()=>m(t)),[t]),x=d&&!y?[]:w.map(p),S=(0,i.useRef)(!0),E=(0,i.useRef)(w),k=(0,o.M)((()=>new Map)),[T,_]=(0,i.useState)(w),[C,A]=(0,i.useState)(w);(0,g.E)((()=>{S.current=!1,E.current=w;for(let e=0;e<C.length;e++){const t=p(C[e]);x.includes(t)?k.delete(t):!0!==k.get(t)&&k.set(t,!1)}}),[C,x.length,x.join("-")]);const I=[];if(w!==T){let e=[...w];for(let t=0;t<C.length;t++){const n=C[t],r=p(n);x.includes(r)||(e.splice(t,0,n),I.push(n))}return"wait"===u&&I.length&&(e=I),A(m(e)),_(w),null}const{forceRender:P}=(0,i.useContext)(s.L);return(0,r.jsx)(r.Fragment,{children:C.map((e=>{const t=p(e),i=!(d&&!y)&&(w===C||x.includes(t));return(0,r.jsx)(h,{isPresent:i,initial:!(S.current&&!a)&&void 0,custom:i?void 0:n,presenceAffectsLayout:c,mode:u,onExitComplete:i?void 0:()=>{if(!k.has(t))return;k.set(t,!0);let e=!0;k.forEach((t=>{t||(e=!1)})),e&&(null===P||void 0===P||P(),A(E.current),d&&(null===b||void 0===b||b()),l&&l())},anchorX:v,children:e},t)}))})}},8917:(e,t,n)=>{"use strict";n.d(t,{xQ:()=>s});var r=n(5043),i=n(9674);function s(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=(0,r.useContext)(i.t);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:s,register:o}=t,a=(0,r.useId)();(0,r.useEffect)((()=>{e&&o(a)}),[e]);const l=(0,r.useCallback)((()=>e&&s&&s(a)),[a,s,e]);return!n&&s?[!1,l]:[!0]}},2190:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});const r=(0,n(5043).createContext)({})},1051:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});const r=(0,n(5043).createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})}
2,9674:(e,t,n)=>{"use strict";n.d(t,{t:()=>r});const r=(0,n(5043).createContext)(null)},4569:(e,t,n)=>{"use strict";n.d(t,{po:()=>s,tn:()=>a,yT:()=>o});var r=n(5836),i=n(9333);const s=e=>1-Math.sin(Math.acos(e)),o=(0,i.G)(s),a=(0,r.V)(s)},5836:(e,t,n)=>{"use strict";n.d(t,{V:()=>r});const r=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2},9333:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const r=e=>t=>1-e(1-t)},5968:(e,t,n)=>{"use strict";n.d(t,{h:()=>r});const r=e=>Array.isArray(e)&&"number"!==typeof e[0]},2494:(e,t,n)=>{"use strict";n.d(t,{I:()=>o});var r=n(5211);const i=["read","resolveKeyframes","update","preRender","render","postRender"],s=40;function o(e,t){let n=!1,o=!0;const a={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,c=i.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(t){s.has(t)&&(l.schedule(t),e()),t(o)}const l={schedule:function(e){const i=arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&r?t:n;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&s.add(e),i.has(e)||i.add(e),e},cancel:e=>{n.delete(e),s.delete(e)},process:e=>{o=e,r?i=!0:(r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,i&&(i=!1,l.process(e)))}};return l}(l),e)),{}),{read:u,resolveKeyframes:h,update:d,preRender:f,render:p,postRender:m}=c,g=()=>{const i=r.W.useManualTiming?a.timestamp:performance.now();n=!1,a.delta=o?1e3/60:Math.max(Math.min(i-a.timestamp,s),1),a.timestamp=i,a.isProcessing=!0,u.process(a),h.process(a),d.process(a),f.process(a),p.process(a),m.process(a),a.isProcessing=!1,n&&t&&(o=!1,e(g))},v=i.reduce(((t,r)=>{const i=c[r];return t[r]=function(t){let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n||(n=!0,o=!0,a.isProcessing||e(g)),i.schedule(t,r,s)},t}),{});return{schedule:v,cancel:e=>{for(let t=0;t<i.length;t++)c[i[t]].cancel(e)},state:a,steps:c}}},8721:(e,t,n)=>{"use strict";n.d(t,{Gt:()=>s,PP:()=>l,WG:()=>o,uv:()=>a});var r=n(4760),i=n(2494);const{schedule:s,cancel:o,state:a,steps:l}=(0,i.I)("undefined"!==typeof requestAnimationFrame?requestAnimationFrame:r.l,!0)},4175:(e,t,n)=>{"use strict";n.d(t,{k:()=>a});var r=n(5211),i=n(8721);let s;function o(){s=void 0}const a={now:()=>(void 0===s&&a.set(i.uv.isProcessing||r.W.useManualTiming?i.uv.timestamp:performance.now()),s),set:e=>{s=e,queueMicrotask(o)}}},9601:(e,t,n)=>{"use strict";n.d(t,{B:()=>i});const r={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},i={};for(const s in r)i[s]={isEnabled:e=>r[s].some((t=>!!e[t]))}},2420:(e,t,n)=>{"use strict";n.d(t,{z:()=>s});var r=n(4886),i=n(6124);function s(e,t){let{layout:n,layoutId:s}=t;return i.f.has(e)||e.startsWith("origin")||(n||void 0!==s)&&(!!r.H[e]||"opacity"===e)}},6772:(e,t,n)=>{"use strict";function r(e){let{top:t,left:n,right:r,bottom:i}=e;return{x:{min:n,max:r},y:{min:t,max:i}}}function i(e){let{x:t,y:n}=e;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}function s(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}n.d(t,{FY:()=>r,bS:()=>s,pA:()=>i})}
2,7664:(e,t,n)=>{"use strict";n.d(t,{OU:()=>h,Ql:()=>d,Ww:()=>p,hq:()=>s,o4:()=>l});var r=n(8842),i=n(4077);function s(e,t,n){return n+t*(e-n)}function o(e,t,n,r,i){return void 0!==i&&(e=s(e,i,r)),s(e,n,r)+t}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;e.min=o(e.min,t,n,r,i),e.max=o(e.max,t,n,r,i)}function l(e,t){let{x:n,y:r}=t;a(e.x,n.translate,n.scale,n.originPoint),a(e.y,r.translate,r.scale,r.originPoint)}const c=.999999999999,u=1.0000000000001;function h(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=n.length;if(!s)return;let o,a;t.x=t.y=1;for(let c=0;c<s;c++){o=n[c],a=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&p(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,l(e,a)),r&&(0,i.HD)(o.latestValues)&&p(e,o.latestValues))}t.x<u&&t.x>c&&(t.x=1),t.y<u&&t.y>c&&(t.y=1)}function d(e,t){e.min=e.min+t,e.max=e.max+t}function f(e,t,n,i){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5;a(e,t,n,(0,r.k)(e.min,e.max,s),i)}function p(e,t){f(e.x,t.x,t.scaleX,t.scale,t.originX),f(e.y,t.y,t.scaleY,t.scale,t.originY)}},8093:(e,t,n)=>{"use strict";n.d(t,{ge:()=>i,xU:()=>r});const r=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),i=()=>({x:{min:0,max:0},y:{min:0,max:0}})},4886:(e,t,n)=>{"use strict";n.d(t,{$:()=>s,H:()=>i});var r=n(7343);const i={};function s(e){for(const t in e)i[t]=e[t],(0,r.j)(t)&&(i[t].isCSSVariable=!0)}},4077:(e,t,n)=>{"use strict";function r(e){return void 0===e||1===e}function i(e){let{scale:t,scaleX:n,scaleY:i}=e;return!r(t)||!r(n)||!r(i)}function s(e){return i(e)||o(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function o(e){return a(e.x)||a(e.y)}function a(e){return e&&"0%"!==e}n.d(t,{HD:()=>s,vF:()=>o,vk:()=>i})},6358:(e,t,n)=>{"use strict";n.d(t,{L:()=>o,m:()=>s});var r=n(6772),i=n(7664);function s(e,t){return(0,r.FY)((0,r.bS)(e.getBoundingClientRect(),t))}function o(e,t,n){const r=s(e,n),{scroll:o}=t;return o&&((0,i.Ql)(r.x,o.offset.x),(0,i.Ql)(r.y,o.offset.y)),r}},2708:(e,t,n)=>{"use strict";n.d(t,{B:()=>_});var r=n(4175),i=n(9601),s=n(8093),o=n(3665),a=n(9611),l=n(2892),c=n(1795),u=n(553),h=n(8160),d=n(3945),f=n(2769),p=n(4459),m=n(8066),g=n(2201),v=n(9796);const y=[...g.T,m.y,d.f];var b=n(6124),w=n(9952),x=n(9426),S=n(8876);var E=n(8240),k=n(8721);const T=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class _{scrapeMotionValuesFromProps(e,t,n){return{}}constructor(e){let{parent:t,props:n,presenceContext:i,reducedMotionConfig:s,blockInitialAnimation:o,visualState:a}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=S.h,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=r.k.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,k.Gt.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:h}=a;this.onUpdate=h,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=l,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=(0,x.e)(n),this.isVariantNode=(0,x.O)(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:d,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const r in p){const e=p[r];void 0!==c[r]&&(0,f.S)(e)&&e.set(c[r],!1)}}mount(e){this.current=e,w.C.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
2h(((e,t)=>this.bindToMotionValue(t,e))),c.r.current||(0,l.U)(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||c.O.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),(0,k.WG)(this.notifyUpdate),(0,k.WG)(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=b.f.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&k.Gt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=t.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),i(),s&&s(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in i.B){const t=i.B[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):(0,s.ge)()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<T.length;n++){const t=T[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const i=t[r],s=n[r];if((0,f.S)(i))e.addValue(r,i);else if((0,f.S)(s))e.addValue(r,(0,h.OQ)(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(r);e.addValue(r,(0,h.OQ)(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=(0,h.OQ)(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var i;return void 0!==r&&null!==r&&("string"===typeof r&&((0,o.i)(r)||(0,a.$)(r))?r=parseFloat(r):(i=r,!y.find((0,v.w)(i))&&d.f.test(t)&&(r=(0,p.J)(e,t))),this.setBaseTarget(e,(0,f.S)(r)?r.get():r)),(0,f.S)(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"===typeof n||"object"===typeof n){const i=(0,E.a)(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);i&&(r=i[e])}if(n&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||(0,f.S)(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new u.v),this.events[e].add(t)}notify(e){if(this.events[e]){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.events[e].notify(...n)}}}},7663:(e,t,n)=>{"use strict";function r(e){if("undefined"===typeof Proxy)return e;const t=new Map;return new Proxy((function(){return e(...arguments)}),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}n.d(t,{P:()=>Zn});var i=n(9615),s=n(4084),o=n(1485);function a(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var l=n(9742),c=n(3223);const u=c._.length;function h(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&h(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<u;n++){const r=c._[n],i=e.props[r];((0,l.w)(i)||!1===i)&&(t[r]=i)}return t}var d=n(260);const f=[...c.U].reverse(),p=c.U.length;function m(e){let t=function(e){return t=>Promise.all(t.map((t=>{let{animation:n,options:r}=t;return(0,s._)(e,n,r)})))}(e),n=y(),r=!0;const c=t=>(n,r)=>{var i;const s=(0,d.K)(e,r,"exit"===t?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);if(s){const{transition:e,transitionEnd:t,...r}=s;n={...n,...r,...t}}return n};function u(s){const{props:u}=e,d=h(e.parent)||{},m=[],v=new Set;let y={},b=1/0;for(let t=0;t<p;t++){const h=f[t],p=n[h],w=void 0!==u[h]?u[h]:d[h],x=(0,l.w)(w),S=h===s?p.isActive:null;!1===S&&(b=t);let E=w===d[h]&&w!==u[h]&&x;
2if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),p.protectedKeys={...y},!p.isActive&&null===S||!w&&!p.prevProp||(0,i.N)(w)||"boolean"===typeof w)continue;const k=g(p.prevProp,w);let T=k||h===s&&p.isActive&&!E&&x||t>b&&x,_=!1;const C=Array.isArray(w)?w:[w];let A=C.reduce(c(h),{});!1===S&&(A={});const{prevResolvedValues:I={}}=p,P={...I,...A},N=t=>{T=!0,v.has(t)&&(_=!0,v.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in P){const t=A[e],n=I[e];if(y.hasOwnProperty(e))continue;let r=!1;r=(0,o.p)(t)&&(0,o.p)(n)?!a(t,n):t!==n,r?void 0!==t&&null!==t?N(e):v.add(e):void 0!==t&&v.has(e)?N(e):p.protectedKeys[e]=!0}p.prevProp=w,p.prevResolvedValues=A,p.isActive&&(y={...y,...A}),r&&e.blockInitialAnimation&&(T=!1);T&&(!(E&&k)||_)&&m.push(...C.map((e=>({animation:e,options:{type:h}}))))}if(v.size){const t={};v.forEach((n=>{const r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=null!==r&&void 0!==r?r:null})),m.push({animation:t})}let w=Boolean(m.length);return!r||!1!==u.initial&&u.initial!==u.animate||e.manuallyAnimateOnMount||(w=!1),r=!1,w?t(m):Promise.resolve()}return{animateChanges:u,setActive:function(t,r){var i;if(n[t].isActive===r)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=u(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=y(),r=!0}}}function g(e,t){return"string"===typeof t?t!==e:!!Array.isArray(t)&&!a(t,e)}function v(){return{isActive:arguments.length>0&&void 0!==arguments[0]&&arguments[0],protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function y(){return{animate:v(!0),whileInView:v(),whileHover:v(),whileTap:v(),whileDrag:v(),whileFocus:v(),exit:v()}}class b{constructor(e){this.isMounted=!1,this.node=e}update(){}}let w=0;const x={animation:{Feature:class extends b{constructor(e){super(e),e.animationState||(e.animationState=m(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();(0,i.N)(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends b{constructor(){super(...arguments),this.id=w++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>{t(this.id)}))}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};var S=n(4760),E=n(9565),k=n(7540),T=n(3084);function _(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!0};return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function C(e){return{point:{x:e.pageX,y:e.pageY}}}function A(e,t,n,r){return _(e,t,(e=>t=>(0,k.Mc)(t)&&e(t,C(t)))(n),r)}const I=(e,t)=>Math.abs(e-t);var P=n(604),N=n(8721);class R{constructor(e,t){let{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=j(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=I(e.x,t.x),r=I(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=N.uv;this.history.push({...r,timestamp:i});const{onStart:s,onMove:o}=this.handlers;t||(s&&s(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=D(t,this.transformPagePoint),N.Gt.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const s=j("pointercancel"===e.type?this.lastMoveEventInfo:D(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,s),r&&r(e,s)},!(0,k.Mc)(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const s=D(C(e),this.transformPagePoint),{point:o}=s,{timestamp:a}=N.uv;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,j(s,this.history)),this.removeListeners=(0,P.F)(A(this.contextWindow,"pointermove",this.handlePointerMove),A(this.contextWindow,"pointerup",this.handlePointerUp),A(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),(0,N.WG)(this.updatePoint)}}function D(e,t){return t?{point:t(e.point)}:e}function O(e,t){return{x:e.x-t.x,y:e.y-t.y}}function j(e,t){let{point:n}=e;return{point:n,delta:O(n,M(t)),offset:O(n,L(t)),velocity:F(t,.1)}}function L(e){return e[0]}function M(e){return e[e.length-1]}function F(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=M(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>(0,T.f)(t)));)n--;if(!r)return{x:0,y:0};const s=(0,T.X)(i.timestamp-r.timestamp);if(0===s)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function U(e){return e&&"object"===typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}var V=n(2349),z=n(8842);function B(e){return e.max-e.min}function $(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;e.origin=r,e.originPoint=(0,z.k)(t.min,t.max,e.origin),e.scale=B(n)/B(t),e.translate=(0,z.k)(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function q(e,t,n,r){$(e.x,t.x,n.x,r?r.originX:void 0),$(e.y,t.y,n.y,r?r.originY:void 0)}function H(e,t,n){e.min=n.min+t.min,e.max=e.min+B(t)}function W(e,t,n){e.min=t.min-n.min,e.max=e.min+B(t)}function G(e,t,n){W(e.x,t.x,n.x),W(e.y,t.y,n.y)}var K=n(4773);function Q(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Y(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const X=.35;function J(e,t,n){return{min:Z(e,t),max:Z(e,n)}}function Z(e,t){return"number"===typeof e?e:e[t]||0}var ee=n(8093);function te(e){return[e("x"),e("y")]}var ne=n(6358),re=n(6772),ie=n(2852),se=n(6588);const oe=e=>{let{current:t}=e;return t?t.ownerDocument.defaultView:null};var ae=n(6268);const le=new WeakMap;class ce{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=(0,ee.ge)(),this.visualElement=e}start(e){let{snapToCursor:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new R(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(C(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=(0,k.Wp)(n),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),te((e=>{let t=this.getAxisMotionValue(e).get()||0;if(ie.KN.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=B(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),i&&N.Gt.postRender((()=>i(e,t))),(0,ae.g)(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>
2{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:s}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:o}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(o),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,o),this.updateAxis("y",t.point,o),this.visualElement.render(),s&&s(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>te((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:oe(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:i}=this.getProps();i&&N.Gt.postRender((()=>i(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!ue(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let s=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(s=function(e,t,n){let{min:r,max:i}=t;return void 0!==r&&e<r?e=n?(0,z.k)(r,e,n.min):Math.max(e,r):void 0!==i&&e>i&&(e=n?(0,z.k)(i,e,n.max):Math.min(e,i)),e}(s,this.constraints[e],this.elastic[e])),i.set(s)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,i=this.constraints;t&&U(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,t){let{top:n,left:r,bottom:i,right:s}=t;return{x:Q(e.x,r,s),y:Q(e.y,n,i)}}(r.layoutBox,t),this.elastic=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X;return!1===e?e=0:!0===e&&(e=X),{x:J(e,"left","right"),y:J(e,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&te((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!U(e))return!1;const n=e.current;(0,E.V)(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=(0,ne.L)(n,r.root,this.visualElement.getTransformPagePoint());let s=function(e,t){return{x:Y(e.x,t.x),y:Y(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t((0,re.pA)(s));this.hasMutatedConstraints=!!e,e&&(s=(0,re.FY)(e))}return s}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),a=this.constraints||{},l=te((o=>{if(!ue(o,t,this.currentDirection))return;let l=a&&a[o]||{};s&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,h={type:"inertia",velocity:n?e[o]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(o,h)}));return Promise.all(l).then(o)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return(0,ae.g)(this.visualElement,e),n.start((0,se.f)(e,n,0,t,this.visualElement,!1))}stopAnimation(){te((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){te((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){te((t=>{const{drag:n}=this.getProps();if(!ue(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:s}=r.layout.layoutBox[t];i.set(e[t]-(0,z.k)(n,s,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!U(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};te((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=B(e),i=B(t);return i>r?n=(0,V.q)(t.min,t.max-r,e.min):r>i&&(n=(0,V.q)(e.min,e.max-i,t.min)),(0,K.q)(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),te((t=>{if(!ue(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:s}=this.constraints[t];n.set((0,z.k)(i,s,r[t]))}))}addListeners(){if(!this.visualElement.current)return;le.set(this.visualElement,this);const e=A(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}
2=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();U(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),N.Gt.read(t);const i=_(window,"resize",(()=>this.scalePositionWithinConstraints())),s=n.addEventListener("didUpdate",(e=>{let{delta:t,hasLayoutChanged:n}=e;this.isDragging&&n&&(te((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{i(),e(),r(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:s=X,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:s,dragMomentum:o}}}function ue(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}const he=e=>(t,n)=>{e&&N.Gt.postRender((()=>e(t,n)))};var de=n(579),fe=n(5043),pe=n(8917),me=n(2190);const ge=(0,fe.createContext)({}),ve={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ye(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const be={correct:(e,t)=>{if(!t.target)return e;if("string"===typeof e){if(!ie.px.test(e))return e;e=parseFloat(e)}return`${ye(e,t.target.x)}% ${ye(e,t.target.y)}%`}};var we=n(3945);const xe={correct:(e,t)=>{let{treeScale:n,projectionDelta:r}=t;const i=e,s=we.f.parse(e);if(s.length>5)return i;const o=we.f.createTransformer(e),a="number"!==typeof s[0]?1:0,l=r.x.scale*n.x,c=r.y.scale*n.y;s[0+a]/=l,s[1+a]/=c;const u=(0,z.k)(l,c,.5);return"number"===typeof s[2+a]&&(s[2+a]/=u),"number"===typeof s[3+a]&&(s[3+a]/=u),o(s)}};var Se=n(4886),Ee=n(2494);const{schedule:ke,cancel:Te}=(0,Ee.I)(queueMicrotask,!1);class _e extends fe.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;(0,Se.$)(Ae),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",(()=>{this.safeToRemove()})),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ve.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,s=n.projection;return s?(s.isPresent=i,r||e.layoutDependency!==t||void 0===t?s.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?s.promote():s.relegate()||N.Gt.postRender((()=>{const e=s.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),ke.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Ce(e){const[t,n]=(0,pe.xQ)(),r=(0,fe.useContext)(me.L);return(0,de.jsx)(_e,{...e,layoutGroup:r,switchLayoutGroup:(0,fe.useContext)(ge),isPresent:t,safeToRemove:n})}const Ae={borderRadius:{...be,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:be,borderTopRightRadius:be,borderBottomLeftRadius:be,borderBottomRightRadius:be,boxShadow:xe};var Ie=n(9795),Pe=n(6485),Ne=n(4175),Re=n(6018),De=n(5671);const Oe=(e,t)=>e.depth-t.depth;class je{constructor(){this.children=[],this.isDirty=!1}add(e){(0,De.Kq)(this.children,e),this.isDirty=!0}remove(e){(0,De.Ai)(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Oe),this.isDirty=!1,this.children.forEach(e)}}function Le(e,t){const n=Ne.k.now(),r=i=>{let{timestamp:s}=i;const o=s-n;o>=t&&((0,N.WG)(r),e(o-t))};return N.Gt.read(r,!0),()=>(0,N.WG)(r)}var Me=n(553),Fe=n(6992),Ue=n(2769);function Ve(e){const t=(0,Ue.S)(e)?e.get():e;return(0,Fe.B)(t)?t.toValue():t}var ze=n(4569);const Be=["TopLeft","TopRight","BottomLeft","BottomRight"],$e=Be.length,qe=e=>"string"===typeof e?parseFloat(e):e,He=e=>"number"===typeof e||ie.px.test(e);function We(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Ge=Qe(0,.5,ze.yT),Ke=Qe(.5,.95,S.l);function Qe(e,t,n){return r=>r<e?0:r>t?1:n((0,V.q)(e,t,r))}function Ye(e,t){e.min=t.min,e.max=t.max}function Xe(e,t){Ye(e.x,t.x),Ye(e.y,t.y)}function Je(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Ze=n(7664);function et(e,t,n,r,i){return e-=t,e=(0,Ze.hq)(e,1/n,r),void 0!==i&&(e=(0,Ze.hq)(e,1/i,r)),e}function tt(e,t,n,r,i){let[s,o,a]=n;!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,i=arguments.length>4?arguments[4]:void 0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:e;ie.KN.test(t)&&(t=parseFloat(t),t=(0,z.k)(o.min,o.max,t/100)-o.min);if("number"!==typeof t)return;let a=(0,z.k)(s.min,s.max,r);e===s&&(a-=t),e.min=et(e.min,t,n,a,i),e.max=et(e.max,t,n,a,i)}(e,t[s],t[o],t[a],t.scale,r,i)}const nt=["x","scaleX","originX"],rt=["y","scaleY","originY"];function it(e,t,n,r){tt(e.x,t,nt,n?n.x:void 0,r?r.x:void 0),tt(e.y,t,rt,n?n.y:void 0,r?r.y:void 0)}function st(e){return 0===e.translate&&1===e.scale}function ot(e){return st(e.x)&&st(e.y)}function at(e,t){return e.min===t.min&&e.max===t.max}function lt(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ct(e,t){return lt(e.x,t.x)&<(e.y,t.y)}function ut(e){return B(e.x)/B(e.y)}function ht(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class dt{constructor(){this.members=[]}add(e){(0,De.Kq)(this.members,e),e.scheduleRender()}remove(e){if((0,De.Ai)(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}
2exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}var ft=n(4077);const pt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},mt="undefined"!==typeof window&&void 0!==window.MotionDebug,gt=["","X","Y","Z"],vt={visibility:"hidden"};let yt=0;function bt(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function wt(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=(0,Pe.P)(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",N.Gt,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&wt(r)}function xt(e){let{attachResizeListener:t,defaultParent:n,measureScroll:r,checkIsScrollRoot:i,resetTransform:s}=e;return class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===n||void 0===n?void 0:n();this.id=yt++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,mt&&(pt.totalNodes=pt.resolvedTargetDeltas=pt.recalculatedProjection=0),this.nodes.forEach(kt),this.nodes.forEach(Nt),this.nodes.forEach(Rt),this.nodes.forEach(Tt),mt&&window.MotionDebug.record(pt)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=t?t.root||t:this,this.path=t?[...t.path,t]:[],this.parent=t,this.depth=t?t.depth+1:0;for(let n=0;n<this.path.length;n++)this.path[n].shouldResetTransform=!0;this.root===this&&(this.nodes=new je)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Me.v),this.eventHandlers.get(e).add(t)}notifyListeners(e){const t=this.eventHandlers.get(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t&&t.notify(...r)}hasListeners(e){return this.eventHandlers.has(e)}mount(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.root.hasTreeAnimated;if(this.instance)return;this.isSVG=(0,Re.x)(e),this.instance=e;const{layoutId:r,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||r)&&(this.isLayoutDirty=!0),t){let n;const r=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Le(r,250),ve.hasAnimatedSinceResize&&(ve.hasAnimatedSinceResize=!1,this.nodes.forEach(Pt))}))}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&s&&(r||i)&&this.addEventListener("didUpdate",(e=>{let{delta:t,hasLayoutChanged:n,hasRelativeLayoutChanged:r,layout:i}=e;if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||Ft,{onLayoutAnimationStart:a,onLayoutAnimationComplete:l}=s.getProps(),c=!this.targetLayout||!ct(this.targetLayout,i),u=!n&&r;if(this.options.layoutRoot||this.resumeFrom||u||n&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...(0,k.rU)(o,"layout"),onPlay:a,onComplete:l};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else n||Pt(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,(0,N.WG)(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.forEac
2h(Dt),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&wt(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const e=this.path[i];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Ct);this.isUpdating||this.nodes.forEach(At),this.isUpdating=!1,this.nodes.forEach(It),this.nodes.forEach(St),this.nodes.forEach(Et),this.clearAllSnapshots();const e=Ne.k.now();N.uv.delta=(0,K.q)(0,1e3/60,e-N.uv.timestamp),N.uv.timestamp=e,N.uv.isProcessing=!0,N.PP.update.process(N.uv),N.PP.preRender.process(N.uv),N.PP.render.process(N.uv),N.uv.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ke.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(_t),this.sharedNodes.forEach(Ot)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,N.Gt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){N.Gt.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||B(this.snapshot.measuredBox.x)||B(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),(!this.options.alwaysMeasureLayout||!this.isLead())&&!this.isLayoutDirty)return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=(0,ee.ge)(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"measure",t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=i(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!s)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!ot(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||(0,ft.HD)(this.latestValues)||i)&&(s(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),zt((r=n).x),zt(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return(0,ee.ge)();const n=t.measureViewportBox();if(!((null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some($t))){const{scroll:e}=this.root;e&&((0,Ze.Ql)(n.x,e.offset.x),(0,Ze.Ql)(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n=(0,ee.ge)();if(Xe(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:i,options:s}=t;t!==this.root&&i&&s.layoutScroll&&(i.wasRoot&&Xe(n,e),(0,Ze.Ql)(n.x,i.offset.x),(0,Ze.Ql)(n.y,i.offset.y))}return n}applyTransform(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=(0,ee.ge)();Xe(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&(0,Ze.Ww)(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),(0,ft.HD)(e.latestValues)&&(0,Ze.Ww)(n,e.latestValues)}return(0,ft.HD)(this.latestValues)&&(0,Ze.Ww)(n,this.latestValues),n}removeTransform(e){const t=(0,ee.ge)();Xe(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!(0,ft.HD)(e.latestValues))continue;(0,ft.vk)(e.latestValues)&&e.updateSnapshot();const r=(0,ee.ge)();
2Xe(r,e.measurePageBox()),it(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return(0,ft.HD)(this.latestValues)&&it(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}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!==N.uv.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:s}=this.options;if(this.layout&&(i||s)){if(this.resolvedRelativeTargetAt=N.uv.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=(0,ee.ge)(),this.relativeTargetOrigin=(0,ee.ge)(),G(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),Xe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var o,a,l;if(this.target||(this.target=(0,ee.ge)(),this.targetWithTransforms=(0,ee.ge)()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,a=this.relativeTarget,l=this.relativeParent.target,H(o.x,a.x,l.x),H(o.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Xe(this.target,this.layout.layoutBox),(0,Ze.o4)(this.target,this.targetDelta)):Xe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=(0,ee.ge)(),this.relativeTargetOrigin=(0,ee.ge)(),G(this.relativeTargetOrigin,this.target,e.target),Xe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}mt&&pt.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!(0,ft.vk)(this.parent.latestValues)&&!(0,ft.vF)(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===N.uv.timestamp&&(r=!1),r)return;const{layout:i,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!s)return;Xe(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,a=this.treeScale.y;(0,Ze.OU)(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=(0,ee.ge)());const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Je(this.prevProjectionDelta.x,this.projectionDelta.x),Je(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),q(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===o&&this.treeScale.y===a&&ht(this.projectionDelta.x,this.prevProjectionDelta.x)&&ht(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),mt&&pt.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=(0,ee.xU)(),this.projectionDelta=(0,ee.xU)(),this.projectionDeltaWithTransform=(0,ee.xU)()}setAnimationOrigin(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},s=(0,ee.xU)();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const o=(0,ee.ge)(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Mt));let h;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,d,f,p,m,g;jt(s.x,e.x,n),jt(s.y,e.y,n),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(G(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),f=this.relativeTarget,p=this.relativeTargetOrigin,m=o,g=n,Lt(f.x,p.x,m.x,g),Lt(f.y,p.y,m.y,g),h&&(l=this.relativeTarget,d=h,at(l.x,d.x)&&at(l.y,d.y))&&(this.isProjectionDirty=!1),h||(h=(0,ee.ge)()),Xe(h,this.relativeTarget)),a&&(this.animationValues=i,function(e,t,n,r,i,s){i?(e.opacity=(0,z.k)(0,void 0!==n.opacity?n.opacity:1,Ge(r)),e.o
2pacityExit=(0,z.k)(void 0!==t.opacity?t.opacity:1,0,Ke(r))):s&&(e.opacity=(0,z.k)(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<$e;o++){const i=`border${Be[o]}Radius`;let s=We(t,i),a=We(n,i);void 0===s&&void 0===a||(s||(s=0),a||(a=0),0===s||0===a||He(s)===He(a)?(e[i]=Math.max((0,z.k)(qe(s),qe(a),r),0),(ie.KN.test(a)||ie.KN.test(s))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=(0,z.k)(t.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&((0,N.WG)(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=N.Gt.update((()=>{ve.hasAnimatedSinceResize=!0,this.currentAnimation=(0,Ie.z)(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.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 e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Bt(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||(0,ee.ge)();const t=B(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=B(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Xe(t,n),(0,Ze.Ww)(t,i),q(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new dt);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote(){let{needsReset:e,transition:t,preserveFollowOpacity:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&bt("z",e,r,this.animationValues);for(let i=0;i<gt.length;i++)bt(`rotate${gt[i]}`,e,r,this.animationValues),bt(`skew${gt[i]}`,e,r,this.animationValues);e.render();for(const i in r)e.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return vt;const r={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Ve(null===e||void 0===e?void 0:e.pointerEvents)||"",r.transform=i?i(this.latestValues,""):"none",r;const s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Ve(null===e||void 0===e?void 0:e.pointerEvents)||""),this.hasProjected&&!(0,ft.HD)(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1),t}const o=s.animationValues||s.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";
2const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(null===n||void 0===n?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:s,skewX:o,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),s&&(r+=`rotateY(${s}deg) `),o&&(r+=`skewX(${o}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,o),i&&(r.transform=i(o,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,s.animationValues?r.opacity=s===this?null!==(n=null!==(t=o.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:r.opacity=s===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const c in Se.H){if(void 0===o[c])continue;const{correct:e,applyTo:t,isCSSVariable:n}=Se.H[c],i="none"===r.transform?o[c]:e(o[c],s);if(t){const e=t.length;for(let n=0;n<e;n++)r[t[n]]=i}else n?this.options.visualElement.renderState.vars[c]=i:r[c]=i}return this.options.layoutId&&(r.pointerEvents=s===this?Ve(null===e||void 0===e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Ct),this.root.sharedNodes.clear()}}}function St(e){e.updateLayout()}function Et(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;"size"===i?te((e=>{const r=s?n.measuredBox[e]:n.layoutBox[e],i=B(r);r.min=t[e].min,r.max=r.min+i})):Bt(i,n.layoutBox,t)&&te((r=>{const i=s?n.measuredBox[r]:n.layoutBox[r],o=B(t[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)}));const o=(0,ee.xU)();q(o,t,n.layoutBox);const a=(0,ee.xU)();s?q(a,e.applyTransform(r,!0),n.measuredBox):q(a,t,n.layoutBox);const l=!ot(o);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:s}=r;if(i&&s){const o=(0,ee.ge)();G(o,n.layoutBox,i.layoutBox);const a=(0,ee.ge)();G(a,t,s.layoutBox),ct(o,a)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function kt(e){mt&&pt.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Tt(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function _t(e){e.clearSnapshot()}function Ct(e){e.clearMeasurements()}function At(e){e.isLayoutDirty=!1}function It(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Pt(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Nt(e){e.resolveTargetDelta()}function Rt(e){e.calcProjection()}function Dt(e){e.resetSkewAndRotation()}function Ot(e){e.removeLeadSnapshot()}function jt(e,t,n){e.translate=(0,z.k)(t.translate,0,n),e.scale=(0,z.k)(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Lt(e,t,n,r){e.min=(0,z.k)(t.min,n.min,r),e.max=(0,z.k)(t.max,n.max,r)}function Mt(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Ft={duration:.45,ease:[.4,0,.1,1]},Ut=e=>"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Vt=Ut("applewebkit/")&&!Ut("chrome/")?Math.round:S.l;function zt(e){e.min=Vt(e.min),e.max=Vt(e.max)}function Bt(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=ut(t),i=ut(n),s=.2,!(Math.abs(r-i)<=s));var r,i,s}function $t(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const qt=xt({attachResizeListener:(e,t)=>_(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ht={current:void 0},Wt=xt({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ht.current){const e=new qt({});e.mount(window),e.setOptions({layoutScroll:!0}),Ht.current=e}return Ht.current},resetTransform:(e,t)=>
2{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Gt={pan:{Feature:class extends b{constructor(){super(...arguments),this.removePointerDownListener=S.l}onPointerDown(e){this.session=new R(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:oe(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:he(e),onStart:he(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&N.Gt.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=A(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends b{constructor(e){super(e),this.removeGroupControls=S.l,this.removeListeners=S.l,this.controls=new ce(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||S.l}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Wt,MeasureLayout:Ce}};function Kt(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const i=r["onHover"+n];i&&N.Gt.postRender((()=>i(t,C(t))))}function Qt(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const i=r["onTap"+("End"===n?"":n)];i&&N.Gt.postRender((()=>i(t,C(t))))}const Yt=new WeakMap,Xt=new WeakMap,Jt=e=>{const t=Yt.get(e.target);t&&t(e)},Zt=e=>{e.forEach(Jt)};function en(e,t,n){const r=function(e){let{root:t,...n}=e;const r=t||document;Xt.has(r)||Xt.set(r,{});const i=Xt.get(r),s=JSON.stringify(n);return i[s]||(i[s]=new IntersectionObserver(Zt,{root:t,...n})),i[s]}(t);return Yt.set(e,n),r.observe(e),()=>{Yt.delete(e),r.unobserve(e)}}const tn={some:0,all:1};const nn={inView:{Feature:class extends b{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,s={root:t?t.current:void 0,rootMargin:n,threshold:"number"===typeof r?r:tn[r]};return en(this.node.current,s,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),s=t?n:r;s&&s(e)}))}mount(){this.startObserver()}update(){if("undefined"===typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node,n=["amount","margin","root"].some(function(e){let{viewport:t={}}=e,{viewport:n={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e=>t[e]!==n[e]}(e,t));n&&this.startObserver()}unmount(){}}},tap:{Feature:class extends b{mount(){const{current:e}=this.node;e&&(this.unmount=(0,k.c$)(e,((e,t)=>(Qt(this.node,t,"Start"),(e,t)=>{let{success:n}=t;return Qt(this.node,e,n?"End":"Cancel")})),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends b{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=(0,P.F)(_(this.node.current,"focus",(()=>this.onFocus())),_(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends b{mount(){const{current:e}=this.node;e&&(this.unmount=(0,k.PT)(e,((e,t)=>(Kt(this.node,t,"Start"),e=>Kt(this.node,e,"End")))))}unmount(){}}}},rn={layout:{ProjectionNode:Wt,MeasureLayout:Ce}},sn=(0,fe.createContext)({strict:!1});var on=n(1051);const an=(0,fe.createContext)({});var ln=n(9426);function cn(e){const{initial:t,animate:n}=function(e,t){if((0,ln.e)(e)){const{initial:t,animate:n}=e;return{initial:!1===t||(0,l.w)(t)?t:void 0,animate:(0,l.w)(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,fe.useContext)(an));return(0,fe.useMemo)((()=>({initial:t,animate:n})),[un(t),un(n)])}function un(e){return Array.isArray(e)?e.join(" "):e}var hn=n(4735),dn=n(9601);const fn=Symbol.for("motionComponentSymbol");function pn(e,t,n){return(0,fe.useCallback)((r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"===typeof n?n(r):U(n)&&(n.current=r))}),[t])}var mn=n(9674),gn=n(293),vn=n(971);function yn(e,t,n,r,i){var s,o;const{visualElement:a}=(0,fe.useContext)(an),l=(0,fe.useContext)(sn),c=(0,fe.useContext)(mn.t),u=(0,fe.useContext)(on.Q).reducedMotion,h=(0,fe.useRef)(null);r=r||l.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:u}));const d=h.current,f=(0,fe.useContext)(ge);!d||d.projection||!i||"html"!==d.type&&"svg"!==d.type||function(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bn(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:Boolean(o)||a&&U(a),visualElement:e,animationType:"string"===typeof s?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(h.current,n,i,f);const p=(0,fe.useRef)(!1);(0,fe.useInsertionEffect)((()=>{d&&p.current&&d.update(n,c)}));const m=n[vn.n],g=(0,fe.useRef)(Boolean(m)&&!(null===(s=window.MotionHandoffIsComplete)||void 0===s?void 0:s.call(window,m))&&(null===(o=window.MotionHasOptimisedAnimation)||void 0===o?void 0:o.call(window,m)));return(0,gn.E)((()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),ke.render(d.render),g.current&&d.animationState&&d.animationState.animateChanges())})),(0,fe.useEffect)((()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask((()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,m)})),g.current=!1))})),d}function bn(e){if(e)return!1!==e.options.allowProjection?e.projection:bn(e.parent)}function wn(e){let{preloadedFeatures:t,createVisualElement:n,useRender:r,useVisualState:i,Component:s}=e;var o,a;function l(e,t){let o;const a={...(0,fe.useContext)(on.Q),...e,layoutId:xn(e)},{isStatic:l}=a,c=cn(e),u=i(e,l);if(!l&&hn.B){!function(){(0,fe.useContext)(sn).strict;0}();const e=function(e){const{drag:t,layout:n}=dn.B;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null===t||void 0===t?void 0:t.isEnabled(e))||(null===n||void 0===n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}
2(a);o=e.MeasureLayout,c.visualElement=yn(s,u,a,n,e.ProjectionNode)}return(0,de.jsxs)(an.Provider,{value:c,children:[o&&c.visualElement?(0,de.jsx)(o,{visualElement:c.visualElement,...a}):null,r(s,e,pn(u,c.visualElement,t),u,l,c.visualElement)]})}t&&function(e){for(const t in e)dn.B[t]={...dn.B[t],...e[t]}}(t),l.displayName=`motion.${"string"===typeof s?s:`create(${null!==(a=null!==(o=s.displayName)&&void 0!==o?o:s.name)&&void 0!==a?a:""})`}`;const c=(0,fe.forwardRef)(l);return c[fn]=s,c}function xn(e){let{layoutId:t}=e;const n=(0,fe.useContext)(me.L).id;return n&&void 0!==t?n+"-"+t:t}var Sn=n(2420),En=n(2273);const kn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Tn(e,t,n){for(const r in t)(0,Ue.S)(t[r])||(0,Sn.z)(r,n)||(e[r]=t[r])}function _n(e,t){const n={};return Tn(n,e.style||{},e),Object.assign(n,function(e,t){let{transformTemplate:n}=e;return(0,fe.useMemo)((()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return(0,En.O)(e,t,n),Object.assign({},e.vars,e.style)}),[t])}(e,t)),n}function Cn(e,t){const n={},r=_n(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const An=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function In(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||An.has(e)}let Pn=e=>!In(e);try{(Nn=require("@emotion/is-prop-valid").default)&&(Pn=e=>e.startsWith("on")?!In(e):Nn(e))}catch(er){}var Nn;const Rn=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Dn(e){return"string"===typeof e&&!e.includes("-")&&!!(Rn.indexOf(e)>-1||/[A-Z]/u.test(e))}var On=n(7143);const jn=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});var Ln=n(9420);function Mn(e,t,n,r){const i=(0,fe.useMemo)((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return(0,On.B)(n,t,(0,Ln.n)(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};Tn(t,e.style,e),i.style={...t,...i.style}}return i}function Fn(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(t,n,r,i,s)=>{let{latestValues:o}=i;const a=(Dn(t)?Mn:Cn)(n,o,s,t),l=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"===typeof e.values||(Pn(i)||!0===n&&In(i)||!t&&!In(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(n,"string"===typeof t,e),c=t!==fe.Fragment?{...l,...a,ref:r}:{},{children:u}=n,h=(0,fe.useMemo)((()=>(0,Ue.S)(u)?u.get():u),[u]);return(0,fe.createElement)(t,{...c,children:h})}}var Un=n(8240),Vn=n(4930);const zn=e=>(t,n)=>{const r=(0,fe.useContext)(an),i=(0,fe.useContext)(mn.t),s=()=>function(e,t,n,r){let{scrapeMotionValuesFromProps:i,createRenderState:s,onUpdate:o}=e;const a={latestValues:Bn(t,n,r,i),renderState:s()};return o&&(a.onMount=e=>o({props:t,current:e,...a}),a.onUpdate=e=>o(e)),a}(e,t,r,i);return n?s():(0,Vn.M)(s)};function Bn(e,t,n,r){const s={},o=r(e,{});for(const i in o)s[i]=Ve(o[i]);let{initial:a,animate:l}=e;const c=(0,ln.e)(e),u=(0,ln.O)(e);t&&u&&!c&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===l&&(l=t.animate));let h=!!n&&!1===n.initial;h=h||!1===a;const d=h?l:a;if(d&&"boolean"!==typeof d&&!(0,i.N)(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=(0,Un.a)(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[h?e.length-1:0]}null!==e&&(s[r]=e)}for(const r in e)s[r]=e[r]}}}return s}const $n={useVisualState:zn({scrapeMotionValuesFromProps:n(7457).x,createRenderState:kn})};var qn=n(6124),Hn=n(7442),Wn=n(5370),Gn=n(1248);const Kn=["x","y","width","height","cx","cy","r"],Qn={useVisualState:zn({scrapeMotionValuesFromProps:Gn.x,createRenderState:jn,onUpdate:e=>
2{let{props:t,prevProps:n,current:r,renderState:i,latestValues:s}=e;if(!r)return;let o=!!t.drag;if(!o)for(const l in s)if(qn.f.has(l)){o=!0;break}if(!o)return;let a=!n;if(n)for(let l=0;l<Kn.length;l++){const e=Kn[l];t[e]!==n[e]&&(a=!0)}a&&N.Gt.read((()=>{(0,Hn.H)(r,i),N.Gt.render((()=>{(0,On.B)(i,s,(0,Ln.n)(r.tagName),t.transformTemplate),(0,Wn.d)(r,i)}))}))}})};function Yn(e,t){return function(n){let{forwardMotionProps:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{forwardMotionProps:!1};return wn({...Dn(n)?Qn:$n,preloadedFeatures:e,useRender:Fn(r),createVisualElement:t,Component:n})}}var Xn=n(5862),Jn=n(7262);const Zn=r(Yn({...x,...nn,...Gt,...rn},((e,t)=>Dn(e)?new Jn.l(t):new Xn.M(t,{allowProjection:e!==fe.Fragment}))))},2248:(e,t,n)=>{"use strict";n.d(t,{K:()=>g});var r=n(9611);var i=n(7517),s=n(3945),o=n(4459);const a=new Set(["auto","none","0"]);var l=n(8876),c=n(9565),u=n(3665),h=n(7343);const d=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function f(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;(0,c.V)(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=function(e){const t=d.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${null!==n&&void 0!==n?n:r}`,i]}(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const e=s.trim();return(0,u.i)(e)?parseFloat(e):e}return(0,h.p)(i)?f(i,t,n+1):i}var p=n(4931),m=n(2201);class g extends l.h{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let i=0;i<e.length;i++){let n=e[i];if("string"===typeof n&&(n=n.trim(),(0,h.p)(n))){const r=f(n,t.current);void 0!==r&&(e[i]=r),i===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!i.$.has(n)||2!==e.length)return;const[r,s]=e,o=(0,m.n)(r),a=(0,m.n)(s);if(o!==a)if((0,p.E4)(o)&&(0,p.E4)(a))for(let i=0;i<e.length;i++){const t=e[i];"string"===typeof t&&(e[i]=parseFloat(t))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let s=0;s<e.length;s++)("number"===typeof(i=e[s])?0===i:null===i||"none"===i||"0"===i||(0,r.$)(i))&&n.push(s);var i;n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){const t=e[i];"string"===typeof t&&!a.has(t)&&(0,s.V)(t).values.length&&(r=e[i]),i++}if(r&&n)for(const s of t)e[s]=(0,o.J)(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=p.Hr[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=p.Hr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEac
2h((e=>{let[n,r]=e;t.getValue(n).set(r)})),this.resolveNoneKeyframes()}}},7254:(e,t,n)=>{"use strict";n.d(t,{b:()=>o});var r=n(2708),i=n(2248),s=n(2769);class o extends r.B{constructor(){super(...arguments),this.KeyframeResolver=i.K}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,t){let{vars:n,style:r}=t;delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;(0,s.S)(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}},2093:(e,t,n)=>{"use strict";n.d(t,{I:()=>r});const r=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase()},7343:(e,t,n)=>{"use strict";n.d(t,{j:()=>i,p:()=>o});const r=e=>t=>"string"===typeof t&&t.startsWith(e),i=r("--"),s=r("var(--"),o=e=>!!s(e)&&a.test(e.split("/*")[0].trim()),a=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu},6018:(e,t,n)=>{"use strict";function r(e){return e instanceof SVGElement&&"svg"!==e.tagName}n.d(t,{x:()=>r})},4931:(e,t,n)=>{"use strict";n.d(t,{E4:()=>o,Hr:()=>d,W9:()=>h});var r=n(8189),i=n(2852),s=n(6124);const o=e=>e===r.ai||e===i.px,a=(e,t)=>parseFloat(e.split(", ")[t]),l=(e,t)=>(n,r)=>{let{transform:i}=r;if("none"===i||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/u);if(s)return a(s[1],t);{const t=i.match(/^matrix\((.+)\)$/u);return t?a(t[1],e):0}},c=new Set(["x","y","z"]),u=s.U.filter((e=>!c.has(e)));function h(e){const t=[];return u.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}const d={width:(e,t)=>{let{x:n}=e,{paddingLeft:r="0",paddingRight:i="0"}=t;return n.max-n.min-parseFloat(r)-parseFloat(i)},height:(e,t)=>{let{y:n}=e,{paddingTop:r="0",paddingBottom:i="0"}=t;return n.max-n.min-parseFloat(r)-parseFloat(i)},top:(e,t)=>{let{top:n}=t;return parseFloat(n)},left:(e,t)=>{let{left:n}=t;return parseFloat(n)},bottom:(e,t)=>{let{y:n}=e,{top:r}=t;return parseFloat(r)+(n.max-n.min)},right:(e,t)=>{let{x:n}=e,{left:r}=t;return parseFloat(r)+(n.max-n.min)},x:l(4,13),y:l(5,14)};d.translateX=d.x,d.translateY=d.y},4459:(e,t,n)=>{"use strict";n.d(t,{J:()=>o});var r=n(3945),i=n(7639),s=n(5030);function o(e,t){let n=(0,s.D)(e);return n!==i.p&&(n=r.f),n.getAnimatableNone?n.getAnimatableNone(t):void 0}},5030:(e,t,n)=>{"use strict";n.d(t,{D:()=>o});var r=n(8066),i=n(7639);const s={...n(7644).W,color:r.y,backgroundColor:r.y,outlineColor:r.y,fill:r.y,stroke:r.y,borderColor:r.y,borderTopColor:r.y,borderRightColor:r.y,borderBottomColor:r.y,borderLeftColor:r.y,filter:i.p,WebkitFilter:i.p},o=e=>s[e]},2201:(e,t,n)=>{"use strict";n.d(t,{T:()=>o,n:()=>a});var r=n(8189),i=n(2852),s=n(9796);const o=[r.ai,i.px,i.KN,i.uj,i.vw,i.vh,{test:e=>"auto"===e,parse:e=>e}],a=e=>o.find((0,s.w)(e))},7644:(e,t,n)=>{"use strict";n.d(t,{W:()=>l});var r=n(8189),i=n(2852);const s={borderWidth:i.px,borderTopWidth:i.px,borderRightWidth:i.px,borderBottomWidth:i.px,borderLeftWidth:i.px,borderRadius:i.px,radius:i.px,borderTopLeftRadius:i.px,borderTopRightRadius:i.px,borderBottomRightRadius:i.px,borderBottomLeftRadius:i.px,width:i.px,maxWidth:i.px,height:i.px,maxHeight:i.px,top:i.px,right:i.px,bottom:i.px,left:i.px,padding:i.px,paddingTop:i.px,paddingRight:i.px,paddingBottom:i.px,paddingLeft:i.px,margin:i.px,marginTop:i.px,marginRight:i.px,marginBottom:i.px,marginLeft:i.px,backgroundPositionX:i.px,backgroundPositionY:i.px},o={rotate:i.uj,rotateX:i.uj,rotateY:i.uj,rotateZ:i.uj,scale:r.hs,scaleX:r.hs,scaleY:r.hs,scaleZ:r.hs,skew:i.uj,skewX:i.uj,skewY:i.uj,distance:i.px,translateX:i.px,translateY:i.px,translateZ:i.px,x:i.px,y:i.px,z:i.px,perspective:i.px,transformPerspective:i.px,opacity:r.X4,originX:i.gQ,originY:i.gQ,originZ:i.px},a={...r.ai,transform:Math.round},l={...s,...o,zIndex:a,size:i.px,fillOpacity:r.X4,strokeOpacity:r.X4,numOctaves:a}},9796:(e,t,n)=>{"use strict";n.d(t,{w:()=>r});const r=e=>t=>t.test(e)},5862:(e,t,n)=>{"use strict";n.d(t,{M:()=>h});var r=n(6358),i=n(7254),s=n(7343),o=n(5030),a=n(2273),l=n(6124),c=n(2783),u=n(7457);class h extends i.b{constructor(){super(...arguments),this.type="html",this.renderInstance=c.e}readValueFromInstance(e,t){if(l.f.has(t)){const e=(0,o.D)(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),i=((0,s.j)(t)?r.getPropertyValue(t):r[t])||0;return"string"===typeof i?i.trim():i}var n}measureInstanceViewportBox(e,t){let{transformPagePoint:n}=t;return(0,r.m)(e,n)}build(e,t,n){(0,a.O)(e,t,n.transformTemplate)}
2scrapeMotionValuesFromProps(e,t,n){return(0,u.x)(e,t,n)}}},2273:(e,t,n)=>{"use strict";n.d(t,{O:()=>c});var r=n(7343);const i=(e,t)=>t&&"number"===typeof e?t.transform(e):e;var s=n(7644),o=n(6124);const a={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},l=o.U.length;function c(e,t,n){const{style:c,vars:u,transformOrigin:h}=e;let d=!1,f=!1;for(const a in t){const e=t[a];if(o.f.has(a))d=!0;else if((0,r.j)(a))u[a]=e;else{const t=i(e,s.W[a]);a.startsWith("origin")?(f=!0,h[a]=t):c[a]=t}}if(t.transform||(d||n?c.transform=function(e,t,n){let r="",c=!0;for(let u=0;u<l;u++){const l=o.U[u],h=e[l];if(void 0===h)continue;let d=!0;if(d="number"===typeof h?h===(l.startsWith("scale")?1:0):0===parseFloat(h),!d||n){const e=i(h,s.W[l]);d||(c=!1,r+=`${a[l]||l}(${e}) `),n&&(t[l]=e)}}return r=r.trim(),n?r=n(t,c?"":r):c&&(r="none"),r}(t,e.transform,n):c.transform&&(c.transform="none")),f){const{originX:e="50%",originY:t="50%",originZ:n=0}=h;c.transformOrigin=`${e} ${t} ${n}`}}},7517:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(6124);const i=new Set(["width","height","top","left","right","bottom",...r.U])},6124:(e,t,n)=>{"use strict";n.d(t,{U:()=>r,f:()=>i});const r=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],i=new Set(r)},2783:(e,t,n)=>{"use strict";function r(e,t,n,r){let{style:i,vars:s}=t;Object.assign(e.style,i,r&&r.getProjectionStyles(n));for(const o in s)e.style.setProperty(o,s[o])}n.d(t,{e:()=>r})},7457:(e,t,n)=>{"use strict";n.d(t,{x:()=>s});var r=n(2420),i=n(2769);function s(e,t,n){var s;const{style:o}=e,a={};for(const l in o)((0,i.S)(o[l])||t.style&&(0,i.S)(t.style[l])||(0,r.z)(l,e)||void 0!==(null===(s=null===n||void 0===n?void 0:n.getValue(l))||void 0===s?void 0:s.liveStyle))&&(a[l]=o[l]);return a}},9952:(e,t,n)=>{"use strict";n.d(t,{C:()=>r});const r=new WeakMap},7262:(e,t,n)=>{"use strict";n.d(t,{l:()=>m});var r=n(8721),i=n(8093),s=n(7254),o=n(2093),a=n(5030),l=n(6124),c=n(7143),u=n(8130),h=n(9420),d=n(7442),f=n(5370),p=n(1248);class m extends s.b{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=i.ge,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&(0,d.H)(this.current,this.renderState)}}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(l.f.has(t)){const e=(0,a.D)(t);return e&&e.default||0}return t=u.e.has(t)?t:(0,o.I)(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return(0,p.x)(e,t,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&r.Gt.postRender(this.updateDimensions)}
2build(e,t,n){(0,c.B)(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){(0,f.d)(e,t,n,r)}mount(e){this.isSVGTag=(0,h.n)(e.tagName),super.mount(e)}}},7143:(e,t,n)=>{"use strict";n.d(t,{B:()=>l});var r=n(2273),i=n(2852);const s={offset:"stroke-dashoffset",array:"stroke-dasharray"},o={offset:"strokeDashoffset",array:"strokeDasharray"};function a(e,t,n){return"string"===typeof e?e:i.px.transform(t+n*e)}function l(e,t,n,l){let{attrX:c,attrY:u,attrScale:h,originX:d,originY:f,pathLength:p,pathSpacing:m=1,pathOffset:g=0,...v}=t;if((0,r.O)(e,v,l),n)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:y,style:b,dimensions:w}=e;y.transform&&(w&&(b.transform=y.transform),delete y.transform),w&&(void 0!==d||void 0!==f||b.transform)&&(b.transformOrigin=function(e,t,n){return`${a(t,e.x,e.width)} ${a(n,e.y,e.height)}`}(w,void 0!==d?d:.5,void 0!==f?f:.5)),void 0!==c&&(y.x=c),void 0!==u&&(y.y=u),void 0!==h&&(y.scale=h),void 0!==p&&function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];e.pathLength=1;const l=a?s:o;e[l.offset]=i.px.transform(-r);const c=i.px.transform(t),u=i.px.transform(n);e[l.array]=`${c} ${u}`}(y,p,m,g,!1)}},8130:(e,t,n)=>{"use strict";n.d(t,{e:()=>r});const r=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"])},9420:(e,t,n)=>{"use strict";n.d(t,{n:()=>r});const r=e=>"string"===typeof e&&"svg"===e.toLowerCase()},7442:(e,t,n)=>{"use strict";function r(e,t){try{t.dimensions="function"===typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(n){t.dimensions={x:0,y:0,width:0,height:0}}}n.d(t,{H:()=>r})},5370:(e,t,n)=>{"use strict";n.d(t,{d:()=>o});var r=n(2093),i=n(2783),s=n(8130);function o(e,t,n,o){(0,i.e)(e,t,void 0,o);for(const i in t.attrs)e.setAttribute(s.e.has(i)?i:(0,r.I)(i),t.attrs[i])}},1248:(e,t,n)=>{"use strict";n.d(t,{x:()=>o});var r=n(2769),i=n(6124),s=n(7457);function o(e,t,n){const o=(0,s.x)(e,t,n);for(const s in e)if((0,r.S)(e[s])||(0,r.S)(t[s])){o[-1!==i.U.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=e[s]}return o}},8876:(e,t,n)=>{"use strict";n.d(t,{h:()=>h,q:()=>u});var r=n(4931),i=n(8721);const s=new Set;let o=!1,a=!1;function l(){if(a){const e=Array.from(s).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=(0,r.W9)(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((t=>{let[n,r]=t;var i;null===(i=e.getValue(n))||void 0===i||i.set(r)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}a=!1,o=!1,s.forEach((e=>e.complete())),s.clear()}function c(){s.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(a=!0)}))}function u(){c(),l()}class h{constructor(e,t,n,r,i){let s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(s.add(this),o||(o=!0,i.Gt.read(c),i.Gt.resolveKeyframes(l))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let i=0;i<e.length;i++)if(null===e[i])if(0===i){const i=null===r||void 0===r?void 0:r.get(),s=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){const r=n.readValue(t,s);void 0!==r&&null!==r&&(e[0]=r)}void 0===e[0]&&(e[0]=s),r&&void 0===i&&r.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),s.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,s.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}},9426:(e,t,n)=>{"use strict";n.d(t,{O:()=>a,e:()=>o});var r=n(9615),i=n(9742),s=n(3223);function o(e){return(0,r.N)(e.animate)||s._.some((t=>(0,i.w)(e[t])))}function a(e){return Boolean(o(e)||e.variants)}},9742:(e,t,n)=>{"use strict";function r(e){return"string"===typeof e||Array.isArray(e)}n.d(t,{w:()=>r})},260:(e,t,n)=>{"use strict";n.d(t,{K:()=>i});var r=n(8240);function i(e,t,n){const i=e.getProps();return(0,r.a)(i,t,void 0!==n?n:i.custom,e)}},8240:(e,t,n)=>{"use strict";function r(e){const t=[{},{}];
2return null===e||void 0===e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function i(e,t,n,i){if("function"===typeof t){const[s,o]=r(i);t=t(void 0!==n?n:e.custom,s,o)}if("string"===typeof t&&(t=e.variants&&e.variants[t]),"function"===typeof t){const[s,o]=r(i);t=t(void 0!==n?n:e.custom,s,o)}return t}n.d(t,{a:()=>i})},3077:(e,t,n)=>{"use strict";n.d(t,{U:()=>a});var r=n(6992),i=n(8160),s=n(260);function o(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,(0,i.OQ)(n))}function a(e,t){const n=(0,s.K)(e,t);let{transitionEnd:i={},transition:a={},...l}=n||{};l={...l,...i};for(const s in l){o(e,s,(0,r.K)(l[s]))}}},3223:(e,t,n)=>{"use strict";n.d(t,{U:()=>r,_:()=>i});const r=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],i=["initial",...r]},5211:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r={skipAnimations:!1,useManualTiming:!1}},5671:(e,t,n)=>{"use strict";function r(e,t){-1===e.indexOf(t)&&e.push(t)}function i(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}n.d(t,{Ai:()=>i,Kq:()=>r})},4773:(e,t,n)=>{"use strict";n.d(t,{q:()=>r});const r=(e,t,n)=>n>t?t:n<e?e:n},7029:(e,t,n)=>{"use strict";n.d(t,{G:()=>c});var r=n(4760),i=n(9565),s=n(2349),o=n(4773),a=n(5591),l=n(604);function c(e,t){let{clamp:n=!0,ease:c,mixer:u}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const h=e.length;if((0,i.V)(h===t.length,"Both input and output ranges must be the same length"),1===h)return()=>t[0];if(2===h&&t[0]===t[1])return()=>t[1];const d=e[0]===e[1];e[0]>e[h-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=function(e,t,n){const i=[],s=n||a.j,o=e.length-1;for(let a=0;a<o;a++){let n=s(e[a],e[a+1]);if(t){const e=Array.isArray(t)?t[a]||r.l:t;n=(0,l.F)(e,n)}i.push(n)}return i}(t,c,u),p=f.length,m=n=>{if(d&&n<e[0])return t[0];let r=0;if(p>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const i=(0,s.q)(e[r],e[r+1],n);return f[r](i)};return n?t=>m((0,o.q)(e[0],e[h-1],t)):m}},4735:(e,t,n)=>{"use strict";n.d(t,{B:()=>r});const r="undefined"!==typeof window},3665:(e,t,n)=>{"use strict";n.d(t,{i:()=>r});const r=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)},9611:(e,t,n)=>{"use strict";n.d(t,{$:()=>r});const r=e=>/^0[^.\s]+$/u.test(e)},5591:(e,t,n)=>{"use strict";n.d(t,{j:()=>k});var r=n(8842),i=n(9565);function s(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var o=n(5449),a=n(8636),l=n(2848);function c(e,t){return n=>n>0?t:e}const u=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},h=[o.u,a.B,l.V];function d(e){const t=(n=e,h.find((e=>e.test(n))));var n;if((0,i.$)(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let r=t.parse(e);return t===l.V&&(r=function(e){let{hue:t,saturation:n,lightness:r,alpha:i}=e;t/=360,n/=100,r/=100;let o=0,a=0,l=0;if(n){const e=r<.5?r*(1+n):r+n-r*n,i=2*r-e;o=s(i,e,t+1/3),a=s(i,e,t),l=s(i,e,t-1/3)}else o=a=l=r;return{red:Math.round(255*o),green:Math.round(255*a),blue:Math.round(255*l),alpha:i}}(r)),r}const f=(e,t)=>{const n=d(e),i=d(t);if(!n||!i)return c(e,t);const s={...n};return e=>(s.red=u(n.red,i.red,e),s.green=u(n.green,i.green,e),s.blue=u(n.blue,i.blue,e),s.alpha=(0,r.k)(n.alpha,i.alpha,e),a.B.transform(s))};var p=n(604),m=n(8066),g=n(3945),v=n(7343);const y=new Set(["none","hidden"]);function b(e,t){return n=>(0,r.k)(e,t,n)}function w(e){return"number"===typeof e?b:"string"===typeof e?(0,v.p)(e)?c:m.y.test(e)?f:E:Array.isArray(e)?x:"object"===typeof e?m.y.test(e)?f:S:c}function x(e,t){const n=[...e],r=n.length,i=e.map(((e,n)=>w(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function S(e,t){const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=w(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const E=(e,t)=>{const n=g.f.createTransformer(t),r=(0,g.V)(e),s=(0,g.V)(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?y.has(e)&&!s.values.length||y.has(t)&&!r.values.length?function(e,t){return y.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):(0,p.F)(x(function(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],a=e.indexes[o][i[o]],l=null!==(n=e.values[a])&&void 0!==n?n:0;r[s]=l,i[o]++}return r}(r,s),s.values),n):((0,i.$)(!0,`Complex values '${e}' and '${t}
2' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),c(e,t))};function k(e,t,n){if("number"===typeof e&&"number"===typeof t&&"number"===typeof n)return(0,r.k)(e,t,n);return w(e)(e,t)}},8842:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});const r=(e,t,n)=>e+(t-e)*n},6862:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5396);function i(e){const t=[0];return(0,r.f)(t,e.length-1),t}},5396:(e,t,n)=>{"use strict";n.d(t,{f:()=>s});var r=n(2349),i=n(8842);function s(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const o=(0,r.q)(0,t,s);e.push((0,i.k)(n,1,o))}}},604:(e,t,n)=>{"use strict";n.d(t,{F:()=>i});const r=(e,t)=>n=>t(e(n)),i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(r)}},2892:(e,t,n)=>{"use strict";n.d(t,{U:()=>s});var r=n(4735),i=n(1795);function s(){if(i.r.current=!0,r.B)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>i.O.current=e.matches;e.addListener(t),t()}else i.O.current=!1}},1795:(e,t,n)=>{"use strict";n.d(t,{O:()=>r,r:()=>i});const r={current:null},i={current:!1}},111:(e,t,n)=>{"use strict";n.d(t,{I:()=>o});var r=n(5043),i=n(2892),s=n(1795);function o(){!s.r.current&&(0,i.U)();const[e]=(0,r.useState)(s.O.current);return e}},6992:(e,t,n)=>{"use strict";n.d(t,{B:()=>i,K:()=>s});var r=n(1485);const i=e=>Boolean(e&&"object"===typeof e&&e.mix&&e.toValue),s=e=>(0,r.p)(e)?e[e.length-1]||0:e},553:(e,t,n)=>{"use strict";n.d(t,{v:()=>i});var r=n(5671);class i{constructor(){this.subscriptions=[]}add(e){return(0,r.Kq)(this.subscriptions,e),()=>(0,r.Ai)(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}},4930:(e,t,n)=>{"use strict";n.d(t,{M:()=>i});var r=n(5043);function i(e){const t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}},13:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var r=n(5043),i=n(7540);const s={some:0,all:1};function o(e){let{root:t,margin:n,amount:o,once:a=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[l,c]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{if(!e.current||a&&l)return;const r={root:t&&t.current||void 0,margin:n,amount:o};return function(e,t){let{root:n,margin:r,amount:o="some"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(0,i.KJ)(e),l=new WeakMap,c=new IntersectionObserver((e=>{e.forEach((e=>{const n=l.get(e.target);if(e.isIntersecting!==Boolean(n))if(e.isIntersecting){const n=t(e.target,e);"function"===typeof n?l.set(e.target,n):c.unobserve(e.target)}else"function"===typeof n&&(n(e),l.delete(e.target))}))}),{root:n,rootMargin:r,threshold:"number"===typeof o?o:s[o]});return a.forEach((e=>c.observe(e))),()=>c.disconnect()}(e.current,(()=>(c(!0),a?void 0:()=>c(!1))),r)}),[t,e,n,a,o]),l}},293:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});var r=n(5043);const i=n(4735).B?r.useLayoutEffect:r.useEffect},7852:(e,t,n)=>{"use strict";function r(e,t){return t?e*(1e3/t):0}n.d(t,{f:()=>r})},8160:(e,t,n)=>{"use strict";n.d(t,{OQ:()=>c,bt:()=>a});var r=n(4175),i=n(553),s=n(7852),o=n(8721);const a={current:void 0};class l{constructor(e){var t=this;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.version="12.1.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=r.k.now();t.updatedAt!==i&&t.setPrevFrameValue(),t.prev=t.current,t.setCurrent(e),t.current!==t.prev&&t.events.change&&t.events.change.notify(t.current),n&&t.events.renderRequest&&t.events.renderRequest.notify(t.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){var t;this.current=e,this.updatedAt=r.k.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.current;this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new i.v);const n=this.events[e].add(t);return"change"===e?()=>{n(),o.Gt.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}
2setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return a.current&&a.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=r.k.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return(0,s.f)(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function c(e,t){return new l(e,t)}},5449:(e,t,n)=>{"use strict";n.d(t,{u:()=>i});var r=n(8636);const i={test:(0,n(5975).$)("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:r.B.transform}},2848:(e,t,n)=>{"use strict";n.d(t,{V:()=>a});var r=n(8189),i=n(2852),s=n(8133),o=n(5975);const a={test:(0,o.$)("hsl","hue"),parse:(0,o.q)("hue","saturation","lightness"),transform:e=>{let{hue:t,saturation:n,lightness:o,alpha:a=1}=e;return"hsla("+Math.round(t)+", "+i.KN.transform((0,s.a)(n))+", "+i.KN.transform((0,s.a)(o))+", "+(0,s.a)(r.X4.transform(a))+")"}}},8066:(e,t,n)=>{"use strict";n.d(t,{y:()=>o});var r=n(5449),i=n(2848),s=n(8636);const o={test:e=>s.B.test(e)||r.u.test(e)||i.V.test(e),parse:e=>s.B.test(e)?s.B.parse(e):i.V.test(e)?i.V.parse(e):r.u.parse(e),transform:e=>"string"===typeof e?e:e.hasOwnProperty("red")?s.B.transform(e):i.V.transform(e)}},8636:(e,t,n)=>{"use strict";n.d(t,{B:()=>l});var r=n(4773),i=n(8189),s=n(8133),o=n(5975);const a={...i.ai,transform:e=>Math.round((e=>(0,r.q)(0,255,e))(e))},l={test:(0,o.$)("rgb","red"),parse:(0,o.q)("red","green","blue"),transform:e=>{let{red:t,green:n,blue:r,alpha:o=1}=e;return"rgba("+a.transform(t)+", "+a.transform(n)+", "+a.transform(r)+", "+(0,s.a)(i.X4.transform(o))+")"}}},5975:(e,t,n)=>{"use strict";n.d(t,{$:()=>s,q:()=>o});var r=n(4568);const i=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,s=(e,t)=>n=>Boolean("string"===typeof n&&i.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),o=(e,t,n)=>i=>{if("string"!==typeof i)return i;const[s,o,a,l]=i.match(r.S);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==l?parseFloat(l):1}}},7639:(e,t,n)=>{"use strict";n.d(t,{p:()=>l});var r=n(3945),i=n(4568);const s=new Set(["brightness","contrast","saturate","opacity"]);function o(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(i.S)||[];if(!r)return e;const o=n.replace(r,"");let a=s.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+o+")"}const a=/\b([a-z-]*)\(.*?\)/gu,l={...r.f,getAnimatableNone:e=>{const t=e.match(a);return t?t.map(o).join(" "):e}}},3945:(e,t,n)=>{"use strict";n.d(t,{V:()=>f,f:()=>v});var r=n(8066);const i=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;var s=n(4568),o=n(8133);const a="number",l="color",c="var",u="var(",h="${}",d=/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 f(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const f=t.replace(d,(e=>(r.y.test(e)?(i.color.push(o),s.push(l),n.push(r.y.parse(e))):e.startsWith(u)?(i.var.push(o),s.push(c),n.push(e)):(i.number.push(o),s.push(a),n.push(parseFloat(e))),++o,h))).split(h);return{values:n,split:f,indexes:i,types:s}}function p(e){return f(e).values}function m(e){const{split:t,types:n}=f(e),i=t.length;return e=>{let s="";for(let c=0;c<i;c++)if(s+=t[c],void 0!==e[c]){const t=n[c];s+=t===a?(0,o.a)(e[c]):t===l?r.y.transform(e[c]):e[c]}return s}}const g=e=>"number"===typeof e?0:e;const v={test:function(e){var t,n;return isNaN(e)&&"string"===typeof e&&((null===(t=e.match(s.S))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(i))||void 0===n?void 0:n.length)||0)>0},parse:p,createTransformer:m,getAnimatableNone:function(e){const t=p(e);return m(e)(t.map(g))}}}
2,8189:(e,t,n)=>{"use strict";n.d(t,{X4:()=>s,ai:()=>i,hs:()=>o});var r=n(4773);const i={test:e=>"number"===typeof e,parse:parseFloat,transform:e=>e},s={...i,transform:e=>(0,r.q)(0,1,e)},o={...i,default:1}},2852:(e,t,n)=>{"use strict";n.d(t,{KN:()=>s,gQ:()=>c,px:()=>o,uj:()=>i,vh:()=>a,vw:()=>l});const r=e=>({test:t=>"string"===typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),i=r("deg"),s=r("%"),o=r("px"),a=r("vh"),l=r("vw"),c={...s,parse:e=>s.parse(e)/100,transform:e=>s.transform(100*e)}},4568:(e,t,n)=>{"use strict";n.d(t,{S:()=>r});const r=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu},8133:(e,t,n)=>{"use strict";n.d(t,{a:()=>r});const r=e=>Math.round(1e5*e)/1e5},5014:(e,t,n)=>{"use strict";n.d(t,{L:()=>K});var r=n(8160),i=n(4930),s=n(5043),o=n(9565),a=n(7540),l=n(4760),c=n(8721);function u(e,t){let n;const r=()=>{const{currentTime:r}=t,i=(null===r?0:r.value)/100;n!==i&&e(i),n=i};return c.Gt.update(r,!0),()=>(0,c.WG)(r)}const h=new WeakMap;let d;function f(e){let{target:t,contentRect:n,borderBoxSize:r}=e;var i;null===(i=h.get(t))||void 0===i||i.forEach((e=>{e({target:t,contentSize:n,get size(){return function(e,t){if(t){const{inlineSize:e,blockSize:n}=t[0];return{width:e,height:n}}return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}(t,r)}})}))}function p(e){e.forEach(f)}function m(e,t){d||"undefined"!==typeof ResizeObserver&&(d=new ResizeObserver(p));const n=(0,a.KJ)(e);return n.forEach((e=>{let n=h.get(e);n||(n=new Set,h.set(e,n)),n.add(t),null===d||void 0===d||d.observe(e)})),()=>{n.forEach((e=>{const n=h.get(e);null===n||void 0===n||n.delete(t),(null===n||void 0===n?void 0:n.size)||null===d||void 0===d||d.unobserve(e)}))}}const g=new Set;let v;function y(e){return g.add(e),v||(v=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};g.forEach((e=>e(t)))},window.addEventListener("resize",v)),()=>{g.delete(e),!g.size&&v&&(v=void 0)}}var b=n(2349),w=n(7852);const x=50,S=()=>({time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}}),E={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function k(e,t,n,r){const i=n[t],{length:s,position:o}=E[t],a=i.current,l=n.time;i.current=e[`scroll${o}`],i.scrollLength=e[`scroll${s}`]-e[`client${s}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=(0,b.q)(0,i.scrollLength,i.current);const c=r-l;i.velocity=c>x?0:(0,w.f)(i.current-a,c)}var T=n(4773),_=n(7029),C=n(6862);const A={start:0,center:.5,end:1};function I(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0;if(e in A&&(e=A[e]),"string"===typeof e){const t=parseFloat(e);e.endsWith("px")?r=t:e.endsWith("%")?e=t/100:e.endsWith("vw")?r=t/100*document.documentElement.clientWidth:e.endsWith("vh")?r=t/100*document.documentElement.clientHeight:e=t}return"number"===typeof e&&(r=t*e),n+r}const P=[0,0];function N(e,t,n,r){let i=Array.isArray(e)?e:P,s=0,o=0;return"number"===typeof e?i=[e,e]:"string"===typeof e&&(i=(e=e.trim()).includes(" ")?e.split(" "):[e,A[e]?e:"0"]),s=I(i[0],n,r),o=I(i[1],t),s-o}const R={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},D={x:0,y:0};function O(e,t,n){const{offset:r=R.All}=n,{target:i=e,axis:s="y"}=n,o="y"===s?"height":"width",a=i!==e?function(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if("svg"===r.tagName){const e=r.getBoundingClientRect();r=r.parentElement;const t=r.getBoundingClientRect();n.x+=e.left-t.left,n.y+=e.top-t.top}else{if(!(r instanceof SVGGraphicsElement))break;{const{x:e,y:t}=r.getBBox();n.x+=e,n.y+=t;let i=null,s=r.parentNode;for(;!i;)"svg"===s.tagName&&(i=s),s=r.parentNode;r=i}}return n}(i,e):D,l=i===e?{width:e.scrollWidth,height:e.scrollHeight}:function(e){return"getBBox"in e&&"svg"!==e.tagName?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}(i),c={width:e.clientWidth,height:e.clientHeight};t[s].offset.length=0;let u=!t[s].interpolate;const h=r.length;for(let d=0;d<h;
2d++){const e=N(r[d],c[o],l[o],a[s]);u||e===t[s].interpolatorOffsets[d]||(u=!0),t[s].offset[d]=e}u&&(t[s].interpolate=(0,_.G)(t[s].offset,(0,C.Z)(r),{clamp:!1}),t[s].interpolatorOffsets=[...t[s].offset]),t[s].progress=(0,T.q)(0,1,t[s].interpolate(t[s].current))}function j(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return{measure:()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0;if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight}(e,r.target,n),update:t=>{!function(e,t,n){k(e,"x",t,n),k(e,"y",t,n),t.time=n}(e,n,t),(r.offset||r.target)&&O(e,n,r)},notify:()=>t(n)}}const L=new WeakMap,M=new WeakMap,F=new WeakMap,U=e=>e===document.documentElement?window:e;function V(e){let{container:t=document.documentElement,...n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=F.get(t);r||(r=new Set,F.set(t,r));const i=S(),s=j(t,e,i,n);if(r.add(s),!L.has(t)){const e=()=>{for(const e of r)e.measure()},n=()=>{for(const e of r)e.update(c.uv.timestamp)},i=()=>{for(const e of r)e.notify()},s=()=>{c.Gt.read(e,!1,!0),c.Gt.read(n,!1,!0),c.Gt.update(i,!1,!0)};L.set(t,s);const l=U(t);window.addEventListener("resize",s,{passive:!0}),t!==document.documentElement&&M.set(t,(a=s,"function"===typeof(o=t)?y(o):m(o,a))),l.addEventListener("scroll",s,{passive:!0})}var o,a;const l=L.get(t);return c.Gt.read(l,!1,!0),()=>{var e;(0,c.WG)(l);const n=F.get(t);if(!n)return;if(n.delete(s),n.size)return;const r=L.get(t);L.delete(t),r&&(U(t).removeEventListener("scroll",r),null===(e=M.get(t))||void 0===e||e(),window.removeEventListener("resize",r))}}const z=new Map;function B(){let{source:e,container:t=document.documentElement,axis:n="y"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e&&(t=e),z.has(t)||z.set(t,{});const r=z.get(t);return r[n]||(r[n]=(0,a.Jb)()?new ScrollTimeline({source:t,axis:n}):function(e){let{source:t,container:n,axis:r="y"}=e;t&&(n=t);const i={value:0},s=V((e=>{i.value=100*e[r].progress}),{container:n,axis:r});return{currentTime:i,cancel:s}}({source:t,axis:n})),r[n]}function $(e){return e&&(e.target||e.offset)}function q(e){let{axis:t="y",...n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={axis:t,...n};return"function"===typeof e?function(e,t){return function(e){return 2===e.length}(e)||$(t)?V((n=>{e(n[t.axis].progress,n)}),t):u(e,B(t))}(e,r):function(e,t){if(e.flatten(),$(t))return e.pause(),V((n=>{e.time=e.duration*n[t.axis].progress}),t);{const n=B(t);return e.attachTimeline?e.attachTimeline(n,(e=>(e.pause(),u((t=>{e.time=e.duration*t}),n)))):l.l}}(e,r)}var H=n(293);function W(e,t){(0,o.$)(Boolean(!t||t.current),`You have defined a ${e} options but the provided ref is not yet hydrated, probably because it's defined higher up the tree. Try calling useScroll() in the same component as the ref, or setting its \`layoutEffect: false\` option.`)}const G=()=>({scrollX:(0,r.OQ)(0),scrollY:(0,r.OQ)(0),scrollXProgress:(0,r.OQ)(0),scrollYProgress:(0,r.OQ)(0)});function K(){let{container:e,target:t,layoutEffect:n=!0,...r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=(0,i.M)(G);return(n?H.E:s.useEffect)((()=>(W("target",t),W("container",e),q(((e,t)=>{let{x:n,y:r}=t;o.scrollX.set(n.current),o.scrollXProgress.set(n.progress),o.scrollY.set(r.current),o.scrollYProgress.set(r.progress)}),{...r,container:(null===e||void 0===e?void 0:e.current)||void 0,target:(null===t||void 0===t?void 0:t.current)||void 0}))),[e,t,JSON.stringify(r.offset)]),o}},5781:(e,t,n)=>{"use strict";n.d(t,{G:()=>d});var r=n(7029);const i=e=>(e=>e&&"object"===typeof e&&e.mix)(e)?e.mix:void 0;var s=n(5043),o=n(8160),a=n(1051),l=n(4930);var c=n(293),u=n(8721);function h(e,t){const n=function(e){const t=(0,l.M)((()=>(0,o.OQ)(e))),{isStatic:n}=(0,s.useContext)(a.Q);
2if(n){const[,n]=(0,s.useState)(e);(0,s.useEffect)((()=>t.on("change",n)),[])}return t}(t()),r=()=>n.set(t());return r(),(0,c.E)((()=>{const t=()=>u.Gt.preRender(r,!1,!0),n=e.map((e=>e.on("change",t)));return()=>{n.forEach((e=>e())),(0,u.WG)(r)}})),n}function d(e,t,n,s){if("function"===typeof e)return function(e){o.bt.current=[],e();const t=h(o.bt.current,e);return o.bt.current=void 0,t}(e);const a="function"===typeof t?t:function(){const e=!Array.isArray(arguments.length<=0?void 0:arguments[0]),t=e?0:-1,n=0+t<0||arguments.length<=0+t?void 0:arguments[0+t],s=1+t<0||arguments.length<=1+t?void 0:arguments[1+t],o=2+t<0||arguments.length<=2+t?void 0:arguments[2+t],a=3+t<0||arguments.length<=3+t?void 0:arguments[3+t],l=(0,r.G)(s,o,{mixer:i(o[0]),...a});return e?l(n):l}(t,n,s);return Array.isArray(e)?f(e,a):f([e],(e=>{let[t]=e;return a(t)}))}function f(e,t){const n=(0,l.M)((()=>[]));return h(e,(()=>{n.length=0;const r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)}))}},6268:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});var r=n(2769);function i(e,t){const n=e.getValue("willChange");if(i=n,Boolean((0,r.S)(i)&&i.add))return n.add(t);var i}},2769:(e,t,n)=>{"use strict";n.d(t,{S:()=>r});const r=e=>Boolean(e&&e.getVelocity)},7540:(e,t,n)=>{"use strict";n.d(t,{P6:()=>o,vG:()=>f,tu:()=>c,XG:()=>h,KZ:()=>b,rU:()=>a,PT:()=>I,DW:()=>p,WH:()=>d,Mc:()=>N,yL:()=>w,TU:()=>E,YE:()=>l,c$:()=>F,KJ:()=>_,Wp:()=>U,nL:()=>v,Jb:()=>i});var r=n(9930);const i=(0,r.p)((()=>void 0!==window.ScrollTimeline));class s{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map((e=>"finished"in e?e.finished:e)))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map((n=>i()&&n.attachTimeline?n.attachTimeline(e):"function"===typeof t?t(n):void 0));return()=>{n.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class o extends s{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function a(e,t){return e?e[t]||e.default||e:void 0}const l=2e4;function c(e){let t=0;let n=e.next(t);for(;!n.done&&t<l;)t+=50,n=e.next(t);return t>=l?1/0:t}var u=n(3084);function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;const n=(arguments.length>2?arguments[2]:void 0)({...e,keyframes:[0,t]}),r=Math.min(c(n),l);return{type:"keyframes",ease:e=>n.next(r*e).value/t,duration:(0,u.X)(r)}}function d(e){return"function"===typeof e}function f(e,t){e.timeline=t,e.onfinish=null}const p=e=>Array.isArray(e)&&"number"===typeof e[0],m={linearEasing:void 0};function g(e,t){const n=(0,r.p)(e);return()=>{var e;return null!==(e=m[t])&&void 0!==e?e:n()}}const v=g((()=>{try{document.createElement("div").animate({opacity:0}
2,{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),"linearEasing");var y=n(2349);const b=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e((0,y.q)(0,i-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function w(e){return Boolean("function"===typeof e&&v()||!e||"string"===typeof e&&(e in S||v())||p(e)||Array.isArray(e)&&e.every(w))}const x=e=>{let[t,n,r,i]=e;return`cubic-bezier(${t}, ${n}, ${r}, ${i})`},S={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:x([0,.65,.55,1]),circOut:x([.55,0,1,.45]),backIn:x([.31,.01,.66,-.59]),backOut:x([.33,1.53,.69,.99])};function E(e,t){return e?"function"===typeof e&&v()?b(e,t):p(e)?x(e):Array.isArray(e)?e.map((e=>E(e,t)||S.easeOut)):S[e]:void 0}const k={x:!1,y:!1};function T(){return k.x||k.y}function _(e,t,n){var r;if(e instanceof Element)return[e];if("string"===typeof e){let i=document;t&&(i=t.current);const s=null!==(r=null===n||void 0===n?void 0:n[e])&&void 0!==r?r:i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function C(e,t){const n=_(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function A(e){return!("touch"===e.pointerType||T())}function I(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const[r,i,s]=C(e,n),o=e=>{if(!A(e))return;const{target:n}=e,r=t(n,e);if("function"!==typeof r||!n)return;const s=e=>{A(e)&&(r(e),n.removeEventListener("pointerleave",s))};n.addEventListener("pointerleave",s,i)};return r.forEach((e=>{e.addEventListener("pointerenter",o,i)})),s}const P=(e,t)=>!!t&&(e===t||P(e,t.parentElement)),N=e=>"mouse"===e.pointerType?"number"!==typeof e.button||e.button<=0:!1!==e.isPrimary,R=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const D=new WeakSet;function O(e){return t=>{"Enter"===t.key&&e(t)}}function j(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const L=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=O((()=>{if(D.has(n))return;j(n,"down");const e=O((()=>{j(n,"up")}));n.addEventListener("keyup",e,t),n.addEventListener("blur",(()=>j(n,"cancel")),t)}));n.addEventListener("keydown",r,t),n.addEventListener("blur",(()=>n.removeEventListener("keydown",r)),t)};function M(e){return N(e)&&!T()}function F(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const[r,i,s]=C(e,n),o=e=>{const r=e.currentTarget;if(!M(e)||D.has(r))return;D.add(r);const s=t(r,e),o=(e,t)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),M(e)&&D.has(r)&&(D.delete(r),"function"===typeof s&&s(e,{success:t}))},a=e=>{o(e,n.useGlobalTarget||P(r,e.target))},l=e=>{o(e,!1)};window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",l,i)};return r.forEach((e=>{(function(e){return R.has(e.tagName)||-1!==e.tabIndex})(e)||null!==e.getAttribute("tabindex")||(e.tabIndex=0);(n.useGlobalTarget?window:e).addEventListener("pointerdown",o,i),e.addEventListener("focus",(e=>L(e,i)),i)})),s}n(4760);function U(e){return"x"===e||"y"===e?k[e]?null:(k[e]=!0,()=>{k[e]=!1}):k.x||k.y?null:(k.x=k.y=!0,()=>{k.x=k.y=!1})}},9565:(e,t,n)=>{"use strict";n.d(t,{$:()=>i,V:()=>s});var r=n(4760);let i=r.l,s=r.l},9930:(e,t,n)=>{"use strict";function r(e){let t;return()=>(void 0===t&&(t=e()),t)}n.d(t,{p:()=>r})},4760:(e,t,n)=>{"use strict";n.d(t,{l:()=>r});const r=e=>e},2349:(e,t,n)=>{"use strict";n.d(t,{q:()=>r});const r=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r}},3084:(e,t,n)=>{"use strict";n.d(t,{X:()=>i,f:()=>r});const r=e=>1e3*e,i=e=>e/1e3},1675:(e,t,n)=>{"use strict";n.d(t,{BV:()=>be,C5:()=>ge,Kd:()=>et,N_:()=>nt,Zp:()=>ee,g:()=>te,ok:()=>ot,qh:()=>ve,zy:()=>X});var r=n(5043),i=(n(4358),"popstate");function s(){return d((function(e,t){let{pathname:n,search:r,hash:i}=e.location;return c("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:u(t)}),null,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function o(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function a(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function l(e,t){return{usr:e.state,key:e.key,idx:t}}function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;return{pathname:"string"===typeof e?e:e.pathname,search:"",hash:"",..."string"===typeof t?h(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function u(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function h(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function d(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},{window:s=document.defaultView,v5Compat:a=!1}=r,h=s.history,d="POP",f=null,p=m();
2function m(){return(h.state||{idx:null}).idx}function g(){d="POP";let e=m(),t=null==e?null:e-p;p=e,f&&f({action:d,location:y.location,delta:t})}function v(e){let t="null"!==s.location.origin?s.location.origin:s.location.href,n="string"===typeof e?e:u(e);return n=n.replace(/ $/,"%20"),o(t,`No window.location.(origin|href) available to create URL for href: ${n}`),new URL(n,t)}null==p&&(p=0,h.replaceState({...h.state,idx:p},""));let y={get action(){return d},get location(){return e(s,h)},listen(e){if(f)throw new Error("A history only accepts one active listener");return s.addEventListener(i,g),f=e,()=>{s.removeEventListener(i,g),f=null}},createHref:e=>t(s,e),createURL:v,encodeLocation(e){let t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){d="PUSH";let r=c(y.location,e,t);n&&n(r,e),p=m()+1;let i=l(r,p),o=y.createHref(r);try{h.pushState(i,"",o)}catch(u){if(u instanceof DOMException&&"DataCloneError"===u.name)throw u;s.location.assign(o)}a&&f&&f({action:d,location:y.location,delta:1})},replace:function(e,t){d="REPLACE";let r=c(y.location,e,t);n&&n(r,e),p=m();let i=l(r,p),s=y.createHref(r);h.replaceState(i,"",s),a&&f&&f({action:d,location:y.location,delta:0})},go:e=>h.go(e)};return y}function f(e,t){return p(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",!1)}function p(e,t,n,r){let i=A(("string"===typeof t?h(t):t).pathname||"/",n);if(null==i)return null;let s=m(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(s);let o=null;for(let a=0;null==o&&a<s.length;++a){let e=C(i);o=T(s[a],e,r)}return o}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=(e,i,s)=>{let a={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(o(a.relativePath.startsWith(r),`Absolute route path "${a.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),a.relativePath=a.relativePath.slice(r.length));let l=D([r,a.relativePath]),c=n.concat(a);e.children&&e.children.length>0&&(o(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),m(e.children,t,c,l)),(null!=e.path||e.index)&&t.push({path:l,score:k(l,e.index),routesMeta:c})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of g(e.path))i(e,t,n);else i(e,t)})),t}function g(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(0===r.length)return i?[s,""]:[s];let o=g(r.join("/")),a=[];return a.push(...o.map((e=>""===e?s:[s,e].join("/")))),i&&a.push(...o),a.map((t=>e.startsWith("/")&&""===t?"/":t))}var v=/^:[\w-]+$/,y=3,b=2,w=1,x=10,S=-2,E=e=>"*"===e;function k(e,t){let n=e.split("/"),r=n.length;return n.some(E)&&(r+=S),t&&(r+=b),n.filter((e=>!E(e))).reduce(((e,t)=>e+(v.test(t)?y:""===t?w:x)),r)}function T(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let e=r[a],l=a===r.length-1,c="/"===s?t:t.slice(s.length)||"/",u=_({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),h=e.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=_({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;
2Object.assign(i,u.params),o.push({params:i,pathname:D([s,u.pathname]),pathnameBase:O(D([s,u.pathnameBase])),route:h}),"/"!==u.pathnameBase&&(s=D([s,u.pathnameBase]))}return o}function _(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];a("*"===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 r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let s=new RegExp(i,t?void 0:"i");return[s,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=l[n]||"";o=s.slice(0,s.length-e.length).replace(/(.)\/+$/,"$1")}const a=l[n];return e[r]=i&&!a?void 0:(a||"").replace(/%2F/g,"/"),e}),{}),pathname:s,pathnameBase:o,pattern:e}}function C(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return a(!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 (${t}).`),e}}function A(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function I(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function P(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function N(e){let t=P(e);return t.map(((e,n)=>n===t.length-1?e.pathname:e.pathnameBase))}function R(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"string"===typeof e?r=h(e):(r={...e},o(!r.pathname||!r.pathname.includes("?"),I("?","pathname","search",r)),o(!r.pathname||!r.pathname.includes("#"),I("#","pathname","hash",r)),o(!r.search||!r.search.includes("#"),I("#","search","hash",r)));let s,a=""===e||""===r.pathname,l=a?"/":r.pathname;if(null==l)s=n;else{let e=t.length-1;if(!i&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}s=e>=0?t[e]:"/"}let c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",{pathname:n,search:r="",hash:i=""}="string"===typeof e?h(e):e,s=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:s,search:j(r),hash:L(i)}}(r,s),u=l&&"/"!==l&&l.endsWith("/"),d=(a||"."===l)&&n.endsWith("/");return c.pathname.endsWith("/")||!u&&!d||(c.pathname+="/"),c}var D=e=>e.join("/").replace(/\/\/+/g,"/"),O=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),j=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",L=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function M(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}var F=["POST","PUT","PATCH","DELETE"],U=(new Set(F),["GET",...F]);new Set(U),Symbol("ResetLoaderData");var V=r.createContext(null);V.displayName="DataRouter";var z=r.createContext(null);z.displayName="DataRouterState";var B=r.createContext({isTransitioning:!1});B.displayName="ViewTransition";var $=r.createContext(new Map);$.displayName="Fetchers";var q=r.createContext(null);q.displayName="Await";var H=r.createContext(null);H.displayName="Navigation";var W=r.createContext(null);W.displayName="Location";var G=r.createContext({outlet:null,matches:[],isDataRoute:!1});G.displayName="Route";var K=r.createContext(null);K.displayName="RouteError";var Q=!0;function Y(){return null!=r.useContext(W)}function X(){return o(Y(),"useLocation() may be used only in the context of a <Router> component."),r.useContext(W).location}var J="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Z(e){r.useContext(H).static||r.useLayoutEffect(e)}function ee(){let{isDataRoute:e}=r.useContext(G);return e?function(){let{router:e}=ue("useNavigate"),t=de("useNavigate"),n=r.useRef(!1);Z((()=>{n.current=!0}));let i=r.useCallback((async function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(n.current,J),n.current&&("number"===typeof r?e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))}),[e,t]);return i}():function(){o(Y(),"useNavigate() may be used only in the context of a <Router> component.");let e=r.useContext(V),{basename:t,navigator:n}=r.useContext(H),{matches:i}=r.useContext(G),{pathname:s}=X(),l=JSON.stringify(N(i)),c=r.useRef(!1);Z((()=>{c.current=!0}));let u=r.useCallback((function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(a(c.current,J),!c.current)return;if("number"===typeof r)return void n.go(r);let o=R(r,JSON.parse(l),s,"path"===i.relative);null==e&&"/"!==t&&(o.pathname="/"===o.pathname?t:D([t,o.pathname])),(i.replace?n.replace:n.push)(o,i.state,i)}),[t,n,l,s,e]);return u}()}r.createContext(null);function te(){let{matches:e}=r.useContext(G),t=e[e.length-1];return t?t.params:{}}function ne(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{matches:n}=r.useContext(G),{pathname:i}=X(),s=JSON.stringify(N(n));return r.useMemo((()=>R(e,JSON.parse(s),i,"path"===t)),[e,s,i,t])}function re(e,t,n,i){o(Y(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s,static:l}=r.useContext(H),{matches:c}=r.useContext(G),u=c[c.length-1],d=u?u.params:{},p=u?u.pathname:"/",m=u?u.pathnameBase:"/",g=u&&u.route;if(Q){let e=g&&g.path||"";me(p,!g||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${e}">) 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.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let v,y=X();if(t){let e="string"===typeof t?h(t):t;o("/"===m||e.pathname?.startsWith(m),`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 "${m}" but pathname "${e.pathname}" was given in the \`location\` prop.`),v=e}else v=y;let b=v.pathname||"/",w=b;if("/"!==m){let e=m.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(e.length).join("/")}let x=!l&&n&&n.matches&&n.matches.length>0?n.matches:f(e,{pathname:w});Q&&(a(g||null!=x,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),a(null==x||void 0!==x[x.length-1].route.element||void 0!==x[x.length-1].route.Component||void 0!==x[x.length-1].route.lazy,`Matched leaf route at location "${v.pathname}${v.search}${v.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 S=le(x&&x.map((e=>Object.assign({},e,{params:Object.assign({},d,e.params),pathname:D([m,s.encodeLocation?s.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?m:D([m,s.encodeLocation?s.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),c,n,i);return t&&S?r.createElement(W.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},S):S}function ie(){let e=fe(),t=M(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},o={padding:"2px 4px",backgroundColor:i},a=null;return Q&&(console.error("Error handled by React Router default ErrorBoundary:",e),a=r.createElement(r.Fragment,null,r.createElement("p",null,"\ud83d\udcbf Hey developer \ud83d\udc4b"),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:o},"ErrorBoundary")," or"," ",r.createElement("code",{style:o},"errorElement")," prop on your route."))),r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application
2Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:s},n):null,a)}var se=r.createElement(ie,null),oe=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,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?r.createElement(G.Provider,{value:this.props.routeContext},r.createElement(K.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function ae(e){let{routeContext:t,match:n,children:i}=e,s=r.useContext(V);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(G.Provider,{value:t},i)}function le(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let i=e,s=n?.errors;if(null!=s){let e=i.findIndex((e=>e.route.id&&void 0!==s?.[e.route.id]));o(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,e+1))}let a=!1,l=-1;if(n)for(let r=0;r<i.length;r++){let e=i[r];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(l=r),e.route.id){let{loaderData:t,errors:r}=n,s=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!r||void 0===r[e.route.id]);if(e.route.lazy||s){a=!0,i=l>=0?i.slice(0,l+1):[i[0]];break}}}return i.reduceRight(((e,o,c)=>{let u,h=!1,d=null,f=null;n&&(u=s&&o.route.id?s[o.route.id]:void 0,d=o.route.errorElement||se,a&&(l<0&&0===c?(me("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,f=null):l===c&&(h=!0,f=o.route.hydrateFallbackElement||null)));let p=t.concat(i.slice(0,c+1)),m=()=>{let t;return t=u?d:h?f:o.route.Component?r.createElement(o.route.Component,null):o.route.element?o.route.element:e,r.createElement(ae,{match:o,routeC
2ontext:{outlet:e,matches:p,isDataRoute:null!=n},children:t})};return n&&(o.route.ErrorBoundary||o.route.errorElement||0===c)?r.createElement(oe,{location:n.location,revalidation:n.revalidation,component:d,error:u,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()}),null)}function ce(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ue(e){let t=r.useContext(V);return o(t,ce(e)),t}function he(e){let t=r.useContext(z);return o(t,ce(e)),t}function de(e){let t=function(e){let t=r.useContext(G);return o(t,ce(e)),t}(e),n=t.matches[t.matches.length-1];return o(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function fe(){let e=r.useContext(K),t=he("useRouteError"),n=de("useRouteError");return void 0!==e?e:t.errors?.[n]}var pe={};function me(e,t,n){t||pe[e]||(pe[e]=!0,a(!1,n))}r.memo((function(e){let{routes:t,future:n,state:r}=e;return re(t,void 0,r,n)}));function ge(e){let{to:t,replace:n,state:i,relative:s}=e;o(Y(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=r.useContext(H);a(!l,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:c}=r.useContext(G),{pathname:u}=X(),h=ee(),d=R(t,N(c),u,"path"===s),f=JSON.stringify(d);return r.useEffect((()=>{h(JSON.parse(f),{replace:n,state:i,relative:s})}),[h,f,s,n,i]),null}function ve(e){o(!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 ye(e){let{basename:t="/",children:n=null,location:i,navigationType:s="POP",navigator:l,static:c=!1}=e;o(!Y(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=t.replace(/^\/*/,"/"),d=r.useMemo((()=>({basename:u,navigator:l,static:c,future:{}})),[u,l,c]);"string"===typeof i&&(i=h(i));let{pathname:f="/",search:p="",hash:m="",state:g=null,key:v="default"}=i,y=r.useMemo((()=>{let e=A(f,u);return null==e?null:{location:{pathname:e,search:p,hash:m,state:g,key:v},navigationType:s}}),[u,f,p,m,g,v,s]);return a(null!=y,`<Router basename="${u}"> is not able to match the URL "${f}${p}${m}" because it does not start with the basename, so the <Router> won't render anything.`),null==y?null:r.createElement(H.Provider,{value:d},r.createElement(W.Provider,{children:n,value:y}))}function be(e){let{children:t,location:n}=e;return re(we(t),n)}r.Component;function we(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[];return r.Children.forEach(e,((e,i)=>{if(!r.isValidElement(e))return;let s=[...t,i];if(e.type===r.Fragment)return void n.push.apply(n,we(e.props.children,s));o(e.type===ve,`[${"string"===typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),o(!e.props.index||!e.props.children,"An index route cannot have child routes.");let a={id:e.props.id||s.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=we(e.props.children,s)),n.push(a)})),n}var xe="get",Se="application/x-www-form-urlencoded";function Ee(e){return null!=e&&"string"===typeof e.tagName}function ke(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}var Te=null;var _e=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ce(e){return null==e||_e.has(e)?e:(a(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Se}"`),null)}function Ae(e,t){let n,r,i,s,o;if(Ee(a=e)&&"form"===a.tagName.toLowerCase()){let o=e.getAttribute("action");r=o?A(o,t):null,n=e.getAttribute("method")||xe,i=Ce(e.getAttribute("enctype"))||Se,s=new FormData(e)}else if(function(e){return Ee(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Ee(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let o=e.form;if(null==o)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let a=e.getAttribute("formaction")||o.getAttribute("action");if(r=a?A(a,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||xe,i=Ce(e.getAttribute("formenctype"))||Ce(o.getAttribute("enctype"))||Se,s=new FormData(o,e),!function(){if(null===Te)try{new FormData(document.createElement("form"),0),Te=!1}catch(e){Te=!0}return Te}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";s.append(`${e}x`,"0"),s.append(`${e}y`,"0")}
2else t&&s.append(t,r)}}else{if(Ee(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=xe,r=null,i=Se,o=e}var a;return s&&"text/plain"===i&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}function Ie(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}async function Pe(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise((()=>{}))}}function Ne(e){return null!=e&&"string"===typeof e.page}function Re(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"===typeof e.imageSrcSet&&"string"===typeof e.imageSizes:"string"===typeof e.rel&&"string"===typeof e.href)}function De(e,t,n,r,i,s){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,a=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===s?t.filter(((e,t)=>o(e,t)||a(e,t))):"data"===s?t.filter(((t,s)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(o(t,s)||a(t,s))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"===typeof r)return r}return!0})):[]}function Oe(e,t){let{includeHydrateFallback:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r=e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i})).flat(1),[...new Set(r)];var r}function je(e,t){let n=new Set,r=new Set(t);return e.reduce(((e,i)=>{if(t&&!Ne(i)&&"script"===i.as&&i.href&&r.has(i.href))return e;let s=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(i));return n.has(s)||(n.add(s),e.push({key:s,link:i})),e}),[])}function Le(e){return{__html:e}}Symbol("SingleFetchRedirect");function Me(e){let t="string"===typeof e?new URL(e,"undefined"===typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}r.Component;function Fe(e){let{error:t,isOutsideRemixApp:n}=e;console.error(t);let i,s=r.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "\ud83d\udcbf Hey developer \ud83d\udc4b. You can provide a way better UX than this when your app throws errors. Check out https://remix.run/guides/errors for more information."\n );\n '}});if(M(t))return r.createElement(Ue,{title:"Unhandled Thrown Response!"},r.createElement("h1",{style:{fontSize:"24px"}},t.status," ",t.statusText),s);if(t instanceof Error)i=t;else{let e=null==t?"Unknown Error":"object"===typeof t&&"toString"in t?t.toString():JSON.stringify(t);i=new Error(e)}return r.createElement(Ue,{title:"Application Error!",isOutsideRemixApp:n},r.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),r.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},i.stack),s)}function Ue(e){let{title:t,renderScripts:n,isOutsideRemixApp:i,children:s}=e,{routeModules:o}=qe();return o.root?.Layout&&!i?s:r.createElement("html",{lang:"en"},r.createElement("head",null,r.createElement("meta",{charSet:"utf-8"}),r.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),r.createElement("title",null,t)),r.createElement("body",null,r.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},s,n?r.createElement(Xe,null):null)))}function Ve(e){return!0===e}function ze(){let e=r.useContext(V);return Ie(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Be(){let e=r.useContext(z);return Ie(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var $e=r.createContext(void 0);function qe(){let e=r.useContext($e);return Ie(e,"You must render this element inside a <HydratedRouter> element"),e}function He(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function We(e,t,n){if(n&&!Ye)return[e[0]];if(t){let n=e.findIndex((e=>void 0!==t[e.route.id]));return e.slice(0,n+1)}return e}function Ge(e){let{page:t,...n}=e,{router:i}=ze(),s=r.useMemo((()=>f(i.routes,t,i.basename)),[i.routes,t,i.basename]);return s?r.createElement(Qe,{page:t,matches:s,...n}):null}function Ke(e){let{manifest:t,routeModules:n}=qe(),[i,s]=r.useState([]);return r.useEffect((()=>{let r=!1;return async function(e,t,n){return je((await Promise.all(e.map((async e=>{let r=t.routes[e.route.id];if(r){let e=await Pe(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter(Re).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}
2(e,t,n).then((e=>{r||s(e)})),()=>{r=!0}}),[e,t,n]),i}function Qe(e){let{page:t,matches:n,...i}=e,s=X(),{manifest:o,routeModules:a}=qe(),{loaderData:l,matches:c}=Be(),u=r.useMemo((()=>De(t,n,c,o,s,"data")),[t,n,c,o,s]),h=r.useMemo((()=>De(t,n,c,o,s,"assets")),[t,n,c,o,s]),d=r.useMemo((()=>{if(t===s.pathname+s.search+s.hash)return[];let e=new Set,r=!1;if(n.forEach((t=>{let n=o.routes[t.route.id];n&&n.hasLoader&&(!u.some((e=>e.route.id===t.route.id))&&t.route.id in l&&a[t.route.id]?.shouldRevalidate||n.hasClientLoader?r=!0:e.add(t.route.id))})),0===e.size)return[];let i=Me(t);return r&&e.size>0&&i.searchParams.set("_routes",n.filter((t=>e.has(t.route.id))).map((e=>e.route.id)).join(",")),[i.pathname+i.search]}),[l,s,o,u,n,t,a]),f=r.useMemo((()=>Oe(h,o)),[h,o]),p=Ke(h);return r.createElement(r.Fragment,null,d.map((e=>r.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...i}))),f.map((e=>r.createElement("link",{key:e,rel:"modulepreload",href:e,...i}))),p.map((e=>{let{key:t,link:n}=e;return r.createElement("link",{key:t,...n})})))}$e.displayName="FrameworkContext";var Ye=!1;function Xe(e){let{manifest:t,serverHandoffString:n,isSpaMode:i,ssr:s,renderMeta:o}=qe(),{router:a,static:l,staticContext:c}=ze(),{matches:u}=Be(),h=Ve(s);o&&(o.didRenderScripts=!0);let d=We(u,null,i);r.useEffect((()=>{Ye=!0}),[]);let p=r.useMemo((()=>{let i=c?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",s=l?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${h?"":`import ${JSON.stringify(t.url)}`};\n${d.map(((e,n)=>{let r=`route${n}`,i=t.routes[e.route.id];Ie(i,`Route ${e.route.id} not found in manifest`);let{clientActionModule:s,clientLoaderModule:o,hydrateFallbackModule:a,module:l}=i,c=[...s?[{module:s,varName:`${r}_clientAction`}]:[],...o?[{module:o,varName:`${r}_clientLoader`}]:[],...a?[{module:a,varName:`${r}_HydrateFallback`}]:[],{module:l,varName:`${r}_main`}];return 1===c.length?`import * as ${r} from ${JSON.stringify(l)};`:[c.map((e=>`import * as ${e.varName} from "${e.module}";`)).join("\n"),`const ${r} = {${c.map((e=>`...${e.varName}`)).join(",")}};`].join("\n")})).join("\n")}\n ${h?`window.__reactRouterManifest = ${JSON.stringify(function(e,t){let n=new Set(t.state.matches.map((e=>e.route.id))),r=t.state.location.pathname.split("/").filter(Boolean),i=["/"];for(r.pop();r.length>0;)i.push(`/${r.join("/")}`),r.pop();i.forEach((e=>{let r=f(t.routes,e,t.basename);r&&r.forEach((e=>n.add(e.route.id)))}));let s=[...n].reduce(((t,n)=>Object.assign(t,{[n]:e.routes[n]})),{});return{...e,routes:s}}(t,a),null,2)};`:""}\n window.__reactRouterRouteModules = {${d.map(((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`)).join(",")}};\n\nimport(${JSON.stringify(t.entry.module)});`:" ";return r.createElement(r.Fragment,null,r.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:Le(i),type:void 0}),r.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:Le(s),type:"module",async:!0}))}),[]),m=Ye?[]:t.entry.imports.concat(Oe(d,t,{includeHydrateFallback:!0}));return Ye?null:r.createElement(r.Fragment,null,h?null:r.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin}),r.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin}),(g=m,[...new Set(g)]).map((t=>r.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin}))),p);var g}function Je(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach((t=>{"function"===typeof t?t(e):null!=t&&(t.current=e)}))}}var Ze="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;try{Ze&&(window.__reactRouterVersion="7.2.0")}catch(ut){}function et(e){let{basename:t,children:n,window:i}=e,o=r.useRef();null==o.current&&(o.current=s({window:i,v5Compat:!0}));let a=o.current,[l,c]=r.useState({action:a.action,location:a.location}),u=r.useCallback((e=>{r.startTransition((()=>c(e)))}),[c]);return r.useLayoutEffect((()=>a.listen(u)),[a,u]),r.createElement(ye,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a})}var tt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,nt=r.forwardRef((function(e,t){let n,{onClick:i,discover:s="render",prefetch:l="none",relative:c,reloadDocument:h,replace:d,state:f,target:p,to:m,preventScrollReset:g,viewTransition:v,...y}=e,{basename:b}=r.useContext(H),w="string"===typeof m&&tt.test(m),x=!1;if("string"===typeof m&&w&&(n=m,Ze))try{let e=new URL(window.location.href),t=m.startsWith("//")?new URL(e.protocol+m):new URL(m),n=A(t.pathname,b);t.origin===e.origin&&null!=n?m=n+t.search+t.hash:x=!0}catch(ut){a(!1,`<Link to="${m}">
2 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let S=function(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(Y(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=r.useContext(H),{hash:s,pathname:a,search:l}=ne(e,{relative:t}),c=a;return"/"!==n&&(c="/"===a?n:D([n,a])),i.createHref({pathname:c,search:l,hash:s})}(m,{relative:c}),[E,k,T]=function(e,t){let n=r.useContext($e),[i,s]=r.useState(!1),[o,a]=r.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:h,onTouchStart:d}=t,f=r.useRef(null);r.useEffect((()=>{if("render"===e&&a(!0),"viewport"===e){let e=new IntersectionObserver((e=>{e.forEach((e=>{a(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[e]),r.useEffect((()=>{if(i){let e=setTimeout((()=>{a(!0)}),100);return()=>{clearTimeout(e)}}}),[i]);let p=()=>{s(!0)},m=()=>{s(!1),a(!1)};return n?"intent"!==e?[o,f,{}]:[o,f,{onFocus:He(l,p),onBlur:He(c,m),onMouseEnter:He(u,p),onMouseLeave:He(h,m),onTouchStart:He(d,p)}]:[!1,f,{}]}(l,y),_=function(e){let{target:t,replace:n,state:i,preventScrollReset:s,relative:o,viewTransition:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=ee(),c=X(),h=ne(e,{relative:o});return r.useCallback((r=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(r,t)){r.preventDefault();let t=void 0!==n?n:u(c)===u(h);l(e,{replace:t,state:i,preventScrollReset:s,relative:o,viewTransition:a})}}),[c,l,h,n,i,t,e,s,o,a])}(m,{replace:d,state:f,target:p,preventScrollReset:g,relative:c,viewTransition:v});let C=r.createElement("a",{...y,...T,href:n||S,onClick:x||h?i:function(e){i&&i(e),e.defaultPrevented||_(e)},ref:Je(t,k),target:p,"data-discover":w||"render"!==s?void 0:"true"});return E&&!w?r.createElement(r.Fragment,null,C,r.createElement(Ge,{page:S})):C}));nt.displayName="Link",r.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:i=!1,className:s="",end:a=!1,style:l,to:c,viewTransition:u,children:h,...d}=e,f=ne(c,{relative:d.relative}),p=X(),m=r.useContext(z),{navigator:g,basename:v}=r.useContext(H),y=null!=m&&function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.useContext(B);o(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=st("useViewTransitionState"),s=ne(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=A(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=A(n.nextLocation.pathname,i)||n.nextLocation.pathname;return null!=_(s.pathname,l)||null!=_(s.pathname,a)}(f)&&!0===u,b=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,w=p.pathname,x=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(w=w.toLowerCase(),x=x?x.toLowerCase():null,b=b.toLowerCase()),x&&v&&(x=A(x,v)||x);const S="/"!==b&&b.endsWith("/")?b.length-1:b.length;let E,k=w===b||!a&&w.startsWith(b)&&"/"===w.charAt(S),T=null!=x&&(x===b||!a&&x.startsWith(b)&&"/"===x.charAt(b.length)),C={isActive:k,isPending:T,isTransitioning:y},I=k?n:void 0;E="function"===typeof s?s(C):[s,k?"active":null,T?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let P="function"===typeof l?l(C):l;return r.createElement(nt,{...d,"aria-current":I,className:E,ref:t,style:P,to:c,viewTransition:u},"function"===typeof h?h(C):h)})).displayName="NavLink";var rt=r.forwardRef(((e,t)=>{let{discover:n="render",fetcherKey:i,navigate:s,reloadDocument:a,replace:l,state:c,method:h=xe,action:d,onSubmit:f,relative:p,preventScrollReset:m,viewTransition:g,...v}=e,y=ct(),b=function(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{basename:n}=r.useContext(H),i=r.useContext(G);o(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),a={...ne(e||".",{relative:t})},l=X();if(null==e){a.search=l.search;let e=new URLSearchParams(a.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>
2e)).forEach((t=>e.append("index",t)));let n=e.toString();a.search=n?`?${n}`:""}}e&&"."!==e||!s.route.index||(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(a.pathname="/"===a.pathname?n:D([n,a.pathname]));return u(a)}(d,{relative:p}),w="get"===h.toLowerCase()?"get":"post",x="string"===typeof d&&tt.test(d);return r.createElement("form",{ref:t,method:w,action:b,onSubmit:a?f:e=>{if(f&&f(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,n=t?.getAttribute("formmethod")||h;y(t||e.currentTarget,{fetcherKey:i,method:n,navigate:s,replace:l,state:c,relative:p,preventScrollReset:m,viewTransition:g})},...v,"data-discover":x||"render"!==n?void 0:"true"})}));function it(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function st(e){let t=r.useContext(V);return o(t,it(e)),t}function ot(e){a("undefined"!==typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=r.useRef(ke(e)),n=r.useRef(!1),i=X(),s=r.useMemo((()=>function(e,t){let n=ke(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))}
2)),n}(i.search,n.current?null:t.current)),[i.search]),o=ee(),l=r.useCallback(((e,t)=>{const r=ke("function"===typeof e?e(s):e);n.current=!0,o("?"+r,t)}),[o,s]);return[s,l]}rt.displayName="Form";var at=0,lt=()=>`__${String(++at)}__`;function ct(){let{router:e}=st("useSubmit"),{basename:t}=r.useContext(H),n=de("useRouteId");return r.useCallback((async function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{action:s,method:o,encType:a,formData:l,body:c}=Ae(r,t);if(!1===i.navigate){let t=i.fetcherKey||lt();await e.fetch(t,n,i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||o,formEncType:i.encType||a,flushSync:i.flushSync})}else await e.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||o,formEncType:i.encType||a,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})}),[e,t,n])}new TextEncoder}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+"."+{79:"f4412a03",109:"a3b91be6",616:"465cdfa8",691:"98bd56cb",747:"dc5c427b",813:"ce683018",1045:"f9a2f216",1099:"1a882932",1557:"0ae200af",1659:"416cc872",1923:"77351f5c",2288:"92752134",2364:"93332cb3",2660:"0ebcd6ec",2747:"168d04af",2767:"69957695",2834:"bb7fc239",2904:"4da684fd",2978:"b40f514d",3155:"00541afc",3584:"40fe7525",3611:"1317be28",3655:"af07d987",3666:"343d9e06",3786:"e3810b7d",4041:"a4350f67",4602:"d0f84fcc",4647:"13afc24a",4825:"605b4ef4",4886:"98337c77",4953:"28844c4e",5066:"d499dcb1",5596:"9c3dee0f",6023:"194f98d1",6227:"13006f13",6259:"51b5abfd",6411:"6f33d2e3",6448:"52632013",6533:"6aaec809",6847:"cec6171c",6897:"06891e0b",6936:"7d0cfd23",6952:"f818338e",7002:"6c7a2710",7029:"f4fe7285",7053:"bf0abd3e",7196:"95ec283d",7210:"1ec8d343",7319:"2f49c5d7",7430:"68a3ba18",7444:"4ad5e186",7659:"4cab1f71",7744:"f8e66033",7755:"a849d995",7816:"261c767c",7853:"075430c9",7890:"e9295d12",7917:"2fde8582",7959:"08d4d703",8108:"3a42298f",8115:"79978d26",8171:"3dd1a2a5",8838:"f4ad597d",8845:"e00a0e87",8873:"a8a42b70",8976:"6c666f96",9001:"ec07b669",9205:"820e4665",9299:"68cf298d",9332:"785581ca",9408:"54309415",9428:"877746f1",9521:"ea0eafa8",9607:"8af20d9c",9632:"23d9fa61",9734:"ebaa6c59",9739:"c671dfc2",9842:"eeec5e0d"}[e]+".chunk.js",n.miniCssF=e=>"static/css/"+e+"."+{4953:"366e68ab",6227:"366e68ab",9842:"366e68ab"}[e]+".chunk.css",n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="neuralward:";n.l=(r,i,s,o)=>{if(e[r])e[r].push(i);else{var a,l;if(void 0!==s)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var h=c[u];if(h.getAttribute("src")==r||h.getAttribute("data-webpack")==t+s){a=h;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,n.nc&&a.setAttribute("nonce",n.nc),a.setAttribute("data-webpack",t+s),a.src=r),e[r]=[i];var d=(t,n)=>{a.onerror=a.onload=null,clearTimeout(f);var i=e[r];if(delete e[r],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((e=>e(n))),t)return t(n)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),l&&document.head.appendChild(a)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",(()=>{if("undefined"!==typeof document){var e=e=>new Promise(((t,r)=>{var i=n.miniCssF(e),s=n.p+i;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var i=(o=n[r]).getAttribute("data-href")||o.getAttribute("href");if("stylesheet"===o.rel&&(i===e||i===t))return o}var s=document.getElementsByTagName("style");for(r=0;r<s.length;r++){var o;if((i=(o=s[r]).getAttribute("data-href"))===e||i===t)return o}})(i,s))return t();((e,t,r,i,s)=>{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",n.nc&&(o.nonce=n.nc),o.onerror=o.onload=n=>{if(o.onerror=o.onload=null,"load"===n.type)i();else{var r=n&&n.type,a=n&&n.target&&n.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+r+": "+a+")");l.name="ChunkLoadError",l.code="CSS_CHUNK_LOAD_FAILED",l.type=r,l.request=a,o.parentNode&&o.parentNode.removeChild(o),s(l)}},o.href=t,r?r.parentNode.insertBefore(o,r.nextSibling):document.head.appendChild(o)})(e,s,null,t,r)}
2)),t={8792:0};n.f.miniCss=(n,r)=>{t[n]?r.push(t[n]):0!==t[n]&&{4953:1,6227:1,9842:1}[n]&&r.push(t[n]=e(n).then((()=>{t[n]=0}),(e=>{throw delete t[n],e})))}}})(),(()=>{var e={8792:0};n.f.j=(t,r)=>{var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var s=new Promise(((n,r)=>i=e[t]=[n,r]));r.push(i[2]=s);var o=n.p+n.u(t),a=new Error;n.l(o,(r=>{if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var s=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+s+": "+o+")",a.name="ChunkLoadError",a.type=s,a.request=o,i[1](a)}}),"chunk-"+t,t)}};var t=(t,r)=>{var i,s,o=r[0],a=r[1],l=r[2],c=0;if(o.some((t=>0!==e[t]))){for(i in a)n.o(a,i)&&(n.m[i]=a[i]);if(l)l(n)}for(t&&t(r);c<o.length;c++)s=o[c],n.o(e,s)&&e[s]&&e[s][0](),e[s]=0},r=self.webpackChunkneuralward=self.webpackChunkneuralward||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),(()=>{"use strict";var e,t,r=n(5043),i=n(4391),s=n(9367),o=n(1675),a=n(5014),l=n(5781),c=n(7663),u=n(9621),h=n(3546),d=n(9963),f=n(2578),p=n(579);const m="undefined"!==typeof window&&(null===(e=(t=window).matchMedia)||void 0===e?void 0:e.call(t,"(prefers-reduced-motion: reduce)").matches);function g(e){let{slides:t,heroHeight:n,autoPlayInterval:i=7e3,className:s="",onCycleComplete:o,skipIntro:a=!1,introComplete:l=!1}=e;const[u,g]=(0,r.useState)(a?1:0),[v,y]=(0,r.useState)(0),[b,w]=(0,r.useState)(!1),x=(0,r.useRef)(null),S=(0,r.useRef)(u),E=(0,r.useRef)(0),k=(0,r.useRef)(0),T=(0,r.useRef)(!0),_=(0,d.A)(),[C,A]=(0,r.useState)((0,f.C)());(0,r.useEffect)((()=>{(0,f.s)((()=>A(!0)))}),[]);const I=(0,r.useRef)({}),[P,N]=(0,r.useState)(a);(0,r.useEffect)((()=>{if(1===u&&!P){const e=setTimeout((()=>{N(!0)}),1e3);return()=>clearTimeout(e)}}),[u,P]),(0,r.useEffect)((()=>{const e=[];if(0===u){const n=t.find((e=>1===e.id));n&&e.push(n)}else if(e.push(t[u]),C){const n=(u+1)%t.length;e.push(t[n])}e.forEach((e=>{e&&e.preloadImages&&e.preloadImages.forEach((e=>{if(!I.current[e]){const t=new Image;t.src=e,I.current[e]=t}}))}))}),[u,t,C]),(0,r.useEffect)((()=>()=>{I.current={}}),[]),(0,r.useEffect)((()=>{if(x.current&&(clearInterval(x.current),x.current=null),_){if(0!==u||P){if(!C||m)return;x.current=setInterval((()=>{if(!b){let e;e=!P||u!==t.length-1&&0!==u?(u+1)%t.length:1,y(1),g(e)}}),i)}else{if(!l)return;x.current=setTimeout((()=>{y(1),g(1)}),1e3)}return()=>{x.current&&(0!==u||P?clearInterval(x.current):clearTimeout(x.current),x.current=null)}}}),[u,b,i,t,P,_,l,C]),(0,r.useEffect)((()=>{T.current&&(T.current=!1),S.current=u}),[u,t.length,o]);const R=u>=1,D=t.slice(1);return(0,p.jsxs)("div",{className:`relative w-full overflow-hidden ${s}`,style:{height:n?`${n}px`:"100vh",minHeight:"300px"},onTouchStart:e=>{E.current=e.touches[0].clientX,k.current=e.touches[0].clientY},onTouchEnd:e=>{const n=e.changedTouches[0].clientX-E.current,r=e.changedTouches[0].clientY-k.current;if(!(Math.abs(n)<50||Math.abs(r)>Math.abs(n)))if(n<0){let e;e=!P||u!==t.length-1&&0!==u?(u+1)%t.length:1,y(1),g(e)}else{let e;e=P&&u<=1?t.length-1:u-1,y(-1),g(e)}},children:[(0,p.jsx)(h.N,{initial:!1,custom:v,children:(0,p.jsx)(c.P.div,{custom:v,variants:{enter:e=>({x:e>0?"100%":"-100%",opacity:0}
2),center:{x:0,opacity:1},exit:e=>({x:e<0?"100%":"-100%",opacity:0})},initial:"enter",animate:"center",exit:"exit",transition:{x:{duration:.2,ease:[.16,1,.3,1]},opacity:{duration:.15}},className:"absolute inset-0 w-full h-full isolate",style:{willChange:"transform, opacity"},children:t[u].content},u)}),R&&(0,p.jsx)("div",{className:"absolute bottom-2 left-8 hidden md:flex items-center gap-2 z-[30]",onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:D.map(((e,t)=>{const n=t+1;return(0,p.jsx)("div",{className:"py-4 px-1 cursor-pointer flex items-center",onClick:()=>{y(n>u?1:-1),g(n)},children:(0,p.jsx)("button",{"aria-label":`Go to slide ${t+1}`,className:"h-1 transition-all duration-300 rounded-sm pointer-events-none "+(n===u?"w-[38px] bg-white":"w-[12px] bg-white/30 hover:bg-white/50")})},t)}))})]})}function v(){return(0,p.jsx)("div",{className:"w-full h-full",style:{background:"#2d2d37"},children:(0,p.jsx)("iframe",{srcDoc:'\n<!DOCTYPE html>\n<html lang="en">\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <title>NeuralWard Logo Animation</title>\n <style>\n @import url(\'https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\');\n\n :root {\n --secondaryColor: #2d2d37;\n --strokeColor: #ffffff;\n --logoFillColor: #ee2a7b; \n --textColor: #ffffff;\n --logo-size: min(400px, 35vw);\n --logo-small-size: calc(var(--logo-size) * 0.5);\n --font-size: clamp(2.5rem, 6vw, 6rem);\n --gap: clamp(15px, 3vw, 30px);\n --text-reveal-width: clamp(220px, 35vw, 550px);\n }\n\n *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }\n\n html, body {\n height: 100%;\n width: 100%;\n overflow: hidden;\n margin: 0;\n padding: 0;\n }\n\n body {\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--secondaryColor);\n font-family: \'Inter\', Helvetica, Arial, sans-serif;\n width: 100%;\n height: 100%;\n }\n\n .main-container {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n overflow: hidden;\n width: min-content;\n height: 100%;\n }\n\n .content-wrapper {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n gap: var(--gap);\n position: relative;\n /* Final layout from the start; the reveal is done with transform + clip-path\n (compositor-only) instead of width/padding animation, so it produces no\n layout shifts (CLS). Same timing/easing = pixel-identical motion. */\n padding-right: var(--logo-small-size);\n transform: translateX(calc((var(--text-reveal-width) + var(--logo-small-size)) / 2));\n clip-path: inset(0 calc(var(--text-reveal-width) + var(--logo-small-size)) 0 0);\n animation: wrapContent 0.8s ease-out 1.4s forwards;\n }\n\n .logo-container {\n height: var(--logo-size);\n width: var(--logo-size);\n position: relative;\n /* REMOVED: border-radius and overflow:hidden to stop circular clipping */\n background: transparent;\n flex-shrink: 0;\n margin-left: auto;\n transform: translateX(0) scale(1);\n transform-origin: right center;\n animation: resizeOnly 0.8s ease-out 1.4s forwards;\n }\n\n .text-container {\n width: var(--text-reveal-width);\n font-size: var(--font-size);\n font-weight: 700;\n color: var(--textColor);\n white-space: nowrap;\n flex-shrink: 0;\n opacity: 0;\n animation: expandText 0.8s ease-out 1.4s forwards;\n }\n\n svg {\n width: 100%;\n height: 100%;\n }\n\n .stroke-path {\n fill: none;\n stroke: var(--logoFillColor);\n stroke-width: 1.5;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-dasharray: 1500;\n stroke-dashoffset: 1500;\n animation: draw 1.8s ease-in-out forwards;\n }
2\n\n .fill-path {\n fill: var(--logoFillColor);\n stroke: none;\n opacity: 0;\n animation: fadeIn 0.4s ease-out 1.3s forwards;\n }\n\n @keyframes draw {\n to { stroke-dashoffset: 0; }\n }\n\n @keyframes fadeIn {\n to { opacity: 1; }\n }\n\n @keyframes resizeOnly {\n 0% { transform: scale(1); }\n 100% { transform: scale(0.5); }\n }\n\n @keyframes expandText {\n 0% { opacity: 0; }\n 30% { opacity: 0.5; }\n 100% { opacity: 1; }\n }\n\n @keyframes wrapContent {\n to { transform: translateX(0); clip-path: inset(0 0 0 0); }\n }\n\n @media (max-width: 768px) {\n :root {\n --logo-size: min(280px, 60vw);\n }\n\n .content-wrapper {\n flex-direction: column;\n gap: calc(var(--gap) / 4);\n /* reset the desktop transform/clip reveal \u2014 mobile keeps its own animation */\n padding-right: 0;\n transform: none;\n clip-path: none;\n animation: wrapContentMobile 0.8s ease-out 1.4s forwards;\n }\n\n .logo-container {\n margin: 0 auto;\n transform-origin: center;\n animation: resizeOnlyMobile 0.8s ease-out 1.4s forwards;\n }\n\n .text-container {\n text-align: center;\n width: 100%;\n height: 0;\n overflow: hidden;\n animation: slideTextUpMobile 0.8s ease-out 1.4s forwards;\n }\n\n @keyframes resizeOnlyMobile {\n 0% { transform: scale(1); }\n 100% { transform: scale(0.65); }\n }\n\n @keyframes wrapContentMobile {\n 0% { padding-bottom: 0; }\n 100% { padding-bottom: calc(var(--logo-size) * 0.2); }\n }\n\n @keyframes slideTextUpMobile {\n 0% { height: 0; opacity: 0; transform: translateY(20px); }\n 100% { height: auto; opacity: 1; transform: translateY(0); }\n }\n }\n </style>\n</head>\n<body>\n <div class="main-container">\n <div class="content-wrapper">\n <div class="logo-container">\n <svg viewBox="0 0 156.2 186.8" xmlns="http://www.w3.org/2000/svg">\n <path class="stroke-path" d="M105,34.34L87.17.26l39.56,11.54c10.12,3.58,19.86,7.37,29.47,12.05l-.07,72.15c0,7.12-1.51,13.6-3.75,20.17-5.67,16.62-17.74,31.38-31.08,42.16-.51-.17-.77-.54-1.12-1.15l-18.15-31.56-37.79-66.8-8.88-15.51-5.13-8.97s-12.82,4.04-22.23,7l.23,55.41c.03,6.6,2.9,12.91,6.04,18.45,5.16,9.09,12.6,15.57,21.02,21.58l.06-46.34,13.61,23.31,33.98,58.04-24.48,14.99-17.65-10.69-7.52-4.77c-19.14-12.38-39.71-30.35-47.84-52.29C2.46,110.97.21,102.87.19,94.12l-.19-69.9,10.1-4.62c10.35-4.73,20.98-7.92,31.88-11.27L69.12,0l5.79,10.61,15.61,28.1,1.23,2.2,29.75,53.76,7.12,13.29.05-66.22Z" />\n <path class="fill-path" d="M105,34.34L87.17.26l39.56,11.54c10.12,3.58,19.86,7.37,29.47,12.05l-.07,72.15c0,7.12-1.51,13.6-3.75,20.17-5.67,16.62-17.74,31.38-31.08,42.16-.51-.17-.77-.54-1.12-1.15l-18.15-31.56-37.79-66.8-8.88-15.51-5.13-8.97s-12.82,4.04-22.23,7l.23,55.41c.03,6.6,2.9,12.91,6.04,18.45,5.16,9.09,12.6,15.57,21.02,21.58l.06-46.34,13.61,23.31,33.98,58.04-24.48,14.99-17.65-10.69-7.52-4.77c-19.14-12.38-39.71-30.35-47.84-52.29C2.46,110.97.21,102.87.19,94.12l-.19-69.9,10.1-4.62c10.35-4.73,20.98-7.92,31.88-11.27L69.12,0l5.79,10.61,15.61,28.1,1.23,2.2,29.75,53.76,7.12,13.29.05-66.22Z" />\n </svg>\n </div>\n <div class="text-container">neuralward</div>\n </div>\n </div>\n</body>\n</html>\n ',style:{width:"100%",height:"100%",border:"none",overflow:"hidden"},title:"Neuralward Intro Animation"})})}const y=n.p+"static/media/neuralward-logo-sm.5bbbed4644507afc40508cfccee3b808.svg";var b=n(13);const w=e=>{let{children:t,bgColor:n="#000000",textColor:i="#ffffff"}=e;const s=(0,r.useRef)(null),[o,a]=(0,r.useState)(!1),l=(0,b.W)(s,{amount:o?.3:.6,margin:o?"0px 0px -30% 0px":"-150px 0px -150px 0px"});(0,r.useEffect)((()=>{const e=()=>{if(s.current){s.current.style.height="auto";const e=s.current.offsetHeight;s.current.style.height=`${e}px`,a(window.innerWidth<=768)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const{title:u,content:h}=(e=>{let t=null;const n=e=>{if(r.isValidElement(e)){if(!t&&"h2"===e.type)return t=e,null;if(e.props&&e.props.children){const t=r.Children.map(e.props.children,n);return r.cloneElement(e,{...e.props,children:t})}}return e},i=r.Children.map(e,n);return{title:t,content:i}})(t);return(0,p.jsxs)(c.P.section,{ref:s,className:"relative overflow-hidden bg-white text-black py-16 px-4 text-center flex flex-col justify-center",children:[(0,p.jsx)(c.P.div,{className:"absolute top-1/2 left-1/2",style:{width:o?"200vh":"max(200vw, 1000px)",height:o?"200vh":"max(200vw, 1000px)",backgroundColor:n,borderRadius:"50%",x:"-50%",y:"-50%",willChange:"transform"},initial:{scale:0},animate:{scale:l?1:0},transition:{scale:{duration:l?1:.3,ease:l?"easeInOut":"easeOut"}}}),u&&(0,p.jsx)(c.P.div,{className:"relative z-[2]",animate:{color:l?i:"#000000"},transition:{duration:.3,ease:"easeInOut"},children:u}),(0,p.jsx)("div",{className:"relative z-[2] mix-blend-difference text-white",children:h})]})};var x=n(111);const S=e=>{let{text:t,highlightWords:n=[],bgColor:i="#1e1e21",textColor:s="#ffffff",highlightColor:o="#ea3d95"}=e;const a=r.useRef(null),l=(0,x.I)(),u=(0,b.W)(a,{once:!1,amount:.8,margin:"0px 0px -10% 0p
2x"}),h=t.split(" ").map(((e,t)=>({word:e,isHighlighted:n.some((t=>e.replace(/[.,!?]$/,"").toLowerCase()===t.toLowerCase()))}))),d=e=>({hidden:{opacity:.45,y:l?0:20,scale:.95,color:s,transition:{opacity:{duration:.3,ease:"easeIn"},y:{duration:.3,ease:"easeIn"},scale:{duration:.3,ease:"easeIn"},color:{duration:.3,ease:"easeIn"}}},visible:{opacity:1,y:0,scale:1,color:e?o:s,transition:{opacity:{duration:.5,ease:"easeOut"},y:{duration:.5,type:"spring",damping:12,stiffness:100},scale:{duration:.5,type:"spring",damping:12,stiffness:100},color:{duration:.5,ease:"easeOut"}}}});return(0,p.jsx)(c.P.section,{ref:a,style:{backgroundColor:i},className:"py-12",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5},children:(0,p.jsx)(c.P.div,{className:"max-w-3xl mx-auto px-4",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.5},children:(0,p.jsx)(c.P.p,{className:"text-xl md:text-3xl text-center leading-relaxed",initial:"hidden",animate:u?"visible":"hidden",variants:{hidden:{transition:{staggerChildren:.01,staggerDirection:-1}},visible:{transition:{staggerChildren:.12,delayChildren:.1,staggerDirection:1,type:"spring",bounce:.2}}},children:h.map(((e,t)=>{let{word:n,isHighlighted:i}=e;return(0,p.jsxs)(r.Fragment,{children:[(0,p.jsx)(c.P.span,{variants:d(i),whileHover:{scale:i?1.1:1.05,transition:{duration:.2}},children:n}),t<h.length-1&&" "]},t)}
2))})})})};var E=n(8556),k=n(6823);const T=(0,r.createContext)(),_=e=>{let{children:t}=e;const{user:n}=(0,E.Jd)();(0,r.useEffect)((()=>{if(null!==n&&void 0!==n&&n.uid){k.A.startListening(n.uid);const e=setInterval((()=>{k.A.cleanupExpiredNotifications(n.uid)}),36e5);return()=>{clearInterval(e),k.A.stopListening()}}}),[n]);const i={sendNotification:async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"info",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(null===n||void 0===n||!n.uid)return null;try{return await k.A.createNotification(n.uid,{title:e,message:t,type:r,link:i})}catch(s){return console.error("Error sending notification:",s),null}},sendNotificationToUser:async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"info",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;if(!e)return null;try{return await k.A.createNotification(e,{title:t,message:n,type:r,link:i})}catch(s){return console.error("Error sending notification to user:",s),null}},sendSocialNotification:async function(e,t,r,i){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;if(null===n||void 0===n||!n.uid)return null;try{return await k.A.createSocialNotification(n.uid,{userName:e,userAvatar:t,action:r,message:i,link:s})}catch(o){return console.error("Error sending social notification:",o),null}}};return(0,p.jsx)(T.Provider,{value:i,children:t})};var C=n(4652);const A=()=>{const{user:e}=(0,E.Jd)(),[t,n]=(0,r.useState)([]),[i,s]=(0,r.useState)(!1),[o,a]=(0,r.useState)(64);(0,r.useEffect)((()=>{s(!0);const e=document.querySelector("header")||document.querySelector(".header");if(e){const t=e.getBoundingClientRect();a(t.height)}if(window.ResizeObserver){const e=document.querySelector("header")||document.querySelector(".header");if(e){const t=new ResizeObserver((e=>{for(let t of e)a(t.contentRect.height)}));return t.observe(e),()=>t.disconnect()}}}),[]),(0,r.useEffect)((()=>{if(null===e||void 0===e||!e.uid)return;k.A.startListening(e.uid);const t=k.A.subscribe("notification-system",(e=>{n(e)}));return k.A.cleanupExpiredNotifications(e.uid),k.A.cleanupOldNotifications(e.uid,30,30),()=>{t(),k.A.stopListening()}}),[e]);const l=t.filter((e=>"active"===e.status)),u=e=>{if(e&&"object"===typeof e&&e.id){const{id:t,markAsRead:n}=e;k.A.closeNotification(t,{markAsRead:n})}};return i&&e?(0,p.jsx)("div",{className:"fixed right-0 z-40 w-96 mr-[23px] flex flex-col items-end pointer-events-none",style:{top:`${o+8}px`},children:(0,p.jsx)(h.N,{initial:!1,children:l.map(((e,t)=>(0,p.jsx)(c.P.div,{initial:{opacity:0,x:50},animate:{opacity:1,x:0},exit:{opacity:0,x:100,transition:{type:"spring",damping:20,stiffness:300}},transition:{type:"spring",damping:25,stiffness:300,delay:.1*t},className:"mb-3 pointer-events-auto w-full",children:(0,p.jsx)(C.A,{notification:e,onClose:u,onDismiss:e=>{k.A.dismissNotification(e)},onRead:e=>k.A.markAsRead(e)})},e.id)))})}):null};var I=n(358),P=n(1283),N=n(9357);const R=e=>{let{isIntroFinished:t}=e;const[n,i]=(0,r.useState)(!1);(0,r.useEffect)((()=>{if(!localStorage.getItem("nw_cookie_prefs")&&t){const e=setTimeout((()=>{i(!0)}),2e3);return()=>clearTimeout(e)}}),[t]);return(0,p.jsx)(h.N,{children:n&&(0,p.jsx)(c.P.div,{initial:{y:100,opacity:0,scale:.9},animate:{y:0,opacity:1,scale:1},exit:{y:50,opacity:0,scale:.95},transition:{type:"spring",stiffness:260,damping:25,delay:.2},className:"fixed bottom-8 left-8 right-8 md:left-auto md:max-w-md z-[200]",children:(0,p.jsxs)("div",{className:"relative overflow-hidden rounded-3xl bg-[#1e1e21]/80 backdrop-blur-2xl border border-white/10 shadow-[0_20px_50px_rgba(0,0,0,0.5)] p-6 md:p-8",children:[(0,p.jsx)(c.P.div,{animate:{opacity:[.1,.2,.1],scale:[1,1.1,1]},transition:{duration:4,repeat:1/0,ease:"easeInOut"},className:"absolute -top-24 -right-24 w-48 h-48 bg-[#5742bb] rounded-full blur-[60px] pointer-events-none"}),(0,p.jsxs)("div",{className:"relative z-10",children:[(0,p.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,p.jsx)("div",{className:"w-10 h-10 flex-shrink-0",children:(0,p.jsxs)("svg",{viewBox:"0 0 64 64",className:"w-full h-full drop-shadow-lg",fill:"none",children:[(0,p.jsx)("path",{d:"M32 6 C28.8 6 26.5 8.7 26.9 11.8 C27.2 14.5 25.3 17 22.7 17.4 C19.7 17.8 17.5 20.5 18 23.5 C18.4 26.1 16.6 28.6 14 29 C10.9 29.5 8.5 32.2 8.5 35.4 C8.5 45.7 16.8 54 27.1 54 H32 C42.5 54 51 45.5 51 35 C51 33.8 50.9 32.7 50.7 31.6 C47.5 31.2 45 28.5 45 25.2 C45 22 47.4 19.3 50.5 18.8 C49.1 11.5 42.7 6 35 6 H32Z",fill:"#D89B4D"}),(0,p.jsx)("circle",{cx:"22",cy:"24",r:"4.2",fill:"#6B4328"}),(0,p.jsx)("circle",{cx:"34",cy:"20",r:"3.2",fill:"#6B4328"}),(0,p.jsx)("circle",{cx:"37",cy:"33",r:"4",fill:"#6B4328"}),(0,p.jsx)("circle",{cx:"24",cy:"38",r:"3.4",fill:"#6B4328"}),(0,p.jsx)("circle",{cx:"33",cy:"45",r:"2.8",fill:"#6B4328"})]})}),(0,p.jsx)("h3",{className:"text-xl font-bold tracking-tight text-white",children:"Intelligence Optimization"})]}),(0,p.jsx)("p",{className:"text-sm text-white/70 leading-relaxed mb-6",children:"We use cookies to refine our neural architectures and enhance your experience. By continuing, you agree to our data sovereignty protocols."}),(0,p.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,p.jsx)(c.P.button,{whileHover:{scale:1.02,backgroundColor:"#4835a0"},whileTap:{scale:.98},onClick:()=>{localStorage.setItem("nw_cookie_prefs",JSON.stringify({essential:!0,functional:!0,analytics:!0,marketing:!0})),i(!1)},className:"flex-1 px-6 py-3 rounded-xl bg-[#5742bb] text-white font-bold text-sm shadow-lg shadow-[#5742bb]/20 transition-colors",children:"Accept All"}),(0,p.jsx)(o.N_,{to:"/cookie-policy",className:"flex-1 px-6 py-3 rounded-xl bg-white/5 border border-white/10 hover:bg-white/10 text-white font-bold text-sm text-center transition-colors",onClick:()=>i(!1),children:"Manage"})]}),(0,p.jsx)("div",{className:"mt-4 text-center",children:(0,p.jsx)(o.N_,{to:"/privacy",className:"text-[10px] uppercase tracking-widest text-white/30 hover:text-white/60 transition-colors font-bold",children:"Privacy Framework Overview"})})]})]})})})},D=e=>{let{children:t}=e;const n=r.useRef(null),[i,s]=r.useState("down"),[o,l]=r.useState(!1),[u,h]=r.useState(!1),{scrollY:d}=(0,a.L)(),f=r.useRef(0),m=r.useRef(t),g=r.useRef(!0),v=(0,b.W)(n,{once:!1,amount:.3,margin:"0px 0px -10% 0p
2x"});r.useEffect((()=>{const e=setTimeout((()=>{h(!0)}),200);return()=>clearTimeout(e)}),[]),r.useEffect((()=>d.on("change",(e=>{const t=e>f.current?"down":"up";s(t),f.current=e}))),[d]),r.useEffect((()=>{const e=()=>{l(window.innerWidth<768)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),r.useEffect((()=>{g.current?g.current=!1:m.current=t}),[t]);const y=r.Children.count(m.current)||1,w=(y-1)/2,x=e=>y%2===0?e===Math.floor(w)||e===Math.ceil(w):e===w,S=e=>{if(!o){return 45*((e-w)/(w||1))}return(e=>e%2===0?-90:90)(e)},E=e=>o?(e=>e%2===0?-300:300)(e):2*S(e),k=e=>{const t=!o&&x(e),n="up"===i,r=o?.2*(e=>"down"===i?e:y-1-e)(e):t?0:.2+.1*(e=>x(e)?0:Math.abs(e-w))(e);return{hidden:{opacity:0,rotate:S(e),x:E(e),y:t?n?-100:100:0,scale:.8},visible:{opacity:1,rotate:0,x:0,y:0,scale:1,transition:{type:"spring",bounce:.4,duration:1,delay:r,y:{type:"spring",bounce:.3,duration:.8}}}}},T=r.useMemo((()=>r.Children.map(m.current,(e=>{var t,n;return"AnimatedCircularProgress"===(null===e||void 0===e||null===(t=e.type)||void 0===t?void 0:t.name)||"GrowthBarGraph"===(null===e||void 0===e||null===(n=e.type)||void 0===n?void 0:n.name)?r.cloneElement(e,{forceAnimation:v}):e}))),[v]);return(0,p.jsx)(c.P.div,{ref:n,className:`\n w-full \n py-0 md:py-12 \n ${o?"overflow-hidden":""}\n `,variants:{hidden:{},visible:{transition:{staggerChildren:.1,delayChildren:.2}}},initial:"hidden",animate:v&&u?"visible":"hidden",children:(0,p.jsx)("div",{className:`\n ${o?"grid grid-cols-1 auto-rows-auto":"flex flex-row"}\n justify-center \n items-center \n ${o?"gap-6 mb-12 md:mb-0":"gap-8"}\n ${o?"mx-auto":""}\n `,children:r.Children.map(T,((e,t)=>(0,p.jsx)(c.P.div,{variants:k(t),className:`\n ${o?"mx-auto":""}\n ${o?"w-[250px]":"w-full max-w-[300px]"}\n `,style:{opacity:0},children:e},`slider-item-${t}`)))})})},O=r.memo(D),j=e=>{let{children:t}=e;const n=r.Children.toArray(t);return(0,p.jsx)("section",{className:"bg-brandBackground py-16",children:(0,p.jsx)("div",{className:"max-w-7xl mx-auto",children:n.map(((e,t)=>(0,p.jsx)("div",{className:0!==t?"mt-8 md:mt-[40px]":"",children:e},t)))})})};var L=n(7540),M=n(3953),F=n(3084),U=n(9565),V=n(2349);var z=n(5968);function B(e,t){return(0,z.h)(e)?e[((e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e})(0,e.length,t)]:e}var $=n(6862),q=n(5396),H=n(2769);function W(e){return"object"===typeof e&&!Array.isArray(e)}function G(e,t,n,r){return"string"===typeof e&&W(t)?(0,L.KJ)(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function K(e,t,n){return e*(t+1)}function Q(e,t,n,r){var i;return"number"===typeof t?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):"<"===t?n:null!==(i=r.get(t))&&void 0!==i?i:e}var Y=n(5671),X=n(8842);function J(e,t,n,r,i,s){!function(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];i.at>t&&i.at<n&&((0,Y.Ai)(e,i),r--)}}(e,i,s);for(let o=0;o<t.length;o++)e.push({value:t[o],at:(0,X.k)(i,s,r[o]),easing:B(n,o)})}function Z(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function ee(e,t){return e.at===t.at?null===e.value?1:null===t.value?-1:0:e.at-t.at}function te(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function ne(e,t){return t[e]||(t[e]=[]),t[e]}function re(e){return Array.isArray(e)?e:[e]}function ie(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const se=e=>"number"===typeof e,oe=e=>e.every(se);var ae=n(9952),le=n(1453),ce=n(6018),ue=n(7262),he=n(5862),de=n(8093),fe=n(2708);class pe extends fe.B{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,t){if(function(e,t){return e in t}(t,e)){const n=e[t];if("string"===typeof n||"number"===typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return(0,de.ge)()}build(e,t){Object.assign(e.output,t)}renderInstance(e,t){let{output:n}=t;Object.assign(e,n)}sortInstanceNodePosition(){return 0}}function me(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=(0,ce.x)(e)?new ue.l(t):new he.M(t);n.mount(e),ae.C.set(e,n)}function ge(e){const t=new pe({presenceContext:null,props:{}
2,visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),ae.C.set(e,t)}var ve=n(9795);function ye(e,t,n,r){const i=[];if(function(e,t){return(0,H.S)(e)||"number"===typeof e||"string"===typeof e&&!W(t)}(e,t))i.push((0,ve.z)(e,W(t)&&t.default||t,n&&n.default||n));else{const s=G(e,t,r),o=s.length;(0,U.V)(Boolean(o),"No valid elements provided.");for(let e=0;e<o;e++){const r=s[e],a=r instanceof Element?me:ge;ae.C.has(r)||a(r);const l=ae.C.get(r),c={...n};"delay"in c&&"function"===typeof c.delay&&(c.delay=c.delay(e,o)),i.push(...(0,le.$)(l,{...t,transition:c},{}))}}return i}function be(e,t,n){const r=[],i=function(e){let{defaultTransition:t={},...n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;const s=t.duration||.3,o=new Map,a=new Map,l={},c=new Map;let u=0,h=0,d=0;for(let f=0;f<e.length;f++){const n=e[f];if("string"===typeof n){c.set(n,h);continue}if(!Array.isArray(n)){c.set(n.name,Q(h,n.at,u,c));continue}let[o,p,m={}]=n;void 0!==m.at&&(h=Q(h,m.at,u,c));let g=0;const v=function(e,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;const l=re(e),{delay:c=0,times:u=(0,$.Z)(l),type:f="keyframes",repeat:p,repeatType:m,repeatDelay:v=0,...y}=n;let{ease:b=t.ease||"easeOut",duration:w}=n;const x="function"===typeof c?c(o,a):c,S=l.length,E=(0,L.WH)(f)?f:null===i||void 0===i?void 0:i[f];if(S<=2&&E){let e=100;if(2===S&&oe(l)){const t=l[1]-l[0];e=Math.abs(t)}const t={...y};void 0!==w&&(t.duration=(0,F.f)(w));const n=(0,L.XG)(t,e,E);b=n.ease,w=n.duration}null!==w&&void 0!==w||(w=s);const k=h+x;1===u.length&&0===u[0]&&(u[1]=1);const T=u.length-l.length;if(T>0&&(0,q.f)(u,T),1===l.length&&l.unshift(null),p){(0,U.V)(p<20,"Repeat count too high, must be less than 20"),w=K(w,p);const e=[...l],t=[...u];b=Array.isArray(b)?[...b]:[b];const n=[...b];for(let r=0;r<p;r++){l.push(...e);for(let i=0;i<e.length;i++)u.push(t[i]+(r+1)),b.push(0===i?"linear":B(n,i-1))}Z(u,p)}const _=k+w;J(r,l,b,u,k,_),g=Math.max(x+w,g),d=Math.max(_,d)};if((0,H.S)(o))v(p,m,ne("default",te(o,a)));else{const e=G(o,p,r,l),t=e.length;for(let n=0;n<t;n++){const r=te(e[n],a);for(const e in p)v(p[e],ie(m,e),ne(e,r),n,t)}}u=h,h+=g}return a.forEach(((e,r)=>{for(const i in e){const s=e[i];s.sort(ee);const a=[],l=[],c=[];for(let e=0;e<s.length;e++){const{at:t,value:n,easing:r}=s[e];a.push(n),l.push((0,V.q)(0,d,t)),c.push(r||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),c.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});const u=o.get(r);u.keyframes[i]=a,u.transition[i]={...t,duration:d,ease:c,times:l,...n}}})),o}(e,t,n,{spring:M.o});return i.forEach(((e,t)=>{let{keyframes:n,transition:i}=e;r.push(...ye(t,n,i))})),r}const we=function(e,t,n){let r=[];var i;i=e,r=Array.isArray(i)&&i.some(Array.isArray)?be(e,t,xe):ye(e,t,n,xe);const s=new L.P6(r);return xe&&xe.animations.push(s),s};var xe;const Se=e=>{let{progress:t=75,strokeWidth:n=10,duration:i=1.5,label:s="Innovation Metric",circleColor:o="#ea3d95",trackColor:a="#282829",forceAnimation:l=!1}=e;const u=(0,r.useRef)(null),h=(0,b.W)(u,{once:!1,margin:"-10% 0px"}),d=2*Math.PI*45,f="number"===typeof t&&isFinite(t)&&!isNaN(t)?t:75,m=d-f/100*d,[g,v]=(0,r.useState)(0),[y,w]=(0,r.useState)(0),[x,S]=(0,r.useState)(!1),E=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{const e=setTimeout((()=>{S(!0)}),300);return()=>clearTimeout(e)}),[]),(0,r.useEffect)((()=>{if((h||l)&&x){if(E.current)return;E.current=!0,v(0),w((e=>e+1));try{const e=we(0,f,{duration:i,onUpdate(e){v(Math.round(e))},onComplete(){E.current=!1}});return()=>{e.stop(),E.current=!1}}catch(e){console.error("Animation error:",e),v(f),E.current=!1}}else h||l||(E.current=!1)}),[h,l,f,i,x]),x?(0,p.jsx)("div",{ref:u,className:"flex flex-col items-center",children:(0,p.jsxs)(c.P.div,{className:"relative",initial:{scale:.8,opacity:0}
2,animate:{scale:1,opacity:1},transition:{duration:1},children:[(0,p.jsxs)("svg",{className:"w-full h-auto",viewBox:"0 0 100 100",children:[(0,p.jsx)("circle",{cx:50,cy:50,r:45,stroke:a,fill:"transparent",strokeWidth:n}),(0,p.jsx)(c.P.circle,{cx:50,cy:50,r:45,stroke:o,fill:"transparent",strokeWidth:n,strokeDasharray:d,strokeDashoffset:d,transform:"rotate(-90 50 50)",animate:{strokeDashoffset:m},transition:{duration:i,ease:"easeOut"},strokeLinecap:"round"},y)]}),(0,p.jsxs)(c.P.div,{className:"absolute inset-0 flex flex-col items-center justify-center",initial:{opacity:0},animate:{opacity:1},transition:{duration:i},children:[(0,p.jsx)(c.P.span,{className:"font-semibold text-[#ffffff]",style:{fontSize:"clamp(1.5rem, 5vw, 2rem)"},children:s}),(0,p.jsxs)(c.P.span,{className:"font-bold text-[#ffffff]",style:{fontSize:"clamp(2.1rem, 7vw, 4.2rem)",marginTop:"-0.5rem",marginBottom:"-0.5rem"},children:[g,"%"]})]})]})}):(0,p.jsx)("div",{ref:u,className:"flex flex-col items-center",style:{minHeight:"200px"}})},Ee=(0,r.memo)(Se),ke=e=>{let{forceAnimation:t=!1}=e;const n=(0,r.useRef)(null),[i,s]=(0,r.useState)([]),o=(0,r.useRef)(null),[a,l]=(0,r.useState)([]),[u,f]=(0,r.useState)(""),[m,g]=(0,r.useState)(300),v=(0,r.useRef)({}),y=(0,r.useRef)(i);(0,r.useEffect)((()=>{y.current=i}),[i]);const w=(0,b.W)(n,{once:!1,margin:"-10% 0px"}),x=(0,r.useRef)(!1),S=(0,r.useRef)(t);(0,r.useEffect)((()=>{const e=n.current,t=()=>{if(e){const t=e.offsetWidth;g(t)}};t();let r=null;const i=new ResizeObserver((()=>{r||(r=setTimeout((()=>{t(),r=null}),100))}));return e&&i.observe(e),()=>{e&&i.unobserve(e),i.disconnect(),r&&clearTimeout(r)}}),[]),(0,r.useEffect)((()=>{const e=t&&!S.current;S.current=t;w||t?x.current&&!e||(e&&(x.current=!1,s([]),o.current&&clearTimeout(o.current)),x.current=!0,setTimeout((()=>{const e=Array.from({length:5},((e,t)=>({id:`initial-${t}-${Date.now()}`,height:Math.floor(15*Math.random())+25,position:t,isLeaving:!1})));s(e)}),50)):(s([]),o.current&&clearTimeout(o.current),x.current=!1)}),[w,t]);const E=(0,d.A)();(0,r.useEffect)((()=>{if(!w&&!t||!E)return;const e=setInterval((()=>{o.current&&clearTimeout(o.current),s((e=>5!==e.length?e:e.map(((e,t)=>0===t?{...e,isLeaving:!0}:e)))),o.current=setTimeout((()=>{s((e=>{var t;if(5!==e.length)return e;const n=e.filter((e=>!e.isLeaving)).map(((e,t)=>({...e,position:t}))),r=(null===(t=n[n.length-1])||void 0===t?void 0:t.height)||60,i=Math.max(60,r-8),s=Math.min(92,r+8),o=Math.floor(Math.random()*(s-i+1))+i;return n.push({id:`bar-${Date.now()}`,height:o,position:4,isLeaving:!1}),n}))}),300)}),1500);return()=>{clearInterval(e),o.current&&clearTimeout(o.current)}}),[w,t,E]);const k=m<=250,T=k?28:32,_=k?52:64,C=(m-4*_-T)/2,A=(0,r.useRef)({dotPositions:[],pathData:""});return(0,r.useEffect)((()=>{if(!w&&!t||!E)return;let e;const r=()=>{if(!n.current)return void(e=requestAnimationFrame(r));const t=n.current.getBoundingClientRect(),i=[];y.current.forEach((e=>{if(e.height>=50){const n=v.current[e.id];if(n){const e=n.getBoundingClientRect(),r=e.left-t.left+e.width/2,s=e.top-t.top-20;i.push({x:r,y:s})}}})),i.sort(((e,t)=>e.x-t.x));let s="";if(i.length>0){s=`M ${i[0].x} ${i[0].y}`;for(let e=1;e<i.length;e++)s+=` L ${i[e].x} ${i[e].y}`}l(i),f(s),A.current={dotPositions:i,pathData:s},e=requestAnimationFrame(r)};return e=requestAnimationFrame(r),()=>{e&&cancelAnimationFrame(e)}}),[w,t,m,E]),(0,p.jsxs)("div",{ref:n,className:"w-full h-full aspect-square max-w-[300px]",children:[(0,p.jsx)("h3",{className:"text-xl font-bold text-[#ffffff] mb-2 text-center w-full",children:"Infinite Growth"}),(0,p.jsxs)("div",{className:"w-full h-[calc(100%-2rem)] relative",children:[i.some((e=>e.height>=50))&&(0,p.jsxs)(c.P.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{duration:.5,ease:"easeOut",delay:.5},style:{position:"absolute",bottom:"30%",left:0,right:0,zIndex:3,pointerEvents:"none"},children:[(0,p.jsx)("div",{style:{borderTop:"2px dashed #f062a4"}}),(0,p.jsx)("div",{className:"flex justify-center mt-2",children:(0,p.jsx)("span",{style:{backgroundColor:"#f062a4"},className:"px-3 py-1 text-[black] text-base rounded-full",children:"Neuralward"})})]}),(0,p.jsx)(h.N,{mode:"popLayout",children:i.map(((e,t)=>(0,p.jsx)(c.P.div,{initial:{x:400},animate:{x:e.isLeaving?C:C+e.position*_},exit:{x:0===e.position?C:-T},className:"absolute h-full",style:{left:0,zIndex:e.isLeaving?0:1,width:`${T}px`},children:(0,p.jsx)("div",{className:"absolute inset-0 bg-[#282829] rounded-lg",children:(0,p.jsx)(c.P.div,{ref:t=>{t?v.current[e.id]=t:delete v.current[e.id]},initial:{height:0},animate:{height:`${e.height}%`},transition:{duration:1,ease:"easeOut",delay:e.id.startsWith("initial-")?.1*t:0},className:"absolute bottom-0 w-full rounded-t-lg",style:{backgroundColor:e.height<50?"#402e7f":"#ea3d95"}})})},e.id)))}),(0,p.jsxs)("svg",{className:"absolute top-0 left-0 w-full h-full pointer-events-none",style:{overflow:"visible",zIndex:2},children:[(0,p.jsx)("path",{d:u,stroke:"dodgerblue",strokeWidth:k?5:6,fill:"none"}),a.map(((e,t)=>(0,p.jsx)("circle",{cx:e.x,cy:e.y,r:k?6:8,fill:"dodgerblue"},t)))]})]})]})},Te=(0,r.memo)(ke);var _e=n(9927);const Ce=e=>{let{bgColor:t}=e;return(0,p.jsx)("div",{className:"pulse-effect",style:{backgroundColor:t||"transparent"},children:(0,p.jsxs)("div",{className:"waves",children:[(0,p.jsx)("div",{className:"wave"}),(0,p.jsx)("div",{className:"wave"}),(0,p.jsx)("div",{className:"wave"})]})})},Ae=e=>{let{imageSrc:t,altText:n,chipText:i,withEffect:s,mixBlendModes:o,bgColor:a}=e;const l=(0,r.useRef)(null),u=(0,b.W)(l,{once:!1,margin:"0px"}),h=(0,_e.s)();(0,r.useEffect)((()=>{u?h.start({opacity:1,y:0,transition:{delay:.5,duration:1}}):h.start({opacity:0,y:-10,transition:{duration:.5}})}),[u,h]);const d=s;return(0,p.jsxs)("div",{className:"relative inline-block",children:[s&&(0,p.jsx)(d,{bgColor:a}),o&&Array.isArray(o)&&o.length>0?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("img",{src:t,alt:n,className:"object-cover rounded-full shadow-lg relative z-10",style:{mixBlendMode:o[0]},loading:"lazy",decoding:"async"}),o.slice(1).map(((e,r)=>(0,p.jsx)("img",{src:t,alt:n,className:"object-cover rounded-full shadow-lg absolute inset-0 z-10",style:{mixBlendMode:e},loading:"lazy",decoding:"async"},r)))]}):(0,p.jsx)("img",{src:t,alt:n,className:"object-cover rounded-full shadow-lg relative z-10",style:{mixBlendMode:o||"normal"},loading:"lazy",decoding:"async"}),i&&(0,p.jsx)("div",{className:"absolute bottom-8 left-1/2 transform -translate-x-1/2 z-20",children:(0,p.jsx)(c.P.div,{ref:l,initial:{opacity:0,y:-10},animate:h,className:"bg-[#91c2cf] px-3 py-1 rounded-full text-sm font-medium shadow",children:i})})]})};function Ie(e){let{children:t}=e;return(0,r.useEffect)((()=>{const e=function(){if("undefined"===typeof window)return;const e=console.error;return console.error=function(){const t=(arguments.length<=0?void 0:arguments[0])||"";if("string"===typeof t){if(t.includes('Each child in a list should have a unique "key" prop'))return;if(t.includes("NaNpx is not an animatable value"))return;if(t.includes("Node cannot be found"))return}e(...arguments)},()=>{console.error=e}}();return e}),[]),(0,p.jsx)(p.Fragment,{children:t})}const Pe=r.memo((function(e){let{label:t,title:n,description:r,ctaText:i,ctaUrl:s,children:a}=e;const l=(0,o.Zp)(),u=(e,t)=>
2{e.preventDefault(),t.startsWith("#")?(e=>{const t=document.getElementById(e);if(t){const e=100,n=t.getBoundingClientRect().top+window.pageYOffset-e;window.scrollTo({top:n,behavior:"smooth"})}})(t.substring(1)):l(t)};return(0,p.jsxs)("div",{className:"absolute h-full w-full min-w-full max-w-7xl px-4 sm:px-6 lg:px-8 flex flex-col justify-start mt-[8rem] sm:mt-[8rem] lg:mt-[8rem] z-20 pointer-events-none",children:[(0,p.jsxs)(c.P.div,{className:"max-w-xl w-full text-left pointer-events-auto",initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:-30},transition:{opacity:{duration:.5},y:{duration:.7,ease:"easeOut"}},style:{transition:"transform 0.3s ease-out",willChange:"transform, opacity"},children:[(0,p.jsx)("p",{className:"text-base font-medium text-white mb-2 leading-[1.2] lg:ml-2",children:t}),(0,p.jsx)("h1",{className:"w-full font-bold text-white mb-6 font-antonio text-[10vh] leading-[12vh] sm:text-[13vh] sm:leading-[15vh] md:text-[18vh] md:leading-[20vh]",style:{fontSize:"clamp(6vh, 10vw, 13vh)",lineHeight:"clamp(7vh, 12vw, 15vh)"},children:n})]}),(0,p.jsxs)(c.P.div,{initial:{y:40,opacity:0},animate:{y:0,opacity:1},transition:{delay:.3,duration:.5},className:"max-w-xl flex flex-col gap-4 lg:ml-2 text-left z-10 pointer-events-auto",children:[(0,p.jsx)("p",{className:"text-xl sm:text-2xl text-white/90 leading-relaxed",children:r}),(0,p.jsx)(c.P.div,{initial:{y:40,opacity:0},animate:{y:0,opacity:1},transition:{delay:.4,duration:.5},children:(0,p.jsx)("button",{onClick:e=>u(e,s),"aria-label":`${i} - ${n}`,className:"text-lg px-6 py-3 rounded-full bg-brandPrimary hover:bg-brandAccent text-white font-medium shadow-md transition duration-300",children:i})})]}),a]})})),Ne=r.memo((function(){return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"absolute inset-0 bg-cover bg-center transition-opacity duration-1000",style:{backgroundImage:"url(./carousel_img/performancebg.webp)",backgroundColor:"#1e1e21",willChange:"transform",contain:"layout style paint"},children:[(0,p.jsx)("img",{src:"./carousel_img/performancebg.webp",alt:"",className:"hidden",fetchPriority:"high",loading:"eager",decoding:"async"}),(0,p.jsx)("div",{className:"absolute inset-0"})]}),(0,p.jsx)(Pe,{label:"Unleash Your Competitive Edge",title:"Performance at Scale",description:"Transform your business with our enterprise-grade solutions, delivering up to 10x faster decision-making and automated intelligence",ctaText:"Explore Solutions",ctaUrl:"/services",children:(0,p.jsx)(c.P.img,{src:"./carousel_img/performance.webp",alt:"Performance at Scale visualization",width:940,height:600,initial:{x:100,opacity:0},animate:{x:0,opacity:1},transition:{delay:1.4,duration:.25},className:"absolute bottom-[190px] right-0 w-[940px] h-auto pointer-events-none z-10",loading:"lazy",decoding:"async"})})]})})),Re=e=>{let{currentImage:t,nextImage:n,isActive:i,onComplete:s}=e;const[o,a]=(0,r.useState)(!1),l=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(!i)return;l.current&&clearTimeout(l.current),a(!1);const e=setTimeout((()=>{a(!0),l.current=setTimeout((()=>{s&&s()}),1500)}),50);return()=>{clearTimeout(e),l.current&&clearTimeout(l.current)}}),[i,s]),i?(0,p.jsxs)("div",{className:"dissolve-effect "+(o?"is-active":""),children:[(0,p.jsx)("div",{className:"dissolve-slide",children:(0,p.jsx)("div",{className:"dissolve-image",style:{backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center"}})}),(0,p.jsx)("div",{className:"dissolve-slide",children:(0,p.jsx)("div",{className:"dissolve-image",style:{backgroundImage:`url(${n})`,backgroundSize:"cover",backgroundPosition:"center"}})})]}):null},De=r.memo((function(){const[e,t]=(0,r.useState)(!1),[n,i]=(0,r.useState)(!1);(0,r.useEffect)((()=>{const e=setTimeout((()=>{t(!0)}),3e3);return()=>clearTimeout(e)}),[]);const s=()=>n?"./carousel_img/operationsbg2.webp":"./carousel_img/operationsbg.webp";return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"absolute inset-0 bg-cover bg-center transition-opacity duration-1000",style:{backgroundImage:`url(${s()})`,backgroundColor:"#1e1e21",willChange:"transform",contain:"layout style paint"},children:[(0,p.jsx)("img",{src:s(),alt:"",className:"hidden",loading:"lazy",decoding:"async"}),e&&!n&&(0,p.jsx)(Re,{currentImage:"./carousel_img/operationsbg.webp",nextImage:"./carousel_img/operationsbg2.webp",isActive:!0,onComplete:()=>{t(!1),i(!0)}}),(0,p.jsx)("div",{className:"absolute inset-0"})]}
2),(0,p.jsx)(Pe,{label:"AI-Powered Enterprise Solutions",title:"Intelligent Operations",description:"No freeze \u2014 Streamline operations with our modular AI platform featuring advanced analytics, predictive insights, and automated workflow optimization",ctaText:"See Enterprise Solutions",ctaUrl:"/deployment/on-premise"})]})})),Oe=r.memo((function(){const[e,t]=(0,r.useState)(!1),[n,i]=(0,r.useState)(!1),[s,o]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=setTimeout((()=>{t(!0),setTimeout((()=>{i(!0)}),2e3)}),1e3);return()=>{clearTimeout(e)}}),[]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"absolute inset-0 bg-cover bg-center transition-opacity duration-1000",style:{backgroundImage:"url(./carousel_img/defensebg.webp)",backgroundColor:"#1e1e21",willChange:"transform",contain:"layout style paint"},children:[(0,p.jsx)("img",{src:"./carousel_img/defensebg.webp",alt:"",className:"hidden",loading:"lazy",decoding:"async"}),e&&(0,p.jsx)("div",{className:"absolute inset-0 bg-cover bg-center z-[10]",style:{backgroundImage:"url(./carousel_img/defensebg2.webp)",willChange:"transform",contain:"layout style paint"}}),n&&(0,p.jsx)("div",{className:"absolute inset-0 flex items-center justify-center z-[5]",children:s?(0,p.jsx)(c.P.div,{animate:{scale:[1,1.05,1]},transition:{duration:1.5,ease:"easeInOut",repeat:1/0,repeatType:"loop"},className:"flex items-center justify-center",style:{willChange:"transform"},children:(0,p.jsx)("img",{src:"./carousel_img/shield.webp",alt:"Neural Defense Shield",width:600,height:600,loading:"lazy",decoding:"async",className:"w-auto h-auto max-w-[350px] max-h-[350px] sm:max-w-[350px] sm:max-h-[350px] md:max-w-[450px] md:max-h-[450px] lg:max-w-[550px] lg:max-h-[550px] xl:max-w-[600px] xl:max-h-[600px]"})}):(0,p.jsx)(c.P.div,{initial:{scale:0},animate:{scale:[0,1.2,.9,1.1,1]},transition:{duration:1,ease:"easeOut",times:[0,.4,.6,.8,1]},onAnimationComplete:()=>o(!0),className:"flex items-center justify-center",style:{willChange:"transform"},children:(0,p.jsx)("img",{src:"./carousel_img/shield.webp",alt:"Neural Defense Shield",width:600,height:600,loading:"lazy",decoding:"async",className:"w-auto h-auto max-w-[350px] max-h-[350px] sm:max-w-[350px] sm:max-h-[350px] md:max-w-[450px] md:max-h-[450px] lg:max-w-[550px] lg:max-h-[550px] xl:max-w-[600px] xl:max-h-[600px]"})})}),(0,p.jsx)("div",{className:"absolute inset-0"})]}),(0,p.jsx)(Pe,{label:"Future-Proof Your Security",title:"Neural Defense",description:"Protect your digital assets with our AI-powered cybersecurity suite, featuring real-time threat detection and automated incident response",ctaText:"Discover Security",ctaUrl:"/solutions/neural-networks"})]})})),je=r.memo((function(){return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"absolute inset-0 bg-cover bg-center transition-opacity duration-1000",style:{backgroundImage:"url(./carousel_img/autonomous_bg.webp)",backgroundColor:"#1e1e21",willChange:"transform",contain:"layout style paint"},children:[(0,p.jsx)("img",{src:"./carousel_img/autonomous_bg.webp",alt:"",className:"hidden",loading:"lazy",decoding:"async"}),(0,p.jsx)("div",{className:"absolute inset-0"})]}),(0,p.jsx)(Pe,{label:"Next-Generation Architecture",title:"Autonomous Systems",description:"Deploy self-learning AI agents that continuously evolve within your environment, anticipating business needs and executing complex multi-step workflows autonomously",ctaText:"Explore Architecture",ctaUrl:"/deployment/edge",children:(0,p.jsx)(c.P.img,{src:"./carousel_img/autonomous.webp",alt:"Autonomous Systems visualization",width:940,height:600,initial:{y:40,opacity:0},animate:{x:0,y:0,opacity:1},transition:{delay:1.4,duration:.25},className:"absolute bottom-[190px] left-1/2 transform -translate-x-1/2 w-[800px] lg:w-[1200px] h-auto rounded-full mix-blend-screen -ml-[200px] lg:-ml-[300px] pointer-events-none z-10",loading:"lazy",decoding:"async"})})]})}));function Le(e){let{count:t=150,speedMultiplier:n=1,particleColor:i="#ffeedd",glowColor:s="#ffaa44",glitchKey:o=0}=e;const a=(0,r.useRef)(null);return(0,r.useEffect)((()=>{const e=a.current;if(!e)return;const r=e.getContext("2d",{alpha:!0});if(!r)return;let o,l=[],c=0,u=0;const h=Math.PI/180*24,d=()=>{e.parentElement&&(c=e.width=e.parentElement.clientWidth,u=e.height=e.parentElement.clientHeight)},f=()=>{r.clearRect(0,0,c,u),r.save(),r.translate(c/2,u/2),r.rotate(h);l.map((e=>{e.angle+=e.orbitSpeed*n,e.pulse+=e.pulseSpeed;
2let t=Math.cos(e.angle)*e.radius,r=Math.sin(e.angle)*e.radius,i=e.yOffset;const s=i*e.cosTilt-r*e.sinTilt,o=i*e.sinTilt+r*e.cosTilt;if(o<=-350)return null;const a=400/(400+o),l=Math.min(4,a),c=t*a,u=s*a,h=Math.max(.1,e.baseSize*l);let d=Math.min(1,a);a>2&&(d=Math.max(0,1-(a-2)/2));return{px:c,py:u,size:h,opacity:(.3*Math.sin(e.pulse)+.7)*d,z:o}})).filter((e=>null!==e&&e.opacity>.01)).sort(((e,t)=>t.z-e.z)).forEach((e=>{r.globalAlpha=Math.max(0,Math.min(1,e.opacity)),e.size>1.5?(r.shadowBlur=Math.min(12,2*e.size),r.shadowColor=s):r.shadowBlur=0,r.fillStyle=i,r.beginPath(),r.arc(e.px,e.py,e.size,0,2*Math.PI),r.fill()})),r.restore(),o=requestAnimationFrame(f)};return window.addEventListener("resize",d),d(),(()=>{l=[];for(let e=0;e<t;e++){const e=45*Math.random()*(Math.PI/180);l.push({angle:Math.random()*Math.PI*2,orbitSpeed:(.003+.007*Math.random())*n,radius:150+450*Math.random(),yOffset:400*Math.random()-200,cosTilt:Math.cos(e),sinTilt:Math.sin(e),pulse:Math.random()*Math.PI*2,pulseSpeed:.02+.03*Math.random(),baseSize:2+2*Math.random()})}})(),f(),()=>{window.removeEventListener("resize",d),cancelAnimationFrame(o)}}),[t,n,i,s]),(0,r.useEffect)((()=>{if(0===o)return;const e=a.current;e&&(e.classList.remove("animate-vortex-glitch"),e.offsetWidth,e.classList.add("animate-vortex-glitch"))}),[o]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("style",{children:"\n @keyframes vortexCyberGlitch {\n 0% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n 5% { transform: translate(-30px, 15px) scale(1.1) skewX(35deg); filter: drop-shadow(-15px 0 0 #ff003c) drop-shadow(15px 0 0 #00f0ff) brightness(2); opacity: 0.8; }\n 10% { transform: translate(30px, -15px) scale(0.9) skewX(-35deg); filter: drop-shadow(15px 0 0 #ff003c) drop-shadow(-15px 0 0 #00f0ff) invert(0.8) contrast(2); opacity: 0.9; }\n 15% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n 25% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n 30% { transform: translate(-15px, -5px) scale(1.05) skewX(15deg); filter: drop-shadow(-20px 5px 0 #fcee0a) drop-shadow(20px -5px 0 #00f0ff) brightness(3); opacity: 0.6; }\n 35% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n 60% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n 65% { transform: translate(20px, 10px) scale(1) skewX(-20deg); filter: drop-shadow(25px 0 0 #ff003c) drop-shadow(-25px 0 0 #00f0ff) hue-rotate(90deg); opacity: 0.7; }\n 70% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n 85% { transform: translate(-5px, 5px) scale(1.02) skewX(5deg); filter: drop-shadow(-10px 0 0 #ff003c) drop-shadow(10px 0 0 #00f0ff); opacity: 0.9; }\n 90% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n 100% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n }\n .animate-vortex-glitch {\n animation: vortexCyberGlitch 0.45s step-end forwards;\n }\n "}),(0,p.jsx)("canvas",{ref:a,className:"absolute inset-0 w-full h-full pointer-events-none mix-blend-screen animate-vortex-glitch"})]})}function Me(e){let{top:t="67.5%",left:n="50.7%"}=e;const i=(0,r.useRef)(null),s=(0,r.useMemo)((()=>({particles:Array.from({length:120}).map(((e,t)=>{const n=Math.random()*Math.PI*2,r=25+200*Math.random();return{x:Math.cos(n)*r,y:Math.sin(n)*r-80*Math.random(),size:3.5*Math.random()+1.5,duration:1.5+3*Math.random(),delay:2*Math.random(),maxOpacity:.7*Math.random()+.5}})),synapses:Array.from({length:12}).map((()=>({angle:Math.random()*Math.PI*2,length:40+100*Math.random(),delay:5*Math.random(),duration:.5+1.5*Math.random(),repeatDelay:1+4*Math.random()}))),lightRays1:Array.from({length:14}).map((()=>({angle:360*Math.random()*(Math.PI/180),length:100+180*Math.random(),endWidth:15+40*Math.random(),opacity:.05+.15*Math.random()}))),lightRays2:Array.from({length:12}).map((()=>({angle:360*Math.random()*(Math.PI/180),length:150+220*Math.random(),endWidth:20+50*Math.random(),opacity:.03+.1*Math.random()})))})),[]);return(0,r.useEffect)((()=>{const e=i.current;if(!e)return;const t=e.getContext("2d",{alpha:!0});if(!t)return;let n,r=performance.now();const o=300,a=300;e.width=600,e.height=600;const{particles:l,synapses:c,lightRays1:u,lightRays2:h}=s,d=()=>{const e=(performance.now()-r)/1e3;t.clearRect(0,0,600,600),t.globalCompositeOperation="screen";const i=.8+.4*Math.sin(e*(2*Math.PI/4))*.5+.5,s=.4+.4*(.5*Math.sin(e*(2*Math.PI/4))+.5);t.save(),t.globalAlpha=s;const f=90*i,p=t.createRadialGradient(o,a,0,o,a,f);p.addColorStop(0,"rgba(255,170,68,0.3)"),p.addColorStop(1,"rgba(255,170,68,0)"),t.fillStyle=p,t.beginPath(),t.arc(o,a,f,0,2*Math.PI),t.fill(),t.restore(
2);const m=.9+.4*(.5*Math.sin(e*(2*Math.PI/1.5))+.5),g=.8+.2*(.5*Math.sin(e*(2*Math.PI/1.5))+.5);t.save(),t.globalAlpha=g;const v=6*m;t.shadowBlur=15,t.shadowColor="rgba(255,170,68,0.8)",t.fillStyle="#ffeedd",t.beginPath(),t.arc(o,a,v,0,2*Math.PI),t.fill(),t.shadowBlur=0,t.restore();const y=.6+.8*(.5*Math.sin(e*(2*Math.PI/2.5))+.5),b=.5+.4*(.5*Math.sin(e*(2*Math.PI/2.5))+.5);t.save(),t.globalAlpha=b,t.fillStyle="#ffcc66";const w=140*y;t.fillRect(o-w/2,299,w,2),t.restore();const x=.8+.4*(.5*Math.sin((e-.5)*(2*Math.PI/3.5))+.5),S=.3+.3*(.5*Math.sin((e-.5)*(2*Math.PI/3.5))+.5);t.save(),t.globalAlpha=.6*S,t.filter="blur(4px)",t.fillStyle="#ff6600";const E=250*x;t.fillRect(o-E/2,296,E,8),t.filter="none",t.restore();const k=.7+.6*(.5*Math.sin((e-.2)*(2*Math.PI/2))+.5),T=.3+.4*(.5*Math.sin((e-.2)*(2*Math.PI/2))+.5);t.save(),t.globalAlpha=.5*T,t.fillStyle="#ffcc66";const _=70*k;t.fillRect(299,a-_/2,2,_),t.restore(),l.forEach((n=>{const r=n.duration,i=r+n.delay,s=(e%i-n.delay)/r;if(s<0||s>1)return;const l=s<.5?2*s*s:1-Math.pow(-2*s+2,2)/2,c=o+n.x*l,u=a+n.y*l,h=s<.2?s/.2:s>.8?(1-s)/.2:1,d=s<.2?s/.2*1.5:s>.8?(1-s)/.2*1.5:1.5,f=n.size*d;t.save(),t.globalAlpha=Math.min(1,h*n.maxOpacity),t.shadowBlur=4,t.shadowColor="#ffaa44",t.fillStyle="#ffeedd",t.beginPath(),t.arc(c,u,Math.max(.5,f/2),0,2*Math.PI),t.fill(),t.shadowBlur=0,t.restore()}));const C=e/60*Math.PI*2;t.save(),t.translate(o,a),t.rotate(C),u.forEach((e=>{t.save(),t.rotate(e.angle),t.globalAlpha=e.opacity;const n=t.createLinearGradient(0,0,e.length,0);n.addColorStop(0,`rgba(255,200,100,${e.opacity})`),n.addColorStop(1,"rgba(255,170,68,0)"),t.fillStyle=n,t.beginPath(),t.moveTo(0,0),t.lineTo(e.length,-e.endWidth/2),t.lineTo(e.length,e.endWidth/2),t.closePath(),t.fill(),t.restore()})),t.restore();const A=-e/90*Math.PI*2;t.save(),t.translate(o,a),t.rotate(A),h.forEach((e=>{t.save(),t.rotate(e.angle),t.globalAlpha=e.opacity;const n=t.createLinearGradient(0,0,e.length,0);n.addColorStop(0,`rgba(255,170,68,${e.opacity})`),n.addColorStop(1,"rgba(255,150,50,0)"),t.fillStyle=n,t.beginPath(),t.moveTo(0,0),t.lineTo(e.length,-e.endWidth/2),t.lineTo(e.length,e.endWidth/2),t.closePath(),t.fill(),t.restore()})),t.restore(),c.forEach((n=>{const r=n.duration+n.repeatDelay,i=(e-n.delay)%r;if(i<0||i>n.duration)return;const s=i/n.duration,l=s<.3?s/.3*.8:(1-s)/.7*.8,c=s<.5?s/.5:.4+.6*(1-s),u=15*s;t.save(),t.translate(o+u,a),t.rotate(n.angle),t.globalAlpha=Math.max(0,l);const h=t.createLinearGradient(0,0,n.length*c,0);h.addColorStop(0,"#ffeedd"),h.addColorStop(1,"rgba(255,238,221,0)"),t.strokeStyle=h,t.lineWidth=1,t.beginPath(),t.moveTo(0,0),t.lineTo(n.length*c,0),t.stroke(),t.restore()})),t.globalCompositeOperation="source-over",n=requestAnimationFrame(d)};return d(),()=>{cancelAnimationFrame(n)}}),[s]),(0,p.jsx)("canvas",{ref:i,className:"absolute pointer-events-none mix-blend-screen",style:{top:t,left:n,transform:"translate(-50%, -50%)",width:"600px",height:"600px",zIndex:10}})}function Fe(e,t){let n=t;const r=e=>(n=(16807*n+11)%2147483647,Math.abs(n)%e);let i=`@keyframes ${e} {\n`;for(let s=0;s<=30;s++){const e=(s/30*100).toFixed(2),t=r(100);i+=` ${e}% { clip-path: inset(${t}% 0 ${r(101-t)}% 0); }\n`}return i+="}",i}const Ue=`\n /* \u2500\u2500 Step-end cyber glitch (delayed after vortex) \u2500\u2500 */\n @keyframes imageCyberGlitch {\n 0% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n 5% { transform: translate(-30px, 15px) scale(1.1) skewX(35deg); filter: drop-shadow(-15px 0 0 #ff003c) drop-shadow(15px 0 0 #00f0ff) brightness(2); opacity: 0.8; }\n 10% { transform: translate(30px, -15px) scale(0.9) skewX(-35deg); filter: drop-shadow(15px 0 0 #ff003c) drop-shadow(-15px 0 0 #00f0ff) invert(0.8) contrast(2); opacity: 0.9; }\n 15% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n 25% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n 30% { transform: translate(-15px, -5px) scale(1.05) skewX(15deg); filter: drop-shadow(-20px 5px 0 #fcee0a) drop-shadow(20px -5px 0 #00f0ff) brightness(3); opacity: 0.6; }\n 35% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n 60% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n 65% { transform: translate(20px, 10px) scale(1) skewX(-20deg); filter: drop-shadow(25px 0 0 #ff003c) drop-shadow(-25px 0 0 #00f0ff) hue-rotate(90deg); opacity: 0.7; }\n 70% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n 85% { transform: translate(-5px, 5px) scale(1.02) skewX(5deg); filter: drop-shadow(-10px 0 0 #ff003c) drop-shadow(10px 0 0 #00f0ff); opacity: 0.9; }\n 90% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n 100% { transform: translate(0) scale(1); filter: none; opacity: 1; }\n }\n\n /* \u2500\u2500 Glitch image container \u2500\u2500 */\n .glitch-img {\n position: absolute;\n inset: 0;\n background-size: cover;\n background-position: center;\n pointer-events: none;\n animation: imageCyberGlitch 0.45s 0.5s step-end forwards;\n will-change: transform, filter, opacity;\n contain: layout style paint;\n }\n\n /* Chromatic aberration layers */\n .glitch-img::before,\n .glitch-img::after {\n content: "";\n position: absolute;\n inset: 0;\n background: inherit;\n background-size: cover;\n background-position: center;\n pointer-events: none;\n }\n\n /* Magenta shift \u2014 left offset */\n .glitch-img::before {\n left: -2px;\n mix-blend-mode: screen;
2\n filter: hue-rotate(290deg) saturate(2) brightness(1.1);\n opacity: 0.6;\n animation: imgNoise1 3s linear infinite alternate-reverse;\n }\n\n /* Green shift \u2014 right offset */\n .glitch-img::after {\n left: 2px;\n mix-blend-mode: screen;\n filter: hue-rotate(90deg) saturate(2) brightness(1.1);\n opacity: 0.6;\n animation: imgNoise2 3s linear infinite alternate-reverse;\n }\n\n /* \u2500\u2500 Glow layer \u2500\u2500 */\n .glitch-glow {\n position: absolute;\n inset: 0;\n background-size: cover;\n background-position: center;\n pointer-events: none;\n filter: blur(40px) brightness(0.4);\n opacity: 0.5;\n will-change: opacity;\n contain: layout style paint;\n }\n\n ${Fe("imgNoise1",42)}\n ${Fe("imgNoise2",137)}\n`;function Ve(){const e="./carousel_img/adaptive.webp",[t,n]=(0,r.useState)(!0),[i,s]=(0,r.useState)(0);return(0,r.useEffect)((()=>{const e=setTimeout((()=>{n(!1),s((e=>e+1))}),2e3);return()=>clearTimeout(e)}),[]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("style",{children:Ue}),(0,p.jsx)("div",{className:"absolute inset-0 bg-[#1e1e20]"}),(0,p.jsx)("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:(0,p.jsx)(Le,{glitchKey:i})}),(0,p.jsx)("div",{className:t?"glitch-img":"absolute inset-0 bg-cover bg-center pointer-events-none",style:{backgroundImage:`url(${e})`},children:(0,p.jsx)("img",{src:e,alt:"",className:"hidden",loading:"lazy",decoding:"async"})}),t&&(0,p.jsx)("div",{className:"glitch-glow",style:{backgroundImage:`url(${e})`}}),(0,p.jsx)("div",{className:"absolute inset-0 z-10 pointer-events-none overflow-hidden isolate",children:(0,p.jsx)("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",style:{width:"max(100vw, calc(100vh * 16 / 9))",height:"max(100vh, calc(100vw * 9 / 16))"},children:(0,p.jsx)(Me,{top:"67.5%",left:"50.7%"})})}),(0,p.jsx)(Pe,{label:"Reduce Noise & Interferences",title:"Adaptive Insights",description:"Bridge the gap between human creativity and machine precision. Our intuitive interfaces translate complex neural data into actionable, real-time insights for your team",ctaText:"Discover Predictive Analytics",ctaUrl:"/solutions/predictive-analytics"})]})}const ze=[(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{children:[(0,p.jsx)("span",{className:"ccs-kw",children:"const"})," ",(0,p.jsx)("span",{className:"ccs-fn",children:"rotate"})," = (",(0,p.jsx)("span",{className:"ccs-vr",children:"cube"}),") => {"]}),(0,p.jsxs)("div",{children:[" ",(0,p.jsx)("span",{className:"ccs-vr",children:"cube"}),".",(0,p.jsx)("span",{className:"ccs-vr",children:"rotation"}),".",(0,p.jsx)("span",{className:"ccs-vr",children:"y"})," -= ",(0,p.jsx)("span",{className:"ccs-vr",children:"Math"}),".",(0,p.jsx)("span",{className:"ccs-vr",children:"PI"})," / ",(0,p.jsx)("span",{className:"ccs-vr",children:"2"}),";"]}),(0,p.jsx)("div",{children:"}"})]}),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{children:[(0,p.jsx)("span",{className:"ccs-kw",children:"export default function"})," ",(0,p.jsx)("span",{className:"ccs-fn",children:"Engine"}),"() {"]}),(0,p.jsxs)("div",{children:[" ",(0,p.jsx)("span",{className:"ccs-kw",children:"const"})," [",(0,p.jsx)("span",{className:"ccs-vr",children:"state"}),", ",(0,p.jsx)("span",{className:"ccs-fn",children:"set"}),"] = ",(0,p.jsx)("span",{className:"ccs-fn",children:"useState"}),"(",(0,p.jsx)("span",{className:"ccs-st",children:"'stable'"}),");"]}),(0,p.jsxs)("div",{children:[" ",(0,p.jsx)("span",{className:"ccs-kw",children:"return"})," <",(0,p.jsx)("span",{className:"ccs-fn",children:"Immersive"})," />;"]}),(0,p.jsx)("div",{children:"}"})]}),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{children:(0,p.jsx)("span",{className:"ccs-cm",children:"// Synchronizing physics clock"})}),(0,p.jsxs)("div",{children:[(0,p.jsx)("span",{className:"ccs-kw",children:"function"})," ",(0,p.jsx)("span",{className:"ccs-fn",children:"animate"}),"(",(0,p.jsx)("span",{className:"ccs-vr",children:"time"}),") {"]}),(0,p.jsxs)("div",{children:[" ",(0,p.jsx)("span",{className:"ccs-vr",children:"requestAnimationFrame"}),"(",(0,p.jsx)("span",{className:"ccs-fn",children:"animate"}),");"]}),(0,p.jsxs)("div",{children:[" ",(0,p.jsx)("span",{className:"ccs-fn",children:"updatePhysics"}),"(",(0,p.jsx)("span",{className:"ccs-vr",children:"time"}),");"]}),(0,p.jsx)("div",{children:"}"})]}),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{children:[(0,p.jsx)("span",{className:"ccs-kw",children:"if"})," (",(0,p.jsx)("span",{className:"ccs-vr",children:"collision"}),".",(0,p.jsx)("span",{className:"ccs-fn",children:"detected"}),"()) {"]}),(0,p.jsxs)("div",{children:[" ",(0,p.jsx)("span",{className:"ccs-vr",children:"audio"}),".",(0,p.jsx)("span",{className:"ccs-fn",children:"play"}),"(",(0,p.jsx)("span",{className:"ccs-st",children:"'thud.wav'"}),");"]}),(0,p.jsxs)("div",{children:[" ",(0,p.jsx)("span",{className:"ccs-vr",children:"particleSystem"}),".",(0,p.jsx)("span",{className:"ccs-fn",children:"emit"}),"(",(0,p.jsx)("span",{className:"ccs-vr",children:"20"}),");"]}),(0,p.jsx)("div",{children:"}"})]}),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{children:(0,p.jsx)("span",{className:"ccs-cm",children:"/* Render volumetric road */"})}),(0,p.jsxs)("div",{children:["<",(0,p.jsx)("span",{className:"ccs-fn",children:"Road"})," ",(0,p.jsx)("span",{className:"ccs-vr",children:"depth"}),"={",(0,p.jsx)("span",{className:"ccs-vr",children:"40"}),"} ",(0,p.jsx)("span",{className:"ccs-vr",children:"texture"}),"=",(0,p.jsx)("span",{className:"ccs-st",children:'"grid"'})," />"]})]}),(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)("div",{children:[(0,p.jsx)("span",{className:"ccs-kw",children:"const"})," ",(0,p.jsx)("span",{className:"ccs-fn",children:"matrix"})," = ",(0,p.jsx)("span",{className:"ccs-vr",children:"data"}),".",(0,p.jsx)("span",{className:"ccs-fn",children:"map"}),"(",(0,p.jsx)("span",{className:"ccs-vr",children:"row"})," => ",(0,p.jsx)("span",{className:"ccs-vr",children:"row"}),".",(0,p.jsx)("span",{className:"ccs-fn",children:"process"}),"());"]})}),(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)("div",{children:[(0,p.jsx)("span",{className:"ccs-kw",children:"yield"})," ",(0,p.jsx)("span",{className:"ccs-fn",children:"put"}),"({ ",(0,p.jsx)("span",{className:"ccs-vr",children:"type"}),": ",(0,p.jsx)("span",{className:"ccs-st",children:"'STREAM_SYNC'"}),", ",(0,p.jsx)("span",{className:"ccs-vr",children:"payload"}),": ",(0,p.jsx)("span",{className:"ccs-vr",children:"id"})," });"]})}),(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)("div",{children:[(0,p.jsx)("span",{className:"ccs-kw",children:"await"})," ",(0,p.jsx)("span",{className:"ccs-vr",children:"physics"}),".",(0,p.jsx)("span",{className:"ccs-fn",children:"compute"}),"({ ",(0,p.jsx)("span",{className:"ccs-vr",children:"dt"}),": ",(0,p.jsx)("span",{className:"ccs-vr",children:"1"}),"/",(0,p.jsx)("span",{className:"ccs-vr",children:"60"})," });"]})}),(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)("div",{children:[(0,p.jsx)("span",{className:"ccs-kw",children:"return"})," ",(0,p.jsx)("span",{className:"ccs-vr",children:"view"}),".",(0,p.jsx)("span",{className:"ccs-fn",children:"render"}),"(",(0,p.jsx)("span",{className:"ccs-vr",children:"state"}),".",(0,p.jsx)("span",{className:"ccs-fn",children:"snapshot"}),"());"]})}),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{children:(0,p.jsx)("span",{className:"ccs-cm",children:"// Logic end of stream segment"})}),(0,p.jsxs)("div",{children:[(0,p.jsx)("span",{className:"ccs-vr",children:"process"}),".",(0,p.jsx)("span",{className:"ccs-fn",children:"exit"}),"(",(0,p.jsx)("span",{className:"ccs-vr",children:"0"}),");"]})]})],Be=[{side:"left",offset:0},{side:"right",offset:0},{side:"left",offset:4},{side:"right",offset:-4},{side:"right",offset:2},{side:"left",offset:-2},{side:"left",offset:5},{side:"right",offset:-5},{side:"left",offset:-3},{side:"right",offset:3}],$e=e=>{let{speed:t}=e;
2const n=Math.max(0,(2.5-t)/2.45)*ze.length,r=[...ze,...ze];return(0,p.jsx)("div",{className:"ccs-code-flow",children:(0,p.jsx)("div",{className:"ccs-code-track",children:r.map(((e,t)=>{const r=Be[t%Be.length],i=400*t,s="left"===r.side?`calc(18% + ${r.offset}px)`:`calc(82% + ${r.offset}px)`,o=t%ze.length<n;return(0,p.jsx)("div",{className:"ccs-snippet",style:{left:`${i}px`,top:s,transform:"translateY(-50%) translateZ(1px)",opacity:o?1:0,pointerEvents:o?"auto":"none"},children:e},t)}))})})},qe=e=>{let{flameOpacity:t}=e;return(0,p.jsxs)("div",{className:"ccs-aura-container",style:{opacity:t},children:[(0,p.jsx)("div",{className:"ccs-plasma-glow"}),(0,p.jsx)("div",{className:"ccs-aura-shell ccs-shell-xy"}),(0,p.jsx)("div",{className:"ccs-aura-shell ccs-shell-yz"}),(0,p.jsx)("div",{className:"ccs-aura-shell ccs-shell-xz"}),(0,p.jsx)("div",{className:"ccs-trail"})]})},He=e=>{let{isReflection:t=!1}=e;return(0,p.jsxs)("div",{className:"ccs-cube-wrapper",children:[(0,p.jsx)("div",{className:"ccs-face ccs-face-top "+(t?"ccs-reflection":"")}),(0,p.jsx)("div",{className:"ccs-face ccs-face-bottom "+(t?"ccs-reflection":"")}),(0,p.jsx)("div",{className:"ccs-face ccs-face-front "+(t?"ccs-reflection":"")}),(0,p.jsx)("div",{className:"ccs-face ccs-face-back "+(t?"ccs-reflection":"")}),(0,p.jsx)("div",{className:"ccs-face ccs-face-left "+(t?"ccs-reflection":"")}),(0,p.jsx)("div",{className:"ccs-face ccs-face-right "+(t?"ccs-reflection":"")})]})};function We(){const[e,t]=(0,r.useState)(3),n=(0,r.useRef)(null),i=(0,r.useCallback)((()=>{const e=performance.now(),r=i=>{const s=i-e,o=Math.min(s/5e3,1),a=function(e){return 1-Math.pow(1-e,3)}(o);t(3+-2.95*a),o<1&&(n.current=requestAnimationFrame(r))};n.current=requestAnimationFrame(r)}),[]);return(0,r.useEffect)((()=>{const e=setTimeout(i,2e3);return()=>{clearTimeout(e),n.current&&cancelAnimationFrame(n.current)}}),[i]),e}const Ge=r.memo((function(){const e=We(),t=e<=.8?Math.min(1,(.8-e)/.75):0,n={"--ccs-speed":`${e}s`,"--ccs-size":"80px","--ccs-road-depth":"40px","--ccs-stripe-cycle":"160px","--ccs-track-length":"4000px","--ccs-code-speed":`calc(${e}s * (4000 / 160))`,"--ccs-aura-color":"#ff3c00","--ccs-aura-inner":"#ffcc00","--ccs-flame-scale":.9+.4*t,"--ccs-trail-scale":1+2*t};return(0,p.jsxs)("div",{className:"ccs-root",style:n,children:[(0,p.jsx)("style",{children:"\n /* \u2500\u2500 Container \u2500\u2500 */\n .ccs-root {\n position: absolute;\n inset: 0;\n perspective: 1200px;\n display: flex;\n justify-content: center;
2\n align-items: center;\n background: radial-gradient(circle at center, #1a1a24 0%, #1e1e20 80%);\n overflow: hidden;\n contain: layout style paint;\n }\n\n /* Push the scene down on mobile so it clears the text overlay */\n @media (max-width: 767px) {\n .ccs-root {\n align-items: flex-end;\n padding-bottom: 12vh;\n }\n }\n\n /* \u2500\u2500 Camera \u2500\u2500 */\n .ccs-camera {\n position: relative;\n transform-style: preserve-3d;\n transform: rotateX(54deg) rotateZ(45deg);\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n /* \u2500\u2500 Road slab \u2500\u2500 */\n .ccs-road-slab {\n position: absolute;\n width: 2400px;\n height: 400px;\n transform-style: preserve-3d;\n }\n\n .ccs-road-surface {\n position: absolute;\n inset: 0;\n background: linear-gradient(90deg, rgba(22,22,29,0.8) 0%, rgba(32,32,41,0.8) 50%, rgba(22,22,29,0.8) 100%);\n transform-style: preserve-3d;\n mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);\n -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);\n overflow: hidden;\n backdrop-filter: blur(4px);\n }\n\n .ccs-wall-front {\n position: absolute;\n width: 100%;\n height: var(--ccs-road-depth);\n background: #08080a;\n bottom: 0;\n left: 0;\n transform-origin: bottom;\n transform: rotateX(-90deg) translateY(var(--ccs-road-depth));\n border-top: 1px solid rgba(255,255,255,0.05);\n }\n\n .ccs-wall-side {\n position: absolute;\n width: var(--ccs-road-depth);\n height: 100%;\n background: #050507;\n top: 0;\n right: 0;\n transform-origin: right;\n transform: rotateY(90deg) translateX(var(--ccs-road-depth));\n }\n\n /* \u2500\u2500 Road stripes \u2500\u2500 */\n .ccs-stripes {\n position: absolute;\n top: 50%;\n left: -400px;\n transform: translateY(-50%);\n width: 3200px;\n height: 4px;\n background: repeating-linear-gradient(\n 90deg,\n rgba(255,255,255,0.9) 0px,\n rgba(255,255,255,0.9) 60px,\n transparent 60px,\n transparent 160px\n );\n animation: ccs-moveStripes var(--ccs-speed) linear infinite;\n z-index: 5;\n }\n\n @keyframes ccs-moveStripes {\n 0% { transform: translateY(-50%) translateX(-160px); }\n 100% { transform: translateY(-50%) translateX(0); }\n }\n\n /* \u2500\u2500 Code flow \u2500\u2500 */\n .ccs-code-flow {\n position: absolute;\n inset: 0;\n transform-style: preserve-3d;\n pointer-events: none;\n }\n\n .ccs-code-track {\n position: absolute;\n display: flex;\n align-items: center;\n width: 8000px;\n height: 100%;\n animation: ccs-moveCode var(--ccs-code-speed) linear infinite;\n }\n\n @keyframes ccs-moveCode {\n 0% { transform: translateX(calc(-1 * var(--ccs-track-length))); }\n 100% { transform: translateX(0); }\n }\n\n .ccs-snippet {\n position: absolute;\n background: rgba(10, 10, 15, 0.7);\n padding: 12px 18px;\n border-radius: 8px;\n border: 1px solid rgba(255,255,255,0.05);\n font-family: 'Fira Code', 'Courier New', monospace;\n font-size: 11px;\n line-height: 1.4;\n color: #9cdcfe;\n box-shadow: 0 4px 12px rgba(0,0,0,0.3);\n white-space: nowrap;\n backdrop-filter: blur(12px);\n transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .ccs-kw { color: #c586c0; }\n .ccs-fn { color: #dcdcaa; }\n .ccs-st { color: #ce9178; }\n .ccs-vr { color: #9cdcfe; }\n .ccs-cm { color: #6a9955; font-style: italic; }\n\n /* \u2500\u2500 Cube actor \u2500\u2500 */\n .ccs-cube-group {\n position: absolute;\n width: var(--ccs-size);\n height: var(--ccs-size);\n transform-style: preserve-3d;\n animation: ccs-slideCompensate var(--ccs-speed) linear infinite;\n }\n\n .ccs-cube-wrapper {\n position: absolute;\n width: 100%;\n height: 100%;\n transform-style: preserve-3d;\n transform-origin: bottom left;\n animation: ccs-tumble var(--ccs-speed) linear infinite;\n }\n\n .ccs-face {\n position: absolute;\n width: var(--ccs-size);\n height: var(--ccs-size);\n background: #ffffff;\n border: 1px solid rgba(0,0,0,0.1);\n backface-visibility: visible;\n }\n\n .ccs-face-top { transform: translateZ(var(--ccs-size)); background: #ffffff; }\n .ccs-face-bottom { transform: translateZ(0); background: #999; }\n .ccs-face-front { transform: rotateX(-90deg); transform-origin: bottom; background: #eeeeee; }\n .ccs-face-back { transform: rotateX(90deg); transform-origin: top; background: #cccccc; }\n .ccs-face-left { transform: rotateY(-90deg); transform-origin: left; background: #dddddd; }\n .ccs-face-right { transform: rotateY(90deg); transform-origin: right; background: #dddddd; }\n\n .ccs-reflection {\n opacity: 0.4;\n filter: blur(4px);\n background: linear-gradient(to top, rgba(255,255,255,0.8), rgba(255,255,255,0.1)) !important;\n mask-image: linear-gradient(to bottom, rgba(0,0,0,1), transparent);\n -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1), transparent);\n }\n\n @keyframes ccs-tumble {\n 0% { transform: rotateY(0deg); }\n 100% { transform: rotateY(-90deg); }\n }\n\n @keyframes ccs-slideCompensate {\n 0% { transform: translateX(0); }\n 100% { transform: translateX(var(--ccs-size)); }\n }\n\n /* \u2500\u2500 Shadow \u2500\u2500 */\n .ccs-shadow {\n position: absolute;\n width: var(--ccs-size);\n height: var(--ccs-size);\n background: rgba(0, 0, 0, 0.5);\n filter: blur(10px);\n transform: translateZ(1px);\n animation: ccs-shadowMove var(--ccs-speed) linear infinite;\n }\n\n @keyframes ccs-shadowMove {\n 0% { transform: translateZ(1px) translateX(0) scale(1); opacity: 0.5; }\n 50% { transform: translateZ(1px) translateX(calc(var(--ccs-size) * -0.5)) scale(0.7, 1.1); opacity: 0.2; }\n 100% { transform: translateZ(1px) translateX(calc(var(--ccs-size) * -1)) scale(1); opacity: 0.5; }\n }\n\n /* \u2500\u2500 3D Volumetric Aura \u2500\u2500 */\n .ccs-aura-container {\n position: absolute;\n width: 100%;\n height: 100%;\n transform-style: preserve-3d;\n pointer-events: none;\n transition: opacity 0.4s ease;\n }\n\n .ccs-aura-shell {\n position: absolute;\n inset: -20px;\n border-radius: 50%;\n border: 2px solid var(--ccs-aura-color);\n background: radial-gradient(circle, var(--ccs-aura-inner) 0%, transparent 70%);\n filter: blur(10px);\n mix-blend-mode: screen;\n animation: ccs-auraPulse 0.1s infinite alternate;\n }\n\n .ccs-shell-xy { transform: translateZ(calc(var(--ccs-size) / 2)); }\n .ccs-shell-yz { transform: translateZ(calc(var(--ccs-size) / 2)) rotateY(90deg); }\n .ccs-shell-xz { transform: translateZ(calc(var(--ccs-size) / 2)) rotateX(90deg); }\n\n @keyframes ccs-auraPulse {\n 0% { transform: translateZ(calc(var(--ccs-size) / 2)) scale(var(--ccs-flame-scale)); opacity: 0.7; }\n 100% { transform: translateZ(calc(var(--ccs-size) / 2)) scale(calc(var(--ccs-flame-scale) * 1.1)); opacity: 1; }\n }\n\n .ccs-plasma-glow {\n position: absolute;\n inset: -30%;\n background: radial-gradient(circle, var(--ccs-aura-color) 0%, transparent 80%);\n filter: blur(25px);\n transform: translateZ(calc(var(--ccs-size) / 2));\n opacity: 0.6;\n }\n\n .ccs-trail {\n position: absolute;\n width: 400px;\n height: var(--ccs-size);\n left: 50%;\n top: 0;\n transform-origin: left center;\n background: linear-gradient(90deg, var(--ccs-aura-color) 0%, transparent 100%);\n filter: blur(15px);\n transform: translateZ(calc(var(--ccs-size) / 2)) scaleX(var(--ccs-trail-scale));\n animation: ccs-trailWaver 0.15s infinite;\n }\n\n @keyframes ccs-trailWaver {\n 0% { opacity: 0.4; transform: translateZ(calc(var(--ccs-size) / 2)) scaleY(1); }\n 100% { opacity: 0.7; transform: translateZ(calc(var(--ccs-size) / 2)) scaleY(1.2); }\n }\n\n /* \u2500\u2500 Bottom vignette \u2500\u2500 */\n .ccs-vignette {\n position: absolute;\n inset: 0;\n pointer-events: none;\n background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.4) 100%);\n }\n"}),(0,p.jsxs)("div",{className:"ccs-camera",children:[(0,p.jsxs)("div",{className:"ccs-road-slab",children:[(0,p.jsx)("div",{className:"ccs-wall-front"}),(0,p.jsx)("div",{className:"ccs-wall-side"}),(0,p.jsxs)("div",{className:"ccs-road-surface",children:[(0,p.jsx)($e,{speed:e}),(0,p.jsx)("div",{className:"ccs-stripes"})]})]}),(0,p.jsxs)("div",{className:"ccs-cube-group",children:[(0,p.jsx)("div",{className:"ccs-shadow"}),(0,p.jsx)(qe,{flameOpacity:t}),(0,p.jsx)("div",{style:{transform:"scaleZ(-1)",transformStyle:"preserve-3d",position:"absolute",pointerEvents:"none"},children:(0,p.jsx)(He,{isReflection:!0}
2)}),(0,p.jsx)(He,{})]})]}),(0,p.jsx)("div",{className:"ccs-vignette"})]})})),Ke=r.memo((function(){return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:"absolute inset-0",style:{backgroundColor:"#04040e",willChange:"transform",contain:"layout style paint"},children:(0,p.jsx)(Ge,{})}),(0,p.jsx)("div",{className:"absolute inset-0 pointer-events-none z-10",style:{background:"linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.5) 100%)"}}),(0,p.jsx)(Pe,{label:"Build Faster, Ship Smarter",title:"Developer Velocity",description:"From prototype to production AI in minutes \u2014 typed SDKs, instant sandboxes, and one-click deployment pipelines designed for teams that ship",ctaText:"Explore Dev Tools",ctaUrl:"/products/neural-sdk"})]})}));var Qe=n(8558);const Ye=r.lazy((()=>Promise.all([n.e(3611),n.e(1557),n.e(4825),n.e(7959),n.e(9842)]).then(n.bind(n,2950)))),Xe=r.lazy((()=>Promise.all([n.e(3611),n.e(4041),n.e(2660),n.e(2834),n.e(1045),n.e(7917),n.e(1557),n.e(4825),n.e(616),n.e(9332)]).then(n.bind(n,9332)))),Je=r.lazy((()=>Promise.all([n.e(1045),n.e(616),n.e(7659)]).then(n.bind(n,7659)))),Ze=r.lazy((()=>Promise.all([n.e(3611),n.e(1045),n.e(1557),n.e(4825),n.e(616),n.e(7959),n.e(6227)]).then(n.bind(n,2063)))),et=r.lazy((()=>Promise.all([n.e(2834),n.e(9299)]).then(n.bind(n,9299)))),tt=r.lazy((()=>Promise.all([n.e(7210),n.e(6533)]).then(n.bind(n,6533)))),nt=r.lazy((()=>Promise.all([n.e(9408),n.e(9428)]).then(n.bind(n,9428)))),rt=r.lazy((()=>n.e(7029).then(n.bind(n,9410)))),it=r.lazy((()=>n.e(6023).then(n.bind(n,6023)))),st=r.lazy((()=>n.e(2747).then(n.bind(n,2747)))),ot=r.lazy((()=>n.e(813).then(n.bind(n,813)))),at=r.lazy((()=>n.e(4886).then(n.bind(n,2505)))),lt=r.lazy((()=>n.e(9607).then(n.bind(n,9607)))),ct=r.lazy((()=>n.e(109).then(n.bind(n,109)))),ut=r.lazy((()=>Promise.all([n.e(2834),n.e(9734),n.e(7430)]).then(n.bind(n,7430)))),ht=r.lazy((()=>Promise.all([n.e(2834),n.e(9734),n.e(9739)]).then(n.bind(n,9739)))),dt=r.lazy((()=>Promise.all([n.e(2834),n.e(9734),n.e(2364)]).then(n.bind(n,2364)))),ft=r.lazy((()=>n.e(7319).then(n.bind(n,7319)))),pt=r.lazy((()=>Promise.all([n.e(8873),n.e(9001)]).then(n.bind(n,9001)))),mt=r.lazy((()=>Promise.all([n.e(8873),n.e(3155)]).then(n.bind(n,3155)))),gt=r.lazy((()=>Promise.all([n.e(8873),n.e(79)]).then(n.bind(n,79)))),vt=r.lazy((()=>n.e(2904).then(n.bind(n,2904)))),yt=r.lazy((()=>Promise.all([n.e(2834),n.e(9734),n.e(9521)]).then(n.bind(n,9521)))),bt=r.lazy((()=>Promise.all([n.e(1045),n.e(2767)]).then(n.bind(n,2767)))),wt=r.lazy((()=>Promise.all([n.e(1045),n.e(3655)]).then(n.bind(n,3655)))),xt=r.lazy((()=>Promise.all([n.e(7917),n.e(6847),n.e(8108)]).then(n.bind(n,8108)))),St=r.lazy((()=>Promise.all([n.e(7917),n.e(6847),n.e(691)]).then(n.bind(n,691)))),Et=r.lazy((()=>Promise.all([n.e(7917),n.e(6847),n.e(9205)]).then(n.bind(n,9205)))),kt=r.lazy((()=>Promise.all([n.e(7917),n.e(6448)]).then(n.bind(n,6448)))),Tt=r.lazy((()=>Promise.all([n.e(6847),n.e(3666)]).then(n.bind(n,1285)))),_t=r.lazy((()=>Promise.all([n.e(8838),n.e(4825),n.e(3584)]).then(n.bind(n,3584)))),Ct=r.lazy((()=>Promise.all([n.e(2834),n.e(9734),n.e(8976),n.e(6936)]).then(n.bind(n,6936)))),At=r.lazy((()=>Promise.all([n.e(2834),n.e(9734),n.e(8976),n.e(2288)]).then(n.bind(n,2288)))),It=r.lazy((()=>Promise.all([n.e(2834),n.e(9734),n.e(7444)]).then(n.bind(n,7444)))),Pt=r.lazy((()=>Promise.all([n.e(2834),n.e(9734),n.e(1659)]).then(n.bind(n,1659)))),Nt=r.lazy((()=>Promise.all([n.e(2834),n.e(9734),n.e(7755)]).then(n.bind(n,7755)))),Rt=r.lazy((()=>Promise.all([n.e(2834),n.e(9734),n.e(6411)]).then(n.bind(n,8792)))),Dt=r.lazy((()=>Promise.all([n.e(2834),n.e(9734),n.e(7853)]).then(n.bind(n,7853)))),Ot=r.lazy((()=>Promise.all([n.e(2834),n.e(9734),n.e(7890)]).then(n.bind(n,7890)))),jt=r.lazy((()=>Promise.all([n.e(2834),n.e(9734),n.e(8845)]).then(n.bind(n,8845)))),Lt=r.lazy((()=>n.e(9632).then(n.bind(n,9632)))),Mt=r.lazy((()=>Promise.all([n.e(7210),n.e(6952)]).then(n.bind(n,6952)))),Ft=r.lazy((()=>n.e(747).then(n.bind(n,747)))),Ut=r.lazy((()=>n.e(1923).then(n.bind(n,1923)))),Vt=r.lazy((()=>n.e(6897).then(n.bind(n,6897)))),zt=r.lazy((()=>Promise.all([n.e(2834),n.e(8171)]).then(n.bind(n,8171)))),Bt=r.lazy((()=>Promise.all([n.e(2834),n.e(2978)]).then(n.bind(n,2978)))),$t=r.lazy((()=>n.e(8115).then(n.bind(n,8115)))),qt=r.lazy((()=>n.e(4647).then(n.bind(n,7028)))),Ht=r.lazy((()=>
2n.e(7816).then(n.bind(n,7816)))),Wt=r.lazy((()=>n.e(7002).then(n.bind(n,7002)))),Gt=r.lazy((()=>n.e(6259).then(n.bind(n,6259)))),Kt=r.lazy((()=>n.e(4602).then(n.bind(n,4602)))),Qt=()=>(0,p.jsx)("div",{style:{width:"100vw",height:"100vh",background:"rgba(28,28,28,0.98)",overflow:"hidden"},children:(0,p.jsx)(Mt,{standalone:!0})}),Yt=()=>(0,p.jsx)("div",{className:"bg-gray-50 min-h-screen",children:(0,p.jsx)(Bt,{})}),Xt=()=>(0,p.jsx)("div",{className:"bg-gray-50 min-h-screen",children:(0,p.jsx)($t,{})}),Jt=()=>{const e=(0,r.useRef)(null),[t,n]=(0,r.useState)(window.innerWidth);(0,r.useEffect)((()=>{const e=()=>n(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const i=t<768?140:230,s=t<768?250:400,{scrollYProgress:o}=(0,a.L)({target:e,offset:["start end","start center"]}),u=(0,l.G)(o,[0,.5],[400,i]);return(0,p.jsxs)("div",{ref:e,className:"relative",style:{marginTop:t<768?"10rem":"14rem",position:"relative"},id:"overview-container",children:[(0,p.jsx)(c.P.div,{className:"absolute w-full",style:{bottom:"100%",y:u},children:(0,p.jsx)("div",{className:"relative w-full flex justify-center",style:{transform:"translateX(0px)"},children:(0,p.jsx)("img",{src:y,alt:"Neuralward Logo",width:Math.round(.836*s),height:s,loading:"eager",style:{height:`${s}px`,aspectRatio:"156.2 / 186.8"}})})}),(0,p.jsx)(w,{bgColor:"#1e1e21",textColor:"#ffffff",children:(0,p.jsx)("div",{id:"overview",className:"max-w-7xl mx-auto px-4",children:(0,p.jsxs)("div",{className:"flex flex-col items-center justify-center gap-12 py-12",children:[(0,p.jsx)("h2",{className:"text-3xl md:text-4xl font-bold feature-highlight",children:"Company Overview"}),(0,p.jsx)("div",{className:"text-xl md:text-2xl leading-relaxed max-w-6xl text-center",children:"Neuralward develops and distributes advanced systems across various industries, integrating neural networks and AI-driven capabilities where they enhance efficiency and streamline decision-making. The mission is to deliver high-performance, intelligent, and scalable technologies for modern businesses and consumers."}),(0,p.jsx)("div",{className:"text-xl md:text-2xl leading-relaxed max-w-6xl text-center",children:"Focused on innovation, flexibility, and real-world impact, Neuralward bridges the gap between AI-powered advancements and practical, user-friendly solutions."})]})})})]})},Zt=()=>(0,p.jsxs)("div",{id:"features",children:[(0,p.jsx)(zt,{}),(0,p.jsxs)(j,{children:[(0,p.jsx)(S,{text:"Picture a world where intelligence flows seamlessly between human and machine. At Neuralward, we transform this vision into reality, creating solutions that elevate what's humanly possible.",highlightWords:["Neuralward","vision","reality"]}),(0,p.jsx)("div",{style:{width:"100%"},children:(0,p.jsxs)(O,{children:[(0,p.jsx)(Ee,{progress:75,label:"Innovation"}),(0,p.jsx)("div",{className:"relative inline-block",children:(0,p.jsx)(Ae,{imageSrc:"./sections_img/02.webp",altText:"Powered with AI Technology",chipText:"AI Powered",withEffect:Ce,bgColor:"#163241",mixBlendModes:["overlay","overlay"]})}),(0,p.jsx)(Te,{})]},"slider-one-time-mount")})]})]}),en=()=>(0,p.jsx)(Vt,{});function tn(){var e;const{isProcessingOAuth:t,user:n,userData:i}=(0,E.Jd)(),s=(0,o.zy)();(0,r.useEffect)((()=>{(0,P.ow)((null===n||void 0===n?void 0:n.email)||(null===n||void 0===n?void 0:n.uid))}),[n]),(0,r.useEffect)((()=>{I.Ay.notePage(s.pathname)}),[s.pathname]);const[a,l]=(0,r.useState)(window.innerHeight),[h,d]=(0,r.useState)(!1),[m,y]=(0,r.useState)((()=>!!window.__nw_introDone||"/"!==window.location.pathname)),[b,w]=(0,r.useState)((()=>!!window.__nw_introDone||"/"!==window.location.pathname)),[x,S]=(0,r.useState)(!1),[k,T]=(0,r.useState)((()=>!!window.__nw_introDone||"/"!==window.location.pathname));(0,r.useEffect)((()=>{if(x){const e=setTimeout((()=>{S(!1)}),1500);return()=>clearTimeout(e)}}),[x]);const _=(0,r.useRef)(!1);(0,r.useEffect)((()=>{if(window.__nw_introDone||"/"!==window.location.pathname)return void(_.current=!0);const e=setTimeout((()=>{_.current||(_.current=!0,window.__nw_introDone=!0,window.dispatchEvent(new CustomEvent("nw:introDone")),S(!0),y(!0),w(!0),T(!0))}),2500);return()=>clearTimeout(e)}),[]),(0,r.useEffect)((()=>{"/"===window.location.pathname||window.__nw_introDone||(window.__nw_introDone=!0,window.dispatchEvent(new CustomEvent("nw:introDone")),y(!0),w(!0),T(!0))}),[]),(0,r.useEffect)((()=>(b?(()=>{document.body.style.position="",document.body.style.width="",document.body.style.top="",document.body.style.overflow="",document.body.style.touchAction="";const e=document.body.style.top;window.scrollTo(0,-1*parseInt(e||"0"))})():(()=>{const e=window.scrollY;document.body.style.position="fixed",document.body.style.width="100%",document.body.style.top=`-${e}px`,document.body.style.overflow="hidden",document.body.style.touchAction="none"})(),()=>{document.body.style.position="",document.body.style.width="",document.body.style.top="",document.body.style.overflow="",document.body.style.touchAction=""})),[b]),(0,r.useEffect)((()=>{(0,f.s)((()=>I.Ay.initialize()));const e=I.Ay.onIpBanned((()=>d(!0)));return(0,P.Ay)(),()=>{e(),I.Ay.cleanup()}}),[]),(0,r.useEffect)((()=>{const e=I.Ay.addConnectionListener((e=>{console.log("Connection status changed:",e),"browser"===e.type&&(e.connected?console.log("\u2705 Back online - Firebase services restored"):console.log("\u26a0\ufe0f Gone offline - Using cached data"))}));return console.log("Initial connection status:",I.Ay.getConnectionStatus()),()=>{e()}}),[]);const C=[{id:1,content:(0,p.jsx)(Ne,{}),preloadImages:["./carousel_img/performancebg.webp","./carousel_img/performance.webp"]},{id:2,content:(0,p.jsx)(De,{}),preloadImages:["./carousel_img/operationsbg.webp","./carousel_img/operationsbg2.webp"]},{id:3,content:(0,p.jsx)(Ke,{}),preloadImages:["./carousel_img/devtoolsbg.webp","./carousel_img/devtools.webp"]},{id:4,content:(0,p.jsx)(Oe,{}),preloadImages:["./carousel_img/defensebg.webp","./carousel_img/defensebg2.webp","./carousel_img/shield.webp"]},{id:5,content:(0,p.jsx)(je,{}),preloadImages:["./carousel_img/autonomous_bg.webp","./carousel_img/autonomous.webp"]},{id:6,content:(0,p.jsx)(Ve,{}),preloadImages:["./carousel_img/adaptive.webp"]}],A=[{id:0,label:"",title:"",description:"",content:(0,p.jsx)(v,{}),isCustomContent:!0},...C];return(0,r.useEffect)((()=>{const e=()=>{l(window.innerHeight)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),(0,r.useEffect)((()=>{const e={"/overview":"overview","/services":"services","/features":"features","/future":"future","/appcenter":"appcenter"}[s.pathname];if(!e)return;const t={overview:116,services:84,features:84,future:84,appcenter:84};let n=!1;const r=Date.now()+6e3,i=()=>
2{if(n)return;const s=document.getElementById(e);if(!s)return void(Date.now()<r&&setTimeout(i,120));const o=s.getBoundingClientRect().top+window.pageYOffset,a=t[e]||84;window.scrollTo({top:o-a,behavior:"smooth"})},o=setTimeout(i,100);return()=>{n=!0,clearTimeout(o)}}),[s.pathname]),!h||null!==i&&void 0!==i&&null!==(e=i.permissions)&&void 0!==e&&e.isAdmin?t?(0,p.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:9999},children:[(0,p.jsx)(v,{}),(0,p.jsx)("style",{children:"\n @keyframes nw-spin { to { transform: rotate(360deg); } }\n @keyframes nw-pill-up {\n 0% { transform: translateY(40px); opacity: 0; }\n 100% { transform: translateY(0); opacity: 1; }\n }\n "}),(0,p.jsx)("div",{style:{position:"absolute",bottom:"10%",left:0,right:0,display:"flex",justifyContent:"center",pointerEvents:"none",opacity:0,animation:"nw-pill-up 0.5s ease-out 2.3s forwards"},children:(0,p.jsx)(Qe.A,{text:"Signing you in\u2026",theme:"dark"})})]}):(0,p.jsx)(r.Suspense,{fallback:null,children:(0,p.jsxs)(o.BV,{children:[(0,p.jsx)(o.qh,{path:"/chat",element:(0,p.jsx)(Qt,{})}),(0,p.jsx)(o.qh,{path:"/metrics-demo",element:(0,p.jsx)(Yt,{})}),(0,p.jsx)(o.qh,{path:"/bubble-demo",element:(0,p.jsx)(Xt,{})}),(0,p.jsx)(o.qh,{path:"/banned",element:(0,p.jsx)(N.default,{})}),(0,p.jsx)(o.qh,{path:"/admin",element:(0,p.jsx)(Xe,{})}),(0,p.jsx)(o.qh,{path:"/payment/paypal-success",element:(0,p.jsx)(qt,{})}),(0,p.jsx)(o.qh,{path:"/payment/paypal-cancel",element:(0,p.jsx)(Ht,{})}),(0,p.jsx)(o.qh,{path:"/payment/mercadopago-success",element:(0,p.jsx)(Wt,{})}),(0,p.jsx)(o.qh,{path:"/payment/mercadopago-failure",element:(0,p.jsx)(Gt,{})}),(0,p.jsx)(o.qh,{path:"/payment/mercadopago-pending",element:(0,p.jsx)(Kt,{})}),(0,p.jsx)(o.qh,{path:"/appcenter-store/*",element:(0,p.jsx)(Ye,{})}),(0,p.jsx)(o.qh,{path:"/checkout/:appId",element:(0,p.jsx)(bt,{})}),(0,p.jsx)(o.qh,{path:"/auth/app-login",element:(0,p.jsx)(wt,{})}),(0,p.jsx)(o.qh,{path:"/gift/:giftId",element:(0,p.jsx)(_t,{})}),(0,p.jsx)(o.qh,{path:"/my-licenses",element:(0,p.jsx)(Je,{})}),(0,p.jsx)(o.qh,{path:"/profile/*",element:(0,p.jsx)(Ze,{})}),(0,p.jsx)(o.qh,{path:"/tempbox",element:(0,p.jsx)("div",{style:{padding:"40px",background:"#171715",minHeight:"100vh"},children:(0,p.jsx)(nt,{})})}),(0,p.jsx)(o.qh,{path:"/solutions/:slug",element:(0,p.jsx)(et,{})}),(0,p.jsx)(o.qh,{path:"/industries/:slug",element:(0,p.jsx)(et,{})}),(0,p.jsx)(o.qh,{path:"/deployment/:slug",element:(0,p.jsx)(et,{})}),(0,p.jsx)(o.qh,{path:"/products/:slug",element:(0,p.jsx)(tt,{})}),(0,p.jsx)(o.qh,{path:"/resources/docs",element:(0,p.jsx)(ct,{})}),(0,p.jsx)(o.qh,{path:"/resources/docs/:id",element:(0,p.jsx)(mt,{})}),(0,p.jsx)(o.qh,{path:"/resources/blog",element:(0,p.jsx)(ht,{})}),(0,p.jsx)(o.qh,{path:"/resources/blog/:id",element:(0,p.jsx)(pt,{})}),(0,p.jsx)(o.qh,{path:"/resources/webinars",element:(0,p.jsx)(dt,{})}),(0,p.jsx)(o.qh,{path:"/insights/case-studies",element:(0,p.jsx)(ut,{})}),(0,p.jsx)(o.qh,{path:"/insights/case-studies/:id",element:(0,p.jsx)(gt,{})}),(0,p.jsx)(o.qh,{path:"/insights/ai-readiness",element:(0,p.jsx)(ft,{})}),(0,p.jsx)(o.qh,{path:"/resources/tutorials",element:(0,p.jsx)(Ct,{})}),(0,p.jsx)(o.qh,{path:"/resources/tutorials/:slug",element:(0,p.jsx)(At,{})}),(0,p.jsx)(o.qh,{path:"/support/knowledge-base",element:(0,p.jsx)(It,{})}),(0,p.jsx)(o.qh,{path:"/support/forum",element:(0,p.jsx)(Pt,{})}),(0,p.jsx)(o.qh,{path:"/support/technical",element:(0,p.jsx)(Nt,{})}),(0,p.jsx)(o.qh,{path:"/support/status",element:(0,p.jsx)(Rt,{})}),(0,p.jsx)(o.qh,{path:"/insights/white-papers",element:(0,p.jsx)(Dt,{})}),(0,p.jsx)(o.qh,{path:"/insights/reports",element:(0,p.jsx)(Ot,{})}),(0,p.jsx)(o.qh,{path:"/insights/roi-calculator",element:(0,p.jsx)(jt,{})}),(0,p.jsx)(o.qh,{path:"/demo",element:(0,p.jsx)(o.C5,{to:"/get-started/services",replace:!0})}),(0,p.jsx)(o.qh,{path:"/get-started",element:(0,p.jsx)(xt,{})}),(0,p.jsx)(o.qh,{path:"/get-started/services",element:(0,p.jsx)(St,{})}),(0,p.jsx)(o.qh,{path:"/get-started/developer",element:(0,p.jsx)(Et,{})}),(0,p.jsx)(o.qh,{path:"/developers",element:(0,p.jsx)(kt,{})}),(0,p.jsx)(o.qh,{path:"/join/:token",element:(0,p.jsx)(Tt,{})}),(0,p.jsx)(o.qh,{path:"/company/about",element:(0,p.jsx)(vt,{})}),(0,p.jsx)(o.qh,{path:"/company/careers",element:(0,p.jsx)(yt,{})}),(0,p.jsx)(o.qh,{path:"/privacy",element:(0,p.jsx)(rt,{})}),(0,p.jsx)(o.qh,{path:"/cookie-policy",element:(0,p.jsx)(it,{})}),(0,p.jsx)(o.qh,{path:"/refund-policy",element:(0,p.jsx)(st,{})}),(0,p.jsx)(o.qh,{path:"/ai-ethics",element:(0,p.jsx)(ot,{})}),(0,p.jsx)(o.qh,{path:"/legal",element:(0,p.jsx)(at,{})}),(0,p.jsx)(o.qh,{path:"/accessibility",element:(0,p.jsx)(lt,{})}),(0,p.jsx)(o.qh,{path:"*",element:(0,p.jsxs)("div",{className:"font-sans bg-gray-50 min-h-screen relative overflow-x-hidden",children:[m&&(0,p.jsx)(c.P.div,{initial:{y:x?-100:0},animate:{y:0},transition:{type:"spring",stiffness:300,damping:20,mass:1},className:"fixed w-full",style:{zIndex:101},children:(0,p.jsx)(u.A,{})}),(0,p.jsxs)("main",{className:"pt-18 relative overflow-x-hidden",children:[(0,p.jsx)("h1",{className:"sr-only",children:"Neuralward | AI-Powered
2Enterprise Solutions & Machine Intelligence Architecture"}),(0,p.jsxs)("div",{className:"relative w-full overflow-hidden",style:{height:`${a}px`,minHeight:"300px"},children:[(0,p.jsx)("div",{className:"absolute w-full h-full bg-[#1e1e21] overflow-hidden"}),(0,p.jsx)("div",{className:"absolute top-0 left-0 w-full h-full",children:(0,p.jsx)(c.P.div,{initial:{opacity:1,y:0},animate:{opacity:1,y:0},transition:{duration:.5,ease:"easeOut"},className:"w-full h-full",style:{x:0,y:0},children:(0,p.jsx)(g,{slides:A,heroHeight:a,initialSlide:0,skipIntro:k,introComplete:k})},"persistent-carousel")})]}),(0,p.jsx)(Jt,{}),(0,p.jsxs)(r.Suspense,{fallback:(0,p.jsx)("div",{className:"h-96 bg-[#1e1e21]/50"}),children:[(0,p.jsx)(Ut,{}),(0,p.jsx)(Zt,{}),(0,p.jsx)(en,{}),(0,p.jsx)(Ft,{})]}),(0,p.jsxs)(o.BV,{children:[(0,p.jsx)(o.qh,{path:"/",element:null}),(0,p.jsx)(o.qh,{path:"/overview",element:null}),(0,p.jsx)(o.qh,{path:"/services",element:null}),(0,p.jsx)(o.qh,{path:"/features",element:null}),(0,p.jsx)(o.qh,{path:"/future",element:null}),(0,p.jsx)(o.qh,{path:"/appcenter",element:null}),(0,p.jsx)(o.qh,{path:"*",element:(0,p.jsx)(o.C5,{to:"/",replace:!0})})]})]}),(0,p.jsx)(r.Suspense,{fallback:(0,p.jsx)("div",{className:"h-64 bg-[#111113]"}),children:(0,p.jsx)(Lt,{})}),(0,p.jsx)(R,{isIntroFinished:b})]})})]})}):(0,p.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:9999,background:"#0a0a12",color:"#fff",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",padding:"2rem",fontFamily:"system-ui, sans-serif"},children:[(0,p.jsx)("h1",{style:{fontSize:"1.5rem",fontWeight:600,marginBottom:".75rem"},children:"Access restricted"}),(0,p.jsxs)("p",{style:{color:"rgba(255,255,255,.6)",maxWidth:"28rem",lineHeight:1.6},children:["Your connection has been blocked from this portal. If you believe this is a mistake, contact"," ",(0,p.jsx)("a",{href:"mailto:[email protected]",style:{color:"#f472b6"},children:"[email protected]"}),"."]})]})}function nn(){const{pathname:e}=(0,o.zy)(),t=(0,r.useRef)(e);return(0,r.useEffect)((()=>{const n=["/","/overview","/services","/features","/future","/appcenter"];n.includes(t.current)&&n.includes(e)||window.scrollTo({top:0,left:0,behavior:"instant"}),t.current=e}),[e]),null}function rn(){return(0,p.jsx)(E.vu,{children:(0,p.jsx)(_,{children:(0,p.jsx)(Ie,{children:(0,p.jsxs)(o.Kd,{children:[(0,p.jsx)(nn,{}),(0,p.jsx)(A,{}),(0,p.jsx)(r.Suspense,{fallback:null,children:(0,p.jsx)(Mt,{})}),(0,p.jsx)(tn,{})]})})})})}i.createRoot(document.getElementById("root")).render((0,p.jsx)(r.StrictMode,{children:(0,p.jsx)(s.vd,{children:(0,p.jsx)(rn,{})})}))})()})(); 3//# sourceMappingURL=main.fa795440.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.