PageSourceSearch

https://www.trybased.com/static/js/main.259f74ee.js

js trybased.com collected 2026-10-02 01:46:52 UTC 783,554 bytes, 3 lines download raw bytes

1/*! For license information please see main.259f74ee.js.LICENSE.txt */
2(()=>{"use strict";var e={1862(e,t,n){n.d(t,{Ay:()=>ze,gg:()=>o.g,v4:()=>je});var r=n(5544),i=n(65043),o=n(73651),a=n(87183),s=n(47874),l=n(89379);function c(){return"development"===function(){try{const e="production";if("development"===e||"test"===e)return"development"}catch(e){}return"production"}()}function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;if("undefined"===typeof window||null===e.route)return null;window.si||(window.si=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];(window.siq=window.siq||[]).push(t)});const n=function(e){return e.scriptSrc?e.scriptSrc:c()?"https://va.vercel-scripts.com/v1/speed-insights/script.debug.js":e.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":e.basePath?"".concat(e.basePath,"/speed-insights/script.js"):"/_vercel/speed-insights/script.js"}(e);if(document.head.querySelector('script[src*="'.concat(n,'"]')))return null;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend));const r=document.createElement("script");return r.src=n,r.defer=!0,r.dataset.sdkn="@vercel/speed-insights"+(e.framework?"/".concat(e.framework):""),r.dataset.sdkv="1.3.1",e.sampleRate&&(r.dataset.sampleRate=e.sampleRate.toString()),e.route&&(r.dataset.route=e.route),e.endpoint?r.dataset.endpoint=e.endpoint:e.basePath&&(r.dataset.endpoint="".concat(e.basePath,"/speed-insights/vitals")),e.dsn&&(r.dataset.dsn=e.dsn),c()&&!1===e.debug&&(r.dataset.debug="false"),r.onerror=()=>{console.log("[Vercel Speed Insights] Failed to load script from ".concat(n,". Please check if any content blockers are enabled and try again."))},document.head.appendChild(r),{setRoute:e=>{r.dataset.route=null!==e&&void 0!==e?e:void 0}}}function d(){if("undefined"!==typeof process)return{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_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Gary Riger",REACT_APP_VERCEL_GIT_PROVIDER:"github",REACT_APP_VERCEL_PROJECT_ID:"prj_A5c8ZMv75ibxQVceA3I7GjPny9oD",REACT_APP_VERCEL_GIT_PULL_REQUEST_ID:"",REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG:'{"analytics":{"scriptSrc":"8f81e36d25c71756/script.js","viewEndpoint":"8f81e36d25c71756/view","eventEndpoint":"8f81e36d25c71756/event","sessionEndpoint":"8f81e36d25c71756/session"},"speedInsights":{"scriptSrc":"1e9f61cb490e195d/script.js","endpoint":"1e9f61cb490e195d/vitals"}}',REACT_APP_VERCEL_BRANCH_URL:"based-git-main-trybased.vercel.app",REACT_APP_VERCEL_GIT_COMMIT_MESSAGE:'feat: enhance mascot URL handling and redirection\n\n- Added redirects for mascot custom domains to serve links at `/{id}` instead of `/mascot/{id}`.\n- Updated the canonical URL generation in the mascot API to accommodate custom hostnames.\n- Introduced utility functions to determine mascot link paths and identify "Mascot says" links.\n- Adjusted various components and tests to reflect the new URL structure and ensure proper handling of mascot links.\n\nThis update improves the user experience for mascot domain visitors and streamlines the sharing process for mascot-related content.',REACT_APP_VERCEL_DEPLOYMENT_ID:"dpl_6FrDCtvXefHewS7qWdFGdtdrWfow",REACT_APP_VERCEL_GIT_REPO_SLUG:"knowledge-base-saas",REACT_APP_VERCEL_TARGET_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_SHA:"bb4db2da80ad880ce8eb95828efa1bf5f6feeb22",REACT_APP_VERCEL_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_REF:"main",REACT_APP_VERCEL_URL:"based-acjo68u8l-trybased.vercel.app",REACT_APP_VERCEL_PROJECT_PRODUCTION_URL:"www.trybased.com",REACT_APP_VERCEL_GIT_PREVIOUS_SHA:"",REACT_APP_VERCEL_GIT_REPO_ID:"980833582",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"grigerny",REACT_APP_VERCEL_GIT_REPO_OWNER:"grigerny"}.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function h(e){(0,i.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);const t=(0,i.useRef)(null);return(0,i.useEffect)(()=>{if(t.current)e.route&&t.current(e.route);else{var n,r;const i=u((0,l.A)({framework:null!==(n=e.framework)&&void 0!==n?n:"react",basePath:null!==(r=e.basePath)&&void 0!==r?r:d()},e));i&&(t.current=i.setRoute)}},[e.route]),null}
2var f=n(96060),p=n(53986);function m(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=m(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const g=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=m(e))&&(r&&(r+=" "),r+=t);return r},y=["theme","type","isLoading"];!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}(':root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}
2.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}
2}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n');var v=e=>"number"==typeof e&&!isNaN(e),b=e=>"string"==typeof e,w=e=>"function"==typeof e,_=e=>b(e)||w(e)?e:null,E=(e,t)=>!1===e||v(e)&&e>0?e:t,T=e=>(0,i.isValidElement)(e)||b(e)||w(e)||v(e);function S(e){let t=e.enter,n=e.exit,r=e.appendPosition,o=void 0!==r&&r,a=e.collapse,s=void 0===a||a,l=e.collapseDuration,c=void 0===l?300:l;return function(e){let r=e.children,a=e.position,l=e.preventExitTransition,u=e.done,d=e.nodeRef,h=e.isIn,f=e.playToast,p=o?"".concat(t,"--").concat(a):t,m=o?"".concat(n,"--").concat(a):n,g=(0,i.useRef)(0);return(0,i.useLayoutEffect)(()=>{let e=d.current,t=p.split(" "),n=r=>{r.target===d.current&&(f(),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===g.current&&"animationcancel"!==r.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)},[]),(0,i.useEffect)(()=>{let e=d.current,t=()=>{e.removeEventListener("animationend",t),s?function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=e.scrollHeight,i=e.style;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition="all ".concat(n,"ms"),requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}(e,u,c):u()};h||(l?t():(g.current=1,e.className+=" ".concat(m),e.addEventListener("animationend",t)))},[h]),i.createElement(i.Fragment,null,r)}}function k(e,t){return{content:C(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function C(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,i.isValidElement)(e)&&!b(e.type)?(0,i.cloneElement)(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):w(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:n}):e}function I(e){let t=e.delay,n=e.isRunning,r=e.closeToast,o=e.type,a=void 0===o?"default":o,s=e.hide,c=e.className,u=e.controlledProgress,d=e.progress,h=e.rtl,f=e.isIn,p=e.theme,m=s||u&&0===d,y={animationDuration:"".concat(t,"ms"),animationPlayState:n?"running":"paused"};u&&(y.transform="scaleX(".concat(d,")"));let v=g("Toastify__progress-bar",u?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--".concat(p),"Toastify__progress-bar--".concat(a),{"Toastify__progress-bar--rtl":h}),b=w(c)?c({rtl:h,type:a,defaultClassName:v}):g(v,c),_={[u&&d>=1?"onTransitionEnd":"onAnimationEnd"]:u&&d<1?null:()=>{f&&r()}};return i.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":m},i.createElement("div",{className:"Toastify__progress-bar--bg Toastify__progress-bar-theme--".concat(p," Toastify__progress-bar--").concat(a)}),i.createElement("div",(0,l.A)({role:"progressbar","aria-hidden":m?"true":"false","aria-label":"notification timer",className:b,style:y},_)))}var A=1,R=()=>"".concat(A++);function P(e,t,n){let i=1,o=0,a=[],s=[],c=t,u=new Map,d=new Set,h=()=>
2{s=Array.from(u.values()),d.forEach(e=>e())},f=e=>{var t,n;null==(n=null==(t=e.props)?void 0:t.onClose)||n.call(t,e.removalReason),e.isActive=!1},p=e=>{if(null==e)u.forEach(f);else{let t=u.get(e);t&&f(t)}h()},m=e=>{var t,r;let i=e.props,o=i.toastId,a=null==i.updateId;e.staleId&&u.delete(e.staleId),e.isActive=!0,u.set(o,e),h(),n(k(e,a?"added":"updated")),a&&(null==(r=(t=e.props).onOpen)||r.call(t))};return{id:e,props:c,observe:e=>(d.add(e),()=>d.delete(e)),toggle:(e,t)=>{u.forEach(n=>{var r;(null==t||t===n.props.toastId)&&(null==(r=n.toggle)||r.call(n,e))})},removeToast:p,toasts:u,clearQueue:()=>{o-=a.length,a=[]},buildToast:(t,s)=>{if((t=>{let n=t.containerId,r=t.toastId,i=t.updateId,o=n?n!==e:1!==e,a=u.has(r)&&null==i;return o||a})(s))return;let d=s.toastId,f=s.updateId,g=s.data,y=s.staleId,b=s.delay,w=null==f;w&&o++;let S=(0,l.A)((0,l.A)((0,l.A)({},c),{},{style:c.toastStyle,key:i++},Object.fromEntries(Object.entries(s).filter(e=>{let t=(0,r.A)(e,2);t[0];return null!=t[1]}))),{},{toastId:d,updateId:f,data:g,isIn:!1,className:_(s.className||c.toastClassName),progressClassName:_(s.progressClassName||c.progressClassName),autoClose:!s.isLoading&&E(s.autoClose,c.autoClose),closeToast(e){u.get(d).removalReason=e,p(d)},deleteToast(){let e=u.get(d);if(null!=e){if(n(k(e,"removed")),u.delete(d),o--,o<0&&(o=0),a.length>0)return void m(a.shift());h()}}});S.closeButton=c.closeButton,!1===s.closeButton||T(s.closeButton)?S.closeButton=s.closeButton:!0===s.closeButton&&(S.closeButton=!T(c.closeButton)||c.closeButton);let C={content:t,props:S,staleId:y};c.limit&&c.limit>0&&o>c.limit&&w?a.push(C):v(b)?setTimeout(()=>{m(C)},b):m(C)},setProps(e){c=e},setToggle:(e,t)=>{let n=u.get(e);n&&(n.toggle=t)},isToastActive:e=>{var t;return null==(t=u.get(e))?void 0:t.isActive},getSnapshot:()=>s}}var N=new Map,O=[],x=new Set,L=e=>x.forEach(t=>t(e)),D=()=>N.size>0;function M(e,t){var n;if(t)return!(null==(n=N.get(t))||!n.isToastActive(e));let r=!1;return N.forEach(t=>{t.isToastActive(e)&&(r=!0)}),r}function U(e){if(D()){if(null==e||(e=>b(e)||v(e))(e))N.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=N.get(e.containerId);t?t.removeToast(e.id):N.forEach(t=>{t.removeToast(e.id)})}}else O=O.filter(t=>null!=e&&t.options.toastId!==e)}function F(e,t){T(e)&&(D()||O.push({content:e,options:t}),N.forEach(n=>{n.buildToast(e,t)}))}function V(e,t){N.forEach(n=>{(null==t||null==t||!t.containerId||(null==t?void 0:t.containerId)===n.id)&&n.toggle(e,null==t?void 0:t.id)})}function j(e){let t=e.containerId||1;return{subscribe(n){let r=P(t,e,L);N.set(t,r);let i=r.observe(n);return O.forEach(e=>F(e.content,e.options)),O=[],()=>{i(),N.delete(t)}},setProps(e){var n;null==(n=N.get(t))||n.setProps(e)},getSnapshot(){var e;return null==(e=N.get(t))?void 0:e.getSnapshot()}}}function z(e){return e&&(b(e.toastId)||v(e.toastId))?e.toastId:R()}function B(e,t){return F(e,t),t.toastId}function q(e,t){return(0,l.A)((0,l.A)({},t),{},{type:t&&t.type||e,toastId:z(t)})}function H(e){return(t,n)=>B(t,q(e,n))}function W(e,t){return B(e,q("default",t))}function G(e){let t=(0,i.useState)(!1),n=(0,r.A)(t,2),o=n[0],a=n[1],s=(0,i.useState)(!1),l=(0,r.A)(s,2),c=l[0],u=l[1],d=(0,i.useRef)(null),h=(0,i.useRef)({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,f=e.autoClose,p=e.pauseOnHover,m=e.closeToast,g=e.onClick,y=e.closeOnClick;function v(){a(!0)}function b(){a(!1)}function w(t){let n=d.current;if(h.canDrag&&n){h.didMove=!0,o&&b(),"x"===e.draggableDirection?h.delta=t.clientX-h.start:h.delta=t.clientY-h.start,h.start!==t.clientX&&(h.canCloseOnClick=!1);let r="x"===e.draggableDirection?"".concat(h.delta,"px, var(--y)"):"0, calc(".concat(h.delta,"px + var(--y))");n.style.transform="translate3d(".concat(r,",0)"),n.style.opacity="".concat(1-Math.abs(h.delta/h.removalDistance))}}function _(){document.removeEventListener("pointermove",w),document.removeEventListener("pointerup",_);let t=d.current;if(h.canDrag&&h.didMove&&t){if(h.canDrag=!1,Math.abs(h.delta)>h.removalDistance)return u(!0),e.closeToast(!0),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}(function(e){var t;null==(t=N.get(e.containerId||1))||t.setToggle(e.id,e.fn)})({id:e.toastId,containerId:e.containerId,fn:a}),(0,i.useEffect)(()=>
2{if(e.pauseOnFocusLoss)return document.hasFocus()||b(),window.addEventListener("focus",v),window.addEventListener("blur",b),()=>{window.removeEventListener("focus",v),window.removeEventListener("blur",b)}},[e.pauseOnFocusLoss]);let E={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){h.didMove=!1,document.addEventListener("pointermove",w),document.addEventListener("pointerup",_);let n=d.current;h.canCloseOnClick=!0,h.canDrag=!0,n.style.transition="none","x"===e.draggableDirection?(h.start=t.clientX,h.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(h.start=t.clientY,h.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){let n=d.current.getBoundingClientRect(),r=n.top,i=n.bottom,o=n.left,a=n.right;"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&t.clientX>=o&&t.clientX<=a&&t.clientY>=r&&t.clientY<=i?b():v()}};return f&&p&&(E.onMouseEnter=b,e.stacked||(E.onMouseLeave=v)),y&&(E.onClick=e=>{g&&g(e),h.canCloseOnClick&&m(!0)}),{playToast:v,pauseToast:b,isRunning:o,preventExitTransition:c,toastRef:d,eventHandlers:E}}W.loading=(e,t)=>
2B(e,q("default",(0,l.A)({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},t))),W.promise=function(e,t,n){let r,i=t.pending,o=t.error,a=t.success;i&&(r=b(i)?W.loading(i,n):W.loading(i.render,(0,l.A)((0,l.A)({},n),i)));let s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(e,t,i)=>{if(null==t)return void W.dismiss(r);let o=(0,l.A)((0,l.A)((0,l.A)({type:e},s),n),{},{data:i}),a=b(t)?{render:t}:t;return r?W.update(r,(0,l.A)((0,l.A)({},o),a)):W(a.render,(0,l.A)((0,l.A)({},o),a)),i},u=w(e)?e():e;return u.then(e=>c("success",a,e)).catch(e=>c("error",o,e)),u},W.success=H("success"),W.info=H("info"),W.error=H("error"),W.warning=H("warning"),W.warn=W.warning,W.dark=(e,t)=>B(e,q("default",(0,l.A)({theme:"dark"},t))),W.dismiss=function(e){U(e)},W.clearWaitingQueue=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};N.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})},W.isActive=M,W.update=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=((e,t)=>{let n=t.containerId;var r;return null==(r=N.get(n||1))?void 0:r.toasts.get(e)})(e,t);if(n){let r=n.props,i=n.content,o=(0,l.A)((0,l.A)((0,l.A)({delay:100},r),t),{},{toastId:t.toastId||e,updateId:R()});o.toastId!==e&&(o.staleId=e);let a=o.render||i;delete o.render,B(a,o)}},W.done=e=>{W.update(e,{progress:1})},W.onChange=function(e){return x.add(e),()=>{x.delete(e)}},W.play=e=>V(!0,e),W.pause=e=>V(!1,e);var K="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,Q=e=>{let t=e.theme,n=e.type,r=(e.isLoading,(0,p.A)(e,y));return i.createElement("svg",(0,l.A)({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":"var(--toastify-icon-color-".concat(n,")")},r))};var $={info:function(e){return i.createElement(Q,(0,l.A)({},e),i.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return i.createElement(Q,(0,l.A)({},e),i.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return i.createElement(Q,(0,l.A)({},e),i.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return i.createElement(Q,(0,l.A)({},e),i.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return i.createElement("div",{className:"Toastify__spinner"})}};function Y(e){let t=e.theme,n=e.type,r=e.isLoading,o=e.icon,a=null,s={theme:t,type:n};return!1===o||(w(o)?a=o((0,l.A)((0,l.A)({},s),{},{isLoading:r})):(0,i.isValidElement)(o)?a=(0,i.cloneElement)(o,s):r?a=$.spinner():(e=>e in $)(n)&&(a=$[n](s))),a}var X=e=>{let t=G(e),n=t.isRunning,r=t.preventExitTransition,o=t.toastRef,a=t.eventHandlers,s=t.playToast,c=e.closeButton,u=e.children,d=e.autoClose,h=e.onClick,f=e.type,p=e.hideProgressBar,m=e.closeToast,y=e.transition,v=e.position,b=e.className,_=e.style,E=e.progressClassName,T=e.updateId,S=e.role,k=e.progress,A=e.rtl,R=e.toastId,P=e.deleteToast,N=e.isIn,O=e.isLoading,x=e.closeOnClick,L=e.theme,D=e.ariaLabel,M=g("Toastify__toast","Toastify__toast-theme--".concat(L),"Toastify__toast--".concat(f),{"Toastify__toast--rtl":A},{"Toastify__toast--close-on-click":x}),U=w(b)?b({rtl:A,position:v,type:f,defaultClassName:M}):g(M,b),F=Y(e),V=!!k||!d,j={closeToast:m,type:f,theme:L},z=null;return!1===c||(z=w(c)?c(j):(0,i.isValidElement)(c)?(0,i.cloneElement)(c,j):function(e){let t=e.closeToast,n=e.theme,r=e.ariaLabel,o=void 0===r?"close":r;return i.createElement("button",{className:"Toastify__close-button Toastify__close-button--".concat(n),type:"button",onClick:e=>{e.stopPropagation(),t(!0)},"aria-label":o},i.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},i.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(j)),i.createElement(y,{isIn:N,done:P,position:v,preventExitTransition:r,nodeRef:o,playToast:s},i.createElement("div",(0,l.A)((0,l.A)({id:R,tabIndex:0,onClick:h,"data-in":N,className:U},a),{},{style:_,ref:o},N&&{role:S,"aria-label":D}),null!=F&&i.createElement("div",{className:g("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter"
2:!O})},F),C(u,e,!n),z,!e.customProgressBar&&i.createElement(I,(0,l.A)((0,l.A)({},T&&!V?{key:"p-".concat(T)}:{}),{},{rtl:A,theme:L,delay:d,isRunning:n,isIn:N,closeToast:m,hide:p,type:f,className:E,controlledProgress:V,progress:k||0}))))},J=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{enter:"Toastify--animate Toastify__".concat(e,"-enter"),exit:"Toastify--animate Toastify__".concat(e,"-exit"),appendPosition:t}},Z=S(J("bounce",!0)),ee=(S(J("slide",!0)),S(J("zoom")),S(J("flip")),{position:"top-right",transition:Z,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&"KeyT"===e.code});function te(e){let t=(0,l.A)((0,l.A)({},ee),e),n=e.stacked,o=(0,i.useState)(!0),a=(0,r.A)(o,2),s=a[0],c=a[1],u=(0,i.useRef)(null),d=function(e){var t;let n=(0,i.useRef)(j(e)).current,r=n.subscribe,o=n.getSnapshot;(0,n.setProps)(e);let a=null==(t=(0,i.useSyncExternalStore)(r,o,o))?void 0:t.slice();return{getToastToRender:function(t){if(!a)return[];let n=new Map;return e.newestOnTop&&a.reverse(),a.forEach(e=>{let t=e.props.position;n.has(t)||n.set(t,[]),n.get(t).push(e)}),Array.from(n,e=>t(e[0],e[1]))},isToastActive:M,count:null==a?void 0:a.length}}(t),h=d.getToastToRender,f=d.isToastActive,p=d.count,m=t.className,y=t.style,v=t.rtl,b=t.containerId,E=t.hotKeys;function T(e){let t=g("Toastify__toast-container","Toastify__toast-container--".concat(e),{"Toastify__toast-container--rtl":v});return w(m)?m({position:e,rtl:v,defaultClassName:t}):g(t,_(m))}function S(){n&&(c(!0),W.play())}return K(()=>{var e;if(n){let n=u.current.querySelectorAll('[data-in="true"]'),r=12,i=null==(e=t.position)?void 0:e.includes("top"),o=0,a=0;Array.from(n).reverse().forEach((e,t)=>{let n=e;n.classList.add("Toastify__toast--stacked"),t>0&&(n.dataset.collapsed="".concat(s)),n.dataset.pos||(n.dataset.pos=i?"top":"bot");let l=o*(s?.2:1)+(s?0:r*t);n.style.setProperty("--y","".concat(i?l:-1*l,"px")),n.style.setProperty("--g","".concat(r)),n.style.setProperty("--s","".concat(1-(s?a:0))),o+=n.offsetHeight,a+=.025})}},[s,p,n]),(0,i.useEffect)(()=>{function e(e){var t;let n=u.current;E(e)&&(null==(t=n.querySelector('[tabIndex="0"]'))||t.focus(),c(!1),W.pause()),"Escape"===e.key&&(document.activeElement===n||null!=n&&n.contains(document.activeElement))&&(c(!0),W.play())}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[E]),i.createElement("section",{ref:u,className:"Toastify",id:b,onMouseEnter:()=>{n&&(c(!1),W.pause())},onMouseLeave:S,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":t["aria-label"]},h((e,t)=>{let r=t.length?(0,l.A)({},y):(0,l.A)((0,l.A)({},y),{},{pointerEvents:"none"});return i.createElement("div",{tabIndex:-1,className:T(e),"data-stacked":n,style:r,key:"c-".concat(e)},t.map(e=>{let t=e.content,r=e.props;return i.createElement(X,(0,l.A)((0,l.A)({},r),{},{stacked:n,collapseAll:S,isIn:f(r.toastId,r.containerId),key:"t-".concat(r.key)}),t)}))}))}var ne=n(92339),re=n(66630),ie=n(80813),oe=n(77274),ae=(n(96822),n(42773)),se=n(70579);const le=(0,i.lazy)(()=>Promise.all([n.e(7077),n.e(5212),n.e(5800),n.e(4994),n.e(2945),n.e(230),n.e(3075),n.e(2256)]).then(n.bind(n,42256))),ce=(0,i.lazy)(()=>n.e(4140).then(n.bind(n,44140))),ue=(0,i.lazy)(()=>Promise.all([n.e(8706),n.e(5607),n.e(9219),n.e(5212),n.e(1062),n.e(3516),n.e(74),n.e(4533)]).then(n.bind(n,86150))),de=(0,i.lazy)(()=>n.e(9317).then(n.bind(n,99317))),he=(0,i.lazy)(()=>n.e(5287).then(n.bind(n,95287))),fe=(0,i.lazy)(()=>Promise.all([n.e(8279),n.e(2395)]).then(n.bind(n,32395))),pe=(0,i.lazy)(()=>Promise.all([n.e(8279),n.e(2907)]).then(n.bind(n,22907))),me=(0,i.lazy)(()=>Promise.all([n.e(8279),n.e(333)]).then(n.bind(n,80333))),ge=(0,i.lazy)(()=>Promise.all([n.e(129),n.e(8041),n.e(7077),n.e(5212),n.e(8366),n.e(8968),n.e(2212),n.e(5800),n.e(4994),n.e(2945),n.e(5702),n.e(230),n.e(4373)]).then(n.bind(n,54373))),ye=(0,i.lazy)(()=>n.e(9912).then(n.bind(n,19912))),ve=(0,i.lazy)(()=>Promise.all([n.e(7077),n.e(5607),n.e(5212),n.e(5800),n.e(4994),n.e(8401)]).then(n.bind(n,28401))),be=(0,i.lazy)(()=>Promise.all([n.e(8279),n.e(5565)]).then(n.bind(n,25565))),we=(0,i.lazy)(()=>Promise.all([n.e(8279),n.e(9374)]).then(n.bind(n,99374))),_e=(0,i.lazy)(()=>n.e(4964).then(n.bind(n,54964))),Ee=(0,i.lazy)(()=>n.e(1105).then(n.bind(n,71105))),Te=(0,i.lazy)(()=>n.e(5845).then(n.bind(n,85845))),Se=(0,i.lazy)(()=>Promise.all([n.e(150),n.e(2022)]).then(n.bind(n,60150))),ke=(0,i.lazy)(()=>Promise.all([n.e(8279),n.e(129),n.e(8041),n.e(6396),n.e(8366),n.e(8968),n.e(2212),n.e(6540),n.e(1852)]).then(n.bind(n,924))),Ce=(0,i.lazy)(()=>Promise.all([n.e(8279),n.e(129),n.e(8041),n.e(6396),n.e(8366),n.e(8968),n.e(2212),n.e(6540),n.e(7264)]).then(n.bind(n,47040))),Ie=(0,i.lazy)(()=>n.e(4597).then(n.bind(n,24597))),Ae=(0,i.lazy)(()=>Promise.all([n.e(8279),n.e(9775)]).then(n.bind(n,69775))),Re=(0,i.lazy)(()=>n.e(4222).then(n.bind(n,44222))),Pe=(0,i.lazy)(()=>Promise.all([n.e(129),n.e(8041),n.e(6396),n.e(8366),n.e(8968),n.e(2212),n.e(6540),n.e(8079)]).then(n.bind(n,37))),Ne=(0,i.lazy)(()=>Promise.all([n.e(5212),n.e(8973)]).then(n.bind(n,78973))),Oe=(0,i.lazy)(()=>Promise.all([n.e(8706),n.e(5212),n.e(1062),n.e(3516),n.e(2096)]).then(n.bind(n,179))),xe=(0,i.lazy)(()=>n.e(3074).then(n.bind(n,63074))),Le=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function De(){const e=(0,s.g)().kbId;return(0,ae.In)()&&Le.test(e||"")?(0,se.jsx)(ve,{}):null}function Me(){const e=(0,s.g)().kbId,t=(0,s.zy)();return(0,ae.In)()&&Le.test(e||"")?(0,se.jsx)(s.C5,{to:"/".concat(e).concat(t.search).concat(t.hash),replace:!0}):(0,se.jsx)(ve,{})}function Ue(){return"undefined"!==typeof window&&(0,ae.Ce)()?(0,se.jsx)(xe,{}):(0,se.jsx)(le,{})}function Fe(){return(0,i.useEffect)(()=>
2{if(!(0,ae.Ce)())return;const e=window.location.pathname+window.location.search+window.location.hash;window.location.replace("https://trybased.com".concat(e))},[]),(0,ae.Ce)()?(0,se.jsx)(re.aZ,{}):(0,se.jsx)(ce,{})}"undefined"!==typeof window&&(window.deriveKeyFromCredential=f.k5,window.decryptText=f.PV);function Ve(){const e=(0,s.g)().workspaceId;return(0,se.jsx)("div",{className:"h-screen min-h-0",children:(0,se.jsx)(Se,{workspaceId:e})})}const je=function(){const e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),t=(new Date).toISOString(),n="[MOBILE-".concat(t,"]");for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];console.log(n,...i),window.mobileLogs||(window.mobileLogs=[]),window.mobileLogs.push({timestamp:t,isMobile:e,args:i.map(e=>"object"===typeof e?JSON.stringify(e):String(e))}),window.mobileLogs.length>100&&window.mobileLogs.shift()},ze=function(){const e=(0,i.useState)("loading"),t=(0,r.A)(e,2)[1];return(0,i.useEffect)(()=>{(async()=>{try{if(document.querySelector("script[data-promotekit]"))return(0,o.g)("PromoteKit script already exists"),void t("loaded");if("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname)return console.warn("PromoteKit: Skipping load in development environment"),void t("dev");(0,o.g)("Loading PromoteKit script...");const e=document.createElement("script");e.src="https://cdn.promotekit.com/promotekit.js",e.async=!0,e.setAttribute("data-promotekit","ec511efb-9d39-4b69-8e75-da55116f39be");const n=new Promise((n,r)=>{let i=!1;e.onload=()=>{i||(i=!0,(0,o.g)("PromoteKit loaded successfully"),t("loaded"),n(),(0,o.g)("PromoteKit referral ID:",window.promotekit_referral),(0,o.g)("PromoteKit object:",window.promotekit))},e.onerror=e=>{i||(i=!0,console.error("Failed to load PromoteKit:",e),t("error"),r(e))},setTimeout(()=>{i||(i=!0,console.error("PromoteKit load timeout"),t("error"),r(new Error("Script load timeout")))},1e4)});document.head.appendChild(e),await n}catch(e){console.error("Error loading PromoteKit:",e),t("error")}})()},[]),(0,se.jsx)(a.S,{children:(0,se.jsx)(ie.P,{children:(0,se.jsx)(oe.q,{children:(0,se.jsx)(s.Kd,{children:(0,se.jsxs)("div",{children:[(0,se.jsx)(i.Suspense,{fallback:(0,se.jsx)(re.aZ,{}),children:(0,se.jsxs)(s.BV,{children:[(0,se.jsx)(s.qh,{path:"/home",element:(0,se.jsx)(ue,{})}),(0,se.jsx)(s.qh,{path:"/auth",element:(0,se.jsx)(me,{})}),(0,se.jsx)(s.qh,{path:"/authpage",element:(0,se.jsx)(me,{})}),(0,se.jsx)(s.qh,{path:"/accept-invite",element:(0,se.jsx)(be,{})}),(0,se.jsx)(s.qh,{path:"/join/:clientSlug",element:(0,se.jsx)(we,{})}),(0,se.jsx)(s.qh,{path:"/terms-of-service",element:(0,se.jsx)(_e,{})}),(0,se.jsx)(s.qh,{path:"/privacy-policy",element:(0,se.jsx)(Ee,{})}),(0,se.jsx)(s.qh,{path:"/electronic-signatures",element:(0,se.jsx)(Te,{})}),(0,se.jsx)(s.qh,{path:"/doc/:documentId/fill",element:(0,se.jsx)(ke,{})}),(0,se.jsx)(s.qh,{path:"/sign/:documentId/:envelopeId",element:(0,se.jsx)(Ce,{})}),(0,se.jsx)(s.qh,{path:"/shared-signed/:documentId/:submissionId",element:(0,se.jsx)(Pe,{})}),(0,se.jsx)(s.qh,{path:"/shared/:kbId",element:(0,se.jsx)(ge,{})}),(0,se.jsx)(s.qh,{path:"/shared/video/:talkId",element:(0,se.jsx)(ye,{})}),(0,se.jsx)(s.qh,{path:"/mascot/:kbId",element:(0,se.jsx)(Me,{})}),(0,se.jsx)(s.qh,{path:"/:kbId",element:(0,se.jsx)(De,{})}),(0,se.jsx)(s.qh,{path:"/",element:(0,se.jsx)(Ue,{})}),(0,se.jsxs)(s.qh,{element:(0,se.jsx)(Fe,{}),children:[(0,se.jsx)(s.qh,{path:"/invite",element:(0,se.jsx)(he,{})}),(0,se.jsx)(s.qh,{path:"/profile",element:(0,se.jsx)(de,{})}),(0,se.jsx)(s.qh,{path:"/billing",element:(0,se.jsx)(fe,{})}),(0,se.jsx)(s.qh,{path:"/integrations",element:(0,se.jsx)(pe,{})}),(0,se.jsx)(s.qh,{path:"/feedback",element:(0,se.jsx)(Ae,{})}),(0,se.jsx)(s.qh,{path:"/partner",element:(0,se.jsx)(Ne,{})}),(0,se.jsx)(s.qh,{path:"/admin",element:(0,se.jsx)(Ie,{})}),(0,se.jsx)(s.qh,{path:"/workspace/:workspaceId/chats",element:(0,se.jsx)(Ve,{})}),(0,se.jsx)(s.qh,{path:"/app/chat/:chatId",element:(0,se.jsx)(Re,{})})]})]})}),(0,se.jsx)(i.Suspense,{fallback:null,children:(0,se.jsx)(Oe,{})}),(0,se.jsx)(te,{position:"bottom-right",autoClose:3500,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0,theme:"light"}),(0,se.jsx)(ne.l$,{position:"bottom-right"}),(0,se.jsx)(h,{})]})})})})})}}
2,66630(e,t,n){n.d(t,{Ay:()=>s,aZ:()=>a,y$:()=>o});n(65043);var r=n(22024),i=n(70579);const o=e=>{let t=e.size,n=void 0===t?"md":t,o=e.className,a=void 0===o?"":o;return(0,i.jsx)(r.A,{className:"animate-spin ".concat({sm:"w-4 h-4",md:"w-8 h-8",lg:"w-12 h-12"}[n]," ").concat(a)})};function a(e){let t=e.subtitle;return(0,i.jsx)("div",{className:"flex items-center justify-center min-h-screen bg-gray-50",children:(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)(o,{size:"lg",className:"text-blue-500 mx-auto block"}),t?(0,i.jsx)("p",{className:"mt-4 text-gray-600",children:t}):(0,i.jsx)("div",{className:"mt-4 min-h-6","aria-hidden":!0})]})})}const s=()=>(0,i.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:(0,i.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,i.jsx)(o,{size:"lg",className:"text-blue-600"}),(0,i.jsx)("p",{className:"text-gray-500 text-sm",children:"Loading..."})]})})},80813(e,t,n){n.d(t,{P:()=>h,V:()=>f});var r=n(5544),i=n(65043),o=n(67898),a=n(10430),s=n(80550),l=n(47081),c=n(1862),u=n(70579);const d=(0,i.createContext)(null);function h(e){let t=e.children;const n=(0,i.useState)(null),h=(0,r.A)(n,2),f=h[0],p=h[1],m=(0,i.useState)([]),g=(0,r.A)(m,2),y=g[0],v=g[1],b=(0,i.useState)(!1),w=(0,r.A)(b,2),_=w[0],E=w[1],T=(0,i.useState)(null),S=(0,r.A)(T,2),k=S[0],C=S[1],I=(0,i.useRef)({}),A=(0,i.useCallback)((e,t)=>e&&"function"===typeof t?(I.current[e]=t,()=>{I.current[e]===t&&delete I.current[e]}):()=>{},[]),R=(0,i.useCallback)(async e=>{const t=null===e||void 0===e?void 0:e.type,n=t?I.current[t]:null;if("function"===typeof n)try{return{ok:!0,deferred:!1,result:await n(e.payload)}}catch(r){return{ok:!1,deferred:!1,error:r}}return{ok:!1,deferred:!0}},[]),P=(0,i.useCallback)(async e=>{if(!e)return p(null),void v([]);try{var t;const n=(0,l.getSelectedOrganizationId)(),r=(0,a.ur)(e,n),i=await(0,l.getWorkspaces)();if(v(Array.isArray(i)?i:[]),!i||0===i.length)return void p(null);let o=r?i.find(e=>String(e.id)===String(r)):null;if(!o){const t=i.map(e=>e.id),n=await(0,s.kF)(e,t);null!==n&&void 0!==n&&n.workspaceId&&(o=i.find(e=>String(e.id)===String(n.workspaceId))||null)}o||(o=i.find(e=>!0===e.isDefault)||i.find(e=>"Default Workspace"===e.name)||i[0]),p(o||null),null!==(t=o)&&void 0!==t&&t.id&&(0,s.yc)(e,o.id,o.organizationId||n||null).catch(()=>{})}catch(n){(0,c.gg)("ActiveWorkspaceProvider: hydrate failed",n),v([]),p(null)}},[]);(0,i.useEffect)(()=>{const e=(0,o.xI)(),t=(0,o.hg)(e,e=>{if(!e||e.isAnonymous)return p(null),v([]),void E(!1);P(e.uid)});return()=>t()},[P]),(0,i.useEffect)(()=>{const e=(0,o.xI)().currentUser;if(null===e||void 0===e||!e.uid||e.isAnonymous||null===f||void 0===f||!f.id)return;const t=(0,l.getSelectedOrganizationId)();(0,s.yc)(e.uid,f.id,f.organizationId||t||null).catch(()=>{})},[null===f||void 0===f?void 0:f.id,null===f||void 0===f?void 0:f.organizationId]),(0,i.useEffect)(()=>{const e=async()=>{const e=(0,o.xI)().currentUser;if(e&&!e.isAnonymous)try{const e=await(0,l.getWorkspaces)();v(Array.isArray(e)?e:[]),p(t=>{if(null===t||void 0===t||!t.id)return t;return e.find(e=>String(e.id)===String(t.id))||t})}catch(t){(0,c.gg)("ActiveWorkspaceProvider: workspacesUpdated merge failed",t)}};return window.addEventListener("workspacesUpdated",e),()=>window.removeEventListener("workspacesUpdated",e)},[]);const N=(0,i.useMemo)(()=>({activeWorkspace:f,setActiveWorkspace:p,workspaceList:y,setWorkspaceList:v,isAgentSidebarOpen:_,setIsAgentSidebarOpen:E,activeDocumentId:k,setActiveDocumentId:C,registerKbActionHandler:A,requestKbAction:R,refreshWorkspaces:()=>{const e=(0,o.xI)().currentUser;e&&!e.isAnonymous&&P(e.uid)}}),[f,y,_,k,P,A,R]);return(0,u.jsx)(d.Provider,{value:N,children:t})}function f(){const e=(0,i.useContext)(d);if(!e)throw new Error("useActiveWorkspace must be used within ActiveWorkspaceProvider");return e}},77274(e,t,n){n.d(t,{I:()=>l,q:()=>s});var r=n(5544),i=n(65043),o=n(70579);const a=(0,i.createContext)({clientSearchOnly:!1,clientSearchModeResolved:!0,setClientSearchMode:()=>{}});function s(e){let t=e.children;const n=(0,i.useState)(!1),s=(0,r.A)(n,2),l=s[0],c=s[1],u=(0,i.useState)(!0),d=(0,r.A)(u,2),h=d[0],f=d[1],p=(0,i.useCallback)(e=>{let t=e.searchOnly,n=e.resolved;if(void 0!==n&&f(Boolean(n)),void 0!==t){const e=Boolean(t);c(e),function(e){"undefined"!==typeof document&&(e?document.body.dataset.clientSearchOnly="1":delete document.body.dataset.clientSearchOnly)}(e)}},[]),m=(0,i.useMemo)(()=>({clientSearchOnly:l,clientSearchModeResolved:h,setClientSearchMode:p}),[l,h,p]);return(0,o.jsx)(a.Provider,{value:m,children:t})}function l(){return(0,i.useContext)(a)}},96822(e,t,n){n.d(t,{yA:()=>Ve,j2:()=>Be,db:()=>je,CN:()=>Fe,Cn:()=>qe,IG:()=>ze});var r=n(37064),i=n(55472),o=n(52395),a=n(58147),s=n(67898),l=n(5544),c=n(80052),u=n(50443),d=n(51529),h=n(88812),f=n(72799);const p="@firebase/installations",m="0.6.18",g=1e4,y="w:".concat(m),v="FIS_v2",b=36e5,w={"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."},_=new d.FA("installations","Installations",w);function E(e){return e instanceof d.g&&e.code.includes("request-failed")}function T(e){let t=e.projectId;return"".concat("https://firebaseinstallations.googleapis.com/v1","/projects/").concat(t,"/installations")}
2function S(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}async function k(e,t){const n=(await t.json()).error;return _.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function C(e){let t=e.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function I(e,t){let n=t.refreshToken;const r=C(e);return r.append("Authorization",function(e){return"".concat(v," ").concat(e)}(n)),r}async function A(e){const t=await e();return t.status>=500&&t.status<600?e():t}function R(e){return new Promise(t=>{setTimeout(t,e)})}const P=/^[cdef][\w-]{21}$/;function N(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const t=function(e){const t=(n=e,btoa(String.fromCharCode(...n)).replace(/\+/g,"-").replace(/\//g,"_"));var n;return t.substr(0,22)}(e);return P.test(t)?t:""}catch(e){return""}}function O(e){return"".concat(e.appName,"!").concat(e.appId)}const x=new Map;function L(e,t){const n=O(e);D(n,t),function(e,t){const n=U();n&&n.postMessage({key:e,fid:t});F()}(n,t)}function D(e,t){const n=x.get(e);if(n)for(const r of n)r(t)}let M=null;function U(){return!M&&"BroadcastChannel"in self&&(M=new BroadcastChannel("[Firebase] FID Change"),M.onmessage=e=>{D(e.data.key,e.data.fid)}),M}function F(){0===x.size&&M&&(M.close(),M=null)}const V="firebase-installations-store";let j=null;function z(){return j||(j=(0,f.P2)("firebase-installations-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(V)}})),j}async function B(e,t){const n=O(e),r=(await z()).transaction(V,"readwrite"),i=r.objectStore(V),o=await i.get(n);return await i.put(t,n),await r.done,o&&o.fid===t.fid||L(e,t.fid),t}async function q(e){const t=O(e),n=(await z()).transaction(V,"readwrite");await n.objectStore(V).delete(t),await n.done}async function H(e,t){const n=O(e),r=(await z()).transaction(V,"readwrite"),i=r.objectStore(V),o=await i.get(n),a=t(o);return void 0===a?await i.delete(n):await i.put(a,n),await r.done,!a||o&&o.fid===a.fid||L(e,a.fid),a}async function W(e){let t;const n=await H(e.appConfig,n=>{const r=function(e){const t=e||{fid:N(),registrationStatus:0};return Q(t)}(n),i=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine){return{installationEntry:t,registrationPromise:Promise.reject(_.create("app-offline"))}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=async function(e,t){try{const n=await async function(e,t){let n=e.appConfig,r=e.heartbeatServiceProvider,i=t.fid;const o=T(n),a=C(n),s=r.getImmediate({optional:!0});if(s){const e=await s.getHeartbeatsHeader();e&&a.append("x-firebase-client",e)}const l={fid:i,authVersion:v,appId:n.appId,sdkVersion:y},c={method:"POST",headers:a,body:JSON.stringify(l)},u=await A(()=>fetch(o,c));if(u.ok){const e=await u.json();return{fid:e.fid||i,registrationStatus:2,refreshToken:e.refreshToken,authToken:S(e.authToken)}}throw await k("Create Installation",u)}(e,t);return B(e.appConfig,n)}catch(n){throw E(n)&&409===n.customData.serverCode?await q(e.appConfig):await B(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:G(e)}:{installationEntry:t}}(e,r);return t=i.registrationPromise,i.installationEntry});return""===n.fid?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}async function G(e){let t=await K(e.appConfig);for(;1===t.registrationStatus;)await R(100),t=await K(e.appConfig);if(0===t.registrationStatus){const t=await W(e),n=t.installationEntry,r=t.registrationPromise;return r||n}return t}function K(e){return H(e,e=>{if(!e)throw _.create("installation-not-found");return Q(e)})}function Q(e){return 1===(t=e).registrationStatus&&t.registrationTime+g<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}async function $(e,t){let n=e.appConfig,r=e.heartbeatServiceProvider;const i=function(e,t){let n=t.fid;return"".concat(T(e),"/").concat(n,"/authTokens:generate")}(n,t),o=I(n,t),a=r.getImmediate({optional:!0});if(a){const e=await a.getHeartbeatsHeader();e&&o.append("x-firebase-client",e)}
2const s={installation:{sdkVersion:y,appId:n.appId}},l={method:"POST",headers:o,body:JSON.stringify(s)},c=await A(()=>fetch(i,l));if(c.ok){return S(await c.json())}throw await k("Generate Auth Token",c)}async function Y(e){let t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=await H(e.appConfig,r=>{if(!J(r))throw _.create("not-registered");const i=r.authToken;if(!n&&function(e){return 2===e.requestStatus&&!function(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+b}(e)}(i))return r;if(1===i.requestStatus)return t=async function(e,t){let n=await X(e.appConfig);for(;1===n.authToken.requestStatus;)await R(100),n=await X(e.appConfig);const r=n.authToken;return 0===r.requestStatus?Y(e,t):r}(e,n),r;{if(!navigator.onLine)throw _.create("app-offline");const n=function(e){const t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}(r);return t=async function(e,t){try{const n=await $(e,t),r=Object.assign(Object.assign({},t),{authToken:n});return await B(e.appConfig,r),n}catch(n){if(!E(n)||401!==n.customData.serverCode&&404!==n.customData.serverCode){const n=Object.assign(Object.assign({},t),{authToken:{requestStatus:0}});await B(e.appConfig,n)}else await q(e.appConfig);throw n}}(e,n),n}});return t?await t:r.authToken}function X(e){return H(e,e=>{if(!J(e))throw _.create("not-registered");const t=e.authToken;return 1===(n=t).requestStatus&&n.requestTime+g<Date.now()?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e;var n})}function J(e){return void 0!==e&&2===e.registrationStatus}async function Z(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e;await async function(e){const t=await W(e),n=t.registrationPromise;n&&await n}(n);return(await Y(n,t)).token}function ee(e){return _.create("missing-app-config-values",{valueName:e})}const te="installations",ne=e=>{const t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw ee("App Configuration");if(!e.name)throw ee("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw ee(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:(0,c.j6)(t,"heartbeat"),_delete:()=>Promise.resolve()}},re=e=>{const t=e.getProvider("app").getImmediate(),n=(0,c.j6)(t,te).getImmediate();return{getId:()=>async function(e){const t=e,n=await W(t),r=n.installationEntry,i=n.registrationPromise;return i?i.catch(console.error):Y(t).catch(console.error),r.fid}(n),getToken:e=>Z(n,e)}};(0,c.om)(new h.uA(te,ne,"PUBLIC")),(0,c.om)(new h.uA("installations-internal",re,"PRIVATE")),(0,c.KO)(p,m),(0,c.KO)(p,m,"esm2017");const ie="analytics",oe="https://www.googletagmanager.com/gtag/js",ae=new u.Vy("@firebase/analytics"),se={"already-exists":"A Firebase Analytics instance with the appId {$id}  already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invali
2d-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."},le=new d.FA("analytics","Analytics",se);function ce(e){if(!e.startsWith(oe)){const t=le.create("invalid-gtag-resource",{gtagURL:e});return ae.warn(t.message),""}return e}function ue(e){return Promise.all(e.map(e=>e.catch(e=>e)))}function de(e,t){const n=function(e,t){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(e,t)),n}("firebase-js-sdk-policy",{createScriptURL:ce}),r=document.createElement("script"),i="".concat(oe,"?l=").concat(e,"&id=").concat(t);r.src=n?null===n||void 0===n?void 0:n.createScriptURL(i):i,r.async=!0,document.head.appendChild(r)}function he(e,t,n,r){return async function(i){try{for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];if("event"===i){const r=a[0],i=a[1];await async function(e,t,n,r,i){try{let o=[];if(i&&i.send_to){let e=i.send_to;Array.isArray(e)||(e=[e]);const r=await ue(n);for(const n of e){const e=r.find(e=>e.measurementId===n),i=e&&t[e.appId];if(!i){o=[];break}o.push(i)}}0===o.length&&(o=Object.values(t)),await Promise.all(o),e("event",r,i||{})}catch(o){ae.error(o)}}(e,t,n,r,i)}else if("config"===i){const i=a[0],o=a[1];await async function(e,t,n,r,i,o){const a=r[i];try{if(a)await t[a];else{const e=(await ue(n)).find(e=>e.measurementId===i);e&&await t[e.appId]}}catch(s){ae.error(s)}e("config",i,o)}(e,t,n,r,i,o)}else if("consent"===i){const t=a[0],n=a[1];e("consent",t,n)}else if("get"===i){const t=a[0],n=a[1],r=a[2];e("get",t,n,r)}else if("set"===i){const t=a[0];e("set",t)}else e(i,...a)}catch(l){ae.error(l)}}}const fe=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;this.throttleMetadata=e,this.intervalMillis=t}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,t){this.throttleMetadata[e]=t}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}};function pe(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}async function me(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fe,n=arguments.length>2?arguments[2]:void 0;const r=e.options,i=r.appId,o=r.apiKey,a=r.measurementId;if(!i)throw le.create("no-app-id");if(!o){if(a)return{measurementId:a,appId:i};throw le.create("no-api-key")}const s=t.getThrottleMetadata(i)||{backoffCount:0,throttleEndTimeMillis:Date.now()},l=new ye;return setTimeout(async()=>{l.abort()},void 0!==n?n:6e4),ge({appId:i,apiKey:o,measurementId:a},s,l,t)}async function ge(e,t,n){let r=t.throttleEndTimeMillis,i=t.backoffCount,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:fe;var a;const s=e.appId,l=e.measurementId;try{await function(e,t){return new Promise((n,r)=>{const i=Math.max(t-Date.now(),0),o=setTimeout(n,i);e.addEventListener(()=>{clearTimeout(o),r(le.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}(n,r)}catch(c){if(l)return ae.warn("Timed out fetching this Firebase app's measurement ID from the server."+" Falling back to the measurement ID ".concat(l)+' provided in the "measurementId" field in the local Firebase config. ['.concat(null===c||void 0===c?void 0:c.message,"]")),{appId:s,measurementId:l};throw c}try{const t=await async function(e){var t;const n=e.appId,r={method:"GET",headers:pe(e.apiKey)},i="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",n),o=await fetch(i,r);if(200!==o.status&&304!==o.status){let e="";try{const n=await o.json();(null===(t=n.error)||void 0===t?void 0:t.message)&&(e=n.error.message)}catch(a){}throw le.create("config-fetch-failed",{httpStatus:o.status,responseMessage:e})}return o.json()}(e);return o.deleteThrottleMetadata(s),t}catch(c){const t=c;if(!function(e){if(!(e instanceof d.g)||!e.customData)return!1;const t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(t)){if(o.deleteThrottleMetadata(s),l)return ae.warn("Failed to fetch this Firebase app's measurement ID from the server."+" Falling back to the measurement ID ".concat(l)+' provided in the "measurementId" field in the local Firebase config. ['.concat(null===t||void 0===t?void 0:t.message,"]")),{appId:s,measurementId:l};throw c}const r=503===Number(null===(a=null===t||void 0===t?void 0:t.customData)||void 0===a?void 0:a.httpStatus)?(0,d.p9)(i,o.intervalMillis,30):(0,d.p9)(i,o.intervalMillis),u={throttleEndTimeMillis:Date.now()+r,backoffCount:i+1};return o.setThrottleMetadata(s,u),ae.debug("Calling attemptFetch again in ".concat(r," millis")),ge(e,u,n,o)}}class ye{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}
2abort(){this.listeners.forEach(e=>e())}}let ve,be;function we(e){be=e}function _e(e){ve=e}async function Ee(e,t,n,r,i,o,a){var s;const c=me(e);c.then(t=>{n[t.measurementId]=t.appId,e.options.measurementId&&t.measurementId!==e.options.measurementId&&ae.warn("The measurement ID in the local Firebase config (".concat(e.options.measurementId,")")+" does not match the measurement ID fetched from the server (".concat(t.measurementId,").")+" To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.")}).catch(e=>ae.error(e)),t.push(c);const u=async function(){if(!(0,d.zW)())return ae.warn(le.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await(0,d.eX)()}catch(e){return ae.warn(le.create("indexeddb-unavailable",{errorInfo:null===e||void 0===e?void 0:e.toString()}).message),!1}return!0}().then(e=>e?r.getId():void 0),h=await Promise.all([c,u]),f=(0,l.A)(h,2),p=f[0],m=f[1];(function(e){const t=window.document.getElementsByTagName("script");for(const n of Object.values(t))if(n.src&&n.src.includes(oe)&&n.src.includes(e))return n;return null})(o)||de(o,p.measurementId),be&&(i("consent","default",be),we(void 0)),i("js",new Date);const g=null!==(s=null===a||void 0===a?void 0:a.config)&&void 0!==s?s:{};return g.origin="firebase",g.update=!0,null!=m&&(g.firebase_id=m),i("config",p.measurementId,g),ve&&(i("set",ve),_e(void 0)),p.measurementId}class Te{constructor(e){this.app=e}_delete(){return delete Se[this.app.options.appId],Promise.resolve()}}let Se={},ke=[];const Ce={};let Ie,Ae,Re="dataLayer",Pe="gtag",Ne=!1;function Oe(e,t,n){!function(){const e=[];if((0,d.sr)()&&e.push("This is a browser extension environment."),(0,d.dM)()||e.push("Cookies are not available."),e.length>0){const t=e.map((e,t)=>"(".concat(t+1,") ").concat(e)).join(" "),n=le.create("invalid-analytics-context",{errorInfo:t});ae.warn(n.message)}}();const r=e.options.appId;if(!r)throw le.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw le.create("no-api-key");ae.warn('The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest'+" measurement ID for this Firebase app. Falling back to the measurement ID ".concat(e.options.measurementId)+' provided in the "measurementId" field in the local Firebase config.')}if(null!=Se[r])throw le.create("already-exists",{id:r});if(!Ne){!function(e){let t=[];Array.isArray(window[e])?t=window[e]:window[e]=t}(Re);const e=function(e,t,n,r,i){let o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];window[r].push(arguments)};return window[i]&&"function"===typeof window[i]&&(o=window[i]),window[i]=he(o,e,t,n),{gtagCore:o,wrappedGtag:window[i]}}(Se,ke,Ce,Re,Pe),t=e.wrappedGtag,n=e.gtagCore;Ae=t,Ie=n,Ne=!0}Se[r]=Ee(e,ke,Ce,t,Ie,Re,n);return new Te(e)}function xe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,c.Sx)();e=(0,d.Ku)(e);const t=(0,c.j6)(e,ie);return t.isInitialized()?t.getImmediate():function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,c.j6)(e,ie);if(n.isInitialized()){const e=n.getImmediate();if((0,d.bD)(t,n.getOptions()))return e;throw le.create("already-initialized")}const r=n.initialize({options:t});return r}(e)}function Le(e,t,n,r){e=(0,d.Ku)(e),async function(e,t,n,r,i){if(i&&i.global)e("event",n,r);else{const i=await t;e("event",n,Object.assign(Object.assign({},r),{send_to:i}))}}(Ae,Se[e.app.options.appId],t,n,r).catch(e=>ae.error(e))}const De="@firebase/analytics",Me="0.10.17";(0,c.om)(new h.uA(ie,(e,t)=>{let n=t.options;return Oe(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),n)},"PUBLIC")),(0,c.om)(new h.uA("analytics-internal",function(e){try{const t=e.getProvider(ie).getImmediate();return{logEvent:(e,n,r)=>Le(t,e,n,r)}}catch(t){throw le.create("interop-component-reg-failed",{reason:t})}},"PRIVATE")),(0,c.KO)(De,Me),(0,c.KO)(De,Me,"esm2017");var Ue=n(1862);const Fe={apiKey:"AIzaSyCNgUqA3-cbpS93T9aD7RXP_ufD5guxt4I",authDomain:"aiknowledgebase-7427e.firebaseapp.com",projectId:"aiknowledgebase-7427e",storageBucket:"aiknowledgebase-7427e.firebasestorage.app",messagingSenderId:"569849967691",appId:"1:569849967691:web:6c78c6ee2551c420fc89ce",measurementId:"G-VTRXQQ7KBQ"};let Ve;try{Ve=0===(0,r.Dk)().length?(0,r.Wp)(Fe):(0,r.Sx)()}catch(Ge){Ve=(0,r.Wp)(Fe)}const je=(0,i.aU)(Ve),ze=(0,a.c7)(Ve),Be=(0,s.xI)(Ve),qe=(0,o.getFunctions)(Ve,"us-central1"),He=Number({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_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Gary Riger",REACT_APP_VERCEL_GIT_PROVIDER:"github",REACT_APP_VERCEL_PROJECT_ID:"prj_A5c8ZMv75ibxQVceA3I7GjPny9oD",REACT_APP_VERCEL_GIT_PULL_REQUEST_ID:"",REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG:'{"analytics":{"scriptSrc":"8f81e36d25c71756/script.
2js","viewEndpoint":"8f81e36d25c71756/view","eventEndpoint":"8f81e36d25c71756/event","sessionEndpoint":"8f81e36d25c71756/session"},"speedInsights":{"scriptSrc":"1e9f61cb490e195d/script.js","endpoint":"1e9f61cb490e195d/vitals"}}',REACT_APP_VERCEL_BRANCH_URL:"based-git-main-trybased.vercel.app",REACT_APP_VERCEL_GIT_COMMIT_MESSAGE:'feat: enhance mascot URL handling and redirection\n\n- Added redirects for mascot custom domains to serve links at `/{id}` instead of `/mascot/{id}`.\n- Updated the canonical URL generation in the mascot API to accommodate custom hostnames.\n- Introduced utility functions to determine mascot link paths and identify "Mascot says" links.\n- Adjusted various components and tests to reflect the new URL structure and ensure proper handling of mascot links.\n\nThis update improves the user experience for mascot domain visitors and streamlines the sharing process for mascot-related content.',REACT_APP_VERCEL_DEPLOYMENT_ID:"dpl_6FrDCtvXefHewS7qWdFGdtdrWfow",REACT_APP_VERCEL_GIT_REPO_SLUG:"knowledge-base-saas",REACT_APP_VERCEL_TARGET_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_SHA:"bb4db2da80ad880ce8eb95828efa1bf5f6feeb22",REACT_APP_VERCEL_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_REF:"main",REACT_APP_VERCEL_URL:"based-acjo68u8l-trybased.vercel.app",REACT_APP_VERCEL_PROJECT_PRODUCTION_URL:"www.trybased.com",REACT_APP_VERCEL_GIT_PREVIOUS_SHA:"",REACT_APP_VERCEL_GIT_REPO_ID:"980833582",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"grigerny",REACT_APP_VERCEL_GIT_REPO_OWNER:"grigerny"}.REACT_APP_FUNCTIONS_EMULATOR_PORT||"5001")||5001;if("true"==={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_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Gary Riger",REACT_APP_VERCEL_GIT_PROVIDER:"github",REACT_APP_VERCEL_PROJECT_ID:"prj_A5c8ZMv75ibxQVceA3I7GjPny9oD",REACT_APP_VERCEL_GIT_PULL_REQUEST_ID:"",REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG:'{"analytics":{"scriptSrc":"8f81e36d25c71756/script.js","viewEndpoint":"8f81e36d25c71756/view","eventEndpoint":"8f81e36d25c71756/event","sessionEndpoint":"8f81e36d25c71756/session"},"speedInsights":{"scriptSrc":"1e9f61cb490e195d/script.js","endpoint":"1e9f61cb490e195d/vitals"}}',REACT_APP_VERCEL_BRANCH_URL:"based-git-main-trybased.vercel.app",REACT_APP_VERCEL_GIT_COMMIT_MESSAGE:'feat: enhance mascot URL handling and redirection\n\n- Added redirects for mascot custom domains to serve links at `/{id}` instead of `/mascot/{id}`.\n- Updated the canonical URL generation in the mascot API to accommodate custom hostnames.\n- Introduced utility functions to determine mascot link paths and identify "Mascot says" links.\n- Adjusted various components and tests to reflect the new URL structure and ensure proper handling of mascot links.\n\nThis update improves the user experience for mascot domain visitors and streamlines the sharing process for mascot-related content.',REACT_APP_VERCEL_DEPLOYMENT_ID:"dpl_6FrDCtvXefHewS7qWdFGdtdrWfow",REACT_APP_VERCEL_GIT_REPO_SLUG:"knowledge-base-saas",REACT_APP_VERCEL_TARGET_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_SHA:"bb4db2da80ad880ce8eb95828efa1bf5f6feeb22",REACT_APP_VERCEL_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_REF:"main",REACT_APP_VERCEL_URL:"based-acjo68u8l-trybased.vercel.app",REACT_APP_VERCEL_PROJECT_PRODUCTION_URL:"www.trybased.com",REACT_APP_VERCEL_GIT_PREVIOUS_SHA:"",REACT_APP_VERCEL_GIT_REPO_ID:"980833582",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"grigerny",REACT_APP_VERCEL_GIT_REPO_OWNER:"grigerny"}.REACT_APP_USE_FIREBASE_EMULATORS)try{(0,i.vN)(je,"127.0.0.1",8080),(0,Ue.gg)("\ud83e\uddea Connected Firestore to emulator at 127.0.0.1:8080")}catch(Ke){console.warn("Firestore emulator connection skipped:",(null===Ke||void 0===Ke?void 0:Ke.message)||Ke)}if("true"==={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_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Gary Riger",REACT_APP_VERCEL_GIT_PROVIDER:"github",REACT_APP_VERCEL_PROJECT_ID:"prj_A5c8ZMv75ibxQVceA3I7GjPny9oD",REACT_APP_VERCEL_GIT_PULL_REQUEST_ID:"",REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG:'{"analytics":{"scriptSrc":"8f81e36d25c71756/script.
2js","viewEndpoint":"8f81e36d25c71756/view","eventEndpoint":"8f81e36d25c71756/event","sessionEndpoint":"8f81e36d25c71756/session"},"speedInsights":{"scriptSrc":"1e9f61cb490e195d/script.js","endpoint":"1e9f61cb490e195d/vitals"}}',REACT_APP_VERCEL_BRANCH_URL:"based-git-main-trybased.vercel.app",REACT_APP_VERCEL_GIT_COMMIT_MESSAGE:'feat: enhance mascot URL handling and redirection\n\n- Added redirects for mascot custom domains to serve links at `/{id}` instead of `/mascot/{id}`.\n- Updated the canonical URL generation in the mascot API to accommodate custom hostnames.\n- Introduced utility functions to determine mascot link paths and identify "Mascot says" links.\n- Adjusted various components and tests to reflect the new URL structure and ensure proper handling of mascot links.\n\nThis update improves the user experience for mascot domain visitors and streamlines the sharing process for mascot-related content.',REACT_APP_VERCEL_DEPLOYMENT_ID:"dpl_6FrDCtvXefHewS7qWdFGdtdrWfow",REACT_APP_VERCEL_GIT_REPO_SLUG:"knowledge-base-saas",REACT_APP_VERCEL_TARGET_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_SHA:"bb4db2da80ad880ce8eb95828efa1bf5f6feeb22",REACT_APP_VERCEL_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_REF:"main",REACT_APP_VERCEL_URL:"based-acjo68u8l-trybased.vercel.app",REACT_APP_VERCEL_PROJECT_PRODUCTION_URL:"www.trybased.com",REACT_APP_VERCEL_GIT_PREVIOUS_SHA:"",REACT_APP_VERCEL_GIT_REPO_ID:"980833582",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"grigerny",REACT_APP_VERCEL_GIT_REPO_OWNER:"grigerny"}.REACT_APP_CONNECT_FUNCTIONS_EMULATOR||"true"==={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_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Gary Riger",REACT_APP_VERCEL_GIT_PROVIDER:"github",REACT_APP_VERCEL_PROJECT_ID:"prj_A5c8ZMv75ibxQVceA3I7GjPny9oD",REACT_APP_VERCEL_GIT_PULL_REQUEST_ID:"",REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG:'{"analytics":{"scriptSrc":"8f81e36d25c71756/script.js","viewEndpoint":"8f81e36d25c71756/view","eventEndpoint":"8f81e36d25c71756/event","sessionEndpoint":"8f81e36d25c71756/session"},"speedInsights":{"scriptSrc":"1e9f61cb490e195d/script.js","endpoint":"1e9f61cb490e195d/vitals"}}',REACT_APP_VERCEL_BRANCH_URL:"based-git-main-trybased.vercel.app",REACT_APP_VERCEL_GIT_COMMIT_MESSAGE:'feat: enhance mascot URL handling and redirection\n\n- Added redirects for mascot custom domains to serve links at `/{id}` instead of `/mascot/{id}`.\n- Updated the canonical URL generation in the mascot API to accommodate custom hostnames.\n- Introduced utility functions to determine mascot link paths and identify "Mascot says" links.\n- Adjusted various components and tests to reflect the new URL structure and ensure proper handling of mascot links.\n\nThis update improves the user experience for mascot domain visitors and streamlines the sharing process for mascot-related content.',REACT_APP_VERCEL_DEPLOYMENT_ID:"dpl_6FrDCtvXefHewS7qWdFGdtdrWfow",REACT_APP_VERCEL_GIT_REPO_SLUG:"knowledge-base-saas",REACT_APP_VERCEL_TARGET_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_SHA:"bb4db2da80ad880ce8eb95828efa1bf5f6feeb22",REACT_APP_VERCEL_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_REF:"main",REACT_APP_VERCEL_URL:"based-acjo68u8l-trybased.vercel.app",REACT_APP_VERCEL_PROJECT_PRODUCTION_URL:"www.trybased.com",REACT_APP_VERCEL_GIT_PREVIOUS_SHA:"",REACT_APP_VERCEL_GIT_REPO_ID:"980833582",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"grigerny",REACT_APP_VERCEL_GIT_REPO_OWNER:"grigerny"}.REACT_APP_USE_FIREBASE_EMULATORS)try{(0,o.f5)(qe,"127.0.0.1",He),(0,Ue.gg)("\ud83e\uddea Connected Functions to emulator at 127.0.0.1:"+He)}catch(Ke){console.warn("Functions emulator connection skipped:",(null===Ke||void 0===Ke?void 0:Ke.message)||Ke)}(0,s.oM)(Be,s.F0).then(()=>{(0,Ue.gg)("\u2705 Auth persistence set to LOCAL - auth will persist across tabs and browser restarts")}).catch(e=>{console.error("\u274c Error setting auth persistence:",e)});let We=null;(async()=>{try{await async function(){if((0,d.sr)())return!1;if(!(0,d.dM)())return!1;if(!(0,d.zW)())return!1;try{return await(0,d.eX)()}catch(Ge){return!1}}()?(We=xe(Ve),(0,Ue.gg)("Firebase Analytics initialized successfully")):console.warn("Firebase Analytics not supported in this environment")}catch(Ge){console.warn("Failed to initialize Firebase Analytics:",Ge)}})()}
2,47081(e,t,n){n.d(t,{Il:()=>L,Dt:()=>R,Rp:()=>D,Gb:()=>x,getSelectedOrganizationId:()=>k,fP:()=>M,getUserOrganizationData:()=>A,wV:()=>I,Vr:()=>V,getWorkspaces:()=>P,PT:()=>N,a1:()=>F,hH:()=>j,nL:()=>O,t6:()=>C,v_:()=>U,aI:()=>z});var r=n(89379),i=n(55472),o=n(37064),a=n(52395),s=n(96822),l=n(67898);const c={randomUUID:"undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let u;const d=new Uint8Array(16);function h(){if(!u&&(u="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!u))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u(d)}const f=[];for(let B=0;B<256;++B)f.push((B+256).toString(16).slice(1));function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return f[e[t+0]]+f[e[t+1]]+f[e[t+2]]+f[e[t+3]]+"-"+f[e[t+4]]+f[e[t+5]]+"-"+f[e[t+6]]+f[e[t+7]]+"-"+f[e[t+8]]+f[e[t+9]]+"-"+f[e[t+10]]+f[e[t+11]]+f[e[t+12]]+f[e[t+13]]+f[e[t+14]]+f[e[t+15]]}const m=function(e,t,n){if(c.randomUUID&&!t&&!e)return c.randomUUID();const r=(e=e||{}).random||(e.rng||h)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return p(r)};var g=n(1862),y=n(96060);const v=(0,o.Wp)(s.CN),b=(0,a.getFunctions)(v,"us-central1");let w=null,_=null;const E=3e5,T=new Map,S=()=>new Promise((e,t)=>{const n=(0,l.xI)(),r=(0,l.hg)(n,t=>{r(),e(t)},t)}),k=()=>"undefined"===typeof window?null:localStorage.getItem("selectedOrganizationId"),C=e=>{if("undefined"===typeof window)return;const t=localStorage.getItem("selectedOrganizationId"),n=e?String(e):null;t!==n&&(n?localStorage.setItem("selectedOrganizationId",n):localStorage.removeItem("selectedOrganizationId"),w=null,_=null,T.clear(),window.dispatchEvent(new CustomEvent("organizationChanged",{detail:{organizationId:n}})),(0,g.gg)("[OrgSwitch] setSelectedOrganization: localStorage=".concat(n,", caches cleared, event dispatched")))},I=async()=>{try{const e=(0,a.httpsCallable)(b,"getUserOrganizations");return(await e()).data.organizations||[]}catch(e){throw console.error("Error getting user organizations:",e),e}},A=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=Date.now(),r=e||k();if(r&&!t){const e=T.get(r);if(e&&e.expiry>n)return(0,g.gg)("Returning cached organization data for:",r),e.data}if(!r&&!t&&w&&_&&n<_)return w;try{const e=(0,a.httpsCallable)(b,"getUserOrganization"),t=await e(r?{organizationId:r}:{});if(!t.data.organization){if(r){C(null);try{const t=await e({});if(t.data.organization)return w=t.data.organization,_=Date.now()+E,T.set(t.data.organization.id,{data:t.data.organization,expiry:_}),t.data.organization}catch(i){console.error("Error getting user organization (retry):",i)}}throw new Error("User is not part of any organization")}const o=t.data.organization;return r?T.set(r,{data:o,expiry:n+E}):(w=o,_=n+E),(0,g.gg)("Organization data loaded:",o),o}catch(o){const e=("functions/permission-denied"===o.code||"permission-denied"===o.code)&&String(o.message||"").includes("not a member"),t="functions/not-found"===o.code||"not-found"===o.code||String(o.message||"").includes("Organization not found");if(r&&(e||t)){C(null);try{const e=(0,a.httpsCallable)(b,"getUserOrganization"),t=await e({});if(t.data.organization)return w=t.data.organization,_=Date.now()+E,T.set(t.data.organization.id,{data:t.data.organization,expiry:_}),t.data.organization;throw new Error("User is not part of any organization")}catch(i){throw String((null===i||void 0===i?void 0:i.message)||"").includes("User is not part of any organization")||console.error("Error getting user organization (retry):",i),i}}throw String((null===o||void 0===o?void 0:o.message)||"").includes("User is not part of any organization")||console.error("Error getting user organization:",o),o}},R=()=>{w=null,_=null,T.clear()},P=async()=>{try{const e=(0,a.httpsCallable)(b,"getWorkspaces"),t=await e();return(0,g.gg)("Workspaces result:",t.data),t.data}catch(e){return console.error("Error fetching workspaces:",e),[{id:"LprYEcApyxcXWRjAZ9UO",name:"test",organizationId:"demo-org",createdAt:"May 20, 2025 at 9:59:18 PM UTC-4",documentsCount:0,storageUsed:0,visibility:"organization"},{id:"workspace-2",name:"Marketing Team",organizationId:"demo-org",createdAt:"May 18, 2025 at 2:30:15 PM UTC-4",documentsCount:15,storageUsed:2048,visibility:"organization"},{id:"workspace-3",name:"Product Development",organizationId:"demo-org",createdAt:"May 15, 2025 at 10:15:30 AM UTC-4",documentsCount:42,storageUsed:8192,visibility:"organization"}]}},N=async()=>{try{const e=await A();if(!e)return(0,g.gg)("No organization found for user"),[];(0,g.gg)("User is a ".concat(e.role," in organization ").concat(e.name));const t=(0,a.httpsCallable)(b,"getWorkspaces"),n=await t(),i=(n.data||[]).filter(t=>t.organizationId===e.id);(0,g.gg)("Found ".concat(i.length," accessible workspaces in organization"));return i.map(t=>(0,r.A)((0,r.A)({},t),{}
2,{organizationName:e.name,orgRole:e.role}))}catch(e){return console.error("Error loading workspaces:",e),[]}},O=async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};try{const c=await S();if(!c)throw new Error("You must be logged in to send invitations");const u=await A();if(!u)throw new Error("No organization found for user");if(!u.canManageMembers)throw new Error("You do not have permission to send invitations");const d=(0,i.doc)(s.db,"users",c.uid),h=await(0,i.getDoc)(d),f=h.exists()?h.data():{};let p=c.displayName&&String(c.displayName).trim()||c.email;if(null!==f&&void 0!==f&&f.name&&"string"===typeof f.name)if((0,y.NQ)(f.name))try{const e=await(0,y.k5)(c.uid),t=await(0,y.PV)(f.name,e);if(t){const e=(0,y.pM)(t);"string"===typeof e&&e.trim()?(p=e.trim(),(0,g.gg)("\u2705 Decrypted sender name:",p)):(0,g.gg)("\u26a0\ufe0f Decryption returned empty after unwrap, using display name or email")}else(0,g.gg)("\u26a0\ufe0f Decryption returned empty, using display name or email")}catch(l){console.error("\u274c Error decrypting sender name:",l),(0,g.gg)("\u26a0\ufe0f Failed to decrypt name, using display name or email")}else f.name.trim()&&(p=f.name.trim());const v=!0===(o&&"object"===typeof o?o:{}).workspaceOnly,w=[],_=new Date;_.setDate(_.getDate()+14);for(const o of e){const e=m(),l=await(0,i.gS)((0,i.rJ)(s.db,"pendingInvitations"),{email:o.trim().toLowerCase(),role:t,invitedBy:c.uid,invitedByName:p,message:n,token:e,invitedAt:(0,i.O5)(),expiresAt:_,status:"pending",organizationId:u.id,selectedWorkspaces:r,inviteType:v?"workspace":"organization",workspaceOnly:v}),d=(0,a.httpsCallable)(b,"sendInviteEmail");await d({email:o.trim(),senderName:p,role:t,message:n,token:e,expiresAt:_.toISOString(),workspaceCount:r.length,organizationId:u.id,organizationName:u.name,workspaceOnly:v}),(0,g.gg)("Creating invite for:",o),w.push({id:l.id,email:o.trim(),role:t,invitedBy:p,invitedAt:(new Date).toISOString().split("T")[0],status:"pending"})}return w}catch(c){throw console.error("Error sending invitations:",c),c}},x=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{const t=(0,a.httpsCallable)(b,"getPendingInvitations"),n=null!==e&&void 0!==e?e:k();return(await t(n?{organizationId:n}:{})).data||[]}catch(t){throw console.error("Error getting pending invitations:",t),t}},L=async e=>{try{if(!await S())throw new Error("You must be logged in to cancel invitations");if(!(await(async()=>{try{const e=await A();return{canInviteUsers:(null===e||void 0===e?void 0:e.canManageMembers)||!1,canRemoveUsers:(null===e||void 0===e?void 0:e.canManageMembers)||!1,canUpdateRoles:(null===e||void 0===e?void 0:e.canManageMembers)||!1,canEditSettings:(null===e||void 0===e?void 0:e.canEditSettings)||!1,isAdmin:(null===e||void 0===e?void 0:e.isAdmin)||!1,isEditor:(null===e||void 0===e?void 0:e.isEditor)||!1,organizationName:(null===e||void 0===e?void 0:e.name)||"Unknown",userRole:(null===e||void 0===e?void 0:e.role)||"member"}}catch(e){return console.error("Error checking permissions:",e),{canInviteUsers:!1,canRemoveUsers:!1,canUpdateRoles:!1,canEditSettings:!1,isAdmin:!1,isEditor:!1,organizationName:"Unknown",userRole:"member"}}})()).canInviteUsers)throw new Error("You do not have permission to cancel invitations");return await(0,i.kd)((0,i.doc)(s.db,"pendingInvitations",e)),{success:!0}}catch(t){throw console.error("Error canceling invitation:",t),t}},D=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"viewer",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{const r=await S();if(!r)throw new Error("You must be logged in to create invite links");const o=await A();if(!o)throw new Error("No organization found for user");if(!o.canManageMembers)throw new Error("You do not have permission to create invite links");const a=!0===(n&&"object"===typeof n?n:{}).workspaceOnly,l=m(),c=new Date;c.setDate(c.getDate()+7),await(0,i.BN)((0,i.doc)(s.db,"inviteLinks",l),{role:e,createdBy:r.uid,createdAt:(0,i.O5)(),expiresAt:c,organizationId:o.id,selectedWorkspaces:t,inviteType:a?"workspace":"organization",workspaceOnly:a,active:!0});return{url:"".concat(window.location.origin,"/accept-invite?token=").concat(l),expiresAt:c.toISOString(),role:e}}catch(r){throw console.error("Error generating invite link:",r),r}},M=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{const t=(0,a.httpsCallable)(b,"getTeamMembers"),n=null!==e&&void 0!==e?e:k();return(await t(n?{organizationId:n}:{})).data||[]}catch(t){throw console.error("Error getting team members:",t),t}},U=async(e,t)=>{try{const n=await S();if(!n)throw new Error("You must be logged in to update user roles");const r=await A();if(!r)throw new Error("No organization found for user");if(!r.canManageMembers)throw new Error("You do not have permission to update user roles");if(e===n.uid)throw new Error("You cannot change your own role");const o=(0,i.doc)(s.db,"organizations",r.id);
2await(0,i.mZ)(o,{["memberRoles.".concat(e)]:t,updatedAt:(0,i.O5)()});const a=(0,i.doc)(s.db,"users",e);return await(0,i.mZ)(a,{role:t,updatedAt:(0,i.O5)()}),R(),(0,g.gg)("Updated user ".concat(e," role to ").concat(t," in organization ").concat(r.id)),{success:!0}}catch(n){throw console.error("Error updating user role:",n),n}},F=async e=>{try{const n=await S();if(!n)throw new Error("You must be logged in to remove users");if(e===n.uid)throw new Error("You cannot remove yourself from the organization");let r=k();if(!r)try{const e=await A(null,!0);e&&e.id&&(r=e.id)}catch(t){console.warn("Could not get organization from backend:",t)}if(!r)throw new Error("Unable to determine which organization to remove the user from. Please select an organization.");const i=(0,a.httpsCallable)(b,"removeUserFromOrganization"),o=await i({userId:e,organizationId:r});return R(),(0,g.gg)("Successfully removed user ".concat(e," from organization ").concat(r)),o.data||{success:!0}}catch(n){if(console.error("Error removing user:",n),n.message&&n.message.includes("not a member"))throw new Error("Unable to remove user. They may have already been removed or are not a member of this organization.");if(n.message&&(n.message.includes("permission-denied")||n.message.includes("permission")||n.message.includes("insufficient")))throw new Error("You do not have permission to perform this action. Only organization admins can remove users.");if(n.message&&n.message.includes("not-found"))throw new Error("User or organization not found.");if(n.code&&n.code.startsWith("functions/"))throw n;throw n}},V=async e=>{try{const t=(0,a.httpsCallable)(b,"getWorkspaceMembers");return(await t({workspaceId:e})).data.members||[]}catch(t){throw console.error("Error getting workspace members:",t),t}},j=async(e,t)=>{try{var n;const o=await S();if(!o)throw new Error("You must be logged in to remove users from workspaces");const a=(0,i.doc)(s.db,"workspaces",e),l=await(0,i.getDoc)(a);if(!l.exists())throw new Error("Workspace not found");const c=l.data();if("admin"!==(null===(n=c.memberRoles)||void 0===n?void 0:n[o.uid])){const e=await A(c.organizationId);if(null===e||void 0===e||!e.canManageMembers)throw new Error("You do not have permission to remove users from this workspace")}const u=(0,r.A)({},c.memberRoles);return delete u[t],await(0,i.mZ)(a,{memberRoles:u,updatedAt:(0,i.O5)()}),(0,g.gg)("Removed user ".concat(t," from workspace ").concat(e)),{success:!0}}catch(o){throw console.error("Error removing user from workspace:",o),o}},z=async(e,t,n)=>{try{var r;const o=await S();if(!o)throw new Error("You must be logged in to update workspace roles");const a=(0,i.doc)(s.db,"workspaces",e),l=await(0,i.getDoc)(a);if(!l.exists())throw new Error("Workspace not found");const c=l.data();if("admin"!==(null===(r=c.memberRoles)||void 0===r?void 0:r[o.uid])){const e=await A(c.organizationId);if(null===e||void 0===e||!e.canManageMembers)throw new Error("You do not have permission to update roles in this workspace")}return await(0,i.mZ)(a,{["memberRoles.".concat(t)]:n,updatedAt:(0,i.O5)()}),(0,g.gg)("Updated user ".concat(t," role to ").concat(n," in workspace ").concat(e)),{success:!0}}catch(o){throw console.error("Error updating workspace role:",o),o}}},42773(e,t,n){n.d(t,{BP:()=>s,Ce:()=>a,In:()=>d,Kn:()=>f,Uy:()=>o,XI:()=>u,tu:()=>h,z1:()=>i});const r=new Set(["trybased.com","www.trybased.com","crm.trybased.com","mcp.trybased.com","localhost","127.0.0.1"]);function i(){return"undefined"===typeof window?"trybased.com":(window.location.hostname||"").toLowerCase().replace(/\.$/,"")}function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i();const t=String(e||"").toLowerCase().replace(/\.$/,"");return!t||(!!r.has(t)||!!t.endsWith(".vercel.app"))}function a(){return!o(arguments.length>0&&void 0!==arguments[0]?arguments[0]:i())}function s(){return o(arguments.length>0&&void 0!==arguments[0]?arguments[0]:i())}function l(){var e;return"undefined"!==typeof window&&null!==(e=window.location)&&void 0!==e&&e.origin?window.location.origin:"https://trybased.com"}function c(e){const t=String((null===e||void 0===e?void 0:e.hostname)||"").trim().toLowerCase().replace(/\.$/,"");return t&&"active"===(null===e||void 0===e?void 0:e.status)&&!o(t)?"https://".concat(t):null}function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return String((null===e||void 0===e?void 0:e.hostname)||"").toLowerCase().startsWith("mascot.")||"mascot"===(null===e||void 0===e?void 0:e.purpose)?l():c(e)||l()}function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i();return String(e||"").toLowerCase().replace(/\.$/,"").startsWith("mascot.")}function h(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(String((null===e||void 0===e?void 0:e.hostname)||"").toLowerCase().startsWith("docs.")||"shared"===(null===e||void 0===e?void 0:e.purpose));else{const t=c(e);if(t)return t}if("undefined"!==typeof window){const e=window.location,t=e.hostname,n=e.origin;if("localhost"===t||"127.0.0.1"===t)return n}return"https://www.trybased.com"}async function f(e){const t=(e||i()||"").trim().toLowerCase();if(!t||o(t))throw new Error("Not a custom domain");const n="".concat("https://us-central1-aiknowledgebase-7427e.cloudfunctions.net/resolveCustomDomain","?host=").concat(encodeURIComponent(t)),r=await fetch(n);if(!r.ok){const e=await r.json().catch(()=>({}));throw new Error(e.error||"Custom domain not found")}return r.json()}},73651(e,t,n){n.d(t,{g:()=>r});const r=function(){0}},87183(e,t,n){n.d(t,{S:()=>c,a:()=>u});var r=n(5544),i=n(65043),o=n(67898),a=n(96060),s=n(70579);const l=(0,i.createContext)(null),c=e=>{let t=e.children;const n=(0,i.useState)(null),c=(0,r.A)(n,2),u=c[0],d=c[1];return(0,i.useEffect)(()=>{const e=(0,o.xI)(),t=(0,o.hg)(e,async e=>{if(e){const t=await(0,a.k5)(e.uid);d(t)}else d(null)});return()=>t()},[]),(0,s.jsx)(l.Provider,{value:{key:u,setKey:d},children:t})},u=()=>(0,i.useContext)(l)},96060(e,t,n){n.d(t,{FA:()=>h,FL:()=>w,NQ:()=>p,PV:()=>f,VQ:()=>b,YC:()=>u,_r:()=>v,cI:()=>g,k5:()=>d,pM:()=>m,tE:()=>y});var r=n(89379),i=n(1862);const o=new TextEncoder,a=new TextDecoder,s=1e5,l="based-app-salt-123";function c(){var e;const t="undefined"!==typeof window?window:{},n=null===t||void 0===t||null===(e=t.crypto)||void 0===e?void 0:e.subtle;if(n)return n;const r=(()=>{try{var e;return null===t||void 0===t||null===(e=t.location)||void 0===e?void 0:e.origin}catch(n){return}})(),i=Boolean(null===t||void 0===t?void 0:t.isSecureContext),o="Encryption is unavailable because WebCrypto (crypto.subtle) is not available in this browser context."+(r?" Origin: ".concat(r,"."):"")+" This typically happens when the app is loaded over HTTP instead of HTTPS."+(i?"":" (Not a secure context.)")+" Use HTTPS (or localhost) and try again.",a=new Error(o);throw a.name="WebCryptoUnavailableError",a}async function u(e){const t=c(),n="".concat(e,"-workspace-salt"),r="".concat(n,"-based-saas"),i=o.encode(l),a=await t.importKey("raw",o.encode(r),"PBKDF2",!1,["deriveKey"]);return t.deriveKey({name:"PBKDF2",salt:i,iterations:s,hash:"SHA-256"},a,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function d(e){const t=c(),n="".concat(e,"-based-saas"),r=o.encode(l),i=await t.importKey("raw",o.encode(n),"PBKDF2",!1,["deriveKey"]);return t.deriveKey({name:"PBKDF2",salt:r,iterations:s,hash:"SHA-256"},i,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function h(e,t){const n=c(),r=crypto.getRandomValues(new Uint8Array(12)),i=await n.encrypt
2({name:"AES-GCM",iv:r},t,o.encode(e)),a=new Uint8Array(r.length+i.byteLength);a.set(r),a.set(new Uint8Array(i),r.length);const s=Array.from(a).map(e=>String.fromCharCode(e)).join("");return btoa(s)}async function f(e,t){try{const n=c();if((0,i.gg)("\ud83d\udd0d Attempting to decrypt:",{base64Data:e,dataType:typeof e,isArray:Array.isArray(e),dataLength:null===e||void 0===e?void 0:e.length,firstItem:Array.isArray(e)?e[0]:null}),Array.isArray(e))return(0,i.gg)("\u26a0\ufe0f Received array instead of encrypted string - returning as-is"),e;if(!e||"string"!==typeof e)return console.error("\u274c Invalid encrypted data:",e),null;if(!/^[A-Za-z0-9+/]*={0,2}$/.test(e))return console.error("\u274c Data doesn't look like valid Base64:",e),null;(0,i.gg)("\u2705 About to call atob()...");const r=Uint8Array.from(atob(e),e=>e.charCodeAt(0));(0,i.gg)("\u2705 Successfully decoded Base64");const o=r.slice(0,12),s=r.slice(12),l=await n.decrypt({name:"AES-GCM",iv:o},t,s),u=a.decode(l);return(0,i.gg)("\u2705 Successfully decrypted text",u),u}catch(n){return console.error("\u274c Decryption failed:",n),console.error("\ud83d\udcc4 Failed data:",e),"InvalidCharacterError"===n.name&&((0,i.gg)("\ud83e\uddf9 Clearing potentially corrupted localStorage data"),localStorage.removeItem("encryptedUserProfile"),localStorage.removeItem("userCredential")),null}}function p(e){if(!e||"string"!==typeof e)return!1;return e.length>30&&/^[A-Za-z0-9+/=]+$/.test(e)&&!e.includes("@")&&!e.includes(" ")}function m(e){if(null==e||"string"!==typeof e)return e;try{const t=JSON.parse(e);if("string"===typeof t)return t}catch(t){}return e}async function g(e,t,n){if(!e||!t||!Array.isArray(n))throw new Error("Missing required parameters for dual encryption");try{(0,i.gg)("\ud83d\udd10 Creating dual encryption for workspaces:",n);const r=await d(t),o=await h(e,r),a={};for(const t of n){(0,i.gg)("\ud83d\udd10 Encrypting for workspace: ".concat(t));const n=await u(t);a[t]=await h(e,n)}return(0,i.gg)("\u2705 Dual encryption completed successfully"),{userEncryptedResult:o,workspaceEncryptedResults:a,isEncrypted:!0,encryptionMethod:"dual"}}catch(r){throw console.error("\u274c Dual encryption failed:",r),r}}async function y(e,t){if(!e||!t)throw new Error("Missing required parameters for user-only encryption");const n=await d(t);return{userEncryptedResult:await h(e,n),isEncrypted:!0,encryptionMethod:"user"}}async function v(e,t){if(!e||!t)return null;const n=e[t];if(!n)return console.warn("No encryption found for workspace: ".concat(t)),null;try{(0,i.gg)("\ud83d\udd13 Decrypting with workspace key for: ".concat(t));const e=await u(t),r=await f(n,e);return r?(0,i.gg)("\u2705 Successfully decrypted with workspace key: ".concat(t)):(0,i.gg)("\u274c Failed to decrypt with workspace key: ".concat(t)),r}catch(r){return console.error("\u274c Failed to decrypt with workspace key for ".concat(t,":"),r),null}}function b(e,t){return!e.isEncrypted||!("dual"!==e.encryptionMethod||!e.workspaceEncryptedResults)&&Boolean(e.workspaceEncryptedResults[t])}async function w(e,t,n){if(!e.isEncrypted||"dual"===e.encryptionMethod)return e;try{(0,i.gg)("\ud83d\udd04 Migrating legacy document to dual encryption");const o=await d(t),a=await f(e.encryptedResult,o);if(!a)return console.error("Could not decrypt legacy document for migration"),e;const s=await g(a,t,n);return(0,i.gg)("\u2705 Legacy document migrated successfully"),(0,r.A)((0,r.A)((0,r.A)({},e),s),{},{encryptedResult:void 0})}catch(o){return console.error("\u274c Migration failed:",o),e}}},80550(e,t,n){n.d(t,{kF:()=>o,yc:()=>i});var r=n(55472);async function i(e,t,n){if(e&&t)try{const i=(0,r.aU)();await(0,r.BN)((0,r.doc)(i,"users",e,"workspaceUsage",t),{lastAccessedAt:(0,r.O5)(),organizationId:n||null},{merge:!0})}catch(i){console.warn("recordWorkspaceUsage failed:",(null===i||void 0===i?void 0:i.message)||i)}}async function o(e,t){if(!e)return null;const n=new Set(Array.isArray(t)?t.filter(Boolean):[]);if(0===n.size)return null;try{const t=await async function(e){const t=(0,r.aU)(),n=(0,r.P)((0,r.rJ)(t,"users",e,"workspaceUsage"),(0,r.My)("lastAccessedAt","desc"),(0,r.AB)(25));return(0,r.GG)(n)}(e);for(const e of t.docs){if(!n.has(e.id))continue;const t=e.data();return{workspaceId:e.id,organizationId:t.organizationId||null}}return null}catch(i){return console.warn("getMostRecentWorkspace failed:",(null===i||void 0===i?void 0:i.message)||i),null}}},10430(e,t,n){n.d(t,{NH:()=>a,ft:()=>i,ur:()=>o,ut:()=>r});const r="currentWorkspaceId";function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e?null!=t&&""!==String(t).trim()?"currentWorkspaceId_".concat(e,"_").concat(t):"currentWorkspaceId_".concat(e):r}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("undefined"===typeof window)return null;const n=localStorage.getItem(r);if(e){const o=i(e,null);if(null!=t&&""!==String(t).trim()){const n=localStorage.getItem(i(e,t));if(n)return n}const a=localStorage.getItem(o);return a||(n?(localStorage.setItem(o,n),localStorage.removeItem(r),n):null)}return n||null}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("undefined"===typeof window)return;if(localStorage.removeItem(r),!e)return;if(null!=t&&""!==String(t).trim())return void localStorage.removeItem(i(e,t));localStorage.removeItem(i(e,null));const n="currentWorkspaceId_".concat(e,"_");try{const e=[];for(let t=0;t<localStorage.length;t+=1){const r=localStorage.key(t);r&&r.startsWith(n)&&e.push(r)}
2e.forEach(e=>localStorage.removeItem(e))}catch(o){}}},51529(e,t,n){n.d(t,{cY:()=>m,FA:()=>D,g:()=>L,dM:()=>x,u:()=>l,Uj:()=>s,p9:()=>G,Fy:()=>v,tD:()=>q,bD:()=>F,hp:()=>B,T9:()=>f,Tj:()=>d,yU:()=>h,XA:()=>p,mS:()=>c,Ku:()=>K,ZQ:()=>E,sr:()=>C,zJ:()=>g,c1:()=>k,Im:()=>U,lT:()=>A,zW:()=>N,jZ:()=>T,lV:()=>I,nr:()=>R,Ov:()=>P,gE:()=>y,Am:()=>j,I9:()=>z,P1:()=>_,eX:()=>O});var r=n(5544);const i=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},o={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],o=i+1<e.length,a=o?e[i+1]:0,s=i+2<e.length,l=s?e[i+2]:0,c=t>>2,u=(3&t)<<4|a>>4;let d=(15&a)<<2|l>>6,h=63&l;s||(h=64,o||(d=64)),r.push(n[c],n[u],n[d],n[h])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(i(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 o=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&o)}else if(i>239&&i<365){const o=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else{const o=e[n++],a=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&a)}}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++)],o=i<e.length?n[e.charAt(i)]:0;++i;const s=i<e.length?n[e.charAt(i)]:64;++i;const l=i<e.length?n[e.charAt(i)]:64;if(++i,null==t||null==o||null==s||null==l)throw new a;const c=t<<2|o>>4;if(r.push(c),64!==s){const e=o<<4&240|s>>2;if(r.push(e),64!==l){const e=s<<6&192|l;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 a extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const s=function(e){return function(e){const t=i(e);return o.encodeByteArray(t,!0)}(e).replace(/\./g,"")},l=function(e){try{return o.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function c(){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 u=()=>{try{return c().__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_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Gary Riger",REACT_APP_VERCEL_GIT_PROVIDER:"github",REACT_APP_VERCEL_PROJECT_ID:"prj_A5c8ZMv75ibxQVceA3I7GjPny9oD",REACT_APP_VERCEL_GIT_PULL_REQUEST_ID:"",REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG:'{"analytics":{"scriptSrc":"8f81e36d25c71756/script.
2js","viewEndpoint":"8f81e36d25c71756/view","eventEndpoint":"8f81e36d25c71756/event","sessionEndpoint":"8f81e36d25c71756/session"},"speedInsights":{"scriptSrc":"1e9f61cb490e195d/script.js","endpoint":"1e9f61cb490e195d/vitals"}}',REACT_APP_VERCEL_BRANCH_URL:"based-git-main-trybased.vercel.app",REACT_APP_VERCEL_GIT_COMMIT_MESSAGE:'feat: enhance mascot URL handling and redirection\n\n- Added redirects for mascot custom domains to serve links at `/{id}` instead of `/mascot/{id}`.\n- Updated the canonical URL generation in the mascot API to accommodate custom hostnames.\n- Introduced utility functions to determine mascot link paths and identify "Mascot says" links.\n- Adjusted various components and tests to reflect the new URL structure and ensure proper handling of mascot links.\n\nThis update improves the user experience for mascot domain visitors and streamlines the sharing process for mascot-related content.',REACT_APP_VERCEL_DEPLOYMENT_ID:"dpl_6FrDCtvXefHewS7qWdFGdtdrWfow",REACT_APP_VERCEL_GIT_REPO_SLUG:"knowledge-base-saas",REACT_APP_VERCEL_TARGET_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_SHA:"bb4db2da80ad880ce8eb95828efa1bf5f6feeb22",REACT_APP_VERCEL_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_REF:"main",REACT_APP_VERCEL_URL:"based-acjo68u8l-trybased.vercel.app",REACT_APP_VERCEL_PROJECT_PRODUCTION_URL:"www.trybased.com",REACT_APP_VERCEL_GIT_PREVIOUS_SHA:"",REACT_APP_VERCEL_GIT_REPO_ID:"980833582",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"grigerny",REACT_APP_VERCEL_GIT_REPO_OWNER:"grigerny"}.__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&&l(e[1]);return t&&JSON.parse(t)})()}catch(e){return void console.info("Unable to get __FIREBASE_DEFAULTS__ due to: ".concat(e))}},d=e=>{var t,n;return null===(n=null===(t=u())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},h=e=>{const t=d(e);if(!t)return;const n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw new Error("Invalid host ".concat(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]},f=()=>{var e;return null===(e=u())||void 0===e?void 0:e.config},p=e=>{var t;return null===(t=u())||void 0===t?void 0:t["_".concat(e)]};class m{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 g(e){try{return(e.startsWith("http://")||e.startsWith("https://")?new URL(e).hostname:e).endsWith(".cloudworkstations.dev")}catch(t){return!1}}async function y(e){return(await fetch(e,{credentials:"include"})).ok}function v(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 o=Object.assign({iss:"https://securetoken.google.com/".concat(n),aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[s(JSON.stringify({alg:"none",type:"JWT"})),s(JSON.stringify(o)),""].join(".")}const b={};let w=!1;function _(e,t){if("undefined"===typeof window||"undefined"===typeof document||!g(window.location.host)||b[e]===t||b[e]||w)return;function n(e){return"__firebase__banner__".concat(e)}b[e]=t;const r="__firebase__banner",i=function(){const e={prod:[],emulator:[]};for(const t of Object.keys(b))b[t]?e.emulator.push(t):e.prod.push(t);return e}().prod.length>0;function o(){const e=document.createElement("span");return e.style.cursor="pointer",e.style.marginLeft="16px",e.style.fontSize="24px",e.innerHTML=" &times;",e.onclick=()=>{w=!0,function(){const e=document.getElementById(r);e&&e.remove()}()},e}function a(){const e=function(e){let t=document.getElementById(e),n=!1;return t||(t=document.createElement("div"),t.setAttribute("id",e),n=!0),{created:n,element:t}}(r),t=n("text"),a=document.getElementById(t)||document.createElement("span"),s=n("learnmore"),l=document.getElementById(s)||document.createElement("a"),c=n("preprendIcon"),u=document.getElementById(c)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.created){const t=e.element;!function(e){e.style.display="flex",e.style.background="#7faaf0",e.style.position="fixed",e.style.bottom="5px",e.style.left="5px",e.style.padding=".5em",e.style.borderRadius="5px",e.style.alignItems="center"}(t),function(e,t){e.setAttribute("id",t),e.innerText="Learn more",e.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",e.setAttribute("target","__blank"),e.style.paddingLeft="5px",e.style.textDecoration="underline"}(l,s);const n=o();!function(e,t){e.setAttribute("width","24"),e.setAttribute("id",t),e.setAttribute("height","24"),e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("fill","none"),e.style.marginLeft="-6px"}(u,c),t.append(u,a,l,n),document.body.appendChild(t)}i?(a.innerText="Preview backend disconnected.",u.innerHTML='<g clip-path="url(#clip0_6013_33858)">\n<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/>\n</g>\n<defs>\n<clipPath id="clip0_6013_33858">\n<rect width="24" height="24" fill="white"/>\n</clipPath>\n</defs>'):(u.innerHTML='<g clip-path="url(#clip0_6083_34804)">\n<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 
212.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/>\n</g>\n<defs>\n<clipPath id="clip0_6083_34804">\n<rect width="24" height="24" fill="white"/>\n</clipPath>\n</defs>',a.innerText="Preview backend running in this workspace."),a.setAttribute("id",t)}"loading"===document.readyState?window.addEventListener("DOMContentLoaded",a):a()}function E(){return"undefined"!==typeof navigator&&"string"===typeof navigator.userAgent?navigator.userAgent:""}function T(){return"undefined"!==typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(E())}function S(){var e;const t=null===(e=u())||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}}function k(){return"undefined"!==typeof navigator&&"Cloudflare-Workers"===navigator.userAgent}function C(){const e="object"===typeof chrome?chrome.runtime:"object"===typeof browser?browser.runtime:void 0;return"object"===typeof e&&void 0!==e.id}function I(){return"object"===typeof navigator&&"ReactNative"===navigator.product}function A(){const e=E();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function R(){return!S()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function P(){return!S()&&!!navigator.userAgent&&(navigator.userAgent.includes("Safari")||navigator.userAgent.includes("WebKit"))&&!navigator.userAgent.includes("Chrome")}function N(){try{return"object"===typeof indexedDB}catch(e){return!1}}function O(){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)}})}function x(){return!("undefined"===typeof navigator||!navigator.cookieEnabled)}class L extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,L.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="".concat(this.service,"/").concat(e),r=this.errors[e],i=r?function(e,t){return e.replace(M,(e,n)=>{const r=t[n];return null!=r?String(r):"<".concat(n,"?>")})}(r,t):"Error",o="".concat(this.serviceName,": ").concat(i," (").concat(n,").");return new L(n,o,t)}}const M=/\{\$([^}]+)}/g;function U(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function F(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],o=t[i];if(V(n)&&V(o)){if(!F(n,o))return!1}else if(n!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function V(e){return null!==e&&"object"===typeof e}function j(e){const t=[];for(const i of Object.entries(e)){var n=(0,r.A)(i,2);const e=n[0],o=n[1];Array.isArray(o)?o.forEach(n=>{t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))}):t.push(encodeURIComponent(e)+"="+encodeURIComponent(o))}return t.length?"&"+t.join("&"):""}function z(e){const t={};
2return e.replace(/^\?/,"").split("&").forEach(e=>{if(e){const n=e.split("="),i=(0,r.A)(n,2),o=i[0],a=i[1];t[decodeURIComponent(o)]=decodeURIComponent(a)}}),t}function B(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}function q(e,t){const n=new H(e,t);return n.subscribe.bind(n)}class H{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=W),void 0===r.error&&(r.error=W),void 0===r.complete&&(r.complete=W);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(()=>{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 W(){}function G(e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;const n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3)*Math.pow(t,e),r=Math.round(.5*n*(Math.random()-.5)*2);return Math.min(144e5,n+r)}function K(e){return e&&e._delegate?e._delegate:e}},77784(e,t,n){n.d(t,{A:()=>f});var r=n(89379),i=n(53986),o=n(65043);const a=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()};var l=n(5544),c={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const u=["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"],d=(0,o.forwardRef)((e,t)=>{let n=e.color,a=void 0===n?"currentColor":n,d=e.size,h=void 0===d?24:d,f=e.strokeWidth,p=void 0===f?2:f,m=e.absoluteStrokeWidth,g=e.className,y=void 0===g?"":g,v=e.children,b=e.iconNode,w=(0,i.A)(e,u);return(0,o.createElement)("svg",(0,r.A)((0,r.A)((0,r.A)({ref:t},c),{},{width:h,height:h,stroke:a,strokeWidth:m?24*Number(p)/Number(h):p,className:s("lucide",y)},!v&&!(e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(w)&&{"aria-hidden":"true"}),w),[...b.map(e=>{let t=(0,l.A)(e,2),n=t[0],r=t[1];return(0,o.createElement)(n,r)}),...Array.isArray(v)?v:[v]])}),h=["className"],f=(e,t)=>{const n=(0,o.forwardRef)((n,l)=>{let c=n.className,u=(0,i.A)(n,h);return(0,o.createElement)(d,(0,r.A)({ref:l,iconNode:t,className:s("lucide-".concat((f=a(e),f.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase())),"lucide-".concat(e),c)},u));var f});return n.displayName=a(e),n}},22024(e,t,n){n.d(t,{A:()=>r});const r=(0,n(77784).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},97004(e,t,n){var r=n(78853),i=n(65043),o=n(97950);function a(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(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function l(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 c(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(31===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function d(e){if(l(e)!==e)throw Error(a(188))}function h(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=h(e)))return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),_=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),C=Symbol.for("react.lazy");Symbol.for("react.scope");var I=Symbol.for("react.activity");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var A=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var R=Symbol.iterator;function P(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=R&&e[R]||e["@@iterator"])?e:null}var N=Symbol.for("react.client.reference");function O(e){if(null==e)return null;if("function"===typeof e)return e.$$typeof===N?null:e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case y:return"Fragment";case b:return"Profiler";case v:return"StrictMode";case T:return"Suspense";case S:return"SuspenseList";case I:return"Activity"}if("object"===typeof e)switch(e.$$typeof){case g:return"Portal";case _:return e.displayName||"Context";case w:return(e._context.displayName||"Context")+".Consumer";case E:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case k:return null!==(t=e.displayName||null)?t:O(e.type)||"Memo";case C:t=e._payload,e=e._init;try{return O(e(t))}catch(n){}}return null}var x=Array.isArray,L=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M={pending:!1,data:null,method:null,action:null},U=[],F=-1;function V(e){return{current:e}}function j(e){0>F||(e.current=U[F],U[F]=null,F--)}function z(e,t){F++,U[F]=e.current,e.current=t}var B,q,H=V(null),W=V(null),G=V(null),K=V(null);function Q(e,t){switch(z(G,t),z(W,e),z(H,null),t.nodeType){case 9:case 11:e=(e
vendor: 4,841 bytes, line 2
2=t.documentElement)&&(e=e.namespaceURI)?yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=vd(t=yd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(H),z(H,e)}function $(){j(H),j(W),j(G)}function Y(e){null!==e.memoizedState&&z(K,e);var t=H.current,n=vd(t,e.type);t!==n&&(z(W,e),z(H,n))}function X(e){W.current===e&&(j(H),j(W)),K.current===e&&(j(K),uh._currentValue=M)}function J(e){if(void 0===B)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);B=t&&t[1]||"",q=-1<n.stack.indexOf("\n    at")?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+B+e+q}var Z=!1;function ee(e,t){if(!e||Z)return"";Z=!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)}else{try{n.call()}catch(o){r=o}e.call(n.prototype)}}else{try{throw Error()}catch(a){r=a}(n=e())&&"function"===typeof n.catch&&n.catch(function(){})}}catch(s){if(s&&r&&"string"===typeof s.stack)return[s.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 o=r.DetermineComponentFrameRoot(),a=o[0],s=o[1];if(a&&s){var l=a.split("\n"),c=s.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{Z=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?J(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return J(e.type);case 16:return J("Lazy");case 13:return e.child!==t&&null!==t?J("Suspense Fallback"):J("Suspense");case 19:return J("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return J("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(r){return"\nError generating stack: "+r.message+"\n"+r.stack}}var re=Object.prototype.hasOwnProperty,ie=r.unstable_scheduleCallback,oe=r.unstable_cancelCallback,ae=r.unstable_shouldYield,se=r.unstable_requestPaint,le=r.unstable_now,ce=r.unstable_getCurrentPriorityLevel,ue=r.unstable_ImmediatePriority,de=r.unstable_UserBlockingPriority,he=r.unstable_NormalPriority,fe=r.unstable_LowPriority,pe=r.unstable_IdlePriority,me=r.log,ge=r.unstable_setDisableYieldValue,ye=null,ve=null;function be(e){if("function"===typeof me&&ge(e),ve&&"function"===typeof ve.setStrictMode)try{ve.setStrictMode(ye,e)}catch(t){}}var we=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(_e(e)/Ee|0)|0},_e=Math.log,Ee=Math.LN2;var Te=256,Se=262144,ke=4194304;function Ce(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:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&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 Ie(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var i=0,o=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var s=134217727&r;return 0!==s?0!==(r=s&~o)?i=Ce(r):0!==(a&=s)?i=Ce(a):n||0!==(n=s&~e)&&(i=Ce(n)):0!==(s=r&~o)?i=Ce(s):0!==a?i=Ce(a):n||0!==(n=r&~e)&&(i=Ce(n)),0===i?0:0!==t&&t!==i&&0===(t&o)&&((o=i&-i)>=(n=t&-t)||32===o&&0!==(4194048&n))?t:i}function Ae(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Re(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 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}
vendor: 4,514 bytes, line 2
2function Oe(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function xe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-we(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Le(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 De(e,t){var n=t&-t;return 0!==((n=0!==(42&n)?1:Me(n))&(e.suspendedLanes|t))?0:n}function Me(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ue(e){return 2<(e&=-e)?8<e?0!==(134217727&e)?32:268435456:8:2}function Fe(){var e=D.p;return 0!==e?e:void 0===(e=window.event)?32:Ch(e.type)}function Ve(e,t){var n=D.p;try{return D.p=e,t()}finally{D.p=n}}var je=Math.random().toString(36).slice(2),ze="__reactFiber$"+je,Be="__reactProps$"+je,qe="__reactContainer$"+je,He="__reactEvents$"+je,We="__reactListeners$"+je,Ge="__reactHandles$"+je,Ke="__reactResources$"+je,Qe="__reactMarker$"+je;function $e(e){delete e[ze],delete e[Be],delete e[He],delete e[We],delete e[Ge]}function Ye(e){var t=e[ze];if(t)return t;for(var n=e.parentNode;n;){if(t=n[qe]||n[ze]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Md(e);null!==e;){if(n=e[ze])return n;e=Md(e)}return t}n=(e=n).parentNode}return null}function Xe(e){if(e=e[ze]||e[qe]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function Je(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(a(33))}function Ze(e){var t=e[Ke];return t||(t=e[Ke]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[Qe]=!0}var tt=new Set,nt={};function rt(e,t){it(e,t),it(e+"Capture",t)}function it(e,t){for(nt[e]=t,e=0;e<t.length;e++)tt.add(t[e])}var ot=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]*$"),at={},st={};function lt(e,t,n){if(i=t,re.call(st,i)||!re.call(at,i)&&(ot.test(i)?st[i]=!0:(at[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 ct(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 ut(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 dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ht(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ft(e){if(!e._valueTracker){var t=ht(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&"undefined"!==typeof r&&"function"===typeof r.get&&"function"===typeof r.set){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ht(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function mt(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 gt=/[\n"\\]/g;function yt(e){return e.replace(gt,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}
2function vt(e,t,n,r,i,o,a,s){e.name="",null!=a&&"function"!==typeof a&&"symbol"!==typeof a&&"boolean"!==typeof a?e.type=a:e.removeAttribute("type"),null!=t?"number"===a?(0===t&&""===e.value||e.value!=t)&&(e.value=""+dt(t)):e.value!==""+dt(t)&&(e.value=""+dt(t)):"submit"!==a&&"reset"!==a||e.removeAttribute("value"),null!=t?wt(e,a,dt(t)):null!=n?wt(e,a,dt(n)):null!=r&&e.removeAttribute("value"),null==i&&null!=o&&(e.defaultChecked=!!o),null!=i&&(e.checked=i&&"function"!==typeof i&&"symbol"!==typeof i),null!=s&&"function"!==typeof s&&"symbol"!==typeof s&&"boolean"!==typeof s?e.name=""+dt(s):e.removeAttribute("name")}function bt(e,t,n,r,i,o,a,s){if(null!=o&&"function"!==typeof o&&"symbol"!==typeof o&&"boolean"!==typeof o&&(e.type=o),null!=t||null!=n){if(!("submit"!==o&&"reset"!==o||void 0!==t&&null!==t))return void ft(e);n=null!=n?""+dt(n):"",t=null!=t?""+dt(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r="function"!==typeof(r=null!=r?r:i)&&"symbol"!==typeof r&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,null!=a&&"function"!==typeof a&&"symbol"!==typeof a&&"boolean"!==typeof a&&(e.name=a),ft(e)}function wt(e,t,n){"number"===t&&mt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function _t(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=""+dt(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 Et(e,t,n){null==t||((t=""+dt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+dt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function Tt(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(a(92));if(x(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}null==n&&(n=""),t=n}n=dt(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r),ft(e)}function St(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var kt=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 Ct(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||kt.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function It(e,t,n){if(null!=t&&"object"!==typeof t)throw Error(a(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&&Ct(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&Ct(e,o,t[o])}function At(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 Rt=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"],["colorRen
2dering","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-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"]]),Pt=/^[\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 Nt(e){return Pt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ot(){}var xt=null;function Lt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.n
vendor: 4,947 bytes, line 2
2odeType?e.parentNode:e}var Dt=null,Mt=null;function Ut(e){var t=Xe(e);if(t&&(e=t.stateNode)){var n=e[Be]||null;e:switch(e=t.stateNode,t.type){case"input":if(vt(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="'+yt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Be]||null;if(!i)throw Error(a(90));vt(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&&pt(r)}break e;case"textarea":Et(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&_t(e,!!n.multiple,t,!1)}}}var Ft=!1;function Vt(e,t,n){if(Ft)return e(t,n);Ft=!0;try{return e(t)}finally{if(Ft=!1,(null!==Dt||null!==Mt)&&(Zc(),Dt&&(t=Dt,e=Mt,Mt=Dt=null,Ut(t),e)))for(t=0;t<e.length;t++)Ut(e[t])}}function jt(e,t){var n=e.stateNode;if(null===n)return null;var r=n[Be]||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(a(231,t,typeof n));return n}var zt=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),Bt=!1;if(zt)try{var qt={};Object.defineProperty(qt,"passive",{get:function(){Bt=!0}}),window.addEventListener("test",qt,qt),window.removeEventListener("test",qt,qt)}catch(Xh){Bt=!1}var Ht=null,Wt=null,Gt=null;function Kt(){if(Gt)return Gt;var e,t,n=Wt,r=n.length,i="value"in Ht?Ht.value:Ht.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Gt=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 $t(){return!0}function Yt(){return!1}function Xt(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?$t:Yt,this.isPropagationStopped=Yt,this}return f(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=$t)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=$t)},persist:function(){},isPersistent:$t}),t}var Jt,Zt,en,tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nn=Xt(tn),rn=f({},tn,{view:0,detail:0}),on=Xt(rn),an=f({},rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yn,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!==en&&(en&&"mousemove"===e.type?(Jt=e.screenX-en.screenX,Zt=e.screenY-en.screenY):Zt=Jt=0,en=e),Jt)},movementY:function(e){return"movementY"in e?e.movementY:Zt}}),sn=Xt(an),ln=Xt(f({},an,{dataTransfer:0})),cn=Xt(f({},rn,{relatedTarget:0})),un=Xt(f({},tn,{animationName:0,elapsedTime:0,pseudoElement:0})),dn=Xt(f({},tn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),hn=Xt(f({},tn,{data:0})),fn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pn={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"},mn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=mn[e])&&!!t[e]}function yn(){return gn}var vn=Xt(f({},rn,{key:function(e){if(e.key){var t=fn[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?pn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yn,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}})),bn=Xt(f({},an,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),wn=Xt(f({},rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yn})),_n=Xt(f({},tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),En=Xt(f({},an,{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})),Tn=Xt(f({},tn,{newState:0,oldState:0})),Sn=[9,13,27,32],kn=zt&&"CompositionEvent"in window,Cn=null;zt&&"documentMode"in document&&(Cn=document.documentMode);var In=zt&&"TextEvent"in window&&!Cn,An=zt&&(!kn||Cn&&8<Cn&&11>=Cn),Rn=String.fromCharCode(32),Pn=!1;function Nn(e,t){switch(e){case"keyup":return-1!==Sn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function On(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var xn=!1;var Ln={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 Dn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Ln[e.type]:"textarea"===t}function Mn(e,t,n,r){Dt?Mt?Mt.push(r):Mt=[r]:Dt=r,0<(t=rd(t,"onChange")).length&&(n=new nn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Un=null,Fn=null;function Vn(e){$u(e,0)}function jn(e){if(pt(Je(e)))return e}function zn(e,t){if("change"===e)return t}var Bn=!1;if(zt){var qn;if(zt){var Hn="oninput"in document;if(!Hn){var Wn=document.createElement("div");Wn.setAttribute("oninput","return;"),Hn="function"===typeof Wn.oninput}qn=Hn}else qn=!1;Bn=qn&&(!document.documentMode||9<document.documentMode)}function Gn(){Un&&(Un.detachEvent("onpropertychange",Kn),Fn=Un=null)}function Kn(e){if("value"===e.propertyName&&jn(Fn)){var t=[];Mn(t,Fn,e,Lt(e)),Vt(Vn,t)}}function Qn(e,t,n){"focusin"===e?(Gn(),Fn=n,(Un=t).attachEvent("onpropertychange",Kn)):"focusout"===e&&Gn()}function $n(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return jn(Fn)}function Yn(e,t){if("click"===e)return jn(t)}function Xn(e,t){if("input"===e||"change"===e)return jn(t)}var Jn="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function Zn(e,t){if(Jn(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)||!Jn(e[i],t[i]))return!1}return!0}function er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tr(e,t){var n,r=er(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=er(r)}}function nr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?nr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function rr(e){for(var t=mt((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=mt((e=t.contentWindow).document)}return t}function ir(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)}var or=zt&&"documentMode"in document&&11>=document.documentMode,ar=null,sr=null,lr=null,cr=!1;function ur(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;cr||null==ar||ar!==mt(r)||("selectionStart"in(r=ar)&&ir(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,134 bytes, line 2
2sNode:r.focusNode,focusOffset:r.focusOffset},lr&&Zn(lr,r)||(lr=r,0<(r=rd(sr,"onSelect")).length&&(t=new nn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ar)))}function dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var hr={animationend:dr("Animation","AnimationEnd"),animationiteration:dr("Animation","AnimationIteration"),animationstart:dr("Animation","AnimationStart"),transitionrun:dr("Transition","TransitionRun"),transitionstart:dr("Transition","TransitionStart"),transitioncancel:dr("Transition","TransitionCancel"),transitionend:dr("Transition","TransitionEnd")},fr={},pr={};function mr(e){if(fr[e])return fr[e];if(!hr[e])return e;var t,n=hr[e];for(t in n)if(n.hasOwnProperty(t)&&t in pr)return fr[e]=n[t];return e}zt&&(pr=document.createElement("div").style,"AnimationEvent"in window||(delete hr.animationend.animation,delete hr.animationiteration.animation,delete hr.animationstart.animation),"TransitionEvent"in window||delete hr.transitionend.transition);var gr=mr("animationend"),yr=mr("animationiteration"),vr=mr("animationstart"),br=mr("transitionrun"),wr=mr("transitionstart"),_r=mr("transitioncancel"),Er=mr("transitionend"),Tr=new Map,Sr="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 toggle touchMove waiting wheel".split(" ");function kr(e,t){Tr.set(e,t),rt(t,[e])}Sr.push("scrollEnd");var Cr="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)},Ir=[],Ar=0,Rr=0;function Pr(){for(var e=Ar,t=Rr=Ar=0;t<e;){var n=Ir[t];Ir[t++]=null;var r=Ir[t];Ir[t++]=null;var i=Ir[t];Ir[t++]=null;var o=Ir[t];if(Ir[t++]=null,null!==r&&null!==i){var a=r.pending;null===a?i.next=i:(i.next=a.next,a.next=i),r.pending=i}0!==o&&Lr(n,i,o)}}function Nr(e,t,n,r){Ir[Ar++]=e,Ir[Ar++]=t,Ir[Ar++]=n,Ir[Ar++]=r,Rr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Or(e,t,n,r){return Nr(e,t,n,r),Dr(e)}function xr(e,t){return Nr(e,null,null,t),Dr(e)}function Lr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var i=!1,o=e.return;null!==o;)o.childLanes|=n,null!==(r=o.alternate)&&(r.childLanes|=n),22===o.tag&&(null===(e=o.stateNode)||1&e._visibility||(i=!0)),e=o,o=o.return;return 3===e.tag?(o=e.stateNode,i&&null!==t&&(i=31-we(n),null===(r=(e=o.hiddenUpdates)[i])?e[i]=[t]:r.push(t),t.lane=536870912|n),o):null}function Dr(e){if(50<Hc)throw Hc=0,Wc=null,Error(a(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Mr={};function Ur(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=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 Fr(e,t,n,r){return new Ur(e,t,n,r)}function Vr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function jr(e,t){var n=e.alternate;return null===n?((n=Fr(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.deleti
2ons=null),n.flags=65011712&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 zr(e,t){e.flags&=65011714;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 Br(e,t,n,r,i,o){var s=0;if(r=e,"function"===typeof e)Vr(e)&&(s=1);else if("string"===typeof e)s=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,H.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case I:return(e=Fr(31,n,t,i)).elementType=I,e.lanes=o,e;case y:return qr(n.children,i,o,t);case v:s=8,i|=24;break;case b:return(e=Fr(12,n,t,2|i)).elementType=b,e.lanes=o,e;case T:return(e=Fr(13,n,t,i)).elementType=T,e.lanes=o,e;case S:return(e=Fr(19,n,t,i)).elementType=S,e.lanes=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case _:s=10;break e;case w:s=9;break e;case E:s=11;break e;case k:s=14;break e;case C:s=16,r=null;break e}s=29,n=Error(a(130,null===e?"null":typeof e,"")),r=null}return(t=Fr(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function qr(e,t,n,r){return(e=Fr(7,e,r,t)).lanes=n,e}function Hr(e,t,n){return(e=Fr(6,e,null,t)).lanes=n,e}function Wr(e){var t=Fr(18,null,null,0);return t.stateNode=e,t}function Gr(e,t,n){return(t=Fr(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Kr=new WeakMap;function Qr(e,t){if("object"===typeof e&&null!==e){var n=Kr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ne(t)},Kr.set(e,t),t)}return{value:e,source:t,stack:ne(t)}}var $r=[],Yr=0,Xr=null,Jr=0,Zr=[],ei=0,ti=null,ni=1,ri="";function ii(e,t){$r[Yr++]=Jr,$r[Yr++]=Xr,Xr=e,Jr=t}function oi(e,t,n){Zr[ei++]=ni,Zr[ei++]=ri,Zr[ei++]=ti,ti=e;var r=ni;e=ri;var i=32-we(r)-1;r&=~(1<<i),n+=1;var o=32-we(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,ni=1<<32-we(t)+i|n<<i|r,ri=o+e}else ni=1<<o|n<<i|r,ri=e}function ai(e){null!==e.return&&(ii(e,1),oi(e,1,0))}function si(e){for(;e===Xr;)Xr=$r[--Yr],$r[Yr]=null,Jr=$r[--Yr],$r[Yr]=null;for(;e===ti;)ti=Zr[--ei],Zr[ei]=null,ri=Zr[--ei],Zr[ei]=null,ni=Zr[--ei],Zr[ei]=null}function li(e,t){Zr[ei++]=ni,Zr[ei++]=ri,Zr[ei++]=ti,ni=t.id,ri=t.overflow,ti=e}var ci=null,ui=null,di=!1,hi=null,fi=!1,pi=Error(a(519));function mi(e){throw _i(Qr(Error(a(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),pi}function gi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ze]=e,t[Be]=r,n){case"dialog":Yu("cancel",t),Yu("close",t);break;case"iframe":case"object":case"embed":Yu("load",t);break;case"video":case"audio":for(n=0;n<Ku.length;n++)Yu(Ku[n],t);break;case"source":Yu("error",t);break;case"img":case"image":case"link":Yu("error",t),Yu("load",t);break;case"details":Yu("toggle",t);break;case"input":Yu("invalid",t),bt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Yu("invalid",t);break;case"textarea":Yu("invalid",t),Tt(t,r.value,r.defaultValue,r.children)}"string"!==typeof(n=r.children)&&"number"!==typeof n&&"bigint"!==typeof n||t.textContent===""+n||!0===r.
vendor: 2,591 bytes, line 2
2suppressHydrationWarning||cd(t.textContent,n)?(null!=r.popover&&(Yu("beforetoggle",t),Yu("toggle",t)),null!=r.onScroll&&Yu("scroll",t),null!=r.onScrollEnd&&Yu("scrollend",t),null!=r.onClick&&(t.onclick=Ot),t=!0):t=!1,t||mi(e,!0)}function yi(e){for(ci=e.return;ci;)switch(ci.tag){case 5:case 31:case 13:return void(fi=!1);case 27:case 3:return void(fi=!0);default:ci=ci.return}}function vi(e){if(e!==ci)return!1;if(!di)return yi(e),di=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||bd(e.type,e.memoizedProps)),t=!t),t&&ui&&mi(e),yi(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));ui=Dd(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));ui=Dd(e)}else 27===n?(n=ui,Cd(e.type)?(e=Ld,Ld=null,ui=e):ui=n):ui=ci?xd(e.stateNode.nextSibling):null;return!0}function bi(){ui=ci=null,di=!1}function wi(){var e=hi;return null!==e&&(null===Pc?Pc=e:Pc.push.apply(Pc,e),hi=null),e}function _i(e){null===hi?hi=[e]:hi.push(e)}var Ei=V(null),Ti=null,Si=null;function ki(e,t,n){z(Ei,t._currentValue),t._currentValue=n}function Ci(e){e._currentValue=Ei.current,j(Ei)}function Ii(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 Ai(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var o=i.dependencies;if(null!==o){var s=i.child;o=o.firstContext;e:for(;null!==o;){var l=o;o=i;for(var c=0;c<t.length;c++)if(l.context===t[c]){o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),Ii(o.return,n,e),r||(s=null);break e}o=l.next}}else if(18===i.tag){if(null===(s=i.return))throw Error(a(341));s.lanes|=n,null!==(o=s.alternate)&&(o.lanes|=n),Ii(s,n,e),s=null}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===e){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}}function Ri(e,t,n,r){e=null;for(var i=t,o=!1;null!==i;){if(!o)if(0!==(524288&i.flags))o=!0;else if(0!==(262144&i.flags))break;if(10===i.tag){var s=i.alternate;if(null===s)throw Error(a(387));if(null!==(s=s.memoizedProps)){var l=i.type;Jn(i.pendingProps.value,s.value)||(null!==e?e.push(l):e=[l])}}else if(i===K.current){if(null===(s=i.alternate))throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(null!==e?e.push(uh):e=[uh])}i=i.return}null!==e&&Ai(t,e,n,r),t.flags|=262144}function Pi(e){for(e=e.firstContext;null!==e;){if(!Jn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}
vendor: 5,459 bytes, line 2
2function Ni(e){Ti=e,Si=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Oi(e){return Li(Ti,e)}function xi(e,t){return null===Ti&&Ni(e),Li(e,t)}function Li(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===Si){if(null===e)throw Error(a(308));Si=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Si=Si.next=t;return n}var Di="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,Ui=r.unstable_NormalPriority,Fi={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vi(){return{controller:new Di,data:new Map,refCount:0}}function ji(e){e.refCount--,0===e.refCount&&Mi(Ui,function(){e.controller.abort()})}var zi=null,Bi=0,qi=0,Hi=null;function Wi(){if(0===--Bi&&null!==zi){null!==Hi&&(Hi.status="fulfilled");var e=zi;zi=null,qi=0,Hi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Gi=L.S;L.S=function(e,t){xc=le(),"object"===typeof t&&null!==t&&"function"===typeof t.then&&function(e,t){if(null===zi){var n=zi=[];Bi=0,qi=Bu(),Hi={status:"pending",value:void 0,then:function(e){n.push(e)}}}Bi++,t.then(Wi,Wi)}(0,t),null!==Gi&&Gi(e,t)};var Ki=V(null);function Qi(){var e=Ki.current;return null!==e?e:pc.pooledCache}function $i(e,t){z(Ki,null===t?Ki.current:t.pool)}function Yi(){var e=Qi();return null===e?null:{parent:Fi._currentValue,pool:e}}var Xi=Error(a(460)),Ji=Error(a(474)),Zi=Error(a(542)),eo={then:function(){}};function to(e){return"fulfilled"===(e=e.status)||"rejected"===e}function no(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(Ot,Ot),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw ao(e=t.reason),e;default:if("string"===typeof t.status)t.then(Ot,Ot);else{if(null!==(e=pc)&&100<e.shellSuspendCounter)throw Error(a(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":throw ao(e=t.reason),e}throw io=t,Xi}}function ro(e){try{return(0,e._init)(e._payload)}catch(t){if(null!==t&&"object"===typeof t&&"function"===typeof t.then)throw io=t,Xi;throw t}}var io=null;function oo(){if(null===io)throw Error(a(459));var e=io;return io=null,e}function ao(e){if(e===Xi||e===Zi)throw Error(a(483))}var so=null,lo=0;function co(e){var t=lo;return lo+=1,null===so&&(so=[]),no(so,e,t)}function uo(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function ho(e,t){if(t.$$typeof===p)throw Error(a(525));throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function fo(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=jr(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Hr(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===y?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"===typeof o&&null!==o&&o.$$typeof===C&&ro(o)===t.type)?(uo(t=i(t,n.props),n),t.return=e,t):(uo(t=Br(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Gr(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=qr(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t||"bigint"===typeof t)return(t=Hr(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case m:return uo(n=Br(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case g:return(t=Gr(t,e.mode,n)).return=e,t;case C:return h(e,t=ro(t),n)}if(x(t)||P(t))return(t=qr(t,e.mode,n,null)).return=e,t;if("function"===typeof t.then)return h(e,co(t),n);if(t.$$typeof===_)return h(e,xi(e,t),n);ho(e,t)}return null}function f(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 m:return n.key===i?c(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case C:return f(e,t,n=ro(n),r)}if(x(n)||P(n))return null!==i?null:d(e,t,n,r,null);if("function"===typeof n.then)return f(e,t,co(n),r);if(n.$$typeof===_)return f(e,t,xi(e,n),r);ho(e,n)}return null}function p(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 m:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case g:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case C:return p(e,t,n,r=ro(r),i)}if(x(r)||P(r))return d(t,e=e.get(n)||null,r,i,null);
vendor: 10,844 bytes, line 2
2if("function"===typeof r.then)return p(e,t,n,co(r),i);if(r.$$typeof===_)return p(e,t,n,xi(t,r),i);ho(t,r)}return null}function v(l,c,u,d){if("object"===typeof u&&null!==u&&u.type===y&&null===u.key&&(u=u.props.children),"object"===typeof u&&null!==u){switch(u.$$typeof){case m:e:{for(var b=u.key;null!==c;){if(c.key===b){if((b=u.type)===y){if(7===c.tag){n(l,c.sibling),(d=i(c,u.props.children)).return=l,l=d;break e}}else if(c.elementType===b||"object"===typeof b&&null!==b&&b.$$typeof===C&&ro(b)===c.type){n(l,c.sibling),uo(d=i(c,u.props),u),d.return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}u.type===y?((d=qr(u.props.children,l.mode,d,u.key)).return=l,l=d):(uo(d=Br(u.type,u.key,u.props,null,l.mode,d),u),d.return=l,l=d)}return s(l);case g:e:{for(b=u.key;null!==c;){if(c.key===b){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(d=i(c,u.children||[])).return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}(d=Gr(u,l.mode,d)).return=l,l=d}return s(l);case C:return v(l,c,u=ro(u),d)}if(x(u))return function(i,a,s,l){for(var c=null,u=null,d=a,m=a=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var y=f(i,d,s[m],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(i,d),a=o(y,a,m),null===u?c=y:u.sibling=y,u=y,d=g}if(m===s.length)return n(i,d),di&&ii(i,m),c;if(null===d){for(;m<s.length;m++)null!==(d=h(i,s[m],l))&&(a=o(d,a,m),null===u?c=d:u.sibling=d,u=d);return di&&ii(i,m),c}for(d=r(d);m<s.length;m++)null!==(g=p(d,i,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),di&&ii(i,m),c}(l,c,u,d);if(P(u)){if("function"!==typeof(b=P(u)))throw Error(a(150));return function(i,s,l,c){if(null==l)throw Error(a(151));for(var u=null,d=null,m=s,g=s=0,y=null,v=l.next();null!==m&&!v.done;g++,v=l.next()){m.index>g?(y=m,m=null):y=m.sibling;var b=f(i,m,v.value,c);if(null===b){null===m&&(m=y);break}e&&m&&null===b.alternate&&t(i,m),s=o(b,s,g),null===d?u=b:d.sibling=b,d=b,m=y}if(v.done)return n(i,m),di&&ii(i,g),u;if(null===m){for(;!v.done;g++,v=l.next())null!==(v=h(i,v.value,c))&&(s=o(v,s,g),null===d?u=v:d.sibling=v,d=v);return di&&ii(i,g),u}for(m=r(m);!v.done;g++,v=l.next())null!==(v=p(m,i,g,v.value,c))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),s=o(v,s,g),null===d?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(i,e)}),di&&ii(i,g),u}(l,c,u=b.call(u),d)}if("function"===typeof u.then)return v(l,c,co(u),d);if(u.$$typeof===_)return v(l,c,xi(l,u),d);ho(l,u)}return"string"===typeof u&&""!==u||"number"===typeof u||"bigint"===typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(d=i(c,u)).return=l,l=d):(n(l,c),(d=Hr(u,l.mode,d)).return=l,l=d),s(l)):n(l,c)}return function(e,t,n,r){try{lo=0;var i=v(e,t,n,r);return so=null,i}catch(a){if(a===Xi||a===Zi)throw a;var o=Fr(29,a,null,e.mode);return o.lanes=r,o.return=e,o}}}var po=fo(!0),mo=fo(!1),go=!1;function yo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(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 bo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&fc)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Dr(e),Lr(e,null,n),t}return Nr(e,r,t,n),Dr(e)}function _o(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194048&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Le(e,n)}}function Eo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var To=!1;function So(){if(To){if(null!==Hi)throw Hi}}function ko(e,t,n,r){To=!1;var i=e.updateQueue;go=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,u=c=l=null,s=o;;){var h=-536870913&s.lane,p=h!==s.lane;if(p?(gc&h)===h:(r&h)===h){0!==h&&h===qi&&(To=!0),null!==u&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var m=e,g=s;h=t;var y=n;switch(g.tag){case 1:if("function"===typeof(m=g.payload)){d=m.call(y,d,h);break e}d=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null===(h="function"===typeof(m=g.payload)?m.call(y,d,h):m)||void 0===h)break e;d=f({},d,h);break e;case 2:go=!0}}null!==(h=s.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=i.callbacks)?i.callbacks=[h]:p.push(h))}else p={lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,a|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(p=s).next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null===o&&(i.shared.lanes=0),Sc|=a,e.lanes=a,e.memoizedState=d}}function Co(e,t){if("function"!==typeof e)throw Error(a(191,e));e.call(t)}function Io(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Co(n[e],t)}var Ao=V(null),Ro=V(0);function Po(e,t){z(Ro,e=Ec),z(Ao,t),Ec=e|t.baseLanes}function No(){z(Ro,Ec),z(Ao,Ao.current)}function Oo(){Ec=Ro.current,j(Ao),j(Ro)}var xo=V(null),Lo=null;function Do(e){var t=e.alternate;z(jo,1&jo.current),z(xo,e),null===Lo&&(null===t||null!==Ao.current||null!==t.memoizedState)&&(Lo=e)}function Mo(e){z(jo,jo.current),z(xo,e),null===Lo&&(Lo=e)}function Uo(e){22===e.tag?(z(jo,jo.current),z(xo,e),null===Lo&&(Lo=e)):Fo()}function Fo(){z(jo,jo.current),z(xo,xo.current)}function Vo(e){j(xo),Lo===e&&(Lo=null),j(jo)}var jo=V(0);function zo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Nd(n)||Od(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(0!==(128&t.flags))return t;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 Bo=0,qo=null,Ho=null,Wo=null,Go=!1,Ko=!1,Qo=!1,$o=0,Yo=0,Xo=null,Jo=0;function Zo(){throw Error(a(321))}function ea(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Jn(e[n],t[n]))return!1;return!0}function ta(e,t,n,r,i,o){return Bo=o,qo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=null===e||null===e.memoizedState?gs:ys,Qo=!1,o=n(r,i),Qo=!1,Ko&&(o=ra(t,n,r,i)),na(e),o}function na(e){L.H=ms;var t=null!==Ho&&null!==Ho.next;if(Bo=0,Wo=Ho=qo=null,Go=!1,Yo=0,Xo=null,t)throw Error(a(300));null===e||xs||null!==(e=e.dependencies)&&Pi(e)&&(xs=!0)}function ra(e,t,n,r){qo=e;var i=0;do{if(Ko&&(Xo=null),Yo=0,Ko=!1,25<=i)throw Error(a(301));if(i+=1,Wo=Ho=null,null!=e.updateQueue){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,null!=o.memoCache&&(o.memoCache.index=0)}L.H=vs,o=t(n,r)}while(Ko);return o}function ia(){var e=L.H,t=e.useState()[0];return t="function"===typeof t.then?ua(t):t,e=e.useState()[0],(null!==Ho?Ho.memoizedState:null)!==e&&(qo.flags|=1024),t}function oa(){var e=0!==$o;return $o=0,e}function aa(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function sa(e){if(Go){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Go=!1}Bo=0,Wo=Ho=qo=null,Ko=!1,Yo=$o=0,Xo=null}function la(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Wo?qo.memoizedState=Wo=e:Wo=Wo.next=e,Wo}function ca(){if(null===Ho){var e=qo.alternate;e=null!==e?e.memoizedState:null}else e=Ho.next;var t=null===Wo?qo.memoizedState:Wo.next;if(null!==t)Wo=t,Ho=e;else{if(null===e){if(null===qo.alternate)throw Error(a(467));throw Error(a(310))}e={memoizedState:(Ho=e).memoizedState,baseState:Ho.baseState,baseQueue:Ho.baseQueue,queue:Ho.queue,next:null},null===Wo?qo.memoizedState=Wo=e:Wo=Wo.next=e}return Wo}function ua(e){var t=Yo;return Yo+=1,null===Xo&&(Xo=[]),e=no(Xo,e,t),t=qo,null===(null===Wo?t.memoizedState:Wo.next)&&(t=t.alternate,L.H=null===t||null===t.memoizedState?gs:ys),e}function da(e){if(null!==e&&"object"===typeof e){if("function"===typeof e.then)return ua(e);if(e.$$typeof===_)return Oi(e)}throw Error(a(438,String(e)))}function ha(e){var t=null,n=qo.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=qo.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},qo.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]=A;return t.index++,n}function fa(e,t){return"function"===typeof t?t(e):t}function pa(e){return ma(ca(),Ho,e)}function ma(e,t,n){var r=e.queue;if(null===r)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,null===i)e.memoizedState=o;else{var l=s=null,c=null,u=t=i.next,d=!1;do{var h=-536870913&u.lane;if(h!==u.lane?(gc&h)===h:(Bo&h)===h){var f=u.revertLane;if(0===f)null!==c&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),h===qi&&(d=!0);else{if((Bo&f)===f){u=u.next,f===qi&&(d=!0);continue}h={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=h,s=o):c=c.next=h,qo.lanes|=f,Sc|=f}h=u.action,Qo&&n(o,h),o=u.hasEagerState?u.eagerState:n(o,h)}else f={lane:h,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=f,s=o):c=c.next=f,qo.lanes|=h,Sc|=h;u=u.next}while(null!==u&&u!==t);if(null===c?s=o:c.next=l,!Jn(o,e.memoizedState)&&(xs=!0,d&&null!==(n=Hi)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=c,r.lastRenderedState=o}
vendor: 7,154 bytes, line 2
2return null===i&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ga(e){var t=ca(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);Jn(o,t.memoizedState)||(xs=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ya(e,t,n){var r=qo,i=ca(),o=di;if(o){if(void 0===n)throw Error(a(407));n=n()}else n=t();var s=!Jn((Ho||i).memoizedState,n);if(s&&(i.memoizedState=n,xs=!0),i=i.queue,Ba(wa.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||null!==Wo&&1&Wo.memoizedState.tag){if(r.flags|=2048,Ua(9,{destroy:void 0},ba.bind(null,r,i,n,t),null),null===pc)throw Error(a(349));o||0!==(127&Bo)||va(r,t,n)}return n}function va(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=qo.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},qo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function ba(e,t,n,r){t.value=n,t.getSnapshot=r,_a(t)&&Ea(e)}function wa(e,t,n){return n(function(){_a(t)&&Ea(e)})}function _a(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Jn(e,n)}catch(r){return!0}}function Ea(e){var t=xr(e,2);null!==t&&Qc(t,e,2)}function Ta(e){var t=la();if("function"===typeof e){var n=e;if(e=n(),Qo){be(!0);try{n()}finally{be(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:e},t}function Sa(e,t,n,r){return e.baseState=n,ma(e,Ho,"function"===typeof r?r:fa)}function ka(e,t,n,r,i){if(hs(e))throw Error(a(485));if(null!==(e=t.action)){var o={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};null!==L.T?n(!0):o.isTransition=!1,r(o),null===(n=t.pending)?(o.next=t.pending=o,Ca(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ca(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var o=L.T,a={};L.T=a;try{var s=n(i,r),l=L.S;null!==l&&l(a,s),Ia(e,t,s)}catch(c){Ra(e,t,c)}finally{null!==o&&null!==a.types&&(o.types=a.types),L.T=o}}else try{Ia(e,t,o=n(i,r))}catch(u){Ra(e,t,u)}}function Ia(e,t,n){null!==n&&"object"===typeof n&&"function"===typeof n.then?n.then(function(n){Aa(e,t,n)},function(n){return Ra(e,t,n)}):Aa(e,t,n)}function Aa(e,t,n){t.status="fulfilled",t.value=n,Pa(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Ca(e,n)))}function Ra(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Pa(t),t=t.next}while(t!==r)}e.action=null}function Pa(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Na(e,t){return t}function Oa(e,t){if(di){var n=pc.formState;if(null!==n){e:{var r=qo;if(di){if(ui){t:{for(var i=ui,o=fi;8!==i.nodeType;){if(!o){i=null;break t}if(null===(i=xd(i.nextSibling))){i=null;break t}}i="F!"===(o=i.data)||"F"===o?i:null}if(i){ui=xd(i.nextSibling),r="F!"===i.data;break e}}mi(r)}r=!1}r&&(t=n[0])}}return(n=la()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:t},n.queue=r,n=cs.bind(null,qo,r),r.dispatch=n,r=Ta(!1),o=ds.bind(null,qo,!1,r.queue),i={state:t,dispatch:null,action:e,pending:null},(r=la()).queue=i,n=ka.bind(null,qo,i,o,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function xa(e){return La(ca(),Ho,e)}function La(e,t,n){if(t=ma(e,t,Na)[0],e=pa(fa)[0],"object"===typeof t&&null!==t&&"function"===typeof t.then)try{var r=ua(t)}catch(a){if(a===Xi)throw Zi;throw a}else r=t;var i=(t=ca()).queue,o=i.dispatch;return n!==t.memoizedState&&(qo.flags|=2048,Ua(9,{destroy:void 0},Da.bind(null,i,n),null)),[r,o,e]}function Da(e,t){e.action=t}function Ma(e){var t=ca(),n=Ho;if(null!==n)return La(t,n,e);ca(),t=t.memoizedState;var r=(n=ca()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ua(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=qo.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},qo.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 Fa(){return ca().memoizedState}function Va(e,t,n,r){var i=la();qo.flags|=e,i.memoizedState=Ua(1|t,{destroy:void 0},n,void 0===r?null:r)}function ja(e,t,n,r){var i=ca();r=void 0===r?null:r;var o=i.memoizedState.inst;null!==Ho&&null!==r&&ea(r,Ho.memoizedState.deps)?i.memoizedState=Ua(t,o,n,r):(qo.flags|=e,i.memoizedState=Ua(1|t,o,n,r))}function za(e,t){Va(8390656,8,e,t)}function Ba(e,t){ja(2048,8,e,t)}function qa(e){var t=ca().memoizedState;return function(e){qo.flags|=4;var t=qo.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},qo.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(0!==(2&fc))throw Error(a(440));return t.impl.apply(void 0,arguments)}}function Ha(e,t){return ja(4,2,e,t)}function Wa(e,t){return ja(4,4,e,t)}function Ga(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 Ka(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null,ja(4,4,Ga.bind(null,t,e),n)}function Qa(){}function $a(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&ea(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ya(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&ea(t,r[1]))return r[0];if(r=e(),Qo){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[r,t],r}function Xa(e,t,n){return void 0===n||0!==(1073741824&Bo)&&0===(261930&gc)?e.memoizedState=t:(e.memoizedState=n,e=Kc(),qo.lanes|=e,Sc|=e,n)}function Ja(e,t,n,r){return Jn(n,t)?n:null!==Ao.current?(e=Xa(e,n,r),Jn(e,t)||(xs=!0),e):0===(42&Bo)||0!==(1073741824&Bo)&&0===(261930&gc)?(xs=!0,e.memoizedState=n):(e=Kc(),qo.lanes|=e,Sc|=e,t)}function Za(e,t,n,r,i){var o=D.p;D.p=0!==o&&8>o?o:8;var a=L.T,s={};L.T=s,ds(e,!1,t,n);try{var l=i(),c=L.S;if(null!==c&&c(s,l),null!==l&&"object"===typeof l&&"function"===typeof l.then)us(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),Gc());else us(e,t,r,Gc())}catch(u){us(e,t,{then:function(){},status:"rejected",reason:u},Gc())}finally{D.p=o,null!==a&&null!==s.types&&(a.types=s.types),L.T=a}}function es(){}function ts(e,t,n,r){if(5!==e.tag)throw Error(a(476));var i=ns(e).queue;Za(e,i,t,M,null===n?es:function(){return rs(e),n(r)})}function ns(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:M,baseState:M,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:M},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function rs(e){var t=ns(e);
vendor: 4,223 bytes, line 2
2null===t.next&&(t=e.alternate.memoizedState),us(e,t.next.queue,{},Gc())}function is(){return Oi(uh)}function os(){return ca().memoizedState}function as(){return ca().memoizedState}function ss(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Gc(),r=wo(t,e=bo(n),n);return null!==r&&(Qc(r,t,n),_o(r,t,n)),t={cache:Vi()},void(e.payload=t)}t=t.return}}function ls(e,t,n){var r=Gc();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},hs(e)?fs(t,n):null!==(n=Or(e,t,n,r))&&(Qc(n,e,r),ps(n,t,r))}function cs(e,t,n){us(e,t,n,Gc())}function us(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(hs(e))fs(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Jn(s,a))return Nr(e,t,i,0),null===pc&&Pr(),!1}catch(l){}if(null!==(n=Or(e,t,i,r)))return Qc(n,e,r),ps(n,t,r),!0}return!1}function ds(e,t,n,r){if(r={lane:2,revertLane:Bu(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},hs(e)){if(t)throw Error(a(479))}else null!==(t=Or(e,n,r,2))&&Qc(t,e,2)}function hs(e){var t=e.alternate;return e===qo||null!==t&&t===qo}function fs(e,t){Ko=Go=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ps(e,t,n){if(0!==(4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Le(e,n)}}var ms={readContext:Oi,use:da,useCallback:Zo,useContext:Zo,useEffect:Zo,useImperativeHandle:Zo,useLayoutEffect:Zo,useInsertionEffect:Zo,useMemo:Zo,useReducer:Zo,useRef:Zo,useState:Zo,useDebugValue:Zo,useDeferredValue:Zo,useTransition:Zo,useSyncExternalStore:Zo,useId:Zo,useHostTransitionStatus:Zo,useFormState:Zo,useActionState:Zo,useOptimistic:Zo,useMemoCache:Zo,useCacheRefresh:Zo};ms.useEffectEvent=Zo;var gs={readContext:Oi,use:da,useCallback:function(e,t){return la().memoizedState=[e,void 0===t?null:t],e},useContext:Oi,useEffect:za,useImperativeHandle:function(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null,Va(4194308,4,Ga.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Va(4194308,4,e,t)},useInsertionEffect:function(e,t){Va(4,2,e,t)},useMemo:function(e,t){var n=la();t=void 0===t?null:t;var r=e();if(Qo){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=la();if(void 0!==n){var i=n(t);if(Qo){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=ls.bind(null,qo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},la().memoizedState=e},useState:function(e){var t=(e=Ta(e)).queue,n=cs.bind(null,qo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Qa,useDeferredValue:function(e,t){return Xa(la(),e,t)},useTransition:function(){var e=Ta(!1);return e=Za.bind(null,qo,e.queue,!0,!1),la().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=qo,i=la();if(di){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===pc)throw Error(a(349));0!==(127&gc)||va(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,za(wa.bind(null,r,o,e),[e]),r.flags|=2048,Ua(9,{destroy:void 0},ba.bind(null,r,o,n,t),null),n},useId:function(){var e=la(),t=pc.identifierPrefix;if(di){var n=ri;t="_"+t+"R_"+(n=(ni&~(1<<32-we(ni)-1)).toString(32)+n),0<(n=$o++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Jo++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:is,useFormState:Oa,useActionState:Oa,useOptimistic:function(e){var t=la();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ds.bind(null,qo,!0,n),n.dispatch=t,[e,t]},useMemoCache:ha,useCacheRefresh:function(){return la().memoizedState=ss.bind(null,qo)},useEffectEvent:function(e){var t=la(),n={impl:e};return t.memoizedState=n,function(){if(0!==(2&fc))throw Error(a(440));return n.impl.apply(void 0,arguments)}}},ys={readContext:Oi,use:da,useCallback:$a,useContext:Oi,useEffect:Ba,useImperativeHandle:Ka,useInsertionEffect:Ha,useLayoutEffect:Wa,useMemo:Ya,useReducer:pa,useRef
2:Fa,useState:function(){return pa(fa)},useDebugValue:Qa,useDeferredValue:function(e,t){return Ja(ca(),Ho.memoizedState,e,t)},useTransition:function(){var e=pa(fa)[0],t=ca().memoizedState;return["boolean"===typeof e?e:ua(e),t]},useSyncExternalStore:ya,useId:os,useHostTransitionStatus:is,useFormState:xa,useActionState:xa,useOptimistic:function(e,t){return Sa(ca(),0,e,t)},useMemoCache:ha,useCacheRefresh:as};ys.useEffectEvent=qa;var vs={readContext:Oi,use:da,useCallback:$a,useContext:Oi,useEffect:Ba,useImperativeHandle:Ka,useInsertionEffect:Ha,useLayoutEffect:Wa,useMemo:Ya,useReducer:ga,useRef:Fa,useState:function(){return ga(fa)},useDebugValue:Qa,useDeferredValue:function(e,t){var n=ca();return null===Ho?Xa(n,e,t):Ja(n,Ho.memoizedState,e,t)},useTransition:function(){var e=ga(fa)[0],t=ca().memoizedState;return["boolean"===typeof e?e:ua(e),t]},useSyncExternalStore:ya,useId:os,useHostTransitionStatus:is,useFormState:Ma,useActionState:Ma,useOptimistic:function(e,t){var n=ca();return null!==Ho?Sa(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:ha,useCacheRefresh:as};function bs(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:f({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}vs.useEffectEvent=qa;var ws={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Gc(),i=bo(r);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=wo(e,i,r))&&(Qc(t,e,r),_o(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Gc(),i=bo(r);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=wo(e,i,r))&&(Qc(t,e,r),_o(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Gc(),r=bo(n);r.tag=2,void 0!==t&&null!==t&&(r.callback=t),null!==(t=wo(e,r,n))&&(Qc(t,e,n),_o(t,e,n))}};function _s(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!Zn(n,r)||!Zn(i,o))}function Es(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&&ws.enqueueReplaceState(t,t.state,null)}function Ts(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=f({},n)),e)void 0===n[i]&&(n[i]=e[i]);return n}function Ss(e){Cr(e)}function ks(e){console.error(e)}function Cs(e){Cr(e)}function Is(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function As(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 Rs(e,t,n){return(n=bo(n)).tag=3,n.payload={element:null},n.callback=function(){Is(e,t)},n}function Ps(e){return(e=bo(e)).tag=3,e}function Ns(e,t,n,r){var i=n.type.getDerivedStateFromError;if("function"===typeof i){var o=r.value;e.payload=function(){return i(o)},e.callback=function(){As(t,n,r)}}var a=n.stateNode;null!==a&&"function"===typeof a.componentDidCatch&&(e.callback=function(){As(t,n,r),"function"!==typeof i&&(null===Mc?Mc=new Set([this]):Mc.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Os=Error(a(461)),xs=!1;function Ls(e,t,n,r){t.child=null===e?mo(t,null,n,r):po(t,e.child,n,r)}function Ds(e,t,n,r,i){n=n.render;var o=t.ref;if("ref"in r){var a={};for(var s in r)"ref"!==s&&(a[s]=r[s])}else a=r;return Ni(t),r=ta(e,t,n,a,o,i),s=oa(),null===e||xs?(di&&s&&ai(t),t.flags|=1,Ls(e,t,r,i),t.child):(aa(e,t,i),il(e,t,i))}function Ms(e,t,n,r,i){if(null===e){var o=n.type;return"function"!==typeof o||Vr(o)||void 0!==o.defaultProps||null!==n.compare?((e=Br(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Us(e,t,o,r,i))}if(o=e.child,!ol(e,i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:Zn)(a,r)&&e.ref===t.ref)return il(e,t,i)}return t.flags|=1,(e=jr(o,r)).ref=t.ref,e.return=t,t.child=e}function Us(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(Zn(o,r)&&e.ref===t.ref){if(xs=!1,t.pendingProps=r=o,!ol(e,i))return t.lanes=e.lanes,il(e,t,i);0!==(131072&e.flags)&&(xs=!0)}}return Hs(e,t,n,r,i)}function Fs(e,t,n,r){var i=r.children,o=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(0!==(128&t.flags)){if(o=null!==o?o.baseLanes|n:n,null!==e){for(r=t.child=e.child,i=0;null!==r;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~o}else r=0,t.child=null;return js(e,t,o,n,r)}if(0===(536870912&n))return r=t.lanes=536870912,js(e,t,null!==o?o.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&$i(0,null!==o?o.cachePool:null),null!==o?Po(t,o):No(),Uo(t)}else null!==o?($i(0,o.cachePool),Po(t,o),Fo(),t.memoizedState=null):(null!==e&&$i(0,null),No(),Fo());return Ls(e,t,i,n),t.child}function Vs(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function js(e,t,n,r,i){var o=Qi();return o=null===o?null:{parent:Fi._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},null!==e&&$i(0,null),No(),Uo(t),null!==e&&Ri(e,t,r,!0),t.childLanes=i,null}function zs(e,t){return(t=Zs({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Bs(e,t,n){return po(t,e.child,null,n),(e=zs(t,t.pendingProps)).flags|=2,Vo(t),t.memoizedState=null,e}function qs(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!==typeof n&&"object"!==typeof n)throw Error(a(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Hs(e,t,n,r,i){return Ni(t),n=ta(e,t,n,r,void 0,i),r=oa(),null===e||xs?(di&&r&&ai(t),t.flags|=1,Ls(e,t,n,i),t.child):(aa(e,t,i),il(e,t,i))}function Ws(e,t,n,r,i,o){return Ni(t),t.updateQueue=null,n=ra(t,r,n,i),na(e),r=oa(),null===e||xs?(di&&r&&ai(t),t.flags|=1,Ls(e,t,n,o),t.child):(aa(e,t,o),il(e,t,o))}function Gs(e,t,n,r,i){if(Ni(t),null===t.stateNode){var o=Mr,a=n.contextType;"object"===typeof a&&null!==a&&(o=Oi(a)),o=new n(r,o),t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,o.updater=ws,t.stateNode=o,o._reactInternals=t,(o=t.stateNode).props=r,o.state=t.memoizedState,o.refs={},yo(t),a=n.contextType,o.context="object"===typeof a&&null!==a?Oi(a):Mr,o.state=t.memoizedState,"function"===typeof(a=n.getDerivedStateFromProps)&&(bs(t,n,a,r),o.state=t.memoizedState),"function"===typeof n.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(a=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),a!==o.state&&ws.enqueueReplaceState(o,o.state,null),ko(t,r,o,i),So(),o.state=t.memoizedState),"function"===typeof o.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){o=t.stateNode;var s=t.memoizedProps,l=Ts(n,s);o.props=l;var c=o.context,u=n.contextType;a=Mr,"object"===typeof u&&null!==u&&(a=Oi(u));var d=n.getDerivedStateFromProps;u="function"===typeof d||"function"===typeof o.getSnapshotBeforeUpdate,s=t.pendingProps!==s,u||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s||c!==a)&&Es(t,o,r,a),go=!1;var h=t.memoizedState;o.state=h,ko(t,r,o,i),So(),c=t.memoizedState,s||h!==c||go?("function"===typeof d&&(bs(t,n,d,r),c=t.memoizedState),(l=go||_s(t,
2n,l,r,h,c,a))?(u||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.flags|=4194308)):("function"===typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=a,r=l):("function"===typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,vo(e,t),u=Ts(n,a=t.memoizedProps),o.props=u,d=t.pendingProps,h=o.context,c=n.contextType,l=Mr,"object"===typeof c&&null!==c&&(l=Oi(c)),(c="function"===typeof(s=n.getDerivedStateFromProps)||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(a!==d||h!==l)&&Es(t,o,r,l),go=!1,h=t.memoizedState,o.state=h,ko(t,r,o,i),So();var f=t.memoizedState;a!==d||h!==f||go||null!==e&&null!==e.dependencies&&Pi(e.dependencies)?("function"===typeof s&&(bs(t,n,s,r),f=t.memoizedState),(u=go||_s(t,n,u,r,h,f,l)||null!==e&&null!==e.dependencies&&Pi(e.dependencies))?(c||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,f,l),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,f,l)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof o.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),o.props=r,o.state=f,o.context=l,r=u):("function"!==typeof o.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return o=r,qs(e,t),r=0!==(128&t.flags),o||r?(o=t.stateNode,n=r&&"function"!==typeof n.getDerivedStateFromError?null:o.render(),t.flags|=1,null!==e&&r?(t.child=po(t,e.child,null,i),t.child=po(t,null,n,i)):Ls(e,t,n,i),t.memoizedState=o.state,e=t.child):e=il(e,t,i),e}function Ks(e,t,n,r){return bi(),t.flags|=256,Ls(e,t,n,r),t.child}var Qs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $s(e){return{baseLanes:e,cachePool:Yi()}}function Ys(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=Ic),e}function Xs(e,t,n){var r,i=t.pendingProps,o=!1,s=0!==(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&0!==(2&jo.current)),r&&(o=!0,t.flags&=-129),r=0!==(32&t.flags),t.flags&=-33,null===e){if(di){if(o?Do(t):Fo(),(e=ui)?null!==(e=null!==(e=Pd(e,fi))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ti?{id:ni,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},(n=Wr(e)).return=t,t.child=n,ci=t,ui=null):e=null,null===e)throw mi(t);return Od(e)?t.lanes=32:t.lanes=536870912,null}var l=i.children;return i=i.fallback,o?(Fo(),l=Zs({mode:"hidden",children:l},o=t.mode),i=qr(i,o,n,null),l.return=t,i.return=t,l.sibling=i,t.child=l,(i=t.child).memoizedState=$s(n),i.childLanes=Ys(e,r,n),t.memoizedState=Qs,Vs(null,i)):(Do(t),Js(t,l))}var c=e.memoizedState;if(null!==c&&null!==(l=c.dehydrated)){if(s)256&t.flags?(Do(t),t.flags&=-257,t=el(e,t,n)):null!==t.memoizedState?(Fo(),t.child=e.child,t.flags|=128,t=null):(Fo(),l=i.fallback,o=t.mode,i=Zs({mode:"visible",children:i.children},o),(l=qr(l,o,n,null)).flags|=2,i.return=t,l.return=t,i.sibling=l,t.child=i,po(t,e.child,null,n),(i=t.child).memoizedState=$s(n),i.childLanes=Ys(e,r,n),t.memoizedState=Qs,t=Vs(null,i));else if(Do(t),Od(l)){if(r=l.nextSibling&&l.nextSibling.dataset)var u=r.dgst;r=u,(i=Error(a(419))).stack="",i.digest=r,_i({value:i,source:null,stack:null}),t=el(e,t,n)}else if(xs||Ri(e,t,n,!1),r=0!==(n&e.childLanes),xs||r){if(null!==(r=pc)&&(0!==(i=De(r,n))&&i!==c.retryLane))throw c.retryLane=i,xr(e,i),Qc(r,e,i),Os;Nd(l)||au(),t=el(e,t,n)}else Nd(l)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,ui=xd(l.nextSibling),ci=t,di=!0,hi=null,fi=!1,null!==e&&li(t,e),(t=Js(t,i.children)).flags|=4096);return t}return o?(Fo(),l=i.fallback,o=t.mode,u=(c=e.child).sibling,(i=jr(c,{mode:"hidden",children:i.children})).subtreeFlags=65011712&c.subtreeFlags,null!==u?l=jr(u,l):(l=qr(l,o,n,null)).flags|=2,l.return=t,i.return=t,i.sibling=l,t.child=i,Vs(null,i),i=t.child,null===(l=e.child.memoizedState)?l=$s(n):(null!==(o=l.cachePool)?(c=Fi._currentValue,o=o.parent!==c?{parent:c,pool:c}
vendor: 4,443 bytes, line 2
2:o):o=Yi(),l={baseLanes:l.baseLanes|n,cachePool:o}),i.memoizedState=l,i.childLanes=Ys(e,r,n),t.memoizedState=Qs,Vs(e.child,i)):(Do(t),e=(n=e.child).sibling,(n=jr(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 Js(e,t){return(t=Zs({mode:"visible",children:t},e.mode)).return=e,e.child=t}function Zs(e,t){return(e=Fr(22,e,null,t)).lanes=0,e}function el(e,t,n){return po(t,e.child,null,n),(e=Js(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function tl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ii(e.return,t,n)}function nl(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.treeForkCount=o)}function rl(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;r=r.children;var a=jo.current,s=0!==(2&a);if(s?(a=1&a|2,t.flags|=128):a&=1,z(jo,a),Ls(e,t,r,n),r=di?Jr:0,!s&&null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&tl(e,n,t);else if(19===e.tag)tl(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}switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===zo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),nl(t,!1,i,n,o,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===zo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}nl(t,!0,n,null,o,r);break;case"together":nl(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function il(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Sc|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Ri(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=jr(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=jr(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function ol(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Pi(e))}function al(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)xs=!0;else{if(!ol(e,n)&&0===(128&t.flags))return xs=!1,function(e,t,n){switch(t.tag){case 3:Q(t,t.stateNode.containerInfo),ki(0,Fi,e.memoizedState.cache),bi();break;case 27:case 5:Y(t);break;case 4:Q(t,t.stateNode.containerInfo);break;case 10:ki(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,Mo(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Do(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Xs(e,t,n):(Do(t),null!==(e=il(e,t,n))?e.sibling:null);Do(t);break;case 19:var i=0!==(128&e.flags);if((r=0!==(n&t.childLanes))||(Ri(e,t,n,!1),r=0!==(n&t.childLanes)),i){if(r)return rl(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),z(jo,jo.current),r)break;return null;case 22:return t.lanes=0,Fs(e,t,n,t.pendingProps);case 24:ki(0,Fi,e.memoizedState.cache)}return il(e,t,n)}(e,t,n);xs=0!==(131072&e.flags)}else xs=!1,di&&0!==(1048576&t.flags)&&oi(t,Jr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=ro(t.elementType),t.type=e,"function"!==typeof e){if(void 0!==e&&null!==e){var i=e.$$typeof;if(i===E){t.tag=11,t=Ds(null,t,e,r,n);break e}if(i===k){t.tag=14,t=Ms(null,t,e,r,n);break e}}throw t=O(e)||e,Error(a(306,t,""))}Vr(e)?(r=Ts(e,r),t.tag=1,t=Gs(null,t,e,r,n)):(t.tag=0,t=Hs(null,t,e,r,n))}return t;case 0:return Hs(e,t,t.type,t.pendingProps,n);case 1:return Gs(e,t,r=t.type,i=Ts(r,t.pendingProps),n);case 3:e:{if(Q(t,t.stateNode.containerInfo),null===e)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,vo(e,t),ko(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ki(0,Fi,r),r!==o.cache&&Ai(t,[Fi],n,!0),So(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Ks(e,t,r,n);break e}if(r!==i){_i(i=Qr(Error(a(424)),t)),t=Ks(e,t,r,n);break e}if(9===(e=t.stateNode.containerInfo).nodeType)e=e.body;
vendor: 42,724 bytes, line 2
2else e="HTML"===e.nodeName?e.ownerDocument.body:e;for(ui=xd(e.firstChild),ci=t,di=!0,hi=null,fi=!0,n=mo(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(bi(),r===i){t=il(e,t,n);break e}Ls(e,t,r,n)}t=t.child}return t;case 26:return qs(e,t),null===e?(n=Wd(t.type,null,t.pendingProps,null))?t.memoizedState=n:di||(n=t.type,e=t.pendingProps,(r=gd(G.current).createElement(n))[ze]=t,r[Be]=e,hd(r,n,e),et(r),t.stateNode=r):t.memoizedState=Wd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Y(t),null===e&&di&&(r=t.stateNode=Ud(t.type,t.pendingProps,G.current),ci=t,fi=!0,i=ui,Cd(t.type)?(Ld=i,ui=xd(r.firstChild)):ui=i),Ls(e,t,t.pendingProps.children,n),qs(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&di&&((i=r=ui)&&(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[Qe])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(o=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(o!==i.rel||e.getAttribute("href")!==(null==i.href||""===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(((o=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))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var o=null==i.name?null:""+i.name;if("hidden"===i.type&&e.getAttribute("name")===o)return e}if(null===(e=xd(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,fi))?(t.stateNode=r,ci=t,ui=xd(r.firstChild),fi=!1,i=!0):i=!1),i||mi(t)),Y(t),i=t.type,o=t.pendingProps,s=null!==e?e.memoizedProps:null,r=o.children,bd(i,o)?r=null:null!==s&&bd(i,s)&&(t.flags|=32),null!==t.memoizedState&&(i=ta(e,t,ia,null,null,n),uh._currentValue=i),qs(e,t),Ls(e,t,r,n),t.child;case 6:return null===e&&di&&((e=n=ui)&&(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=xd(e.nextSibling)))return null}return e}(n,t.pendingProps,fi))?(t.stateNode=n,ci=t,ui=null,e=!0):e=!1),e||mi(t)),null;case 13:return Xs(e,t,n);case 4:return Q(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=po(t,null,r,n):Ls(e,t,r,n),t.child;case 11:return Ds(e,t,t.type,t.pendingProps,n);case 7:return Ls(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ls(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ki(0,t.type,r.value),Ls(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Ni(t),r=r(i=Oi(i)),t.flags|=1,Ls(e,t,r,n),t.child;case 14:return Ms(e,t,t.type,t.pendingProps,n);case 15:return Us(e,t,t.type,t.pendingProps,n);case 19:return rl(e,t,n);case 31:return function(e,t,n){var r=t.pendingProps,i=0!==(128&t.flags);if(t.flags&=-129,null===e){if(di){if("hidden"===r.mode)return e=zs(t,r),t.lanes=536870912,Vs(null,e);if(Mo(t),(e=ui)?null!==(e=null!==(e=Pd(e,fi))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ti?{id:ni,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},(n=Wr(e)).return=t,t.child=n,ci=t,ui=null):e=null,null===e)throw mi(t);return t.lanes=536870912,null}return zs(t,r)}var o=e.memoizedState;if(null!==o){var s=o.dehydrated;if(Mo(t),i)if(256&t.flags)t.flags&=-257,t=Bs(e,t,n);else{if(null===t.memoizedState)throw Error(a(558));t.child=e.child,t.flags|=128,t=null}else if(xs||Ri(e,t,n,!1),i=0!==(n&e.childLanes),xs||i){if(null!==(r=pc)&&0!==(s=De(r,n))&&s!==o.retryLane)throw o.retryLane=s,xr(e,s),Qc(r,e,s),Os;au(),t=Bs(e,t,n)}else e=o.treeContext,ui=xd(s.nextSibling),ci=t,di=!0,hi=null,fi=!1,null!==e&&li(t,e),(t=zs(t,r)).flags|=4096;return t}return(e=jr(e.child,{mode:r.mode,children:r.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return Fs(e,t,n,t.pendingProps);case 24:return Ni(t),r=Oi(Fi),null===e?(null===(i=Qi())&&(i=pc,o=Vi(),i.pooledCache=o,o.refCount++,null!==o&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},yo(t),ki(0,Fi,i)):(0!==(e.lanes&n)&&(vo(e,t),ko(t,null,null,n),So()),i=e.memoizedState,o=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=i),ki(0,Fi,r)):(r=o.cache,ki(0,Fi,r),r!==i.cache&&Ai(t,[Fi],n,!0))),Ls(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function sl(e){e.flags|=4}function ll(e,t,n,r,i){if((t=0!==(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&i)===i)if(e.stateNode.complete)e.flags|=8192;else{if(!ru())throw io=eo,Ji;e.flags|=8192}}else e.flags&=-16777217}function cl(e,t){if("stylesheet"!==t.type||0!==(4&t.state.loading))e.flags&=-16777217;else if(e.flags|=16777216,!ih(t)){if(!ru())throw io=eo,Ji;e.flags|=8192}}function ul(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Pe():536870912,e.lanes|=t,Ac|=t)}function dl(e,t){if(!di)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 hl(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|=65011712&i.subtreeFlags,r|=65011712&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 fl(e,t,n){var r=t.pendingProps;switch(si(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return hl(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ci(Fi),$(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(vi(t)?sl(t):null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,wi())),hl(t),null;case 26:var i=t.type,o=t.memoizedState;return null===e?(sl(t),null!==o?(hl(t),cl(t,o)):(hl(t),ll(t,i,0,0,n))):o?o!==e.memoizedState?(sl(t),hl(t),cl(t,o)):(hl(t),t.flags&=-16777217):((e=e.memoizedProps)!==r&&sl(t),hl(t),ll(t,i,0,0,n)),null;case 27:if(X(t),n=G.current,i=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if(!r){if(null===t.stateNode)throw Error(a(166));return hl(t),null}e=H.current,vi(t)?gi(t):(e=Ud(i,r,n),t.stateNode=e,sl(t))}return hl(t),null;case 5:if(X(t),i=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if(!r){if(null===t.stateNode)throw Error(a(166));return hl(t),null}if(o=H.current,vi(t))gi(t);else{var s=gd(G.current);switch(o){case 1:o=s.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:o=s.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":o=s.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":o=s.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":(o=s.createElement("div")).innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"===typeof r.is?s.createElement("select",{is:r.is}):s.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o="string"===typeof r.is?s.createElement(i,{is:r.is}):s.createElement(i)}}o[ze]=t,o[Be]=r;e:for(s=t.child;null!==s;){if(5===s.tag||6===s.tag)o.appendChild(s.stateNode);else if(4!==s.tag&&27!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;null===s.sibling;){if(null===s.return||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;e:switch(hd(o,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&sl(t)}}return hl(t),ll(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));if(e=G.current,vi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(i=ci))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[ze]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||cd(e.nodeValue,n)))||mi(t,!0)}else(e=gd(e).createTextNode(r))[ze]=t,t.stateNode=e}return hl(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=vi(t),null!==n){if(null===e){if(!r)throw Error(a(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(a(557));e[ze]=t}else bi(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;hl(t),e=!1}else n=wi(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Vo(t),t):(Vo(t),null);if(0!==(128&t.flags))throw Error(a(558))}return hl(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=vi(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(a(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(a(317));i[ze]=t}else bi(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;hl(t),i=!1}else i=wi(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return 256&t.flags?(Vo(t),t):(Vo(t),null)}return Vo(t),0!==(128&t.flags)?(t.lanes=n,t):(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),o=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ul(t,t.updateQueue),hl(t),null);case 4:return $(),null===e&&Zu(t.stateNode.containerInfo),hl(t),null;case 10:return Ci(t.type),hl(t),null;case 19:if(j(jo),null===(r=t.memoizedState))return hl(t),null;if(i=0!==(128&t.flags),null===(o=r.rendering))if(i)dl(r,!1);else{if(0!==Tc||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(o=zo(e))){for(t.flags|=128,dl(r,!1),e=o.updateQueue,t.updateQueue=e,ul(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)zr(n,e),n=n.sibling;return z(jo,1&jo.current|2),di&&ii(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&le()>Lc&&(t.flags|=128,i=!0,dl(r,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=zo(o))){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,ul(t,e),dl(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!di)return hl(t),null}else 2*le()-r.renderingStartTime>Lc&&536870912!==n&&(t.flags|=128,i=!0,dl(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=le(),e.sibling=null,n=jo.current,z(jo,i?1&n|2:1&n),di&&ii(t,r.treeForkCount),e):(hl(t),null);case 22:case 23:return Vo(t),Oo(),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)&&(hl(t),6&t.subtreeFlags&&(t.flags|=8192)):hl(t),null!==(n=t.updateQueue)&&ul(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&&j(Ki),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ci(Fi),hl(t),null;case 25:case 30:return null}throw Error(a(156,t.tag))}function pl(e,t){switch(si(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Ci(Fi),$(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return X(t),null;case 31:if(null!==t.memoizedState){if(Vo(t),null===t.alternate)throw Error(a(340));bi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Vo(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));bi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return j(jo),null;case 4:return $(),null;case 10:return Ci(t.type),null;case 22:case 23:return Vo(t),Oo(),null!==e&&j(Ki),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Ci(Fi),null;default:return null}}function ml(e,t){switch(si(t),t.tag){case 3:Ci(Fi),$();break;case 26:case 27:case 5:X(t);break;case 4:$();break;case 31:null!==t.memoizedState&&Vo(t);break;case 13:Vo(t);break;case 19:j(jo);break;case 10:Ci(t.type);break;case 22:case 23:Vo(t),Oo(),null!==e&&j(Ki);break;case 24:Ci(Fi)}}function gl(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 o=n.create,a=n.inst;r=o(),a.destroy=r}n=n.next}while(n!==i)}}catch(s){Tu(t,t.return,s)}}function yl(e,t,n){try{var r=t.updateQueue,i=null!==r?r.lastEffect:null;if(null!==i){var o=i.next;r=o;do{if((r.tag&e)===e){var a=r.inst,s=a.destroy;if(void 0!==s){a.destroy=void 0,i=t;var l=n,c=s;try{c()}catch(u){Tu(i,l,u)}}}r=r.next}while(r!==o)}}catch(u){Tu(t,t.return,u)}}function vl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Io(t,n)}catch(r){Tu(e,e.return,r)}}}function bl(e,t,n){n.props=Ts(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Tu(e,t,r)}}function wl(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"===typeof n?e.refCleanup=n(r):n.current=r}}catch(i){Tu(e,t,i)}}function _l(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"===typeof r)try{r()}catch(i){Tu(e,t,i)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"===typeof n)try{n(null)}catch(o){Tu(e,t,o)}else n.current=null}function El(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){Tu(e,e.return,i)}}function Tl(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,o=null,s=null,l=null,c=null,u=null,d=null;for(p in n){var h=n[p];if(n.hasOwnProperty(p)&&null!=h)switch(p){case"checked":case"value":break;case"defaultValue":c=h;default:r.hasOwnProperty(p)||ud(e,t,p,null,r,h)}}for(var f in r){var p=r[f];if(h=n[f],r.hasOwnProperty(f)&&(null!=p||null!=h))switch(f){case"type":o=p;break;case"name":i=p;break;case"checked":u=p;break;case"defaultChecked":d=p;break;case"value":s=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(a(137,t));break;default:p!==h&&ud(e,t,f,p,r,h)}}return void vt(e,s,l,c,u,d,o,i);case"select":for(o in p=s=l=f=null,n)if(c=n[o],n.hasOwnProperty(o)&&null!=c)switch(o){case"value":break;case"multiple":p=c;default:r.hasOwnProperty(o)||ud(e,t,o,null,r,c)}for(i in r)if(o=r[i],c=n[i],r.hasOwnProperty(i)&&(null!=o||null!=c))switch(i){case"value":f=o;break;case"defaultValue":l=o;break;case"multiple":s=o;default:o!==c&&ud(e,t,i,o,r,c)}return t=l,n=s,r=p,void(null!=f?_t(e,!!n,f,!1):!!r!==!!n&&(null!=t?_t(e,!!n,t,!0):_t(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:ud(e,t,l,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(null!=i||null!=o))switch(s){case"value":f=i;break;case"defaultValue":p=i;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=i)throw Error(a(91));break;default:i!==o&&ud(e,t,s,i,r,o)}return void Et(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 ud(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 ud(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)&&ud(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(a(137,t));break;default:ud(e,t,u,f,r,p)}return;default:if(At(t)){for(var y in n)f=n[y],n.hasOwnProperty(y)&&void 0!==f&&!r.hasOwnProperty(y)&&dd(e,t,y,void 0,r,f);for(d in r)f=r[d],p=n[d],!r.hasOwnProperty(d)||f===p||void 0===f&&void 0===p||dd(e,t,d,f,r,p);return}}for(var v in n)f=n[v],n.hasOwnProperty(v)&&null!=f&&!r.hasOwnProperty(v)&&ud(e,t,v,null,r,f);for(h in r)f=r[h],p=n[h],!r.hasOwnProperty(h)||f===p||null==f&&null==p||ud(e,t,h,f,r,p)}(r,e.type,n,t),r[Be]=t}catch(i){Tu(e,e.return,i)}}function Sl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Cd(e.type)||4===e.tag}function kl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Cd(e.type))continue e;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 Cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Ot));else if(4!==r&&(27===r&&Cd(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Cl(e,t,n),e=e.sibling;null!==e;)Cl(e,t,n),e=e.sibling}function Il(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&&Cd(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Il(e,t,n),e=e.sibling;null!==e;)Il(e,t,n),e=e.sibling}function Al(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);hd(t,r,n),t[ze]=e,t[Be]=n}catch(o){Tu(e,e.return,o)}}var Rl=!1,Pl=!1,Nl=!1,Ol="function"===typeof WeakSet?WeakSet:Set,xl=null;function Ll(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Ql(e,n),4&r&&gl(5,n);break;case 1:if(Ql(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(a){Tu(n,n.return,a)}else{var i=Ts(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){Tu(n,n.return,s)}}64&r&&vl(n),512&r&&wl(n,n.return);break;case 3:if(Ql(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Io(e,t)}catch(a){Tu(n,n.return,a)}}break;case 27:null===t&&4&r&&Al(n);case 26:case 5:Ql(e,n),null===t&&4&r&&El(n),512&r&&wl(n,n.return);break;case 12:Ql(e,n);break;case 31:Ql(e,n),4&r&&jl(e,n);break;case 13:Ql(e,n),4&r&&zl(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Iu.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||Rl)){t=null!==t&&null!==t.memoizedState||Pl,i=Rl;var o=Pl;Rl=r,(Pl=t)&&!o?Yl(e,n,0!==(8772&n.subtreeFlags)):Ql(e,n),Rl=i,Pl=o}break;case 30:break;default:Ql(e,n)}}function Dl(e){var t=e.alternate;null!==t&&(e.alternate=null,Dl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&$e(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 Ml=null,Ul=!1;function Fl(e,t,n){for(n=n.child;null!==n;)Vl(e,t,n),n=n.sibling}function Vl(e,t,n){if(ve&&"function"===typeof ve.onCommitFiberUnmount)try{ve.onCommitFiberUnmount(ye,n)}catch(o){}switch(n.tag){case 26:Pl||_l(n,t),Fl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Pl||_l(n,t);var r=Ml,i=Ul;Cd(n.type)&&(Ml=n.stateNode,Ul=!1),Fl(e,t,n),Fd(n.stateNode),Ml=r,Ul=i;break;case 5:Pl||_l(n,t);case 6:if(r=Ml,i=Ul,Ml=null,Fl(e,t,n),Ul=i,null!==(Ml=r))if(Ul)try{(9===Ml.nodeType?Ml.body:"HTML"===Ml.nodeName?Ml.ownerDocument.body:Ml).removeChild(n.stateNode)}catch(a){Tu(n,t,a)}else try{Ml.removeChild(n.stateNode)}catch(a){Tu(n,t,a)}break;case 18:null!==Ml&&(Ul?(Id(9===(e=Ml).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Hh(e)):Id(Ml,n.stateNode));break;case 4:r=Ml,i=Ul,Ml=n.stateNode.containerInfo,Ul=!0,Fl(e,t,n),Ml=r,Ul=i;break;case 0:case 11:case 14:case 15:yl(2,n,t),Pl||yl(4,n,t),Fl(e,t,n);break;case 1:Pl||(_l(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount&&bl(n,t,r)),Fl(e,t,n);break;case 21:Fl(e,t,n);break;case 22:Pl=(r=Pl)||null!==n.memoizedState,Fl(e,t,n),Pl=r;break;default:Fl(e,t,n)}}function jl(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{Hh(e)}catch(n){Tu(t,t.return,n)}}}function zl(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Hh(e)}catch(n){Tu(t,t.return,n)}}function Bl(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Ol),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Ol),t;default:throw Error(a(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Au.bind(null,e,t);t.then(r,r)}})}function ql(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 27:if(Cd(l.type)){Ml=l.stateNode,Ul=!1;break e}break;case 5:Ml=l.stateNode,Ul=!1;break e;case 3:case 4:Ml=l.stateNode.containerInfo,Ul=!0;break e}l=l.return}if(null===Ml)throw Error(a(160));Vl(o,s,i),Ml=null,Ul=!1,null!==(o=i.alternate)&&(o.return=null),i.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)Wl(t,e),t=t.sibling}var Hl=null;function Wl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ql(t,e),Gl(e),4&r&&(yl(3,e,e.return),gl(3,e),yl(5,e,e.return));break;case 1:ql(t,e),Gl(e),512&r&&(Pl||null===n||_l(n,n.return)),64&r&&Rl&&(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=Hl;if(ql(t,e),Gl(e),512&r&&(Pl||null===n||_l(n,n.return)),4&r){var o=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":(!(o=i.getElementsByTagName("title")[0])||o[Qe]||o[ze]||"http://www.w3.org/2000/svg"===o.namespaceURI||o.hasAttribute("itemprop"))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector("head > title"))),hd(o,r,n),o[ze]=e,et(o),r=o;break e;case"link":var s=nh("link","href",i).get(r+(n.href||""));if(s)for(var l=0;l<s.length;l++)if((o=s[l]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&o.getAttribute("rel")===(null==n.rel?null:n.rel)&&o.getAttribute("title")===(null==n.title?null:n.title)&&o.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){s.splice(l,1);break t}hd(o=i.createElement(r),r,n),i.head.appendChild(o);break;case"meta":if(s=nh("meta","content",i).get(r+(n.content||"")))for(l=0;l<s.length;l++)if((o=s[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&o.getAttribute("name")===(null==n.name?null:n.name)&&o.getAttribute("property")===(null==n.property?null:n.property)&&o.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&o.getAttribute("charset")===(null==n.charSet?null:n.charSet)){s.splice(l,1);break t}hd(o=i.createElement(r),r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[ze]=e,et(o),r=o}e.stateNode=r}else rh(i,e.type,e.stateNode);else e.stateNode=Xd(i,r,e.memoizedProps);else o!==r?(null===o?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):o.count--,null===r?rh(i,e.type,e.stateNode):Xd(i,r,e.memoizedProps)):null===r&&null!==e.stateNode&&Tl(e,e.memoizedProps,n.memoizedProps)}break;case 27:ql(t,e),Gl(e),512&r&&(Pl||null===n||_l(n,n.return)),null!==n&&4&r&&Tl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ql(t,e),Gl(e),512&r&&(Pl||null===n||_l(n,n.return)),32&e.flags){i=e.stateNode;try{St(i,"")}catch(m){Tu(e,e.return,m)}}4&r&&null!=e.stateNode&&Tl(e,i=e.memoizedProps,null!==n?n.memoizedProps:i),1024&r&&(Nl=!0);break;case 6:if(ql(t,e),Gl(e),4&r){if(null===e.stateNode)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(m){Tu(e,e.return,m)}}break;case 3:if(th=null,i=Hl,Hl=zd(t.containerInfo),ql(t,e),Hl=i,Gl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(m){Tu(e,e.return,m)}Nl&&(Nl=!1,Kl(e));break;case 4:r=Hl,Hl=zd(e.stateNode.containerInfo),ql(t,e),Gl(e),Hl=r;break;case 12:default:ql(t,e),Gl(e);break;case 31:case 19:ql(t,e),Gl(e),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,Bl(e,r)));break;case 13:ql(t,e),Gl(e),8192&e.child.flags&&null!==e.memoizedState!==(null!==n&&null!==n.memoizedState)&&(Oc=le()),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,Bl(e,r)));break;case 22:i=null!==e.memoizedState;var c=null!==n&&null!==n.memoizedState,u=Rl,d=Pl;if(Rl=u||i,Pl=d||c,ql(t,e),Pl=d,Rl=u,Gl(e),8192&r)e:for(t=e.stateNode,t._visibility=i?-2&t._visibility:1|t._visibility,i&&(null===n||c||Rl||Pl||$l(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){c=n=t;try{if(o=c.stateNode,i)"function"===typeof(s=o.style).setProperty?s.setProperty("display","none","important"):s.display="none";else{l=c.stateNode;var h=c.memoizedProps.style,f=void 0!==h&&null!==h&&h.hasOwnProperty("display")?h.display:null;l.style.display=null==f||"boolean"===typeof f?"":(""+f).trim()}}catch(m){Tu(c,c.return,m)}}}else if(6===t.tag){if(null===n){c=t;try{c.stateNode.nodeValue=i?"":c.memoizedProps}catch(m){Tu(c,c.return,m)}}}else if(18===t.tag){if(null===n){c=t;try{var p=c.stateNode;i?Ad(p,!0):Ad(c.stateNode,!1)}catch(m){Tu(c,c.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,Bl(e,n))));case 30:case 21:}}function Gl(e){var t=e.flags;if(2&t){try{for(var n,r=e.return;null!==r;){if(Sl(r)){n=r;break}r=r.return}if(null==n)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;Il(e,kl(e),i);break;case 5:var o=n.stateNode;32&n.flags&&(St(o,""),n.flags&=-33),Il(e,kl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Cl(e,kl(e),s);break;default:throw Error(a(161))}}catch(l){Tu(e,e.return,l)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Kl(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Kl(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Ql(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Ll(e,t.alternate,t),t=t.sibling}function $l(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:yl(4,t,t.return),$l(t);break;case 1:_l(t,t.return);var n=t.stateNode;"function"===typeof n.componentWillUnmount&&bl(t,t.return,n),$l(t);break;case 27:Fd(t.stateNode);case 26:case 5:_l(t,t.return),$l(t);break;case 22:null===t.memoizedState&&$l(t);break;default:$l(t)}e=e.sibling}}function Yl(e,t,n){for(n=n&&0!==(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,i=e,o=t,a=o.flags;switch(o.tag){case 0:case 11:case 15:Yl(i,o,n),gl(4,o);break;case 1:if(Yl(i,o,n),"function"===typeof(i=(r=o).stateNode).componentDidMount)try{i.componentDidMount()}catch(c){Tu(r,r.return,c)}if(null!==(i=(r=o).updateQueue)){var s=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(null!==l)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Co(l[i],s)}catch(c){Tu(r,r.return,c)}}n&&64&a&&vl(o),wl(o,o.return);break;case 27:Al(o);case 26:case 5:Yl(i,o,n),n&&null===r&&4&a&&El(o),wl(o,o.return);break;case 12:Yl(i,o,n);break;case 31:Yl(i,o,n),n&&4&a&&jl(i,o);break;case 13:Yl(i,o,n),n&&4&a&&zl(i,o);break;case 22:null===o.memoizedState&&Yl(i,o,n),wl(o,o.return);break;case 30:break;default:Yl(i,o,n)}t=t.sibling}}function Xl(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&&ji(n))}function Jl(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&ji(e))}function Zl(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)ec(e,t,n,r),t=t.sibling}function ec(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Zl(e,t,n,r),2048&i&&gl(9,t);break;case 1:case 31:case 13:default:Zl(e,t,n,r);break;case 3:Zl(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&&ji(e)));break;case 12:if(2048&i){Zl(e,t,n,r),e=t.stateNode;try{var o=t.memoizedProps,a=o.id,s=o.onPostCommit;"function"===typeof s&&s(a,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(l){Tu(t,t.return,l)}}else Zl(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,a=t.alternate,null!==t.memoizedState?2&o._visibility?Zl(e,t,n,r):nc(e,t):2&o._visibility?Zl(e,t,n,r):(o._visibility|=2,tc(e,t,n,r,0!==(10256&t.subtreeFlags)||!1)),2048&i&&Xl(a,t);break;case 24:Zl(e,t,n,r),2048&i&&Jl(t.alternate,t)}}function tc(e,t,n,r,i){for(i=i&&(0!==(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var o=e,a=t,s=n,l=r,c=a.flags;switch(a.tag){case 0:case 11:case 15:tc(o,a,s,l,i),gl(8,a);break;case 23:break;case 22:var u=a.stateNode;null!==a.memoizedState?2&u._visibility?tc(o,a,s,l,i):nc(o,a):(u._visibility|=2,tc(o,a,s,l,i)),i&&2048&c&&Xl(a.alternate,a);break;case 24:tc(o,a,s,l,i),i&&2048&c&&Jl(a.alternate,a);break;default:tc(o,a,s,l,i)}t=t.sibling}}function nc(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:nc(n,r),2048&i&&Xl(r.alternate,r);break;case 24:nc(n,r),2048&i&&Jl(r.alternate,r);break;default:nc(n,r)}t=t.sibling}}var rc=8192;function ic(e,t,n){if(e.subtreeFlags&rc)for(e=e.child;null!==e;)oc(e,t,n),e=e.sibling}function oc(e,t,n){switch(e.tag){case 26:ic(e,t,n),e.flags&rc&&null!==e.memoizedState&&function(e,t,n,r){if("stylesheet"===n.type&&("string"!==typeof r.media||!1!==matchMedia(r.media).matches)&&0===(4&n.state.loading)){if(null===n.instance){var i=Gd(r.href),o=t.querySelector(Kd(i));if(o)return null!==(t=o._p)&&"object"===typeof t&&"function"===typeof t.then&&(e.count++,e=ah.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,void et(o);o=t.ownerDocument||t,r=Qd(r),(i=Vd.get(i))&&Zd(r,i),et(o=o.createElement("link"));var a=o;a._p=new Promise(function(e,t){a.onload=e,a.onerror=t}),hd(o,"link",r),n.instance=o}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&0===(3&n.state.loading)&&(e.count++,n=ah.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,Hl,e.memoizedState,e.memoizedProps);break;case 5:default:ic(e,t,n);break;case 3:case 4:var r=Hl;Hl=zd(e.stateNode.containerInfo),ic(e,t,n),Hl=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=rc,rc=16777216,ic(e,t,n),rc=r):ic(e,t,n))}}function ac(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 sc(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];xl=r,uc(r,e)}ac(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)lc(e),e=e.sibling}function lc(e){switch(e.tag){case 0:case 11:case 15:sc(e),2048&e.flags&&yl(9,e,e.return);break;case 3:case 12:default:sc(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,cc(e)):sc(e)}}function cc(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];xl=r,uc(r,e)}ac(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:yl(8,t,t.return),cc(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,cc(t));break;default:cc(t)}e=e.sibling}}function uc(e,t){for(;null!==xl;){var n=xl;switch(n.tag){case 0:case 11:case 15:yl(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:ji(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,xl=r;else e:for(n=e;null!==xl;){var i=(r=xl).sibling,o=r.return;if(Dl(r),r===n){xl=null;break e}if(null!==i){i.return=o,xl=i;break e}xl=o}}}var dc={getCacheForType:function(e){var t=Oi(Fi),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Oi(Fi).controller.signal}},hc="function"===typeof WeakMap?WeakMap:Map,fc=0,pc=null,mc=null,gc=0,yc=0,vc=null,bc=!1,wc=!1,_c=!1,Ec=0,Tc=0,Sc=0,kc=0,Cc=0,Ic=0,Ac=0,Rc=null,Pc=null,Nc=!1,Oc=0,xc=0,Lc=1/0,Dc=null,Mc=null,Uc=0,Fc=null,Vc=null,jc=0,zc=0,Bc=null,qc=null,Hc=0,Wc=null;function Gc(){return 0!==(2&fc)&&0!==gc?gc&-gc:null!==L.T?Bu():Fe()}function Kc(){if(0===Ic)if(0===(536870912&gc)||di){var e=Se;0===(3932160&(Se<<=1))&&(Se=262144),Ic=e}else Ic=536870912;return null!==(e=xo.current)&&(e.flags|=32),Ic}function Qc(e,t,n){(e!==pc||2!==yc&&9!==yc)&&null===e.cancelPendingCommit||(tu(e,0),Jc(e,gc,Ic,!1)),Oe(e,n),0!==(2&fc)&&e===pc||(e===pc&&(0===(2&fc)&&(kc|=n),4===Tc&&Jc(e,gc,Ic,!1)),Du(e))}function $c(e,t,n){if(0!==(6&fc))throw Error(a(327));for(var r=!n&&0===(127&t)&&0===(t&e.expiredLanes)||Ae(e,t),i=r?function(e,t){var n=fc;fc|=2;var r=iu(),i=ou();pc!==e||gc!==t?(Dc=null,Lc=le()+500,tu(e,t)):wc=Ae(e,t);e:for(;;)try{if(0!==yc&&null!==mc){t=mc;var o=vc;t:switch(yc){case 1:yc=0,vc=null,hu(e,t,o,1);break;case 2:case 9:if(to(o)){yc=0,vc=null,du(t);break}t=function(){2!==yc&&9!==yc||pc!==e||(yc=7),Du(e)},o.then(t,t);break e;case 3:yc=7;break e;case 4:yc=5;break e;case 7:to(o)?(yc=0,vc=null,du(t)):(yc=0,vc=null,hu(e,t,o,7));break;case 5:var s=null;switch(mc.tag){case 26:s=mc.memoizedState;case 5:case 27:var l=mc;if(s?ih(s):l.stateNode.complete){yc=0,vc=null;var c=l.sibling;if(null!==c)mc=c;else{var u=l.return;null!==u?(mc=u,fu(u)):mc=null}break t}}yc=0,vc=null,hu(e,t,o,5);break;case 6:yc=0,vc=null,hu(e,t,o,6);break;case 8:eu(),Tc=6;break e;default:throw Error(a(462))}}cu();break}catch(d){nu(e,d)}return Si=Ti=null,L.H=r,L.A=i,fc=n,null!==mc?0:(pc=null,gc=0,Pr(),Tc)}(e,t):su(e,t,!0),o=r;;){if(0===i){wc&&!r&&Jc(e,t,0,!1);break}if(n=e.current.alternate,!o||Xc(n)){if(2===i){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=0!==(s=-536870913&e.pendingLanes)?s:536870912&s?536870912:0;if(0!==s){t=s;e:{var l=e;i=Rc;var c=l.current.memoizedState.isDehydrated;if(c&&(tu(l,s).flags|=256),2!==(s=su(l,s,!1))){if(_c&&!c){l.errorRecoveryDisabledLanes|=o,kc|=o,i=4;break e}o=Pc,Pc=i,null!==o&&(null===Pc?Pc=o:Pc.push.apply(Pc,o))}i=s}if(o=!1,2!==i)continue}}if(1===i){tu(e,0),Jc(e,t,0,!0);break}e:{switch(r=e,o=i){case 0:case 1:throw Error(a(345));case 4:if((4194048&t)!==t)break;case 6:Jc(r,t,Ic,!bc);break e;case 2:Pc=null;break;case 3:case 5:break;default:throw Error(a(329))}if((62914560&t)===t&&10<(i=Oc+300-le())){if(Jc(r,t,Ic,!bc),0!==Ie(r,0,!0))break e;jc=t,r.timeoutHandle=_d(Yc.bind(null,r,n,Pc,Dc,Nc,t,Ic,kc,Ac,bc,o,"Throttled",-0,0),i)}else Yc(r,n,Pc,Dc,Nc,t,Ic,kc,Ac,bc,o,null,-0,0)}break}i=su(e,t,!1),o=!1}Du(e)}function Yc(e,t,n,r,i,o,a,s,l,c,u,d,h,f){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||16785408===(16785408&d)){oc(t,o,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ot});var p=(62914560&o)===o?Oc-le():(4194048&o)===o?xc-le():0;if(null!==(p=function(e,t){return e.stylesheets&&0===e.count&&lh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&lh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===oh&&(oh=62500*function(){if("function"===typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var i=n[r],o=i.transferSize,a=i.initiatorType,s=i.duration;if(o&&s&&fd(a)){for(a=0,s=i.responseEnd,r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>s)break;var u=l.transferSize,d=l.initiatorType;u&&fd(d)&&(a+=u*((l=l.responseEnd)<s?1:(s-c)/(l-c)))}if(--r,t+=8*(o+a)/(i.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"===typeof(e=navigator.connection.downlink)?e:5}());var i=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&lh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>oh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}(d,p)))return jc=o,e.cancelPendingCommit=p(mu.bind(null,e,t,o,n,r,i,a,s,l,u,d,null,h,f)),void Jc(e,o,a,!c)}mu(e,t,o,n,r,i,a,s,l)}function Xc(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],o=i.getSnapshot;i=i.value;try{if(!Jn(o(),i))return!1}catch(a){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 Jc(e,t,n,r){t&=~Cc,t&=~kc,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var o=31-we(i),a=1<<o;r[o]=-1,i&=~a}0!==n&&xe(e,n,t)}function Zc(){return 0!==(6&fc)||(Mu(0,!1),!1)}function eu(){if(null!==mc){if(0===yc)var e=mc.return;else Si=Ti=null,sa(e=mc),so=null,lo=0,e=mc;for(;null!==e;)ml(e.alternate,e),e=e.return;mc=null}}function tu(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,Ed(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),jc=0,eu(),pc=e,mc=n=jr(e.current,null),gc=t,yc=0,vc=null,bc=!1,wc=Ae(e,t),_c=!1,Ac=Ic=Cc=kc=Sc=Tc=0,Pc=Rc=null,Nc=!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),o=1<<i;t|=e[i],r&=~o}return Ec=t,Pr(),n}function nu(e,t){qo=null,L.H=ms,t===Xi||t===Zi?(t=oo(),yc=3):t===Ji?(t=oo(),yc=4):yc=t===Os?8:null!==t&&"object"===typeof t&&"function"===typeof t.then?6:1,vc=t,null===mc&&(Tc=1,Is(e,Qr(t,e.current)))}function ru(){var e=xo.current;return null===e||((4194048&gc)===gc?null===Lo:((62914560&gc)===gc||0!==(536870912&gc))&&e===Lo)}function iu(){var e=L.H;return L.H=ms,null===e?ms:e}function ou(){var e=L.A;return L.A=dc,e}function au(){Tc=4,bc||(4194048&gc)!==gc&&null!==xo.current||(wc=!0),0===(134217727&Sc)&&0===(134217727&kc)||null===pc||Jc(pc,gc,Ic,!1)}function su(e,t,n){var r=fc;fc|=2;var i=iu(),o=ou();pc===e&&gc===t||(Dc=null,tu(e,t)),t=!1;var a=Tc;e:for(;;)try{if(0!==yc&&null!==mc){var s=mc,l=vc;switch(yc){case 8:eu(),a=6;break e;case 3:case 2:case 9:case 6:null===xo.current&&(t=!0);var c=yc;if(yc=0,vc=null,hu(e,s,l,c),n&&wc){a=0;break e}break;default:c=yc,yc=0,vc=null,hu(e,s,l,c)}}lu(),a=Tc;break}catch(u){nu(e,u)}return t&&e.shellSuspendCounter++,Si=Ti=null,fc=r,L.H=i,L.A=o,null===mc&&(pc=null,gc=0,Pr()),a}function lu(){for(;null!==mc;)uu(mc)}function cu(){for(;null!==mc&&!ae();)uu(mc)}function uu(e){var t=al(e.alternate,e,Ec);e.memoizedProps=e.pendingProps,null===t?fu(e):mc=t}function du(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Ws(n,t,t.pendingProps,t.type,void 0,gc);break;case 11:t=Ws(n,t,t.pendingProps,t.type.render,t.ref,gc);break;case 5:sa(t);default:ml(n,t),t=al(n,t=mc=zr(t,Ec),Ec)}e.memoizedProps=e.pendingProps,null===t?fu(e):mc=t}function hu(e,t,n,r){Si=Ti=null,sa(t),so=null,lo=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)&&Ri(t,n,i,!0),null!==(n=xo.current)){switch(n.tag){case 31:case 13:return null===Lo?au():null===n.alternate&&0===Tc&&(Tc=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===eo?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),Su(e,r,i)),!1;case 22:return n.flags|=65536,r===eo?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),Su(e,r,i)),!1}throw Error(a(435,n.tag))}return Su(e,r,i),au(),!1}if(di)return null!==(t=xo.current)?(0===(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==pi&&_i(Qr(e=Error(a(422),{cause:r}),n))):(r!==pi&&_i(Qr(t=Error(a(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,i&=-i,e.lanes|=i,r=Qr(r,n),Eo(e,i=Rs(e.stateNode,r,i)),4!==Tc&&(Tc=2)),!1;var o=Error(a(520),{cause:r});if(o=Qr(o,n),null===Rc?Rc=[o]:Rc.push(o),4!==Tc&&(Tc=2),null===t)return!0;r=Qr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,Eo(n,e=Rs(n.stateNode,r,e)),!1;case 1:if(t=n.type,o=n.stateNode,0===(128&n.flags)&&("function"===typeof t.getDerivedStateFromError||null!==o&&"function"===typeof o.componentDidCatch&&(null===Mc||!Mc.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,Ns(i=Ps(i),e,n,r),Eo(n,i),!1}n=n.return}while(null!==n);return!1}(e,i,t,n,gc))return Tc=1,Is(e,Qr(n,e.current)),void(mc=null)}catch(o){if(null!==i)throw mc=i,o;return Tc=1,Is(e,Qr(n,e.current)),void(mc=null)}32768&t.flags?(di||1===r?e=!0:wc||0!==(536870912&gc)?e=!1:(bc=e=!0,(2===r||9===r||3===r||6===r)&&(null!==(r=xo.current)&&13===r.tag&&(r.flags|=16384))),pu(t,e)):fu(t)}function fu(e){var t=e;do{if(0!==(32768&t.flags))return void pu(t,bc);e=t.return;var n=fl(t.alternate,t,Ec);if(null!==n)return void(mc=n);if(null!==(t=t.sibling))return void(mc=t);mc=t=e}while(null!==t);0===Tc&&(Tc=5)}function pu(e,t){do{var n=pl(e.alternate,e);if(null!==n)return n.flags&=32767,void(mc=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deleti
2ons=null),!t&&null!==(e=e.sibling))return void(mc=e);mc=e=n}while(null!==e);Tc=6,mc=null}function mu(e,t,n,r,i,o,s,l,c){e.cancelPendingCommit=null;do{wu()}while(0!==Uc);if(0!==(6&fc))throw Error(a(327));if(null!==t){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,function(e,t,n,r,i,o){var a=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 s=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=a&~n;0<n;){var u=31-we(n),d=1<<u;s[u]=0,l[u]=-1;var h=c[u];if(null!==h)for(c[u]=null,u=0;u<h.length;u++){var f=h[u];null!==f&&(f.lane&=-536870913)}n&=~d}0!==r&&xe(e,r,0),0!==o&&0===i&&0!==e.tag&&(e.suspendedLanes|=o&~(a&~t))}(e,n,o|=Rr,s,l,c),e===pc&&(mc=pc=null,gc=0),Vc=t,Fc=e,jc=n,zc=o,Bc=i,qc=r,0!==(10256&t.subtreeFlags)||0!==(10256&t.flags)?(e.callbackNode=null,e.callbackPriority=0,ie(he,function(){return _u(),null})):(e.callbackNode=null,e.callbackPriority=0),r=0!==(13878&t.flags),0!==(13878&t.subtreeFlags)||r){r=L.T,L.T=null,i=D.p,D.p=2,s=fc,fc|=4;try{!function(e,t){if(e=e.containerInfo,pd=bh,ir(e=rr(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,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(g){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(l=s+i),h!==o||0!==r&&3!==h.nodeType||(c=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===i&&(l=s),f===o&&++d===r&&(c=s),null!==(p=h.nextSibling))break;f=(h=f).parentNode}h=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(md={focusedElem:e,selectionRange:n},bh=!1,xl=t;null!==xl;)if(e=(t=xl).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,xl=e;else for(;null!==xl;){switch(o=(t=xl).alternate,e=t.flags,t.tag){case 0:if(0!==(4&e)&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(i=e[n]).ref.impl=i.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(0!==(1024&e)&&null!==o){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var m=Ts(n.type,i);e=r.getSnapshotBeforeUpdate(m,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(y){Tu(n,n.return,y)}}break;case 3:if(0!==(1024&e))if(9===(n=(e=t.stateNode.containerInfo).nodeType))Rd(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Rd(e);break;default:e.textContent=""}break;default:if(0!==(1024&e))throw Error(a(163))}if(null!==(e=t.sibling)){e.return=t.return,xl=e;break}xl=t.return}}(e,t)}finally{fc=s,D.p=i,L.T=r}}Uc=1,gu(),yu(),vu()}}function gu(){if(1===Uc){Uc=0;var e=Fc,t=Vc,n=0!==(13878&t.flags);if(0!==(13878&t.subtreeFlags)||n){n=L.T,L.T=null;var r=D.p;D.p=2;var i=fc;fc|=4;try{Wl(t,e);var o=md,a=rr(e.containerInfo),s=o.focusedElem,l=o.selectionRange;if(a!==s&&s&&s.ownerDocument&&nr(s.ownerDocument.documentElement,s)){if(null!==l&&ir(s)){var c=l.start,u=l.end;if(void 0===u&&(u=c),"selectionStart"in s)s.selectionStart=c,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,h=d&&d.defaultView||window;if(h.getSelection){var f=h.getSelection(),p=s.textContent.length,m=Math.min(l.start,p),g=void 0===l.end?m:Math.min(l.end,p);!f.extend&&m>g&&(a=g,g=m,m=a);var y=tr(s,m),v=tr(s,g);if(y&&v&&(1!==f.rangeCount||f.anchorNode!==y.node||f.anchorOffset!==y.offset||f.focusNode!==v.node||f.focusOffset!==v.offset)){var b=d.createRange();b.setStart(y.node,y.offset),f.removeAllRanges(),m>g?(f.addRange(b),f.extend(v.node,v.offset)):(b.setEnd(v.node,v.offset),f.addRange(b))}}}}for(d=[],f=s;f=f.parentNode;)1===f.nodeType&&d.push({element:f,left:f.scrollLeft,top:f.scrollTop});for("function"===typeof s.focus&&s.focus(),s=0;s<d.length;s++){var w=d[s];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}bh=!!pd,md=pd=null}finally{fc=i,D.p=r,L.T=n}}e.current=t,Uc=2}}
2function yu(){if(2===Uc){Uc=0;var e=Fc,t=Vc,n=0!==(8772&t.flags);if(0!==(8772&t.subtreeFlags)||n){n=L.T,L.T=null;var r=D.p;D.p=2;var i=fc;fc|=4;try{Ll(e,t.alternate,t)}finally{fc=i,D.p=r,L.T=n}}Uc=3}}function vu(){if(4===Uc||3===Uc){Uc=0,se();var e=Fc,t=Vc,n=jc,r=qc;0!==(10256&t.subtreeFlags)||0!==(10256&t.flags)?Uc=5:(Uc=0,Vc=Fc=null,bu(e,e.pendingLanes));var i=e.pendingLanes;if(0===i&&(Mc=null),Ue(n),t=t.stateNode,ve&&"function"===typeof ve.onCommitFiberRoot)try{ve.onCommitFiberRoot(ye,t,void 0,128===(128&t.current.flags))}catch(l){}if(null!==r){t=L.T,i=D.p,D.p=2,L.T=null;try{for(var o=e.onRecoverableError,a=0;a<r.length;a++){var s=r[a];o(s.value,{componentStack:s.stack})}}finally{L.T=t,D.p=i}}0!==(3&jc)&&wu(),Du(e),i=e.pendingLanes,0!==(261930&n)&&0!==(42&i)?e===Wc?Hc++:(Hc=0,Wc=e):Hc=0,Mu(0,!1)}}function bu(e,t){0===(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,ji(t)))}function wu(){return gu(),yu(),vu(),_u()}function _u(){if(5!==Uc)return!1;var e=Fc,t=zc;zc=0;var n=Ue(jc),r=L.T,i=D.p;try{D.p=32>n?32:n,L.T=null,n=Bc,Bc=null;var o=Fc,s=jc;if(Uc=0,Vc=Fc=null,jc=0,0!==(6&fc))throw Error(a(331));var l=fc;if(fc|=4,lc(o.current),ec(o,o.current,s,n),fc=l,Mu(0,!1),ve&&"function"===typeof ve.onPostCommitFiberRoot)try{ve.onPostCommitFiberRoot(ye,o)}catch(c){}return!0}finally{D.p=i,L.T=r,bu(e,t)}}function Eu(e,t,n){t=Qr(n,t),null!==(e=wo(e,t=Rs(e.stateNode,t,2),2))&&(Oe(e,2),Du(e))}function Tu(e,t,n){if(3===e.tag)Eu(e,e,n);else for(;null!==t;){if(3===t.tag){Eu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Mc||!Mc.has(r))){e=Qr(n,e),null!==(r=wo(t,n=Ps(2),2))&&(Ns(n,r,t,e),Oe(r,2),Du(r));break}}t=t.return}}function Su(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hc;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)||(_c=!0,i.add(n),e=ku.bind(null,e,t,n),t.then(e,e))}function ku(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,pc===e&&(gc&n)===n&&(4===Tc||3===Tc&&(62914560&gc)===gc&&300>le()-Oc?0===(2&fc)&&tu(e,0):Cc|=n,Ac===gc&&(Ac=0)),Du(e)}function Cu(e,t){0===t&&(t=Pe()),null!==(e=xr(e,t))&&(Oe(e,t),Du(e))}function Iu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Cu(e,n)}function Au(e,t){var n=0;switch(e.tag){case 31: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(a(314))}null!==r&&r.delete(t),Cu(e,n)}var Ru=null,Pu=null,Nu=!1,Ou=!1,xu=!1,Lu=0;function Du(e){e!==Pu&&null===e.next&&(null===Pu?Ru=Pu=e:Pu=Pu.next=e),Ou=!0,Nu||(Nu=!0,Sd(function(){0!==(6&fc)?ie(ue,Uu):Fu()}))}function Mu(e,t){if(!xu&&Ou){xu=!0;do{for(var n=!1,r=Ru;null!==r;){if(!t)if(0!==e){var i=r.pendingLanes;if(0===i)var o=0;else{var a=r.suspendedLanes,s=r.pingedLanes;o=(1<<31-we(42|e)+1)-1,o=201326741&(o&=i&~(a&~s))?201326741&o|1:o?2|o:0}0!==o&&(n=!0,zu(r,o))}else o=gc,0===(3&(o=Ie(r,r===pc?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Ae(r,o)||(n=!0,zu(r,o));r=r.next}}while(n);xu=!1}}function Uu(){Fu()}function Fu(){Ou=Nu=!1;var e=0;0!==Lu&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==wd&&(wd=e,!0);return wd=null,!1}()&&(e=Lu);for(var t=le(),n=null,r=Ru;null!==r;){var i=r.next,o=Vu(r,t);0===o?(r.next=null,null===n?Ru=i:n.next=i,null===i&&(Pu=n)):(n=r,(0!==e||0!==(3&o))&&(Ou=!0)),r=i}0!==Uc&&5!==Uc||Mu(e,!1),0!==Lu&&(Lu=0)}function Vu(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=-62914561&e.pendingLanes;0<o;){var a=31-we(o),s=1<<a,l=i[a];-1===l?0!==(s&n)&&0===(s&r)||(i[a]=Re(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}if(n=gc,n=Ie(e,e===(t=pc)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===yc||9===yc)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&oe(r),e.callbackNode=null,e.callbackPriority=0;if(0===(3&n)||Ae(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&oe(r),Ue(n)){case 2:case 8:n=de;break;case 32:default:n=he;break;case 268435456:n=pe}return r=ju.bind(null,e),n=ie(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&oe(r),e.callbackPriority=2,e.callbackNode=null,2}function ju(e,t){if(0!==Uc&&5!==Uc)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(wu()&&e.callbackNode!==n)return null;var r=gc;return 0===(r=Ie(e,e===pc?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:($c(e,r,t),Vu(e,le()),null!=e.callbackNode&&e.callbackNode===n?ju.bind(null,e):null)}function zu(e,t){if(wu())return null;$c(e,t,!0)}function Bu(){if(0===Lu){var e=qi;0===e&&(e=Te,0===(261888&(Te<<=1))&&(Te=256)),Lu=e}return Lu}function qu(e){return null==e||"symbol"===typeof e||"boolean"===typeof e?null:"function"===typeof e?e:Nt(""+e)}function Hu(e,t){var n=t.ownerDocument.createElement("input");
vendor: 5,020 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 Wu=0;Wu<Sr.length;Wu++){var Gu=Sr[Wu];kr(Gu.toLowerCase(),"on"+(Gu[0].toUpperCase()+Gu.slice(1)))}kr(gr,"onAnimationEnd"),kr(yr,"onAnimationIteration"),kr(vr,"onAnimationStart"),kr("dblclick","onDoubleClick"),kr("focusin","onFocus"),kr("focusout","onBlur"),kr(br,"onTransitionRun"),kr(wr,"onTransitionStart"),kr(_r,"onTransitionCancel"),kr(Er,"onTransitionEnd"),it("onMouseEnter",["mouseout","mouseover"]),it("onMouseLeave",["mouseout","mouseover"]),it("onPointerEnter",["pointerout","pointerover"]),it("onPointerLeave",["pointerout","pointerover"]),rt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rt("onBeforeInput",["compositionend","keypress","textInput","paste"]),rt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ku="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(" "),Qu=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ku));function $u(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 o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;o=s,i.currentTarget=c;try{o(i)}catch(u){Cr(u)}i.currentTarget=null,o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;o=s,i.currentTarget=c;try{o(i)}catch(u){Cr(u)}i.currentTarget=null,o=l}}}}function Yu(e,t){var n=t[He];void 0===n&&(n=t[He]=new Set);var r=e+"__bubble";n.has(r)||(ed(t,e,2,!1),n.add(r))}function Xu(e,t,n){var r=0;t&&(r|=4),ed(n,e,r,t)}var Ju="_reactListening"+Math.random().toString(36).slice(2);function Zu(e){if(!e[Ju]){e[Ju]=!0,tt.forEach(function(t){"selectionchange"!==t&&(Qu.has(t)||Xu(t,!1,e),Xu(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Ju]||(t[Ju]=!0,Xu("selectionchange",!1,t))}}function ed(e,t,n,r){switch(Ch(t)){case 2:var i=wh;break;case 8:i=_h;break;default:i=Eh}n=i.bind(null,t,n,e),i=void 0,!Bt||"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 td(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i)break;if(4===a)for(a=r.return;null!==a;){var c=a.tag;if((3===c||4===c)&&a.stateNode.containerInfo===i)return;a=a.return}for(;null!==s;){if(null===(a=Ye(s)))return;if(5===(c=a.tag)||6===c||26===c||27===c){r=o=a;continue e}s=s.parentNode}}r=r.return}Vt(function(){var r=o,i=Lt(n),a=[];e:{var s=Tr.get(e);if(void 0!==s){var c=nn,u=e;switch(e){case"keypress":if(0===Qt(n))break e;case"keydown":case"keyup":c=vn;break;case"focusin":u="focus",c=cn;break;case"focusout":u="blur",c=cn;break;case"beforeblur":case"afterblur":c=cn;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":c=sn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=ln;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=wn;break;case gr:case yr:case vr:c=un;break;case Er:c=_n;break;case"scroll":case"scrollend":c=on;break;case"wheel":c=En;break;case"copy":case"cut":case"paste":c=dn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=bn;break;case"toggle":case"beforetoggle":c=Tn}var d=0!==(4&t),h=!d&&("scroll"===e||"scrollend"===e),f=d?null!==s?s+"Capture":null:s;d=[];for(var p,m=r;null!==m;){var g=m;if(p=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===p||null===f||null!=(g=jt(m,f))&&d.push(nd(m,g,p)),h)break;m=m.return}0<d.length&&(s=new c(s,u,null,n,i),a.push({event:s,listeners:d}))}}if(0===(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===xt||!(u=n.relatedTarget||n.fromElement)||!Ye(u)&&!u[qe])&&(c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(c=r,null!==(u=(u=n.relatedTarget||n.toElement)?Ye(u):null)&&(h=l(u),d=u.tag,u!==h||5!==d&&27!==d&&6!==d)&&(u=null)):(c=null,u=r),c!==u)){
vendor: 6,843 bytes, line 2
2if(d=sn,g="onMouseLeave",f="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(d=bn,g="onPointerLeave",f="onPointerEnter",m="pointer"),h=null==c?s:Je(c),p=null==u?s:Je(u),(s=new d(g,m+"leave",c,n,i)).target=h,s.relatedTarget=p,g=null,Ye(i)===r&&((d=new d(f,m+"enter",u,n,i)).target=p,d.relatedTarget=h,g=d),h=g,c&&u)e:{for(d=id,m=u,p=0,g=f=c;g;g=d(g))p++;g=0;for(var y=m;y;y=d(y))g++;for(;0<p-g;)f=d(f),p--;for(;0<g-p;)m=d(m),g--;for(;p--;){if(f===m||null!==m&&f===m.alternate){d=f;break e}f=d(f),m=d(m)}d=null}else d=null;null!==c&&od(a,s,c,d,!1),null!==u&&null!==h&&od(a,h,u,d,!0)}if("select"===(c=(s=r?Je(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===c&&"file"===s.type)var v=zn;else if(Dn(s))if(Bn)v=Xn;else{v=$n;var b=Qn}else!(c=s.nodeName)||"input"!==c.toLowerCase()||"checkbox"!==s.type&&"radio"!==s.type?r&&At(r.elementType)&&(v=zn):v=Yn;switch(v&&(v=v(e,r))?Mn(a,v,n,i):(b&&b(e,s,r),"focusout"===e&&r&&"number"===s.type&&null!=r.memoizedProps.value&&wt(s,"number",s.value)),b=r?Je(r):window,e){case"focusin":(Dn(b)||"true"===b.contentEditable)&&(ar=b,sr=r,lr=null);break;case"focusout":lr=sr=ar=null;break;case"mousedown":cr=!0;break;case"contextmenu":case"mouseup":case"dragend":cr=!1,ur(a,n,i);break;case"selectionchange":if(or)break;case"keydown":case"keyup":ur(a,n,i)}var w;if(kn)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else xn?Nn(e,n)&&(_="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(_="onCompositionStart");_&&(An&&"ko"!==n.locale&&(xn||"onCompositionStart"!==_?"onCompositionEnd"===_&&xn&&(w=Kt()):(Wt="value"in(Ht=i)?Ht.value:Ht.textContent,xn=!0)),0<(b=rd(r,_)).length&&(_=new hn(_,e,null,n,i),a.push({event:_,listeners:b}),w?_.data=w:null!==(w=On(n))&&(_.data=w))),(w=In?function(e,t){switch(e){case"compositionend":return On(t);case"keypress":return 32!==t.which?null:(Pn=!0,Rn);case"textInput":return(e=t.data)===Rn&&Pn?null:e;default:return null}}(e,n):function(e,t){if(xn)return"compositionend"===e||!kn&&Nn(e,t)?(e=Kt(),Gt=Wt=Ht=null,xn=!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 An&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(_=rd(r,"onBeforeInput")).length&&(b=new hn("onBeforeInput","beforeinput",null,n,i),a.push({event:b,listeners:_}),b.data=w)),function(e,t,n,r,i){if("submit"===t&&n&&n.stateNode===i){var o=qu((i[Be]||null).action),a=r.submitter;a&&null!==(t=(t=a[Be]||null)?qu(t.formAction):a.getAttribute("formAction"))&&(o=t,a=null);var s=new nn("action","action",null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==Lu){var e=a?Hu(i,a):new FormData(i);ts(n,{pending:!0,data:e,method:i.method,action:o},null,e)}}else"function"===typeof o&&(s.preventDefault(),e=a?Hu(i,a):new FormData(i),ts(n,{pending:!0,data:e,method:i.method,action:o},o,e))},currentTarget:i}]})}}(a,e,r,n,i)}$u(a,t)})}function nd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function rd(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;if(5!==(i=i.tag)&&26!==i&&27!==i||null===o||(null!=(i=jt(e,n))&&r.unshift(nd(e,i,o)),null!=(i=jt(e,t))&&r.push(nd(e,i,o))),3===e.tag)return r;e=e.return}return[]}function id(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function od(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(s=s.tag,null!==l&&l===r)break;5!==s&&26!==s&&27!==s||null===c||(l=c,i?null!=(c=jt(n,o))&&a.unshift(nd(n,c,l)):i||null!=(c=jt(n,o))&&a.push(nd(n,c,l))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var ad=/\r\n?/g,sd=/\u0000|\uFFFD/g;function ld(e){return("string"===typeof e?e:""+e).replace(ad,"\n").replace(sd,"")}function cd(e,t){return t=ld(t),ld(e)===t}function ud(e,t,n,r,i,o){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;case"className":ct(e,"class",r);break;case"tabIndex":ct(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ct(e,n,r);break;case"style":It(e,r,o);break;case"data":if("object"!==t){ct(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=Nt(""+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 o&&("formAction"===n?("input"!==t&&ud(e,t,"name",i.name,i,null),ud(e,t,"formEncType",i.formEncType,i,null),ud(e,t,"formMethod",i.formMethod,i,null),ud(e,t,"formTarget",i.formTarget,i,null)):(ud(e,t,"encType",i.encType,i,null),ud(e,t,"method",i.method,i,null),ud(e,t,"target",i.target,i,null))),null==r||"symbol"===typeof r||"boolean"===typeof r){e.removeAttribute(n);break}r=Nt(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=Ot);break;case"onScroll":null!=r&&Yu("scroll",e);break;case"onScrollEnd":null!=r&&Yu("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!==typeof r||!("__html"in r))throw Error(a(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(a(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=Nt(""+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"playsInl
2ine":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":Yu("beforetoggle",e),Yu("toggle",e),lt(e,"popover",r);break;case"xlinkActuate":ut(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ut(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ut(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ut(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ut(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ut(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ut(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ut(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ut(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":lt(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])&&lt(e,n=Rt.get(n)||n,r)}}function dd(e,t,n,r,i,o){switch(n){case"style":It(e,r,o);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!==typeof r||!("__html"in r))throw Error(a(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(a(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&&Yu("scroll",e);break;case"onScrollEnd":null!=r&&Yu("scrollend",e);break;case"onClick":null!=r&&(e.onclick=Ot);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:nt.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),"function"===typeof(o=null!=(o=e[Be]||null)?o[n]:null)&&e.removeEventListener(t,o,i),"function"!==typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):lt(e,n,r):("function"!==typeof o&&null!==o&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i)))}}function hd(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Yu("error",e),Yu("load",e);var r,i=!1,o=!1;for(r in n)if(n.hasOwnProperty(r)){var s=n[r];if(null!=s)switch(r){case"src":i=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:ud(e,t,r,s,n,null)}}return o&&ud(e,t,"srcSet",n.srcSet,n,null),void(i&&ud(e,t,"src",n.src,n,null));case"input":Yu("invalid",e);var l=r=s=o=null,c=null,u=null;for(i in n)if(n.hasOwnProperty(i)){var d=n[i];if(null!=d)switch(i){case"name":o=d;break;case"type":s=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":r=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(a(137,t));break;default:ud(e,t,i,d,n,null)}}return void bt(e,r,l,c,u,s,o,!1);case"select":for(o in Yu("invalid",e),i=s=r=null,n)if(n.hasOwnProperty(o)&&null!=(l=n[o]))switch(o){case"value":r=l;break;case"defaultValue":s=l;break;case"multiple":i=l;default:ud(e,t,o,l,n,null)}return t=r,n=s,e.multiple=!!i,void(null!=t?_t(e,!!i,t,!1):null!=n&&_t(e,!!i,n,!0));case"textarea":for(s in Yu("invalid",e),r=o=i=null,n)if(n.hasOwnProperty(s)&&null!=(l=n[s]))switch(s){case"value":i=l;break;case"defaultValue":o=l;break;case"children":r=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(a(91));break;default:ud(e,t,s,l,n,null)}return void Tt(e,i,o,r);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 ud(e,t,c,i,n,null);return;case"dialog":Yu("beforetoggle",e),Yu("toggle",e),Yu("cancel",e),Yu("close",e);break;case"iframe":case"object":Yu("load",e);break;case"video":case"audio":for(i=0;i<Ku.length;i++)Yu(Ku[i],e);break;case"image":Yu("error",e),Yu("load",e);break;case"details":Yu("toggle",e);break;case"embed":case"source":case"link":Yu("error",e),Yu("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(a(137,t));default:ud(e,t,u,i,n,null)}return;default:if(At(t)){for(d in n)n.hasOwnProperty(d)&&(void 0!==(i=n[d])&&dd(e,t,d,i,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(null!=(i=n[l])&&ud(e,t,l,i,n,null))}function fd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var pd=null,md=null;
vendor: 10,275 bytes, line 2
2function gd(e){return 9===e.nodeType?e:e.ownerDocument}function yd(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 vd(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 bd(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 wd=null;var _d="function"===typeof setTimeout?setTimeout:void 0,Ed="function"===typeof clearTimeout?clearTimeout:void 0,Td="function"===typeof Promise?Promise:void 0,Sd="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof Td?function(e){return Td.resolve(null).then(e).catch(kd)}:_d;function kd(e){setTimeout(function(){throw e})}function Cd(e){return"head"===e}function Id(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)||"/&"===n){if(0===r)return e.removeChild(i),void Hh(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)Fd(e.ownerDocument.documentElement);else if("head"===n){Fd(n=e.ownerDocument.head);for(var o=n.firstChild;o;){var a=o.nextSibling,s=o.nodeName;o[Qe]||"SCRIPT"===s||"STYLE"===s||"LINK"===s&&"stylesheet"===o.rel.toLowerCase()||n.removeChild(o),o=a}}else"body"===n&&Fd(e.ownerDocument.body);n=i}while(n);Hh(t)}function Ad(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function Rd(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":Rd(n),$e(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Pd(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=xd(e.nextSibling)))return null}return e}function Nd(e){return"$?"===e.data||"$~"===e.data}function Od(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function xd(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||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Ld=null;function Dd(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return xd(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function Md(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function Ud(e,t,n){switch(t=gd(n),e){case"html":if(!(e=t.documentElement))throw Error(a(452));return e;case"head":if(!(e=t.head))throw Error(a(453));return e;case"body":if(!(e=t.body))throw Error(a(454));return e;default:throw Error(a(451))}}function Fd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);$e(e)}var Vd=new Map,jd=new Set;function zd(e){return"function"===typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Bd=D.d;D.d={f:function(){var e=Bd.f(),t=Zc();return e||t},r:function(e){var t=Xe(e);null!==t&&5===t.tag&&"form"===t.type?rs(t):Bd.r(e)},D:function(e){Bd.D(e),Hd("dns-prefetch",e,null)},C:function(e,t){Bd.C(e,t),Hd("preconnect",e,t)},L:function(e,t,n){Bd.L(e,t,n);var r=qd;if(r&&e&&t){var i='link[rel="preload"][as="'+yt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(i+='[imagesrcset="'+yt(n.imageSrcSet)+'"]',"string"===typeof n.imageSizes&&(i+='[imagesizes="'+yt(n.imageSizes)+'"]')):i+='[href="'+yt(e)+'"]';var o=i;switch(t){case"style":o=Gd(e);break;case"script":o=$d(e)}Vd.has(o)||(e=f({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),Vd.set(o,e),null!==r.querySelector(i)||"style"===t&&r.querySelector(Kd(o))||"script"===t&&r.querySelector(Yd(o))||(hd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}},m:function(e,t){Bd.m(e,t);var n=qd;if(n&&e){var r=t&&"string"===typeof t.as?t.as:"script",i='link[rel="modulepreload"][as="'+yt(r)+'"][href="'+yt(e)+'"]',o=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=$d(e)}if(!Vd.has(o)&&(e=f({rel:"modulepreload",href:e},t),Vd.set(o,e),null===n.querySelector(i))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Yd(o)))return}hd(r=n.createElement("link"),"link",e),et(r),n.head.appendChild(r)}}},X:function(e,t){Bd.X(e,t);var n=qd;if(n&&e){var r=Ze(n).hoistableScripts,i=$d(e),o=r.get(i);o||((o=n.querySelector(Yd(i)))||(e=f({src:e,async:!0},t),(t=Vd.get(i))&&eh(e,t),et(o=n.createElement("script")),hd(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}},S:function(e,t,n){Bd.S(e,t,n);var r=qd;if(r&&e){var i=Ze(r).hoistableStyles,o=Gd(e);t=t||"default";var a=i.get(o);if(!a){var s={loading:0,preload:null};if(a=r.querySelector(Kd(o)))s.loading=5;else{e=f({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Vd.get(o))&&Zd(e,n);var l=a=r.createElement("link");et(l),hd(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Jd(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:s},i.set(o,a)}}},M:function(e,t){Bd.M(e,t);var n=qd;if(n&&e){var r=Ze(n).hoistableScripts,i=$d(e),o=r.get(i);o||((o=n.querySelector(Yd(i)))||(e=f({src:e,async:!0,type:"module"},t),(t=Vd.get(i))&&eh(e,t),et(o=n.createElement("script")),hd(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}}};var qd="undefined"===typeof document?null:document;function Hd(e,t,n){var r=qd;if(r&&"string"===typeof t&&t){var i=yt(t);i='link[rel="'+e+'"][href="'+i+'"]',"string"===typeof n&&(i+='[crossorigin="'+n+'"]'),jd.has(i)||(jd.add(i),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(i)&&(hd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}}function Wd(e,t,n,r){var i,o,s,l,c=(c=G.current)?zd(c):null;if(!c)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return"string"===typeof n.precedence&&"string"===typeof n.href?(t=Gd(n.href),(r=(n=Ze(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=Gd(n.href);var u=Ze(c).hoistableStyles,d=u.get(e);if(d||(c=c.ownerDocument||c,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=c.querySelector(Kd(e)))&&!u._p&&(d.instance=u,d.state.loading=5),Vd.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},Vd.set(e,n),u||(i=c,o=e,s=n,l=d.state,i.querySelector('link[rel="preload"][as="style"]['+o+"]")?l.loading=1:(o=i.createElement("link"),l.preload=o,o.addEventListener("load",function(){return l.loading|=1}),o.addEventListener("error",function(){return l.loading|=2}),hd(o,"link",s),et(o),i.head.appendChild(o))))),t&&null===r)throw Error(a(528,""));return d}if(t&&null!==r)throw Error(a(529,""));return null;case"script":return t=n.async,"string"===typeof(n=n.src)&&t&&"function"!==typeof t&&"symbol"!==typeof t?(t=$d(n),(r=(n=Ze(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(a(444,e))}}function Gd(e){return'href="'+yt(e)+'"'}function Kd(e){return'link[rel="stylesheet"]['+e+"]"}function Qd(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function $d(e){return'[src="'+yt(e)+'"]'}function Yd(e){return"script[async]"+e}function Xd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+yt(n.href)+'"]');if(r)return t.instance=r,et(r),r;var i=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return et(r=(e.ownerDocument||e).createElement("style")),hd(r,"style",i),Jd(r,n.precedence,e),t.instance=r;case"stylesheet":i=Gd(n.href);var o=e.querySelector(Kd(i));if(o)return t.state.loading|=4,t.instance=o,et(o),o;r=Qd(n),(i=Vd.get(i))&&Zd(r,i),et(o=(e.ownerDocument||e).createElement("link"));var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),hd(o,"link",r),t.state.loading|=4,Jd(o,n.precedence,e),t.instance=o;case"script":return o=$d(n.src),(i=e.querySelector(Yd(o)))?(t.instance=i,et(i),i):(r=n,(i=Vd.get(o))&&eh(r=f({},n),i),et(i=(e=e.ownerDocument||e).createElement("script")),hd(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(a(443,t.type))}else"stylesheet"===t.type&&0===(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,Jd(r,n.precedence,e));return t.instance}function Jd(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,o=i,a=0;a<r.length;a++){var s=r[a];if(s.dataset.precedence===t)o=s;else if(o!==i)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function Zd(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function eh(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var th=null;
vendor: 4,841 bytes, line 2
2function nh(e,t,n){if(null===th){var r=new Map,i=th=new Map;i.set(n,r)}else(r=(i=th).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 o=n[i];if(!(o[Qe]||o[ze]||"link"===e&&"stylesheet"===o.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==o.namespaceURI){var a=o.getAttribute(t)||"";a=e+a;var s=r.get(a);s?s.push(o):r.set(a,[o])}}return r}function rh(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 oh=0;function ah(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)lh(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var sh=null;function lh(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,sh=new Map,t.forEach(ch,e),sh=null,ah.call(e))}function ch(e,t){if(!(4&t.state.loading)){var n=sh.get(e);if(n)var r=n.get(null);else{n=new Map,sh.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<i.length;o++){var a=i[o];"LINK"!==a.nodeName&&"not all"===a.getAttribute("media")||(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}a=(i=t.instance).getAttribute("data-precedence"),(o=n.get(a)||r)===r&&n.set(null,i),n.set(a,i),this.count++,r=ah.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),o?o.parentNode.insertBefore(i,o.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(i,e.firstChild),t.state.loading|=4}}var uh={$$typeof:_,Provider:null,Consumer:null,_currentValue:M,_currentValue2:M,_threadCount:0};function dh(e,t,n,r,i,o,a,s,l){this.tag=1,this.containerInfo=e,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.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=o,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function hh(e,t,n,r,i,o,a,s,l,c,u,d){return e=new dh(e,t,n,a,l,c,u,d,s),t=1,!0===o&&(t|=24),o=Fr(3,null,null,t),e.current=o,o.stateNode=e,(t=Vi()).refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:r,isDehydrated:n,cache:t},yo(o),e}function fh(e){return e?e=Mr:Mr}function ph(e,t,n,r,i,o){i=fh(i),null===r.context?r.context=i:r.pendingContext=i,(r=bo(t)).payload={element:n},null!==(o=void 0===o?null:o)&&(r.callback=o),null!==(n=wo(e,r,t))&&(Qc(n,0,t),_o(n,e,t))}function mh(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function gh(e,t){mh(e,t),(e=e.alternate)&&mh(e,t)}function yh(e){if(13===e.tag||31===e.tag){var t=xr(e,67108864);null!==t&&Qc(t,0,67108864),gh(e,67108864)}}function vh(e){if(13===e.tag||31===e.tag){var t=Gc(),n=xr(e,t=Me(t));null!==n&&Qc(n,0,t),gh(e,t)}}var bh=!0;function wh(e,t,n,r){var i=L.T;L.T=null;var o=D.p;try{D.p=2,Eh(e,t,n,r)}finally{D.p=o,L.T=i}}function _h(e,t,n,r){var i=L.T;L.T=null;var o=D.p;try{D.p=8,Eh(e,t,n,r)}finally{D.p=o,L.T=i}}function Eh(e,t,n,r){if(bh){var i=Th(r);if(null===i)td(e,t,r,Sh,n),Dh(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Ah=Mh(Ah,e,t,n,r,i),!0;case"dragenter":return Rh=Mh(Rh,e,t,n,r,i),!0;case"mouseover":return Ph=Mh(Ph,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Nh.set(o,Mh(Nh.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Oh.set(o,Mh(Oh.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Dh(e,r),4&t&&-1<Lh.indexOf(e)){for(;null!==i;){var o=Xe(i);if(null!==o)switch(o.tag){case 3:if((o=o.stateNode).current.memoizedState.isDehydrated){var a=Ce(o.pendingLanes);if(0!==a){var s=o;for(s.pendingLanes|=2,s.entangledLanes|=2;a;){var l=1<<31-we(a);s.entanglements[1]|=l,a&=~l}Du(o),0===(6&fc)&&(Lc=le()+500,Mu(0,!1))}}break;case 31:case 13:null!==(s=xr(o,2))&&Qc(s,0,2),Zc(),gh(o,2)}if(null===(o=Th(r))&&td(e,t,r,Sh,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else td(e,t,r,null,n)}}function Th(e){return kh(e=Lt(e))}var Sh=null;function kh(e){if(Sh=null,null!==(e=Ye(e))){var t=l(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=c(t)))return e;e=null}else if(31===n){if(null!==(e=u(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 Sh=e,null}function Ch(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close"
vendor: 2,157 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 de:return 8;case he:case fe:return 32;case pe:return 268435456;default:return 32}default:return 32}}var Ih=!1,Ah=null,Rh=null,Ph=null,Nh=new Map,Oh=new Map,xh=[],Lh="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 Dh(e,t){switch(e){case"focusin":case"focusout":Ah=null;break;case"dragenter":case"dragleave":Rh=null;break;case"mouseover":case"mouseout":Ph=null;break;case"pointerover":case"pointerout":Nh.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oh.delete(t.pointerId)}}function Mh(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=Xe(t))&&yh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Uh(e){var t=Ye(e.target);if(null!==t){var n=l(t);
vendor: 1,382 bytes, line 2
2if(null!==n)if(13===(t=n.tag)){if(null!==(t=c(n)))return e.blockedOn=t,void Ve(e.priority,function(){vh(n)})}else if(31===t){if(null!==(t=u(n)))return e.blockedOn=t,void Ve(e.priority,function(){vh(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Fh(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Th(e.nativeEvent);if(null!==n)return null!==(t=Xe(n))&&yh(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);xt=r,n.target.dispatchEvent(r),xt=null,t.shift()}return!0}function Vh(e,t,n){Fh(e)&&n.delete(t)}function jh(){Ih=!1,null!==Ah&&Fh(Ah)&&(Ah=null),null!==Rh&&Fh(Rh)&&(Rh=null),null!==Ph&&Fh(Ph)&&(Ph=null),Nh.forEach(Vh),Oh.forEach(Vh)}function zh(e,t){e.blockedOn===t&&(e.blockedOn=null,Ih||(Ih=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,jh)))}var Bh=null;function qh(e){Bh!==e&&(Bh=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Bh===e&&(Bh=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===kh(r||n))continue;break}var o=Xe(n);null!==o&&(e.splice(t,3),t-=3,ts(o,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}null!==Ah&&zh(Ah,e),null!==Rh&&zh(Rh,e),null!==Ph&&zh(Ph,e),Nh.forEac
2h(t),Oh.forEach(t);for(var n=0;n<xh.length;n++){var r=xh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xh.length&&null===(n=xh[0]).blockedOn;)Uh(n),null===n.blockedOn&&xh.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var i=n[r],o=n[r+1],a=i[Be]||null;if("function"===typeof o)a||qh(n);else if(a){var s=null;if(o&&o.hasAttribute("formAction")){if(i=o,a=o[Be]||null)s=a.formAction;else if(null!==kh(i))continue}else s=a.action;"function"===typeof s?n[r+1]=s:(n.splice(r,3),r-=3),qh(n)}}}function Wh(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==i&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"===typeof navigation){var r=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==i&&(i(),i=null)}}}function Gh(e){this._internalRoot=e}function Kh(e){this._internalRoot=e}Kh.prototype.render=Gh.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));ph(t.current,Gc(),e,t,null,null)},Kh.prototype.unmount=Gh.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;ph(e.current,2,null,e,null,null),Zc(),t[qe]=null}},Kh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xh.length&&0!==t&&t<xh[n].priority;n++);xh.splice(n,0,e),0===n&&Uh(e)}};var Qh=i.version;if("19.2.5"!==Qh)throw Error(a(527,Qh,"19.2.5"));D.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=l(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return d(i),e;if(o===r)return d(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?h(e):null)?null:e.stateNode};var $h={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.5"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Yh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yh.isDisabled&&Yh.supportsFiber)try{ye=Yh.inject($h),ve=Yh}catch(Jh){}}t.createRoot=function(e,t){if(!s(e))throw Error(a(299));var n=!1,r="",i=Ss,o=ks,l=Cs;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&&(o=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError)),t=hh(e,1,!1,null,0,n,r,null,i,o,l,Wh),e[qe]=t.current,Zu(e),new Gh(t)},t.hydrateRoot=function(e,t,n){if(!s(e))throw Error(a(299));var r=!1,i="",o=Ss,l=ks,c=Cs,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&&(o=n.onUncaughtError),void 0!==n.onCaughtError&&(l=n.onCaughtError),void 0!==n.onRecoverableError&&(c=n.onRecoverableError),void 0!==n.formState&&(u=n.formState)),(t=hh(e,1,!0,t,0,r,i,u,o,l,c,Wh)).context=fh(null),n=t.current,(i=bo(r=Me(r=Gc()))).callback=null,wo(n,i,r),n=r,t.current.lanes=n,Oe(t,n),Du(t),e[qe]=t.current,Zu(e),new Kh(t)},t.version="19.2.5"},46672(e,t,n){var r=n(65043);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 o(){}var a={d:{f:o,r:function(){throw Error(i(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},s=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=a,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:s,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.flushSync=function(e){var t=l.T,n=a.p;try{if(l.T=null,a.p=2,e)return e()}finally{l.T=t,a.p=n,a.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,a.d.C(e,t))},t.prefetchDNS=function(e){"string"===typeof e&&a.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,o="string"===typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?a.d.S(e,"string"===typeof t.precedence?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):"script"===n&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,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);a.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&&a.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);a.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:"str
2ing"===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);a.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 a.d.m(e)},t.requestFormReset=function(e){a.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.2.5"},84391(e,t,n){!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(97004)},97950(e,t,n){!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(46672)},22799(e,t){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 o in r={},t)"key"!==o&&(r[o]=t[o]);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},44288(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),p=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function v(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||m}function b(){}function w(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||m}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")},b.prototype=v.prototype;var _=w.prototype=new b;_.constructor=w,g(_,v.prototype),_.isPureReactComponent=!0;var E=Array.isArray;function T(){}var S={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function C(e,t,r){var i=r.ref;return{$$typeof:n,type:e,key:t,ref:void 0!==i?i:null,props:r}}function I(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var A=/\/+/g;function R(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 P(e,t,i,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l,c,u=!1;if(null===e)u=!0;else switch(s){case"bigint":case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case n:case r:u=!0;break;case h:return P((u=e._init)(e._payload),t,i,o,a)}}if(u)return a=a(e),u=""===o?"."+R(e,0):o,E(a)?(i="",null!=u&&(i=u.replace(A,"$&/")+"/"),P(a,t,i,"",function(e){return e})):null!=a&&(I(a)&&(l=a,c=i+(null==a.key||e&&e.key===a.key?"":(""+a.key).replace(A,"$&/")+"/")+u,a=C(l.type,c,l.props)),t.push(a)),1;u=0;var d,f=""===o?".":o+":";if(E(e))for(var m=0;m<e.length;m++)u+=P(o=e[m],t,i,s=f+R(o,m),a);else if("function"===typeof(m=null===(d=e)||"object"!==typeof d?null:"function"===typeof(d=p&&d[p]||d["@@iterator"])?d:null))for(e=m.call(e),m=0;!(o=e.next()).done;)u+=P(o=o.value,t,i,s=f+R(o,m++),a);else if("object"===s){if("function"===typeof e.then)return P(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"===typeof e.status?e.then(T,T):(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,o,a);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 N(e,t,n){if(null==e)return e;var r=[],i=0;return P(e,r,"","",function(e){return t.call(n,e,i++)}),r}function O(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 x="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)},L={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!I(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};t.Activity=f,t.Children=L,t.Component=v,t.Fragment=i,t.Profiler=a,t.PureComponent=w,t.StrictMode=o,t.Suspense=u,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,t.__COMPILER_RUNTIME={__proto__:null,c:function(e){return S.H.useMemoCache(e)}}
vendor: 6,589 bytes, line 2
2,t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cacheSignal=function(){return null},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=g({},e.props),i=e.key;if(null!=t)for(o in void 0!==t.key&&(i=""+t.key),t)!k.call(t,o)||"key"===o||"__self"===o||"__source"===o||"ref"===o&&void 0===t.ref||(r[o]=t[o]);var o=arguments.length-2;if(1===o)r.children=n;else if(1<o){for(var a=Array(o),s=0;s<o;s++)a[s]=arguments[s+2];r.children=a}return C(e.type,i,r)},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:s,_context:e},e},t.createElement=function(e,t,n){var r,i={},o=null;if(null!=t)for(r in void 0!==t.key&&(o=""+t.key),t)k.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(i[r]=t[r]);var a=arguments.length-2;if(1===a)i.children=n;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];i.children=s}if(e&&e.defaultProps)for(r in a=e.defaultProps)void 0===i[r]&&(i[r]=a[r]);return C(e,o,i)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=I,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:O}},t.memo=function(e,t){return{$$typeof:d,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(T,x)}catch(o){x(o)}finally{null!==t&&null!==n.types&&(t.types=n.types),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.useEffectEvent=function(e){return S.H.useEffectEvent(e)},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.2.5"},65043(e,t,n){e.exports=n(44288)},70579(e,t,n){e.exports=n(22799)},5896(e,t){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<o(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,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>o(l,n))c<i&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(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 a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,y=!1,v="function"===typeof setTimeout?setTimeout:null,b="function"===typeof clearTimeout?clearTimeout:null,w="undefined"!==typeof setImmediate?setImmediate:null;function _(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 E(e){if(g=!1,_(e),!m)if(null!==r(c))m=!0,S||(S=!0,T());else{var t=r(u);null!==t&&O(E,t.startTime-e)}}var T,S=!1,k=-1,C=5,I=-1;function A(){return!!y||!(t.unstable_now()-I<C)}function R(){if(y=!1,S){var e=t.unstable_now();I=e;var n=!0;try{e:{m=!1,g&&(g=!1,b(k),k=-1),p=!0;var o=f;try{t:{for(_(e),h=r(c);null!==h&&!(h.expirationTime>e&&A());){var a=h.callback;if("function"===typeof a){h.callback=null,f=h.priorityLevel;var s=a(h.expirationTime<=e);if(e=t.unstable_now(),"function"===typeof s){h.callback=s,_(e),n=!0;break t}h===r(c)&&i(c),_(e)}else i(c);h=r(c)}if(null!==h)n=!0;else{var l=r(u);null!==l&&O(E,l.startTime-e),n=!1}}break e}finally{h=null,f=o,p=!1}n=void 0}}finally{n?T():S=!1}}}if("function"===typeof w)T=function(){w(R)};else if("undefined"!==typeof MessageChannel){var P=new MessageChannel,N=P.port2;P.port1.onmessage=R,T=function(){N.postMessage(null)}}else T=function(){v(R,0)};function O(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_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"):C=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},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_requestPaint=function(){y=!0},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,o){var a=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?a+o:a:o=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(g?(b(k),k=-1):g=!0,O(E,o-a))):(e.sortIndex=s,n(c,e),m||p||(m=!0,S||(S=!0,T()))),e},t.unstable_shouldYield=A,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},78853(e,t,n){e.exports=n(5896)},43145(e,t,n){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{A:()=>r})},96369(e,t,n){function r(e){if(Array.isArray(e))return e}n.d(t,{A:()=>r})},64980(e,t,n){n.d(t,{A:()=>
2o});var r=n(82284);function i(e){var t=function(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=(0,r.A)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,r.A)(t)?t:t+""}function o(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},76562(e,t,n){function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>r})},89379(e,t,n){n.d(t,{A:()=>o});var r=n(64980);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}},53986(e,t,n){function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{A:()=>r})},5544(e,t,n){n.d(t,{A:()=>a});var r=n(96369);var i=n(27800),o=n(76562);function a(e,t){return(0,r.A)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||(0,i.A)(e,t)||(0,o.A)()}},5763(e,t,n){n.d(t,{A:()=>a});var r=n(96369);var i=n(27800),o=n(76562);function a(e){return(0,r.A)(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,i.A)(e)||(0,o.A)()}},82284(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},27800(e,t,n){n.d(t,{A:()=>i});var r=n(43145);function i(e,t){if(e){if("string"==typeof e)return(0,r.A)(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.A)(e,t):void 0}}},80052(e,t,n){n.d(t,{Dk:()=>J,KO:()=>Z,MF:()=>$,Sx:()=>X,Wp:()=>Y,j6:()=>H,om:()=>q,xZ:()=>W});var r=n(88812),i=n(50443),o=n(51529),a=n(72799);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"".concat(t.library,"/").concat(t.version)}return null}).filter(e=>e).join(" ")}}const l="@firebase/app",c="0.13.2",u=new i.Vy("@firebase/app"),d="@firebase/app-compat",h="@firebase/analytics-compat",f="@firebase/analytics",p="@firebase/app-check-compat",m="@firebase/app-check",g="@firebase/auth",y="@firebase/auth-compat",v="@firebase/database",b="@firebase/data-connect",w="@firebase/database-compat",_="@firebase/functions",E="@firebase/functions-compat",T="@firebase/installations",S="@firebase/installations-compat",k="@firebase/messaging",C="@firebase/messaging-compat",I="@firebase/performance",A="@firebase/performance-compat",R="@firebase/remote-config",P="@firebase/remote-config-compat",N="@firebase/storage",O="@firebase/storage-compat",x="@firebase/firestore",L="@firebase/ai",D="@firebase/firestore-compat",M="firebase",U="[DEFAULT]",F={[l]:"fire-core",[d]:"fire-core-compat",[f]:"fire-analytics",[h]:"fire-analytics-compat",[m]:"fire-app-check",[p]:"fire-app-check-compat",[g]:"fire-auth",[y]:"fire-auth-compat",[v]:"fire-rtdb",[b]:"fire-data-connect",[w]:"fire-rtdb-compat",[_]:"fire-fn",[E]:"fire-fn-compat",[T]:"fire-iid",[S]:"fire-iid-compat",[k]:"fire-fcm",[C]:"fire-fcm-compat",[I]:"fire-perf",[A]:"fire-perf-compat",[R]:"fire-rc",[P]:"fire-rc-compat",[N]:"fire-g
2cs",[O]:"fire-gcs-compat",[x]:"fire-fst",[D]:"fire-fst-compat",[L]:"fire-vertex","fire-js":"fire-js",[M]:"fire-js-all"},V=new Map,j=new Map,z=new Map;function B(e,t){try{e.container.addComponent(t)}catch(n){u.debug("Component ".concat(t.name," failed to register with FirebaseApp ").concat(e.name),n)}}function q(e){const t=e.name;if(z.has(t))return u.debug("There were multiple attempts to register component ".concat(t,".")),!1;z.set(t,e);for(const n of V.values())B(n,e);for(const n of j.values())B(n,e);return!0}function H(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function W(e){return null!==e&&void 0!==e&&void 0!==e.settings}const G={"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."},K=new o.FA("app","Firebase",G);class Q{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 K.create("app-deleted",{appName:this._name})}}const $="11.10.0";function Y(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:U,automaticDataCollectionEnabled:!0},t),a=i.name;if("string"!==typeof a||!a)throw K.create("bad-app-name",{appName:String(a)});if(n||(n=(0,o.T9)()),!n)throw K.create("no-options");const s=V.get(a);if(s){if((0,o.bD)(n,s.options)&&(0,o.bD)(i,s.config))return s;throw K.create("duplicate-app",{appName:a})}const l=new r.h1(a);for(const r of z.values())l.addComponent(r);const c=new Q(n,i,l);return V.set(a,c),c}function X(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U;const t=V.get(e);if(!t&&e===U&&(0,o.T9)())return Y();if(!t)throw K.create("no-app",{appName:e});return t}function J(){return Array.from(V.values())}function Z(e,t,n){var i;let o=null!==(i=F[e])&&void 0!==i?i:e;n&&(o+="-".concat(n));const a=o.match(/\s|\//),s=t.match(/\s|\//);if(a||s){const e=['Unable to register library "'.concat(o,'" with version "').concat(t,'":')];return a&&e.push('library name "'.concat(o,'" contains illegal characters (whitespace or "/")')),a&&s&&e.push("and"),s&&e.push('version name "'.concat(t,'" contains illegal characters (whitespace or "/")')),void u.warn(e.join(" "))}q(new r.uA("".concat(o,"-version"),()=>({library:o,version:t}),"VERSION"))}const ee="firebase-heartbeat-store";let te=null;function ne(){return te||(te=(0,a.P2)("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(ee)}catch(n){console.warn(n)}}}).catch(e=>{throw K.create("idb-open",{originalErrorMessage:e.message})})),te}async function re(e,t){try{const n=(await ne()).transaction(ee,"readwrite"),r=n.objectStore(ee);await r.put(t,ie(e)),await n.done}catch(n){if(n instanceof o.g)u.warn(n.message);else{const e=K.create("idb-set",{originalErrorMessage:null===n||void 0===n?void 0:n.message});u.warn(e.message)}}}function ie(e){return"".concat(e.name,"!").concat(e.options.appId)}class oe{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=ae();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){u.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=ae(),n=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),le(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),le(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),r=n.heartbeatsToSend,i=n.unsentEntries,a=(0,o.Uj)(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=t,i.length>0?(this._heartbeatsCache.heartbeats=i,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),a}catch(t){return u.warn(t),""}}}function ae(){return(new Date).toISOString().substring(0,10)}class se{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!(0,o.zW)()&&(0,o.eX)().then(()=>!0).catch(()=>!1)}async read(){if(await this._canUseIndexedDBPromise){const e=await async function(e){try{const t=(await ne()).transaction(ee),n=await t.objectStore(ee).get(ie(e));return await t.done,n}catch(t){if(t instanceof o.g)u.warn(t.message);else{const e=K.create("idb-get",{originalErrorMessage:null===t||void 0===t?void 0:t.message});u.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 re(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 re(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function le(e){return(0,o.Uj)(JSON.stringify({version:2,heartbeats:e})).length}var ce;ce="",q(new r.uA("platform-logger",e=>new s(e),"PRIVATE")),q(new r.uA("heartbeat",e=>new oe(e),"PRIVATE")),Z(l,c,ce),Z(l,c,"esm2017"),Z("fire-js","")},88812(e,t,n){n.d(t,{h1:()=>l,uA:()=>o});var r=n(5544),i=n(51529);class o{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 a="[DEFAULT]";class s{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 i.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 ".concat(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 ".concat(e.name," for Provider ").concat(this.name,"."));if(this.component)throw Error("Component for ".concat(this.name," has already been provided"));if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:a})}catch(n){}for(const e of this.instancesDeferred.entries()){var t=(0,r.A)(e,2);const i=t[0],o=t[1],a=this.normalizeInstanceIdentifier(i);try{const e=this.getOrInitializeService({instanceIdentifier:a});o.resolve(e)}catch(n){}}}}clearInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;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]:a;return this.instances.has(e)}getOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;return this.instancesOptions.get(e)||{}}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.options,n=void 0===t?{}:t,i=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(i))throw Error("".concat(this.name,"(").concat(i,") has already been initialized"));if(!this.isComponentSet())throw Error("Component ".concat(this.name," has not been registered yet"));const o=this.getOrInitializeService({instanceIdentifier:i,options:n});for(const s of this.instancesDeferred.entries()){var a=(0,r.A)(s,2);const e=a[0],t=a[1];i===this.normalizeInstanceIdentifier(e)&&t.resolve(o)}return o}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 o=this.instances.get(r);return o&&e(o,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 t=e.instanceIdentifier,n=e.options,r=void 0===n?{}:n,i=this.instances.get(t);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:(o=t,o===a?void 0:o),options:r}),this.instances.set(t,i),this.instancesOptions.set(t,r),this.invokeOnInitCallbacks(i,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,i)}catch(s){}var o;return i||null}normalizeInstanceIdentifier(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;return this.component?this.component.multipleInstances?e:a:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class l{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component ".concat(e.name," has already been registered with ").concat(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 s(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}},50443(e,t,n){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.E
2RROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(i||(i={}));const o={debug:i.DEBUG,verbose:i.VERBOSE,info:i.INFO,warn:i.WARN,error:i.ERROR,silent:i.SILENT},a=i.INFO,s={[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=s[t];if(!r)throw new Error("Attempted to log a message with an invalid logType (value: ".concat(t,")"));for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];console[r]("[".concat(n,"]  ").concat(e.name,":"),...o)};class c{constructor(e){this.name=e,this._logLevel=a,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 "'.concat(e,'" assigned to `logLevel`'));this._logLevel=e}setLogLevel(e){this._logLevel="string"===typeof e?o[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)}}},37064(e,t,n){n.d(t,{Dk:()=>r.Dk,Sx:()=>r.Sx,Wp:()=>r.Wp});var r=n(80052);(0,r.KO)("firebase","11.10.0","app")},67898(e,t,n){n.d(t,{IX:()=>Ye,sv:()=>St,F0:()=>zt,iM:()=>Gt,R4:()=>Tt,eJ:()=>Ct,xI:()=>ir,Pj:()=>At,OS:()=>pt,hg:()=>Dt,kZ:()=>mt,yQ:()=>X,gA:()=>Pt,J1:()=>Et,oM:()=>Lt,p:()=>gt,x9:()=>It,hK:()=>Rt,CI:()=>Mt,f3:()=>Ot,r7:()=>Nt,RE:()=>kt});var r=n(5544),i=n(80052),o=n(51529),a=n(50443);function s(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 l=n(88812);function c(){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 u=c,d=new o.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 a.Vy("@firebase/auth");function f(e){if(h.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];h.error("Auth (".concat(i.MF,"): ").concat(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];throw v(e,...n)}function m(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 g(e,t,n){const r=Object.assign(Object.assign({},u()),{[t]:n});return new o.FA("auth","Firebase",r).create(t,{appName:e.name})}function y(e){return g(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 d.create(e,...n)}function b(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 w(e){const t="INTERNAL ASSERTION FAILED: "+e;throw f(t),new Error(t)}function _(e,t){e||w(t)}function E(){var e;return"undefined"!==typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function T(){return"http:"===S()||"https:"===S()}function S(){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,_(t>e,"Short delay should be less than long delay!"),this.isMobile=(0,o.jZ)()||(0,o.lV)()}get(){return"undefined"!==typeof navigator&&navigator&&"onLine"in navigator&&"boolean"===typeof navigator.onLine&&(T()||(0,o.sr)()||"connection"in navigator)&&!navigator.onLine?Math.min(5e3,this.shortDelay):this.isMobile?this.longDelay:this.shortDelay}}function C(e,t){_(e.emulator,"Emulator should always be set here");const n=e.emulator.url;return t?"".concat(n).concat(t.startsWith("/")?t.slice(1):t):n}class I{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 w("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 w("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 w("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const A={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"},R=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],P=new k(3e4,6e4);function N(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function O(e,t,n,r){return x(e,arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},async()=>{let i={},a={};r&&("GET"===t?a=r:i={body:JSON.stringify(r)});const s=(0,o.Am)(Object.assign({key:e.config.apiKey},a)).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},i);return(0,o.c1)()||(c.referrerPolicy="no-referrer"),e.emulatorConfig&&(0,o.zJ)(e.emulatorConfig.host)&&(c.credentials="include"),I.fetch()(await D(e,e.config.apiHost,n,s),c)})}async function x(e,t,n){e._canInitEmulator=!1;const i=Object.assign(Object.assign({},A),t);try{const t=new U(e),o=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();const a=await o.json();if("needConfirmation"in a)throw F(e,"account-exists-with-different-credential",a);if(o.ok&&!("errorMessage"in a))return a;{const t=(o.ok?a.errorMessage:a.error.message).split(" : "),n=(0,r.A)(t,2),s=n[0],l=n[1];if("FEDERATED_USER_ID_ALREADY_LINKED"===s)throw F(e,"credential-already-in-use",a);if("EMAIL_EXISTS"===s)throw F(e,"email-already-in-use",a);if("USER_DISABLED"===s)throw F(e,"user-disabled",a);const c=i[s]||s.toLowerCase().replace(/[_\s]+/g,"-");if(l)throw g(e,c,l);p(e,c)}}catch(a){if(a instanceof o.g)throw a;p(e,"network-request-failed",{message:String(a)})}}async function L(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const o=await O(e,t,n,r,i);return"mfaPendingCredential"in o&&p(e,"multi-factor-auth-required",{_serverResponse:o}),o}async function D(e,t,n,r){const i="".concat(t).concat(n,"?").concat(r),o=e,a=o.config.emulator?C(e.config,i):"".concat(e.config.apiScheme,"://").concat(i);if(R.includes(n)&&(await o._persistenceManagerAvailable,"COOKIE"===o._getPersistenceType())){return o._getPersistence()._getFinalTarget(a).toString()}return a}function M(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class U{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(m(this.auth,"network-request-failed")),P.get())})}}function F(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=m(e,t,r);return i.customData._tokenResponse=n,i}function V(e){return void 0!==e&&void 0!==e.enterprise}class j{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 M(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 z(e,t){return O(e,"GET","/v2/recaptchaConfig",N(e,t))}async function B(e,t){return O(e,"POST","/v1/accounts:lookup",t)}function q(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(t){}}function H(e){return 1e3*Number(e)}function W(e){const t=e.split("."),n=(0,r.A)(t,3),i=n[0],a=n[1],s=n[2];if(void 0===i||void 0===a||void 0===s)return f("JWT malformed, contained fewer than 3 sections"),null;try{const e=(0,o.u)(a);return e?JSON.parse(e):(f("Failed to decode base64 JWT payload"),null)}catch(l){return f("Caught error parsing JWT payload as JSON",null===l||void 0===l?void 0:l.toString()),null}}function G(e){const t=W(e);return b(t,"internal-error"),b("undefined"!==typeof t.exp,"internal-error"),b("undefined"!==typeof t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}async function K(e,t){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])return t;try{return await t}catch(n){throw n instanceof o.g&&function(e){let t=e.code;return t==="auth/".concat("user-disabled")||t==="auth/".concat("user-token-expired")}(n)&&e.auth.currentUser===e&&await e.auth.signOut(),n}}class Q{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((null===e||void 0===e?void 0:e.code)==="auth/".concat("network-request-failed")&&this.schedule(!0))}this.schedule()}}class ${constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=q(this.lastLoginAt),this.creationTime=q(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function Y(e){var t;const n=e.auth,r=await e.getIdToken(),i=await K(e,B(n,{idToken:r}));b(null===i||void 0===i?void 0:i.users.length,n,"internal-error");const o=i.users[0];e._notifyReloadListener(o);const a=(null===(t=o.providerUserInfo)||void 0===t?void 0:t.length)?J(o.providerUserInfo):[],s=(l=e.providerData,c=a,[...l.filter(e=>!c.some(t=>t.providerId===e.providerId)),...c]);var l,c;const u=e.isAnonymous,d=!(e.email&&o.passwordHash)&&!(null===s||void 0===s?void 0:s.length),h=!!u&&d,f={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:s,metadata:new $(o.createdAt,o.lastLoginAt),isAnonymous:h};Object.assign(e,f)}async function X(e){const t=(0,o.Ku)(e);await Y(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function J(e){return e.map(e=>{var t=e.providerId,n=s(e,["providerId"]);
2return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})}class Z{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){b(e.idToken,"internal-error"),b("undefined"!==typeof e.idToken,"internal-error"),b("undefined"!==typeof e.refreshToken,"internal-error");const t="expiresIn"in e&&"undefined"!==typeof e.expiresIn?Number(e.expiresIn):G(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){b(0!==e.length,"internal-error");const t=G(e);this.updateTokensAndExpiration(e,null,t)}async getToken(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]||!this.accessToken||this.isExpired?(b(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 n=await async function(e,t){const n=await x(e,{},async()=>{const n=(0,o.Am)({grant_type:"refresh_token",refresh_token:t}).slice(1),r=e.config,i=r.tokenApiHost,a=r.apiKey,s=await D(e,i,"/v1/token","key=".concat(a)),l=await e._getAdditionalHeaders();l["Content-Type"]="application/x-www-form-urlencoded";const c={method:"POST",headers:l,body:n};return e.emulatorConfig&&(0,o.zJ)(e.emulatorConfig.host)&&(c.credentials="include"),I.fetch()(s,c)});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}(e,t),r=n.accessToken,i=n.refreshToken,a=n.expiresIn;this.updateTokensAndExpiration(r,i,Number(a))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){const n=t.refreshToken,r=t.accessToken,i=t.expirationTime,o=new Z;return n&&(b("string"===typeof n,"internal-error",{appName:e}),o.refreshToken=n),r&&(b("string"===typeof r,"internal-error",{appName:e}),o.accessToken=r),i&&(b("number"===typeof i,"internal-error",{appName:e}),o.expirationTime=i),o}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 Z,this.toJSON())}_performRefresh(){return w("not implemented")}}function ee(e,t){b("string"===typeof e||"undefined"===typeof e,"internal-error",{appName:t})}class te{constructor(e){var t=e.uid,n=e.auth,r=e.stsTokenManager,i=s(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Q(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 $(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){const t=await K(this,this.stsTokenManager.getToken(this.auth,e));return b(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,o.Ku)(e),r=await n.getIdToken(t),i=W(r);b(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const a="object"===typeof i.firebase?i.firebase:void 0,s=null===a||void 0===a?void 0:a.sign_in_provider;return{claims:i,token:r,authTime:q(H(i.auth_time)),issuedAtTime:q(H(i.iat)),expirationTime:q(H(i.exp)),signInProvider:s||null,signInSecondFactor:(null===a||void 0===a?void 0:a.sign_in_second_factor)||null}}(this,e)}reload(){return X(this)}_assign(e){this!==e&&(b(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.ph
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 te(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){b(!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 Y(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){if((0,i.xZ)(this.auth.app))return Promise.reject(y(this.auth));const e=await this.getIdToken();return await K(this,async function(e,t){return O(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,o,a,s,l,c;const u=null!==(n=t.displayName)&&void 0!==n?n:void 0,d=null!==(r=t.email)&&void 0!==r?r:void 0,h=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(o=t.photoURL)&&void 0!==o?o:void 0,p=null!==(a=t.tenantId)&&void 0!==a?a:void 0,m=null!==(s=t._redirectEventId)&&void 0!==s?s:void 0,g=null!==(l=t.createdAt)&&void 0!==l?l:void 0,y=null!==(c=t.lastLoginAt)&&void 0!==c?c:void 0,v=t.uid,w=t.emailVerified,_=t.isAnonymous,E=t.providerData,T=t.stsTokenManager;b(v&&T,e,"internal-error");const S=Z.fromJSON(this.name,T);b("string"===typeof v,e,"internal-error"),ee(u,e.name),ee(d,e.name),b("boolean"===typeof w,e,"internal-error"),b("boolean"===typeof _,e,"internal-error"),ee(h,e.name),ee(f,e.name),ee(p,e.name),ee(m,e.name),ee(g,e.name),ee(y,e.name);const k=new te({uid:v,auth:e,email:d,emailVerified:w,displayName:u,isAnonymous:_,photoURL:f,phoneNumber:h,tenantId:p,stsTokenManager:S,createdAt:g,lastLoginAt:y});return E&&Array.isArray(E)&&(k.providerData=E.map(e=>Object.assign({},e))),m&&(k._redirectEventId=m),k}static async _fromIdTokenResponse(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=new Z;r.updateFromServerResponse(t);const i=new te({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await Y(i),i}static async _fromGetAccountInfoResponse(e,t,n){const r=t.users[0];b(void 0!==r.localId,"internal-error");const i=void 0!==r.providerUserInfo?J(r.providerUserInfo):[],o=!(r.email&&r.passwordHash)&&!(null===i||void 0===i?void 0:i.length),a=new Z;a.updateFromIdToken(n);const s=new te({uid:r.localId,auth:e,stsTokenManager:a,isAnonymous:o}),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 $(r.createdAt,r.lastLoginAt),isAnonymous:!(r.email&&r.passwordHash)&&!(null===i||void 0===i?void 0:i.length)};return Object.assign(s,l),s}}const ne=new Map;function re(e){_(e instanceof Function,"Expected a class definition");let t=ne.get(e);return t?(_(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,ne.set(e,t),t)}class ie{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){}}ie.type="NONE";const oe=ie;function ae(e,t,n){return"firebase".concat(":",e,":").concat(t,":").concat(n)}class se{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const r=this.auth,i=r.config,o=r.name;this.fullUserKey=ae(this.userKey,i.apiKey,o),this.fullPersistenceKey=ae("persistence",i.apiKey,o),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 B(this.auth,{idToken:e}).catch(()=>{});return t?te._fromGetAccountInfoResponse(this.auth,t,e):null}return te._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(re(oe),e,n);const r=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e);let i=r[0]||re(oe);const o=ae(n,e.config.apiKey,e.name);let a=null;for(const c of t)try{const t=await c._get(o);if(t){let n;if("string"===typeof t){const r=await B(e,{idToken:t}).catch(()=>{});if(!r)break;n=await te._fromGetAccountInfoResponse(e,r,t)}else n=te._fromJSON(e,t);c!==i&&(a=n),i=c;break}}catch(l){}const s=r.filter(e=>e._shouldAllowMigration);return i._shouldAllowMigration&&s.length?(i=s[0],a&&await i._set(o,a.toJSON()),await Promise.all(t.map(async e=>{if(e!==i)try{await e._remove(o)}catch(l){}})),new se(i,e,n)):new se(i,e,n)}}function le(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(he(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(ce(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(pe(t))return"Blackberry";if(me(t))return"Webos";if(ue(t))return"Safari";if((t.includes("chrome/")||de(t))&&!t.includes("edge/"))return"Chrome";if(fe(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 ce(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.ZQ)();return/firefox\//i.test(e)}function ue(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.ZQ)()).toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function de(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.ZQ)();return/crios\//i.test(e)}function he(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.ZQ)();return/iemobile/i.test(e)}function fe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.ZQ)();return/android/i.test(e)}function pe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.ZQ)();return/blackberry/i.test(e)}function me(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.ZQ)();return/webos/i.test(e)}function ge(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.ZQ)();return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function ye(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.ZQ)();return ge(e)||fe(e)||me(e)||pe(e)||/windows phone/i.test(e)||he(e)}function ve(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];switch(e){case"Browser":t=le((0,o.ZQ)());break;case"Worker":t="".concat(le((0,o.ZQ)()),"-").concat(e);break;default:t=e}const r=n.length?n.join(","):"FirebaseCore-web";return"".concat(t,"/","JsCore","/").concat(i.MF,"/").concat(r)}class be{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 we{constructor(e){var t,n,r,i;const o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!==(t=o.minPasswordLength)&&void 0!==t?t:6,o.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=o.maxPasswordLength),void 0!==o.containsLowercaseCharacter&&(this.customStrengthOptions.containsLowercaseLetter=o.containsLowercaseCharacter),void 0!==o.containsUppercaseCharacter&&(this.customStrengthOptions.containsUppercaseLetter=o.containsUppercaseCharacter),void 0!==o.containsNumericCharacter&&(this.customStrengthOptions.containsNumericCharacter=o.containsNumericCharacter),void 0!==o.containsNonAlphanumericCharacter&&(this.customStrengthOptions.containsNonAlphanumericCharacter=o.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,o,a;const s={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(e,s),this.validatePasswordCharacterOptions(e,s),s.isValid&&
2(s.isValid=null===(t=s.meetsMinPasswordLength)||void 0===t||t),s.isValid&&(s.isValid=null===(n=s.meetsMaxPasswordLength)||void 0===n||n),s.isValid&&(s.isValid=null===(r=s.containsLowercaseLetter)||void 0===r||r),s.isValid&&(s.isValid=null===(i=s.containsUppercaseLetter)||void 0===i||i),s.isValid&&(s.isValid=null===(o=s.containsNumericCharacter)||void 0===o||o),s.isValid&&(s.isValid=null===(a=s.containsNonAlphanumericCharacter)||void 0===a||a),s}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 _e{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 Te(this),this.idTokenSubscription=new Te(this),this.beforeStateQueue=new be(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=d,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=re(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(o){}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 B(this,{idToken:e}),n=await te._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,i.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 r=n,o=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const n=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,i=null===r||void 0===r?void 0:r._redirectEventId,a=await this.tryRedirectSignIn(e);n&&n!==i||!(null===a||void 0===a?void 0:a.user)||(r=a.user,o=!0)}if(!r)return this.directlySetCurrentUser(null);
2if(!r._redirectEventId){if(o)try{await this.beforeStateQueue.runMiddleware(r)}catch(a){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(a))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return b(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}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 Y(e)}catch(t){if((null===t||void 0===t?void 0:t.code)!=="auth/".concat("network-request-failed"))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,i.xZ)(this.app))return Promise.reject(y(this));const t=e?(0,o.Ku)(e):null;return t&&b(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&&b(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,i.xZ)(this.app)?Promise.reject(y(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(e){return(0,i.xZ)(this.app)?Promise.reject(y(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(re(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 O(e,"GET","/v2/passwordPolicy",N(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}(this),t=new we(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 o.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 O(e,"POST","/v2/accounts:revokeToken",N(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&&re(e)||this._popupRedirectResolver;b(t,this,"argument-error"),this.redirectPersistenceManager=await se.create(this,[re(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"".concat(this.config.authDomain,":").concat(this.config.apiKey,":").concat(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 o=!1;const a=this._isInitialized?Promise.resolve():this._initializationPromise;if(b(a,this,"internal-error"),a.then(()=>{o||i(this.currentUser)}),"function"===typeof t){const i=e.addObserver(t,n,r);return()=>{o=!0,i()}}{const n=e.addObserver(t);return()=>{o=!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 b(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=ve(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,i.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<=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];h.warn("Auth (".concat(i.MF,"): ").concat(e),...n)}}("Error while retrieving App Check token: ".concat(t.error)),null===t||void 0===t?void 0:t.token}}function Ee(e){return(0,o.Ku)(e)}class Te{constructor(e){this.auth=e,this.observer=null,this.addObserver=(0,o.tD)(e=>this.observer=e)}get next(){return b(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 ke(e){return Se.loadJS(e)}function Ce(e){return"__".concat(e).concat(Math.floor(1e6*Math.random()))}class Ie{constructor(){this.enterprise=new Ae}ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}class Ae{ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}const Re="NO_RECAPTCHA";class Pe{constructor(e){this.type="recaptcha-enterprise",this.auth=Ee(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;V(i)?i.enterprise.ready(()=>{i.enterprise.execute(t,{action:e}).then(e=>{n(e)}).catch(()=>{n(Re)})}):r(Error("No reCAPTCHA enterprise script loaded."))}if(this.auth.settings.appVerificationDisabledForTesting){return(new Ie).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{z(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(r=>{if(void 0!==r.recaptchaKey){const n=new j(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&&V(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),ke(t).then(()=>{n(i,e,r)}).catch(e=>{r(e)})}}).catch(e=>{r(e)})})}}async function Ne(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 o=new Pe(e);let a;if(i)a=Re;else try{a=await o.verify(n)}catch(l){a=await o.verify(n,!0)}const s=Object.assign({},t);if("mfaSmsEnrollment"===n||"mfaSmsSignIn"===n){if("phoneEnrollmentInfo"in s){const e=s.phoneEnrollmentInfo.phoneNumber,t=s.phoneEnrollmentInfo.recaptchaToken;Object.assign(s,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:t,captchaResponse:a,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in s){const e=s.phoneSignInInfo.recaptchaToken;Object.assign(s,{phoneSignInInfo:{recaptchaToken:e,captchaResponse:a,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return s}return r?Object.assign(s,{captchaResp:a}):Object.assign(s,{captchaResponse:a}),Object.assign(s,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(s,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),s}async function Oe(e,t,n,r,i){var o,a;if("EMAIL_PASSWORD_PROVIDER"===i){if(null===(o=e._getRecaptchaConfig())||void 0===o?void 0:o.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const i=await Ne(e,t,n,"getOobCode"===n);return r(e,i)}return r(e,t).catch(async i=>{if(i.code==="auth/".concat("missing-recaptcha-token")){console.log("".concat(n," is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow."));const i=await Ne(e,t,n,"getOobCode"===n);return r(e,i)}return Promise.reject(i)})}if("PHONE_PROVIDER"===i){if(null===(a=e._getRecaptchaConfig())||void 0===a?void 0:a.isProviderEnabled("PHONE_PROVIDER")){const i=await Ne(e,t,n);return r(e,i).catch(async i=>{var o;if("AUDIT"===(null===(o=e._getRecaptchaConfig())||void 0===o?void 0:o.getProviderEnforcementState("PHONE_PROVIDER"))&&(i.code==="auth/".concat("missing-recaptcha-token")||i.code==="auth/".concat("invalid-app-credential"))){console.log("Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ".concat(n," flow."));const i=await Ne(e,t,n,!1,!0);return r(e,i)}return Promise.reject(i)})}{const i=await Ne(e,t,n,!1,!0);return r(e,i)}}return Promise.reject(i+" provider is not supported.")}async function xe(e){const t=Ee(e),n=await z(t,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}),r=new j(n);if(null==t.tenantId?t._agentRecaptchaConfig=r:t._tenantRecaptchaConfigs[t.tenantId]=r,r.isAnyProviderEnabled()){new Pe(t).verify()}}function Le(e,t,n){const i=Ee(e);b(/^https?:\/\//.test(t),i,"invalid-emulator-scheme");const a=!!(null===n||void 0===n?void 0:n.disableWarnings),s=De(t),l=function(e){const t=De(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const i=n[2].split("@").pop()||"",o=/^(\[[^\]]+\])(:|$)/.exec(i);if(o){const e=o[1];return{host:e,port:Me(i.substr(e.length+1))}}{const e=i.split(":"),t=(0,r.A)(e,2);return{host:t[0],port:Me(t[1])}}}(t),c=l.host,u=l.port,d=null===u?"":":".concat(u),h={url:"".concat(s,"//").concat(c).concat(d,"/")},f=Object.freeze({host:c,port:u,protocol:s.replace(":",""),options:Object.freeze({disableWarnings:a})});if(!i._canInitEmulator)return b(i.config.emulator&&i.emulatorConfig,i,"emulator-config-failed"),void b((0,o.bD)(h,i.config.emulator)&&(0,o.bD)(f,i.emulatorConfig),i,"emulator-config-failed");i.config.emulator=h,i.emulatorConfig=f,i.settings.appVerificationDisabledForTesting=!0,(0,o.zJ)(c)?((0,o.gE)("".concat(s,"//").concat(c).concat(d)),(0,o.P1)("Auth",!0)):a||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())}()}function De(e){const t=e.indexOf(":");
2return t<0?"":e.substr(0,t+1)}function Me(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}class Ue{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return w("not implemented")}_getIdTokenResponse(e){return w("not implemented")}_linkToIdToken(e,t){return w("not implemented")}_getReauthenticationResolver(e){return w("not implemented")}}async function Fe(e,t){return O(e,"POST","/v1/accounts:resetPassword",N(e,t))}async function Ve(e,t){return O(e,"POST","/v1/accounts:signUp",t)}async function je(e,t){return L(e,"POST","/v1/accounts:signInWithPassword",N(e,t))}async function ze(e,t){return O(e,"POST","/v1/accounts:sendOobCode",N(e,t))}async function Be(e,t){return ze(e,t)}class qe extends Ue{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 qe(e,t,"password")}static _fromEmailAndCode(e,t){return new qe(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 Oe(e,{returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signInWithPassword",je,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return async function(e,t){return L(e,"POST","/v1/accounts:signInWithEmailLink",N(e,t))}(e,{email:this._email,oobCode:this._password});default:p(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return Oe(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",Ve,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return async function(e,t){return L(e,"POST","/v1/accounts:signInWithEmailLink",N(e,t))}(e,{idToken:t,email:this._email,oobCode:this._password});default:p(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function He(e,t){return L(e,"POST","/v1/accounts:signInWithIdp",N(e,t))}class We extends Ue{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new We(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):p("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,n=t.providerId,r=t.signInMethod,i=s(t,["providerId","signInMethod"]);if(!n||!r)return null;const o=new We(n,r);return o.idToken=i.idToken||void 0,o.accessToken=i.accessToken||void 0,o.secret=i.secret,o.nonce=i.nonce,o.pendingToken=i.pendingToken||null,o}_getIdTokenResponse(e){return He(e,this.buildRequest())}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,He(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,He(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,o.Am)(t)}return e}}async function Ge(e,t){return O(e,"POST","/v1/accounts:sendVerificationCode",N(e,t))}const Ke={USER_NOT_FOUND:"user-not-found"};class Qe extends Ue{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new Qe({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new Qe({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return async function(e,t){return L(e,"POST","/v1/accounts:signInWithPhoneNumber",N(e,t))}(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return async function(e,t){const n=await L(e,"POST","/v1/accounts:signInWithPhoneNumber",N(e,t));if(n.temporaryProof)throw F(e,"account-exists-with-different-credential",n);return n}(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return async function(e,t){return L(e,"POST","/v1/accounts:signInWithPhoneNumber",N(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),Ke)}(e,this._makeVerificationRequest())}_makeVerificationRequest(){const e=this.params,t=e.temporaryProof,n=e.phoneNumber,r=e.verificationId,i=e.verificationCode;return t&&n?{temporaryProof:t,phoneNumber:n}:{sessionInfo:r,code:i}}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 t=e,n=t.verificationId,r=t.verificationCode,i=t.phoneNumber,o=t.temporaryProof;return r||n||i||o?new Qe({verificationId:n,verificationCode:r,phoneNumber:i,temporaryProof:o}):null}}class $e{constructor(e){var t,n,r,i,a,s;const l=(0,o.I9)((0,o.hp)(e)),c=null!==(t=l.apiKey)&&void 0!==t?t:null,u=null!==(n=l.oobCode)&&void 0!==n?n:null,d=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);b(c&&u&&d,"argument-error"),this.apiKey=c,this.operation=d,this.code=u,this.continueUrl=null!==(i=l.continueUrl)&&void 0!==i?i:null,this.languageCode=null!==(a=l.lang)&&void 0!==a?a:null,this.tenantId=null!==(s=l.tenantId)&&void 0!==s?s:null}static parseLink(e){const t=function(e){const t=(0,o.I9)((0,o.hp)(e)).link,n=t?(0,o.I9)((0,o.hp)(t)).deep_link_id:null,r=(0,o.I9)((0,o.hp)(e)).deep_link_id;return(r?(0,o.I9)((0,o.hp)(r)).link:null)||r||n||t||e}(e);try{return new $e(t)}catch(n){return null}}}class Ye{constructor(){this.providerId=Ye.PROVIDER_ID}static credential(e,t){return qe._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){const n=$e.parseLink(t);return b(n,"argument-error"),qe._fromEmailAndCode(e,n.code,n.tenantId)}}Ye.PROVIDER_ID="password",Ye.EMAIL_PASSWORD_SIGN_IN_METHOD="password",Ye.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class Xe{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 Je extends Xe{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class Ze extends Je{constructor(){super("facebook.com")}static credential(e){return We._fromParams({providerId:Ze.PROVIDER_ID,signInMethod:Ze.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Ze.credentialFromTaggedObject(e)}static credentialFromError(e){return Ze.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let t=e._tokenResponse;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return Ze.credential(t.oauthAccessToken)}catch(n){return null}}}Ze.FACEBOOK_SIGN_IN_METHOD="facebook.com",Ze.PROVIDER_ID="facebook.com";class et extends Je{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return We._fromParams({providerId:et.PROVIDER_ID,signInMethod:et.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return et.credentialFromTaggedObject(e)}static credentialFromError(e){return et.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let t=e._tokenResponse;if(!t)return null;const n=t.oauthIdToken,r=t.oauthAccessToken;if(!n&&!r)return null;try{return et.credential(n,r)}catch(i){return null}}}et.GOOGLE_SIGN_IN_METHOD="google.com",et.PROVIDER_ID="google.com";class tt extends Je{constructor(){super("github.com")}static credential(e){return We._fromParams({providerId:tt.PROVIDER_ID,signInMethod:tt.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return tt.credentialFromTaggedObject(e)}static credentialFromError(e){return tt.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let t=e._tokenResponse;if(!t||!("oauthAccessToken"in t))return null;if(!t.oauthAccessToken)return null;try{return tt.credential(t.oauthAccessToken)}catch(n){return null}}}tt.GITHUB_SIGN_IN_METHOD="github.com",tt.PROVIDER_ID="github.com";class nt extends Je{constructor(){super("twitter.com")}static credential(e,t){return We._fromParams({providerId:nt.PROVIDER_ID,signInMethod:nt.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return nt.credentialFromTaggedObject(e)}static credentialFromError(e){return nt.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let t=e._tokenResponse;if(!t)return null;const n=t.oauthAccessToken,r=t.oauthTokenSecret;if(!n||!r)return null;try{return nt.credential(n,r)}catch(i){return null}}}async function rt(e,t){return L(e,"POST","/v1/accounts:signUp",N(e,t))}nt.TWITTER_SIGN_IN_METHOD="twitter.com",nt.PROVIDER_ID="twitter.com";class it{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 te._fromIdTokenResponse(e,n,r),o=ot(n);return new it({user:i,providerId:o,_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);const r=ot(n);
2return new it({user:e,providerId:r,_tokenResponse:n,operationType:t})}}function ot(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}class at extends o.g{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,at.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 at(e,t,n,r)}}function st(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(n=>{if(n.code==="auth/".concat("multi-factor-auth-required"))throw at._fromErrorAndOperation(e,n,t,r);throw n})}function lt(e){return new Set(e.map(e=>e.providerId).filter(e=>!!e))}async function ct(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=await K(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return it._forOperation(e,"link",r)}async function ut(e,t,n){await Y(t);const r=!1===e?"provider-already-linked":"no-such-provider";b(lt(t.providerData).has(n)===e,t.auth,r)}async function dt(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.auth;if((0,i.xZ)(r.app))return Promise.reject(y(r));const o="reauthenticate";try{const i=await K(e,st(r,o,t,e),n);b(i.idToken,r,"internal-error");const a=W(i.idToken);b(a,r,"internal-error");const s=a.sub;return b(e.uid===s,r,"user-mismatch"),it._forOperation(e,o,i)}catch(a){throw(null===a||void 0===a?void 0:a.code)==="auth/".concat("user-not-found")&&p(r,"user-mismatch"),a}}async function ht(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if((0,i.xZ)(e.app))return Promise.reject(y(e));const r="signIn",o=await st(e,r,t),a=await it._fromIdTokenResponse(e,r,o);return n||await e._updateCurrentUser(a.user),a}async function ft(e,t){return ht(Ee(e),t)}async function pt(e,t){const n=(0,o.Ku)(e);return await ut(!1,n,t.providerId),ct(n,t)}async function mt(e,t){return dt((0,o.Ku)(e),t)}async function gt(e,t){if((0,i.xZ)(e.app))return Promise.reject(y(e));const n=Ee(e),r=await async function(e,t){return L(e,"POST","/v1/accounts:signInWithCustomToken",N(e,t))}(n,{token:t,returnSecureToken:!0}),o=await it._fromIdTokenResponse(n,"signIn",r);return await n._updateCurrentUser(o.user),o}class yt{constructor(e,t){this.factorId=e,this.uid=t.mfaEnrollmentId,this.enrollmentTime=new Date(t.enrolledAt).toUTCString(),this.displayName=t.displayName}static _fromServerResponse(e,t){return"phoneInfo"in t?vt._fromServerResponse(e,t):"totpInfo"in t?bt._fromServerResponse(e,t):p(e,"internal-error")}}class vt extends yt{constructor(e){super("phone",e),this.phoneNumber=e.phoneInfo}static _fromServerResponse(e,t){return new vt(t)}}class bt extends yt{constructor(e){super("totp",e)}static _fromServerResponse(e,t){return new bt(t)}}function wt(e,t,n){var r;b((null===(r=n.url)||void 0===r?void 0:r.length)>0,e,"invalid-continue-uri"),b("undefined"===typeof n.dynamicLinkDomain||n.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),b("undefined"===typeof n.linkDomain||n.linkDomain.length>0,e,"invalid-hosting-link-domain"),t.continueUrl=n.url,t.dynamicLinkDomain=n.dynamicLinkDomain,t.linkDomain=n.linkDomain,t.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(b(n.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=n.iOS.bundleId),n.android&&(b(n.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=n.android.installApp,t.androidMinimumVersionCode=n.android.minimumVersion,t.androidPackageName=n.android.packageName)}async function _t(e){const t=Ee(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function Et(e,t,n){const r=Ee(e),i={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};n&&wt(r,i,n),await Oe(r,i,"getOobCode",Be,"EMAIL_PASSWORD_PROVIDER")}async function Tt(e,t,n){await Fe((0,o.Ku)(e),{oobCode:t,newPassword:n}).catch(async t=>{throw t.code==="auth/".concat("password-does-not-meet-requirements")&&_t(e),t})}async function St(e,t){await async function(e,t){return O(e,"POST","/v1/accounts:update",N(e,t))}((0,o.Ku)(e),{oobCode:t})}async function kt(e,t){const n=await async function(e,t){const n=(0,o.Ku)(e),r=await Fe(n,{oobCode:t}),i=r.requestType;switch(b(i,n,"internal-error"),i){case"EMAIL_SIGNIN":break;case"VERIFY_AND_CHANGE_EMAIL":b(r.newEmail,n,"internal-error");break;case"REVERT_SECOND_FACTOR_ADDITION":b(r.mfaInfo,n,"internal-error");default:b(r.email,n,"internal-error")}let a=null;return r.mfaInfo&&(a=yt._fromServerResponse(Ee(n),r.mfaInfo)),{data:{email:("VERIFY_AND_CHANGE_EMAIL"===r.requestType?r.newEmail:r.email)||null,previousEmail:("VERIFY_AND_CHANGE_EMAIL"===r.requestType?r.email:r.newEmail)||null,multiFactorInfo:a},operation:i}}((0,o.Ku)(e),t);return n.data.email}async function Ct(e,t,n){if((0,i.xZ)(e.app))return Promise.reject(y(e));const r=Ee(e),o=Oe(r,{returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",rt,"EMAIL_PASSWORD_PROVIDER"),a=await o.catch(t=>{throw t.code==="auth/".concat("password-does-not-meet-requirements")&&_t(e),t}),s=await it._fromIdTokenResponse(r,"signIn",a);return await r._updateCurrentUser(s.user),s}function It(e,t,n){return(0,i.xZ)(e.app)?Promise.reject(y(e)):ft((0,o.Ku)(e),Ye.credential(t,n)).catch(async t=>{throw t.code==="auth/".concat("password-does-not-meet-requirements")&&_t(e),t})}function At(e,t){const n=$e.parseLink(t);return"EMAIL_SIGNIN"===(null===n||void 0===n?void 0:n.operation)}async function Rt(e,t,n){if((0,i.xZ)(e.app))return Promise.reject(y(e));const r=(0,o.Ku)(e),a=Ye.credentialWithLink(t,n||E());return b(a._tenantId===(r.tenantId||null),r,"tenant-id-mismatch"),ft(r,a)}async function Pt(e,t){const n=(0,o.Ku)(e),r={requestType:"VERIFY_EMAIL",idToken:await e.getIdToken()};t&&wt(n.auth,r,t);const i=await async function(e,t){return ze(e,t)}(n.auth,r);i.email!==e.email&&await e.reload()}async function Nt(e,t){let n=t.displayName,r=t.photoURL;if(void 0===n&&void 0===r)return;const i=(0,o.Ku)(e),a={idToken:await i.getIdToken(),displayName:n,photoUrl:r,returnSecureToken:!0},s=await K(i,async function(e,t){return O(e,"POST","/v1/accounts:update",t)}(i.auth,a));i.displayName=s.displayName||null,i.photoURL=s.photoUrl||null;const l=i.providerData.find(e=>"password"===e.providerId);
2l&&(l.displayName=i.displayName,l.photoURL=i.photoURL),await i._updateTokensIfNecessary(s)}function Ot(e,t){return xt((0,o.Ku)(e),null,t)}async function xt(e,t,n){const r=e.auth,i={idToken:await e.getIdToken(),returnSecureToken:!0};t&&(i.email=t),n&&(i.password=n);const o=await K(e,async function(e,t){return O(e,"POST","/v1/accounts:update",t)}(r,i));await e._updateTokensIfNecessary(o,!0)}function Lt(e,t){return(0,o.Ku)(e).setPersistence(t)}function Dt(e,t,n,r){return(0,o.Ku)(e).onAuthStateChanged(t,n,r)}function Mt(e){return(0,o.Ku)(e).signOut()}function Ut(e,t){return O(e,"POST","/v2/accounts/mfaEnrollment:start",N(e,t))}new WeakMap;const Ft="__sak";class Vt{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(Ft,"1"),this.storage.removeItem(Ft),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 jt extends Vt{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=ye(),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];if(!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)},i=this.storage.getItem(n);(0,o.lT)()&&10===document.documentMode&&i!==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]}}jt.type="LOCAL";const zt=jt;function Bt(e){var t,n;const r=e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),i=RegExp("".concat(r,"=([^;]+)"));return null!==(n=null===(t=document.cookie.match(i))||void 0===t?void 0:t[1])&&void 0!==n?n:null}function qt(e){const t="http:"===window.location.protocol;return"".concat(t?"__dev_":"__HOST-","FIREBASE_").concat(e.split(":")[3])}class Ht{constructor(){this.type="COOKIE",this.listenerUnsubscribes=new Map}_getFinalTarget(e){if(void 0===typeof window)return e;const t=new URL("".concat(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=qt(e);if(window.cookieStore){const e=await window.cookieStore.get(t);return null===e||void 0===e?void 0:e.value}return Bt(t)}async _remove(e){if(!this._isAvailable())return;if(!await this._get(e))return;const t=qt(e);document.cookie="".concat(t,"=;Max-Age=34560000;Partitioned;Secure;SameSite=Strict;Path=/;
2Priority=High"),await fetch("/__cookies__",{method:"DELETE"}).catch(()=>{})}_addListener(e,t){if(!this._isAvailable())return;const n=qt(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=Bt(n);const i=setInterval(()=>{const e=Bt(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))}}Ht.type="COOKIE";class Wt extends Vt{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}Wt.type="SESSION";const Gt=Wt;class Kt{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 Kt(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,n=t.data,r=n.eventId,i=n.eventType,o=n.data,a=this.handlersMap[i];if(!(null===a||void 0===a?void 0:a.size))return;t.ports[0].postMessage({status:"ack",eventId:r,eventType:i});const s=Array.from(a).map(async e=>e(t.origin,o)),l=await function(e){return Promise.all(e.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(t){return{fulfilled:!1,reason:t}}}))}(s);t.ports[0].postMessage({status:"done",eventId:r,eventType:i,response:l})}_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 Qt(){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}Kt.receivers=[];class $t{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,o;return new Promise((a,s)=>{const l=Qt("",20);r.port1.start();const c=setTimeout(()=>{s(new Error("unsupported_event"))},n);o={messageChannel:r,onMessage(e){const t=e;if(t.data.eventId===l)switch(t.data.status){case"ack":clearTimeout(c),i=setTimeout(()=>{s(new Error("timeout"))},3e3);break;case"done":clearTimeout(i),a(t.data.response);break;default:clearTimeout(c),clearTimeout(i),s(new Error("invalid_response"))}}},this.handlers.add(o),r.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[r.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}}function Yt(){return window}function Xt(){return"undefined"!==typeof Yt().WorkerGlobalScope&&"function"===typeof Yt().importScripts}const Jt="firebaseLocalStorageDb",Zt="firebaseLocalStorage",en="fbase_key";class tn{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 nn(e,t){return e.transaction([Zt],t?"readwrite":"readonly").objectStore(Zt)}function rn(){const e=indexedDB.open(Jt,1);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const t=e.result;try{t.createObjectStore(Zt,{keyPath:en})}catch(r){n(r)}}),e.addEventListener("success",async()=>{const n=e.result;n.objectStoreNames.contains(Zt)?t(n):(n.close(),await function(){const e=indexedDB.deleteDatabase(Jt);
2return new tn(e).toPromise()}(),t(await rn()))})})}async function on(e,t,n){const r=nn(e,!0).put({[en]:t,value:n});return new tn(r).toPromise()}function an(e,t){const n=nn(e,!0).delete(t);return new tn(n).toPromise()}class sn{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 rn()),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 Xt()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Kt._getInstance(Xt()?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 $t(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 rn();return await on(e,Ft,"1"),await an(e,Ft),!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=>on(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=nn(e,!1).get(t),r=await new tn(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=>an(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(e=>{const t=nn(e,!1).getAll();return new tn(t).toPromise()});if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],n=new Set;if(0!==e.length)for(const r of e){const e=r.fbase_key,i=r.value;n.add(e),JSON.stringify(this.localCache[e])!==JSON.stringify(i)&&(this.notifyListeners(e,i),t.push(e))}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()}}sn.type="LOCAL";const ln=sn;function cn(e,t){return O(e,"POST","/v2/accounts/mfaSignIn:start",N(e,t))}Ce("rcb"),new k(3e4,6e4);const un="recaptcha";async function dn(e,t,n){var r;if(!e._getRecaptchaConfig())try{await xe(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}
2:t,"session"in i){const t=i.session;if("phoneNumber"in i){b("enroll"===t.type,e,"internal-error");const r={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:i.phoneNumber,clientType:"CLIENT_TYPE_WEB"}},o=Oe(e,r,"mfaSmsEnrollment",async(e,t)=>{if(t.phoneEnrollmentInfo.captchaResponse===Re){b((null===n||void 0===n?void 0:n.type)===un,e,"argument-error");return Ut(e,await hn(e,t,n))}return Ut(e,t)},"PHONE_PROVIDER");return(await o.catch(e=>Promise.reject(e))).phoneSessionInfo.sessionInfo}{b("signin"===t.type,e,"internal-error");const o=(null===(r=i.multiFactorHint)||void 0===r?void 0:r.uid)||i.multiFactorUid;b(o,e,"missing-multi-factor-info");const a={mfaPendingCredential:t.credential,mfaEnrollmentId:o,phoneSignInInfo:{clientType:"CLIENT_TYPE_WEB"}},s=Oe(e,a,"mfaSmsSignIn",async(e,t)=>{if(t.phoneSignInInfo.captchaResponse===Re){b((null===n||void 0===n?void 0:n.type)===un,e,"argument-error");return cn(e,await hn(e,t,n))}return cn(e,t)},"PHONE_PROVIDER");return(await s.catch(e=>Promise.reject(e))).phoneResponseInfo.sessionInfo}}{const t={phoneNumber:i.phoneNumber,clientType:"CLIENT_TYPE_WEB"},r=Oe(e,t,"sendVerificationCode",async(e,t)=>{if(t.captchaResponse===Re){b((null===n||void 0===n?void 0:n.type)===un,e,"argument-error");return Ge(e,await hn(e,t,n))}return Ge(e,t)},"PHONE_PROVIDER");return(await r.catch(e=>Promise.reject(e))).sessionInfo}}finally{null===n||void 0===n||n._reset()}}async function hn(e,t,n){b(n.type===un,e,"argument-error");const r=await n.verify();b("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,o=i.phoneEnrollmentInfo.recaptchaVersion;return Object.assign(i,{phoneEnrollmentInfo:{phoneNumber:e,recaptchaToken:r,captchaResponse:t,clientType:n,recaptchaVersion:o}}),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 fn{constructor(e){this.providerId=fn.PROVIDER_ID,this.auth=Ee(e)}verifyPhoneNumber(e,t){return dn(this.auth,e,(0,o.Ku)(t))}static credential(e,t){return Qe._fromVerification(e,t)}static credentialFromResult(e){const t=e;return fn.credentialFromTaggedObject(t)}static credentialFromError(e){return fn.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject(e){let t=e._tokenResponse;if(!t)return null;const n=t.phoneNumber,r=t.temporaryProof;return n&&r?Qe._fromTokenResponse(n,r):null}}function pn(e,t){return t?re(t):(b(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}fn.PROVIDER_ID="phone",fn.PHONE_SIGN_IN_METHOD="phone";class mn extends Ue{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return He(e,this._buildIdpRequest())}_linkToIdToken(e,t){return He(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return He(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 gn(e){return ht(e.auth,new mn(e),e.bypassAuthState)}function yn(e){const t=e.auth,n=e.user;return b(n,t,"internal-error"),dt(n,new mn(e),e.bypassAuthState)}async function vn(e){const t=e.auth,n=e.user;return b(n,t,"internal-error"),ct(n,new mn(e),e.bypassAuthState)}class bn{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 t=e.urlResponse,n=e.sessionId,r=e.postBody,i=e.tenantId,o=e.error,a=e.type;if(o)return void this.reject(o);const s={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(a)(s))}catch(l){this.reject(l)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return gn;case"linkViaPopup":case"linkViaRedirect":return vn;case"reauthViaPopup":case"reauthViaRedirect":return yn;default:p(this.auth,"internal-error")}}resolve(e){_(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){_(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 wn=new k(2e3,1e4);
2class _n extends bn{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,_n.currentPopupAction&&_n.currentPopupAction.cancel(),_n.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return b(e,this.auth,"internal-error"),e}async onExecution(){_(1===this.filter.length,"Popup operations only handle one event");const e=Qt();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(m(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(m(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,_n.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(m(this.auth,"popup-closed-by-user"))},8e3):this.pollId=window.setTimeout(e,wn.get())};e()}}_n.currentPopupAction=null;const En=new Map;class Tn extends bn{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=En.get(this.auth._key());if(!e){try{const t=await async function(e,t){const n=Cn(t),r=kn(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)}En.set(this.auth._key(),e)}return this.bypassAuthState||En.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);if("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 Sn(e,t){En.set(e._key(),t)}function kn(e){return re(e._redirectPersistence)}function Cn(e){return ae("pendingRedirect",e.config.apiKey,e.name)}async function In(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if((0,i.xZ)(e.app))return Promise.reject(y(e));const r=Ee(e),o=pn(r,t),a=new Tn(r,o,n),s=await a.execute();return s&&!n&&(delete s.user._redirectEventId,await r._persistUserIfCurrent(s.user),await r._setRedirectUser(null,t)),s}class An{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 Pn(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!Pn(e)){const r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(m(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(Rn(e))}saveEventToCache(e){this.cachedEventUids.add(Rn(e)),this.lastProcessedEventTime=
2Date.now()}}function Rn(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function Pn(e){let t=e.type,n=e.error;return"unknown"===t&&(null===n||void 0===n?void 0:n.code)==="auth/".concat("no-auth-event")}const Nn=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,On=/^https?/;async function xn(e){if(e.config.emulator)return;const t=await async function(e){return O(e,"GET","/v1/projects",arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e),n=t.authorizedDomains;for(const i of n)try{if(Ln(i))return}catch(r){}p(e,"unauthorized-domain")}function Ln(e){const t=E(),n=new URL(t),r=n.protocol,i=n.hostname;if(e.startsWith("chrome-extension://")){const n=new URL(e);return""===n.hostname&&""===i?"chrome-extension:"===r&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===r&&n.hostname===i}if(!On.test(r))return!1;if(Nn.test(e))return i===e;const o=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+o+"|"+o+")$","i").test(i)}const Dn=new k(3e4,6e4);function Mn(){const e=Yt().___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 Un(e){return new Promise((t,n)=>{var r,i,o;function a(){Mn(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{Mn(),n(m(e,"network-request-failed"))},timeout:Dn.get()})}if(null===(i=null===(r=Yt().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null===(o=Yt().gapi)||void 0===o?void 0:o.load)){const t=Ce("iframefcb");return Yt()[t]=()=>{gapi.load?a():n(m(e,"network-request-failed"))},ke("".concat(Se.gapiScript,"?onload=").concat(t)).catch(e=>n(e))}a()}}).catch(e=>{throw Fn=null,e})}let Fn=null;const Vn=new k(5e3,15e3),jn={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},zn=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Bn(e){const t=e.config;b(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?C(t,"emulator/auth/iframe"):"https://".concat(e.config.authDomain,"/").concat("__/auth/iframe"),r={apiKey:t.apiKey,appName:e.name,v:i.MF},a=zn.get(e.config.apiHost);a&&(r.eid=a);const s=e._getFrameworks();return s.length&&(r.fw=s.join(",")),"".concat(n,"?").concat((0,o.Am)(r).slice(1))}async function qn(e){const t=await function(e){return Fn=Fn||Un(e),Fn}(e),n=Yt().gapi;return b(n,e,"internal-error"),t.open({where:document.body,url:Bn(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:jn,dontclear:!0},t=>new Promise(async(n,r)=>{await t.restyle({setHideOnLeave:!1});const i=m(e,"network-request-failed"),o=Yt().setTimeout(()=>{r(i)},Vn.get());function a(){Yt().clearTimeout(o),n(t)}t.ping(a).then(a,()=>{r(i)})}))}const Hn={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class Wn{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}function Gn(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:600;const s=Math.max((window.screen.availHeight-a)/2,0).toString(),l=Math.max((window.screen.availWidth-i)/2,0).toString();let c="";const u=Object.assign(Object.assign({},Hn),{width:i.toString(),height:a.toString(),top:s,left:l}),d=(0,o.ZQ)().toLowerCase();n&&(c=de(d)?"_blank":n),ce(d)&&(t=t||"http://localhost",u.scrollbars="yes");const h=Object.entries(u).reduce((e,t)=>{let n=(0,r.A)(t,2),i=n[0],o=n[1];return"".concat(e).concat(i,"=").concat(o,",")},"");if(function(){var e;return ge(arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.ZQ)())&&!!(null===(e=window.navigator)||void 0===e?void 0:e.standalone)}(d)&&"_self"!==c)return function(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");
2r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}(t||"",c),new Wn(null);const f=window.open(t||"",c,h);b(f,e,"popup-blocked");try{f.focus()}catch(p){}return new Wn(f)}const Kn="__/auth/handler",Qn="emulator/auth/handler",$n=encodeURIComponent("fac");async function Yn(e,t,n,a,s,l){b(e.config.authDomain,e,"auth-domain-config-required"),b(e.config.apiKey,e,"invalid-api-key");const c={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:a,v:i.MF,eventId:s};if(t instanceof Xe){t.setDefaultLanguage(e.languageCode),c.providerId=t.providerId||"",(0,o.Im)(t.getCustomParameters())||(c.customParameters=JSON.stringify(t.getCustomParameters()));for(const e of Object.entries(l||{})){var u=(0,r.A)(e,2);const t=u[0],n=u[1];c[t]=n}}if(t instanceof Je){const e=t.getScopes().filter(e=>""!==e);e.length>0&&(c.scopes=e.join(","))}e.tenantId&&(c.tid=e.tenantId);const d=c;for(const r of Object.keys(d))void 0===d[r]&&delete d[r];const h=await e._getAppCheckToken(),f=h?"#".concat($n,"=").concat(encodeURIComponent(h)):"";return"".concat(function(e){let t=e.config;if(!t.emulator)return"https://".concat(t.authDomain,"/").concat(Kn);return C(t,Qn)}(e),"?").concat((0,o.Am)(d).slice(1)).concat(f)}const Xn="webStorageSupport";const Jn=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Gt,this._completeRedirectFn=In,this._overrideRedirectResult=Sn}async _openPopup(e,t,n,r){var i;_(null===(i=this.eventManagers[e._key()])||void 0===i?void 0:i.manager,"_initialize() not called before _openPopup()");return Gn(e,await Yn(e,t,n,E(),r),Qt())}async _openRedirect(e,t,n,r){await this._originValidation(e);return function(e){Yt().location.href=e}(await Yn(e,t,n,E(),r)),new Promise(()=>{})}_initialize(e){const t=e._key();if(this.eventManagers[t]){const e=this.eventManagers[t],n=e.manager,r=e.promise;return n?Promise.resolve(n):(_(r,"If manager is not set, promise should be"),r)}const n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch(()=>{delete this.eventManagers[t]}),n}async initAndGetManager(e){const t=await qn(e),n=new An(e);return t.register("authEvent",t=>{b(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(Xn,{type:Xn},n=>{var r;const i=null===(r=null===n||void 0===n?void 0:n[0])||void 0===r?void 0:r[Xn];void 0!==i&&t(!!i),p(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=xn(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return ye()||ue()||ge()}};var Zn="@firebase/auth",er="1.10.8";class tr{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(){b(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}const nr=(0,o.XA)("authIdTokenMaxAge")||300;let rr=null;function ir(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.Sx)();const t=(0,i.j6)(e,"auth");if(t.isInitialized())return t.getImmediate();const n=function(e,t){const n=(0,i.j6)(e,"auth");if(n.isInitialized()){const e=n.getImmediate(),r=n.getOptions();if((0,o.bD)(r,null!==t&&void 0!==t?t:{}))return e;p(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:Jn,persistence:[ln,zt,Gt]}),r=(0,o.XA)("authTokenSyncURL");if(r&&"boolean"===typeof isSecureContext&&isSecureContext){const e=new URL(r,location.origin);if(location.origin===e.origin){const t=(a=e.toString(),async e=>{const t=e&&await e.getIdTokenResult(),n=t&&((new Date).getTime()-Date.parse(t.issuedAtTime))/1e3;if(n&&n>nr)return;const r=null===t||void 0===t?void 0:t.token;rr!==r&&(rr=r,await fetch(a,{method:r?"POST":"DELETE",headers:r?{Authorization:"Bearer ".concat(r)}:{}}))});!function(e,t,n){(0,o.Ku)(e).beforeAuthStateChanged(t,n)}(n,t,()=>t(n.currentUser)),function(e,t,n,r){(0,o.Ku)(e).onIdTokenChanged(t,n,r)}(n,e=>t(e))}}var a;const s=(0,o.Tj)("auth");return s&&Le(n,"http://".concat(s)),n}var or;Se={loadJS:e=>
2new Promise((t,n)=>{const r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=e=>{const t=m("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="},or="Browser",(0,i.om)(new l.uA("auth",(e,t)=>{let n=t.options;const r=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),o=e.getProvider("app-check-internal"),a=r.options,s=a.apiKey,l=a.authDomain;b(s&&!s.includes(":"),"invalid-api-key",{appName:r.name});const c={apiKey:s,authDomain:l,clientPlatform:or,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ve(or)},u=new _e(r,i,o,c);return function(e,t){const n=(null===t||void 0===t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(re);(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)}(u,n),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{e.getProvider("auth-internal").initialize()})),(0,i.om)(new l.uA("auth-internal",e=>(e=>new tr(e))(Ee(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),(0,i.KO)(Zn,er,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}}(or)),(0,i.KO)(Zn,er,"esm2017")},55472(e,t,n){n.d(t,{gS:()=>wc,hq:()=>Ac,rJ:()=>tl,vN:()=>Xs,kd:()=>bc,CL:()=>Cc,doc:()=>nl,getDoc:()=>fc,_e:()=>mc,GG:()=>gc,aU:()=>ll,AB:()=>Zl,aQ:()=>_c,My:()=>Xl,P:()=>Gl,O5:()=>Ic,BN:()=>yc,HM:()=>tc,mZ:()=>vc,_M:()=>Ql,wP:()=>Rc});var r,i,o=n(5544),a=n(80052),s=n(88812),l=n(50443),c=n(51529),u="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self?self:{},d={};(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 o=e.g[3],a=t+(o^n&(i^o))+r[0]+3614090360&4294967295;a=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=(n=(i=(o=(t=n+(a<<7&4294967295|a>>>25))+((a=o+(i^t&(n^i))+r[1]+3905402710&4294967295)<<12&4294967295|a>>>20))+((a=i+(n^o&(t^n))+r[2]+606105819&4294967295)<<17&4294967295|a>>>15))+((a=n+(t^i&(o^t))+r[3]+3250441966&4294967295)<<22&4294967295|a>>>10))+((a=t+(o^n&(i^o))+r[4]+4118548399&4294967295)<<7&4294967295|a>>>25))+((a=o+(i^t&(n^i))+r[5]+1200080426&4294967295)<<12&4294967295|a>>>20))+((a=i+(n^o&(t^n))+r[6]+2821735955&4294967295)<<17&4294967295|a>>>15))+((a=n+(t^i&(o^t))+r[7]+4249261313&4294967295)<<22&4294967295|a>>>10))+((a=t+(o^n&(i^o))+r[8]+1770035416&4294967295)<<7&4294967295|a>>>25))+((a=o+(i^t&(n^i))+r[9]+2336552879&4294967295)<<12&4294967295|a>>>20))+((a=i+(n^o&(t^n))+r[10]+4294925233&4294967295)<<17&4294967295|a>>>15))+((a=n+(t^i&(o^t))+r[11]+2304563134&4294967295)<<22&4294967295|a>>>10))+((a=t+(o^n&(i^o))+r[12]+1804603682&4294967295)<<7&4294967295|a>>>25))+((a=o+(i^t&(n^i))+r[13]+4254626195&4294967295)<<12&4294967295|a>>>20))+((a=i+(n^o&(t^n))+r[14]+2792965006&4294967295)<<17&4294967295|a>>>15))+((a=n+(t^i&(o^t))+r[15]+1236535329&4294967295)<<22&4294967295|a>>>10))+((a=t+(i^o&(n^i))+r[1]+4129170786&4294967295)<<5&4294967295|a>>>27))+((a=o+(n^i&(t^n))+r[6]+3225465664&4294967295)<<9&4294967295|a>>>23))+((a=i+(t^n&(o^t))+r[11]+643717713&4294967295)<<14&4294967295|a>>>18))+((a=n+(o^t&(i^o))+r[0]+3921069994&4294967295)<<20&4294967295|a>>>12))+((a=t+(i^o&(n^i))+r[5]+3593408605&4294967295)<<5&4294967295|a>>>27))+((a=o+(n^i&(t^n))+r[10]+38016083&4294967295)<<9&4294967295|a>>>23))+((a=i+(t^n&(o^t))+r[15]+3634488961&4294967295)<<14&4294967295|a>>>18))+((a=n+(o^t&(i^o))+r[4]+3889429448&4294967295)<<20&4294967295|a>>>12))+((a=t+(i^o&(n^i))+r[9]+568446438&4294967295)<<5&4294967295|a>>>27))+((a=o+(n^i&(t^n))+r[14]+3275163606&4294967295)<<9&4294967295|a>>>23))+((a=i+(t^n&(o^t))+r[3]+4107603335&4294967295)<<14&4294967295|a>>>18))+((a=n+(o^t&(i^o))+r[8]+1163531501&4294967295)<<20&4294967295|a>>>12))+((a=t+(i^o&(n^i))+r[13]+2850285829&4294967295)<<5&4294967295|a>>>27))+((a=o+(n^i&(t^n))+r[2]+4243563512&4294967295)<<9&4294967295|a>>>23))+((a=i+(t^n&(o^t))+r[7]+1735328473&4294967295)<<14&4294967295|a>>>18))+((a=n+(o^t&(i^o))+r[12]+2368359562&4294967295)<<20&4294967295|a>>>12))+((a=t+(n^i^o)+r[5]+4294588738&4294967295)<<4&4294967295|a>>>28))+((a=o+(t^n^i)+r[8]+2272392833&4294967295)<<11&4294967295|a>>>21))+((a=i+(o^t^n)+r[11]+1839030562&4294967295)<<16&4294967295|a>>>16))+((a=n+(i^o^t)+r[14]+4259657740&4294967295)<<23&4294967295|a>>>9))+((a=t+(n^i^o)+r[1]+2763975236&4294967295)<<4&4294967295|a>>>28))+((a=o+(t^n^i)+r[4]+1272893353&4294967295)<<11&4294967295|a>>>21))+((a=i+(o^t^n)+r[7]+4139469664&4294967295)<<16&4294967295|a>>>16))+((a=n+(i^o^t)+r[10]+3200236656&4294967295)<<23&4294967295|a>>>9))+((a=t+(n^i^o)+r[13]+681279174&4294967295)<<4&4294967295|a>>>28))+((a=o+(t^n^i)+r[0]+3936430074&4294967295)<<11&4294967295|a>>>21))+((a=i+(o^t^n)+r[3]+3572445317&4294967295)<<16&4294967295|a>>>16))+((a=n+(i^o^t)+r[6]+76029189&4294967295)<<23&4294967295|a>>>9))+((a=t+(n^i^o)+r[9]+3654602809&4294967295)<<4&4294967295|a>>>28))+((a=o+(t^n^i)+r[12]+3873151461&4294967295)<<11&4294967295|a>>>21))+((a=i+(o^t^n)+r[15]+530742520&4294967295)<<16&4294967295|a>>>16))+((a=n+(i^o^t)+r[2]+3299628645&4294967295)<<23&4294967295|a>>>9))+((a=t+(i^(n|~o))+r[0]+4096336452&4294967295)<<6&4294967295|a>>>26))+((a=o+(n^(t|~i))+r[7]+1126891415&4294967295)<<10&4294967295|a>>>22))+((a=i+(t^(o|~n))+r[14]+2878612391&4294967295)<<15&4294967295|a>>>17))+((a=n+(o^(i|~t))+r[5]+4237533241&4294967295)<<21&4294967295|a>>>11))+((a=t+(i^(n|~o))+r[12]+1700485571&4294967295)<<6&4294967295|a>>>26))+((a=o+(n^(t|~i))+r[3]+2399980690&4294967295)<<10&4294967295|a>>>22))+((a=i+(t^(o|~n))+r[10]+4293915773&4294967295)<<15&4294967295|a>>>17))+((a=n+(o^(i|~t))+r[1]+2240044497&4294967295)<<21&4294967295|a>>>11))+((a=t+(i^(n|~o))+r[8]+1873313359&4294967295)<<6&4294967295|a>>>26))+((a=o+(n^(t|~i))+r[15]+4264355552&4294967295)<<10&4294967295|a>>>22))+((a=i+(t^(o|~n))+r[6]+2734768916&4294967295)<<15&4294967295|a>>>17))+((a=n+(o^(i|~t))+r[13]+1309151649&4294967295)<<21&4294967295|a>>>
211))+((o=(t=n+((a=t+(i^(n|~o))+r[4]+4149444226&4294967295)<<6&4294967295|a>>>26))+((a=o+(n^(t|~i))+r[11]+3174756917&4294967295)<<10&4294967295|a>>>22))^((i=o+((a=i+(t^(o|~n))+r[2]+718787259&4294967295)<<15&4294967295|a>>>17))|~t))+r[9]+3951481745&4294967295,e.g[0]=e.g[0]+t&4294967295,e.g[1]=e.g[1]+(i+(a<<21&4294967295|a>>>11))&4294967295,e.g[2]=e.g[2]+i&4294967295,e.g[3]=e.g[3]+o&4294967295}function o(e,t){this.h=t;for(var n=[],r=!0,i=e.length-1;0<=i;i--){var o=0|e[i];r&&o==t||(n[i]=o,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),o=2;o<arguments.length;o++)i[o-2]=arguments[o];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,o=this.h,a=0;a<t;){if(0==o)for(;a<=r;)n(this,e,a),a+=this.blockSize;if("string"===typeof e){for(;a<t;)if(i[o++]=e.charCodeAt(a++),o==this.blockSize){n(this,i),o=0;break}}else for(;a<t;)if(i[o++]=e[a++],o==this.blockSize){n(this,i),o=0;break}}this.h=o,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 a={};function s(e){return-128<=e&&128>e?function(e,t){var n=a;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}(e,function(e){return new o([0|e],0>e?-1:0)}):new o([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 o(t,0)}var c=s(0),u=s(1),h=s(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 o(n,~e.h).add(u)}function g(e,t){return e.add(m(t))}function y(e,t){for(;(65535&e[t])!=e[t];)e[t+1]+=e[t]>>>16,e[t]&=65535,t++}function v(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 v(c,c);if(p(e))return t=b(m(e),t),new v(m(t.g),m(t.h));if(p(t))return t=b(e,m(t)),new v(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=u,r=t;0>=r.l(e);)n=w(n),r=w(r);var i=_(n,1),o=_(r,1);for(r=_(r,2),n=_(n,2);!f(r);){var a=o.add(r);0>=a.l(e)&&(i=i.add(n),o=a),r=_(r,1),n=_(n,1)}return t=g(e,i.j(t)),new v(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),a=(o=l(n)).j(t);p(a)||0<a.l(e);)a=(o=l(n-=r)).j(t);f(o)&&(o=u),i=i.add(o),e=g(e,a)}return new v(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 o(n,e.h)}function _(e,t){var n=t>>5;t%=32;for(var r=e.g.length-n,i=[],a=0;a<r;a++)i[a]=0<t?e.i(a+n)>>>t|e.i(a+n+1)<<32-t:e.i(a+n);return new o(i,e.h)}(e=o.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,o=((0<(n=g(n,i.j(t))).g.length?n.g[0]:n.h)>>>0).toString(e);if(f(n=i))return o+r;for(;6>o.length;)o="0"+o;r=o+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},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 a=r+(65535&this.i(i))+(65535&e.i(i)),s=(a>>>16)+(this.i(i)>>>16)+(e.i(i)>>>16);r=s>>>16,a&=65535,s&=65535,n[i]=s<<16|a}return new o(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(h)&&0>e.l(h))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 a=this.i(r)>>>16,s=65535&this.i(r),u=e.i(i)>>>16,d=65535&e.i(i);n[2*r+2*i]+=s*d,y(n,2*r+2*i),n[2*r+2*i+1]+=a*d,y(n,2*r+2*i+1),n[2*r+2*i+1]+=s*u,y(n,2*r+2*i+1),n[2*r+2*i+2]+=a*u,y(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 o(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 o(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 o(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 o(n,this.h^e.h)},t.prototype.digest=t.prototype.v,t.prototype.reset=t.prototype.s,t.prototype.update=t.prototype.u,i=d.Md5=t,o.prototype.add=o.prototype.add,o.prototype.multiply=o.prototype.j,o.prototype.modulo=o.prototype.A,o.prototype.compare=o.prototype.l,o.prototype.toNumber=o.prototype.m,o.prototype.toString=o.prototype.toString,o.prototype.getBits=o.prototype.i,o.fromNumber=l,o.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);
2if("-"==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,o=0;o<t.length;o+=8){var a=Math.min(8,t.length-o),s=parseInt(t.substring(o,o+a),n);8>a?(a=l(Math.pow(n,a)),i=i.j(a).add(l(s))):i=(i=i.j(r)).add(l(s))}return i},r=d.Integer=o}).apply("undefined"!==typeof u?u:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{});var h,f,p,m,g,y,v,b,w="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self?self:{},_={};(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 w&&w];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 o=0;o<e.length-1;o++){var a=e[o];if(!(a in i))break e;i=i[a]}(r=r(o=i[e=e[e.length-1]]))!=o&&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 a(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 s(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function l(e,t,n){return e.call.apply(e.bind,arguments)}function c(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 u(e,t,n){return(u=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?l:c).apply(null,arguments)}function d(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 E(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),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return t.prototype[n].apply(e,i)}}function T(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 S(e,t){for(let n=1;n<arguments.length;n++){const t=arguments[n];if(a(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 C(){var e=i.navigator;return e&&(e=e.userAgent)?e:""}function I(e){return I[" "](e),e}I[" "]=function(){};var A=-1!=C().indexOf("Gecko")&&!(-1!=C().toLowerCase().indexOf("webkit")&&-1==C().indexOf("Edge"))&&!(-1!=C().indexOf("Trident")||-1!=C().indexOf("MSIE"))&&-1==C().indexOf("Edge");function R(e,t,n){for(const r in e)t.call(n,e[r],r,e)}function P(e){const t={};for(const n in e)t[n]=e[n];return t}const N="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function O(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<N.length;t++)n=N[t],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function x(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 L(e){i.setTimeout(()=>{throw e},0)}function D(){var e=j;let t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var M=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 U,e=>e.reset());class U{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 F,V=!1,j=new class{constructor(){this.h=this.g=null}add(e,t){const n=M.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}},z=()=>{const e=i.Promise.resolve(void 0);F=()=>{e.then(B)}};var B=()=>{for(var e;e=D();){try{e.h.call(e.g)}catch(n){L(n)}var t=M;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}V=!1};function q(){this.s=this.s,this.C=this.C}function H(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}q.prototype.s=!1,q.prototype.ma=function(){this.s||(this.s=!0,this.N())},q.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()},H.prototype.h=function(){this.defaultPrevented=!0};var W=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 G(e,t){if(H.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(A){e:{try{I(t.nodeName);var i=!0;break e}catch(o){}i=!1}i||(t=null)}}
2else"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:K[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&G.aa.h.call(this)}}E(G,H);var K={2:"touch",3:"pen",4:"mouse"};G.prototype.h=function(){G.aa.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var Q="closure_listenable_"+(1e6*Math.random()|0),$=0;function Y(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=++$,this.da=this.fa=!1}function X(e){e.da=!0,e.listener=null,e.proxy=null,e.src=null,e.ha=null}function J(e){this.src=e,this.g={},this.h=0}function Z(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],o=Array.prototype.indexOf.call(i,t,void 0);(r=0<=o)&&Array.prototype.splice.call(i,o,1),r&&(X(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function ee(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i];if(!o.da&&o.listener==t&&o.capture==!!n&&o.ha==r)return i}return-1}J.prototype.add=function(e,t,n,r,i){var o=e.toString();(e=this.g[o])||(e=this.g[o]=[],this.h++);var a=ee(e,t,r,i);return-1<a?(t=e[a],n||(t.fa=!1)):((t=new Y(t,this.src,o,!!r,i)).fa=n,e.push(t)),t};var te="closure_lm_"+(1e6*Math.random()|0),ne={};function re(e,t,n,r,i){if(r&&r.once)return oe(e,t,n,r,i);if(Array.isArray(t)){for(var o=0;o<t.length;o++)re(e,t[o],n,r,i);return null}return n=he(n),e&&e[Q]?e.K(t,n,s(r)?!!r.capture:!!r,i):ie(e,t,n,!1,r,i)}function ie(e,t,n,r,i,o){if(!t)throw Error("Invalid event type");var a=s(i)?!!i.capture:!!i,l=ue(e);if(l||(e[te]=l=new J(e)),(n=l.add(t,n,r,a,o)).proxy)return n;if(r=function(){function e(n){return t.call(e.src,e.listener,n)}const t=ce;return e}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)W||(i=a),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(le(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function oe(e,t,n,r,i){if(Array.isArray(t)){for(var o=0;o<t.length;o++)oe(e,t[o],n,r,i);return null}return n=he(n),e&&e[Q]?e.L(t,n,s(r)?!!r.capture:!!r,i):ie(e,t,n,!0,r,i)}function ae(e,t,n,r,i){if(Array.isArray(t))for(var o=0;o<t.length;o++)ae(e,t[o],n,r,i);else r=s(r)?!!r.capture:!!r,n=he(n),e&&e[Q]?(e=e.i,(t=String(t).toString())in e.g&&(-1<(n=ee(o=e.g[t],n,r,i))&&(X(o[n]),Array.prototype.splice.call(o,n,1),0==o.length&&(delete e.g[t],e.h--)))):e&&(e=ue(e))&&(t=e.g[t.toString()],e=-1,t&&(e=ee(t,n,r,i)),(n=-1<e?t[e]:null)&&se(n))}function se(e){if("number"!==typeof e&&e&&!e.da){var t=e.src;if(t&&t[Q])Z(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(le(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=ue(t))?(Z(n,e),0==n.h&&(n.src=null,t[te]=null)):X(e)}}}function le(e){return e in ne?ne[e]:ne[e]="on"+e}function ce(e,t){if(e.da)e=!0;else{t=new G(t,this);var n=e.listener,r=e.ha||e.src;e.fa&&se(e),e=n.call(r,t)}return e}function ue(e){return(e=e[te])instanceof J?e:null}var de="__closure_events_fn_"+(1e9*Math.random()>>>0);function he(e){return"function"===typeof e?e:(e[de]||(e[de]=function(t){return e.handleEvent(t)}),e[de])}function fe(){q.call(this),this.i=new J(this),this.M=this,this.F=null}function pe(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 H(t,e);else if(t instanceof H)t.target=t.target||e;else{var i=t;O(t=new H(r,e),i)}if(i=!0,n)for(var o=n.length-1;0<=o;o--){var a=t.g=n[o];i=me(a,r,!0,t)&&i}if(i=me(a=t.g=e,r,!0,t)&&i,i=me(a,r,!1,t)&&i,n)for(o=0;o<n.length;o++)i=me(a=t.g=n[o],r,!1,t)&&i}function me(e,t,n,r){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var i=!0,o=0;o<t.length;++o){var a=t[o];if(a&&!a.da&&a.capture==n){var s=a.listener,l=a.ha||a.src;a.fa&&Z(e.i,a),i=!1!==s.call(l,r)&&i}}return i&&!r.defaultPrevented}function ge(e,t,n){if("function"===typeof e)n&&(e=u(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=u(e.handleEvent,e)}return 2147483647<Number(t)?-1:i.setTimeout(e,t||0)}function ye(e){e.g=ge(()=>{e.g=null,e.i&&(e.i=!1,ye(e))},e.l);const t=e.h;e.h=null,e.m.apply(null,t)}E(fe,q),fe.prototype[Q]=!0,fe.prototype.removeEventListener=function(e,t,n,r){ae(this,e,t,n,r)},fe.prototype.N=function(){if(fe.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++)X(n[r]);delete t.g[e],t.h--}}this.F=null},fe.prototype.K=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},fe.prototype.L=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};class ve extends q{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:ye(this)}N(){super.N(),this.g&&(i.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function be(e){q.call(this),this.h=e,this.g={}}E(be,q);var we=[];function _e(e){R(e.g,function(e,t){this.g.hasOwnProperty(t)&&se(e)},e),e.g={}}be.prototype.N=function(){be.aa.N.call(this),_e(this)},be.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Ee=i.JSON.stringify,Te=i.JSON.parse,Se=class{stringify(e){return i.JSON.stringify(e,void 0)}parse(e){return i.JSON.parse(e,void 0)}};function ke(){}function Ce(e){return e.h||(e.h=e.i())}function Ie(){}ke.prototype.h=null;var Ae={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function Re(){H.call(this,"d")}function Pe(){H.call(this,"c")}E(Re,H),E(Pe,H);var Ne={},Oe=null;function xe(){return Oe=Oe||new fe}
2function Le(e){H.call(this,Ne.La,e)}function De(e){const t=xe();pe(t,new Le(t))}function Me(e,t){H.call(this,Ne.STAT_EVENT,e),this.stat=t}function Ue(e){const t=xe();pe(t,new Me(t,e))}function Fe(e,t){H.call(this,Ne.Ma,e),this.size=t}function Ve(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 je(){this.g=!0}function ze(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 o=i[0];if("noop"!=o&&"stop"!=o&&"close"!=o)for(var a=1;a<i.length;a++)i[a]=""}}}return Ee(n)}catch(s){return t}}(e,n)+(r?" "+r:"")})}Ne.La="serverreachability",E(Le,H),Ne.STAT_EVENT="statevent",E(Me,H),Ne.Ma="timingevent",E(Fe,H),je.prototype.xa=function(){this.g=!1},je.prototype.info=function(){};var Be,qe={NO_ERROR:0,gb:1,tb:2,sb:3,nb:4,rb:5,ub:6,Ia:7,TIMEOUT:8,xb:9},He={lb:"complete",Hb:"success",Ja:"error",Ia:"abort",zb:"ready",Ab:"readystatechange",TIMEOUT:"timeout",vb:"incrementaldata",yb:"progress",ob:"downloadprogress",Pb:"uploadprogress"};function We(){}function Ge(e,t,n,r){this.j=e,this.i=t,this.l=n,this.R=r||1,this.U=new be(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 Ke}function Ke(){this.i=null,this.g="",this.h=!1}E(We,ke),We.prototype.g=function(){return new XMLHttpRequest},We.prototype.i=function(){return{}},Be=new We;var Qe={},$e={};function Ye(e,t,n){e.L=1,e.v=Et(yt(t)),e.m=n,e.P=!0,Xe(e,null)}function Xe(e,t){e.F=Date.now(),et(e),e.A=yt(e.v);var n=e.A,r=e.R;Array.isArray(r)||(r=[String(r)]),Mt(n.i,"t",r),e.C=0,n=e.j.J,e.h=new Ke,e.g=Sn(e.j,n?t:null,!e.m),0<e.O&&(e.M=new ve(u(e.Y,e,e.g),e.O)),t=e.U,n=e.g,r=e.ca;var i="readystatechange";Array.isArray(i)||(i&&(we[0]=i.toString()),i=we);for(var o=0;o<i.length;o++){var a=re(n,i[o],r||t.handleEvent,!1,t.h||t);if(!a)break;t.g[a.key]=a}t=e.H?P(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)),De(),function(e,t,n,r,i,o){e.info(function(){if(e.g)if(o)for(var a="",s=o.split("&"),l=0;l<s.length;l++){var c=s[l].split("=");if(1<c.length){var u=c[0];c=c[1];var d=u.split("_");a=2<=d.length&&"type"==d[1]?a+(u+"=")+c+"&":a+(u+"=redacted&")}}else a=null;else a=o;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+a})}(e.i,e.u,e.A,e.l,e.R,e.m)}function Je(e){return!!e.g&&("GET"==e.u&&2!=e.L&&e.j.Ca)}function Ze(e,t){var n=e.C,r=t.indexOf("\n",n);return-1==r?$e:(n=Number(t.substring(n,r)),isNaN(n)?Qe:(r+=1)+n>t.length?$e:(t=t.slice(r,r+n),e.C=r+n,t))}function et(e){e.S=Date.now()+e.I,tt(e,e.I)}function tt(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=Ve(u(e.ba,e),t)}function nt(e){e.B&&(i.clearTimeout(e.B),e.B=null)}function rt(e){0==e.j.G||e.J||bn(e.j,e)}function it(e){nt(e);var t=e.M;t&&"function"==typeof t.ma&&t.ma(),e.M=null,_e(e.U),e.g&&(t=e.g,e.g=null,t.abort(),t.ma())}function ot(e,t){try{var n=e.j;if(0!=n.G&&(n.g==e||ut(n.h,e)))if(!e.K&&ut(n.h,e)&&3==n.G){try{var r=n.Da.g.parse(t)}catch(c){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),ln(n)}mn(n),Ue(18)}}else n.za=i[1],0<n.za-n.T&&37500>i[2]&&n.F&&0==n.v&&!n.C&&(n.C=Ve(u(n.Za,n),6e3));if(1>=ct(n.h)&&n.ca){try{n.ca()}catch(c){}n.ca=void 0}}else _n(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 d=e.g;if(d){const e=d.g?d.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(e){var o=r.h;o.g||-1==e.indexOf("spdy")&&-1==e.indexOf("quic")&&-1==e.indexOf("h2")||(o.j=o.l,o.g=new Set,o.h&&(dt(o,o.h),o.h=null))}if(r.D){const e=d.g?d.g.getResponseHeader("X-HTTP-Session-Id"):null;e&&(r.ya=e,_t(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 a=e;if((r=n).qa=Tn(r,r.J?r.ia:null,r.W),a.K){ht(r.h,a);var s=a,l=r.L;l&&(s.I=l),s.B&&(nt(s),et(s)),r.g=a}else pn(r);0<n.i.length&&un(n)}else"stop"!=c[0]&&"close"!=c[0]||_n(n,7);else 3==n.G&&("stop"==c[0]||"close"==c[0]?"stop"==c[0]?_n(n,7):sn(n):"noop"!=c[0]&&n.l&&n.l.ta(c),n.v=0)}De()}catch(c){}}Ge.prototype.ca=function(e){e=e.target;const t=this.M;t&&3==nn(e)?t.j():this.Y(e)},Ge.prototype.Y=function(e){try{if(e==this.g)e:{const h=nn(this.g);var t=this.g.Ba();this.g.Z();if(!(3>h)&&(3!=h||this.g&&(this.h.h||this.g.oa()||rn(this.g)))){this.J||4!=h||7==t||De(),nt(this);var n=this.g.Z();this.X=n;t:if(Je(this)){var r=rn(this.g);e="";var o=r.length,a=4==nn(this.g);if(!this.h.i){if("undefined"===typeof TextDecoder){it(this),rt(this);var s="";break t}this.h.i=new i.TextDecoder}for(t=0;t<o;t++)this.h.h=!0,e+=this.h.i.decode(r[t],{stream:!(a&&t==o-1)});r.length=0,this.h.g+=e,this.C=0,s=this.h.g}else s=this.g.oa();if(this.o=200==n,function(e,t,n,r,i,o,a){e.info(function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+o+" "+a})}(this.i,this.u,this.A,this.l,this.R,h,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,Ue(12),it(this),rt(this);break e}ze(this.i,this.l,n,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,ot(this,n)}if(this.P){let e;for(n=!0;!this.J&&this.C<s.length;){if(e=Ze(this,s),e==$e){4==h&&(this.s=4,Ue(14),n=!1),ze(this.i,this.l,null,"[Incomplete Response]");break}if(e==Qe){this.s=4,Ue(15),ze(this.i,this.l,s,"[Invalid Chunk]"),n=!1;break}ze(this.i,this.l,e,null),ot(this,e)}if(Je(this)&&0!=this.C&&(this.h.g=this.h.g.slice(this.C),this.C=0),4!=h||0!=s.length||this.h.h||(this.s=1,Ue(16),n=!1),this.o=this.o&&n,n){if(0<s.length&&!this.W){this.W=!0;var d=this.j;d.g==this&&d.ba&&!d.M&&(d.j.info("Great, no buffering proxy detected. Bytes received: "+s.length),gn(d),d.M=!0,Ue(11))}}else ze(this.i,this.l,s,"[Invalid Chunked Response]"),it(this),rt(this)}else ze(this.i,this.l,s,null),ot(this,s);4==h&&it(this),this.o&&!this.J&&(4==h?bn(this.j,this):(this.o=!1,et(this)))}else(function(e){const t={};e=(e.g&&2<=nn(e)&&e.g.getAllResponseHeaders()||"").split("\r\n");for(let r=0;r<e.length;r++){if(k(e[r]))continue;var n=x(e[r]);const i=n[0];if("string"!==typeof(n=n[1]))continue;n=n.trim();const o=t[i]||[];t[i]=o,o.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<s.indexOf("Unknown SID")?(this.s=3,Ue(12)):(this.s=0,Ue(13)),it(this),rt(this)}}}catch(h){}},Ge.prototype.cancel=function(){this.J=!0,it(this)},Ge.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&&(De(),Ue(17)),it(this),this.s=2,rt(this)):tt(this,this.S-e)};var at=class{constructor(e,t){this.g=e,this.map=t}};function st(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 lt(e){return!!e.h||!!e.g&&e.g.size>=e.j}function ct(e){return e.h?1:e.g?e.g.size:0}function ut(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function dt(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 ft(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 T(e.i)}function pt(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(a(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(a(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(a(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)}st.prototype.cancel=function(){if(this.i=ft(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 mt=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function gt(e){if(this.g=this.o=this.j="",this.s=null,this.m=this.l="",this.h=!1,e instanceof gt){this.h=e.h,vt(this,e.j),this.o=e.o,this.g=e.g,bt(this,e.s),this.l=e.l;var t=e.i,n=new Ot;n.i=t.i,t.g&&(n.g=new Map(t.g),n.h=t.h),wt(this,n),this.m=e.m}else e&&(t=String(e).match(mt))?(this.h=!1,vt(this,t[1]||"",!0),this.o=Tt(t[2]||""),this.g=Tt(t[3]||"",!0),bt(this,t[4]),this.l=Tt(t[5]||"",!0),wt(this,t[6]||"",!0),this.m=Tt(t[7]||"")):(this.h=!1,this.i=new Ot(null,this.h))}function yt(e){return new gt(e)}function vt(e,t,n){e.j=n?Tt(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function bt(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 wt(e,t,n){t instanceof Ot?(e.i=t,function(e,t){t&&!e.j&&(xt(e),e.i=null,e.g.forEach(function(e,t){var n=t.toLowerCase();t!=n&&(Lt(this,t),Mt(this,n,e))},e)),e.j=t}(e.i,e.h)):(n||(t=St(t,Pt)),e.i=new Ot(t,e.h))}function _t(e,t,n){e.i.set(t,n)}function Et(e){return _t(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function Tt(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function St(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)}gt.prototype.toString=function(){var e=[],t=this.j;t&&e.push(St(t,It,!0),":");var n=this.g;return(n||"file"==t)&&(e.push("//"),(t=this.o)&&e.push(St(t,It,!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(St(n,"/"==n.charAt(0)?Rt:At,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.m)&&e.push("#",St(n,Nt)),e.join("")};var Ct,It=/[#\/\?@]/g,At=/[#\?:]/g,Rt=/[#\?]/g,Pt=/[#\?@]/g,Nt=/#/g;function Ot(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function xt(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 o=e[n].substring(0,r);i=e[n].substring(r+1)}else o=e[n];t(o,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.i,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}function Lt(e,t){xt(e),t=Ut(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function Dt(e,t){return xt(e),t=Ut(e,t),e.g.has(t)}function Mt(e,t,n){Lt(e,t),0<n.length&&(e.i=null,e.g.set(Ut(e,t),T(n)),e.h+=n.length)}function Ut(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}function Ft(e,t,n,r,i){try{i&&(i.onload=null,i.onerror=null,i.onabort=null,i.ontimeout=null),r(n)}catch(o){}}function Vt(){this.g=new Se}function jt(e,t,n){const r=n||"";try{pt(e,function(e,n){let i=e;s(e)&&(i=Ee(e)),t.push(r+n+"="+encodeURIComponent(i))})}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function zt(e){this.l=e.Ub||null,this.j=e.eb||!1}function Bt(e,t){fe.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 qt(e){e.j.read().then(e.Pa.bind(e)).catch(e.ga.bind(e))}function Ht(e){e.readyState=4,e.l=null,e.j=null,e.v=null,Wt(e)}function Wt(e){e.onreadystatechange&&e.onreadystatechange.call(e)}function Gt(e){let t="";return R(e,function(e,n){t+=n,t+=":",t+=e,t+="\r\n"}),t}function Kt(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=Gt(n),"string"===typeof e?null!=n&&encodeURIComponent(String(n)):_t(e,t,n))}function Qt(e){fe.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=Ot.prototype).add=function(e,t){xt(this),this.i=null,e=Ut(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){xt(this),this.g.forEach(function(n,r){n.forEac
2h(function(n){e.call(t,n,r,this)},this)},this)},e.na=function(){xt(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){xt(this);let t=[];if("string"===typeof e)Dt(this,e)&&(t=t.concat(this.g.get(Ut(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 xt(this),this.i=null,Dt(this,e=Ut(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 o=encodeURIComponent(String(r)),a=this.V(r);for(r=0;r<a.length;r++){var i=o;""!==a[r]&&(i+="="+encodeURIComponent(String(a[r]))),e.push(i)}}return this.i=e.join("&")},E(zt,ke),zt.prototype.g=function(){return new Bt(this.l,this.j)},zt.prototype.i=(Ct={},function(){return Ct}),E(Bt,fe),(e=Bt.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,Wt(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,Ht(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,Wt(this)),this.g&&(this.readyState=3,Wt(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;qt(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?Ht(this):Wt(this),3==this.readyState&&qt(this)}},e.Ra=function(e){this.g&&(this.response=this.responseText=e,Ht(this))},e.Qa=function(e){this.g&&(this.response=e,Ht(this))},e.ga=function(){this.g&&Ht(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(Bt.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}}),E(Qt,fe);var $t=/^https?$/i,Yt=["POST","PUT"];function Xt(e,t){e.h=!1,e.g&&(e.j=!0,e.g.abort(),e.j=!1),e.l=t,e.m=5,Jt(e),en(e)}function Jt(e){e.A||(e.A=!0,pe(e,"complete"),pe(e,"error"))}function Zt(e){if(e.h&&"undefined"!=typeof r&&(!e.v[1]||4!=nn(e)||2!=e.Z()))if(e.u&&4==nn(e))ge(e.Ea,0,e);else if(pe(e,"readystatechange"),4==nn(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 o;if(o=0===r){var a=String(e.D).match(mt)[1]||null;!a&&i.self&&i.self.location&&(a=i.self.location.protocol.slice(0,-1)),o=!$t.test(a?a.toLowerCase():"")}n=o}if(n)pe(e,"complete"),pe(e,"success");else{e.m=6;try{var s=2<nn(e)?e.g.statusText:""}catch(l){s=""}e.l=s+" ["+e.Z()+"]",Jt(e)}}finally{en(e)}}}function en(e,t){if(e.g){tn(e);const r=e.g,i=e.v[0]?()=>{}:null;e.g=null,e.v=null,t||pe(e,"ready");try{r.onreadystatechange=i}catch(n){}}}function tn(e){e.I&&(i.clearTimeout(e.I),e.I=null)}function nn(e){return e.g?e.g.readyState:0}function rn(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 on(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function an(e){this.Aa=0,this.i=[],this.j=new je,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=on("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=on("baseRetryDelayMs",5e3,e),this.cb=on("retryDelaySeedMs",1e4,e),this.Wa=on("forwardChannelMaxRetries",2,e),this.wa=on("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 st(e&&e.concurrentRequestLimit),this.Da=new Vt,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 sn(e){if(cn(e),3==e.G){var t=e.U++,n=yt(e.I);if(_t(n,"SID",e.K),_t(n,"RID",t),_t(n,"TYPE","terminate"),hn(e,n),(t=new Ge(e,e.j,t)).L=2,t.v=Et(yt(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=Sn(t.j,null),t.g.ea(t.v)),t.F=Date.now(),et(t)}En(e)}function ln(e){e.g&&(gn(e),e.g.cancel(),e.g=null)}function cn(e){ln(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 un(e){if(!lt(e.h)&&!e.s){e.s=!0;var t=e.Ga;F||z(),V||(F(),V=!0),j.add(t,e),e.B=0}}function dn(e,t){var n;n=t?t.l:e.U++;const r=yt(e.I);_t(r,"SID",e.K),_t(r,"RID",n),_t(r,"AID",e.T),hn(e,r),e.m&&e.o&&Kt(r,e.m,e.o),n=new Ge(e,e.j,n,e.B+1),null===e.m&&(n.H=e.o),t&&(e.i=t.D.concat(e.i)),t=fn(e,n,1e3),n.I=Math.round(.5*e.wa)+Math.round(.5*e.wa*Math.random()),dt(e.h,n),Ye(n,r,t)}function hn(e,t){e.H&&R(e.H,function(e,n){_t(t,n,e)}),e.l&&pt({},function(e,n){_t(t,n,e)})}function fn(e,t,n){n=Math.min(e.i.length,n);var r=e.l?u(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 a=!0;for(let s=0;s<n;s++){let n=i[s].g;const l=i[s].map;if(n-=t,0>n)t=Math.max(0,i[s].g-100),a=!1;else try{jt(l,e,"req"+n+"_")}catch(o){r&&r(l)}}if(a){r=e.join("&");break e}}}return e=e.i.splice(0,n),t.D=e,r}function pn(e){if(!e.g&&!e.u){e.Y=1;var t=e.Fa;F||z(),V||(F(),V=!0),j.add(t,e),e.v=0}}function mn(e){return!(e.g||e.u||3<=e.v)&&(e.Y++,e.u=Ve(u(e.Fa,e),wn(e,e.v)),e.v++,!0)}function gn(e){null!=e.A&&(i.clearTimeout(e.A),e.A=null)}function yn(e){e.g=new Ge(e,e.j,"rpc",e.Y),null===e.m&&(e.g.H=e.o),e.g.O=0;var t=yt(e.qa);_t(t,"RID","rpc"),_t(t,"SID",e.K),_t(t,"AID",e.T),_t(t,"CI",e.F?"0":"1"),!e.F&&e.ja&&_t(t,"TO",e.ja),_t(t,"TYPE","xmlhttp"),hn(e,t),e.m&&e.o&&Kt(t,e.m,e.o),e.L&&(e.g.I=e.L);var n=e.g;e=e.ia,n.L=1,n.v=Et(yt(t)),n.m=null,n.P=!0,Xe(n,e)}function vn(e){null!=e.C&&(i.clearTimeout(e.C),e.C=null)}function bn(e,t){var n=null;if(e.g==t){vn(e),gn(e),e.g=null;var r=2}else{if(!ut(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;pe(r=xe(),new Fe(r,n)),un(e)}else pn(e);else if(3==(i=t.s)||0==i&&0<t.X||!(1==r&&function(e,t){return!(ct(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=Ve(u(e.Ga,e,t),wn(e,e.B)),e.B++,!0))}(e,t)||2==r&&mn(e)))switch(n&&0<n.length&&(t=e.h,t.i=t.i.concat(n)),i){case 1:_n(e,5);break;case 4:_n(e,10);break;case 3:_n(e,6);break;default:_n(e,2)}}function wn(e,t){let n=e.Ta+Math.floor(Math.random()*e.cb);return e.isActive()||(n*=2),n*t}function _n(e,t){if(e.j.info("Error code "+t),2==t){var n=u(e.fb,e),r=e.Xa;const t=!r;r=new gt(r||"//www.google.com/images/cleardot.gif"),i.location&&"http"==i.location.protocol||vt(r,"https"),Et(r),t?function(e,t){const n=new je;if(i.Image){const r=new Image;r.onload=d(Ft,n,"TestLoadImage: loaded",!0,t,r),r.onerror=d(Ft,n,"TestLoadImage: error",!1,t,r),r.onabort=d(Ft,n,"TestLoadImage: abort",!1,t,r),r.ontimeout=d(Ft,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 je;const n=new AbortController,r=setTimeout(()=>{n.abort(),Ft(0,0,!1,t)},1e4);fetch(e,{signal:n.signal}).then(e=>{clearTimeout(r),e.ok?Ft(0,0,!0,t):Ft(0,0,!1,t)}).catch(()=>{clearTimeout(r),Ft(0,0,!1,t)})}(r.toString(),n)}else Ue(2);e.G=0,e.l&&e.l.sa(t),En(e),cn(e)}function En(e){if(e.G=0,e.ka=[],e.l){const t=ft(e.h);
20==t.length&&0==e.i.length||(S(e.ka,t),S(e.ka,e.i),e.h.i.length=0,T(e.i),e.i.length=0),e.l.ra()}}function Tn(e,t,n){var r=n instanceof gt?yt(n):new gt(n);if(""!=r.g)t&&(r.g=t+"."+r.g),bt(r,r.s);else{var o=i.location;r=o.protocol,t=t?t+"."+o.hostname:o.hostname,o=+o.port;var a=new gt(null);r&&vt(a,r),t&&(a.g=t),o&&bt(a,o),n&&(a.l=n),r=a}return n=e.D,t=e.ya,n&&t&&_t(r,n,t),_t(r,"VER",e.la),hn(e,r),r}function Sn(e,t,n){if(t&&!e.J)throw Error("Can't create secondary domain capable XhrIo object.");return(t=e.Ca&&!e.pa?new Qt(new zt({eb:n})):new Qt(e.pa)).Ha(e.J),t}function kn(){}function Cn(){}function In(e,t){fe.call(this),this.g=new an(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 Pn(this)}function An(e){Re.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 Rn(){Pe.call(this),this.status=1}function Pn(e){this.g=e}(e=Qt.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():Be.g(),this.v=this.o?Ce(this.o):Ce(Be),this.g.onreadystatechange=u(this.Ea,this);try{this.B=!0,this.g.open(t,String(e),!0),this.B=!1}catch(l){return void Xt(this,l)}if(e=n||"",n=new Map(this.headers),r)if(Object.getPrototypeOf(r)===Object.prototype)for(var a in r)n.set(a,r[a]);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()),a=i.FormData&&e instanceof i.FormData,!(0<=Array.prototype.indexOf.call(Yt,t,void 0))||r||a||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const i of n){var s=(0,o.A)(i,2);const e=s[0],t=s[1];this.g.setRequestHeader(e,t)}this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{tn(this),this.u=!0,this.g.send(e),this.u=!1}catch(l){Xt(this,l)}},e.abort=function(e){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=e||7,pe(this,"complete"),pe(this,"abort"),en(this))},e.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),en(this,!0)),Qt.aa.N.call(this)},e.Ea=function(){this.s||(this.B||this.u||this.j?Zt(this):this.bb())},e.bb=function(){Zt(this)},e.isActive=function(){return!!this.g},e.Z=function(){try{return 2<nn(this)?this.g.status:-1}catch(Ct){return-1}},e.oa=function(){try{return this.g?this.g.responseText:""}catch(Ct){return""}},e.Oa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),Te(t)}},e.Ba=function(){return this.m},e.Ka=function(){return"string"===typeof this.l?this.l:String(this.l)},(e=an.prototype).la=8,e.G=1,e.connect=function(e,t,n,r){Ue(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=Tn(this,null,this.W),un(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 Ge(this,this.j,e);let o=this.o;if(this.S&&(o?(o=P(o),O(o,this.S)):o=this.S),null!==this.m||this.O||(i.H=o,o=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=fn(this,i,t),_t(n=yt(this.I),"RID",e),_t(n,"CVER",22),this.D&&_t(n,"X-HTTP-Session-Id",this.D),hn(this,n),o&&(this.O?t="headers="+encodeURIComponent(String(Gt(o)))+"&"+t:this.m&&Kt(n,this.m,o)),dt(this.h,i),this.Ua&&_t(n,"TYPE","init"),this.P?(_t(n,"$req",t),_t(n,"SID","null"),i.T=!0,Ye(i,n,null)):Ye(i,n,t),this.G=2}}else 3==this.G&&(e?dn(this,e):0==this.i.length||lt(this.h)||dn(this))},e.Fa=function(){if(this.u=null,yn(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=Ve(u(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,Ue(10),ln(this),yn(this))},e.Za=function(){null!=this.C&&(this.C=null,ln(this),mn(this),Ue(19))},e.fb=function(e){e?(this.j.info("Successfully pinged google.com"),Ue(2)):(this.j.info("Failed to ping google.com"),Ue(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(){},Cn.prototype.g=function(e,t){return new In(e,t)},E(In,fe),In.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},In.prototype.close=function(){sn(this.g)},In.prototype.o=function(e){var t=this.g;if("string"===typeof e){var n={};n.__data__=e,e=n}else this.u&&((n={}).__data__=Ee(e),e=n);t.i.push(new at(t.Ya++,e)),3==t.G&&un(t)},In.prototype.N=function(){this.g.l=null,delete this.j,sn(this.g),delete this.g,In.aa.N.call(this)},E(An,Re),E(Rn,Pe),E(Pn,kn),Pn.prototype.ua=function(){pe(this.g,"a")},Pn.prototype.ta=function(e){pe(this.g,new An(e))},Pn.prototype.sa=function(e){pe(this.g,new Rn)},Pn.prototype.ra=function(){pe(this.g,"b")},Cn.prototype.createWebChannel=Cn.prototype.g,In.prototype.send=In.prototype.o,In.prototype.open=In.prototype.m,In.prototype.close=In.prototype.close,b=_.createWebChannelTransport=function(){return new Cn},v=_.getStatEventTarget=function(){return xe()},y=_.Event=Ne,g=_.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},qe.NO_ERROR=0,qe.TIMEOUT=8,qe.HTTP_ERROR=6,m=_.ErrorCode=qe,He.COMPLETE="complete",p=_.EventType=He,Ie.EventType=Ae,Ae.OPEN="a",Ae.CLOSE="b",Ae.ERROR="c",Ae.MESSAGE="d",fe.prototype.listen=fe.prototype.K,f=_.WebChannel=Ie,_.FetchXmlHttpFactory=zt,Qt.prototype.listenOnce=Qt.prototype.L,Qt.prototype.getLastError=Qt.prototype.Ka,Qt.prototype.getLastErrorCode=Qt.prototype.Ba,Qt.prototype.getStatus=Qt.prototype.Z,Qt.prototype.getResponseJson=Qt.prototype.Oa,Qt.prototype.getResponseText=Qt.prototype.oa,Qt.prototype.send=Qt.prototype.ea,Qt.prototype.setWithCredentials=Qt.prototype.Ha,h=_.XhrIo=Qt}).apply("undefined"!==typeof w?w:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{});const E="@firebase/firestore",T="4.8.0";class S{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}}S.UNAUTHENTICATED=new S(null),S.GOOGLE_CREDENTIALS=new S("google-credentials-uid"),S.FIRST_PARTY=new S("first-party-uid"),S.MOCK_USER=new S("mock-user");let k="11.10.0";const C=new l.Vy("@firebase/firestore");function I(){return C.logLevel}function A(e){if(C.logLevel<=l.$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(N);C.debug("Firestore (".concat(k,"): ").concat(e),...i)}}function R(e){if(C.logLevel<=l.$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(N);C.error("Firestore (".concat(k,"): ").concat(e),...i)}}function P(e){if(C.logLevel<=l.$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(N);C.warn("Firestore (".concat(k,"): ").concat(e),...i)}}function N(e){if("string"==typeof e)return e;try{return function(e){return JSON.stringify(e)}(e)}catch(t){return e}}function O(e,t,n){let r="Unexpected state";"string"==typeof t?r=t:n=t,x(e,r,n)}function x(e,t,n){let r="FIRESTORE (".concat(k,") INTERNAL ASSERTION FAILED: ").concat(t," (ID: ").concat(e.toString(16),")");
2if(void 0!==n)try{r+=" CONTEXT: "+JSON.stringify(n)}catch(e){r+=" CONTEXT: "+n}throw R(r),new Error(r)}function L(e,t,n,r){let i="Unexpected state";"string"==typeof n?i=n:r=n,e||x(t,i,r)}function D(e,t){return e}const M={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",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class U extends c.g{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>"".concat(this.name,": [code=").concat(this.code,"]: ").concat(this.message)}}class F{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}class V{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization","Bearer ".concat(e))}}class j{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(S.UNAUTHENTICATED))}shutdown(){}}class z{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 B{constructor(e){this.t=e,this.currentUser=S.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){L(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 F;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new F,e.enqueueRetryable(()=>r(this.currentUser))};const o=()=>{const t=i;e.enqueueRetryable(async()=>{await t.promise,await r(this.currentUser)})},a=e=>{A("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=e,this.o&&(this.auth.addAuthTokenListener(this.o),o())};this.t.onInit(e=>a(e)),setTimeout(()=>{if(!this.auth){const e=this.t.getImmediate({optional:!0});e?a(e):(A("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new F)}},0),o()}getToken(){const e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(t=>this.i!==e?(A("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):t?(L("string"==typeof t.accessToken,31837,{l:t}),new V(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 L(null===e||"string"==typeof e,2055,{h:e}),new S(e)}}class q{constructor(e,t,n){this.P=e,this.T=t,this.I=n,this.type="FirstParty",this.user=S.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 H{constructor(e,t,n){this.P=e,this.T=t,this.I=n}getToken(){return Promise.resolve(new q(this.P,this.T,this.I))}start(e,t){e.enqueueRetryable(()=>t(S.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class W{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 G{constructor(e,t){this.V=t,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,(0,a.xZ)(e)&&e.settings.appCheckToken&&(this.p=e.settings.appCheckToken)}start(e,t){L(void 0===this.o,3512);const n=e=>{null!=e.error&&A("FirebaseAppCheckTokenProvider","Error getting App Check token; using placeholder token instead. Error: ".concat(e.error.message));const n=e.token!==this.m;return this.m=e.token,A("FirebaseAppCheckTokenProvider","Received ".concat(n?"new":"existing"," token.")),n?t(e.token):Promise.resolve()};this.o=t=>{e.enqueueRetryable(()=>n(t))};const r=e=>{A("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):A("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){if(this.p)return Promise.resolve(new W(this.p));const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(e=>e?(L("string"==typeof e.token,44558,{tokenResult:e}),this.m=e.token,new W(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 K(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 Q(){return new TextEncoder}class ${static newId(){const e=62*Math.floor(256/62);let t="";for(;t.length<20;){const n=K(40);for(let r=0;r<n.length;++r)t.length<20&&n[r]<e&&(t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(n[r]%62))}return t}}function Y(e,t){return e<t?-1:e>t?1:0}function X(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 Y(r,i);{const o=Q(),a=Z(o.encode(J(e,n)),o.encode(J(t,n)));return 0!==a?a:Y(r,i)}}n+=r>65535?2:1}return Y(e.length,t.length)}function J(e,t){return e.codePointAt(t)>65535?e.substring(t,t+2):e.substring(t,t+1)}function Z(e,t){for(let n=0;n<e.length&&n<t.length;++n)if(e[n]!==t[n])return Y(e[n],t[n]);return Y(e.length,t.length)}function ee(e,t,n){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}const te="__name__";class ne{constructor(e,t,n){void 0===t?t=0:t>e.length&&O(637,{offset:t,range:e.length}),void 0===n?n=e.length-t:n>e.length-t&&O(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===ne.comparator(this,e)}child(e){const t=this.segments.slice(this.offset,this.limit());return e instanceof ne?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=ne.compareSegments(e.get(r),t.get(r));if(0!==n)return n}return Y(e.length,t.length)}static compareSegments(e,t){const n=ne.isNumericId(e),r=ne.isNumericId(t);return n&&!r?-1:!n&&r?1:n&&r?ne.extractNumericId(e).compare(ne.extractNumericId(t)):X(e,t)}static isNumericId(e){return e.startsWith("__id")&&e.endsWith("__")}static extractNumericId(e){return r.fromString(e.substring(4,e.length-2))}}class re extends ne{construct(e,t,n){return new re(e,t,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){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 U(M.INVALID_ARGUMENT,"Invalid segment (".concat(i,"). Paths must not contain // in them."));e.push(...i.split("/").filter(e=>e.length>0))}return new re(e)}static emptyPath(){return new re([])}}const ie=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class oe extends ne{construct(e,t,n){return new oe(e,t,n)}static isValidIdentifier(e){return ie.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),oe.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&this.get(0)===te}static keyField(){return new oe([te])}static fromServerFormat(e){const t=[];let n="",r=0;const i=()=>{if(0===n.length)throw new U(M.INVALID_ARGUMENT,"Invalid field path (".concat(e,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"));t.push(n),n=""};let o=!1;for(;r<e.length;){const t=e[r];if("\\"===t){if(r+1===e.length)throw new U(M.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const t=e[r+1];if("\\"!==t&&"."!==t&&"`"!==t)throw new U(M.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);n+=t,r+=2}else"`"===t?(o=!o,r++):"."!==t||o?(n+=t,r++):(i(),r++)}if(i(),o)throw new U(M.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new oe(t)}static emptyPath(){return new oe([])}}class ae{constructor(e){this.path=e}static fromPath(e){return new ae(re.fromString(e))}static fromName(e){return new ae(re.fromString(e).popFirst(5))}static empty(){return new ae(re.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===re.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return re.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new ae(new re(e.slice()))}}function se(e,t,n){if(!n)throw new U(M.INVALID_ARGUMENT,"Function ".concat(e,"() cannot be called with an empty ").concat(t,"."))}function le(e){if(!ae.isDocumentKey(e))throw new U(M.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but ".concat(e," has ").concat(e.length,"."))}function ce(e){if(ae.isDocumentKey(e))throw new U(M.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but ".concat(e," has ").concat(e.length,"."))}function ue(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}function de(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e="".concat(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 ".concat(t," object"):"an object"}}return"function"==typeof e?"a function":O(12329,{type:typeof e})}function he(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new U(M.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=de(e);throw new U(M.INVALID_ARGUMENT,"Expected type '".concat(t.name,"', but it was: ").concat(n))}}return e}function fe(e,t){if(t<=0)throw new U(M.INVALID_ARGUMENT,"Function ".concat(e,"() requires a positive number, but it was: ").concat(t,"."))}function pe(e,t){const n={typeString:e};return t&&(n.value=t),n}function me(e,t){if(!ue(e))throw new U(M.INVALID_ARGUMENT,"JSON must be an object");let n;for(const r in t)if(t[r]){const i=t[r].typeString,o="value"in t[r]?{value:t[r].value}:void 0;if(!(r in e)){n="JSON missing required field: '".concat(r,"'");break}const a=e[r];if(i&&typeof a!==i){n="JSON field '".concat(r,"' must be a ").concat(i,".");break}if(void 0!==o&&a!==o.value){n="Expected '".concat(r,"' field to equal '").concat(o.value,"'");break}}if(n)throw new U(M.INVALID_ARGUMENT,n);return!0}const ge=-62135596800,ye=1e6;class ve{static now(){return ve.fromMillis(Date.now())}static fromDate(e){return ve.fromMillis(e.getTime())}static fromMillis(e){const t=Math.floor(e/1e3),n=Math.floor((e-1e3*t)*ye);return new ve(t,n)}constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new U(M.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new U(M.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<ge)throw new U(M.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new U(M.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/ye}_compareTo(e){return this.seconds===e.seconds?Y(this.nanoseconds,e.nanoseconds):Y(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{type:ve._jsonSchemaVersion,seconds:this.seconds,nanoseconds:this.nanoseconds}}static fromJSON(e){if(me(e,ve._jsonSchema))return new ve(e.seconds,e.nanoseconds)}valueOf(){const e=this.seconds-ge;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}
2}ve._jsonSchemaVersion="firestore/timestamp/1.0",ve._jsonSchema={type:pe("string",ve._jsonSchemaVersion),seconds:pe("number"),nanoseconds:pe("number")};class be{static fromTimestamp(e){return new be(e)}static min(){return new be(new ve(0,0))}static max(){return new be(new ve(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 we=-1;class _e{constructor(e,t,n,r){this.indexId=e,this.collectionGroup=t,this.fields=n,this.indexState=r}}_e.UNKNOWN_ID=-1;function Ee(e,t){const n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1,i=be.fromTimestamp(1e9===r?new ve(n+1,0):new ve(n,r));return new Se(i,ae.empty(),t)}function Te(e){return new Se(e.readTime,e.key,we)}class Se{constructor(e,t,n){this.readTime=e,this.documentKey=t,this.largestBatchId=n}static min(){return new Se(be.min(),ae.empty(),we)}static max(){return new Se(be.max(),ae.empty(),we)}}function ke(e,t){let n=e.readTime.compareTo(t.readTime);return 0!==n?n:(n=ae.comparator(e.documentKey,t.documentKey),0!==n?n:Y(e.largestBatchId,t.largestBatchId))}const Ce="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class Ie{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}async function Ae(e){if(e.code!==M.FAILED_PRECONDITION||e.message!==Ce)throw e;A("LocalStore","Unexpectedly lost primary lease")}class Re{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&&O(59440),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new Re((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 Re?t:Re.resolve(t)}catch(e){return Re.reject(e)}}wrapSuccess(e,t){return e?this.wrapUserFunction(()=>e(t)):Re.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction(()=>e(t)):Re.reject(t)}static resolve(e){return new Re((t,n)=>{t(e)})}static reject(e){return new Re((t,n)=>{n(e)})}static waitFor(e){return new Re((t,n)=>{let r=0,i=0,o=!1;e.forEach(e=>{++r,e.next(()=>{++i,o&&i===r&&t()},e=>n(e))}),o=!0,i===r&&t()})}static or(e){let t=Re.resolve(!1);for(const n of e)t=t.next(e=>e?Re.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 Re((n,r)=>{const i=e.length,o=new Array(i);let a=0;for(let s=0;s<i;s++){const l=s;t(e[l]).next(e=>{o[l]=e,++a,a===i&&n(o)},e=>r(e))}})}static doWhile(e,t){return new Re((n,r)=>{const i=()=>{!0===e()?t().next(()=>{i()},r):n()};i()})}}function Pe(e){const t=e.match(/Android ([\d.]+)/i),n=t?t[1].split(".").slice(0,2).join("."):"-1";return Number(n)}function Ne(e){return"IndexedDbTransactionError"===e.name}class Oe{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=e=>this._e(e),this.ae=e=>t.writeSequenceNumber(e))}_e(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.ae&&this.ae(e),e}}Oe.ue=-1;const xe=-1;function Le(e){return null==e}function De(e){return 0===e&&1/e==-1/0}function Me(e){return"number"==typeof e&&Number.isInteger(e)&&!De(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}const Ue="\x01";function Fe(e){let t="";for(let n=0;n<e.length;n++)t.length>0&&(t=je(t)),t=Ve(e.get(n),t);return je(t)}function Ve(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 Ue:n+="\x01\x11";break;default:n+=t}}return n}function je(e){return e+Ue+"\x01"}
vendor: 5,526 bytes, line 2
2const ze="remoteDocuments",Be="owner",qe="mutationQueues",He="mutations";const We="documentMutations",Ge="remoteDocumentsV14",Ke="remoteDocumentGlobal",Qe="targets",$e="targetDocuments",Ye="targetGlobal",Xe="collectionParents",Je="clientMetadata",Ze="bundles",et="namedQueries",tt="indexConfiguration",nt="indexState",rt="indexEntries",it="documentOverlays",ot="globals",at=[qe,He,We,ze,Qe,Be,Ye,$e,Je,Ke,Xe,Ze,et],st=[qe,He,We,Ge,Qe,Be,Ye,$e,Je,Ke,Xe,Ze,et,it],lt=st,ct=[...lt,tt,nt,rt];function ut(e){let t=0;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function dt(e,t){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function ht(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}class ft{constructor(e,t){this.comparator=e,this.root=t||mt.EMPTY}insert(e,t){return new ft(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,mt.BLACK,null,null))}remove(e){return new ft(this.comparator,this.root.remove(e,this.comparator).copy(null,null,mt.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("".concat(t,":").concat(n)),!1)),"{".concat(e.join(", "),"}")}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new pt(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new pt(this.root,e,this.comparator,!1)}getReverseIterator(){return new pt(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new pt(this.root,e,this.comparator,!0)}}class pt{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 mt{constructor(e,t,n,r,i){this.key=e,this.value=t,this.color=null!=n?n:mt.RED,this.left=null!=r?r:mt.EMPTY,this.right=null!=i?i:mt.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,n,r,i){return new mt(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 mt.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 mt.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,mt.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,mt.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 O(43730,{key:this.key,value:this.value});if(this.right.isRed())throw O(14113,{key:this.key,value:this.value});const e=this.left.check();if(e!==this.right.check())throw O(27949);return e+(this.isRed()?0:1)}}
2mt.EMPTY=null,mt.RED=!0,mt.BLACK=!1,mt.EMPTY=new class{constructor(){this.size=0}get key(){throw O(57766)}get value(){throw O(16141)}get color(){throw O(16727)}get left(){throw O(29726)}get right(){throw O(36894)}copy(e,t,n,r,i){return this}insert(e,t,n){return new mt(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 gt{constructor(e){this.comparator=e,this.data=new ft(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 yt(this.data.getIterator())}getIteratorFrom(e){return new yt(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 gt))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 gt(this.comparator);return t.data=e,t}}class yt{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class vt{constructor(e){this.fields=e,e.sort(oe.comparator)}static empty(){return new vt([])}unionWith(e){let t=new gt(oe.comparator);for(const n of this.fields)t=t.add(n);for(const n of e)t=t.add(n);return new vt(t.toArray())}covers(e){for(const t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return ee(this.fields,e.fields,(e,t)=>e.isEqual(t))}}class bt extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class wt{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 bt("Invalid base64 string: "+e):e}}(e);return new wt(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 wt(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 Y(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}wt.EMPTY_BYTE_STRING=new wt("");const _t=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Et(e){if(L(!!e,39018),"string"==typeof e){let t=0;const n=_t.exec(e);if(L(!!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:Tt(e.seconds),nanos:Tt(e.nanos)}}function Tt(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function St(e){return"string"==typeof e?wt.fromBase64String(e):wt.fromUint8Array(e)}const kt="server_timestamp",Ct="__type__",It="__previous_value__",At="__local_write_time__";function Rt(e){var t,n;return(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{})[Ct])||void 0===n?void 0:n.stringValue)===kt}function Pt(e){const t=e.mapValue.fields[It];return Rt(t)?Pt(t):t}function Nt(e){const t=Et(e.mapValue.fields[At].timestampValue);return new ve(t.seconds,t.nanos)}class Ot{constructor(e,t,n,r,i,o,a,s,l,c){this.databaseId=e,this.appId=t,this.persistenceKey=n,this.host=r,this.ssl=i,this.forceLongPolling=o,this.autoDetectLongPolling=a,this.longPollingOptions=s,this.useFetchStreams=l,this.isUsingEmulator=c}}const xt="(default)";class Lt{constructor(e,t){this.projectId=e,this.database=t||xt}static empty(){return new Lt("","")}get isDefaultDatabase(){return this.database===xt}isEqual(e){return e instanceof Lt&&e.projectId===this.projectId&&e.database===this.database}}const Dt="__type__",Mt="__max__",Ut={mapValue:{fields:{__type__:{stringValue:
2Mt}}}},Ft="__vector__",Vt="value";function jt(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?Rt(e)?4:rn(e)?9007199254740991:tn(e)?10:11:O(28295,{value:e})}function zt(e,t){if(e===t)return!0;const n=jt(e);if(n!==jt(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return Nt(e).isEqual(Nt(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=Et(e.timestampValue),r=Et(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 St(e.bytesValue).isEqual(St(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return Tt(e.geoPointValue.latitude)===Tt(t.geoPointValue.latitude)&&Tt(e.geoPointValue.longitude)===Tt(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return Tt(e.integerValue)===Tt(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){const n=Tt(e.doubleValue),r=Tt(t.doubleValue);return n===r?De(n)===De(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return ee(e.arrayValue.values||[],t.arrayValue.values||[],zt);case 10:case 11:return function(e,t){const n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(ut(n)!==ut(r))return!1;for(const i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!zt(n[i],r[i])))return!1;return!0}(e,t);default:return O(52216,{left:e})}}function Bt(e,t){return void 0!==(e.values||[]).find(e=>zt(e,t))}function qt(e,t){if(e===t)return 0;const n=jt(e),r=jt(t);if(n!==r)return Y(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Y(e.booleanValue,t.booleanValue);case 2:return function(e,t){const n=Tt(e.integerValue||e.doubleValue),r=Tt(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 Ht(e.timestampValue,t.timestampValue);case 4:return Ht(Nt(e),Nt(t));case 5:return X(e.stringValue,t.stringValue);case 6:return function(e,t){const n=St(e),r=St(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=Y(n[i],r[i]);if(0!==e)return e}return Y(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){const n=Y(Tt(e.latitude),Tt(t.latitude));return 0!==n?n:Y(Tt(e.longitude),Tt(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return Wt(e.arrayValue,t.arrayValue);case 10:return function(e,t){var n,r,i,o;const a=e.fields||{},s=t.fields||{},l=null===(n=a[Vt])||void 0===n?void 0:n.arrayValue,c=null===(r=s[Vt])||void 0===r?void 0:r.arrayValue,u=Y((null===(i=null==l?void 0:l.values)||void 0===i?void 0:i.length)||0,(null===(o=null==c?void 0:c.values)||void 0===o?void 0:o.length)||0);return 0!==u?u:Wt(l,c)}(e.mapValue,t.mapValue);case 11:return function(e,t){if(e===Ut.mapValue&&t===Ut.mapValue)return 0;if(e===Ut.mapValue)return 1;if(t===Ut.mapValue)return-1;const n=e.fields||{},r=Object.keys(n),i=t.fields||{},o=Object.keys(i);r.sort(),o.sort();for(let a=0;a<r.length&&a<o.length;++a){const e=X(r[a],o[a]);if(0!==e)return e;const t=qt(n[r[a]],i[o[a]]);if(0!==t)return t}return Y(r.length,o.length)}(e.mapValue,t.mapValue);default:throw O(23264,{le:n})}}function Ht(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return Y(e,t);const n=Et(e),r=Et(t),i=Y(n.seconds,r.seconds);return 0!==i?i:Y(n.nanos,r.nanos)}function Wt(e,t){const n=e.values||[],r=t.values||[];for(let i=0;i<n.length&&i<r.length;++i){const e=qt(n[i],r[i]);if(e)return e}return Y(n.length,r.length)}function Gt(e){return Kt(e)}function Kt(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=Et(e);return"time(".concat(t.seconds,",").concat(t.nanos,")")}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?function(e){return St(e).toBase64()}(e.bytesValue):"referenceValue"in e?function(e){return ae.fromName(e).toString()}(e.referenceValue):"geoPointValue"in e?function(e){return"geo(".concat(e.latitude,",").concat(e.longitude,")")}(e.geoPointValue):"arrayValue"in e?function(e){let t="[",n=!0;for(const r of e.values||[])n?n=!1:t+=",",t+=Kt(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+="".concat(i,":").concat(Kt(e.fields[i]));return n+"}"}(e.mapValue):O(61005,{value:e})}function Qt(e){switch(jt(e)){case 0:case 1:return 4;case 2:return 8;case 3:case 8:return 16;case 4:const t=Pt(e);return t?16+Qt(t):16;case 5:return 2*e.stringValue.length;case 6:return St(e.bytesValue).approximateByteSize();case 7:return e.referenceValue.length;case 9:return function(e){return(e.values||[]).reduce((e,t)=>
2e+Qt(t),0)}(e.arrayValue);case 10:case 11:return function(e){let t=0;return dt(e.fields,(e,n)=>{t+=e.length+Qt(n)}),t}(e.mapValue);default:throw O(13486,{value:e})}}function $t(e,t){return{referenceValue:"projects/".concat(e.projectId,"/databases/").concat(e.database,"/documents/").concat(t.path.canonicalString())}}function Yt(e){return!!e&&"integerValue"in e}function Xt(e){return!!e&&"arrayValue"in e}function Jt(e){return!!e&&"nullValue"in e}function Zt(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function en(e){return!!e&&"mapValue"in e}function tn(e){var t,n;return(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{})[Dt])||void 0===n?void 0:n.stringValue)===Ft}function nn(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 dt(e.mapValue.fields,(e,n)=>t.mapValue.fields[e]=nn(n)),t}if(e.arrayValue){const t={arrayValue:{values:[]}};for(let n=0;n<(e.arrayValue.values||[]).length;++n)t.arrayValue.values[n]=nn(e.arrayValue.values[n]);return t}return Object.assign({},e)}function rn(e){return(((e.mapValue||{}).fields||{}).__type__||{}).stringValue===Mt}class on{constructor(e){this.value=e}static empty(){return new on({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)],!en(t))return null;return t=(t.mapValue.fields||{})[e.lastSegment()],t||null}}set(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=nn(t)}setAll(e){let t=oe.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()]=nn(e):r.push(i.lastSegment())});const i=this.getFieldsMap(t);this.applyChanges(i,n,r)}delete(e){const t=this.field(e.popLast());en(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return zt(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)];en(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields}applyChanges(e,t,n){dt(t,(t,n)=>e[t]=n);for(const r of n)delete e[r]}clone(){return new on(nn(this.value))}}function an(e){const t=[];return dt(e.fields,(e,n)=>{const r=new oe([e]);if(en(n)){const e=an(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 vt(t)}class sn{constructor(e,t,n,r,i,o,a){this.key=e,this.documentType=t,this.version=n,this.readTime=r,this.createTime=i,this.data=o,this.documentState=a}static newInvalidDocument(e){return new sn(e,0,be.min(),be.min(),be.min(),on.empty(),0)}static newFoundDocument(e,t,n,r){return new sn(e,1,t,be.min(),n,r,0)}static newNoDocument(e,t){return new sn(e,2,t,be.min(),be.min(),on.empty(),0)}static newUnknownDocument(e,t){return new sn(e,3,t,be.min(),be.min(),on.empty(),2)}convertToFoundDocument(e,t){return!this.createTime.isEqual(be.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=on.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=on.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=be.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 sn&&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 sn(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return"Document(".concat(this.key,", ").concat(this.version,", ").concat(JSON.stringify(this.data.value),", {createTime: ").concat(this.createTime,"}), {documentType: ").concat(this.documentType,"}), {documentState: ").concat(this.documentState,"})")}}class ln{constructor(e,t){this.position=e,this.inclusive=t}}function cn(e,t,n){let r=0;for(let i=0;i<e.position.length;i++){const o=t[i],a=e.position[i];if(r=o.field.isKeyField()?ae.comparator(ae.fromName(a.referenceValue),n.key):qt(a,n.data.field(o.field)),"desc"===o.dir&&(r*=-1),0!==r)break}return r}function un(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(!zt(e.position[n],t.position[n]))return!1;return!0}class dn{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc";this.field=e,this.dir=t}}function hn(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}class fn{}class pn extends fn{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 En(e,t,n):"array-contains"===t?new Cn(e,n):"in"===t?new In(e,n):"not-in"===t?new An(e,n):"array-contains-any"===t?new Rn(e,n):new pn(e,t,n)}static createKeyFieldInFilter(e,t,n){return"in"===t?new Tn(e,n):new Sn(e,n)}matches(e){const t=e.data.field(this.field);return"!="===this.op?null!==t&&void 0===t.nullValue&&this.matchesComparison(qt(t,this.value)):null!==t&&jt(this.value)===jt(t)&&this.matchesComparison(qt(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 O(47266,{operator:this.op})}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class mn extends fn{constructor(e,t){super(),this.filters=e,this.op=t,this.he=null}static create(e,t){return new mn(e,t)}matches(e){return gn(this)?void 0===this.filters.find(t=>!t.matches(e)):void 0!==this.filters.find(t=>t.matches(e))}getFlattenedFilters(){return null!==this.he||(this.he=this.filters.reduce((e,t)=>
2e.concat(t.getFlattenedFilters()),[])),this.he}getFilters(){return Object.assign([],this.filters)}}function gn(e){return"and"===e.op}function yn(e){return vn(e)&&gn(e)}function vn(e){for(const t of e.filters)if(t instanceof mn)return!1;return!0}function bn(e){if(e instanceof pn)return e.field.canonicalString()+e.op.toString()+Gt(e.value);if(yn(e))return e.filters.map(e=>bn(e)).join(",");{const t=e.filters.map(e=>bn(e)).join(",");return"".concat(e.op,"(").concat(t,")")}}function wn(e,t){return e instanceof pn?function(e,t){return t instanceof pn&&e.op===t.op&&e.field.isEqual(t.field)&&zt(e.value,t.value)}(e,t):e instanceof mn?function(e,t){return t instanceof mn&&e.op===t.op&&e.filters.length===t.filters.length&&e.filters.reduce((e,n,r)=>e&&wn(n,t.filters[r]),!0)}(e,t):void O(19439)}function _n(e){return e instanceof pn?function(e){return"".concat(e.field.canonicalString()," ").concat(e.op," ").concat(Gt(e.value))}(e):e instanceof mn?function(e){return e.op.toString()+" {"+e.getFilters().map(_n).join(" ,")+"}"}(e):"Filter"}class En extends pn{constructor(e,t,n){super(e,t,n),this.key=ae.fromName(n.referenceValue)}matches(e){const t=ae.comparator(e.key,this.key);return this.matchesComparison(t)}}class Tn extends pn{constructor(e,t){super(e,"in",t),this.keys=kn("in",t)}matches(e){return this.keys.some(t=>t.isEqual(e.key))}}class Sn extends pn{constructor(e,t){super(e,"not-in",t),this.keys=kn("not-in",t)}matches(e){return!this.keys.some(t=>t.isEqual(e.key))}}function kn(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map(e=>ae.fromName(e.referenceValue))}class Cn extends pn{constructor(e,t){super(e,"array-contains",t)}matches(e){const t=e.data.field(this.field);return Xt(t)&&Bt(t.arrayValue,this.value)}}class In extends pn{constructor(e,t){super(e,"in",t)}matches(e){const t=e.data.field(this.field);return null!==t&&Bt(this.value.arrayValue,t)}}class An extends pn{constructor(e,t){super(e,"not-in",t)}matches(e){if(Bt(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const t=e.data.field(this.field);return null!==t&&void 0===t.nullValue&&!Bt(this.value.arrayValue,t)}}class Rn extends pn{constructor(e,t){super(e,"array-contains-any",t)}matches(e){const t=e.data.field(this.field);return!(!Xt(t)||!t.arrayValue.values)&&t.arrayValue.values.some(e=>Bt(this.value.arrayValue,e))}}class Pn{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,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=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=o,this.endAt=a,this.Pe=null}}function Nn(e){return new Pn(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 On(e){const t=D(e);if(null===t.Pe){let e=t.path.canonicalString();null!==t.collectionGroup&&(e+="|cg:"+t.collectionGroup),e+="|f:",e+=t.filters.map(e=>bn(e)).join(","),e+="|ob:",e+=t.orderBy.map(e=>function(e){return e.field.canonicalString()+e.dir}(e)).join(","),Le(t.limit)||(e+="|l:",e+=t.limit),t.startAt&&(e+="|lb:",e+=t.startAt.inclusive?"b:":"a:",e+=t.startAt.position.map(e=>Gt(e)).join(",")),t.endAt&&(e+="|ub:",e+=t.endAt.inclusive?"a:":"b:",e+=t.endAt.position.map(e=>Gt(e)).join(",")),t.Pe=e}return t.Pe}function xn(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(!hn(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(!wn(e.filters[n],t.filters[n]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!un(e.startAt,t.startAt)&&un(e.endAt,t.endAt)}function Ln(e){return ae.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}class Dn{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,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"F",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=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=o,this.startAt=a,this.endAt=s,this.Te=null,this.Ie=null,this.de=null,this.startAt,this.endAt}}function Mn(e,t,n,r,i,o,a,s){return new Dn(e,t,n,r,i,o,a,s)}function Un(e){return new Dn(e)}function Fn(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 Vn(e){return null!==e.collectionGroup}function jn(e){const t=D(e);if(null===t.Te){t.Te=[];const e=new Set;for(const i of t.explicitOrderBy)t.Te.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 gt(oe.comparator);
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.Te.push(new dn(r,n))}),e.has(oe.keyField().canonicalString())||t.Te.push(new dn(oe.keyField(),n))}return t.Te}function zn(e){const t=D(e);return t.Ie||(t.Ie=Bn(t,jn(e))),t.Ie}function Bn(e,t){if("F"===e.limitType)return Nn(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 dn(e.field,t)});const n=e.endAt?new ln(e.endAt.position,e.endAt.inclusive):null,r=e.startAt?new ln(e.startAt.position,e.startAt.inclusive):null;return Nn(e.path,e.collectionGroup,t,e.filters,e.limit,n,r)}}function qn(e,t){const n=e.filters.concat([t]);return new Dn(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}function Hn(e,t,n){return new Dn(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function Wn(e,t){return xn(zn(e),zn(t))&&e.limitType===t.limitType}function Gn(e){return"".concat(On(zn(e)),"|lt:").concat(e.limitType)}function Kn(e){return"Query(target=".concat(function(e){let t=e.path.canonicalString();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=", filters: [".concat(e.filters.map(e=>_n(e)).join(", "),"]")),Le(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=", orderBy: [".concat(e.orderBy.map(e=>function(e){return"".concat(e.field.canonicalString()," (").concat(e.dir,")")}(e)).join(", "),"]")),e.startAt&&(t+=", startAt: ",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map(e=>Gt(e)).join(",")),e.endAt&&(t+=", endAt: ",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map(e=>Gt(e)).join(",")),"Target(".concat(t,")")}(zn(e)),"; limitType=").concat(e.limitType,")")}function Qn(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):ae.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){for(const n of jn(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=cn(e,t,n);return e.inclusive?r<=0:r<0}(e.startAt,jn(e),t))&&!(e.endAt&&!function(e,t,n){const r=cn(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,jn(e),t))}(e,t)}function $n(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}function Yn(e){return(t,n)=>{let r=!1;for(const i of jn(e)){const e=Xn(i,t,n);if(0!==e)return e;r=r||i.field.isKeyField()}return 0}}function Xn(e,t,n){const r=e.field.isKeyField()?ae.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?qt(r,i):O(42886)}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return O(19790,{direction:e.dir})}}class Jn{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 i of n){var r=(0,o.A)(i,2);const t=r[0],n=r[1];if(this.equalsFn(t,e))return n}}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){dt(this.inner,(t,n)=>{for(const i of n){var r=(0,o.A)(i,2);const t=r[0],n=r[1];e(t,n)}})}isEmpty(){return ht(this.inner)}size(){return this.innerSize}}const Zn=new ft(ae.comparator);function er(){return Zn}const tr=new ft(ae.comparator);function nr(){let e=tr;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 rr(e){let t=tr;return e.forEach((e,n)=>t=t.insert(e,n.overlayedDocument)),t}function ir(){return ar()}function or(){return ar()}function ar(){return new Jn(e=>e.toString(),(e,t)=>e.isEqual(t))}const sr=new ft(ae.comparator),lr=new gt(ae.comparator);function cr(){let e=lr;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 ur=new gt(Y);function dr(){return ur}function hr(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:De(t)?"-0":t}}function fr(e){return{integerValue:""+e}}function pr(e,t){return Me(t)?fr(t):hr(e,t)}class mr{constructor(){this._=void 0}}function gr(e,t,n){return e instanceof br?function(e,t){const n={fields:{[Ct]:{stringValue:kt},[At]:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&Rt(t)&&(t=Pt(t)),t&&(n.fields[It]=t),{mapValue:n}}(n,t):e instanceof wr?_r(e,t):e instanceof Er?Tr(e,t):function(e,t){const n=vr(e,t),r=kr(n)+kr(e.Ee);return Yt(n)&&Yt(e.Ee)?fr(r):hr(e.serializer,r)}(e,t)}function yr(e,t,n){return e instanceof wr?_r(e,t):e instanceof Er?Tr(e,t):n}function vr(e,t){return e instanceof Sr?function(e){return Yt(e)||function(e){return!!e&&"doubleValue"in e}(e)}(t)?t:{integerValue:0}:null}class br extends mr{}class wr extends mr{constructor(e){super(),this.elements=e}}function _r(e,t){const n=Cr(t);for(const r of e.elements)n.some(e=>zt(e,r))||n.push(r);return{arrayValue:{values:n}}}class Er extends mr{constructor(e){super(),this.elements=e}}function Tr(e,t){let n=Cr(t);for(const r of e.elements)n=n.filter(e=>!zt(e,r));return{arrayValue:{values:n}}}
2class Sr extends mr{constructor(e,t){super(),this.serializer=e,this.Ee=t}}function kr(e){return Tt(e.integerValue||e.doubleValue)}function Cr(e){return Xt(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class Ir{constructor(e,t){this.field=e,this.transform=t}}class Ar{constructor(e,t){this.version=e,this.transformResults=t}}class Rr{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new Rr}static exists(e){return new Rr(void 0,e)}static updateTime(e){return new Rr(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 Pr(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}class Nr{}function Or(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new Br(e.key,Rr.none()):new Ur(e.key,e.data,Rr.none());{const n=e.data,r=on.empty();let i=new gt(oe.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 Fr(e.key,r,new vt(i.toArray()),Rr.none())}}function xr(e,t,n){e instanceof Ur?function(e,t,n){const r=e.value.clone(),i=jr(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(e,t,n):e instanceof Fr?function(e,t,n){if(!Pr(e.precondition,t))return void t.convertToUnknownDocument(n.version);const r=jr(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(Vr(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 Lr(e,t,n,r){return e instanceof Ur?function(e,t,n,r){if(!Pr(e.precondition,t))return n;const i=e.value.clone(),o=zr(e.fieldTransforms,r,t);return i.setAll(o),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof Fr?function(e,t,n,r){if(!Pr(e.precondition,t))return n;const i=zr(e.fieldTransforms,r,t),o=t.data;return o.setAll(Vr(e)),o.setAll(i),t.convertToFoundDocument(t.version,o).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 Pr(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}(e,t,n)}function Dr(e,t){let n=null;for(const r of e.fieldTransforms){const e=t.data.field(r.field),i=vr(r.transform,e||null);null!=i&&(null===n&&(n=on.empty()),n.set(r.field,i))}return n||null}function Mr(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)&&ee(e,t,(e,t)=>function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof wr&&t instanceof wr||e instanceof Er&&t instanceof Er?ee(e.elements,t.elements,zt):e instanceof Sr&&t instanceof Sr?zt(e.Ee,t.Ee):e instanceof br&&t instanceof br}(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 Ur extends Nr{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 Fr extends Nr{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 Vr(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 jr(e,t,n){const r=new Map;L(e.length===n.length,32656,{Ae:n.length,Re:e.length});for(let i=0;i<n.length;i++){const o=e[i],a=o.transform,s=t.data.field(o.field);r.set(o.field,yr(a,s,n[i]))}return r}function zr(e,t,n){const r=new Map;for(const i of e){const e=i.transform,o=n.data.field(i.field);r.set(i.field,gr(e,o,t))}return r}class Br extends Nr{constructor(e,t){super(),this.key=e,this.prec
2ondition=t,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class qr extends Nr{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=3,this.fieldTransforms=[]}getFieldMask(){return null}}class Hr{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)&&xr(t,e,n[r])}}applyToLocalView(e,t){for(const n of this.baseMutations)n.key.isEqual(e.key)&&(t=Lr(n,e,t,this.localWriteTime));for(const n of this.mutations)n.key.isEqual(e.key)&&(t=Lr(n,e,t,this.localWriteTime));return t}applyToLocalDocumentSet(e,t){const n=or();return this.mutations.forEach(r=>{const i=e.get(r.key),o=i.overlayedDocument;let a=this.applyToLocalView(o,i.mutatedFields);a=t.has(r.key)?null:a;const s=Or(o,a);null!==s&&n.set(r.key,s),o.isValidDocument()||o.convertToNoDocument(be.min())}),n}keys(){return this.mutations.reduce((e,t)=>e.add(t.key),cr())}isEqual(e){return this.batchId===e.batchId&&ee(this.mutations,e.mutations,(e,t)=>Mr(e,t))&&ee(this.baseMutations,e.baseMutations,(e,t)=>Mr(e,t))}}class Wr{constructor(e,t,n,r){this.batch=e,this.commitVersion=t,this.mutationResults=n,this.docVersions=r}static from(e,t,n){L(e.mutations.length===n.length,58842,{Ve:e.mutations.length,me:n.length});let r=sr;const i=e.mutations;for(let o=0;o<i.length;o++)r=r.insert(i[o].key,n[o].version);return new Wr(e,t,n,r)}}class Gr{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: ".concat(this.largestBatchId,",\n      mutation: ").concat(this.mutation.toString(),"\n    }")}}class Kr{constructor(e,t){this.count=e,this.unchangedNames=t}}var Qr,$r;function Yr(e){switch(e){case M.OK:return O(64938);case M.CANCELLED:case M.UNKNOWN:case M.DEADLINE_EXCEEDED:case M.RESOURCE_EXHAUSTED:case M.INTERNAL:case M.UNAVAILABLE:case M.UNAUTHENTICATED:return!1;case M.INVALID_ARGUMENT:case M.NOT_FOUND:case M.ALREADY_EXISTS:case M.PERMISSION_DENIED:case M.FAILED_PRECONDITION:case M.ABORTED:case M.OUT_OF_RANGE:case M.UNIMPLEMENTED:case M.DATA_LOSS:return!0;default:return O(15467,{code:e})}}function Xr(e){if(void 0===e)return R("GRPC error has no .code"),M.UNKNOWN;switch(e){case Qr.OK:return M.OK;case Qr.CANCELLED:return M.CANCELLED;case Qr.UNKNOWN:return M.UNKNOWN;case Qr.DEADLINE_EXCEEDED:return M.DEADLINE_EXCEEDED;case Qr.RESOURCE_EXHAUSTED:return M.RESOURCE_EXHAUSTED;case Qr.INTERNAL:return M.INTERNAL;case Qr.UNAVAILABLE:return M.UNAVAILABLE;case Qr.UNAUTHENTICATED:return M.UNAUTHENTICATED;case Qr.INVALID_ARGUMENT:return M.INVALID_ARGUMENT;case Qr.NOT_FOUND:return M.NOT_FOUND;case Qr.ALREADY_EXISTS:return M.ALREADY_EXISTS;case Qr.PERMISSION_DENIED:return M.PERMISSION_DENIED;case Qr.FAILED_PRECONDITION:return M.FAILED_PRECONDITION;case Qr.ABORTED:return M.ABORTED;case Qr.OUT_OF_RANGE:return M.OUT_OF_RANGE;case Qr.UNIMPLEMENTED:return M.UNIMPLEMENTED;case Qr.DATA_LOSS:return M.DATA_LOSS;default:return O(39323,{code:e})}}($r=Qr||(Qr={}))[$r.OK=0]="OK",$r[$r.CANCELLED=1]="CANCELLED",$r[$r.UNKNOWN=2]="UNKNOWN",$r[$r.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",$r[$r.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",$r[$r.NOT_FOUND=5]="NOT_FOUND",$r[$r.ALREADY_EXISTS=6]="ALREADY_EXISTS",$r[$r.PERMISSION_DENIED=7]="PERMISSION_DENIED",$r[$r.UNAUTHENTICATED=16]="UNAUTHENTICATED",$r[$r.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",$r[$r.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",$r[$r.ABORTED=10]="ABORTED",$r[$r.OUT_OF_RANGE=11]="OUT_OF_RANGE",$r[$r.UNIMPLEMENTED=12]="UNIMPLEMENTED",$r[$r.INTERNAL=13]="INTERNAL",$r[$r.UNAVAILABLE=14]="UNAVAILABLE",$r[$r.DATA_LOSS=15]="DATA_LOSS";let Jr=null;
2const Zr=new r([4294967295,4294967295],0);function ei(e){const t=Q().encode(e),n=new i;return n.update(t),new Uint8Array(n.digest())}function ti(e){const t=new DataView(e.buffer),n=t.getUint32(0,!0),i=t.getUint32(4,!0),o=t.getUint32(8,!0),a=t.getUint32(12,!0);return[new r([n,i],0),new r([o,a],0)]}class ni{constructor(e,t,n){if(this.bitmap=e,this.padding=t,this.hashCount=n,t<0||t>=8)throw new ri("Invalid padding: ".concat(t));if(n<0)throw new ri("Invalid hash count: ".concat(n));if(e.length>0&&0===this.hashCount)throw new ri("Invalid hash count: ".concat(n));if(0===e.length&&0!==t)throw new ri("Invalid padding when bitmap length is 0: ".concat(t));this.fe=8*e.length-t,this.ge=r.fromNumber(this.fe)}pe(e,t,n){let i=e.add(t.multiply(r.fromNumber(n)));return 1===i.compare(Zr)&&(i=new r([i.getBits(0),i.getBits(1)],0)),i.modulo(this.ge).toNumber()}ye(e){return!!(this.bitmap[Math.floor(e/8)]&1<<e%8)}mightContain(e){if(0===this.fe)return!1;const t=ti(ei(e)),n=(0,o.A)(t,2),r=n[0],i=n[1];for(let o=0;o<this.hashCount;o++){const e=this.pe(r,i,o);if(!this.ye(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)),o=new ni(i,r,t);return n.forEach(e=>o.insert(e)),o}insert(e){if(0===this.fe)return;const t=ti(ei(e)),n=(0,o.A)(t,2),r=n[0],i=n[1];for(let o=0;o<this.hashCount;o++){const e=this.pe(r,i,o);this.we(e)}}we(e){const t=Math.floor(e/8),n=e%8;this.bitmap[t]|=1<<n}}class ri extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}class ii{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,oi.createSynthesizedTargetChangeForCurrentChange(e,t,n)),new ii(be.min(),r,new ft(Y),er(),cr())}}class oi{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 oi(n,t,cr(),cr(),cr())}}class ai{constructor(e,t,n,r){this.Se=e,this.removedTargetIds=t,this.key=n,this.be=r}}class si{constructor(e,t){this.targetId=e,this.De=t}}class li{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wt.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 ci{constructor(){this.ve=0,this.Ce=hi(),this.Fe=wt.EMPTY_BYTE_STRING,this.Me=!1,this.xe=!0}get current(){return this.Me}get resumeToken(){return this.Fe}get Oe(){return 0!==this.ve}get Ne(){return this.xe}Be(e){e.approximateByteSize()>0&&(this.xe=!0,this.Fe=e)}Le(){let e=cr(),t=cr(),n=cr();return this.Ce.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:O(38017,{changeType:i})}}),new oi(this.Fe,this.Me,e,t,n)}ke(){this.xe=!1,this.Ce=hi()}qe(e,t){this.xe=!0,this.Ce=this.Ce.insert(e,t)}Qe(e){this.xe=!0,this.Ce=this.Ce.remove(e)}$e(){this.ve+=1}Ue(){this.ve-=1,L(this.ve>=0,3241,{ve:this.ve})}Ke(){this.xe=!0,this.Me=!0}}class ui{constructor(e){this.We=e,this.Ge=new Map,this.ze=er(),this.je=di(),this.Je=di(),this.He=new ft(Y)}Ye(e){for(const t of e.Se)e.be&&e.be.isFoundDocument()?this.Ze(t,e.be):this.Xe(t,e.key,e.be);for(const t of e.removedTargetIds)this.Xe(t,e.key,e.be)}et(e){this.forEachTarget(e,t=>{const n=this.tt(t);switch(e.state){case 0:this.nt(t)&&n.Be(e.resumeToken);break;case 1:n.Ue(),n.Oe||n.ke(),n.Be(e.resumeToken);break;case 2:n.Ue(),n.Oe||this.removeTarget(t);break;case 3:this.nt(t)&&(n.Ke(),n.Be(e.resumeToken));break;case 4:this.nt(t)&&(this.rt(t),n.Be(e.resumeToken));break;default:O(56790,{state:e.state})}})}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.Ge.forEach((e,n)=>{this.nt(n)&&t(n)})}it(e){const t=e.targetId,n=e.De.count,r=this.st(t);if(r){const i=r.target;if(Ln(i))if(0===n){const e=new ae(i.path);this.Xe(t,e,sn.newNoDocument(e,be.min()))}else L(1===n,20013,{expectedCount:n});else{const r=this.ot(t);if(r!==n){const n=this._t(e),i=n?this.ut(n,e,r):1;if(0!==i){this.rt(t);const e=2===i?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.He=this.He.insert(t,e)}null==Jr||Jr.ct(function(e,t,n,r,i){var o,a,s,l,c,u;const d={localCacheCount:e,existenceFilterCount:t.count,databaseId:n.database,projectId:n.projectId},h=t.unchangedNames;
2return h&&(d.bloomFilter={applied:0===i,hashCount:null!==(o=null==h?void 0:h.hashCount)&&void 0!==o?o:0,bitmapLength:null!==(l=null===(s=null===(a=null==h?void 0:h.bits)||void 0===a?void 0:a.bitmap)||void 0===s?void 0:s.length)&&void 0!==l?l:0,padding:null!==(u=null===(c=null==h?void 0:h.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}}),d}(r,e.De,this.We.lt(),n,i))}}}}_t(e){const t=e.De.unchangedNames;if(!t||!t.bits)return null;const n=t.bits,r=n.bitmap,i=void 0===r?"":r,o=n.padding,a=void 0===o?0:o,s=t.hashCount,l=void 0===s?0:s;let c,u;try{c=St(i).toUint8Array()}catch(e){if(e instanceof bt)return P("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{u=new ni(c,a,l)}catch(e){return P(e instanceof ri?"BloomFilter error: ":"Applying bloom filter failed: ",e),null}return 0===u.fe?null:u}ut(e,t,n){return t.De.count===n-this.ht(e,t.targetId)?0:2}ht(e,t){const n=this.We.getRemoteKeysForTarget(t);let r=0;return n.forEach(n=>{const i=this.We.lt(),o="projects/".concat(i.projectId,"/databases/").concat(i.database,"/documents/").concat(n.path.canonicalString());e.mightContain(o)||(this.Xe(t,n,null),r++)}),r}Pt(e){const t=new Map;this.Ge.forEach((n,r)=>{const i=this.st(r);if(i){if(n.current&&Ln(i.target)){const t=new ae(i.target.path);this.Tt(t).has(r)||this.It(r,t)||this.Xe(r,t,sn.newNoDocument(t,e))}n.Ne&&(t.set(r,n.Le()),n.ke())}});let n=cr();this.Je.forEach((e,t)=>{let r=!0;t.forEachWhile(e=>{const t=this.st(e);return!t||"TargetPurposeLimboResolution"===t.purpose||(r=!1,!1)}),r&&(n=n.add(e))}),this.ze.forEach((t,n)=>n.setReadTime(e));const r=new ii(e,t,this.He,this.ze,n);return this.ze=er(),this.je=di(),this.Je=di(),this.He=new ft(Y),r}Ze(e,t){if(!this.nt(e))return;const n=this.It(e,t.key)?2:0;this.tt(e).qe(t.key,n),this.ze=this.ze.insert(t.key,t),this.je=this.je.insert(t.key,this.Tt(t.key).add(e)),this.Je=this.Je.insert(t.key,this.dt(t.key).add(e))}Xe(e,t,n){if(!this.nt(e))return;const r=this.tt(e);this.It(e,t)?r.qe(t,1):r.Qe(t),this.Je=this.Je.insert(t,this.dt(t).delete(e)),this.Je=this.Je.insert(t,this.dt(t).add(e)),n&&(this.ze=this.ze.insert(t,n))}removeTarget(e){this.Ge.delete(e)}ot(e){const t=this.tt(e).Le();return this.We.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}$e(e){this.tt(e).$e()}tt(e){let t=this.Ge.get(e);return t||(t=new ci,this.Ge.set(e,t)),t}dt(e){let t=this.Je.get(e);return t||(t=new gt(Y),this.Je=this.Je.insert(e,t)),t}Tt(e){let t=this.je.get(e);return t||(t=new gt(Y),this.je=this.je.insert(e,t)),t}nt(e){const t=null!==this.st(e);return t||A("WatchChangeAggregator","Detected inactive target",e),t}st(e){const t=this.Ge.get(e);return t&&t.Oe?null:this.We.Et(e)}rt(e){this.Ge.set(e,new ci),this.We.getRemoteKeysForTarget(e).forEach(t=>{this.Xe(e,t,null)})}It(e,t){return this.We.getRemoteKeysForTarget(e).has(t)}}function di(){return new ft(ae.comparator)}function hi(){return new ft(ae.comparator)}const fi={asc:"ASCENDING",desc:"DESCENDING"},pi={"<":"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"},mi={and:"AND",or:"OR"};class gi{constructor(e,t){this.databaseId=e,this.useProto3Json=t}}function yi(e,t){return e.useProto3Json||Le(t)?t:{value:t}}function vi(e,t){return e.useProto3Json?"".concat(new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z",""),".").concat(("000000000"+t.nanoseconds).slice(-9),"Z"):{seconds:""+t.seconds,nanos:t.nanoseconds}}function bi(e,t){return e.useProto3Json?t.toBase64():t.toUint8Array()}function wi(e,t){return vi(e,t.toTimestamp())}function _i(e){return L(!!e,49232),be.fromTimestamp(function(e){const t=Et(e);return new ve(t.seconds,t.nanos)}(e))}function Ei(e,t){return Ti(e,t).canonicalString()}function Ti(e,t){const n=function(e){return new re(["projects",e.projectId,"databases",e.database])}(e).child("documents");return void 0===t?n:n.child(t)}function Si(e){const t=re.fromString(e);return L(Hi(t),10190,{key:t.toString()}),t}function ki(e,t){return Ei(e.databaseId,t.path)}function Ci(e,t){const n=Si(t);if(n.get(1)!==e.databaseId.projectId)throw new U(M.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 U(M.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new ae(Pi(n))}function Ii(e,t){return Ei(e.databaseId,t)}function Ai(e){const t=Si(e);return 4===t.length?re.emptyPath():Pi(t)}function Ri(e){return new re(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function Pi(e){return L(e.length>4&&"documents"===e.get(4),29091,{key:e.toString()}),e.popFirst(5)}function Ni(e,t,n){return{name:ki(e,t),fields:n.value.mapValue.fields}}function Oi(e,t){let n;if(t instanceof Ur)n={update:Ni(e,t.key,t.value)};else if(t instanceof Br)n={delete:ki(e,t.key)};else if(t instanceof Fr)n={update:Ni(e,t.key,t.data),updateMask:qi(t.fieldMask)};else{if(!(t instanceof qr))return O(16599,{Rt:t.type});n={verify:ki(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map(e=>function(e,t){const n=t.transform;if(n instanceof br)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof wr)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof Er)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof Sr)return{fieldPath:t.field.canonicalString(),increment:n.Ee};throw O(20930,{transform:t.transform})}(0,e))),t.precondition.isNone||(n.currentDocument=function(e,t){return void 0!==t.updateTime?{updateTime:wi(e,t.updateTime)}:void 0!==t.exists?{exists:t.exists}:O(27497)}(e,t.precondition)),n}function xi(e,t){return{documents:[Ii(e,t.path)]}}function Li(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=Ii(e,i);const o=function(e){if(0!==e.length)return Bi(mn.create(e,"and"))}(t.filters);o&&(n.structuredQuery.where=o);const a=function(e){if(0!==e.length)return e.map(e=>function(e){return{field:ji(e.field),direction:Ui(e.dir)}}(e))}(t.orderBy);a&&(n.structuredQuery.orderBy=a);const s=yi(e,t.limit);return null!==s&&(n.structuredQuery.limit=s),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)),{Vt:n,parent:i}}function Di(e){let t=Ai(e.parent);
2const n=e.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){L(1===r,65062);const e=n.from[0];e.allDescendants?i=e.collectionId:t=t.child(e.collectionId)}let o=[];n.where&&(o=function(e){const t=Mi(e);return t instanceof mn&&yn(t)?t.getFilters():[t]}(n.where));let a=[];n.orderBy&&(a=function(e){return e.map(e=>function(e){return new dn(zi(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e))}(n.orderBy));let s=null;n.limit&&(s=function(e){let t;return t="object"==typeof e?e.value:e,Le(t)?null:t}(n.limit));let l=null;n.startAt&&(l=function(e){const t=!!e.before,n=e.values||[];return new ln(n,t)}(n.startAt));let c=null;return n.endAt&&(c=function(e){const t=!e.before,n=e.values||[];return new ln(n,t)}(n.endAt)),Mn(t,i,a,o,s,"F",l,c)}function Mi(e){return void 0!==e.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":const t=zi(e.unaryFilter.field);return pn.create(t,"==",{doubleValue:NaN});case"IS_NULL":const n=zi(e.unaryFilter.field);return pn.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const r=zi(e.unaryFilter.field);return pn.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const i=zi(e.unaryFilter.field);return pn.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":return O(61313);default:return O(60726)}}(e):void 0!==e.fieldFilter?function(e){return pn.create(zi(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 O(58110);default:return O(50506)}}(e.fieldFilter.op),e.fieldFilter.value)}(e):void 0!==e.compositeFilter?function(e){return mn.create(e.compositeFilter.filters.map(e=>Mi(e)),function(e){switch(e){case"AND":return"and";case"OR":return"or";default:return O(1026)}}(e.compositeFilter.op))}(e):O(30097,{filter:e})}function Ui(e){return fi[e]}function Fi(e){return pi[e]}function Vi(e){return mi[e]}function ji(e){return{fieldPath:e.canonicalString()}}function zi(e){return oe.fromServerFormat(e.fieldPath)}function Bi(e){return e instanceof pn?function(e){if("=="===e.op){if(Zt(e.value))return{unaryFilter:{field:ji(e.field),op:"IS_NAN"}};if(Jt(e.value))return{unaryFilter:{field:ji(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(Zt(e.value))return{unaryFilter:{field:ji(e.field),op:"IS_NOT_NAN"}};if(Jt(e.value))return{unaryFilter:{field:ji(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:ji(e.field),op:Fi(e.op),value:e.value}}}(e):e instanceof mn?function(e){const t=e.getFilters().map(e=>Bi(e));return 1===t.length?t[0]:{compositeFilter:{op:Vi(e.op),filters:t}}}(e):O(54877,{filter:e})}function qi(e){const t=[];return e.fields.forEach(e=>t.push(e.canonicalString())),{fieldPaths:t}}function Hi(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}class Wi{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:be.min(),o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:be.min(),a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:wt.EMPTY_BYTE_STRING,s=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=o,this.resumeToken=a,this.expectedCount=s}withSequenceNumber(e){return new Wi(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,t){return new Wi(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new Wi(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new Wi(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}class Gi{constructor(e){this.gt=e}}function Ki(e){const t=Di({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?Hn(t,t.limit,"L"):t}class Qi{constructor(){}bt(e,t){this.Dt(e,t),t.vt()}Dt(e,t){if("nullValue"in e)this.Ct(t,5);else if("booleanValue"in e)this.Ct(t,10),t.Ft(e.booleanValue?1:0);else if("integerValue"in e)this.Ct(t,15),t.Ft(Tt(e.integerValue));else if("doubleValue"in e){const n=Tt(e.doubleValue);isNaN(n)?this.Ct(t,13):(this.Ct(t,15),De(n)?t.Ft(0):t.Ft(n))}else if("timestampValue"in e){let n=e.timestampValue;this.Ct(t,20),"string"==typeof n&&(n=Et(n)),t.Mt("".concat(n.seconds||"")),t.Ft(n.nanos||0)}else if("stringValue"in e)this.xt(e.stringValue,t),this.Ot(t);else if("bytesValue"in e)this.Ct(t,30),t.Nt(St(e.bytesValue)),this.Ot(t);else if("referenceValue"in e)this.Bt(e.referenceValue,t);else if("geoPointValue"in e){const n=e.geoPointValue;this.Ct(t,45),t.Ft(n.latitude||0),t.Ft(n.longitude||0)}else"mapValue"in e?rn(e)?this.Ct(t,Number.MAX_SAFE_INTEGER):tn(e)?this.Lt(e.mapValue,t):(this.kt(e.mapValue,t),this.Ot(t)):"arrayValue"in e?(this.qt(e.arrayValue,t),this.Ot(t)):O(19022,{Qt:e})}xt(e,t){this.Ct(t,25),this.$t(e,t)}$t(e,t){t.Mt(e)}kt(e,t){const n=e.fields||{};this.Ct(t,55);for(const r of Object.keys(n))this.xt(r,t),this.Dt(n[r],t)}Lt(e,t){var n,r;const i=e.fields||{};this.Ct(t,53);const o=Vt,a=(null===(r=null===(n=i[o].arrayValue)||void 0===n?void 0:n.values)||void 0===r?void 0:r.length)||0;this.Ct(t,15),t.Ft(Tt(a)),this.xt(o,t),this.Dt(i[o],t)}qt(e,t){const n=e.values||[];this.Ct(t,50);for(const r of n)this.Dt(r,t)}
2Bt(e,t){this.Ct(t,37),ae.fromName(e).path.forEach(e=>{this.Ct(t,60),this.$t(e,t)})}Ct(e,t){e.Ft(t)}Ot(e){e.Ft(2)}}Qi.Ut=new Qi;class $i{constructor(){this.Dn=new Yi}addToCollectionParentIndex(e,t){return this.Dn.add(t),Re.resolve()}getCollectionParents(e,t){return Re.resolve(this.Dn.getEntries(t))}addFieldIndex(e,t){return Re.resolve()}deleteFieldIndex(e,t){return Re.resolve()}deleteAllFieldIndexes(e){return Re.resolve()}createTargetIndexes(e,t){return Re.resolve()}getDocumentsMatchingTarget(e,t){return Re.resolve(null)}getIndexType(e,t){return Re.resolve(0)}getFieldIndexes(e,t){return Re.resolve([])}getNextCollectionGroupToUpdate(e){return Re.resolve(null)}getMinOffset(e,t){return Re.resolve(Se.min())}getMinOffsetFromCollectionGroup(e,t){return Re.resolve(Se.min())}updateCollectionGroup(e,t,n){return Re.resolve()}updateIndexEntries(e,t){return Re.resolve()}}class Yi{constructor(){this.index={}}add(e){const t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new gt(re.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 gt(re.comparator)).toArray()}}new Uint8Array(0);const Xi={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},Ji=41943040;class Zi{static withCacheSize(e){return new Zi(e,Zi.DEFAULT_COLLECTION_PERCENTILE,Zi.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor(e,t,n){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}}Zi.DEFAULT_COLLECTION_PERCENTILE=10,Zi.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Zi.DEFAULT=new Zi(Ji,Zi.DEFAULT_COLLECTION_PERCENTILE,Zi.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Zi.DISABLED=new Zi(-1,0,0);class eo{constructor(e){this._r=e}next(){return this._r+=2,this._r}static ar(){return new eo(0)}static ur(){return new eo(-1)}}const to="LruGarbageCollector",no=1048576;function ro(e,t){let n=(0,o.A)(e,2),r=n[0],i=n[1],a=(0,o.A)(t,2),s=a[0],l=a[1];const c=Y(r,s);return 0===c?Y(i,l):c}class io{constructor(e){this.Tr=e,this.buffer=new gt(ro),this.Ir=0}dr(){return++this.Ir}Er(e){const t=[e,this.dr()];if(this.buffer.size<this.Tr)this.buffer=this.buffer.add(t);else{const e=this.buffer.last();ro(t,e)<0&&(this.buffer=this.buffer.delete(e).add(t))}}get maxValue(){return this.buffer.last()[0]}}class oo{constructor(e,t,n){this.garbageCollector=e,this.asyncQueue=t,this.localStore=n,this.Ar=null}start(){-1!==this.garbageCollector.params.cacheSizeCollectionThreshold&&this.Rr(6e4)}stop(){this.Ar&&(this.Ar.cancel(),this.Ar=null)}get started(){return null!==this.Ar}Rr(e){A(to,"Garbage collection scheduled in ".concat(e,"ms")),this.Ar=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,async()=>{this.Ar=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(e){Ne(e)?A(to,"Ignoring IndexedDB error during garbage collection: ",e):await Ae(e)}await this.Rr(3e5)})}}class ao{constructor(e,t){this.Vr=e,this.params=t}calculateTargetCount(e,t){return this.Vr.mr(e).next(e=>Math.floor(t/100*e))}nthSequenceNumber(e,t){if(0===t)return Re.resolve(Oe.ue);const n=new io(t);return this.Vr.forEachTarget(e,e=>n.Er(e.sequenceNumber)).next(()=>this.Vr.gr(e,e=>n.Er(e))).next(()=>n.maxValue)}removeTargets(e,t,n){return this.Vr.removeTargets(e,t,n)}removeOrphanedDocuments(e,t){return this.Vr.removeOrphanedDocuments(e,t)}collect(e,t){return-1===this.params.cacheSizeCollectionThreshold?(A("LruGarbageCollector","Garbage collection skipped; disabled"),Re.resolve(Xi)):this.getCacheSize(e).next(n=>n<this.params.cacheSizeCollectionThreshold?(A("LruGarbageCollector","Garbage collection skipped; Cache size ".concat(n," is lower than threshold ").concat(this.params.cacheSizeCollectionThreshold)),Xi):this.pr(e,t))}getCacheSize(e){return this.Vr.getCacheSize(e)}pr(e,t){let n,r,i,o,a,s,c;const u=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next(t=>(t>this.params.maximumSequenceNumbersToCollect?(A("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of ".concat(this.params.maximumSequenceNumbersToCollect," from ").concat(t)),r=this.params.maximumSequenceNumbersToCollect):r=t,o=Date.now(),this.nthSequenceNumber(e,r))).next(r=>(n=r,a=Date.now(),this.removeTargets(e,n,t))).next(t=>(i=t,s=Date.now(),this.removeOrphanedDocuments(e,n))).next(e=>(c=Date.now(),I()<=l.$b.DEBUG&&A("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in ".concat(o-u,"ms\n\tDetermined least recently used ").concat(r," in ")+(a-o)+"ms\n"+"\tRemoved ".concat(i," targets in ")+(s-a)+"ms\n"+"\tRemoved ".concat(e," documents in ")+(c-s)+"ms\n"+"Total Duration: ".concat(c-u,"ms")),Re.resolve({didRun:!0,sequenceNumbersCollected:r,targetsRemoved:i,documentsRemoved:e})))}}function so(e,t){return new ao(e,t)}class lo{constructor(){this.changes=new Jn(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,sn.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();const n=this.changes.get(t);return void 0!==n?Re.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)}
2assertNotApplied(){}}class co{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}class uo{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&&Lr(n.mutation,e,vt.empty(),ve.now()),e))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.getLocalViewOfDocuments(e,t,cr()).next(()=>t))}getLocalViewOfDocuments(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cr();const r=ir();return this.populateOverlays(e,r,t).next(()=>this.computeViews(e,t,r,n).next(e=>{let t=nr();return e.forEach((e,n)=>{t=t.insert(e,n.overlayedDocument)}),t}))}getOverlayedDocuments(e,t){const n=ir();return this.populateOverlays(e,n,t).next(()=>this.computeViews(e,t,n,cr()))}populateOverlays(e,t,n){const r=[];return 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=er();const o=ar(),a=ar();return t.forEach((e,t)=>{const a=n.get(t.key);r.has(t.key)&&(void 0===a||a.mutation instanceof Fr)?i=i.insert(t.key,t):void 0!==a?(o.set(t.key,a.mutation.getFieldMask()),Lr(a.mutation,t,a.mutation.getFieldMask(),ve.now())):o.set(t.key,vt.empty())}),this.recalculateAndSaveOverlays(e,i).next(e=>(e.forEach((e,t)=>o.set(e,t)),t.forEach((e,t)=>{var n;return a.set(e,new co(t,null!==(n=o.get(e))&&void 0!==n?n:null))}),a))}recalculateAndSaveOverlays(e,t){const n=ar();let r=new ft((e,t)=>e-t),i=cr();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next(e=>{for(const i of e)i.keys().forEach(e=>{const o=t.get(e);if(null===o)return;let a=n.get(e)||vt.empty();a=i.applyToLocalView(o,a),n.set(e,a);const s=(r.get(i.batchId)||cr()).add(e);r=r.insert(i.batchId,s)})}).next(()=>{const o=[],a=r.getReverseIterator();for(;a.hasNext();){const r=a.getNext(),s=r.key,l=r.value,c=or();l.forEach(e=>{if(!i.has(e)){const r=Or(t.get(e),n.get(e));null!==r&&c.set(e,r),i=i.add(e)}}),o.push(this.documentOverlayCache.saveOverlays(e,s,c))}return Re.waitFor(o)}).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 ae.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.getDocumentsMatchingDocumentQuery(e,t.path):Vn(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 o=r-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,n.largestBatchId,r-i.size):Re.resolve(ir());let a=we,s=i;return o.next(t=>Re.forEach(t,(t,n)=>(a<n.largestBatchId&&(a=n.largestBatchId),i.get(t)?Re.resolve():this.remoteDocumentCache.getEntry(e,t).next(e=>{s=s.insert(t,e)}))).next(()=>this.populateOverlays(e,t,i)).next(()=>this.computeViews(e,s,t,cr())).next(e=>({batchId:a,changes:rr(e)})))})}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new ae(t)).next(e=>{let t=nr();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t})}getDocumentsMatchingCollectionGroupQuery(e,t,n,r){const i=t.collectionGroup;let o=nr();return this.indexManager.getCollectionParents(e,i).next(a=>Re.forEach(a,a=>{const s=function(e,t){return new Dn(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,a.child(i));return this.getDocumentsMatchingCollectionQuery(e,s,n,r).next(e=>{e.forEach((e,t)=>{o=o.insert(e,t)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(e,t,n,r){let i;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,n.largestBatchId).next(o=>(i=o,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,sn.newInvalidDocument(r)))});let n=nr();return e.forEach((e,r)=>{const o=i.get(e);void 0!==o&&Lr(o.mutation,r,vt.empty(),ve.now()),Qn(t,r)&&(n=n.insert(e,r))}),n})}}
2class ho{constructor(e){this.serializer=e,this.Br=new Map,this.Lr=new Map}getBundleMetadata(e,t){return Re.resolve(this.Br.get(t))}saveBundleMetadata(e,t){return this.Br.set(t.id,function(e){return{id:e.id,version:e.version,createTime:_i(e.createTime)}}(t)),Re.resolve()}getNamedQuery(e,t){return Re.resolve(this.Lr.get(t))}saveNamedQuery(e,t){return this.Lr.set(t.name,function(e){return{name:e.name,query:Ki(e.bundledQuery),readTime:_i(e.readTime)}}(t)),Re.resolve()}}class fo{constructor(){this.overlays=new ft(ae.comparator),this.kr=new Map}getOverlay(e,t){return Re.resolve(this.overlays.get(t))}getOverlays(e,t){const n=ir();return Re.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.wt(e,t,r)}),Re.resolve()}removeOverlaysForBatchId(e,t,n){const r=this.kr.get(n);return void 0!==r&&(r.forEach(e=>this.overlays=this.overlays.remove(e)),this.kr.delete(n)),Re.resolve()}getOverlaysForCollection(e,t,n){const r=ir(),i=t.length+1,o=new ae(t.child("")),a=this.overlays.getIteratorFrom(o);for(;a.hasNext();){const e=a.getNext().value,o=e.getKey();if(!t.isPrefixOf(o.path))break;o.path.length===i&&e.largestBatchId>n&&r.set(e.getKey(),e)}return Re.resolve(r)}getOverlaysForCollectionGroup(e,t,n,r){let i=new ft((e,t)=>e-t);const o=this.overlays.getIterator();for(;o.hasNext();){const e=o.getNext().value;if(e.getKey().getCollectionGroup()===t&&e.largestBatchId>n){let t=i.get(e.largestBatchId);null===t&&(t=ir(),i=i.insert(e.largestBatchId,t)),t.set(e.getKey(),e)}}const a=ir(),s=i.getIterator();for(;s.hasNext()&&(s.getNext().value.forEach((e,t)=>a.set(e,t)),!(a.size()>=r)););return Re.resolve(a)}wt(e,t,n){const r=this.overlays.get(n.key);if(null!==r){const e=this.kr.get(r.largestBatchId).delete(n.key);this.kr.set(r.largestBatchId,e)}this.overlays=this.overlays.insert(n.key,new Gr(t,n));let i=this.kr.get(t);void 0===i&&(i=cr(),this.kr.set(t,i)),this.kr.set(t,i.add(n.key))}}class po{constructor(){this.sessionToken=wt.EMPTY_BYTE_STRING}getSessionToken(e){return Re.resolve(this.sessionToken)}setSessionToken(e,t){return this.sessionToken=t,Re.resolve()}}class mo{constructor(){this.qr=new gt(go.Qr),this.$r=new gt(go.Ur)}isEmpty(){return this.qr.isEmpty()}addReference(e,t){const n=new go(e,t);this.qr=this.qr.add(n),this.$r=this.$r.add(n)}Kr(e,t){e.forEach(e=>this.addReference(e,t))}removeReference(e,t){this.Wr(new go(e,t))}Gr(e,t){e.forEach(e=>this.removeReference(e,t))}zr(e){const t=new ae(new re([])),n=new go(t,e),r=new go(t,e+1),i=[];return this.$r.forEachInRange([n,r],e=>{this.Wr(e),i.push(e.key)}),i}jr(){this.qr.forEach(e=>this.Wr(e))}Wr(e){this.qr=this.qr.delete(e),this.$r=this.$r.delete(e)}Jr(e){const t=new ae(new re([])),n=new go(t,e),r=new go(t,e+1);let i=cr();return this.$r.forEachInRange([n,r],e=>{i=i.add(e.key)}),i}containsKey(e){const t=new go(e,0),n=this.qr.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}class go{constructor(e,t){this.key=e,this.Hr=t}static Qr(e,t){return ae.comparator(e.key,t.key)||Y(e.Hr,t.Hr)}static Ur(e,t){return Y(e.Hr,t.Hr)||ae.comparator(e.key,t.key)}}class yo{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.er=1,this.Yr=new gt(go.Qr)}checkEmpty(e){return Re.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,n,r){const i=this.er;this.er++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const o=new Hr(i,t,n,r);this.mutationQueue.push(o);for(const a of r)this.Yr=this.Yr.add(new go(a.key,i)),this.indexManager.addToCollectionParentIndex(e,a.key.path.popLast());return Re.resolve(o)}lookupMutationBatch(e,t){return Re.resolve(this.Zr(t))}getNextMutationBatchAfterBatchId(e,t){const n=t+1,r=this.Xr(n),i=r<0?0:r;return Re.resolve(this.mutationQueue.length>i?this.mutationQueue[i]:null)}getHighestUnacknowledgedBatchId(){return Re.resolve(0===this.mutationQueue.length?xe:this.er-1)}getAllMutationBatches(e){return Re.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){const n=new go(t,0),r=new go(t,Number.POSITIVE_INFINITY),i=[];return this.Yr.forEachInRange([n,r],e=>{const t=this.Zr(e.Hr);i.push(t)}),Re.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let n=new gt(Y);
2return t.forEach(e=>{const t=new go(e,0),r=new go(e,Number.POSITIVE_INFINITY);this.Yr.forEachInRange([t,r],e=>{n=n.add(e.Hr)})}),Re.resolve(this.ei(n))}getAllMutationBatchesAffectingQuery(e,t){const n=t.path,r=n.length+1;let i=n;ae.isDocumentKey(i)||(i=i.child(""));const o=new go(new ae(i),0);let a=new gt(Y);return this.Yr.forEachWhile(e=>{const t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(a=a.add(e.Hr)),!0)},o),Re.resolve(this.ei(a))}ei(e){const t=[];return e.forEach(e=>{const n=this.Zr(e);null!==n&&t.push(n)}),t}removeMutationBatch(e,t){L(0===this.ti(t.batchId,"removed"),55003),this.mutationQueue.shift();let n=this.Yr;return Re.forEach(t.mutations,r=>{const i=new go(r.key,t.batchId);return n=n.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,r.key)}).next(()=>{this.Yr=n})}rr(e){}containsKey(e,t){const n=new go(t,0),r=this.Yr.firstAfterOrEqual(n);return Re.resolve(t.isEqual(r&&r.key))}performConsistencyCheck(e){return this.mutationQueue.length,Re.resolve()}ti(e,t){return this.Xr(e)}Xr(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}Zr(e){const t=this.Xr(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}class vo{constructor(e){this.ni=e,this.docs=new ft(ae.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,o=this.ni(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:o}),this.size+=o-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 Re.resolve(n?n.document.mutableCopy():sn.newInvalidDocument(t))}getEntries(e,t){let n=er();return t.forEach(e=>{const t=this.docs.get(e);n=n.insert(e,t?t.document.mutableCopy():sn.newInvalidDocument(e))}),Re.resolve(n)}getDocumentsMatchingQuery(e,t,n,r){let i=er();const o=t.path,a=new ae(o.child("__id-9223372036854775808__")),s=this.docs.getIteratorFrom(a);for(;s.hasNext();){const e=s.getNext(),a=e.key,l=e.value.document;if(!o.isPrefixOf(a.path))break;a.path.length>o.length+1||ke(Te(l),n)<=0||(r.has(l.key)||Qn(t,l))&&(i=i.insert(l.key,l.mutableCopy()))}return Re.resolve(i)}getAllFromCollectionGroup(e,t,n,r){O(9500)}ri(e,t){return Re.forEach(this.docs,e=>t(e))}newChangeBuffer(e){return new bo(this)}getSize(e){return Re.resolve(this.size)}}class bo extends lo{constructor(e){super(),this.Or=e}applyChanges(e){const t=[];
vendor: 4,776 bytes, line 2
2return this.changes.forEach((n,r)=>{r.isValidDocument()?t.push(this.Or.addEntry(e,r)):this.Or.removeEntry(n)}),Re.waitFor(t)}getFromCache(e,t){return this.Or.getEntry(e,t)}getAllFromCache(e,t){return this.Or.getEntries(e,t)}}class wo{constructor(e){this.persistence=e,this.ii=new Jn(e=>On(e),xn),this.lastRemoteSnapshotVersion=be.min(),this.highestTargetId=0,this.si=0,this.oi=new mo,this.targetCount=0,this._i=eo.ar()}forEachTarget(e,t){return this.ii.forEach((e,n)=>t(n)),Re.resolve()}getLastRemoteSnapshotVersion(e){return Re.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return Re.resolve(this.si)}allocateTargetId(e){return this.highestTargetId=this._i.next(),Re.resolve(this.highestTargetId)}setTargetsMetadata(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.si&&(this.si=t),Re.resolve()}hr(e){this.ii.set(e.target,e);const t=e.targetId;t>this.highestTargetId&&(this._i=new eo(t),this.highestTargetId=t),e.sequenceNumber>this.si&&(this.si=e.sequenceNumber)}addTargetData(e,t){return this.hr(t),this.targetCount+=1,Re.resolve()}updateTargetData(e,t){return this.hr(t),Re.resolve()}removeTargetData(e,t){return this.ii.delete(t.target),this.oi.zr(t.targetId),this.targetCount-=1,Re.resolve()}removeTargets(e,t,n){let r=0;const i=[];return this.ii.forEach((o,a)=>{a.sequenceNumber<=t&&null===n.get(a.targetId)&&(this.ii.delete(o),i.push(this.removeMatchingKeysForTargetId(e,a.targetId)),r++)}),Re.waitFor(i).next(()=>r)}getTargetCount(e){return Re.resolve(this.targetCount)}getTargetData(e,t){const n=this.ii.get(t)||null;return Re.resolve(n)}addMatchingKeys(e,t,n){return this.oi.Kr(t,n),Re.resolve()}removeMatchingKeys(e,t,n){this.oi.Gr(t,n);const r=this.persistence.referenceDelegate,i=[];return r&&t.forEach(t=>{i.push(r.markPotentiallyOrphaned(e,t))}),Re.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this.oi.zr(t),Re.resolve()}getMatchingKeysForTargetId(e,t){const n=this.oi.Jr(t);return Re.resolve(n)}containsKey(e,t){return Re.resolve(this.oi.containsKey(t))}}class _o{constructor(e,t){this.ai={},this.overlays={},this.ui=new Oe(0),this.ci=!1,this.ci=!0,this.li=new po,this.referenceDelegate=e(this),this.hi=new wo(this),this.indexManager=new $i,this.remoteDocumentCache=function(e){return new vo(e)}(e=>this.referenceDelegate.Pi(e)),this.serializer=new Gi(t),this.Ti=new ho(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.ci=!1,Promise.resolve()}get started(){return this.ci}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new fo,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let n=this.ai[e.toKey()];return n||(n=new yo(t,this.referenceDelegate),this.ai[e.toKey()]=n),n}getGlobalsCache(){return this.li}getTargetCache(){return this.hi}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Ti}runTransaction(e,t,n){A("MemoryPersistence","Starting transaction:",e);const r=new Eo(this.ui.next());return this.referenceDelegate.Ii(),n(r).next(e=>this.referenceDelegate.di(r).next(()=>e)).toPromise().then(e=>(r.raiseOnCommittedEvent(),e))}Ei(e,t){return Re.or(Object.values(this.ai).map(n=>()=>n.containsKey(e,t)))}}class Eo extends Ie{constructor(e){super(),this.currentSequenceNumber=e}}class To{constructor(e){this.persistence=e,this.Ai=new mo,this.Ri=null}static Vi(e){return new To(e)}get mi(){if(this.Ri)return this.Ri;throw O(60996)}addReference(e,t,n){return this.Ai.addReference(n,t),this.mi.delete(n.toString()),Re.resolve()}removeReference(e,t,n){return this.Ai.removeReference(n,t),this.mi.add(n.toString()),Re.resolve()}markPotentiallyOrphaned(e,t){return this.mi.add(t.toString()),Re.resolve()}removeTarget(e,t){this.Ai.zr(t.targetId).forEach(e=>this.mi.add(e.toString()));const n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(e,t.targetId).next(e=>{e.forEach(e=>this.mi.add(e.toString()))}).next(()=>n.removeTargetData(e,t))}Ii(){this.Ri=new Set}di(e){const t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return Re.forEach(this.mi,n=>{const r=ae.fromPath(n);return this.fi(e,r).next(e=>{e||t.removeEntry(r,be.min())})}).next(()=>(this.Ri=null,t.apply(e)))}updateLimboDocument(e,t){return this.fi(e,t).next(e=>{e?this.mi.delete(t.toString()):this.mi.add(t.toString())})}Pi(e){return 0}fi(e,t){return Re.or([()=>Re.resolve(this.Ai.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Ei(e,t)])}}class So{constructor(e,t){this.persistence=e,this.gi=new Jn(e=>Fe(e.path),(e,t)=>e.isEqual(t)),this.garbageCollector=so(this,t)}static Vi(e,t){return new So(e,t)}Ii(){}di(e){return Re.resolve()}forEachTarget(e,t){return this.persistence.getTargetCache().forEac
2hTarget(e,t)}mr(e){const t=this.yr(e);return this.persistence.getTargetCache().getTargetCount(e).next(e=>t.next(t=>e+t))}yr(e){let t=0;return this.gr(e,e=>{t++}).next(()=>t)}gr(e,t){return Re.forEach(this.gi,(n,r)=>this.Sr(e,n,r).next(e=>e?Re.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.ri(e,r=>this.Sr(e,r,t).next(e=>{e||(n++,i.removeEntry(r,be.min()))})).next(()=>i.apply(e)).next(()=>n)}markPotentiallyOrphaned(e,t){return this.gi.set(t,e.currentSequenceNumber),Re.resolve()}removeTarget(e,t){const n=t.withSequenceNumber(e.currentSequenceNumber);return this.persistence.getTargetCache().updateTargetData(e,n)}addReference(e,t,n){return this.gi.set(n,e.currentSequenceNumber),Re.resolve()}removeReference(e,t,n){return this.gi.set(n,e.currentSequenceNumber),Re.resolve()}updateLimboDocument(e,t){return this.gi.set(t,e.currentSequenceNumber),Re.resolve()}Pi(e){let t=e.key.toString().length;return e.isFoundDocument()&&(t+=Qt(e.data.value)),t}Sr(e,t,n){return Re.or([()=>this.persistence.Ei(e,t),()=>this.persistence.getTargetCache().containsKey(e,t),()=>{const e=this.gi.get(t);return Re.resolve(void 0!==e&&e>n)}])}getCacheSize(e){return this.persistence.getRemoteDocumentCache().getSize(e)}}class ko{constructor(e,t,n,r){this.targetId=e,this.fromCache=t,this.Is=n,this.ds=r}static Es(e,t){let n=cr(),r=cr();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 ko(e,t.fromCache,n,r)}}class Co{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}class Io{constructor(){this.As=!1,this.Rs=!1,this.Vs=100,this.fs=(0,c.nr)()?8:Pe((0,c.ZQ)())>0?6:4}initialize(e,t){this.gs=e,this.indexManager=t,this.As=!0}getDocumentsMatchingQuery(e,t,n,r){const i={result:null};return this.ps(e,t).next(e=>{i.result=e}).next(()=>{if(!i.result)return this.ys(e,t,r,n).next(e=>{i.result=e})}).next(()=>{if(i.result)return;const n=new Co;return this.ws(e,t,n).next(r=>{if(i.result=r,this.Rs)return this.Ss(e,t,n,r.size)})}).next(()=>i.result)}Ss(e,t,n,r){return n.documentReadCount<this.Vs?(I()<=l.$b.DEBUG&&A("QueryEngine","SDK will not create cache indexes for query:",Kn(t),"since it only creates cache indexes for collection contains","more than or equal to",this.Vs,"documents"),Re.resolve()):(I()<=l.$b.DEBUG&&A("QueryEngine","Query:",Kn(t),"scans",n.documentReadCount,"local documents and returns",r,"documents as results."),n.documentReadCount>this.fs*r?(I()<=l.$b.DEBUG&&A("QueryEngine","The SDK decides to create cache indexes for query:",Kn(t),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,zn(t))):Re.resolve())}ps(e,t){if(Fn(t))return Re.resolve(null);let n=zn(t);return this.indexManager.getIndexType(e,n).next(r=>0===r?null:(null!==t.limit&&1===r&&(t=Hn(t,null,"F"),n=zn(t)),this.indexManager.getDocumentsMatchingTarget(e,n).next(r=>{const i=cr(...r);return this.gs.getDocuments(e,i).next(r=>this.indexManager.getMinOffset(e,n).next(n=>{const o=this.bs(t,r);return this.Ds(t,o,i,n.readTime)?this.ps(e,Hn(t,null,"F")):this.vs(e,o,t,n)}))})))}ys(e,t,n,r){return Fn(t)||r.isEqual(be.min())?Re.resolve(null):this.gs.getDocuments(e,n).next(i=>{const o=this.bs(t,i);return this.Ds(t,o,n,r)?Re.resolve(null):(I()<=l.$b.DEBUG&&A("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),Kn(t)),this.vs(e,o,t,Ee(r,we)).next(e=>e))})}bs(e,t){let n=new gt(Yn(e));return t.forEach((t,r)=>{Qn(e,r)&&(n=n.add(r))}),n}Ds(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)}ws(e,t,n){return I()<=l.$b.DEBUG&&A("QueryEngine","Using full collection scan to execute query:",Kn(t)),this.gs.getDocumentsMatchingQuery(e,t,Se.min(),n)}vs(e,t,n,r){return this.gs.getDocumentsMatchingQuery(e,n,r).next(e=>(t.forEach(t=>{e=e.insert(t.key,t)}),e))}}const Ao="LocalStore";class Ro{constructor(e,t,n,r){this.persistence=e,this.Cs=t,this.serializer
2=r,this.Fs=new ft(Y),this.Ms=new Jn(e=>On(e),xn),this.xs=new Map,this.Os=e.getRemoteDocumentCache(),this.hi=e.getTargetCache(),this.Ti=e.getBundleCache(),this.Ns(n)}Ns(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new uo(this.Os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Os.setIndexManager(this.indexManager),this.Cs.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>e.collect(t,this.Fs))}}function Po(e,t,n,r){return new Ro(e,t,n,r)}async function No(e,t){const n=D(e);return await n.persistence.runTransaction("Handle user change","readonly",e=>{let r;return n.mutationQueue.getAllMutationBatches(e).next(i=>(r=i,n.Ns(t),n.mutationQueue.getAllMutationBatches(e))).next(t=>{const i=[],o=[];let a=cr();for(const e of r){i.push(e.batchId);for(const t of e.mutations)a=a.add(t.key)}for(const e of t){o.push(e.batchId);for(const t of e.mutations)a=a.add(t.key)}return n.localDocuments.getDocuments(e,a).next(e=>({Bs:e,removedBatchIds:i,addedBatchIds:o}))})})}function Oo(e){const t=D(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",e=>t.hi.getLastRemoteSnapshotVersion(e))}function xo(e,t,n){let r=cr(),i=cr();return n.forEach(e=>r=r.add(e)),t.getEntries(e,r).next(e=>{let r=er();return n.forEach((n,o)=>{const a=e.get(n);o.isFoundDocument()!==a.isFoundDocument()&&(i=i.add(n)),o.isNoDocument()&&o.version.isEqual(be.min())?(t.removeEntry(n,o.readTime),r=r.insert(n,o)):!a.isValidDocument()||o.version.compareTo(a.version)>0||0===o.version.compareTo(a.version)&&a.hasPendingWrites?(t.addEntry(o),r=r.insert(n,o)):A(Ao,"Ignoring outdated watch update for ",n,". Current version:",a.version," Watch version:",o.version)}),{Ls:r,ks:i}})}function Lo(e,t){const n=D(e);return n.persistence.runTransaction("Get next mutation batch","readonly",e=>(void 0===t&&(t=xe),n.mutationQueue.getNextMutationBatchAfterBatchId(e,t)))}function Do(e,t){const n=D(e);return n.persistence.runTransaction("Allocate target","readwrite",e=>{let r;return n.hi.getTargetData(e,t).next(i=>i?(r=i,Re.resolve(r)):n.hi.allocateTargetId(e).next(i=>(r=new Wi(t,i,"TargetPurposeListen",e.currentSequenceNumber),n.hi.addTargetData(e,r).next(()=>r))))}).then(e=>{const r=n.Fs.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.Fs=n.Fs.insert(e.targetId,e),n.Ms.set(t,e.targetId)),e})}async function Mo(e,t,n){const r=D(e),i=r.Fs.get(t),o=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",o,e=>r.persistence.referenceDelegate.removeTarget(e,i))}catch(e){if(!Ne(e))throw e;A(Ao,"Failed to update sequence numbers for target ".concat(t,": ").concat(e))}r.Fs=r.Fs.remove(t),r.Ms.delete(i.target)}function Uo(e,t,n){const r=D(e);let i=be.min(),o=cr();return r.persistence.runTransaction("Execute query","readwrite",e=>function(e,t,n){const r=D(e),i=r.Ms.get(n);return void 0!==i?Re.resolve(r.Fs.get(i)):r.hi.getTargetData(t,n)}(r,e,zn(t)).next(t=>{if(t)return i=t.lastLimboFreeSnapshotVersion,r.hi.getMatchingKeysForTargetId(e,t.targetId).next(e=>{o=e})}).next(()=>r.Cs.getDocumentsMatchingQuery(e,t,n?i:be.min(),n?o:cr())).next(e=>(Fo(r,$n(t),e),{documents:e,qs:o})))}
2function Fo(e,t,n){let r=e.xs.get(t)||be.min();n.forEach((e,t)=>{t.readTime.compareTo(r)>0&&(r=t.readTime)}),e.xs.set(t,r)}class Vo{constructor(){this.activeTargetIds=dr()}Gs(e){this.activeTargetIds=this.activeTargetIds.add(e)}zs(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Ws(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class jo{constructor(){this.Fo=new Vo,this.Mo={},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.Fo.Gs(e),this.Mo[e]||"not-current"}updateQueryState(e,t,n){this.Mo[e]=t}removeLocalQueryTarget(e){this.Fo.zs(e)}isLocalQueryTarget(e){return this.Fo.activeTargetIds.has(e)}clearQueryState(e){delete this.Mo[e]}getAllActiveQueryTargets(){return this.Fo.activeTargetIds}isActiveQueryTarget(e){return this.Fo.activeTargetIds.has(e)}start(){return this.Fo=new Vo,Promise.resolve()}handleUserChange(e,t,n){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}class zo{xo(e){}shutdown(){}}const Bo="ConnectivityMonitor";class qo{constructor(){this.Oo=()=>this.No(),this.Bo=()=>this.Lo(),this.ko=[],this.qo()}xo(e){this.ko.push(e)}shutdown(){window.removeEventListener("online",this.Oo),window.removeEventListener("offline",this.Bo)}qo(){window.addEventListener("online",this.Oo),window.addEventListener("offline",this.Bo)}No(){A(Bo,"Network connectivity changed: AVAILABLE");for(const e of this.ko)e(0)}Lo(){A(Bo,"Network connectivity changed: UNAVAILABLE");for(const e of this.ko)e(1)}static C(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}let Ho=null;function Wo(){return null===Ho?Ho=268435456+Math.round(2147483648*Math.random()):Ho++,"0x"+Ho.toString(16)}const Go="RestConnection",Ko={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class Qo{get Qo(){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.$o=t+"://"+e.host,this.Uo="projects/".concat(n,"/databases/").concat(r),this.Ko=this.databaseId.database===xt?"project_id=".concat(n):"project_id=".concat(n,"&database_id=").concat(r)}Wo(e,t,n,r,i){const o=Wo(),a=this.Go(e,t.toUriEncodedString());A(Go,"Sending RPC '".concat(e,"' ").concat(o,":"),a,n);const s={"google-cloud-resource-prefix":this.Uo,"x-goog-request-params":this.Ko};this.zo(s,r,i);const l=new URL(a).host,u=(0,c.zJ)(l);return this.jo(e,a,s,n,u).then(t=>(A(Go,"Received RPC '".concat(e,"' ").concat(o,": "),t),t),t=>{throw P(Go,"RPC '".concat(e,"' ").concat(o," failed with error: "),t,"url: ",a,"request:",n),t})}Jo(e,t,n,r,i,o){return this.Wo(e,t,n,r,i)}zo(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)}Go(e,t){const n=Ko[e];return"".concat(this.$o,"/v1/").concat(t,":").concat(n)}terminate(){}}class $o{constructor(e){this.Ho=e.Ho,this.Yo=e.Yo}Zo(e){this.Xo=e}e_(e){this.t_=e}n_(e){this.r_=e}onMessage(e){this.i_=e}close(){this.Yo()}send(e){this.Ho(e)}s_(){this.Xo()}o_(){this.t_()}__(e){this.r_(e)}a_(e){this.i_(e)}}const Yo="WebChannelConnection";class Xo extends Qo{constructor(e){super(e),this.u_=[],this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}jo(e,t,n,r,i){const o=Wo();return new Promise((i,a)=>{const s=new h;s.setWithCredentials(!0),s.listenOnce(p.COMPLETE,()=>{try{switch(s.getLastErrorCode()){case m.NO_ERROR:const t=s.getResponseJson();A(Yo,"XHR for RPC '".concat(e,"' ").concat(o," received:"),JSON.stringify(t)),i(t);break;case m.TIMEOUT:A(Yo,"RPC '".concat(e,"' ").concat(o," timed out")),a(new U(M.DEADLINE_EXCEEDED,"Request time out"));break;case m.HTTP_ERROR:const n=s.getStatus();if(A(Yo,"RPC '".concat(e,"' ").concat(o," failed with status:"),n,"response text:",s.getResponseText()),n>0){let e=s.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(M).indexOf(t)>=0?t:M.UNKNOWN}(t.status);a(new U(e,t.message))}else a(new U(M.UNKNOWN,"Server responded with status "+s.getStatus()))}else a(new U(M.UNAVAILABLE,"Connection failed."));break;default:O(9055,{c_:e,streamId:o,l_:s.getLastErrorCode(),h_:s.getLastError()})}}finally{A(Yo,"RPC '".concat(e,"' ").concat(o," completed."))}});const l=JSON.stringify(r);A(Yo,"RPC '".concat(e,"' ").concat(o," sending request:"),r),s.send(t,"POST",l,n,15)})}P_(e,t,n){const r=Wo(),i=[this.$o,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=b(),a=v(),s={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/".concat(this.databaseId.projectId,"/databases/").concat(this.databaseId.database)}
2,sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},l=this.longPollingOptions.timeoutSeconds;void 0!==l&&(s.longPollingTimeout=Math.round(1e3*l)),this.useFetchStreams&&(s.useFetchStreams=!0),this.zo(s.initMessageHeaders,t,n),s.encodeInitMessageHeaders=!0;const c=i.join("");A(Yo,"Creating RPC '".concat(e,"' stream ").concat(r,": ").concat(c),s);const u=o.createWebChannel(c,s);this.T_(u);let d=!1,h=!1;const p=new $o({Ho:t=>{h?A(Yo,"Not sending because RPC '".concat(e,"' stream ").concat(r," is closed:"),t):(d||(A(Yo,"Opening RPC '".concat(e,"' stream ").concat(r," transport.")),u.open(),d=!0),A(Yo,"RPC '".concat(e,"' stream ").concat(r," sending:"),t),u.send(t))},Yo:()=>u.close()}),m=(e,t,n)=>{e.listen(t,e=>{try{n(e)}catch(e){setTimeout(()=>{throw e},0)}})};return m(u,f.EventType.OPEN,()=>{h||(A(Yo,"RPC '".concat(e,"' stream ").concat(r," transport opened.")),p.s_())}),m(u,f.EventType.CLOSE,()=>{h||(h=!0,A(Yo,"RPC '".concat(e,"' stream ").concat(r," transport closed")),p.__(),this.I_(u))}),m(u,f.EventType.ERROR,t=>{h||(h=!0,P(Yo,"RPC '".concat(e,"' stream ").concat(r," transport errored. Name:"),t.name,"Message:",t.message),p.__(new U(M.UNAVAILABLE,"The operation could not be completed")))}),m(u,f.EventType.MESSAGE,t=>{var n;if(!h){const i=t.data[0];L(!!i,16349);const o=i,a=(null==o?void 0:o.error)||(null===(n=o[0])||void 0===n?void 0:n.error);if(a){A(Yo,"RPC '".concat(e,"' stream ").concat(r," received error:"),a);const t=a.status;let n=function(e){const t=Qr[e];if(void 0!==t)return Xr(t)}(t),i=a.message;void 0===n&&(n=M.INTERNAL,i="Unknown error status: "+t+" with message "+a.message),h=!0,p.__(new U(n,i)),u.close()}else A(Yo,"RPC '".concat(e,"' stream ").concat(r," received:"),i),p.a_(i)}}),m(a,y.STAT_EVENT,t=>{t.stat===g.PROXY?A(Yo,"RPC '".concat(e,"' stream ").concat(r," detected buffering proxy")):t.stat===g.NOPROXY&&A(Yo,"RPC '".concat(e,"' stream ").concat(r," detected no buffering proxy"))}),setTimeout(()=>{p.o_()},0),p}terminate(){this.u_.forEach(e=>e.close()),this.u_=[]}T_(e){this.u_.push(e)}I_(e){this.u_=this.u_.filter(t=>t===e)}}function Jo(){return"undefined"!=typeof document?document:null}function Zo(e){return new gi(e,!0)}class ea{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.Fi=e,this.timerId=t,this.d_=n,this.E_=r,this.A_=i,this.R_=0,this.V_=null,this.m_=Date.now(),this.reset()}reset(){this.R_=0}f_(){this.R_=this.A_}g_(e){this.cancel();const t=Math.floor(this.R_+this.p_()),n=Math.max(0,Date.now()-this.m_),r=Math.max(0,t-n);r>0&&A("ExponentialBackoff","Backing off for ".concat(r," ms (base delay: ").concat(this.R_," ms, delay with jitter: ").concat(t," ms, last attempt: ").concat(n," ms ago)")),this.V_=this.Fi.enqueueAfterDelay(this.timerId,r,()=>(this.m_=Date.now(),e())),this.R_*=this.E_,this.R_<this.d_&&(this.R_=this.d_),this.R_>this.A_&&(this.R_=this.A_)}y_(){null!==this.V_&&(this.V_.skipDelay(),this.V_=null)}cancel(){null!==this.V_&&(this.V_.cancel(),this.V_=null)}p_(){return(Math.random()-.5)*this.R_}}const ta="PersistentStream";class na{constructor(e,t,n,r,i,o,a,s){this.Fi=e,this.w_=n,this.S_=r,this.connection=i,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=a,this.listener=s,this.state=0,this.b_=0,this.D_=null,this.v_=null,this.stream=null,this.C_=0,this.F_=new ea(e,t)}M_(){return 1===this.state||5===this.state||this.x_()}x_(){return 2===this.state||3===this.state}start(){this.C_=0,4!==this.state?this.auth():this.O_()}async stop(){this.M_()&&await this.close(0)}N_(){this.state=0,this.F_.reset()}B_(){this.x_()&&null===this.D_&&(this.D_=this.Fi.enqueueAfterDelay(this.w_,6e4,()=>this.L_()))}k_(e){this.q_(),this.stream.send(e)}async L_(){if(this.x_())return this.close(0)}q_(){this.D_&&(this.D_.cancel(),this.D_=null)}Q_(){this.v_&&(this.v_.cancel(),this.v_=null)}async close(e,t){this.q_(),this.Q_(),this.F_.cancel(),this.b_++,4!==e?this.F_.reset():t&&t.code===M.RESOURCE_EXHAUSTED?(R(t.toString()),R("Using maximum backoff delay to prevent overloading the backend."),this.F_.f_()):t&&t.code===M.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.U_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.n_(t)}U_(){}auth(){this.state=1;const e=this.K_(this.b_),t=this.b_;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(e=>{let n=(0,o.A)(e,2),r=n[0],i=n[1];this.b_===t&&this.W_(r,i)},t=>{e(()=>{const e=new U(M.UNKNOWN,"Fetching auth token failed: "+t.message);return this.G_(e)})})}W_(e,t){const n=this.K_(this.b_);this.stream=this.z_(e,t),this.stream.Zo(()=>{n(()=>this.listener.Zo())}),this.stream.e_(()=>{n(()=>(this.state=2,this.v_=this.Fi.enqueueAfterDelay(this.S_,1e4,()=>(this.x_()&&(this.state=3),Promise.resolve())),this.listener.e_()))}),this.stream.n_(e=>{n(()=>this.G_(e))}),this.stream.onMessage(e=>{n(()=>1==++this.C_?this.j_(e):this.onNext(e))})}O_(){this.state=5,this.F_.g_(async()=>{this.state=0,this.start()})}G_(e){return A(ta,"close with error: ".concat(e)),this.stream=null,this.close(4,e)}K_(e){return t=>{this.Fi.enqueueAndForget(()=>this.b_===e?t():(A(ta,"stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class ra extends na{constructor(e,t,n,r,i,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,n,r,o),this.serializer
2=i}z_(e,t){return this.connection.P_("Listen",e,t)}j_(e){return this.onNext(e)}onNext(e){this.F_.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:O(39313,{state:e})}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],o=function(e,t){return e.useProto3Json?(L(void 0===t||"string"==typeof t,58123),wt.fromBase64String(t||"")):(L(void 0===t||t instanceof Buffer||t instanceof Uint8Array,16193),wt.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),a=t.targetChange.cause,s=a&&function(e){const t=void 0===e.code?M.UNKNOWN:Xr(e.code);return new U(t,e.message||"")}(a);n=new li(r,i,o,s||null)}else if("documentChange"in t){t.documentChange;const r=t.documentChange;r.document,r.document.name,r.document.updateTime;const i=Ci(e,r.document.name),o=_i(r.document.updateTime),a=r.document.createTime?_i(r.document.createTime):be.min(),s=new on({mapValue:{fields:r.document.fields}}),l=sn.newFoundDocument(i,o,a,s),c=r.targetIds||[],u=r.removedTargetIds||[];n=new ai(c,u,l.key,l)}else if("documentDelete"in t){t.documentDelete;const r=t.documentDelete;r.document;const i=Ci(e,r.document),o=r.readTime?_i(r.readTime):be.min(),a=sn.newNoDocument(i,o),s=r.removedTargetIds||[];n=new ai([],s,a.key,a)}else if("documentRemove"in t){t.documentRemove;const r=t.documentRemove;r.document;const i=Ci(e,r.document),o=r.removedTargetIds||[];n=new ai([],o,i,null)}else{if(!("filter"in t))return O(11601,{At:t});{t.filter;const e=t.filter;e.targetId;const r=e.count,i=void 0===r?0:r,o=e.unchangedNames,a=new Kr(i,o),s=e.targetId;n=new si(s,a)}}return n}(this.serializer,e),n=function(e){if(!("targetChange"in e))return be.min();const t=e.targetChange;return t.targetIds&&t.targetIds.length?be.min():t.readTime?_i(t.readTime):be.min()}(e);return this.listener.J_(t,n)}H_(e){const t={};t.database=Ri(this.serializer),t.addTarget=function(e,t){let n;const r=t.target;if(n=Ln(r)?{documents:xi(e,r)}:{query:Li(e,r).Vt},n.targetId=t.targetId,t.resumeToken.approximateByteSize()>0){n.resumeToken=bi(e,t.resumeToken);const r=yi(e,t.expectedCount);null!==r&&(n.expectedCount=r)}else if(t.snapshotVersion.compareTo(be.min())>0){n.readTime=vi(e,t.snapshotVersion.toTimestamp());const r=yi(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 O(28987,{purpose:e})}}(t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.serializer,e);n&&(t.labels=n),this.k_(t)}Y_(e){const t={};t.database=Ri(this.serializer),t.removeTarget=e,this.k_(t)}}class ia extends na{constructor(e,t,n,r,i,o){super(e,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,n,r,o),this.serializer=i}get Z_(){return this.C_>0}start(){this.lastStreamToken=void 0,super.start()}U_(){this.Z_&&this.X_([])}z_(e,t){return this.connection.P_("Write",e,t)}j_(e){return L(!!e.streamToken,31322),this.lastStreamToken=e.streamToken,L(!e.writeResults||0===e.writeResults.length,55816),this.listener.ea()}onNext(e){L(!!e.streamToken,12678),this.lastStreamToken=e.streamToken,this.F_.reset();const t=function(e,t){return e&&e.length>0?(L(void 0!==t,14353),e.map(e=>function(e,t){let n=e.updateTime?_i(e.updateTime):_i(t);return n.isEqual(be.min())&&(n=_i(t)),new Ar(n,e.transformResults||[])}(e,t))):[]}(e.writeResults,e.commitTime),n=_i(e.commitTime);return this.listener.ta(n,t)}na(){const e={};e.database=Ri(this.serializer),this.k_(e)}X_(e){const t={streamToken:this.lastStreamToken,writes:e.map(e=>Oi(this.serializer,e))};this.k_(t)}}class oa{}class aa extends oa{constructor(e,t,n,r){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=n,this.serializer=r,this.ra=!1}ia(){if(this.ra)throw new U(M.FAILED_PRECONDITION,"The client has already been terminated.")}Wo(e,t,n,r){return this.ia(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(i=>{let a=(0,o.A)(i,2),s=a[0],l=a[1];return this.connection.Wo(e,Ti(t,n),r,s,l)}).catch(e=>{throw"FirebaseError"===e.name?(e.code===M.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new U(M.UNKNOWN,e.toString())})}Jo(e,t,n,r,i){return this.ia(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(a=>{let s=(0,o.A)(a,2),l=s[0],c=s[1];return this.connection.Jo(e,Ti(t,n),r,l,c,i)}).catch(e=>{throw"FirebaseError"===e.name?(e.code===M.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new U(M.UNKNOWN,e.toString())})}terminate(){this.ra=!0,this.connection.terminate()}}class sa{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.sa=0,this.oa=null,this._a=!0}aa(){0===this.sa&&(this.ua("Unknown"),this.oa=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.oa=null,this.ca("Backend didn't respond within 10 seconds."),this.ua("Offline"),Promise.resolve())))}la(e){"Online"===this.state?this.ua("Unknown"):(this.sa++,this.sa>=1&&(this.ha(),this.ca("Connection failed 1 times. Most recent error: ".concat(e.toString())),this.ua("Offline")))}set(e){this.ha(),this.sa=0,"Online"===e&&(this._a=!1),this.ua(e)}ua(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}ca(e){const t="Could not reach Cloud Firestore backend. ".concat(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._a?(R(t),this._a=!1):A("OnlineStateTracker",t)}ha(){null!==this.oa&&(this.oa.cancel(),this.oa=null)}}const la="RemoteStore";class ca{constructor(e,t,n,r,i){this.localStore=e,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.Pa=[],this.Ta=new Map,this.Ia=new Set,this.da=[],this.Ea=i,this.Ea.xo(e=>{n.enqueueAndForget(async()=>
2{va(this)&&(A(la,"Restarting streams for network reachability change."),await async function(e){const t=D(e);t.Ia.add(4),await da(t),t.Aa.set("Unknown"),t.Ia.delete(4),await ua(t)}(this))})}),this.Aa=new sa(n,r)}}async function ua(e){if(va(e))for(const t of e.da)await t(!0)}async function da(e){for(const t of e.da)await t(!1)}function ha(e,t){const n=D(e);n.Ta.has(t.targetId)||(n.Ta.set(t.targetId,t),ya(n)?ga(n):Ua(n).x_()&&pa(n,t))}function fa(e,t){const n=D(e),r=Ua(n);n.Ta.delete(t),r.x_()&&ma(n,t),0===n.Ta.size&&(r.x_()?r.B_():va(n)&&n.Aa.set("Unknown"))}function pa(e,t){if(e.Ra.$e(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(be.min())>0){const n=e.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(n)}Ua(e).H_(t)}function ma(e,t){e.Ra.$e(t),Ua(e).Y_(t)}function ga(e){e.Ra=new ui({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),Et:t=>e.Ta.get(t)||null,lt:()=>e.datastore.serializer.databaseId}),Ua(e).start(),e.Aa.aa()}function ya(e){return va(e)&&!Ua(e).M_()&&e.Ta.size>0}function va(e){return 0===D(e).Ia.size}function ba(e){e.Ra=void 0}async function wa(e){e.Aa.set("Online")}async function _a(e){e.Ta.forEach((t,n)=>{pa(e,t)})}async function Ea(e,t){ba(e),ya(e)?(e.Aa.la(t),ga(e)):e.Aa.set("Unknown")}async function Ta(e,t,n){if(e.Aa.set("Online"),t instanceof li&&2===t.state&&t.cause)try{await async function(e,t){const n=t.cause;for(const r of t.targetIds)e.Ta.has(r)&&(await e.remoteSyncer.rejectListen(r,n),e.Ta.delete(r),e.Ra.removeTarget(r))}(e,t)}catch(n){A(la,"Failed to remove targets %s: %s ",t.targetIds.join(","),n),await Sa(e,n)}else if(t instanceof ai?e.Ra.Ye(t):t instanceof si?e.Ra.it(t):e.Ra.et(t),!n.isEqual(be.min()))try{const t=await Oo(e.localStore);n.compareTo(t)>=0&&await function(e,t){const n=e.Ra.Pt(t);
2return n.targetChanges.forEach((n,r)=>{if(n.resumeToken.approximateByteSize()>0){const i=e.Ta.get(r);i&&e.Ta.set(r,i.withResumeToken(n.resumeToken,t))}}),n.targetMismatches.forEach((t,n)=>{const r=e.Ta.get(t);if(!r)return;e.Ta.set(t,r.withResumeToken(wt.EMPTY_BYTE_STRING,r.snapshotVersion)),ma(e,t);const i=new Wi(r.target,t,n,r.sequenceNumber);pa(e,i)}),e.remoteSyncer.applyRemoteEvent(n)}(e,n)}catch(t){A(la,"Failed to raise snapshot:",t),await Sa(e,t)}}async function Sa(e,t,n){if(!Ne(t))throw t;e.Ia.add(1),await da(e),e.Aa.set("Offline"),n||(n=()=>Oo(e.localStore)),e.asyncQueue.enqueueRetryable(async()=>{A(la,"Retrying IndexedDB access"),await n(),e.Ia.delete(1),await ua(e)})}function ka(e,t){return t().catch(n=>Sa(e,n,t))}async function Ca(e){const t=D(e),n=Fa(t);let r=t.Pa.length>0?t.Pa[t.Pa.length-1].batchId:xe;for(;Ia(t);)try{const e=await Lo(t.localStore,r);if(null===e){0===t.Pa.length&&n.B_();break}r=e.batchId,Aa(t,e)}catch(e){await Sa(t,e)}Ra(t)&&Pa(t)}function Ia(e){return va(e)&&e.Pa.length<10}function Aa(e,t){e.Pa.push(t);const n=Fa(e);n.x_()&&n.Z_&&n.X_(t.mutations)}function Ra(e){return va(e)&&!Fa(e).M_()&&e.Pa.length>0}function Pa(e){Fa(e).start()}async function Na(e){Fa(e).na()}async function Oa(e){const t=Fa(e);for(const n of e.Pa)t.X_(n.mutations)}async function xa(e,t,n){const r=e.Pa.shift(),i=Wr.from(r,t,n);await ka(e,()=>e.remoteSyncer.applySuccessfulWrite(i)),await Ca(e)}async function La(e,t){t&&Fa(e).Z_&&await async function(e,t){if(function(e){return Yr(e)&&e!==M.ABORTED}(t.code)){const n=e.Pa.shift();Fa(e).N_(),await ka(e,()=>e.remoteSyncer.rejectFailedWrite(n.batchId,t)),await Ca(e)}}(e,t),Ra(e)&&Pa(e)}async function Da(e,t){const n=D(e);n.asyncQueue.verifyOperationInProgress(),A(la,"RemoteStore received new credentials");const r=va(n);n.Ia.add(3),await da(n),r&&n.Aa.set("Unknown"),await n.remoteSyncer.handleCredentialChange(t),n.Ia.delete(3),await ua(n)}async function Ma(e,t){const n=D(e);t?(n.Ia.delete(2),await ua(n)):t||(n.Ia.add(2),await da(n),n.Aa.set("Unknown"))}function Ua(e){return e.Va||(e.Va=function(e,t,n){const r=D(e);return r.ia(),new ra(t,r.connection,r.authCredentials,r.appCheckCredentials,r.serializer,n)}(e.datastore,e.asyncQueue,{Zo:wa.bind(null,e),e_:_a.bind(null,e),n_:Ea.bind(null,e),J_:Ta.bind(null,e)}),e.da.push(async t=>{t?(e.Va.N_(),ya(e)?ga(e):e.Aa.set("Unknown")):(await e.Va.stop(),ba(e))})),e.Va}function Fa(e){return e.ma||(e.ma=function(e,t,n){const r=D(e);return r.ia(),new ia(t,r.connection,r.authCredentials,r.appCheckCredentials,r.serializer,n)}(e.datastore,e.asyncQueue,{Zo:()=>Promise.resolve(),e_:Na.bind(null,e),n_:La.bind(null,e),ea:Oa.bind(null,e),ta:xa.bind(null,e)}),e.da.push(async t=>{t?(e.ma.N_(),await Ca(e)):(await e.ma.stop(),e.Pa.length>0&&(A(la,"Stopping write stream with ".concat(e.Pa.length," pending writes")),e.Pa=[]))})),e.ma}class Va{constructor(e,t,n,r,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new F,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 o=Date.now()+n,a=new Va(e,t,o,r,i);return a.start(n),a}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new U(M.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 ja(e,t){if(R("AsyncQueue","".concat(t,": ").concat(e)),Ne(e))return new U(M.UNAVAILABLE,"".concat(t,": ").concat(e));throw e}class za{static emptySet(e){return new za(e.comparator)}constructor(e){this.comparator=e?(t,n)=>e(t,n)||ae.comparator(t.key,n.key):(e,t)=>ae.comparator(e.key,t.key),this.keyedMap=nr(),this.sortedSet=new ft(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 za))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 za;return n.comparator=this.comparator,n.keyedMap=e,n.sortedSet=t,n}}class Ba{constructor(){this.fa=new ft(ae.comparator)}track(e){const t=e.doc.key,n=this.fa.get(t);n?0!==e.type&&3===n.type?this.fa=this.fa.insert(t,e):3===e.type&&1!==n.type?this.fa=this.fa.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.fa=this.fa.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.fa=this.fa.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.fa=this.fa.remove(t):1===e.type&&2===n.type?this.fa=this.fa.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.fa=this.fa.insert(t,{type:2,doc:e.doc}):O(63341,{At:e,ga:n}):this.fa=this.fa.insert(t,e)}pa(){const e=[];return this.fa.inorderTraversal((t,n)=>{e.push(n)}),e}}class qa{constructor(e,t,n,r,i,o,a,s,l){this.query=e,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=i,this.fromCache=o,this.syncStateChanged=a,this.excludesMetadataChanges=s,this.hasCachedResults=l}static fromInitialDocuments(e,t,n,r,i){const o=[];
2return t.forEach(e=>{o.push({type:0,doc:e})}),new qa(e,t,za.emptySet(t),o,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)&&Wn(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 Ha{constructor(){this.ya=void 0,this.wa=[]}Sa(){return this.wa.some(e=>e.ba())}}class Wa{constructor(){this.queries=Ga(),this.onlineState="Unknown",this.Da=new Set}terminate(){!function(e,t){const n=D(e),r=n.queries;n.queries=Ga(),r.forEach((e,n)=>{for(const r of n.wa)r.onError(t)})}(this,new U(M.ABORTED,"Firestore shutting down"))}}function Ga(){return new Jn(e=>Gn(e),Wn)}async function Ka(e,t){const n=D(e);let r=3;const i=t.query;let o=n.queries.get(i);o?!o.Sa()&&t.ba()&&(r=2):(o=new Ha,r=t.ba()?0:1);try{switch(r){case 0:o.ya=await n.onListen(i,!0);break;case 1:o.ya=await n.onListen(i,!1);break;case 2:await n.onFirstRemoteStoreListen(i)}}catch(e){const n=ja(e,"Initialization of query '".concat(Kn(t.query),"' failed"));return void t.onError(n)}n.queries.set(i,o),o.wa.push(t),t.va(n.onlineState),o.ya&&t.Ca(o.ya)&&Xa(n)}async function Qa(e,t){const n=D(e),r=t.query;let i=3;const o=n.queries.get(r);if(o){const e=o.wa.indexOf(t);e>=0&&(o.wa.splice(e,1),0===o.wa.length?i=t.ba()?0:1:!o.Sa()&&t.ba()&&(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 $a(e,t){const n=D(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.wa)e.Ca(i)&&(r=!0);t.ya=i}}r&&Xa(n)}function Ya(e,t,n){const r=D(e),i=r.queries.get(t);if(i)for(const o of i.wa)o.onError(n);r.queries.delete(t)}
2function Xa(e){e.Da.forEach(e=>{e.next()})}var Ja,Za;(Za=Ja||(Ja={})).Fa="default",Za.Cache="cache";class es{constructor(e,t,n){this.query=e,this.Ma=t,this.xa=!1,this.Oa=null,this.onlineState="Unknown",this.options=n||{}}Ca(e){if(!this.options.includeMetadataChanges){const t=[];for(const n of e.docChanges)3!==n.type&&t.push(n);e=new qa(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.xa?this.Na(e)&&(this.Ma.next(e),t=!0):this.Ba(e,this.onlineState)&&(this.La(e),t=!0),this.Oa=e,t}onError(e){this.Ma.error(e)}va(e){this.onlineState=e;let t=!1;return this.Oa&&!this.xa&&this.Ba(this.Oa,e)&&(this.La(this.Oa),t=!0),t}Ba(e,t){if(!e.fromCache)return!0;if(!this.ba())return!0;const n="Offline"!==t;return(!this.options.ka||!n)&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}Na(e){if(e.docChanges.length>0)return!0;const t=this.Oa&&this.Oa.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}La(e){e=qa.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.xa=!0,this.Ma.next(e)}ba(){return this.options.source!==Ja.Cache}}class ts{constructor(e){this.key=e}}class ns{constructor(e){this.key=e}}class rs{constructor(e,t){this.query=e,this.Ha=t,this.Ya=null,this.hasCachedResults=!1,this.current=!1,this.Za=cr(),this.mutatedKeys=cr(),this.Xa=Yn(e),this.eu=new za(this.Xa)}get tu(){return this.Ha}nu(e,t){const n=t?t.ru:new Ba,r=t?t.eu:this.eu;let i=t?t.mutatedKeys:this.mutatedKeys,o=r,a=!1;const s="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=Qn(this.query,t)?t:null,d=!!c&&this.mutatedKeys.has(c.key),h=!!u&&(u.hasLocalMutations||this.mutatedKeys.has(u.key)&&u.hasCommittedMutations);let f=!1;c&&u?c.data.isEqual(u.data)?d!==h&&(n.track({type:3,doc:u}),f=!0):this.iu(c,u)||(n.track({type:2,doc:u}),f=!0,(s&&this.Xa(u,s)>0||l&&this.Xa(u,l)<0)&&(a=!0)):!c&&u?(n.track({type:0,doc:u}),f=!0):c&&!u&&(n.track({type:1,doc:c}),f=!0,(s||l)&&(a=!0)),f&&(u?(o=o.add(u),i=h?i.add(e):i.delete(e)):(o=o.delete(e),i=i.delete(e)))}),null!==this.query.limit)for(;o.size>this.query.limit;){const e="F"===this.query.limitType?o.last():o.first();o=o.delete(e.key),i=i.delete(e.key),n.track({type:1,doc:e})}return{eu:o,ru:n,Ds:a,mutatedKeys:i}}iu(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,n,r){const i=this.eu;this.eu=e.eu,this.mutatedKeys=e.mutatedKeys;const o=e.ru.pa();o.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 O(20277,{At:e})}};return n(e)-n(t)}(e.type,t.type)||this.Xa(e.doc,t.doc)),this.su(n),r=null!=r&&r;const a=t&&!r?this.ou():[],s=0===this.Za.size&&this.current&&!r?1:0,l=s!==this.Ya;return this.Ya=s,0!==o.length||l?{snapshot:new qa(this.query,e.eu,i,o,e.mutatedKeys,0===s,l,!1,!!n&&n.resumeToken.approximateByteSize()>0),_u:a}:{_u:a}}va(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({eu:this.eu,ru:new Ba,mutatedKeys:this.mutatedKeys,Ds:!1},!1)):{_u:[]}}au(e){return!this.Ha.has(e)&&!!this.eu.has(e)&&!this.eu.get(e).hasLocalMutations}su(e){e&&(e.addedDocuments.forEach(e=>this.Ha=this.Ha.add(e)),e.modifiedDocuments.forEach(e=>{}),e.removedDocuments.forEach(e=>this.Ha=this.Ha.delete(e)),this.current=e.current)}ou(){if(!this.current)return[];const e=this.Za;this.Za=cr(),this.eu.forEach(e=>{this.au(e.key)&&(this.Za=this.Za.add(e.key))});const t=[];return e.forEach(e=>{this.Za.has(e)||t.push(new ns(e))}
2),this.Za.forEach(n=>{e.has(n)||t.push(new ts(n))}),t}uu(e){this.Ha=e.qs,this.Za=cr();const t=this.nu(e.documents);return this.applyChanges(t,!0)}cu(){return qa.fromInitialDocuments(this.query,this.eu,this.mutatedKeys,0===this.Ya,this.hasCachedResults)}}const is="SyncEngine";class os{constructor(e,t,n){this.query=e,this.targetId=t,this.view=n}}class as{constructor(e){this.key=e,this.lu=!1}}class ss{constructor(e,t,n,r,i,o){this.localStore=e,this.remoteStore=t,this.eventManager=n,this.sharedClientState=r,this.currentUser=i,this.maxConcurrentLimboResolutions=o,this.hu={},this.Pu=new Jn(e=>Gn(e),Wn),this.Tu=new Map,this.Iu=new Set,this.du=new ft(ae.comparator),this.Eu=new Map,this.Au=new mo,this.Ru={},this.Vu=new Map,this.mu=eo.ur(),this.onlineState="Unknown",this.fu=void 0}get isPrimaryClient(){return!0===this.fu}}async function ls(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=Rs(e);let i;const o=r.Pu.get(t);return o?(r.sharedClientState.addLocalQueryTarget(o.targetId),i=o.view.cu()):i=await us(r,t,n,!0),i}async function cs(e,t){const n=Rs(e);await us(n,t,!0,!1)}async function us(e,t,n,r){const i=await Do(e.localStore,zn(t)),o=i.targetId,a=e.sharedCl
2ientState.addLocalQueryTarget(o,n);let s;return r&&(s=await ds(e,t,o,"current"===a,i.resumeToken)),e.isPrimaryClient&&n&&ha(e.remoteStore,i),s}async function ds(e,t,n,r,i){e.gu=(t,n,r)=>async function(e,t,n,r){let i=t.view.nu(n);i.Ds&&(i=await Uo(e.localStore,t.query,!1).then(e=>{let n=e.documents;return t.view.nu(n,i)}));const o=r&&r.targetChanges.get(t.targetId),a=r&&null!=r.targetMismatches.get(t.targetId),s=t.view.applyChanges(i,e.isPrimaryClient,o,a);return Ts(e,t.targetId,s._u),s.snapshot}(e,t,n,r);const o=await Uo(e.localStore,t,!0),a=new rs(t,o.qs),s=a.nu(o.documents),l=oi.createSynthesizedTargetChangeForCurrentChange(n,r&&"Offline"!==e.onlineState,i),c=a.applyChanges(s,e.isPrimaryClient,l);Ts(e,n,c._u);const u=new os(t,n,a);return e.Pu.set(t,u),e.Tu.has(n)?e.Tu.get(n).push(t):e.Tu.set(n,[t]),c.snapshot}async function hs(e,t,n){const r=D(e),i=r.Pu.get(t),o=r.Tu.get(i.targetId);if(o.length>1)return r.Tu.set(i.targetId,o.filter(e=>!Wn(e,t))),void r.Pu.delete(t);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedCl
2ientState.isActiveQueryTarget(i.targetId)||await Mo(r.localStore,i.targetId,!1).then(()=>{r.sharedClientState.clearQueryState(i.targetId),n&&fa(r.remoteStore,i.targetId),_s(r,i.targetId)}).catch(Ae)):(_s(r,i.targetId),await Mo(r.localStore,i.targetId,!0))}async function fs(e,t){const n=D(e),r=n.Pu.get(t),i=n.Tu.get(r.targetId);n.isPrimaryClient&&1===i.length&&(n.sharedClientState.removeLocalQueryTarget(r.targetId),fa(n.remoteStore,r.targetId))}async function ps(e,t){const n=D(e);try{const e=await function(e,t){const n=D(e),r=t.snapshotVersion;let i=n.Fs;return n.persistence.runTransaction("Apply remote event","readwrite-primary",e=>{const o=n.Os.newChangeBuffer({trackRemovals:!0});i=n.Fs;const a=[];t.targetChanges.forEach((o,s)=>{const l=i.get(s);if(!l)return;a.push(n.hi.removeMatchingKeys(e,o.removedDocuments,s).next(()=>n.hi.addMatchingKeys(e,o.addedDocuments,s)));let c=l.withSequenceNumber(e.currentSequenceNumber);null!==t.targetMismatches.get(s)?c=c.withResumeToken(wt.EMPTY_BYTE_STRING,be.min()).withLastLimboFreeSnapshotVersion(be.min()):o.resumeToken.approximateByteSize()>0&&(c=c.withResumeToken(o.resumeToken,r)),i=i.insert(s,c),function(e,t,n){return 0===e.resumeToken.approximateByteSize()||(t.snapshotVersion.toMicroseconds()-e.snapshotVersion.toMicroseconds()>=3e8||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0)}(l,c,o)&&a.push(n.hi.updateTargetData(e,c))});let s=er(),l=cr();if(t.documentUpdates.forEach(r=>{t.resolvedLimboDocuments.has(r)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))}),a.push(xo(e,o,t.documentUpdates).next(e=>{s=e.Ls,l=e.ks})),!r.isEqual(be.min())){const t=n.hi.getLastRemoteSnapshotVersion(e).next(t=>n.hi.setTargetsMetadata(e,e.currentSequenceNumber,r));a.push(t)}return Re.waitFor(a).next(()=>o.apply(e)).next(()=>n.localDocuments.getLocalViewOfDocuments(e,s,l)).next(()=>s)}).then(e=>(n.Fs=i,e))}(n.localStore,t);
2t.targetChanges.forEach((e,t)=>{const r=n.Eu.get(t);r&&(L(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1,22616),e.addedDocuments.size>0?r.lu=!0:e.modifiedDocuments.size>0?L(r.lu,14607):e.removedDocuments.size>0&&(L(r.lu,42227),r.lu=!1))}),await Cs(n,e,t)}catch(e){await Ae(e)}}function ms(e,t,n){const r=D(e);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){const e=[];r.Pu.forEach((n,r)=>{const i=r.view.va(t);i.snapshot&&e.push(i.snapshot)}),function(e,t){const n=D(e);n.onlineState=t;let r=!1;n.queries.forEach((e,n)=>{for(const i of n.wa)i.va(t)&&(r=!0)}),r&&Xa(n)}(r.eventManager,t),e.length&&r.hu.J_(e),r.onlineState=t,r.isPrimaryClient&&r.sharedClientState.setOnlineState(t)}}async function gs(e,t,n){const r=D(e);r.sharedClientState.updateQueryState(t,"rejected",n);const i=r.Eu.get(t),o=i&&i.key;if(o){let e=new ft(ae.comparator);e=e.insert(o,sn.newNoDocument(o,be.min()));const n=cr().add(o),i=new ii(be.min(),new Map,new ft(Y),e,n);await ps(r,i),r.du=r.du.remove(o),r.Eu.delete(t),ks(r)}else await Mo(r.localStore,t,!1).then(()=>_s(r,t,n)).catch(Ae)}async function ys(e,t){const n=D(e),r=t.batch.batchId;try{const e=await function(e,t){const n=D(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",e=>{const r=t.batch.keys(),i=n.Os.newChangeBuffer({trackRemovals:!0});return function(e,t,n,r){const i=n.batch,o=i.keys();let a=Re.resolve();return o.forEach(e=>{a=a.next(()=>r.getEntry(t,e)).next(t=>{const o=n.docVersions.get(e);L(null!==o,48541),t.version.compareTo(o)<0&&(i.applyToRemoteDocument(t,n),t.isValidDocument()&&(t.setReadTime(n.commitVersion),r.addEntry(t)))})}),a.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=cr();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);ws(n,r,null),bs(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),await Cs(n,e)}catch(e){await Ae(e)}}async function vs(e,t,n){const r=D(e);try{const e=await function(e,t){const n=D(e);return n.persistence.runTransaction("Reject batch","readwrite-primary",e=>{let r;
2return n.mutationQueue.lookupMutationBatch(e,t).next(t=>(L(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);ws(r,t,n),bs(r,t),r.sharedClientState.updateMutationState(t,"rejected",n),await Cs(r,e)}catch(n){await Ae(n)}}function bs(e,t){(e.Vu.get(t)||[]).forEach(e=>{e.resolve()}),e.Vu.delete(t)}function ws(e,t,n){const r=D(e);let i=r.Ru[r.currentUser.toKey()];if(i){const e=i.get(t);e&&(n?e.reject(n):e.resolve(),i=i.remove(t)),r.Ru[r.currentUser.toKey()]=i}}function _s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.sharedClientState.removeLocalQueryTarget(t);for(const r of e.Tu.get(t))e.Pu.delete(r),n&&e.hu.pu(r,n);e.Tu.delete(t),e.isPrimaryClient&&e.Au.zr(t).forEach(t=>{e.Au.containsKey(t)||Es(e,t)})}function Es(e,t){e.Iu.delete(t.path.canonicalString());const n=e.du.get(t);null!==n&&(fa(e.remoteStore,n),e.du=e.du.remove(t),e.Eu.delete(n),ks(e))}function Ts(e,t,n){for(const r of n)r instanceof ts?(e.Au.addReference(r.key,t),Ss(e,r)):r instanceof ns?(A(is,"Document no longer in limbo: "+r.key),e.Au.removeReference(r.key,t),e.Au.containsKey(r.key)||Es(e,r.key)):O(19791,{yu:r})}function Ss(e,t){const n=t.key,r=n.path.canonicalString();e.du.get(n)||e.Iu.has(r)||(A(is,"New document in limbo: "+n),e.Iu.add(r),ks(e))}function ks(e){for(;e.Iu.size>0&&e.du.size<e.maxConcurrentLimboResolutions;){const t=e.Iu.values().next().value;e.Iu.delete(t);const n=new ae(re.fromString(t)),r=e.mu.next();e.Eu.set(r,new as(n)),e.du=e.du.insert(n,r),ha(e.remoteStore,new Wi(zn(Un(n.path)),r,"TargetPurposeLimboResolution",Oe.ue))}}async function Cs(e,t,n){const r=D(e),i=[],o=[],a=[];r.Pu.isEmpty()||(r.Pu.forEach((e,s)=>{a.push(r.gu(s,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(s.targetId))||void 0===t?void 0:t.current;
2r.sharedClientState.updateQueryState(s.targetId,i?"current":"not-current")}if(e){i.push(e);const t=ko.Es(s.targetId,e);o.push(t)}}))}),await Promise.all(a),r.hu.J_(i),await async function(e,t){const n=D(e);try{await n.persistence.runTransaction("notifyLocalViewChanges","readwrite",e=>Re.forEach(t,t=>Re.forEach(t.Is,r=>n.persistence.referenceDelegate.addReference(e,t.targetId,r)).next(()=>Re.forEach(t.ds,r=>n.persistence.referenceDelegate.removeReference(e,t.targetId,r)))))}catch(e){if(!Ne(e))throw e;A(Ao,"Failed to update sequence numbers: "+e)}for(const r of t){const e=r.targetId;if(!r.fromCache){const t=n.Fs.get(e),r=t.snapshotVersion,i=t.withLastLimboFreeSnapshotVersion(r);n.Fs=n.Fs.insert(e,i)}}}(r.localStore,o))}async function Is(e,t){const n=D(e);if(!n.currentUser.isEqual(t)){A(is,"User change. New user:",t.toKey());const e=await No(n.localStore,t);n.currentUser=t,function(e,t){e.Vu.forEach(e=>{e.forEach(e=>{e.reject(new U(M.CANCELLED,t))})}),e.Vu.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(t,e.removedBatchIds,e.addedBatchIds),await Cs(n,e.Bs)}}function As(e,t){const n=D(e),r=n.Eu.get(t);if(r&&r.lu)return cr().add(r.key);{let e=cr();const r=n.Tu.get(t);if(!r)return e;for(const t of r){const r=n.Pu.get(t);e=e.unionWith(r.view.tu)}return e}}function Rs(e){const t=D(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=ps.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=As.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=gs.bind(null,t),t.hu.J_=$a.bind(null,t.eventManager),t.hu.pu=Ya.bind(null,t.eventManager),t}function Ps(e){const t=D(e);return t.remoteStore.remoteSyncer.applySuccessfulWrite=ys.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=vs.bind(null,t),t}class Ns{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=Zo(e.databaseInfo.databaseId),this.sharedClientState=this.bu(e),this.persistence=this.Du(e),await this.persistence.start(),this.localStore=this.vu(e),this.gcScheduler=this.Cu(e,this.localStore),this.indexBackfillerScheduler=this.Fu(e,this.localStore)}Cu(e,t){return null}Fu(e,t){return null}vu(e){return Po(this.persistence,new Io,e.initialUser,this.serializer)}Du(e){return new _o(To.Vi,this.serializer)}bu(e){return new jo}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()}}Ns.provider={build:()=>new Ns};class Os extends Ns{constructor(e){super(),this.cacheSizeBytes=e}Cu(e,t){L(this.persistence.referenceDelegate instanceof So,46915);const n=this.persistence.referenceDelegate.garbageCollector;return new oo(n,e.asyncQueue,t)}Du(e){const t=void 0!==this.cacheSizeBytes?Zi.withCacheSize(this.cacheSizeBytes):Zi.DEFAULT;return new _o(e=>So.Vi(e,t),this.serializer)}}class xs{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=>ms(this.syncEngine,e,1),this.remoteStore.remoteSyncer.handleCredentialChange=Is.bind(null,this.syncEngine),await Ma(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new Wa}createDatastore(e){const t=Zo(e.databaseInfo.databaseId),n=function(e){return new Xo(e)}(e.databaseInfo);return function(e,t,n,r){return new aa(e,t,n,r)}(e.authCredentials,e.appCheckCredentials,n,t)}createRemoteStore(e){return function(e,t,n,r,i){return new ca(e,t,n,r,i)}(this.localStore,this.datastore,e.asyncQueue,e=>ms(this.syncEngine,e,0),qo.C()?new qo:new zo)}createSyncEngine(e,t){return function(e,t,n,r,i,o,a){const s=new ss(e,t,n,r,i,o);return a&&(s.fu=!0),s}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}async terminate(){var e,t;await async function(e){const t=D(e);A(la,"RemoteStore shutting down."),t.Ia.add(5),await da(t),t.Ea.shutdown(),t.Aa.set("Unknown")}(this.remoteStore),null===(e=this.datastore)||void 0===e||e.terminate(),null===(t=this.eventManager)||void 0===t||t.terminate()}}xs.provider={build:()=>new xs};class Ls{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.xu(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.xu(this.observer.error,e):R("Uncaught Error in snapshot listener:",e.toString()))}Ou(){this.muted=!0}
2xu(e,t){setTimeout(()=>{this.muted||e(t)},0)}}const Ds="FirestoreClient";class Ms{constructor(e,t,n,r,i){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=n,this.databaseInfo=r,this.user=S.UNAUTHENTICATED,this.clientId=$.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=i,this.authCredentials.start(n,async e=>{A(Ds,"Received user=",e.uid),await this.authCredentialListener(e),this.user=e}),this.appCheckCredentials.start(n,e=>(A(Ds,"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 F;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=ja(t,"Failed to shutdown persistence");e.reject(n)}}),e.promise}}async function Us(e,t){e.asyncQueue.verifyOperationInProgress(),A(Ds,"Initializing OfflineComponentProvider");const n=e.configuration;await t.initialize(n);let r=n.initialUser;e.setCredentialChangeListener(async e=>{r.isEqual(e)||(await No(t.localStore,e),r=e)}),t.persistence.setDatabaseDeletedListener(()=>{P("Terminating Firestore due to IndexedDb database deletion"),e.terminate().then(()=>{A("Terminating Firestore due to IndexedDb database deletion completed successfully")}).catch(e=>{P("Terminating Firestore due to IndexedDb database deletion failed",e)})}),e._offlineComponents=t}async function Fs(e,t){e.asyncQueue.verifyOperationInProgress();const n=await Vs(e);A(Ds,"Initializing OnlineComponentProvider"),await t.initialize(n,e.configuration),e.setCredentialChangeListener(e=>Da(t.remoteStore,e)),e.setAppCheckTokenChangeListener((e,n)=>Da(t.remoteStore,n)),e._onlineComponents=t}async function Vs(e){if(!e._offlineComponents)if(e._uninitializedComponentsProvider){A(Ds,"Using user provided OfflineComponentProvider");try{await Us(e,e._uninitializedComponentsProvider._offline)}catch(t){const n=t;if(!function(e){return"FirebaseError"===e.name?e.code===M.FAILED_PRECONDITION||e.code===M.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&e instanceof DOMException)||22===e.code||20===e.code||11===e.code}(n))throw n;P("Error using user provided cache. Falling back to memory cache: "+n),await Us(e,new Ns)}}else A(Ds,"Using default OfflineComponentProvider"),await Us(e,new Os(void 0));return e._offlineComponents}async function js(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(A(Ds,"Using user provided OnlineComponentProvider"),await Fs(e,e._uninitializedComponentsProvider._online)):(A(Ds,"Using default OnlineComponentProvider"),await Fs(e,new xs))),e._onlineComponents}function zs(e){return js(e).then(e=>e.syncEngine)}async function Bs(e){const t=await js(e),n=t.eventManager;return n.onListen=ls.bind(null,t.syncEngine),n.onUnlisten=hs.bind(null,t.syncEngine),n.onFirstRemoteStoreListen=cs.bind(null,t.syncEngine),n.onLastRemoteStoreUnlisten=fs.bind(null,t.syncEngine),n}function qs(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new F;return e.asyncQueue.enqueueAndForget(async()=>function(e,t,n,r,i){const o=new Ls({next:s=>{o.Ou(),t.enqueueAndForget(()=>Qa(e,a));const l=s.docs.has(n);!l&&s.fromCache?i.reject(new U(M.UNAVAILABLE,"Failed to get document because the client is offline.")):l&&s.fromCache&&r&&"server"===r.source?i.reject(new U(M.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(s)},error:e=>i.reject(e)}),a=new es(Un(n.path),o,{includeMetadataChanges:!0,ka:!0});return Ka(e,a)}(await Bs(e),e.asyncQueue,t,n,r)),r.promise}function Hs(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new F;return e.asyncQueue.enqueueAndForget(async()=>function(e,t,n,r,i){const o=new Ls({next:n=>{o.Ou(),t.enqueueAndForget(()=>
2Qa(e,a)),n.fromCache&&"server"===r.source?i.reject(new U(M.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)}),a=new es(n,o,{includeMetadataChanges:!0,ka:!0});return Ka(e,a)}(await Bs(e),e.asyncQueue,t,n,r)),r.promise}function Ws(e){const t={};return void 0!==e.timeoutSeconds&&(t.timeoutSeconds=e.timeoutSeconds),t}const Gs=new Map,Ks="firestore.googleapis.com",Qs=!0;class $s{constructor(e){var t,n;if(void 0===e.host){if(void 0!==e.ssl)throw new U(M.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=Ks,this.ssl=Qs}else this.host=e.host,this.ssl=null!==(t=e.ssl)&&void 0!==t?t:Qs;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=Ji;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<no)throw new U(M.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}(function(e,t,n,r){if(!0===t&&!0===r)throw new U(M.INVALID_ARGUMENT,"".concat(e," and ").concat(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=Ws(null!==(n=e.experimentalLongPollingOptions)&&void 0!==n?n:{}),function(e){if(void 0!==e.timeoutSeconds){if(isNaN(e.timeoutSeconds))throw new U(M.INVALID_ARGUMENT,"invalid long polling timeout: ".concat(e.timeoutSeconds," (must not be NaN)"));if(e.timeoutSeconds<5)throw new U(M.INVALID_ARGUMENT,"invalid long polling timeout: ".concat(e.timeoutSeconds," (minimum allowed value is 5)"));if(e.timeoutSeconds>30)throw new U(M.INVALID_ARGUMENT,"invalid long polling timeout: ".concat(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 Ys{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 $s({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new U(M.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 U(M.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 $s(e),this._emulatorOptions=e.emulatorOptions||{},void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new j;switch(e.type){case"firstParty":return new H(e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;default:throw new U(M.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid 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=Gs.get(e);t&&(A("ComponentProvider","Removing Datastore"),Gs.delete(e),t.terminate())}(this),Promise.resolve()}}function Xs(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};var i;e=he(e,Ys);
2const o=(0,c.zJ)(t),a=e._getSettings(),s=Object.assign(Object.assign({},a),{emulatorOptions:e._getEmulatorOptions()}),l="".concat(t,":").concat(n);o&&((0,c.gE)("https://".concat(l)),(0,c.P1)("Firestore",!0)),a.host!==Ks&&a.host!==l&&P("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");const u=Object.assign(Object.assign({},a),{host:l,ssl:o,emulatorOptions:r});if(!(0,c.bD)(u,s)&&(e._setSettings(u),r.mockUserToken)){let t,n;if("string"==typeof r.mockUserToken)t=r.mockUserToken,n=S.MOCK_USER;else{t=(0,c.Fy)(r.mockUserToken,null===(i=e._app)||void 0===i?void 0:i.options.projectId);const o=r.mockUserToken.sub||r.mockUserToken.user_id;if(!o)throw new U(M.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");n=new S(o)}e._authCredentials=new z(new V(t,n))}}class Js{constructor(e,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=e}withConverter(e){return new Js(this.firestore,e,this._query)}}class Zs{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 el(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new Zs(this.firestore,e,this._key)}toJSON(){return{type:Zs._jsonSchemaVersion,referencePath:this._key.toString()}}static fromJSON(e,t,n){if(me(t,Zs._jsonSchema))return new Zs(e,n||null,new ae(re.fromString(t.referencePath)))}}Zs._jsonSchemaVersion="firestore/documentReference/1.0",Zs._jsonSchema={type:pe("string",Zs._jsonSchemaVersion),referencePath:pe("string")};class el extends Js{constructor(e,t,n){super(e,t,Un(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 Zs(this.firestore,null,new ae(e))}withConverter(e){return new el(this.firestore,e,this._path)}}function tl(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,c.Ku)(e),se("collection","path",t),e instanceof Ys){const n=re.fromString(t,...r);return ce(n),new el(e,null,n)}{if(!(e instanceof Zs||e instanceof el))throw new U(M.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const n=e._path.child(re.fromString(t,...r));return ce(n),new el(e.firestore,null,n)}}function nl(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,c.Ku)(e),1===arguments.length&&(t=$.newId()),se("doc","path",t),e instanceof Ys){const n=re.fromString(t,...r);return le(n),new Zs(e,null,new ae(n))}{if(!(e instanceof Zs||e instanceof el))throw new U(M.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const n=e._path.child(re.fromString(t,...r));return le(n),new Zs(e.firestore,e instanceof el?e.converter:null,new ae(n))}}const rl="AsyncQueue";class il{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Promise.resolve();this.Zu=[],this.Xu=!1,this.ec=[],this.tc=null,this.nc=!1,this.rc=!1,this.sc=[],this.F_=new ea(this,"async_queue_retry"),this.oc=()=>{const e=Jo();e&&A(rl,"Visibility state changed to "+e.visibilityState),this.F_.y_()},this._c=e;const t=Jo();t&&"function"==typeof t.addEventListener&&t.addEventListener("visibilitychange",this.oc)}get isShuttingDown(){return this.Xu}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.ac(),this.uc(e)}enterRestrictedMode(e){if(!this.Xu){this.Xu=!0,this.rc=e||!1;const t=Jo();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.oc)}}enqueue(e){if(this.ac(),this.Xu)return new Promise(()=>{});const t=new F;return this.uc(()=>this.Xu&&this.rc?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Zu.push(e),this.cc()))}async cc(){if(0!==this.Zu.length){try{await this.Zu[0](),this.Zu.shift(),this.F_.reset()}catch(e){if(!Ne(e))throw e;A(rl,"Operation failed with retryable error: "+e)}this.Zu.length>0&&this.F_.g_(()=>this.cc())}}uc(e){const t=this._c.then(()=>(this.nc=!0,e().catch(e=>{throw this.tc=e,this.nc=!1,R("INTERNAL UNHANDLED ERROR: ",ol(e)),e}).then(e=>(this.nc=!1,e))));return this._c=t,t}enqueueAfterDelay(e,t,n){this.ac(),this.sc.indexOf(e)>-1&&(t=0);const r=Va.createAndSchedule(this,e,t,n,e=>this.lc(e));return this.ec.push(r),r}ac(){this.tc&&O(47125,{hc:ol(this.tc)})}verifyOperationInProgress(){}async Pc(){let e;do{e=this._c,await e}while(e!==this._c)}Tc(e){for(const t of this.ec)if(t.timerId===e)return!0;return!1}Ic(e){return this.Pc().then(()=>{this.ec.sort((e,t)=>
2e.targetTimeMs-t.targetTimeMs);for(const t of this.ec)if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.Pc()})}dc(e){this.sc.push(e)}lc(e){const t=this.ec.indexOf(e);this.ec.splice(t,1)}}function ol(e){let t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}function al(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 sl extends Ys{constructor(e,t,n,r){super(e,t,n,r),this.type="firestore",this._queue=new il,this._persistenceKey=(null==r?void 0:r.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const e=this._firestoreClient.terminate();this._queue=new il(e),this._firestoreClient=void 0,await e}}}function ll(e,t){const n="object"==typeof e?e:(0,a.Sx)(),r="string"==typeof e?e:t||xt,i=(0,a.j6)(n,"firestore").getImmediate({identifier:r});if(!i._initialized){const e=(0,c.yU)("firestore");e&&Xs(i,...e)}return i}function cl(e){if(e._terminated)throw new U(M.FAILED_PRECONDITION,"The client has already been terminated.");return e._firestoreClient||ul(e),e._firestoreClient}function ul(e){var t,n,r;const i=e._freezeSettings(),o=function(e,t,n,r){return new Ot(e,t,n,r.host,r.ssl,r.experimentalForceLongPolling,r.experimentalAutoDetectLongPolling,Ws(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 Ms(e._authCredentials,e._appCheckCredentials,e._queue,o,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))}class dl{constructor(e){this._byteString=e}static fromBase64String(e){try{return new dl(wt.fromBase64String(e))}catch(e){throw new U(M.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(e){return new dl(wt.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)}toJSON(){return{type:dl._jsonSchemaVersion,bytes:this.toBase64()}}static fromJSON(e){if(me(e,dl._jsonSchema))return dl.fromBase64String(e.bytes)}}dl._jsonSchemaVersion="firestore/bytes/1.0",dl._jsonSchema={type:pe("string",dl._jsonSchemaVersion),bytes:pe("string")};class hl{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 U(M.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new oe(t)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}class fl{constructor(e){this._methodName=e}}class pl{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new U(M.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new U(M.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}_compareTo(e){return Y(this._lat,e._lat)||Y(this._long,e._long)}toJSON(){return{latitude:this._lat,longitude:this._long,type:pl._jsonSchemaVersion}}static fromJSON(e){if(me(e,pl._jsonSchema))return new pl(e.latitude,e.longitude)}}pl._jsonSchemaVersion="firestore/geoPoint/1.0",pl._jsonSchema={type:pe("string",pl._jsonSchemaVersion),latitude:pe("number"),longitude:pe("number")};class ml{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)}toJSON(){return{type:ml._jsonSchemaVersion,vectorValues:this._values}}
2static fromJSON(e){if(me(e,ml._jsonSchema)){if(Array.isArray(e.vectorValues)&&e.vectorValues.every(e=>"number"==typeof e))return new ml(e.vectorValues);throw new U(M.INVALID_ARGUMENT,"Expected 'vectorValues' field to be a number array")}}}ml._jsonSchemaVersion="firestore/vectorValue/1.0",ml._jsonSchema={type:pe("string",ml._jsonSchemaVersion),vectorValues:pe("object")};const gl=/^__.*__$/;class yl{constructor(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}toMutation(e,t){return null!==this.fieldMask?new Fr(e,this.data,this.fieldMask,t,this.fieldTransforms):new Ur(e,this.data,t,this.fieldTransforms)}}class vl{constructor(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}toMutation(e,t){return new Fr(e,this.data,this.fieldMask,t,this.fieldTransforms)}}function bl(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw O(40011,{Ec:e})}}class wl{constructor(e,t,n,r,i,o){this.settings=e,this.databaseId=t,this.serializer=n,this.ignoreUndefinedProperties=r,void 0===i&&this.Ac(),this.fieldTransforms=i||[],this.fieldMask=o||[]}get path(){return this.settings.path}get Ec(){return this.settings.Ec}Rc(e){return new wl(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Vc(e){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.Rc({path:n,mc:!1});return r.fc(e),r}gc(e){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.Rc({path:n,mc:!1});return r.Ac(),r}yc(e){return this.Rc({path:void 0,mc:!0})}wc(e){return Fl(e,this.settings.methodName,this.settings.Sc||!1,this.path,this.settings.bc)}contains(e){return void 0!==this.fieldMask.find(t=>e.isPrefixOf(t))||void 0!==this.fieldTransforms.find(t=>e.isPrefixOf(t.field))}Ac(){if(this.path)for(let e=0;e<this.path.length;e++)this.fc(this.path.get(e))}fc(e){if(0===e.length)throw this.wc("Document fields must not be empty");if(bl(this.Ec)&&gl.test(e))throw this.wc('Document fields cannot begin and end with "__"')}}class _l{constructor(e,t,n){this.databaseId=e,this.ignoreUndefinedProperties=t,this.serializer=n||Zo(e)}Dc(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new wl({Ec:e,methodName:t,bc:n,path:oe.emptyPath(),mc:!1,Sc:r},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function El(e){const t=e._freezeSettings(),n=Zo(e._databaseId);return new _l(e._databaseId,!!t.ignoreUndefinedProperties,n)}function Tl(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};const a=e.Dc(o.merge||o.mergeFields?2:0,t,n,i);Ll("Data must be an object, but it was:",a,r);const s=Ol(r,a);let l,c;if(o.merge)l=new vt(a.fieldMask),c=a.fieldTransforms;else if(o.mergeFields){const e=[];for(const r of o.mergeFields){const i=Dl(t,r,n);if(!a.contains(i))throw new U(M.INVALID_ARGUMENT,"Field '".concat(i,"' is specified in your field mask but missing from your input data."));Vl(e,i)||e.push(i)}l=new vt(e),c=a.fieldTransforms.filter(e=>l.covers(e.field))}else l=null,c=a.fieldTransforms;return new yl(new on(s),l,c)}class Sl extends fl{_toFieldTransform(e){if(2!==e.Ec)throw 1===e.Ec?e.wc("".concat(this._methodName,"() can only appear at the top level of your update data")):e.wc("".concat(this._methodName,"() cannot be used with set() unless you pass {merge:true}"));return e.fieldMask.push(e.path),null}isEqual(e){return e instanceof Sl}}function kl(e,t,n){return new wl({Ec:3,bc:t.settings.bc,methodName:e._methodName,mc:n},t.databaseId,t.serializer,t.ignoreUndefinedProperties)}class Cl extends fl{_toFieldTransform(e){return new Ir(e.path,new br)}isEqual(e){return e instanceof Cl}}class Il extends fl{constructor(e,t){super(e),this.vc=t}_toFieldTransform(e){const t=kl(this,e,!0),n=this.vc.map(e=>Nl(e,t)),r=new wr(n);return new Ir(e.path,r)}isEqual(e){return e instanceof Il&&(0,c.bD)(this.vc,e.vc)}}function Al(e,t,n,r){const i=e.Dc(1,t,n);Ll("Data must be an object, but it was:",i,r);const o=[],a=on.empty();dt(r,(e,r)=>{const s=Ul(t,e,n);r=(0,c.Ku)(r);const l=i.gc(s);if(r instanceof Sl)o.push(s);else{const e=Nl(r,l);null!=e&&(o.push(s),a.set(s,e))}});const s=new vt(o);return new vl(a,s,i.fieldTransforms)}function Rl(e,t,n,r,i,o){const a=e.Dc(1,t,n),s=[Dl(t,r,n)],l=[i];if(o.length%2!=0)throw new U(M.INVALID_ARGUMENT,"Function ".concat(t,"() needs to be called with an even number of arguments that alternate between field names and values."));for(let c=0;c<o.length;c+=2)s.push(Dl(t,o[c])),l.push(o[c+1]);const u=[],d=on.empty();for(let f=s.length-1;f>=0;--f)if(!Vl(u,s[f])){const e=s[f];let t=l[f];t=(0,c.Ku)(t);const n=a.gc(e);if(t instanceof Sl)u.push(e);else{const r=Nl(t,n);null!=r&&(u.push(e),d.set(e,r))}}const h=new vt(u);return new vl(d,h,a.fieldTransforms)}function Pl(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Nl(n,e.Dc(r?4:3,t))}function Nl(e,t){if(xl(e=(0,c.Ku)(e)))return Ll("Unsupported field value:",t,e),Ol(e,t);if(e instanceof fl)return function(e,t){if(!bl(t.Ec))throw t.wc("".concat(e._methodName,"() can only be used with update(
2) and set()"));if(!t.path)throw t.wc("".concat(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.mc&&4!==t.Ec)throw t.wc("Nested arrays are not supported");return function(e,t){const n=[];let r=0;for(const i of e){let e=Nl(i,t.yc(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,c.Ku)(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return pr(t.serializer,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){const n=ve.fromDate(e);return{timestampValue:vi(t.serializer,n)}}if(e instanceof ve){const n=new ve(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:vi(t.serializer,n)}}if(e instanceof pl)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof dl)return{bytesValue:bi(t.serializer,e._byteString)};if(e instanceof Zs){const n=t.databaseId,r=e.firestore._databaseId;if(!r.isEqual(n))throw t.wc("Document reference is for database ".concat(r.projectId,"/").concat(r.database," but should be for database ").concat(n.projectId,"/").concat(n.database));return{referenceValue:Ei(e.firestore._databaseId||t.databaseId,e._key.path)}}if(e instanceof ml)return function(e,t){return{mapValue:{fields:{[Dt]:{stringValue:Ft},[Vt]:{arrayValue:{values:e.toArray().map(e=>{if("number"!=typeof e)throw t.wc("VectorValues must only contain numeric values.");return hr(t.serializer,e)})}}}}}}(e,t);throw t.wc("Unsupported field value: ".concat(de(e)))}(e,t)}function Ol(e,t){const n={};return ht(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):dt(e,(e,r)=>{const i=Nl(r,t.Vc(e));null!=i&&(n[e]=i)}),{mapValue:{fields:n}}}function xl(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof ve||e instanceof pl||e instanceof dl||e instanceof Zs||e instanceof fl||e instanceof ml)}function Ll(e,t,n){if(!xl(n)||!ue(n)){const r=de(n);throw"an object"===r?t.wc(e+" a custom object"):t.wc(e+" "+r)}}function Dl(e,t,n){if((t=(0,c.Ku)(t))instanceof hl)return t._internalPath;if("string"==typeof t)return Ul(e,t);throw Fl("Field path arguments must be of type string or ",e,!1,void 0,n)}const Ml=new RegExp("[~\\*/\\[\\]]");function Ul(e,t,n){if(t.search(Ml)>=0)throw Fl("Invalid field path (".concat(t,"). Paths must not contain '~', '*', '/', '[', or ']'"),e,!1,void 0,n);try{return new hl(...t.split("."))._internalPath}catch(r){throw Fl("Invalid field path (".concat(t,"). Paths must not be empty, begin with '.', end with '.', or contain '..'"),e,!1,void 0,n)}}function Fl(e,t,n,r,i){const o=r&&!r.isEmpty(),a=void 0!==i;let s="Function ".concat(t,"() called with invalid data");n&&(s+=" (via `toFirestore()`)"),s+=". ";let l="";return(o||a)&&(l+=" (found",o&&(l+=" in field ".concat(r)),a&&(l+=" in document ".concat(i)),l+=")"),new U(M.INVALID_ARGUMENT,s+e+l)}function Vl(e,t){return e.some(e=>e.isEqual(t))}class jl{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 Zs(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const e=new zl(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(Bl("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class zl extends jl{data(){return super.data()}}function Bl(e,t){return"string"==typeof t?Ul(e,t):t instanceof hl?t._internalPath:t._delegate._internalPath}function ql(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new U(M.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class Hl{}class Wl extends Hl{}function Gl(e,t){let n=[];for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];t instanceof Hl&&n.push(t),n=n.concat(i),function(e){const t=e.filter(e=>e instanceof $l).length,n=e.filter(e=>e instanceof Kl).length;if(t>1||t>0&&n>0)throw new U(M.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 a of n)e=a._apply(e);return e}class Kl extends Wl{constructor(e,t,n){super(),this._field=e,this._op=t,this._value=n,this.type="where"}static _create(e,t,n){return new Kl(e,t,n)}_apply(e){const t=this._parse(e);return oc(e._query,t),new Js(e.firestore,e.converter,qn(e._query,t))}_parse(e){const t=El(e.firestore),n=function(e,t,n,r,i,o,a){let s;
2if(i.isKeyField()){if("array-contains"===o||"array-contains-any"===o)throw new U(M.INVALID_ARGUMENT,"Invalid Query. You can't perform '".concat(o,"' queries on documentId()."));if("in"===o||"not-in"===o){ic(a,o);const t=[];for(const n of a)t.push(rc(r,e,n));s={arrayValue:{values:t}}}else s=rc(r,e,a)}else"in"!==o&&"not-in"!==o&&"array-contains-any"!==o||ic(a,o),s=Pl(n,t,a,"in"===o||"not-in"===o);return pn.create(i,o,s)}(e._query,"where",t,e.firestore._databaseId,this._field,this._op,this._value);return n}}function Ql(e,t,n){const r=t,i=Bl("where",e);return Kl._create(i,r,n)}class $l extends Hl{constructor(e,t){super(),this.type=e,this._queryConstraints=t}static _create(e,t){return new $l(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]:mn.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)oc(n,i),n=qn(n,i)}(e._query,t),new Js(e.firestore,e.converter,qn(e._query,t)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return"and"===this.type?"and":"or"}}class Yl extends Wl{constructor(e,t){super(),this._field=e,this._direction=t,this.type="orderBy"}static _create(e,t){return new Yl(e,t)}_apply(e){const t=function(e,t,n){if(null!==e.startAt)throw new U(M.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==e.endAt)throw new U(M.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new dn(t,n)}(e._query,this._field,this._direction);return new Js(e.firestore,e.converter,function(e,t){const n=e.explicitOrderBy.concat([t]);return new Dn(e.path,e.collectionGroup,n,e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(e._query,t))}}function Xl(e){const t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc",n=Bl("orderBy",e);return Yl._create(n,t)}class Jl extends Wl{constructor(e,t,n){super(),this.type=e,this._limit=t,this._limitType=n}static _create(e,t,n){return new Jl(e,t,n)}_apply(e){return new Js(e.firestore,e.converter,Hn(e._query,this._limit,this._limitType))}}function Zl(e){return fe("limit",e),Jl._create("limit",e,"F")}class ec extends Wl{constructor(e,t,n){super(),this.type=e,this._docOrFields=t,this._inclusive=n}static _create(e,t,n){return new ec(e,t,n)}_apply(e){const t=nc(e,this.type,this._docOrFields,this._inclusive);return new Js(e.firestore,e.converter,function(e,t){return new Dn(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,t,e.endAt)}(e._query,t))}}function tc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ec._create("startAfter",t,!1)}function nc(e,t,n,r){if(n[0]=(0,c.Ku)(n[0]),n[0]instanceof jl)return function(e,t,n,r,i){if(!r)throw new U(M.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for ".concat(n,"()."));const o=[];for(const a of jn(e))if(a.field.isKeyField())o.push($t(t,r.key));else{const e=r.data.field(a.field);if(Rt(e))throw new U(M.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+a.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=a.field.canonicalString();throw new U(M.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '".concat(e,"' (used as the orderBy) does not exist."))}o.push(e)}return new ln(o,i)}(e._query,e.firestore._databaseId,t,n[0]._document,r);{const i=El(e.firestore);return function(e,t,n,r,i,o){const a=e.explicitOrderBy;if(i.length>a.length)throw new U(M.INVALID_ARGUMENT,"Too many arguments provided to ".concat(r,"(). The number of arguments must be less than or equal to the number of orderBy() clauses"));const s=[];for(let l=0;l<i.length;l++){const o=i[l];if(a[l].field.isKeyField()){if("string"!=typeof o)throw new U(M.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in ".concat(r,"(), but got a ").concat(typeof o));if(!Vn(e)&&-1!==o.indexOf("/"))throw new U(M.INVALID_ARGUMENT,"Invalid query. When querying a collection and ordering by documentId(), the value passed to ".concat(r,"() must be a plain document ID, but '").concat(o,"' contains a slash."));const n=e.path.child(re.fromString(o));if(!ae.isDocumentKey(n))throw new U(M.INVALID_ARGUMENT,"Invalid query. When querying a collection group and ordering by documentId(), the value passed to ".concat(r,"() must result in a valid document path, but '").concat(n,"' is not because it c
2ontains an odd number of segments."));const i=new ae(n);s.push($t(t,i))}else{const e=Pl(n,r,o);s.push(e)}}return new ln(s,o)}(e._query,e.firestore._databaseId,i,t,n,r)}}function rc(e,t,n){if("string"==typeof(n=(0,c.Ku)(n))){if(""===n)throw new U(M.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!Vn(t)&&-1!==n.indexOf("/"))throw new U(M.INVALID_ARGUMENT,"Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '".concat(n,"' contains a '/' character."));const r=t.path.child(re.fromString(n));if(!ae.isDocumentKey(r))throw new U(M.INVALID_ARGUMENT,"Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '".concat(r,"' is not because it has an odd number of segments (").concat(r.length,")."));return $t(e,new ae(r))}if(n instanceof Zs)return $t(e,n._key);throw new U(M.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ".concat(de(n),"."))}function ic(e,t){if(!Array.isArray(e)||0===e.length)throw new U(M.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '".concat(t.toString(),"' filters."))}function oc(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 U(M.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '".concat(t.op.toString(),"' filter.")):new U(M.INVALID_ARGUMENT,"Invalid query. You cannot use '".concat(t.op.toString(),"' filters with '").concat(n.toString(),"' filters."))}class ac{convertValue(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";switch(jt(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Tt(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(St(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 O(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 dt(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[Vt].arrayValue)||void 0===n?void 0:n.values)||void 0===r?void 0:r.map(e=>Tt(e.doubleValue));return new ml(i)}convertGeoPoint(e){return new pl(Tt(e.latitude),Tt(e.longitude))}convertArray(e,t){return(e.values||[]).map(e=>this.convertValue(e,t))}convertServerTimestamp(e,t){switch(t){case"previous":const n=Pt(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(Nt(e));default:return null}}convertTimestamp(e){const t=Et(e);return new ve(t.seconds,t.nanos)}convertDocumentKey(e,t){const n=re.fromString(e);L(Hi(n),9688,{name:e});const r=new Lt(n.get(1),n.get(3)),i=new ae(n.popFirst(5));return r.isEqual(t)||R("Document ".concat(i," contains a document reference within a different database (").concat(r.projectId,"/").concat(r.database,") which is not supported. It will be treated as a reference in the current database (").concat(t.projectId,"/").concat(t.database,") instead.")),i}}function sc(e,t,n){let r;return r=e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t,r}class lc{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class cc extends jl{constructor(e,t,n,r,i,o){super(e,t,n,r,o),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 uc(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(Bl("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}toJSON(){if(this.metadata.hasPendingWrites)throw new U(M.FAILED_PRECONDITION,"DocumentSnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e=this._document,t={};return t.type=cc._jsonSchemaVersion,t.bundle="",t.bundleSource="DocumentSnapshot",t.bundleName=this._key.toString(),e&&e.isValidDocument()&&e.isFoundDocument()?(this._userDataWriter.convertObjectMap(e.data.value.mapValue.fields,"previous"),t.bundle=(this._firestore,this.ref.path,"NOT SUPPORTED"),t):t}}cc._jsonSchemaVersion="firestore/documentSnapshot/1.0",cc._jsonSchema={type:pe("string",cc._jsonSchemaVersion),bundleSource:pe("string","DocumentSnapshot"),bundleName:pe("string"),bundle:pe("string")};class uc extends cc{data(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return super.data(e)}}class dc{constructor(e,t,n,r){this._firestore=e,this._userDataWriter=t,this._snapshot=r,this.metadata=new lc(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 uc(this._firestore,this._userDataWriter,n.key,n,new lc(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))})}
2docChanges(){const e=!!(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).includeMetadataChanges;if(e&&this._snapshot.excludesMetadataChanges)throw new U(M.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 uc(e._firestore,e._userDataWriter,n.doc.key,n.doc,new lc(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 uc(e._firestore,e._userDataWriter,t.doc.key,t.doc,new lc(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter);let i=-1,o=-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),o=n.indexOf(t.doc.key)),{type:hc(t.type),doc:r,oldIndex:i,newIndex:o}})}}(this,e),this._cachedChangesIncludeMetadataChanges=e),this._cachedChanges}toJSON(){if(this.metadata.hasPendingWrites)throw new U(M.FAILED_PRECONDITION,"QuerySnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e={};e.type=dc._jsonSchemaVersion,e.bundleSource="QuerySnapshot",e.bundleName=$.newId(),this._firestore._databaseId.database,this._firestore._databaseId.projectId;const t=[],n=[],r=[];return this.docs.forEach(e=>{null!==e._document&&(t.push(e._document),n.push(this._userDataWriter.convertObjectMap(e._document.data.value.mapValue.fields,"previous")),r.push(e.ref.path))}),e.bundle=(this._firestore,this.query._query,e.bundleName,"NOT SUPPORTED"),e}}function hc(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return O(61501,{type:e})}}function fc(e){e=he(e,Zs);const t=he(e.firestore,sl);return qs(cl(t),e._key).then(n=>Tc(t,e,n))}dc._jsonSchemaVersion="firestore/querySnapshot/1.0",dc._jsonSchema={type:pe("string",dc._jsonSchemaVersion),bundleSource:pe("string","QuerySnapshot"),bundleName:pe("string"),bundle:pe("string")};class pc extends ac{constructor(e){super(),this.firestore=e}convertBytes(e){return new dl(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return new Zs(this.firestore,null,t)}}function mc(e){e=he(e,Zs);const t=he(e.firestore,sl);return qs(cl(t),e._key,{source:"server"}).then(n=>Tc(t,e,n))}function gc(e){e=he(e,Js);const t=he(e.firestore,sl),n=cl(t),r=new pc(t);return ql(e._query),Hs(n,e._query).then(n=>new dc(t,r,e,n))}function yc(e,t,n){e=he(e,Zs);const r=he(e.firestore,sl),i=sc(e.converter,t,n);return Ec(r,[Tl(El(r),"setDoc",e._key,i,null!==e.converter,n).toMutation(e._key,Rr.none())])}function vc(e,t,n){e=he(e,Zs);const r=he(e.firestore,sl),i=El(r);let o;for(var a=arguments.length,s=new Array(a>3?a-3:0),l=3;l<a;l++)s[l-3]=arguments[l];return o="string"==typeof(t=(0,c.Ku)(t))||t instanceof hl?Rl(i,"updateDoc",e._key,t,n,s):Al(i,"updateDoc",e._key,t),Ec(r,[o.toMutation(e._key,Rr.exists(!0))])}function bc(e){return Ec(he(e.firestore,sl),[new Br(e._key,Rr.none())])}function wc(e,t){const n=he(e.firestore,sl),r=nl(e),i=sc(e.converter,t);return Ec(n,[Tl(El(e.firestore),"addDoc",r._key,i,null!==e.converter,{}).toMutation(r._key,Rr.exists(!1))]).then(()=>r)}function _c(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,o,a;e=(0,c.Ku)(e);let s={includeMetadataChanges:!1,source:"default"},l=0;"object"!=typeof n[l]||al(n[l])||(s=n[l++]);const u={includeMetadataChanges:s.includeMetadataChanges,source:s.source};if(al(n[l])){const e=n[l];n[l]=null===(i=e.next)||void 0===i?void 0:i.bind(e),n[l+1]=null===(o=e.error)||void 0===o?void 0:o.bind(e),n[l+2]=null===(a=e.complete)||void 0===a?void 0:a.bind(e)}let d,h,f;if(e instanceof Zs)h=he(e.firestore,sl),f=Un(e._key.path),d={next:t=>{n[l]&&n[l](Tc(h,e,t))},error:n[l+1],complete:n[l+2]};else{const t=he(e,Js);h=he(t.firestore,sl),f=t._query;const r=new pc(h);d={next:e=>{n[l]&&n[l](new dc(h,r,t,e))},error:n[l+1],complete:n[l+2]},ql(e._query)}return function(e,t,n,r){const i=new Ls(r),o=new es(t,i,n);return e.asyncQueue.enqueueAndForget(async()=>Ka(await Bs(e),o)),()=>{i.Ou(),e.asyncQueue.enqueueAndForget(async()=>Qa(await Bs(e),o))}}(cl(h),f,u,d)}function Ec(e,t){return function(e,t){const n=new F;return e.asyncQueue.enqueueAndForget(async()=>async function(e,t,n){const r=Ps(e);try{const e=await function(e,t){const n=D(e),r=ve.now(),i=t.reduce((e,t)=>
2e.add(t.key),cr());let o,a;return n.persistence.runTransaction("Locally write mutations","readwrite",e=>{let s=er(),l=cr();return n.Os.getEntries(e,i).next(e=>{s=e,s.forEach((e,t)=>{t.isValidDocument()||(l=l.add(e))})}).next(()=>n.localDocuments.getOverlayedDocuments(e,s)).next(i=>{o=i;const a=[];for(const e of t){const t=Dr(e,o.get(e.key).overlayedDocument);null!=t&&a.push(new Fr(e.key,t,an(t.value.mapValue),Rr.exists(!0)))}return n.mutationQueue.addMutationBatch(e,r,a,t)}).next(t=>{a=t;const r=t.applyToLocalDocumentSet(o,l);return n.documentOverlayCache.saveOverlays(e,t.batchId,r)})}).then(()=>({batchId:a.batchId,changes:rr(o)}))}(r.localStore,t);r.sharedClientState.addPendingMutation(e.batchId),function(e,t,n){let r=e.Ru[e.currentUser.toKey()];r||(r=new ft(Y)),r=r.insert(t,n),e.Ru[e.currentUser.toKey()]=r}(r,e.batchId,n),await Cs(r,e.changes),await Ca(r.remoteStore)}catch(e){const t=ja(e,"Failed to persist write");n.reject(t)}}(await zs(e),t,n)),n.promise}(cl(e),t)}function Tc(e,t,n){const r=n.docs.get(t._key),i=new pc(e);return new cc(e,i,t._key,r,new lc(n.hasPendingWrites,n.fromCache),t.converter)}class Sc{constructor(e,t){this._firestore=e,this._commitHandler=t,this._mutations=[],this._committed=!1,this._dataReader=El(e)}set(e,t,n){this._verifyNotCommitted();const r=kc(e,this._firestore),i=sc(r.converter,t,n),o=Tl(this._dataReader,"WriteBatch.set",r._key,i,null!==r.converter,n);return this._mutations.push(o.toMutation(r._key,Rr.none())),this}update(e,t,n){this._verifyNotCommitted();const r=kc(e,this._firestore);let i;for(var o=arguments.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];return i="string"==typeof(t=(0,c.Ku)(t))||t instanceof hl?Rl(this._dataReader,"WriteBatch.update",r._key,t,n,a):Al(this._dataReader,"WriteBatch.update",r._key,t),this._mutations.push(i.toMutation(r._key,Rr.exists(!0))),this}delete(e){this._verifyNotCommitted();const t=kc(e,this._firestore);return this._mutations=this._mutations.concat(new Br(t._key,Rr.none())),this}commit(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()}_verifyNotCommitted(){if(this._committed)throw new U(M.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")}}function kc(e,t){if((e=(0,c.Ku)(e)).firestore!==t)throw new U(M.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e}function Cc(){return new Sl("deleteField")}function Ic(){return new Cl("serverTimestamp")}function Ac(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Il("arrayUnion",t)}function Rc(e){return cl(e=he(e,sl)),new Sc(e,t=>Ec(e,t))}new WeakMap;!function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];!function(e){k=e}(a.MF),(0,a.om)(new s.uA("firestore",(e,n)=>{let r=n.instanceIdentifier,i=n.options;const o=e.getProvider("app").getImmediate(),a=new sl(new B(e.getProvider("auth-internal")),new G(o,e.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new U(M.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Lt(e.options.projectId,t)}(o,r),o);return i=Object.assign({useFetchStreams:t},i),a._setSettings(i),a},"PUBLIC").setMultipleInstances(!0)),(0,a.KO)(E,T,e),(0,a.KO)(E,T,"esm2017")}()},52395(e,t,n){n.d(t,{f5:()=>k,getFunctions:()=>S,httpsCallable:()=>C});var r=n(80052),i=n(51529),o=n(88812);function a(e,t){const n={};for(const r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r]));return n}function s(e){if(null==e)return null;if(e instanceof Number&&(e=e.valueOf()),"number"===typeof e&&isFinite(e))return e;if(!0===e||!1===e)return e;if("[object String]"===Object.prototype.toString.call(e))return e;if(e instanceof Date)return e.toISOString();if(Array.isArray(e))return e.map(e=>s(e));if("function"===typeof e||"object"===typeof e)return a(e,e=>s(e));throw new Error("Data cannot be encoded in JSON: "+e)}function l(e){if(null==e)return e;if(e["@type"])switch(e["@type"]){case"type.googleapis.com/google.protobuf.Int64Value":case"type.googleapis.com/google.protobuf.UInt64Value":{const t=Number(e.value);if(isNaN(t))throw new Error("Data cannot be decoded from JSON: "+e);return t}default:throw new Error("Data cannot be decoded from JSON: "+e)}return Array.isArray(e)?e.map(e=>l(e)):"function"===typeof e||"object"===typeof e?a(e,e=>l(e)):e}const c="functions",u={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
2ED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class d extends i.g{constructor(e,t,n){super("".concat(c,"/").concat(e),t||""),this.details=n,Object.setPrototypeOf(this,d.prototype)}}function h(e,t){let n,r=function(e){if(e>=200&&e<300)return"ok";switch(e){case 0:case 500:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}(e),i=r;try{const e=t&&t.error;if(e){const t=e.status;if("string"===typeof t){if(!u[t])return new d("internal","internal");r=u[t],i=t}const o=e.message;"string"===typeof o&&(i=o),n=e.details,void 0!==n&&(n=l(n))}}catch(o){}return"ok"===r?null:new d(r,i,n)}class f{constructor(e,t,n,i){this.app=e,this.auth=null,this.messaging=null,this.appCheck=null,this.serverAppAppCheckToken=null,(0,r.xZ)(e)&&e.settings.appCheckToken&&(this.serverAppAppCheckToken=e.settings.appCheckToken),this.auth=t.getImmediate({optional:!0}),this.messaging=n.getImmediate({optional:!0}),this.auth||t.get().then(e=>this.auth=e,()=>{}),this.messaging||n.get().then(e=>this.messaging=e,()=>{}),this.appCheck||null===i||void 0===i||i.get().then(e=>this.appCheck=e,()=>{})}async getAuthToken(){if(this.auth)try{const e=await this.auth.getToken();return null===e||void 0===e?void 0:e.accessToken}catch(e){return}}async getMessagingToken(){if(this.messaging&&"Notification"in self&&"granted"===Notification.permission)try{return await this.messaging.getToken()}catch(e){return}}async getAppCheckToken(e){if(this.serverAppAppCheckToken)return this.serverAppAppCheckToken;if(this.appCheck){const t=e?await this.appCheck.getLimitedUseToken():await this.appCheck.getToken();return t.error?null:t.token}return null}async getContext(e){return{authToken:await this.getAuthToken(),messagingToken:await this.getMessagingToken(),appCheckToken:await this.getAppCheckToken(e)}}}const p="us-central1",m=/^data: (.*?)(?:\n|$)/;class g{constructor(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:p,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){return fetch(...arguments)};this.app=e,this.fetchImpl=o,this.emulatorOrigin=null,this.contextProvider=new f(e,t,n,r),this.cancelAllRequests=new Promise(e=>{this.deleteService=()=>Promise.resolve(e())});try{const e=new URL(i);this.customDomain=e.origin+("/"===e.pathname?"":e.pathname),this.region=p}catch(a){this.customDomain=null,this.region=i}}_delete(){return this.deleteService()}_url(e){const t=this.app.options.projectId;if(null!==this.emulatorOrigin){const n=this.emulatorOrigin;return"".concat(n,"/").concat(t,"/").concat(this.region,"/").concat(e)}return null!==this.customDomain?"".concat(this.customDomain,"/").concat(e):"https://".concat(this.region,"-").concat(t,".cloudfunctions.net/").concat(e)}}function y(e,t,n){const r=r=>function(e,t,n,r){const i=e._url(t);return w(e,i,n,r)}(e,t,r,n||{});return r.stream=(n,r)=>function(e,t,n,r){const i=e._url(t);return _(e,i,n,r||{})}(e,t,n,r),r}async function v(e,t,n,r){let i;n["Content-Type"]="application/json";try{i=await r(e,{method:"POST",body:JSON.stringify(t),headers:n})}catch(a){return{status:0,json:null}}let o=null;try{o=await i.json()}catch(a){}return{status:i.status,json:o}}async function b(e,t){const n={},r=await e.contextProvider.getContext(t.limitedUseAppCheckTokens);return r.authToken&&(n.Authorization="Bearer "+r.authToken),r.messagingToken&&(n["Firebase-Instance-ID-Token"]=r.messagingToken),null!==r.appCheckToken&&(n["X-Firebase-AppCheck"]=r.appCheckToken),n}async function w(e,t,n,r){const i={data:n=s(n)},o=await b(e,r),a=function(e){let t=null;return{promise:new Promise((n,r)=>{t=setTimeout(()=>{r(new d("deadline-exceeded","deadline-exceeded"))},e)}),cancel:()=>{t&&clearTimeout(t)}}}(r.timeout||7e4),c=await Promise.race([v(t,i,o,e.fetchImpl),a.promise,e.cancelAllRequests]);if(a.cancel(),!c)throw new d("cancelled","Firebase Functions instance was deleted.");const u=h(c.status,c.json);if(u)throw u;
2if(!c.json)throw new d("internal","Response is not valid JSON object.");let f=c.json.data;if("undefined"===typeof f&&(f=c.json.result),"undefined"===typeof f)throw new d("internal","Response is missing data field.");return{data:l(f)}}async function _(e,t,n,r){var i;const o={data:n=s(n)},a=await b(e,r);let c,u,f;a["Content-Type"]="application/json",a.Accept="text/event-stream";try{c=await e.fetchImpl(t,{method:"POST",body:JSON.stringify(o),headers:a,signal:null===r||void 0===r?void 0:r.signal})}catch(y){if(y instanceof Error&&"AbortError"===y.name){const e=new d("cancelled","Request was cancelled.");return{data:Promise.reject(e),stream:{[Symbol.asyncIterator]:()=>({next:()=>Promise.reject(e)})}}}const e=h(0,null);return{data:Promise.reject(e),stream:{[Symbol.asyncIterator]:()=>({next:()=>Promise.reject(e)})}}}const p=new Promise((e,t)=>{u=e,f=t});null===(i=null===r||void 0===r?void 0:r.signal)||void 0===i||i.addEventListener("abort",()=>{const e=new d("cancelled","Request was cancelled.");f(e)});const g=function(e,t,n,r){const i=(e,r)=>{const i=e.match(m);if(!i)return;const o=i[1];try{const e=JSON.parse(o);if("result"in e)return void t(l(e.result));if("message"in e)return void r.enqueue(l(e.message));if("error"in e){const t=h(0,e);return r.error(t),void n(t)}}catch(a){if(a instanceof d)return r.error(a),void n(a)}},o=new TextDecoder;return new ReadableStream({start(t){let a="";return s();async function s(){if(null===r||void 0===r?void 0:r.aborted){const e=new d("cancelled","Request was cancelled");return t.error(e),n(e),Promise.resolve()}try{const l=await e.read(),c=l.value;if(l.done)return a.trim()&&i(a.trim(),t),void t.close();if(null===r||void 0===r?void 0:r.aborted){const r=new d("cancelled","Request was cancelled");return t.error(r),n(r),void await e.cancel()}a+=o.decode(c,{stream:!0});const u=a.split("\n");a=u.pop()||"";for(const e of u)e.trim()&&i(e.trim(),t);return s()}catch(l){const e=l instanceof d?l:h(0,null);t.error(e),n(e)}}},cancel:()=>e.cancel()})}(c.body.getReader(),u,f,null===r||void 0===r?void 0:r.signal);return{stream:{[Symbol.asyncIterator](){const e=g.getReader();return{async next(){const t=await e.read();return{value:t.value,done:t.done}},return:async()=>(await e.cancel(),{done:!0,value:void 0})}}},data:p}}const E="@firebase/functions",T="0.12.9";function S(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,r.Sx)(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;const n=(0,r.j6)((0,i.Ku)(e),c).getImmediate({identifier:t}),o=(0,i.yU)("functions");return o&&k(n,...o),n}function k(e,t,n){!function(e,t,n){const r=(0,i.zJ)(t);e.emulatorOrigin="http".concat(r?"s":"","://").concat(t,":").concat(n),r&&((0,i.gE)(e.emulatorOrigin),(0,i.P1)("Functions",!0))}((0,i.Ku)(e),t,n)}function C(e,t,n){return y((0,i.Ku)(e),t,n)}var I;(0,r.om)(new o.uA(c,(e,t)=>{let n=t.instanceIdentifier;const r=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),o=e.getProvider("messaging-internal"),a=e.getProvider("app-check-internal");return new g(r,i,o,a,n)},"PUBLIC").setMultipleInstances(!0)),(0,r.KO)(E,T,I),(0,r.KO)(E,T,"esm2017")},58147(e,t,n){n.d(t,{XR:()=>Oe,qW:()=>De,q5:()=>Ae,qk:()=>Ne,c7:()=>Le,KR:()=>xe,D:()=>Re,ls:()=>Pe});var r=n(5544),i=n(80052),o=n(51529),a=n(88812);const s="firebasestorage.googleapis.com",l="storageBucket";class c extends o.g{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;super(h(e),"Firebase Storage: ".concat(t," (").concat(h(e),")")),this.status_=n,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,c.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return h(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message="".concat(this._baseMessage,"\n").concat(this.customData.serverResponse):this.message=this._baseMessage}}var u,d;function h(e){return"storage/"+e}function f(){return new c(u.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function p(){return new c(u.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function m(){return new c(u.CANCELED,"User canceled the upload/download.")}function g(){return new c(u.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function y(e){return new c(u.INVALID_ARGUMENT,e)}function v(){return new c(u.APP_DELETED,"The Firebase app was deleted.")}function b(e,t){return new c(u.INVALID_FORMAT,"String does not match format '"+e+"': "+t)}function w(e){throw new c(u.INTERNAL_ERROR,"Internal error: "+e)}!function(e){e.UNKNOWN="unknown",e.OBJECT_NOT_FOUND="object-not-found",e.BUCKET_NOT_FOUND="bucket-not-found",e.PROJECT_NOT_FOUND="project-not-found",e.QUOTA_EXCEEDED="quota-exceeded",e.UNAUTHENTICATED="unauthenticated",e.UNAUTHORIZED="unauthorized",e.UNAUTHORIZED_APP="unauthorized-app",e.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",e.INVALID_CHECKSUM="invalid-checksum",e.CANCELED="canceled",e.INVALID_EVENT_NAME="invalid-event-name",e.INVALID_URL="invalid-url",e.INVALID_DEFAULT_BUCKET="invalid-default-bucket",e.NO_DEFAULT_BUCKET="no-default-bucket",e.CA
2NNOT_SLICE_BLOB="cannot-slice-blob",e.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",e.NO_DOWNLOAD_URL="no-download-url",e.INVALID_ARGUMENT="invalid-argument",e.INVALID_ARGUMENT_COUNT="invalid-argument-count",e.APP_DELETED="app-deleted",e.INVALID_ROOT_OPERATION="invalid-root-operation",e.INVALID_FORMAT="invalid-format",e.INTERNAL_ERROR="internal-error",e.UNSUPPORTED_ENVIRONMENT="unsupported-environment"}(u||(u={}));class _{constructor(e,t){this.bucket=e,this.path_=t}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,t){let n;try{n=_.makeFromUrl(e,t)}catch(i){return new _(e,"")}if(""===n.path)return n;throw r=e,new c(u.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+r+"'.");var r}static makeFromUrl(e,t){let n=null;const r="([A-Za-z0-9.\\-_]+)";const i=new RegExp("^gs://"+r+"(/(.*))?$","i");function o(e){e.path_=decodeURIComponent(e.path)}const a=t.replace(/[.]/g,"\\."),l=[{regex:i,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:new RegExp("^https?://".concat(a,"/").concat("v[A-Za-z0-9_]+","/b/").concat(r,"/o").concat("(/([^?#]*).*)?$"),"i"),indices:{bucket:1,path:3},postModify:o},{regex:new RegExp("^https?://".concat(t===s?"(?:storage.googleapis.com|storage.cloud.google.com)":t,"/").concat(r,"/").concat("([^?#]*)"),"i"),indices:{bucket:1,path:2},postModify:o}];for(let s=0;s<l.length;s++){const t=l[s],r=t.regex.exec(e);if(r){const e=r[t.indices.bucket];let i=r[t.indices.path];i||(i=""),n=new _(e,i),t.postModify(n);break}}if(null==n)throw function(e){return new c(u.INVALID_URL,"Invalid URL '"+e+"'.")}(e);return n}}class E{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(){}}function T(e){return"string"===typeof e||e instanceof String}function S(e){return k()&&e instanceof Blob}function k(){return"undefined"!==typeof Blob}function C(e,t,n,r){if(r<t)throw y("Invalid value for '".concat(e,"'. Expected ").concat(t," or greater."));if(r>n)throw y("Invalid value for '".concat(e,"'. Expected ").concat(n," or less."))}function I(e,t,n){let r=t;return null==n&&(r="https://".concat(t)),"".concat(n,"://").concat(r,"/v0").concat(e)}function A(e){const t=encodeURIComponent;let n="?";for(const r in e)if(e.hasOwnProperty(r)){n=n+(t(r)+"="+t(e[r]))+"&"}return n=n.slice(0,-1),n}function R(e,t){const n=e>=500&&e<600,r=-1!==[408,429].indexOf(e),i=-1!==t.indexOf(e);return n||r||i}!function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"}(d||(d={}));class P{constructor(e,t,n,r,i,o,a,s,l,c,u){let d=!(arguments.length>11&&void 0!==arguments[11])||arguments[11],h=arguments.length>12&&void 0!==arguments[12]&&arguments[12];this.url_=e,this.method_=t,this.headers_=n,this.body_=r,this.successCodes_=i,this.additionalRetryCodes_=o,this.callback_=a,this.errorCallback_=s,this.timeout_=l,this.progressCallback_=c,this.connectionFactory_=u,this.retry=d,this.isUsingEmulator=h,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((e,t)=>{this.resolve_=e,this.reject_=t,this.start_()})}start_(){const e=(e,t)=>{if(t)return void e(!1,new N(!1,null,!0));const n=this.connectionFactory_();this.pendingConnection_=n;const r=e=>{const t=e.loaded,n=e.lengthComputable?e.total:-1;null!==this.progressCallback_&&this.progressCallback_(t,n)};null!==this.progressCallback_&&n.addUploadProgressListener(r),n.send(this.url_,this.method_,this.isUsingEmulator,this.body_,this.headers_).then(()=>{null!==this.progressCallback_&&n.removeUploadProgressListener(r),this.pendingConnection_=null;const t=n.getErrorCode()===d.NO_ERROR,i=n.getStatus();if(!t||R(i,this.additionalRetryCodes_)&&this.retry){const t=n.getErrorCode()===d.ABORT;return void e(!1,new N(!1,null,t))}const o=-1!==this.successCodes_.indexOf(i);e(!0,new N(o,n))})},t=(e,t)=>{const n=this.resolve_,r=this.reject_,i=t.connection;if(t.wasSuccessCode)try{const e=this.callback_(i,i.getResponse());void 0!==e?n(e):n()}catch(o){r(o)}else if(null!==i){const e=f();e.serverResponse=i.getErrorText(),this.errorCallback_?r(this.errorCallback_(i,e)):r(e)}else if(t.canceled){r(this.appDelete_?v():m())}else{r(p())}};this.canceled_?t(0,new N(!1,null,!0)):this.backoffId_=function(e,t,n){let r=1,i=null,o=null,a=!1,s=0;function l(){return 2===s}let c=!1;function u(){if(!c){c=!0;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.apply(null,n)}}function d(t){i=setTimeout(()=>{i=null,e(f,l())},t)}function h(){o&&clearTimeout(o)}function f(e){if(c)return void h();for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(e)return h(),void u.call(null,e,...n);if(l()||a)return h(),void u.call(null,e,...n);let o;r<64&&(r*=2),1===s?(s=2,o=0):o=1e3*(r+Math.random()),d(o)}let p=!1;function m(e){p||(p=!0,h(),c||(null!==i?(e||(s=2),clearTimeout(i),d(0)):e||(s=1)))}return d(0),o=setTimeout(()=>{a=!0,m(!0)},n),m}(e,t,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}class N{constructor(e,t,n){this.wasSuccessCode=e,this.connection=t,this.canceled=!!n}}function O(){return"undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof WebKitBlobBuilder?Web
2KitBlobBuilder:void 0}function x(){const e=O();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(void 0!==e){const t=new e;for(let e=0;e<n.length;e++)t.append(n[e]);return t.getBlob()}if(k())return new Blob(n);throw new c(u.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to support creating Blobs")}function L(e){if("undefined"===typeof atob)throw t="base-64",new c(u.UNSUPPORTED_ENVIRONMENT,"".concat(t," is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information."));var t;return atob(e)}const D="raw",M="base64",U="base64url",F="data_url";class V{constructor(e,t){this.data=e,this.contentType=t||null}}function j(e,t){switch(e){case D:return new V(z(t));case M:case U:return new V(B(e,t));case F:return new V(function(e){const t=new q(e);return t.base64?B(M,t.rest):function(e){let t;try{t=decodeURIComponent(e)}catch(n){throw b(F,"Malformed data URL.")}return z(t)}(t.rest)}(t),new q(t).contentType)}throw f()}function z(e){const t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r<=127)t.push(r);else if(r<=2047)t.push(192|r>>6,128|63&r);else if(55296===(64512&r)){if(n<e.length-1&&56320===(64512&e.charCodeAt(n+1))){r=65536|(1023&r)<<10|1023&e.charCodeAt(++n),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r)}else t.push(239,191,189)}else 56320===(64512&r)?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(t)}function B(e,t){switch(e){case M:{const n=-1!==t.indexOf("-"),r=-1!==t.indexOf("_");if(n||r){throw b(e,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?")}break}case U:{const n=-1!==t.indexOf("+"),r=-1!==t.indexOf("/");if(n||r){throw b(e,"Invalid character '"+(n?"+":"/")+"' found: is it base64 encoded?")}t=t.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=L(t)}catch(i){if(i.message.includes("polyfill"))throw i;throw b(e,"Invalid character found")}const r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return r}class q{constructor(e){this.base64=!1,this.contentType=null;const t=e.match(/^data:([^,]+)?,/);if(null===t)throw b(F,"Must be formatted 'data:[<mediatype>][;base64],<data>");const n=t[1]||null;null!=n&&(this.base64=function(e,t){if(!(e.length>=t.length))return!1;return e.substring(e.length-t.length)===t}(n,";base64"),this.contentType=this.base64?n.substring(0,n.length-7):n),this.rest=e.substring(e.indexOf(",")+1)}}class H{constructor(e,t){let n=0,r="";S(e)?(this.data_=e,n=e.size,r=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),n=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),n=e.length),this.size_=n,this.type_=r}size(){return this.size_}type(){return this.type_}slice(e,t){if(S(this.data_)){const n=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.mozSlice?e.mozSlice(t,n):e.slice?e.slice(t,n):null}(this.data_,e,t);return null===n?null:new H(n)}{const n=new Uint8Array(this.data_.buffer,e,t-e);return new H(n,!0)}}static getBlob(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(k()){const e=t.map(e=>e instanceof H?e.data_:e);return new H(x.apply(null,e))}{const e=t.map(e=>T(e)?j(D,e).data:e.data_);let n=0;e.forEach(e=>{n+=e.byteLength});const r=new Uint8Array(n);let i=0;return e.forEach(e=>{for(let t=0;t<e.length;t++)r[i++]=e[t]}),new H(r,!0)}}uploadData(){return this.data_}}function W(e){let t;try{t=JSON.parse(e)}catch(r){return null}return"object"!==typeof(n=t)||Array.isArray(n)?null:t;var n}function G(e){const t=e.lastIndexOf("/",e.length-2);return-1===t?e:e.slice(t+1)}function K(e,t){return t}class Q{constructor(e,t,n,r){this.server=e,this.local=t||e,this.writable=!!n,this.xform=r||K}}let $=null;function Y(){if($)return $;const e=[];e.push(new Q("bucket")),e.push(new Q("generation")),e.push(new Q("metageneration")),e.push(new Q("name","fullPath",!0));const t=new Q("name");t.xform=function(e,t){return function(e){return!T(e)||e.length<2?e:G(e)}(t)},e.push(t);const n=new Q("size");return n.xform=function(e,t){return void 0!==t?Number(t):t},e.push(n),e.push(new Q("timeCreated")),e.push(new Q("updated")),e.push(new Q("md5Hash",null,!0)),e.push(new Q("cacheControl",null,!0)),e.push(new Q("contentDisposition",null,!0)),e.push(new Q("contentEncoding",null,!0)),e.push(new Q("contentLanguage",null,!0)),e.push(new Q("contentType",null,!0)),e.push(new Q("metadata","customMetadata",!0)),$=e,$}
2function X(e,t,n){const r={type:"file"},i=n.length;for(let o=0;o<i;o++){const e=n[o];r[e.local]=e.xform(r,t[e.server])}return function(e,t){Object.defineProperty(e,"ref",{get:function(){const n=e.bucket,r=e.fullPath,i=new _(n,r);return t._makeStorageReference(i)}})}(r,e),r}function J(e,t,n){const r=W(t);if(null===r)return null;return X(e,r,n)}function Z(e,t){const n={},r=t.length;for(let i=0;i<r;i++){const r=t[i];r.writable&&(n[r.server]=e[r.local])}return JSON.stringify(n)}class ee{constructor(e,t,n,r){this.url=e,this.method=t,this.handler=n,this.timeout=r,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}function te(e){if(!e)throw f()}function ne(e,t){return function(n,r){const i=J(e,r,t);return te(null!==i),i}}function re(e,t){return function(n,r){const i=J(e,r,t);return te(null!==i),function(e,t,n,r){const i=W(t);if(null===i)return null;if(!T(i.downloadTokens))return null;const o=i.downloadTokens;if(0===o.length)return null;const a=encodeURIComponent;return o.split(",").map(t=>{const i=e.bucket,o=e.fullPath;return I("/b/"+a(i)+"/o/"+a(o),n,r)+A({alt:"media",token:t})})[0]}(i,r,e.host,e._protocol)}}function ie(e){return function(t,n){let r;var i,o;return 401===t.getStatus()?r=t.getErrorText().includes("Firebase App Check token is invalid")?new c(u.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project."):new c(u.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(o=e.bucket,r=new c(u.QUOTA_EXCEEDED,"Quota for bucket '"+o+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(i=e.path,r=new c(u.UNAUTHORIZED,"User does not have permission to access '"+i+"'.")):r=n,r.status=t.getStatus(),r.serverResponse=n.serverResponse,r}}function oe(e){const t=ie(e);return function(n,r){let i=t(n,r);var o;return 404===n.getStatus()&&(o=e.path,i=new c(u.OBJECT_NOT_FOUND,"Object '"+o+"' does not exist.")),i.serverResponse=r.serverResponse,i}}function ae(e,t,n){const r=I(t.fullServerUrl(),e.host,e._protocol)+"?alt=media",i=e.maxOperationRetryTime,o=new ee(r,"GET",(e,t)=>t,i);return o.errorHandler=oe(t),void 0!==n&&(o.headers.Range="bytes=0-".concat(n),o.successCodes=[200,206]),o}function se(e,t,n){const r=Object.assign({},n);return r.fullPath=e.path,r.size=t.size(),r.contentType||(r.contentType=function(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}(null,t)),r}function le(e,t,n,r,i){const o=t.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"};const s=function(){let e="";for(let t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();a["Content-Type"]="multipart/related; boundary="+s;const l=se(t,r,i),c="--"+s+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+Z(l,n)+"\r\n--"+s+"\r\nContent-Type: "+l.contentType+"\r\n\r\n",u="\r\n--"+s+"--",d=H.getBlob(c,r,u);if(null===d)throw g();const h={name:l.fullPath},f=I(o,e.host,e._protocol),p=e.maxUploadRetryTime,m=new ee(f,"POST",ne(e,n),p);return m.urlParams=h,m.headers=a,m.body=d.uploadData(),m.errorHandler=ie(t),m}class ce{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=d.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=d.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=d.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,t,n,r,i){if(this.sent_)throw w("cannot .send() more than once");if((0,o.zJ)(e)&&n&&(this.xhr_.withCredentials=!0),this.sent_=!0,this.xhr_.open(t,e,!0),void 0!==i)for(const o in i)i.hasOwnProperty(o)&&this.xhr_.setRequestHeader(o,i[o].toString());return void 0!==r?this.xhr_.send(r):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw w("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw w("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return-1}}
2getResponse(){if(!this.sent_)throw w("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw w("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",e)}}class ue extends ce{initXhr(){this.xhr_.responseType="text"}}function de(){return new ue}class he extends ce{initXhr(){this.xhr_.responseType="arraybuffer"}}function fe(){return new he}class pe extends ce{initXhr(){this.xhr_.responseType="blob"}}function me(){return new pe}class ge{constructor(e,t){this._service=e,this._location=t instanceof _?t:_.makeFromUrl(t,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,t){return new ge(e,t)}get root(){const e=new _(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return G(this._location.path)}get storage(){return this._service}get parent(){const e=function(e){if(0===e.length)return null;const t=e.lastIndexOf("/");return-1===t?"":e.slice(0,t)}(this._location.path);if(null===e)return null;const t=new _(this._location.bucket,e);return new ge(this._service,t)}_throwIfRoot(e){if(""===this._location.path)throw function(e){return new c(u.INVALID_ROOT_OPERATION,"The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}(e)}}function ye(e,t,n){e._throwIfRoot("uploadBytes");const r=le(e.storage,e._location,Y(),new H(t,!0),n);return e.storage.makeRequestWithTokens(r,de).then(t=>({metadata:t,ref:e}))}function ve(e){e._throwIfRoot("getDownloadURL");const t=function(e,t,n){const r=I(t.fullServerUrl(),e.host,e._protocol),i=e.maxOperationRetryTime,o=new ee(r,"GET",re(e,n),i);return o.errorHandler=oe(t),o}(e.storage,e._location,Y());return e.storage.makeRequestWithTokens(t,de).then(e=>{if(null===e)throw new c(u.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return e})}function be(e){e._throwIfRoot("deleteObject");const t=function(e,t){const n=I(t.fullServerUrl(),e.host,e._protocol),r=e.maxOperationRetryTime,i=new ee(n,"DELETE",function(e,t){},r);return i.successCodes=[200,204],i.errorHandler=oe(t),i}(e.storage,e._location);return e.storage.makeRequestWithTokens(t,de)}function we(e,t){const n=function(e,t){const n=t.split("/").filter(e=>e.length>0).join("/");return 0===e.length?n:e+"/"+n}(e._location.path,t),r=new _(e._location.bucket,n);return new ge(e.storage,r)}function _e(e,t){if(e instanceof Se){const n=e;if(null==n._bucket)throw new c(u.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+l+"' property when initializing the app?");const r=new ge(n,n._bucket);return null!=t?_e(r,t):r}return void 0!==t?we(e,t):e}function Ee(e,t){if(t&&/^[A-Za-z]+:\/\//.test(t)){if(e instanceof Se)return new ge(e,t);throw y("To use ref(service, url), the first argument must be a Storage instance.")}return _e(e,t)}function Te(e,t){const n=null===t||void 0===t?void 0:t[l];return null==n?null:_.makeFromBucketSpec(n,e)}class Se{constructor(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];this.app=e,this._authProvider=t,this._appCheckProvider=n,this._url=r,this._firebaseVersion=i,this._isUsingEmulator=o,this._bucket=null,this._host=s,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,this._bucket=null!=r?_.makeFromBucketSpec(r,this._host):Te(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,null!=this._url?this._bucket=_.makeFromBucketSpec(this._url,e):this._bucket=Te(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){C("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){C("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const e=this._authProvider.getImmediate({optional:!0});if(e){const t=await e.getToken();if(null!==t)return t.accessToken}return null}async _getAppCheckToken(){if((0,i.xZ)(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const e=this._appCheckProvider.getImmediate({optional:!0});if(e){return(await e.getToken()).token}return null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEac
2h(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new ge(this,e)}_makeRequest(e,t,n,r){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this._deleted)return new E(v());{const o=function(e,t,n,r,i,o){let a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];const l=A(e.urlParams),c=e.url+l,u=Object.assign({},e.headers);return function(e,t){t&&(e["X-Firebase-GMPID"]=t)}(u,t),function(e,t){null!==t&&t.length>0&&(e.Authorization="Firebase "+t)}(u,n),function(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(null!==t&&void 0!==t?t:"AppManager")}(u,o),function(e,t){null!==t&&(e["X-Firebase-AppCheck"]=t)}(u,r),new P(c,e.method,u,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i,a,s)}(e,this._appId,n,r,t,this._firebaseVersion,i,this._isUsingEmulator);return this._requests.add(o),o.getPromise().then(()=>this._requests.delete(o),()=>this._requests.delete(o)),o}}async makeRequestWithTokens(e,t){const n=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]),i=(0,r.A)(n,2),o=i[0],a=i[1];return this._makeRequest(e,t,o,a).getPromise()}}const ke="@firebase/storage",Ce="0.13.14",Ie="storage";function Ae(e,t){return function(e,t){e._throwIfRoot("getBytes");const n=ae(e.storage,e._location,t);return e.storage.makeRequestWithTokens(n,fe).then(e=>void 0!==t?e.slice(0,t):e)}(e=(0,o.Ku)(e),t)}function Re(e,t,n){return ye(e=(0,o.Ku)(e),t,n)}function Pe(e,t,n,r){return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D,r=arguments.length>3?arguments[3]:void 0;e._throwIfRoot("uploadString");const i=j(n,t),o=Object.assign({},r);return null==o.contentType&&null!=i.contentType&&(o.contentType=i.contentType),ye(e,i.data,o)}(e=(0,o.Ku)(e),t,n,r)}function Ne(e){return ve(e=(0,o.Ku)(e))}function Oe(e){return be(e=(0,o.Ku)(e))}function xe(e,t){return Ee(e=(0,o.Ku)(e),t)}function Le(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.Sx)(),t=arguments.length>1?arguments[1]:void 0;e=(0,o.Ku)(e);const n=(0,i.j6)(e,Ie).getImmediate({identifier:t}),r=(0,o.yU)("storage");return r&&function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};!function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e.host="".concat(t,":").concat(n);const i=(0,o.zJ)(t);i&&((0,o.gE)("https://".concat(e.host,"/b")),(0,o.P1)("Storage",!0)),e._isUsingEmulator=!0,e._protocol=i?"https":"http";const a=r.mockUserToken;a&&(e._overrideAuthToken="string"===typeof a?a:(0,o.Fy)(a,e.app.options.projectId))}(e,t,n,r)}(n,...r),n}function De(e,t){return function(e,t){e._throwIfRoot("getBlob");const n=ae(e.storage,e._location,t);return e.storage.makeRequestWithTokens(n,me).then(e=>void 0!==t?e.slice(0,t):e)}(e=(0,o.Ku)(e),t)}function Me(e,t){let n=t.instanceIdentifier;const r=e.getProvider("app").getImmediate(),o=e.getProvider("auth-internal"),a=e.getProvider("app-check-internal");return new Se(r,o,a,n,i.MF)}(0,i.om)(new a.uA(Ie,Me,"PUBLIC").setMultipleInstances(!0)),(0,i.KO)(ke,Ce,""),(0,i.KO)(ke,Ce,"esm2017")},72799(e,t,n){n.d(t,{P2:()=>g});var r=n(89379);let i,o;const a=new WeakMap,s=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap;let d={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return s.get(e);if("objectStoreNames"===t)return e.objectStoreNames||l.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return p(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function h(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(o||(o=[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(m(this),n),p(a.get(this))}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return p(e.apply(m(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 o=e.call(m(this),t,...r);return l.set(o,t.sort?t.sort():[t]),p(o)}}function f(e){return"function"===typeof e?h(e):(e instanceof IDBTransaction&&function(e){if(s.has(e))return;const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{t(),r()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)});s.set(e,t)}(e),t=e,(i||(i=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(e=>t instanceof e)?new Proxy(e,d):e);var t}function p(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{t(p(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",o)});return t.then(t=>{t instanceof IDBCursor&&a.set(t,e)}).catch(()=>{}),u.set(t,e),t}(e);if(c.has(e))return c.get(e);const t=f(e);return t!==e&&(c.set(e,t),u.set(t,e)),t}const m=e=>u.get(e);function g(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.blocked,i=n.upgrade,o=n.blocking,a=n.terminated;const s=indexedDB.open(e,t),l=p(s);return i&&s.addEventListener("upgradeneeded",e=>{i(p(s.result),e.oldVersion,e.newVersion,p(s.transaction),e)}),r&&s.addEventListener("blocked",e=>r(e.oldVersion,e.newVersion,e)),l.then(e=>{a&&e.addEventListener("close",()=>a()),o&&e.addEventListener("versionchange",e=>o(e.oldVersion,e.newVersion,e))}).catch(()=>{}),l}const y=["get","getKey","getAll","getAllKeys","count"],v=["put","add","delete","clear"],b=new Map;function w(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(b.get(t))return b.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=v.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!y.includes(n))return;const o=async function(e){const t=this.transaction(e,i?"readwrite":"readonly");let o=t.store;for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];
2return r&&(o=o.index(s.shift())),(await Promise.all([o[n](...s),i&&t.done]))[0]};return b.set(t,o),o}d=(e=>(0,r.A)((0,r.A)({},e),{},{get:(t,n,r)=>w(t,n)||e.get(t,n,r),has:(t,n)=>!!w(t,n)||e.has(t,n)}))(d)},92339(e,t,n){function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,{l$:()=>we,Ay:()=>_e});var i=n(5544),o=n(89379),a=n(65043);let s={data:""},l=e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||s},c=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,u=/\/\*[^]*?\*\/|  +/g,d=/\n+/g,h=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+a+";":r+="f"==o[1]?h(a,o):o+"{"+h(a,"k"==o[1]?"":t)+"}":"object"==typeof a?r+=h(a,t?t.replace(/([^,])+/g,e=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=a&&(o="-"==o[1]?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=h.p?h.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},f={},p=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+p(e[n]);return t}return e},m=(e,t,n,r,i)=>{let o=p(e),a=f[o]||(f[o]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(o));if(!f[a]){let t=o!==e?e:(e=>{let t,n,r=[{}];for(;t=c.exec(e.replace(u,""));)t[4]?r.shift():t[3]?(n=t[3].replace(d," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(d," ").trim();return r[0]})(e);f[a]=h(i?{["@keyframes "+a]:t}:t,n?"":"."+a)}let s=n&&f.g;return n&&(f.g=f[a]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(f[a],t,r,s),a};function g(e){let t=this||{},n=e.call?e(t.p):e;return m(n.unshift?n.raw?((e,t,n)=>e.reduce((e,r,i)=>{let o=t[i];if(o&&o.call){let e=o(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":h(e,""):!1===e?"":e}return e+r+(null==o?"":o)},""))(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,l(t.target),t.g,t.o,t.k)}g.bind({g:1});let y,v,b,w=g.bind({k:1});function _(e,t){let n=this||{};return function(){let r=arguments;function i(o,a){let s=Object.assign({},o),l=s.className||i.className;n.p=Object.assign({theme:v&&v()},s),n.o=/go\d/.test(l),s.className=g.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),b&&c[0]&&b(s),y(c,s)}return t?t(i):i}}var E,T,S,k,C,I,A,R,P,N,O,x,L,D,M,U,F=(e,t)=>(e=>"function"==typeof e)(e)?e(t):e,V=(()=>{let e=0;return()=>(++e).toString()})(),j=(()=>{let e;return()=>{if(void 0===e&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),z="default",B=(e,t)=>{let n=e.settings.toastLimit;switch(t.type){case 0:return(0,o.A)((0,o.A)({},e),{},{toasts:[t.toast,...e.toasts].slice(0,n)});case 1:return(0,o.A)((0,o.A)({},e),{},{toasts:e.toasts.map(e=>e.id===t.toast.id?(0,o.A)((0,o.A)({},e),t.toast):e)});case 2:let r=t.toast;return B(e,{type:e.toasts.find(e=>e.id===r.id)?1:0,toast:r});case 3:let i=t.toastId;return(0,o.A)((0,o.A)({},e),{},{toasts:e.toasts.map(e=>e.id===i||void 0===i?(0,o.A)((0,o.A)({},e),{},{dismissed:!0,visible:!1}):e)});case 4:return void 0===t.toastId?(0,o.A)((0,o.A)({},e),{},{toasts:[]}):(0,o.A)((0,o.A)({},e),{},{toasts:e.toasts.filter(e=>e.id!==t.toastId)});case 5:return(0,o.A)((0,o.A)({},e),{},{pausedAt:t.time});case 6:let a=t.time-(e.pausedAt||0);return(0,o.A)((0,o.A)({},e),{},{pausedAt:void 0,toasts:e.toasts.map(e=>(0,o.A)((0,o.A)({},e),{},{pauseDuration:e.pauseDuration+a}))})}},q=[],H={toasts:[],pausedAt:void 0,settings:{toastLimit:20}},W={},G=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z;W[t]=B(W[t]||H,e),q.forEach(e=>{let n=(0,i.A)(e,2),r=n[0],o=n[1];r===t&&o(W[t])})},K=e=>Object.keys(W).forEach(t=>G(e,t)),Q=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z;return t=>{G(t,e)}},$={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Y=e=>(t,n)=>{let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"blank",n=arguments.length>2?arguments[2]:void 0;return(0,o.A)((0,o.A)({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0},n),{},{id:(null==n?void 0:n.id)||V()})}(t,e,n);return Q(r.toasterId||(e=>Object.keys(W).find(t=>W[t].toasts.some(t=>t.id===e)))(r.id))({type:2,toast:r}),r.id},X=(e,t)=>Y("blank")(e,t);X.error=Y("error"),X.success=Y("success"),X.loading=Y("loading"),X.custom=Y("custom"),X.dism
2iss=(e,t)=>{let n={type:3,toastId:e};t?Q(t)(n):K(n)},X.dismissAll=e=>X.dismiss(void 0,e),X.remove=(e,t)=>{let n={type:4,toastId:e};t?Q(t)(n):K(n)},X.removeAll=e=>X.remove(void 0,e),X.promise=(e,t,n)=>{let r=X.loading(t.loading,(0,o.A)((0,o.A)({},n),null==n?void 0:n.loading));return"function"==typeof e&&(e=e()),e.then(e=>{let i=t.success?F(t.success,e):void 0;return i?X.success(i,(0,o.A)((0,o.A)({id:r},n),null==n?void 0:n.success)):X.dismiss(r),e}).catch(e=>{let i=t.error?F(t.error,e):void 0;i?X.error(i,(0,o.A)((0,o.A)({id:r},n),null==n?void 0:n.error)):X.dismiss(r)}),e};var J=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z,n=(0,a.useState)(W[t]||H),r=(0,i.A)(n,2),s=r[0],l=r[1],c=(0,a.useRef)(W[t]);(0,a.useEffect)(()=>(c.current!==W[t]&&l(W[t]),q.push([t,l]),()=>{let e=q.findIndex(e=>(0,i.A)(e,1)[0]===t);e>-1&&q.splice(e,1)}),[t]);let u=s.toasts.map(t=>{var n,r,i;return(0,o.A)((0,o.A)((0,o.A)((0,o.A)({},e),e[t.type]),t),{},{removeDelay:t.removeDelay||(null==(n=e[t.type])?void 0:n.removeDelay)||(null==e?void 0:e.removeDelay),duration:t.duration||(null==(r=e[t.type])?void 0:r.duration)||(null==e?void 0:e.duration)||$[t.type],style:(0,o.A)((0,o.A)((0,o.A)({},e.style),null==(i=e[t.type])?void 0:i.style),t.style)})});return(0,o.A)((0,o.A)({},s),{},{toasts:u})}(e,t),r=n.toasts,s=n.pausedAt,l=(0,a.useRef)(new Map).current,c=(0,a.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(l.has(e))return;let n=setTimeout(()=>{l.delete(e),u({type:4,toastId:e})},t);l.set(e,n)},[]);(0,a.useEffect)(()=>{if(s)return;let e=Date.now(),n=r.map(n=>{if(n.duration===1/0)return;let r=(n.duration||0)+n.pauseDuration-(e-n.createdAt);if(!(r<0))return setTimeout(()=>X.dismiss(n.id,t),r);n.visible&&X.dismiss(n.id)});return()=>{n.forEach(e=>e&&clearTimeout(e))}},[r,s,t]);let u=(0,a.useCallback)(Q(t),[t]),d=(0,a.useCallback)(()=>{u({type:5,time:Date.now()})},[u]),h=(0,a.useCallback)((e,t)=>{u({type:1,toast:{id:e,height:t}})},[u]),f=(0,a.useCallback)(()=>{s&&u({type:6,time:Date.now()})},[s,u]),p=(0,a.useCallback)((e,t)=>{let n=t||{},i=n.reverseOrder,o=void 0!==i&&i,a=n.gutter,s=void 0===a?8:a,l=n.defaultPosition,c=r.filter(t=>(t.position||l)===(e.position||l)&&t.height),u=c.findIndex(t=>t.id===e.id),d=c.filter((e,t)=>t<u&&e.visible).length;return c.filter(e=>e.visible).slice(...o?[d+1]:[0,d]).reduce((e,t)=>e+(t.height||0)+s,0)},[r]);return(0,a.useEffect)(()=>{r.forEach(e=>{if(e.dismissed)c(e.id,e.removeDelay);else{let t=l.get(e.id);t&&(clearTimeout(t),l.delete(e.id))}})},[r,c]),{toasts:r,handlers:{updateHeight:h,startPause:d,endPause:f,calculateOffset:p}}},Z=w(E||(E=r(["\nfrom {\n  transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n  opacity: 1;\n}"]))),ee=w(T||(T=r(["\nfrom {\n  transform: scale(0);\n  opacity: 0;\n}\nto {\n  transform: scale(1);\n  opacity: 1;\n}"]))),te=w(S||(S=r(["\nfrom {\n  transform: scale(0) rotate(90deg);\n\topacity: 0;\n}\nto {\n  transform: scale(1) rotate(90deg);\n\topacity: 1;\n}"]))),ne=_("div")(k||(k=r(["\n  width: 20px;\n  opacity: 0;\n  height: 20px;\n  border-radius: 10px;\n  background: ",";\n  position: relative;\n  transform: rotate(45deg);\n\n  animation: "," 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n    forwards;\n  animation-delay: 100ms;\n\n  &:after,\n  &:before {\n    content: '';\n    animation: "," 0.15s ease-out forwards;\n    animation-delay: 150ms;\n    position: absolute;\n    border-radius: 3px;\n    opacity: 0;\n    background: ",";\n    bottom: 9px;\n    left: 4px;\n    height: 2px;\n    width: 12px;\n  }\n\n  &:before {\n    animation: "," 0.15s ease-out forwards;\n    animation-delay: 180ms;\n    transform: rotate(90deg);\n  }\n"])),e=>e.primary||"#ff4b4b",Z,ee,e=>e.secondary||"#fff",te),re=w(C||(C=r(["\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n"]))),ie=_("div")(I||(I=r(["\n  width: 12px;\n  height: 12px;\n  box-sizing: border-box;\n  border: 2px solid;\n  border-radius: 100%;\n  border-color: ",";\n  border-right-color: ",";\n  animation: "," 1s linear infinite;\n"])),e=>e.secondary||"#e0e0e0",e=>e.primary||"#616161",re),oe=w(A||(A=r(["\nfrom {\n  transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n  transform: scale(1) rotate(45deg);\n\topacity: 1;\n}"]))),ae=w(R||(R=r(["\n0% {\n\theight: 0;\n\twidth: 0;\n\topacity: 0;\n}\n40% {\n  height: 0;\n\twidth: 6px;\n\topacity: 1;\n}\n100% {\n  opacity: 1;\n  height: 10px;\n}
2"]))),se=_("div")(P||(P=r(["\n  width: 20px;\n  opacity: 0;\n  height: 20px;\n  border-radius: 10px;\n  background: ",";\n  position: relative;\n  transform: rotate(45deg);\n\n  animation: "," 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n    forwards;\n  animation-delay: 100ms;\n  &:after {\n    content: '';\n    box-sizing: border-box;\n    animation: "," 0.2s ease-out forwards;\n    opacity: 0;\n    animation-delay: 200ms;\n    position: absolute;\n    border-right: 2px solid;\n    border-bottom: 2px solid;\n    border-color: ",";\n    bottom: 6px;\n    left: 6px;\n    height: 10px;\n    width: 6px;\n  }\n"])),e=>e.primary||"#61d345",oe,ae,e=>e.secondary||"#fff"),le=_("div")(N||(N=r(["\n  position: absolute;\n"]))),ce=_("div")(O||(O=r(["\n  position: relative;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  min-width: 20px;\n  min-height: 20px;\n"]))),ue=w(x||(x=r(["\nfrom {\n  transform: scale(0.6);\n  opacity: 0.4;\n}\nto {\n  transform: scale(1);\n  opacity: 1;\n}"]))),de=_("div")(L||(L=r(["\n  position: relative;\n  transform: scale(0.6);\n  opacity: 0.4;\n  min-width: 20px;\n  animation: "," 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n    forwards;\n"])),ue),he=e=>{let t=e.toast,n=t.icon,r=t.type,i=t.iconTheme;return void 0!==n?"string"==typeof n?a.createElement(de,null,n):n:"blank"===r?null:a.createElement(ce,null,a.createElement(ie,(0,o.A)({},i)),"loading"!==r&&a.createElement(le,null,"error"===r?a.createElement(ne,(0,o.A)({},i)):a.createElement(se,(0,o.A)({},i))))},fe=e=>"\n0% {transform: translate3d(0,".concat(-200*e,"%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n"),pe=e=>"\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,".concat(-150*e,"%,-1px) scale(.6); opacity:0;}\n"),me=_("div")(D||(D=r(["\n  display: flex;\n  align-items: center;\n  background: #fff;\n  color: #363636;\n  line-height: 1.3;\n  will-change: transform;\n  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);\n  max-width: 350px;\n  pointer-events: auto;\n  padding: 8px 10px;\n  border-radius: 8px;\n"]))),ge=_("div")(M||(M=r(["\n  display: flex;\n  justify-content: center;\n  margin: 4px 10px;\n  color: inherit;\n  flex: 1 1 auto;\n  white-space: pre-line;\n"]))),ye=a.memo(e=>{let t=e.toast,n=e.position,r=e.style,s=e.children,l=t.height?((e,t)=>{let n=e.includes("top")?1:-1,r=j()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[fe(n),pe(n)],o=(0,i.A)(r,2),a=o[0],s=o[1];return{animation:t?"".concat(w(a)," 0.35s cubic-bezier(.21,1.02,.73,1) forwards"):"".concat(w(s)," 0.4s forwards cubic-bezier(.06,.71,.55,1)")}})(t.position||n||"top-center",t.visible):{opacity:0},c=a.createElement(he,{toast:t}),u=a.createElement(ge,(0,o.A)({},t.ariaProps),F(t.message,t));return a.createElement(me,{className:t.className,style:(0,o.A)((0,o.A)((0,o.A)({},l),r),t.style)},"function"==typeof s?s({icon:c,message:u}):a.createElement(a.Fragment,null,c,u))});!function(e,t,n,r){h.p=t,y=e,v=n,b=r}(a.createElement);var ve=e=>{let t=e.id,n=e.className,r=e.style,i=e.onHeightUpdate,o=e.children,s=a.useCallback(e=>{if(e){let n=()=>{let n=e.getBoundingClientRect().height;i(t,n)};n(),new MutationObserver(n).observe(e,{subtree:!0,childList:!0,characterData:!0})}},[t,i]);return a.createElement("div",{ref:s,className:n,style:r},o)},be=g(U||(U=r(["\n  z-index: 9999;\n  > * {\n    pointer-events: auto;\n  }\n"]))),we=e=>{let t=e.reverseOrder,n=e.position,r=void 0===n?"top-center":n,i=e.toastOptions,s=e.gutter,l=e.children,c=e.toasterId,u=e.containerStyle,d=e.containerClassName,h=J(i,c),f=h.toasts,p=h.handlers;return a.createElement("div",{"data-rht-toaster":c||"",style:(0,o.A)({position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none"},u),className:d,onMouseEnter:p.startPause,onMouseLeave:p.endPause},f.map(e=>{let n=e.position||r,i=((e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return(0,o.A)((0,o.A)({left:0,right:0,display:"flex",position:"absolute",transition:j()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:"translateY(".concat(t*(n?1:-1),"px)")},r),i)})(n,p.calculateOffset(e,{reverseOrder:t,gutter:s,defaultPosition:r}));return a.createElement(ve,{id:e.id,key:e.id,onHeightUpdate:p.updateHeight,className:e.visible?be:"",style:i},"custom"===e.type?F(e.message,e):l?l(e):a.createElement(ye,{toast:e,position:n}))}))},_e=X},47874(e,t,n){var r;n.d(t,{BV:()=>qe,C5:()=>Ve,Kd:()=>Tt,N_:()=>kt,Zp:()=>ve,g:()=>we,ok:()=>Pt,qh:()=>ze,sv:()=>je,zy:()=>me});var i=n(53986),o=n(43145),a=n(5763),s=n(5544),l=n(89379),c=n(65043);const u=["sri"],d=["page"],h=["page","matches"],f=["onClick","discover","prefetch","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition","unstable_defaultShouldRevalidate"],p=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],m=["discover","fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition","unstable_defaultShouldRevalidate"];var g="popstate";function y(){return S(function(e,t){let n=e.location;return _("",{pathname:n.pathname,search:n.search,hash:n.hash},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"===typeof t?t:E(t)},null,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function v(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function b(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function w(e,t){return{usr:e.state,key:e.key,idx:t}}function _(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;return(0,l.A)((0,l.A)({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?T(t):t),{},{state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)})}function E(e){let t=e.pathname,n=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,o=e.hash,a=void 0===o?"":o;return i&&"?"!==i&&(n+="?"===i.charAt(0)?i:"?"+i),a&&"#"!==a&&(n+="#"===a.charAt(0)?a:"#"+a),n}function T(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 S(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.window,o=void 0===i?document.defaultView:i,a=r.v5Compat,s=void 0!==a&&a,c=o.history,u="POP",d=null,h=f();function f(){return(c.state||{idx:null}).idx}function p(){u="POP";let e=f(),t=null==e?null:e-h;h=e,d&&d({action:u,location:y.location,delta:t})}function m(e){return k(e)}null==h&&(h=0,c.replaceState((0,l.A)((0,l.A)({},c.state),{},{idx:h}),""));let y={get action(){return u},get location(){return e(o,c)},listen(e){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(g,p),d=e,()=>{o.removeEventListener(g,p),d=null}},createHref:e=>t(o,e),createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){u="PUSH";let r=_(y.location,e,t);n&&n(r,e),h=f()+1;let i=w(r,h),a=y.createHref(r);try{c.pushState(i,"",a)}catch(l){if(l instanceof DOMException&&"DataCloneError"===l.name)throw l;o.location.assign(a)}s&&d&&d({action:u,location:y.location,delta:1})},replace:function(e,t){u="REPLACE";let r=_(y.location,e,t);n&&n(r,e),h=f();let i=w(r,h),o=y.createHref(r);c.replaceState(i,"",o),s&&d&&d({action:u,location:y.location,delta:0})},go:e=>c.go(e)};return y}function k(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="http://localhost";"undefined"!==typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),v(n,"No window.location.(origin|href) available to create URL");let r="string"===typeof e?e:E(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}new WeakMap;function C(e,t){return I(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",!1)}function I(e,t,n,r){let i=U(("string"===typeof t?T(t):t).pathname||"/",n);if(null==i)return null;let o=A(e);!function(e){e.sort((e,t)=>
2e.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)))}(o);let a=null;for(let s=0;null==a&&s<o.length;++s){let e=M(i);a=x(o[s],e,r)}return a}function A(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=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=function(e,o){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,s=arguments.length>3?arguments[3]:void 0,l={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(r)&&a)return;v(l.relativePath.startsWith(r),'Absolute route path "'.concat(l.relativePath,'" nested under path "').concat(r,'" is not valid. An absolute child route path must start with the combined path of all its parent routes.')),l.relativePath=l.relativePath.slice(r.length)}let c=W([r,l.relativePath]),u=n.concat(l);e.children&&e.children.length>0&&(v(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'.concat(c,'".')),A(e.children,t,u,c,a)),(null!=e.path||e.index)&&t.push({path:c,score:O(c,e.index),routesMeta:u})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!==(n=e.path)&&void 0!==n&&n.includes("?"))for(let r of R(e.path))o(e,t,!0,r);else o(e,t)}),t}function R(e){let t=e.split("/");if(0===t.length)return[];let n=(0,a.A)(t),r=n[0],i=(0,o.A)(n).slice(1),s=r.endsWith("?"),l=r.replace(/\?$/,"");if(0===i.length)return s?[l,""]:[l];let c=R(i.join("/")),u=[];return u.push(...c.map(e=>""===e?l:[l,e].join("/"))),s&&u.push(...c),u.map(t=>e.startsWith("/")&&""===t?"/":t)}var P=/^:[\w-]+$/,N=e=>"*"===e;function O(e,t){let n=e.split("/"),r=n.length;return n.some(N)&&(r+=-2),t&&(r+=2),n.filter(e=>!N(e)).reduce((e,t)=>e+(P.test(t)?3:""===t?1:10),r)}function x(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.routesMeta,i={},o="/",a=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,c="/"===o?t:t.slice(o.length)||"/",u=L({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=L({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;
2Object.assign(i,u.params),a.push({params:i,pathname:W([o,u.pathname]),pathnameBase:G(W([o,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(o=W([o,u.pathnameBase]))}return a}function L(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let n=D(e.path,e.caseSensitive,e.end),r=(0,s.A)(n,2),i=r[0],o=r[1],a=t.match(i);if(!a)return null;let l=a[0],c=l.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:o.reduce((e,t,n)=>{let r=t.paramName,i=t.isOptional;if("*"===r){let e=u[n]||"";c=l.slice(0,l.length-e.length).replace(/(.)\/+$/,"$1")}const o=u[n];return e[r]=i&&!o?void 0:(o||"").replace(/%2F/g,"/"),e},{}),pathname:l,pathnameBase:c,pattern:e}}function D(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];b("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'.concat(e,'" will be treated as if it were "').concat(e.replace(/\*$/,"/*"),'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "').concat(e.replace(/\*$/,"/*"),'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function M(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return b(!1,'The URL path "'.concat(e,'" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (').concat(t,").")),e}}function U(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)||"/"}var F=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,V=e=>F.test(e);function j(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("/"):"/"}function z(e,t,n,r){return"Cannot include a '".concat(e,"' character in a manually specified `to.").concat(t,"` field [").concat(JSON.stringify(r),"].  Please separate it out to the `to.").concat(n,'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.')}function B(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function q(e){let t=B(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function H(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"string"===typeof e?r=T(e):(r=(0,l.A)({},e),v(!r.pathname||!r.pathname.includes("?"),z("?","pathname","search",r)),v(!r.pathname||!r.pathname.includes("#"),z("#","pathname","hash",r)),v(!r.search||!r.search.includes("#"),z("#","search","hash",r)));let o,a=""===e||""===r.pathname,s=a?"/":r.pathname;if(null==s)o=n;else{let e=t.length-1;if(!i&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}o=e>=0?t[e]:"/"}let c=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",r="string"===typeof e?T(e):e,i=r.pathname,o=r.search,a=void 0===o?"":o,s=r.hash,l=void 0===s?"":s;if(i)if(V(i))t=i;else{if(i.includes("//")){let e=i;i=i.replace(/\/\/+/g,"/"),b(!1,"Pathnames cannot have embedded double slashes - normalizing ".concat(e," -> ").concat(i))}t=i.startsWith("/")?j(i.substring(1),"/"):j(i,n)}else t=n;return{pathname:t,search:K(a),hash:Q(l)}}(r,o),u=s&&"/"!==s&&s.endsWith("/"),d=(a||"."===s)&&n.endsWith("/");return c.pathname.endsWith("/")||!u&&!d||(c.pathname+="/"),c}var W=e=>e.join("/").replace(/\/\/+/g,"/"),G=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),K=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Q=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var $=class{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Y(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}function X(e){return e.map(e=>
2e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var J="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;function Z(e,t){let n=e;if("string"!==typeof n||!F.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(J)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),o=U(r.pathname,t);r.origin===e.origin&&null!=o?n=o+r.search+r.hash:i=!0}catch(o){b(!1,'<Link to="'.concat(n,'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.'))}return{absoluteURL:r,isExternal:i,to:n}}Symbol("Uninstrumented");Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ee=["POST","PUT","PATCH","DELETE"],te=(new Set(ee),["GET",...ee]);new Set(te),Symbol("ResetLoaderData");var ne=c.createContext(null);ne.displayName="DataRouter";var re=c.createContext(null);re.displayName="DataRouterState";var ie=c.createContext(!1);function oe(){return c.useContext(ie)}var ae=c.createContext({isTransitioning:!1});ae.displayName="ViewTransition";var se=c.createContext(new Map);se.displayName="Fetchers";var le=c.createContext(null);le.displayName="Await";var ce=c.createContext(null);ce.displayName="Navigation";var ue=c.createContext(null);ue.displayName="Location";var de=c.createContext({outlet:null,matches:[],isDataRoute:!1});de.displayName="Route";var he=c.createContext(null);he.displayName="RouteError";var fe="REACT_ROUTER_ERROR";function pe(){return null!=c.useContext(ue)}function me(){return v(pe(),"useLocation() may be used only in the context of a <Router> component."),c.useContext(ue).location}var ge="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ye(e){c.useContext(ce).static||c.useLayoutEffect(e)}function ve(){return c.useContext(de).isDataRoute?function(){let e=Ne("useNavigate").router,t=xe("useNavigate"),n=c.useRef(!1);ye(()=>{n.current=!0});let r=c.useCallback(async function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(n.current,ge),n.current&&("number"===typeof r?await e.navigate(r):await e.navigate(r,(0,l.A)({fromRouteId:t},i)))},[e,t]);return r}():function(){v(pe(),"useNavigate() may be used only in the context of a <Router> component.");let e=c.useContext(ne),t=c.useContext(ce),n=t.basename,r=t.navigator,i=c.useContext(de).matches,o=me().pathname,a=JSON.stringify(q(i)),s=c.useRef(!1);ye(()=>{s.current=!0});let l=c.useCallback(function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(b(s.current,ge),!s.current)return;if("number"===typeof t)return void r.go(t);let l=H(t,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==n&&(l.pathname="/"===l.pathname?n:W([n,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)},[n,r,a,o,e]);return l}()}var be=c.createContext(null);function we(){let e=c.useContext(de).matches,t=e[e.length-1];return t?t.params:{}}function _e(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).relative,n=c.useContext(de).matches,r=me().pathname,i=JSON.stringify(q(n));return c.useMemo(()=>H(e,JSON.parse(i),r,"path"===t),[e,i,r,t])}function Ee(e,t,n,r,i){v(pe(),"useRoutes() may be used only in the context of a <Router> component.");let o=c.useContext(ce).navigator,a=c.useContext(de).matches,s=a[a.length-1],u=s?s.params:{},d=s?s.pathname:"/",h=s?s.pathnameBase:"/",f=s&&s.route;{let e=f&&f.path||"";Me(d,!f||e.endsWith("*")||e.endsWith("*?"),'You rendered descendant <Routes> (or called `useRoutes()`) at "'.concat(d,'" (under <Route path="').concat(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="').concat(e,'"> to <Route path="').concat("/"===e?"*":"".concat(e,"/*"),'">.'))}let p,m=me();if(t){var g;let e="string"===typeof t?T(t):t;v("/"===h||(null===(g=e.pathname)||void 0===g?void 0:g.startsWith(h)),'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 "'.concat(h,'" but pathname "').concat(e.pathname,'" was given in the `location` prop.')),p=e}else p=m;let y=p.pathname||"/",w=y;if("/"!==h){let e=h.replace(/^\//,"").split("/");w="/"+y.replace(/^\//,"").split("/").slice(e.length).join("/")}let _=C(e,{pathname:w});b(f||null!=_,'No routes matched location "'.concat(p.pathname).concat(p.search).concat(p.hash,'" ')),b(null==_||void 0!==_[_.length-1].route.element||void 0!==_[_.length-1].route.Component||void 0!==_[_.length-1].route.lazy,'Matched leaf route at location "'.concat(p.pathname).concat(p.search).concat(p.hash,'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));let E=Re(_&&_.map(e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:W([h,o.encodeLocation?o.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?h:W([h,o.encodeLocation?o.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),a,n,r,i);return t&&E?c.createElement(ue.Provider,{value:{location:(0,l.A)({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:"POP"}},E):E}function Te(){let e=Le(),t=Y(e)?"".concat(e.status," ").concat(e.statusText):e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=c.createElement(c.Fragment,null,c.createElement("p",null,"\ud83d\udcbf Hey developer \ud83d\udc4b"),c.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",c.createElement("code",{style:o},"ErrorBoundary")," or"," ",c.createElement("code",{style:o},"errorElement")," prop on your route.")),c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application 
2Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),n?c.createElement("pre",{style:i},n):null,a)}var Se=c.createElement(Te,null),ke=class extends c.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){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"===typeof e&&e&&"digest"in e&&"string"===typeof e.digest){const t=function(e){if(e.startsWith("".concat(fe,":").concat("ROUTE_ERROR_RESPONSE",":{")))try{let t=JSON.parse(e.slice(40));if("object"===typeof t&&t&&"number"===typeof t.status&&"string"===typeof t.statusText)return new $(t.status,t.statusText,t.data)}catch(t){}}(e.digest);t&&(e=t)}let t=void 0!==e?c.createElement(de.Provider,{value:this.props.routeContext},c.createElement(he.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?c.createElement(Ie,{error:e},t):t}};ke.contextType=ie;var Ce=new WeakMap;function Ie(e){let t=e.children,n=e.error,r=c.useContext(ce).basename;if("object"===typeof n&&n&&"digest"in n&&"string"===typeof n.digest){let e=function(e){if(e.startsWith("".concat(fe,":").concat("REDIRECT",":{")))try{let t=JSON.parse(e.slice(28));if("object"===typeof t&&t&&"number"===typeof t.status&&"string"===typeof t.statusText&&"string"===typeof t.location&&"boolean"===typeof t.reloadDocument&&"boolean"===typeof t.replace)return t}catch(t){}}(n.digest);if(e){let t=Ce.get(n);if(t)throw t;let i=Z(e.location,r);if(J&&!Ce.get(n)){if(!i.isExternal&&!e.reloadDocument){const t=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Ce.set(n,t),t}window.location.href=i.absoluteURL||i.to}return c.createElement("meta",{httpEquiv:"refresh",content:"0;url=".concat(i.absoluteURL||i.to)})}}return t}function Ae(e){let t=e.routeContext,n=e.match,r=e.children,i=c.useContext(ne);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),c.createElement(de.Provider,{value:t},r)}function Re(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]: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,o=null===n||void 0===n?void 0:n.errors;if(null!=o){let e=i.findIndex(e=>e.route.id&&void 0!==(null===o||void 0===o?void 0:o[e.route.id]));v(e>=0,"Could not find a matching route for errors on route IDs: ".concat(Object.keys(o).join(","))),i=i.slice(0,Math.min(i.length,e+1))}let a=!1,s=-1;if(n)for(let c=0;c<i.length;c++){let e=i[c];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(s=c),e.route.id){let t=n.loaderData,r=n.errors,o=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!r||void 0===r[e.route.id]);if(e.route.lazy||o){a=!0,i=s>=0?i.slice(0,s+1):[i[0]];break}}}let l=n&&r?(e,t)=>{var i,o;r(e,{location:n.location,params:null!==(i=null===(o=n.matches)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.params)&&void 0!==i?i:{},unstable_pattern:X(n.matches),errorInfo:t})}:void 0;return i.reduceRight((e,r,u)=>{let d,h=!1,f=null,p=null;n&&(d=o&&r.route.id?o[r.route.id]:void 0,f=r.route.errorElement||Se,a&&(s<0&&0===u?(Me("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,p=null):s===u&&(h=!0,p=r.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,u+1)),g=()=>{let t;return t=d?f:h?p:r.route.Component?c.createElement(r.route.Component,null):r.route.element?r.route.element:e,c.createElement(Ae,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===u)?c.createElement(ke,{location:n.location,revalidation:n.revalidation,component:f,error:d,children:g(),routeC
2ontext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):g()},null)}function Pe(e){return"".concat(e," must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.")}function Ne(e){let t=c.useContext(ne);return v(t,Pe(e)),t}function Oe(e){let t=c.useContext(re);return v(t,Pe(e)),t}function xe(e){let t=function(e){let t=c.useContext(de);return v(t,Pe(e)),t}(e),n=t.matches[t.matches.length-1];return v(n.route.id,"".concat(e,' can only be used on routes that contain a unique "id"')),n.route.id}function Le(){var e;let t=c.useContext(he),n=Oe("useRouteError"),r=xe("useRouteError");return void 0!==t?t:null===(e=n.errors)||void 0===e?void 0:e[r]}var De={};function Me(e,t,n){t||De[e]||(De[e]=!0,b(!1,n))}var Ue={};function Fe(e,t){e||Ue[t]||(Ue[t]=!0,console.warn(t))}(r||(r=n.t(c,2))).useOptimistic;c.memo(function(e){let t=e.routes,n=e.future,r=e.state,i=e.onError;return Ee(t,void 0,r,i,n)});function Ve(e){let t=e.to,n=e.replace,r=e.state,i=e.relative;v(pe(),"<Navigate> may be used only in the context of a <Router> component."),b(!c.useContext(ce).static,"<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 o=c.useContext(de).matches,a=me().pathname,s=ve(),l=H(t,q(o),a,"path"===i),u=JSON.stringify(l);return c.useEffect(()=>{s(JSON.parse(u),{replace:n,state:r,relative:i})},[s,u,i,n,r]),null}function je(e){return function(e){let t=c.useContext(de).outlet;return c.useMemo(()=>t&&c.createElement(be.Provider,{value:e},t),[t,e])}(e.context)}function ze(e){v(!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 Be(e){let t=e.basename,n=void 0===t?"/":t,r=e.children,i=void 0===r?null:r,o=e.location,a=e.navigationType,s=void 0===a?"POP":a,l=e.navigator,u=e.static,d=void 0!==u&&u,h=e.unstable_useTransitions;v(!pe(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=n.replace(/^\/*/,"/"),p=c.useMemo(()=>({basename:f,navigator:l,static:d,unstable_useTransitions:h,future:{}}),[f,l,d,h]);"string"===typeof o&&(o=T(o));let m=o,g=m.pathname,y=void 0===g?"/":g,w=m.search,_=void 0===w?"":w,E=m.hash,S=void 0===E?"":E,k=m.state,C=void 0===k?null:k,I=m.key,A=void 0===I?"default":I,R=c.useMemo(()=>{let e=U(y,f);return null==e?null:{location:{pathname:e,search:_,hash:S,state:C,key:A},navigationType:s}},[f,y,_,S,C,A,s]);return b(null!=R,'<Router basename="'.concat(f,'"> is not able to match the URL "').concat(y).concat(_).concat(S,"\" because it does not start with the basename, so the <Router> won't render anything.")),null==R?null:c.createElement(ce.Provider,{value:p},c.createElement(ue.Provider,{children:i,value:R}))}function qe(e){let t=e.children,n=e.location;return Ee(He(t),n)}c.Component;function He(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[];return c.Children.forEach(e,(e,r)=>{if(!c.isValidElement(e))return;let i=[...t,r];if(e.type===c.Fragment)return void n.push.apply(n,He(e.props.children,i));v(e.type===ze,"[".concat("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>")),v(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,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&&(o.children=He(e.props.children,i)),n.push(o)}),n}var We="get",Ge="application/x-www-form-urlencoded";function Ke(e){return"undefined"!==typeof HTMLElement&&e instanceof HTMLElement}function Qe(){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 $e=null;var Ye=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Xe(e){return null==e||Ye.has(e)?e:(b(!1,'"'.concat(e,'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` and will default to "').concat(Ge,'"')),null)}function Je(e,t){let n,r,i,o,a;if(Ke(s=e)&&"form"===s.tagName.toLowerCase()){let a=e.getAttribute("action");r=a?U(a,t):null,n=e.getAttribute("method")||We,i=Xe(e.getAttribute("enctype"))||Ge,o=new FormData(e)}else if(function(e){return Ke(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Ke(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(r=s?U(s,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||We,i=Xe(e.getAttribute("formenctype"))||Xe(a.getAttribute("enctype"))||Ge,o=new FormData(a,e),!function(){if(null===$e)try{new FormData(document.createElement("form"),0),$e=!1}catch(e){$e=!0}return $e}()){let t=e.name,n=e.type,r=e.value;if("image"===n){let e=t?"".concat(t,"."):"";o.append("".concat(e,"x"),"0"),o.append("".concat(e,"y"),"0")}else t&&o.append(t,r)}}else{if(Ke(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=We,r=null,i=Ge,a=e}var s;return o&&"text/plain"===i&&(a=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");"undefined"!==typeof window?window:"undefined"!==typeof globalThis&&globalThis;function Ze(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}Symbol("SingleFetchRedirect");function et(e,t,n,r){let i="string"===typeof e?new URL(e,"undefined"===typeof window?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname="".concat(i.pathname,"_.").concat(r):i.pathname="".concat(i.pathname,".").concat(r):"/"===i.pathname?i.pathname="_root.".concat(r):t&&"/"===U(i.pathname,t)?i.pathname="".concat(t.replace(/\/$/,""),"/_root.").concat(r):i.pathname="".concat(i.pathname.replace(/\/$/,""),".").concat(r),i}async function tt(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 `".concat(e.module,"`, reloading page...")),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.
2isSpaMode,window.location.reload(),new Promise(()=>{})}}function nt(e){return null!=e&&"string"===typeof e.page}function rt(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 it(e,t,n,r,i,o){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>{var r;return n[t].pathname!==e.pathname||(null===(r=n[t].route.path)||void 0===r?void 0:r.endsWith("*"))&&n[t].params["*"]!==e.params["*"]};return"assets"===o?t.filter((e,t)=>a(e,t)||s(e,t)):"data"===o?t.filter((t,o)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(a(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){var c;let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:(null===(c=n[0])||void 0===c?void 0:c.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"===typeof r)return r}return!0}):[]}function ot(e,t){let n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).includeHydrateFallback;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 at(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!nt(i)&&"script"===i.as&&i.href&&r.has(i.href))return e;let o=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(o)||(n.add(o),e.push({key:o,link:i})),e},[])}function st(e,t){return"lazy"===e.mode&&!0===t}function lt(){let e=c.useContext(ne);return Ze(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ct(){let e=c.useContext(re);return Ze(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ut=c.createContext(void 0);function dt(){let e=c.useContext(ut);return Ze(e,"You must render this element inside a <HydratedRouter> element"),e}function ht(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ft(e,t,n){if(n&&!yt)return[e[0]];if(t){let n=e.findIndex(e=>void 0!==t[e.route.id]);return e.slice(0,n+1)}return e}ut.displayName="FrameworkContext";function pt(e){let t=e.page,n=(0,i.A)(e,d),r=lt().router,o=c.useMemo(()=>C(r.routes,t,r.basename),[r.routes,t,r.basename]);return o?c.createElement(gt,(0,l.A)({page:t,matches:o},n)):null}function mt(e){let t=dt(),n=t.manifest,r=t.routeModules,i=c.useState([]),o=(0,s.A)(i,2),a=o[0],u=o[1];return c.useEffect(()=>{let t=!1;return async function(e,t,n){return at((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await tt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(rt).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?(0,l.A)((0,l.A)({},e),{},{rel:"prefetch",as:"style"}):(0,l.A)((0,l.A)({},e),{},{rel:"prefetch"})))}(e,n,r).then(e=>{t||u(e)}),()=>{t=!0}},[e,n,r]),a}function gt(e){let t=e.page,n=e.matches,r=(0,i.A)(e,h),o=me(),a=dt(),s=a.future,u=a.manifest,d=a.routeModules,f=lt().basename,p=ct(),m=p.loaderData,g=p.matches,y=c.useMemo(()=>it(t,n,g,u,o,"data"),[t,n,g,u,o]),v=c.useMemo(()=>it(t,n,g,u,o,"assets"),[t,n,g,u,o]),b=c.useMemo(()=>{if(t===o.pathname+o.search+o.hash)return[];let e=new Set,r=!1;if(n.forEach(t=>{var n;let i=u.routes[t.route.id];i&&i.hasLoader&&(!y.some(e=>e.route.id===t.route.id)&&t.route.id in m&&null!==(n=d[t.route.id])&&void 0!==n&&n.shouldRevalidate||i.hasClientLoader?r=!0:e.add(t.route.id))}),0===e.size)return[];let i=et(t,f,s.unstable_trailingSlashAwareDataRequests,"data");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]},[f,s.unstable_trailingSlashAwareDataRequests,m,o,u,y,n,t,d]),w=c.useMemo(()=>ot(v,u),[v,u]),_=mt(v);return c.createElement(c.Fragment,null,b.map(e=>c.createElement("link",(0,l.A)({key:e,rel:"prefetch",as:"fetch",href:e},r))),w.map(e=>c.createElement("link",(0,l.A)({key:e,rel:"modulepreload",href:e},r))),_.map(e=>{let t=e.key,n=e.link;return c.createElement("link",(0,l.A)({key:t,nonce:r.nonce},n))}))}var yt=!1;function vt(e){let t=dt(),n=t.manifest,r=t.serverHandoffString,o=t.isSpaMode,a=t.renderMeta,s=t.routeDiscovery,d=t.ssr,h=lt(),f=h.router,p=h.static,m=h.staticContext,g=ct().matches,y=oe(),v=st(s,d);a&&(a.didRenderScripts=!0);let b=ft(g,null,o);c.useEffect(()=>{yt=!0},[]);let w=c.useMemo(()=>{var t;if(y)return null;let o=m?"window.__reactRouterContext = ".concat(r,";").concat("window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}
2).pipeThrough(new TextEncoderStream());"):" ",a=p?"".concat(null!==(t=n.hmr)&&void 0!==t&&t.runtime?"import ".concat(JSON.stringify(n.hmr.runtime),";"):"").concat(v?"":"import ".concat(JSON.stringify(n.url)),";\n").concat(b.map((e,t)=>{let r="route".concat(t),i=n.routes[e.route.id];Ze(i,"Route ".concat(e.route.id," not found in manifest"));let o=i.clientActionModule,a=i.clientLoaderModule,s=i.clientMiddlewareModule,l=i.hydrateFallbackModule,c=i.module,u=[...o?[{module:o,varName:"".concat(r,"_clientAction")}]:[],...a?[{module:a,varName:"".concat(r,"_clientLoader")}]:[],...s?[{module:s,varName:"".concat(r,"_clientMiddleware")}]:[],...l?[{module:l,varName:"".concat(r,"_HydrateFallback")}]:[],{module:c,varName:"".concat(r,"_main")}];return 1===u.length?"import * as ".concat(r," from ").concat(JSON.stringify(c),";"):[u.map(e=>"import * as ".concat(e.varName,' from "').concat(e.module,'";')).join("\n"),"const ".concat(r," = {").concat(u.map(e=>"...".concat(e.varName)).join(","),"};")].join("\n")}).join("\n"),"\n  ").concat(v?"window.__reactRouterManifest = ".concat(JSON.stringify(function(e,t){let n=e.sri,r=(0,i.A)(e,u),o=new Set(t.state.matches.map(e=>e.route.id)),a=t.state.location.pathname.split("/").filter(Boolean),s=["/"];for(a.pop();a.length>0;)s.push("/".concat(a.join("/"))),a.pop();s.forEach(e=>{let n=C(t.routes,e,t.basename);n&&n.forEach(e=>o.add(e.route.id))});let c=[...o].reduce((e,t)=>Object.assign(e,{[t]:r.routes[t]}),{});return(0,l.A)((0,l.A)({},r),{},{routes:c,sri:!!n||void 0})}(n,f),null,2),";"):"","\n  window.__reactRouterRouteModules = {").concat(b.map((e,t)=>"".concat(JSON.stringify(e.route.id),":route").concat(t)).join(","),"};\n\nimport(").concat(JSON.stringify(n.entry.module),");"):" ";return c.createElement(c.Fragment,null,c.createElement("script",(0,l.A)((0,l.A)({},e),{},{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:o},type:void 0})),c.createElement("script",(0,l.A)((0,l.A)({},e),{},{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:a},type:"module",async:!0})))},[]),_=yt||y?[]:(E=n.entry.imports.concat(ot(b,n,{includeHydrateFallback:!0})),[...new Set(E)]);var E;let T="object"===typeof n.sri?n.sri:{};return Fe(!y,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),yt||y?null:c.createElement(c.Fragment,null,"object"===typeof n.sri?c.createElement("script",(0,l.A)((0,l.A)({},e),{},{"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:T})}})):null,v?null:c.createElement("link",{rel:"modulepreload",href:n.url,crossOrigin:e.crossOrigin,integrity:T[n.url],suppressHydrationWarning:!0}),c.createElement("link",{rel:"modulepreload",href:n.entry.module,crossOrigin:e.crossOrigin,integrity:T[n.entry.module],suppressHydrationWarning:!0}),_.map(t=>c.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:T[t],suppressHydrationWarning:!0})),w)}function bt(){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)})}}c.Component;function wt(e){let t=e.error,n=e.isOutsideRemixApp;console.error(t);let r,i=c.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://reactrouter.com/how-to/error-boundary for more information."\n        );\n      '}});if(Y(t))return c.createElement(_t,{title:"Unhandled Thrown Response!"},c.createElement("h1",{style:{fontSize:"24px"}},t.status," ",t.statusText),i);if(t instanceof Error)r=t;else{let e=null==t?"Unknown Error":"object"===typeof t&&"toString"in t?t.toString():JSON.stringify(t);r=new Error(e)}return c.createElement(_t,{title:"Application Error!",isOutsideRemixApp:n},c.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),c.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},r.stack),i)}function _t(e){var t;let n=e.title,r=e.renderScripts,i=e.isOutsideRemixApp,o=e.children;return null!==(t=dt().routeModules.root)&&void 0!==t&&t.Layout&&!i?o:c.createElement("html",{lang:"en"},c.createElement("head",null,c.createElement("meta",{charSet:"utf-8"}),c.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),c.createElement("title",null,n)),c.createElement("body",null,c.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},o,r?c.createElement(vt,null):null)))}var Et="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;try{Et&&(window.__reactRouterVersion="7.12.0")}catch(xt){}function Tt(e){let t=e.basename,n=e.children,r=e.unstable_useTransitions,i=e.window,o=c.useRef();null==o.current&&(o.current=y({window:i,v5Compat:!0}));let a=o.current,l=c.useState({action:a.action,location:a.location}),u=(0,s.A)(l,2),d=u[0],h=u[1],f=c.useCallback(e=>{!1===r?h(e):c.startTransition(()=>h(e))},[r]);return c.useLayoutEffect(()=>a.listen(f),[a,f]),c.createElement(Be,{basename:t,children:n,location:d.location,navigationType:d.action,navigator:a,unstable_useTransitions:r})}var St=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,kt=c.forwardRef(function(e,t){let n=e.onClick,r=e.discover,o=void 0===r?"render":r,a=e.prefetch,u=void 0===a?"none":a,d=e.relative,h=e.reloadDocument,p=e.replace,m=e.state,g=e.target,y=e.to,b=e.preventScrollReset,w=e.viewTransition,_=e.unstable_defaultShouldRevalidate,T=(0,i.A)(e,f),S=c.useContext(ce),k=S.basename,C=S.unstable_useTransitions,I="string"===typeof y&&St.test(y),A=Z(y,k);y=A.to;let R=function(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).relative;v(pe(),"useHref() may be used only in the context of a <Router> component.");let n=c.useContext(ce),r=n.basename,i=n.navigator,o=_e(e,{relative:t}),a=o.hash,s=o.pathname,l=o.search,u=s;return"/"!==r&&(u="/"===s?r:W([r,s])),i.createHref({pathname:u,search:l,hash:a})}(y,{relative:d}),P=function(e,t){let n=c.useContext(ut),r=c.useState(!1),i=(0,s.A)(r,2),o=i[0],a=i[1],l=c.useState(!1),u=(0,s.A)(l,2),d=u[0],h=u[1],f=t.onFocus,p=t.onBlur,m=t.onMouseEnter,g=t.onMouseLeave,y=t.onTouchStart,v=c.useRef(null);c.useEffect(()=>{if("render"===e&&h(!0),"viewport"===e){let e=new IntersectionObserver(e=>
2{e.forEach(e=>{h(e.isIntersecting)})},{threshold:.5});return v.current&&e.observe(v.current),()=>{e.disconnect()}}},[e]),c.useEffect(()=>{if(o){let e=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(e)}}},[o]);let b=()=>{a(!0)},w=()=>{a(!1),h(!1)};return n?"intent"!==e?[d,v,{}]:[d,v,{onFocus:ht(f,b),onBlur:ht(p,w),onMouseEnter:ht(m,b),onMouseLeave:ht(g,w),onTouchStart:ht(y,b)}]:[!1,v,{}]}(u,T),N=(0,s.A)(P,3),O=N[0],x=N[1],L=N[2],D=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.target,r=t.replace,i=t.state,o=t.preventScrollReset,a=t.relative,s=t.viewTransition,l=t.unstable_defaultShouldRevalidate,u=t.unstable_useTransitions,d=ve(),h=me(),f=_e(e,{relative:a});return c.useCallback(t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==r?r:E(h)===E(f),p=()=>d(e,{replace:n,state:i,preventScrollReset:o,relative:a,viewTransition:s,unstable_defaultShouldRevalidate:l});u?c.startTransition(()=>p()):p()}},[h,d,f,r,i,n,e,o,a,s,l,u])}(y,{replace:p,state:m,target:g,preventScrollReset:b,relative:d,viewTransition:w,unstable_defaultShouldRevalidate:_,unstable_useTransitions:C});let M=c.createElement("a",(0,l.A)((0,l.A)((0,l.A)({},T),L),{},{href:A.absoluteURL||R,onClick:A.isExternal||h?n:function(e){n&&n(e),e.defaultPrevented||D(e)},ref:bt(t,x),target:g,"data-discover":I||"render"!==o?void 0:"true"}));return O&&!I?c.createElement(c.Fragment,null,M,c.createElement(pt,{page:R})):M});kt.displayName="Link";var Ct=c.forwardRef(function(e,t){let n=e["aria-current"],r=void 0===n?"page":n,o=e.caseSensitive,a=void 0!==o&&o,s=e.className,u=void 0===s?"":s,d=e.end,h=void 0!==d&&d,f=e.style,m=e.to,g=e.viewTransition,y=e.children,b=(0,i.A)(e,p),w=_e(m,{relative:b.relative}),_=me(),E=c.useContext(re),T=c.useContext(ce),S=T.navigator,k=T.basename,C=null!=E&&function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.relative,r=c.useContext(ae);v(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let i=Rt("useViewTransitionState").basename,o=_e(e,{relative:n});if(!r.isTransitioning)return!1;let a=U(r.currentLocation.pathname,i)||r.currentLocation.pathname,s=U(r.nextLocation.pathname,i)||r.nextLocation.pathname;return null!=L(o.pathname,s)||null!=L(o.pathname,a)}(w)&&!0===g,I=S.encodeLocation?S.encodeLocation(w).pathname:w.pathname,A=_.pathname,R=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;a||(A=A.toLowerCase(),R=R?R.toLowerCase():null,I=I.toLowerCase()),R&&k&&(R=U(R,k)||R);const P="/"!==I&&I.endsWith("/")?I.length-1:I.length;let N,O=A===I||!h&&A.startsWith(I)&&"/"===A.charAt(P),x=null!=R&&(R===I||!h&&R.startsWith(I)&&"/"===R.charAt(I.length)),D={isActive:O,isPending:x,isTransitioning:C},M=O?r:void 0;N="function"===typeof u?u(D):[u,O?"active":null,x?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let F="function"===typeof f?f(D):f;return c.createElement(kt,(0,l.A)((0,l.A)({},b),{},{"aria-current":M,className:N,ref:t,style:F,to:m,viewTransition:g}),"function"===typeof y?y(D):y)});Ct.displayName="NavLink";var It=c.forwardRef((e,t)=>{let n=e.discover,r=void 0===n?"render":n,o=e.fetcherKey,a=e.navigate,u=e.reloadDocument,d=e.replace,h=e.state,f=e.method,p=void 0===f?We:f,g=e.action,y=e.onSubmit,b=e.relative,w=e.preventScrollReset,_=e.viewTransition,T=e.unstable_defaultShouldRevalidate,S=(0,i.A)(e,m),k=c.useContext(ce).unstable_useTransitions,C=Ot(),I=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.relative,r=c.useContext(ce).basename,i=c.useContext(de);v(i,"useFormAction must be used inside a RouteContext");let o=i.matches.slice(-1),a=(0,s.A)(o,1)[0],u=(0,l.A)({},_e(e||".",{relative:n})),d=me();if(null==e){u.search=d.search;let e=new URLSearchParams(u.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();u.search=n?"?".concat(n):""}}e&&"."!==e||!a.route.index||(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(u.pathname="/"===u.pathname?r:W([r,u.pathname]));return E(u)}(g,{relative:b}
2),A="get"===p.toLowerCase()?"get":"post",R="string"===typeof g&&St.test(g);return c.createElement("form",(0,l.A)((0,l.A)({ref:t,method:A,action:I,onSubmit:u?y:e=>{if(y&&y(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,n=(null===t||void 0===t?void 0:t.getAttribute("formmethod"))||p,r=()=>C(t||e.currentTarget,{fetcherKey:o,method:n,navigate:a,replace:d,state:h,relative:b,preventScrollReset:w,viewTransition:_,unstable_defaultShouldRevalidate:T});k&&!1!==a?c.startTransition(()=>r()):r()}},S),{},{"data-discover":R||"render"!==r?void 0:"true"}))});function At(e){return"".concat(e," must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.")}function Rt(e){let t=c.useContext(ne);return v(t,At(e)),t}function Pt(e){b("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=c.useRef(Qe(e)),n=c.useRef(!1),r=me(),i=c.useMemo(()=>function(e,t){let n=Qe(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}(r.search,n.current?null:t.current),[r.search]),o=ve(),a=c.useCallback((e,t)=>{const r=Qe("function"===typeof e?e(new URLSearchParams(i)):e);n.current=!0,o("?"+r,t)},[o,i]);return[i,a]}It.displayName="Form";var Nt=0;function Ot(){let e=Rt("useSubmit").router,t=c.useContext(ce).basename,n=xe("useRouteId"),r=e.fetch,i=e.navigate;return c.useCallback(async function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=Je(e,t),s=a.action,l=a.method,c=a.encType,u=a.formData,d=a.body;if(!1===o.navigate){let e=o.fetcherKey||"__".concat(String(++Nt),"__");await r(e,n,o.action||s,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:d,formMethod:o.method||l,formEncType:o.encType||c,flushSync:o.flushSync})}else await i(o.action||s,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:d,formMethod:o.method||l,formEncType:o.encType||c,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,t,n])}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var o=Object.create(null);n.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&i&&r;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>r[e]);return a.default=()=>r,n.d(o,a),o}})(),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+"."+{74:"59b99a45",129:"9fa97fd8",150:"e5f00124",230:"dfd4b522",237:"8ecf850c",333:"6e6a4956",448:"b23d0360",1062:"8e6b385d",1105:"f5e65373",1332:"72cf4a9e",1422:"7b79cba7",1567:"7a1ea092",1852:"2cf9b788",2022:"ec693adf",2023:"7396651f",2096:"50920ad5",2212:"a1533585",2256:"1ae0a6ff",2395:"1517b90c",2703:"27f1d6f1",2907:"77c5278c",2945:"7a58f21c",3074:"e0b94c6d",3075:"40886a2d",3319:"58440c44",3516:"8a316897",3857:"ac0555e3",4140:"8e9e0f86",4222:"3111cae7",4236:"3a4f54ab",4373:"f57f0bb9",4533:"5b7d5e89",4597:"42e45d87",4964:"c8cb5c8d",4994:"ae528428",5181:"557a00ab",5212:"af2445f3",5249:"13dc5835",5287:"01de372a",5565:"325d9402",5607:"2b9206a2",5702:"20a115b2",5739:"897ae323",5800:"5ee02068",5845:"a9d1d9be",6396:"1ed94b7b",6453:"ca0f40a2",6540:"5c073b8f",7015:"f79b17dc",7077:"baa3d163",7264:"e83e26b9",7633:"14112a0e",7977:"28a566a1",8041:"a2065fee",8079:"2a4e53f0",8279:"f8e8ce40",8366:"07060647",8401:"778d0d27",8455:"3f7a33b3",8706:"51eab7e4",8968:"683fb52c",8973:"097b744b",9005:"c9716a9e",9219:"2c4114cf",9317:"6afad82e",9374:"6b4305cb",9411:"12174bf8",9677:"14c462ca",9775:"c88153a8",9912:"459cceb6"}[e]+".chunk.js",n.miniCssF=e=>"static/css/"+e+".5900952a.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}
2}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="knowledge-base-saas:";n.l=(r,i,o,a)=>{if(e[r])e[r].push(i);else{var s,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+o){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+o),s.src=r),e[r]=[i];var h=(t,n)=>{s.onerror=s.onload=null,clearTimeout(f);var i=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach(e=>e(n)),t)return t(n)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),l&&document.head.appendChild(s)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.p="./",(()=>{if("undefined"!==typeof document){var e=e=>new Promise((t,r)=>{var i=n.miniCssF(e),o=n.p+i;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var i=(a=n[r]).getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(i===e||i===t))return a}var o=document.getElementsByTagName("style");for(r=0;r<o.length;r++){var a;if((i=(a=o[r]).getAttribute("data-href"))===e||i===t)return a}})(i,o))return t();((e,t,r,i,o)=>{var a=document.createElement("link");a.rel="stylesheet",a.type="text/css",n.nc&&(a.nonce=n.nc),a.onerror=a.onload=n=>{if(a.onerror=a.onload=null,"load"===n.type)i();else{var r=n&&n.type,s=n&&n.target&&n.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+r+": "+s+")");l.name="ChunkLoadError",l.code="CSS_CHUNK_LOAD_FAILED",l.type=r,l.request=s,a.parentNode&&a.parentNode.removeChild(a),o(l)}},a.href=t,r?r.parentNode.insertBefore(a,r.nextSibling):document.head.appendChild(a)})(e,o,null,t,r)}),t={8792:0};n.f.miniCss=(n,r)=>{t[n]?r.push(t[n]):0!==t[n]&&{3319: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 o=new Promise((n,r)=>i=e[t]=[n,r]);r.push(i[2]=o);var a=n.p+n.u(t),s=new Error;n.l(a,r=>{if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}},"chunk-"+t,t)}};var t=(t,r)=>{var i,o,[a,s,l]=r,c=0;if(a.some(t=>0!==e[t])){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(l)l(n)}for(t&&t(r);c<a.length;c++)o=a[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=self.webpackChunkknowledge_base_saas=self.webpackChunkknowledge_base_saas||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var r=n(65043),i=n(84391),o=n(89379);function a(){return"undefined"!==typeof window}function s(){try{const e="production";if("development"===e||"test"===e)return"development"}catch(e){}return"production"}function l(){return(a()?window.vam:s())||"production"}function c(){return"development"===l()}function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{debug:!0};var t;if(!a())return;!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto";window.vam="auto"!==e?e:s()}(e.mode),window.va||(window.va=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];(window.vaq=window.vaq||[]).push(t)}),e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend));const n=function(e){return e.scriptSrc?e.scriptSrc:c()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?"".concat(e.basePath,"/insights/script.js"):"/_vercel/insights/script.js"}(e);if(document.head.querySelector('script[src*="'.concat(n,'"]')))return;const r=document.createElement("script");r.src=n,r.defer=!0,r.dataset.sdkn="@vercel/analytics"+(e.framework?"/".concat(e.framework):""),r.dataset.sdkv="1.6.1",e.disableAutoTrack&&(r.dataset.disableAutoTrack="1"),e.endpoint?r.dataset.endpoint=e.endpoint:e.basePath&&(r.dataset.endpoint="".concat(e.basePath,"/insights")),e.dsn&&(r.dataset.dsn=e.dsn),r.onerror=()=>{const e=c()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log("[Vercel Web Analytics] Failed to load script from ".concat(n,". ").concat(e))},c()&&!1===e.debug&&(r.dataset.debug="false"),document.head.appendChild(r)}function d(){if("undefined"!==typeof process)return{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_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Gary Riger",REACT_APP_VERCEL_GIT_PROVIDER:"github",REACT_APP_VERCEL_PROJECT_ID:"prj_A5c8ZMv75ibxQVceA3I7GjPny9oD",REACT_APP_VERCEL_GIT_PULL_REQUEST_ID:"",REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG:'{"analytics":{"scriptSrc":"8f81e36d25c71756/script.
2js","viewEndpoint":"8f81e36d25c71756/view","eventEndpoint":"8f81e36d25c71756/event","sessionEndpoint":"8f81e36d25c71756/session"},"speedInsights":{"scriptSrc":"1e9f61cb490e195d/script.js","endpoint":"1e9f61cb490e195d/vitals"}}',REACT_APP_VERCEL_BRANCH_URL:"based-git-main-trybased.vercel.app",REACT_APP_VERCEL_GIT_COMMIT_MESSAGE:'feat: enhance mascot URL handling and redirection\n\n- Added redirects for mascot custom domains to serve links at `/{id}` instead of `/mascot/{id}`.\n- Updated the canonical URL generation in the mascot API to accommodate custom hostnames.\n- Introduced utility functions to determine mascot link paths and identify "Mascot says" links.\n- Adjusted various components and tests to reflect the new URL structure and ensure proper handling of mascot links.\n\nThis update improves the user experience for mascot domain visitors and streamlines the sharing process for mascot-related content.',REACT_APP_VERCEL_DEPLOYMENT_ID:"dpl_6FrDCtvXefHewS7qWdFGdtdrWfow",REACT_APP_VERCEL_GIT_REPO_SLUG:"knowledge-base-saas",REACT_APP_VERCEL_TARGET_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_SHA:"bb4db2da80ad880ce8eb95828efa1bf5f6feeb22",REACT_APP_VERCEL_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_REF:"main",REACT_APP_VERCEL_URL:"based-acjo68u8l-trybased.vercel.app",REACT_APP_VERCEL_PROJECT_PRODUCTION_URL:"www.trybased.com",REACT_APP_VERCEL_GIT_PREVIOUS_SHA:"",REACT_APP_VERCEL_GIT_REPO_ID:"980833582",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"grigerny",REACT_APP_VERCEL_GIT_REPO_OWNER:"grigerny"}.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function h(e){return(0,r.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,r.useEffect)(()=>{var t;u((0,o.A)((0,o.A)({framework:e.framework||"react",basePath:null!==(t=e.basePath)&&void 0!==t?t:d()},void 0!==e.route&&{disableAutoTrack:!0}),e))},[]),(0,r.useEffect)(()=>{e.route&&e.path&&function(e){let t=e.route,n=e.path;var r;null==(r=window.va)||r.call(window,"pageview",{route:t,path:n})}({route:e.route,path:e.path})},[e.route,e.path]),null}var f=n(1862);const p=e=>{e&&e instanceof Function&&n.e(6453).then(n.bind(n,46453)).then(t=>{let n=t.getCLS,r=t.getFID,i=t.getFCP,o=t.getLCP,a=t.getTTFB;n(e),r(e),i(e),o(e),a(e)})};var m=n(70579);i.createRoot(document.getElementById("root")).render((0,m.jsxs)(r.StrictMode,{children:[(0,m.jsx)(f.Ay,{}),(0,m.jsx)(h,{})]})),p()})();
3//# sourceMappingURL=main.259f74ee.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.