Some checks failed
CI/CD Pipeline / Backend - Lint & Test (push) Has been cancelled
CI/CD Pipeline / Frontend - Lint & Test (push) Has been cancelled
CI/CD Pipeline / Security Scan (push) Has been cancelled
CI/CD Pipeline / Build Backend (push) Has been cancelled
CI/CD Pipeline / Build Frontend (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / Performance Tests (push) Has been cancelled
CI/CD Pipeline / Dependency Updates (push) Has been cancelled
- Updated Anthropic API to latest version (2024-01-01) - Set Claude 3.7 Sonnet Latest as primary model - Removed deprecated Opus 3.5 references - Fixed LLM response validation and JSON parsing - Improved error handling and logging - Updated model configurations and pricing - Enhanced document processing reliability - Fixed TypeScript type issues - Updated environment configuration
1624 lines
434 KiB
JavaScript
1624 lines
434 KiB
JavaScript
var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,i=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,s=Reflect.get,l=(e,t)=>{if(t=Symbol[e])return t;throw Error("Symbol."+e+" is not defined")},u=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,c=(e,t)=>{for(var n in t||(t={}))o.call(t,n)&&u(e,n,t[n]);if(r)for(var n of r(t))a.call(t,n)&&u(e,n,t[n]);return e},d=(e,r)=>t(e,n(r)),f=(e,t)=>{var n={};for(var i in e)o.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&r)for(var i of r(e))t.indexOf(i)<0&&a.call(e,i)&&(n[i]=e[i]);return n},h=(e,t,n)=>(u(e,"symbol"!=typeof t?t+"":t,n),n),p=(e,t,n)=>s(i(e),n,t),m=(e,t,n)=>new Promise((r,i)=>{var o=e=>{try{s(n.next(e))}catch(t){i(t)}},a=e=>{try{s(n.throw(e))}catch(t){i(t)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,a);s((n=n.apply(e,t)).next())}),g=function(e,t){this[0]=e,this[1]=t},v=(e,t,n)=>{var r=(e,t,i,o)=>{try{var a=n[e](t),s=(t=a.value)instanceof g,l=a.done;Promise.resolve(s?t[0]:t).then(n=>s?r("return"===e?e:"next",t[1]?{done:n.done,value:n.value}:n,i,o):i({value:n,done:l})).catch(e=>r("throw",e,i,o))}catch(u){o(u)}},i=e=>o[e]=t=>new Promise((n,i)=>r(e,t,n,i)),o={};return n=n.apply(e,t),o[Symbol.asyncIterator]=()=>o,i("next"),i("throw"),i("return"),o},y=e=>{var t,n=e[l("asyncIterator")],r=!1,i={};return null==n?(n=e[l("iterator")](),t=e=>i[e]=t=>n[e](t)):(n=n.call(e),t=e=>i[e]=t=>{if(r){if(r=!1,"throw"===e)throw t;return t}return r=!0,{done:!1,value:new g(new Promise(r=>{var i=n[e](t);if(!(i instanceof Object))throw TypeError("Object expected");r(i)}),1)}}),i[l("iterator")]=()=>i,t("next"),"throw"in n?t("throw"):i.throw=e=>{throw e},"return"in n&&t("return"),i};function b(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function w(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var x={exports:{}},k={},S={exports:{}},E={},_=Symbol.for("react.element"),C=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),R=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),L=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),D=Symbol.iterator;var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},U=Object.assign,z={};function F(e,t,n){this.props=e,this.context=t,this.refs=z,this.updater=n||M}function B(){}function V(e,t,n){this.props=e,this.context=t,this.refs=z,this.updater=n||M}F.prototype.isReactComponent={},F.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): 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")},F.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},B.prototype=F.prototype;var $=V.prototype=new B;$.constructor=V,U($,F.prototype),$.isPureReactComponent=!0;var H=Array.isArray,W=Object.prototype.hasOwnProperty,q={current:null},K={key:!0,ref:!0,__self:!0,__source:!0};function G(e,t,n){var r,i={},o=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)W.call(t,r)&&!K.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:_,type:e,key:o,ref:a,props:i,_owner:q.current}}function J(e){return"object"==typeof e&&null!==e&&e.$$typeof===_}var Q=/\/+/g;function Y(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 X(e,t,n,r,i){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case _:case C:a=!0}}if(a)return i=i(a=e),e=""===r?"."+Y(a,0):r,H(i)?(n="",null!=e&&(n=e.replace(Q,"$&/")+"/"),X(i,t,n,"",function(e){return e})):null!=i&&(J(i)&&(i=function(e,t){return{$$typeof:_,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(Q,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=""===r?".":r+":",H(e))for(var s=0;s<e.length;s++){var l=r+Y(o=e[s],s);a+=X(o,t,n,l,i)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=D&&e[D]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),s=0;!(o=e.next()).done;)a+=X(o=o.value,t,n,l=r+Y(o,s++),i);else if("object"===o)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Z(e,t,n){if(null==e)return e;var r=[],i=0;return X(e,r,"","",function(e){return t.call(n,e,i++)}),r}function ee(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 te={current:null},ne={transition:null},re={ReactCurrentDispatcher:te,ReactCurrentBatchConfig:ne,ReactCurrentOwner:q};function ie(){throw Error("act(...) is not supported in production builds of React.")}E.Children={map:Z,forEach:function(e,t,n){Z(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Z(e,function(){t++}),t},toArray:function(e){return Z(e,function(e){return e})||[]},only:function(e){if(!J(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},E.Component=F,E.Fragment=N,E.Profiler=T,E.PureComponent=V,E.StrictMode=I,E.Suspense=A,E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,E.act=ie,E.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=U({},e.props),i=e.key,o=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,a=q.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)W.call(t,l)&&!K.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==s?s[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:_,type:e.type,key:i,ref:o,props:r,_owner:a}},E.createContext=function(e){return(e={$$typeof:R,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:P,_context:e},e.Consumer=e},E.createElement=G,E.createFactory=function(e){var t=G.bind(null,e);return t.type=e,t},E.createRef=function(){return{current:null}},E.forwardRef=function(e){return{$$typeof:O,render:e}},E.isValidElement=J,E.lazy=function(e){return{$$typeof:j,_payload:{_status:-1,_result:e},_init:ee}},E.memo=function(e,t){return{$$typeof:L,type:e,compare:void 0===t?null:t}},E.startTransition=function(e){var t=ne.transition;ne.transition={};try{e()}finally{ne.transition=t}},E.unstable_act=ie,E.useCallback=function(e,t){return te.current.useCallback(e,t)},E.useContext=function(e){return te.current.useContext(e)},E.useDebugValue=function(){},E.useDeferredValue=function(e){return te.current.useDeferredValue(e)},E.useEffect=function(e,t){return te.current.useEffect(e,t)},E.useId=function(){return te.current.useId()},E.useImperativeHandle=function(e,t,n){return te.current.useImperativeHandle(e,t,n)},E.useInsertionEffect=function(e,t){return te.current.useInsertionEffect(e,t)},E.useLayoutEffect=function(e,t){return te.current.useLayoutEffect(e,t)},E.useMemo=function(e,t){return te.current.useMemo(e,t)},E.useReducer=function(e,t,n){return te.current.useReducer(e,t,n)},E.useRef=function(e){return te.current.useRef(e)},E.useState=function(e){return te.current.useState(e)},E.useSyncExternalStore=function(e,t,n){return te.current.useSyncExternalStore(e,t,n)},E.useTransition=function(){return te.current.useTransition()},E.version="18.3.1",S.exports=E;var oe=S.exports;const ae=w(oe),se=b({__proto__:null,default:ae},[oe]);
|
|
/**
|
|
* @license React
|
|
* react-jsx-runtime.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
var le=oe,ue=Symbol.for("react.element"),ce=Symbol.for("react.fragment"),de=Object.prototype.hasOwnProperty,fe=le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,he={key:!0,ref:!0,__self:!0,__source:!0};function pe(e,t,n){var r,i={},o=null,a=null;for(r in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(a=t.ref),t)de.call(t,r)&&!he.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:ue,type:e,key:o,ref:a,props:i,_owner:fe.current}}k.Fragment=ce,k.jsx=pe,k.jsxs=pe,x.exports=k;var me=x.exports,ge={},ve={exports:{}},ye={},be={exports:{}},we={};
|
|
/**
|
|
* @license React
|
|
* scheduler.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(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,o=e.length,a=o>>>1;r<a;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(0>i(l,n))u<o&&0>i(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<o&&0>i(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,f=3,h=!1,p=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var i=n(u);null!==i;){if(null===i.callback)r(u);else{if(!(i.startTime<=e))break;r(u),i.sortIndex=i.expirationTime,t(l,i)}i=n(u)}}function w(e){if(m=!1,b(e),!p)if(null!==n(l))p=!0,O(x);else{var t=n(u);null!==t&&A(w,t.startTime-e)}}function x(t,i){p=!1,m&&(m=!1,v(_),_=-1),h=!0;var o=f;try{for(b(i),d=n(l);null!==d&&(!(d.expirationTime>i)||t&&!I());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var s=a(d.expirationTime<=i);i=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),b(i)}else r(l);d=n(l)}if(null!==d)var c=!0;else{var g=n(u);null!==g&&A(w,g.startTime-i),c=!1}return c}finally{d=null,f=o,h=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,S=!1,E=null,_=-1,C=5,N=-1;function I(){return!(e.unstable_now()-N<C)}function T(){if(null!==E){var t=e.unstable_now();N=t;var n=!0;try{n=E(!0,t)}finally{n?k():(S=!1,E=null)}}else S=!1}if("function"==typeof y)k=function(){y(T)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,R=P.port2;P.port1.onmessage=T,k=function(){R.postMessage(null)}}else k=function(){g(T,0)};function O(e){E=e,S||(S=!0,k())}function A(t,n){_=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,O(x))},e.unstable_forceFrameRate=function(e){0>e||125<e||(C=0<e?Math.floor(1e3/e):5)},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.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}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.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}},e.unstable_scheduleCallback=function(r,i,o){var a=e.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?a+o:a:o=a,r){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 r={id:c++,callback:i,priorityLevel:r,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(r.sortIndex=o,t(u,r),null===n(l)&&r===n(u)&&(m?(v(_),_=-1):m=!0,A(w,o-a))):(r.sortIndex=s,t(l,r),p||h||(p=!0,O(x))),r},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(we),be.exports=we;var xe=be.exports,ke=oe,Se=xe;
|
|
/**
|
|
* @license React
|
|
* react-dom.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/function Ee(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var _e=new Set,Ce={};function Ne(e,t){Ie(e,t),Ie(e+"Capture",t)}function Ie(e,t){for(Ce[e]=t,e=0;e<t.length;e++)_e.add(t[e])}var Te=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Pe=Object.prototype.hasOwnProperty,Re=/^[: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]*$/,Oe={},Ae={};function Le(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var je={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){je[e]=new Le(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];je[t]=new Le(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){je[e]=new Le(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){je[e]=new Le(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){je[e]=new Le(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){je[e]=new Le(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){je[e]=new Le(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){je[e]=new Le(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){je[e]=new Le(e,5,!1,e.toLowerCase(),null,!1,!1)});var De=/[\-:]([a-z])/g;function Me(e){return e[1].toUpperCase()}function Ue(e,t,n,r){var i=je.hasOwnProperty(t)?je[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!Pe.call(Ae,e)||!Pe.call(Oe,e)&&(Re.test(e)?Ae[e]=!0:(Oe[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(De,Me);je[t]=new Le(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(De,Me);je[t]=new Le(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(De,Me);je[t]=new Le(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){je[e]=new Le(e,1,!1,e.toLowerCase(),null,!1,!1)}),je.xlinkHref=new Le("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){je[e]=new Le(e,1,!1,e.toLowerCase(),null,!0,!0)});var ze=ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Fe=Symbol.for("react.element"),Be=Symbol.for("react.portal"),Ve=Symbol.for("react.fragment"),$e=Symbol.for("react.strict_mode"),He=Symbol.for("react.profiler"),We=Symbol.for("react.provider"),qe=Symbol.for("react.context"),Ke=Symbol.for("react.forward_ref"),Ge=Symbol.for("react.suspense"),Je=Symbol.for("react.suspense_list"),Qe=Symbol.for("react.memo"),Ye=Symbol.for("react.lazy"),Xe=Symbol.for("react.offscreen"),Ze=Symbol.iterator;function et(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Ze&&e[Ze]||e["@@iterator"])?e:null}var tt,nt=Object.assign;function rt(e){if(void 0===tt)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);tt=t&&t[1]||""}return"\n"+tt+e}var it=!1;function ot(e,t){if(!e||it)return"";it=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"==typeof u.stack){for(var i=u.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{it=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?rt(e):""}function at(e){switch(e.tag){case 5:return rt(e.type);case 16:return rt("Lazy");case 13:return rt("Suspense");case 19:return rt("SuspenseList");case 0:case 2:case 15:return e=ot(e.type,!1);case 11:return e=ot(e.type.render,!1);case 1:return e=ot(e.type,!0);default:return""}}function st(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Ve:return"Fragment";case Be:return"Portal";case He:return"Profiler";case $e:return"StrictMode";case Ge:return"Suspense";case Je:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case qe:return(e.displayName||"Context")+".Consumer";case We:return(e._context.displayName||"Context")+".Provider";case Ke:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case Qe:return null!==(t=e.displayName||null)?t:st(e.type)||"Memo";case Ye:t=e._payload,e=e._init;try{return st(e(t))}catch(n){}}return null}function lt(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return st(t);case 8:return t===$e?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function ut(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ct(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function dt(e){e._valueTracker||(e._valueTracker=function(e){var t=ct(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ft(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ct(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function ht(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function pt(e,t){var n=t.checked;return nt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function mt(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ut(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function gt(e,t){null!=(t=t.checked)&&Ue(e,"checked",t,!1)}function vt(e,t){gt(e,t);var n=ut(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?bt(e,t.type,n):t.hasOwnProperty("defaultValue")&&bt(e,t.type,ut(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function yt(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function bt(e,t,n){"number"===t&&ht(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var wt=Array.isArray;function xt(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=""+ut(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 kt(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(Ee(91));return nt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function St(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(Ee(92));if(wt(n)){if(1<n.length)throw Error(Ee(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ut(n)}}function Et(e,t){var n=ut(t.value),r=ut(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function _t(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Ct(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Nt(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Ct(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var It,Tt,Pt=(Tt=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((It=It||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=It.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return Tt(e,t)})}:Tt);function Rt(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 Ot={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},At=["Webkit","ms","Moz","O"];function Lt(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Ot.hasOwnProperty(e)&&Ot[e]?(""+t).trim():t+"px"}function jt(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=Lt(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(Ot).forEach(function(e){At.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ot[t]=Ot[e]})});var Dt=nt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Mt(e,t){if(t){if(Dt[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(Ee(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(Ee(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ee(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(Ee(62))}}function Ut(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 zt=null;function Ft(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Bt=null,Vt=null,$t=null;function Ht(e){if(e=zo(e)){if("function"!=typeof Bt)throw Error(Ee(280));var t=e.stateNode;t&&(t=Bo(t),Bt(e.stateNode,e.type,t))}}function Wt(e){Vt?$t?$t.push(e):$t=[e]:Vt=e}function qt(){if(Vt){var e=Vt,t=$t;if($t=Vt=null,Ht(e),t)for(e=0;e<t.length;e++)Ht(t[e])}}function Kt(e,t){return e(t)}function Gt(){}var Jt=!1;function Qt(e,t,n){if(Jt)return e(t,n);Jt=!0;try{return Kt(e,t,n)}finally{Jt=!1,(null!==Vt||null!==$t)&&(Gt(),qt())}}function Yt(e,t){var n=e.stateNode;if(null===n)return null;var r=Bo(n);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(Ee(231,t,typeof n));return n}var Xt=!1;if(Te)try{var Zt={};Object.defineProperty(Zt,"passive",{get:function(){Xt=!0}}),window.addEventListener("test",Zt,Zt),window.removeEventListener("test",Zt,Zt)}catch(Tt){Xt=!1}function en(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var tn=!1,nn=null,rn=!1,on=null,an={onError:function(e){tn=!0,nn=e}};function sn(e,t,n,r,i,o,a,s,l){tn=!1,nn=null,en.apply(an,arguments)}function ln(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function un(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 cn(e){if(ln(e)!==e)throw Error(Ee(188))}function dn(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=ln(e)))throw Error(Ee(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 cn(i),e;if(o===r)return cn(i),t;o=o.sibling}throw Error(Ee(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(Ee(189))}}if(n.alternate!==r)throw Error(Ee(190))}if(3!==n.tag)throw Error(Ee(188));return n.stateNode.current===n?e:t}(e))?fn(e):null}function fn(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=fn(e);if(null!==t)return t;e=e.sibling}return null}var hn=Se.unstable_scheduleCallback,pn=Se.unstable_cancelCallback,mn=Se.unstable_shouldYield,gn=Se.unstable_requestPaint,vn=Se.unstable_now,yn=Se.unstable_getCurrentPriorityLevel,bn=Se.unstable_ImmediatePriority,wn=Se.unstable_UserBlockingPriority,xn=Se.unstable_NormalPriority,kn=Se.unstable_LowPriority,Sn=Se.unstable_IdlePriority,En=null,_n=null;var Cn=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(Nn(e)/In|0)|0},Nn=Math.log,In=Math.LN2;var Tn=64,Pn=4194304;function Rn(e){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: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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function On(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=Rn(s):0!==(o&=a)&&(r=Rn(o))}else 0!==(a=n&~i)?r=Rn(a):0!==o&&(r=Rn(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Cn(t)),r|=e[n],t&=~i;return r}function An(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Ln(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function jn(){var e=Tn;return!(4194240&(Tn<<=1))&&(Tn=64),e}function Dn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Mn(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-Cn(t)]=n}function Un(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Cn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var zn=0;function Fn(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var Bn,Vn,$n,Hn,Wn,qn=!1,Kn=[],Gn=null,Jn=null,Qn=null,Yn=new Map,Xn=new Map,Zn=[],er="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 submit".split(" ");function tr(e,t){switch(e){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Jn=null;break;case"mouseover":case"mouseout":Qn=null;break;case"pointerover":case"pointerout":Yn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xn.delete(t.pointerId)}}function nr(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=zo(t))&&Vn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function rr(e){var t=Uo(e.target);if(null!==t){var n=ln(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=un(n)))return e.blockedOn=t,void Wn(e.priority,function(){$n(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 ir(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=mr(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=zo(n))&&Vn(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);zt=r,n.target.dispatchEvent(r),zt=null,t.shift()}return!0}function or(e,t,n){ir(e)&&n.delete(t)}function ar(){qn=!1,null!==Gn&&ir(Gn)&&(Gn=null),null!==Jn&&ir(Jn)&&(Jn=null),null!==Qn&&ir(Qn)&&(Qn=null),Yn.forEach(or),Xn.forEach(or)}function sr(e,t){e.blockedOn===t&&(e.blockedOn=null,qn||(qn=!0,Se.unstable_scheduleCallback(Se.unstable_NormalPriority,ar)))}function lr(e){function t(t){return sr(t,e)}if(0<Kn.length){sr(Kn[0],e);for(var n=1;n<Kn.length;n++){var r=Kn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Gn&&sr(Gn,e),null!==Jn&&sr(Jn,e),null!==Qn&&sr(Qn,e),Yn.forEach(t),Xn.forEach(t),n=0;n<Zn.length;n++)(r=Zn[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Zn.length&&null===(n=Zn[0]).blockedOn;)rr(n),null===n.blockedOn&&Zn.shift()}var ur=ze.ReactCurrentBatchConfig,cr=!0;function dr(e,t,n,r){var i=zn,o=ur.transition;ur.transition=null;try{zn=1,hr(e,t,n,r)}finally{zn=i,ur.transition=o}}function fr(e,t,n,r){var i=zn,o=ur.transition;ur.transition=null;try{zn=4,hr(e,t,n,r)}finally{zn=i,ur.transition=o}}function hr(e,t,n,r){if(cr){var i=mr(e,t,n,r);if(null===i)uo(e,t,r,pr,n),tr(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Gn=nr(Gn,e,t,n,r,i),!0;case"dragenter":return Jn=nr(Jn,e,t,n,r,i),!0;case"mouseover":return Qn=nr(Qn,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Yn.set(o,nr(Yn.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Xn.set(o,nr(Xn.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(tr(e,r),4&t&&-1<er.indexOf(e)){for(;null!==i;){var o=zo(i);if(null!==o&&Bn(o),null===(o=mr(e,t,n,r))&&uo(e,t,r,pr,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else uo(e,t,r,null,n)}}var pr=null;function mr(e,t,n,r){if(pr=null,null!==(e=Uo(e=Ft(r))))if(null===(t=ln(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=un(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 pr=e,null}function gr(e){switch(e){case"cancel":case"click":case"close":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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(yn()){case bn:return 1;case wn:return 4;case xn:case kn:return 16;case Sn:return 536870912;default:return 16}default:return 16}}var vr=null,yr=null,br=null;function wr(){if(br)return br;var e,t,n=yr,r=n.length,i="value"in vr?vr.value:vr.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 br=i.slice(e,1<t?1-t:void 0)}function xr(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 kr(){return!0}function Sr(){return!1}function Er(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)?kr:Sr,this.isPropagationStopped=Sr,this}return nt(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=kr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=kr)},persist:function(){},isPersistent:kr}),t}var _r,Cr,Nr,Ir={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tr=Er(Ir),Pr=nt({},Ir,{view:0,detail:0}),Rr=Er(Pr),Or=nt({},Pr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hr,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!==Nr&&(Nr&&"mousemove"===e.type?(_r=e.screenX-Nr.screenX,Cr=e.screenY-Nr.screenY):Cr=_r=0,Nr=e),_r)},movementY:function(e){return"movementY"in e?e.movementY:Cr}}),Ar=Er(Or),Lr=Er(nt({},Or,{dataTransfer:0})),jr=Er(nt({},Pr,{relatedTarget:0})),Dr=Er(nt({},Ir,{animationName:0,elapsedTime:0,pseudoElement:0})),Mr=nt({},Ir,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ur=Er(Mr),zr=Er(nt({},Ir,{data:0})),Fr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Br={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"},Vr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $r(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Vr[e])&&!!t[e]}function Hr(){return $r}var Wr=nt({},Pr,{key:function(e){if(e.key){var t=Fr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=xr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Br[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hr,charCode:function(e){return"keypress"===e.type?xr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?xr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),qr=Er(Wr),Kr=Er(nt({},Or,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Gr=Er(nt({},Pr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hr})),Jr=Er(nt({},Ir,{propertyName:0,elapsedTime:0,pseudoElement:0})),Qr=nt({},Or,{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}),Yr=Er(Qr),Xr=[9,13,27,32],Zr=Te&&"CompositionEvent"in window,ei=null;Te&&"documentMode"in document&&(ei=document.documentMode);var ti=Te&&"TextEvent"in window&&!ei,ni=Te&&(!Zr||ei&&8<ei&&11>=ei),ri=String.fromCharCode(32),ii=!1;function oi(e,t){switch(e){case"keyup":return-1!==Xr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ai(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var si=!1;var li={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 ui(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!li[e.type]:"textarea"===t}function ci(e,t,n,r){Wt(r),0<(t=fo(t,"onChange")).length&&(n=new Tr("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var di=null,fi=null;function hi(e){ro(e,0)}function pi(e){if(ft(Fo(e)))return e}function mi(e,t){if("change"===e)return t}var gi=!1;if(Te){var vi;if(Te){var yi="oninput"in document;if(!yi){var bi=document.createElement("div");bi.setAttribute("oninput","return;"),yi="function"==typeof bi.oninput}vi=yi}else vi=!1;gi=vi&&(!document.documentMode||9<document.documentMode)}function wi(){di&&(di.detachEvent("onpropertychange",xi),fi=di=null)}function xi(e){if("value"===e.propertyName&&pi(fi)){var t=[];ci(t,fi,e,Ft(e)),Qt(hi,t)}}function ki(e,t,n){"focusin"===e?(wi(),fi=n,(di=t).attachEvent("onpropertychange",xi)):"focusout"===e&&wi()}function Si(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return pi(fi)}function Ei(e,t){if("click"===e)return pi(t)}function _i(e,t){if("input"===e||"change"===e)return pi(t)}var Ci="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Ni(e,t){if(Ci(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(!Pe.call(t,i)||!Ci(e[i],t[i]))return!1}return!0}function Ii(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ti(e,t){var n,r=Ii(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=Ii(r)}}function Pi(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Pi(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Ri(){for(var e=window,t=ht();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=ht((e=t.contentWindow).document)}return t}function Oi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Ai(e){var t=Ri(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Pi(n.ownerDocument.documentElement,n)){if(null!==r&&Oi(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Ti(n,o);var a=Ti(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Li=Te&&"documentMode"in document&&11>=document.documentMode,ji=null,Di=null,Mi=null,Ui=!1;function zi(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Ui||null==ji||ji!==ht(r)||("selectionStart"in(r=ji)&&Oi(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},Mi&&Ni(Mi,r)||(Mi=r,0<(r=fo(Di,"onSelect")).length&&(t=new Tr("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ji)))}function Fi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Bi={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionend:Fi("Transition","TransitionEnd")},Vi={},$i={};function Hi(e){if(Vi[e])return Vi[e];if(!Bi[e])return e;var t,n=Bi[e];for(t in n)if(n.hasOwnProperty(t)&&t in $i)return Vi[e]=n[t];return e}Te&&($i=document.createElement("div").style,"AnimationEvent"in window||(delete Bi.animationend.animation,delete Bi.animationiteration.animation,delete Bi.animationstart.animation),"TransitionEvent"in window||delete Bi.transitionend.transition);var Wi=Hi("animationend"),qi=Hi("animationiteration"),Ki=Hi("animationstart"),Gi=Hi("transitionend"),Ji=new Map,Qi="abort auxClick 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 Yi(e,t){Ji.set(e,t),Ne(t,[e])}for(var Xi=0;Xi<Qi.length;Xi++){var Zi=Qi[Xi];Yi(Zi.toLowerCase(),"on"+(Zi[0].toUpperCase()+Zi.slice(1)))}Yi(Wi,"onAnimationEnd"),Yi(qi,"onAnimationIteration"),Yi(Ki,"onAnimationStart"),Yi("dblclick","onDoubleClick"),Yi("focusin","onFocus"),Yi("focusout","onBlur"),Yi(Gi,"onTransitionEnd"),Ie("onMouseEnter",["mouseout","mouseover"]),Ie("onMouseLeave",["mouseout","mouseover"]),Ie("onPointerEnter",["pointerout","pointerover"]),Ie("onPointerLeave",["pointerout","pointerover"]),Ne("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ne("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ne("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ne("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ne("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ne("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var eo="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(" "),to=new Set("cancel close invalid load scroll toggle".split(" ").concat(eo));function no(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,s,l){if(sn.apply(this,arguments),tn){if(!tn)throw Error(Ee(198));var u=nn;tn=!1,nn=null,rn||(rn=!0,on=u)}}(r,t,void 0,e),e.currentTarget=null}function ro(e,t){t=!!(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,u=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;no(i,s,u),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,u=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;no(i,s,u),o=l}}}if(rn)throw e=on,rn=!1,on=null,e}function io(e,t){var n=t[jo];void 0===n&&(n=t[jo]=new Set);var r=e+"__bubble";n.has(r)||(lo(t,e,2,!1),n.add(r))}function oo(e,t,n){var r=0;t&&(r|=4),lo(n,e,r,t)}var ao="_reactListening"+Math.random().toString(36).slice(2);function so(e){if(!e[ao]){e[ao]=!0,_e.forEach(function(t){"selectionchange"!==t&&(to.has(t)||oo(t,!1,e),oo(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[ao]||(t[ao]=!0,oo("selectionchange",!1,t))}}function lo(e,t,n,r){switch(gr(t)){case 1:var i=dr;break;case 4:i=fr;break;default:i=hr}n=i.bind(null,t,n,e),i=void 0,!Xt||"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 uo(e,t,n,r,i){var o=r;if(!(1&t||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||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=Uo(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}Qt(function(){var r=o,i=Ft(n),a=[];e:{var s=Ji.get(e);if(void 0!==s){var l=Tr,u=e;switch(e){case"keypress":if(0===xr(n))break e;case"keydown":case"keyup":l=qr;break;case"focusin":u="focus",l=jr;break;case"focusout":u="blur",l=jr;break;case"beforeblur":case"afterblur":l=jr;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=Ar;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=Lr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Gr;break;case Wi:case qi:case Ki:l=Dr;break;case Gi:l=Jr;break;case"scroll":l=Rr;break;case"wheel":l=Yr;break;case"copy":case"cut":case"paste":l=Ur;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Kr}var c=!!(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var h,p=r;null!==p;){var m=(h=p).stateNode;if(5===h.tag&&null!==m&&(h=m,null!==f&&(null!=(m=Yt(p,f))&&c.push(co(p,m,h)))),d)break;p=p.return}0<c.length&&(s=new l(s,u,null,n,i),a.push({event:s,listeners:c}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===zt||!(u=n.relatedTarget||n.fromElement)||!Uo(u)&&!u[Lo])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?Uo(u):null)&&(u!==(d=ln(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=Ar,m="onMouseLeave",f="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=Kr,m="onPointerLeave",f="onPointerEnter",p="pointer"),d=null==l?s:Fo(l),h=null==u?s:Fo(u),(s=new c(m,p+"leave",l,n,i)).target=d,s.relatedTarget=h,m=null,Uo(i)===r&&((c=new c(f,p+"enter",u,n,i)).target=h,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(f=u,p=0,h=c=l;h;h=ho(h))p++;for(h=0,m=f;m;m=ho(m))h++;for(;0<p-h;)c=ho(c),p--;for(;0<h-p;)f=ho(f),h--;for(;p--;){if(c===f||null!==f&&c===f.alternate)break e;c=ho(c),f=ho(f)}c=null}else c=null;null!==l&&po(a,s,l,c,!1),null!==u&&null!==d&&po(a,d,u,c,!0)}if("select"===(l=(s=r?Fo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=mi;else if(ui(s))if(gi)g=_i;else{g=Si;var v=ki}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=Ei);switch(g&&(g=g(e,r))?ci(a,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&bt(s,"number",s.value)),v=r?Fo(r):window,e){case"focusin":(ui(v)||"true"===v.contentEditable)&&(ji=v,Di=r,Mi=null);break;case"focusout":Mi=Di=ji=null;break;case"mousedown":Ui=!0;break;case"contextmenu":case"mouseup":case"dragend":Ui=!1,zi(a,n,i);break;case"selectionchange":if(Li)break;case"keydown":case"keyup":zi(a,n,i)}var y;if(Zr)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else si?oi(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(ni&&"ko"!==n.locale&&(si||"onCompositionStart"!==b?"onCompositionEnd"===b&&si&&(y=wr()):(yr="value"in(vr=i)?vr.value:vr.textContent,si=!0)),0<(v=fo(r,b)).length&&(b=new zr(b,e,null,n,i),a.push({event:b,listeners:v}),y?b.data=y:null!==(y=ai(n))&&(b.data=y))),(y=ti?function(e,t){switch(e){case"compositionend":return ai(t);case"keypress":return 32!==t.which?null:(ii=!0,ri);case"textInput":return(e=t.data)===ri&&ii?null:e;default:return null}}(e,n):function(e,t){if(si)return"compositionend"===e||!Zr&&oi(e,t)?(e=wr(),br=yr=vr=null,si=!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 ni&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=fo(r,"onBeforeInput")).length&&(i=new zr("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}ro(a,t)})}function co(e,t,n){return{instance:e,listener:t,currentTarget:n}}function fo(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Yt(e,n))&&r.unshift(co(e,o,i)),null!=(o=Yt(e,t))&&r.push(co(e,o,i))),e=e.return}return r}function ho(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function po(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,i?null!=(l=Yt(n,o))&&a.unshift(co(n,l,s)):i||null!=(l=Yt(n,o))&&a.push(co(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var mo=/\r\n?/g,go=/\u0000|\uFFFD/g;function vo(e){return("string"==typeof e?e:""+e).replace(mo,"\n").replace(go,"")}function yo(e,t,n){if(t=vo(t),vo(e)!==t&&n)throw Error(Ee(425))}function bo(){}var wo=null,xo=null;function ko(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var So="function"==typeof setTimeout?setTimeout:void 0,Eo="function"==typeof clearTimeout?clearTimeout:void 0,_o="function"==typeof Promise?Promise:void 0,Co="function"==typeof queueMicrotask?queueMicrotask:void 0!==_o?function(e){return _o.resolve(null).then(e).catch(No)}:So;function No(e){setTimeout(function(){throw e})}function Io(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void lr(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);lr(t)}function To(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)break;if("/$"===t)return null}}return e}function Po(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Ro=Math.random().toString(36).slice(2),Oo="__reactFiber$"+Ro,Ao="__reactProps$"+Ro,Lo="__reactContainer$"+Ro,jo="__reactEvents$"+Ro,Do="__reactListeners$"+Ro,Mo="__reactHandles$"+Ro;function Uo(e){var t=e[Oo];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Lo]||n[Oo]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Po(e);null!==e;){if(n=e[Oo])return n;e=Po(e)}return t}n=(e=n).parentNode}return null}function zo(e){return!(e=e[Oo]||e[Lo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Fo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(Ee(33))}function Bo(e){return e[Ao]||null}var Vo=[],$o=-1;function Ho(e){return{current:e}}function Wo(e){0>$o||(e.current=Vo[$o],Vo[$o]=null,$o--)}function qo(e,t){$o++,Vo[$o]=e.current,e.current=t}var Ko={},Go=Ho(Ko),Jo=Ho(!1),Qo=Ko;function Yo(e,t){var n=e.type.contextTypes;if(!n)return Ko;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Xo(e){return null!=(e=e.childContextTypes)}function Zo(){Wo(Jo),Wo(Go)}function ea(e,t,n){if(Go.current!==Ko)throw Error(Ee(168));qo(Go,t),qo(Jo,n)}function ta(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(Ee(108,lt(e)||"Unknown",i));return nt({},n,r)}function na(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ko,Qo=Go.current,qo(Go,e),qo(Jo,Jo.current),!0}function ra(e,t,n){var r=e.stateNode;if(!r)throw Error(Ee(169));n?(e=ta(e,t,Qo),r.__reactInternalMemoizedMergedChildContext=e,Wo(Jo),Wo(Go),qo(Go,e)):Wo(Jo),qo(Jo,n)}var ia=null,oa=!1,aa=!1;function sa(e){null===ia?ia=[e]:ia.push(e)}function la(){if(!aa&&null!==ia){aa=!0;var e=0,t=zn;try{var n=ia;for(zn=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}ia=null,oa=!1}catch(i){throw null!==ia&&(ia=ia.slice(e+1)),hn(bn,la),i}finally{zn=t,aa=!1}}return null}var ua=[],ca=0,da=null,fa=0,ha=[],pa=0,ma=null,ga=1,va="";function ya(e,t){ua[ca++]=fa,ua[ca++]=da,da=e,fa=t}function ba(e,t,n){ha[pa++]=ga,ha[pa++]=va,ha[pa++]=ma,ma=e;var r=ga;e=va;var i=32-Cn(r)-1;r&=~(1<<i),n+=1;var o=32-Cn(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,ga=1<<32-Cn(t)+i|n<<i|r,va=o+e}else ga=1<<o|n<<i|r,va=e}function wa(e){null!==e.return&&(ya(e,1),ba(e,1,0))}function xa(e){for(;e===da;)da=ua[--ca],ua[ca]=null,fa=ua[--ca],ua[ca]=null;for(;e===ma;)ma=ha[--pa],ha[pa]=null,va=ha[--pa],ha[pa]=null,ga=ha[--pa],ha[pa]=null}var ka=null,Sa=null,Ea=!1,_a=null;function Ca(e,t){var n=Jc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function Na(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ka=e,Sa=To(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ka=e,Sa=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==ma?{id:ga,overflow:va}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Jc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ka=e,Sa=null,!0);default:return!1}}function Ia(e){return!(!(1&e.mode)||128&e.flags)}function Ta(e){if(Ea){var t=Sa;if(t){var n=t;if(!Na(e,t)){if(Ia(e))throw Error(Ee(418));t=To(n.nextSibling);var r=ka;t&&Na(e,t)?Ca(r,n):(e.flags=-4097&e.flags|2,Ea=!1,ka=e)}}else{if(Ia(e))throw Error(Ee(418));e.flags=-4097&e.flags|2,Ea=!1,ka=e}}}function Pa(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ka=e}function Ra(e){if(e!==ka)return!1;if(!Ea)return Pa(e),Ea=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ko(e.type,e.memoizedProps)),t&&(t=Sa)){if(Ia(e))throw Oa(),Error(Ee(418));for(;t;)Ca(e,t),t=To(t.nextSibling)}if(Pa(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(Ee(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Sa=To(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Sa=null}}else Sa=ka?To(e.stateNode.nextSibling):null;return!0}function Oa(){for(var e=Sa;e;)e=To(e.nextSibling)}function Aa(){Sa=ka=null,Ea=!1}function La(e){null===_a?_a=[e]:_a.push(e)}var ja=ze.ReactCurrentBatchConfig;function Da(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(Ee(309));var r=n.stateNode}if(!r)throw Error(Ee(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=i.refs;null===e?delete t[o]:t[o]=e})._stringRef=o,t)}if("string"!=typeof e)throw Error(Ee(284));if(!n._owner)throw Error(Ee(290,e))}return e}function Ma(e,t){throw e=Object.prototype.toString.call(t),Error(Ee(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ua(e){return(0,e._init)(e._payload)}function za(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,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Yc(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|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=td(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var o=n.type;return o===Ve?c(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===Ye&&Ua(o)===t.type)?((r=i(t,n.props)).ref=Da(e,t,n),r.return=e,r):((r=Xc(n.type,n.key,n.props,null,e.mode,r)).ref=Da(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=nd(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function c(e,t,n,r,o){return null===t||7!==t.tag?((t=Zc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=td(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Fe:return(n=Xc(t.type,t.key,t.props,null,e.mode,n)).ref=Da(e,null,t),n.return=e,n;case Be:return(t=nd(t,e.mode,n)).return=e,t;case Ye:return d(e,(0,t._init)(t._payload),n)}if(wt(t)||et(t))return(t=Zc(t,e.mode,n,null)).return=e,t;Ma(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)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Fe:return n.key===i?l(e,t,n,r):null;case Be:return n.key===i?u(e,t,n,r):null;case Ye:return f(e,t,(i=n._init)(n._payload),r)}if(wt(n)||et(n))return null!==i?null:c(e,t,n,r,null);Ma(e,n)}return null}function h(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Fe:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case Be:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case Ye:return h(e,t,n,(0,r._init)(r._payload),i)}if(wt(r)||et(r))return c(t,e=e.get(n)||null,r,i,null);Ma(t,r)}return null}return function s(l,u,c,p){if("object"==typeof c&&null!==c&&c.type===Ve&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case Fe:e:{for(var m=c.key,g=u;null!==g;){if(g.key===m){if((m=c.type)===Ve){if(7===g.tag){n(l,g.sibling),(u=i(g,c.props.children)).return=l,l=u;break e}}else if(g.elementType===m||"object"==typeof m&&null!==m&&m.$$typeof===Ye&&Ua(m)===g.type){n(l,g.sibling),(u=i(g,c.props)).ref=Da(l,g,c),u.return=l,l=u;break e}n(l,g);break}t(l,g),g=g.sibling}c.type===Ve?((u=Zc(c.props.children,l.mode,p,c.key)).return=l,l=u):((p=Xc(c.type,c.key,c.props,null,l.mode,p)).ref=Da(l,u,c),p.return=l,l=p)}return a(l);case Be:e:{for(g=c.key;null!==u;){if(u.key===g){if(4===u.tag&&u.stateNode.containerInfo===c.containerInfo&&u.stateNode.implementation===c.implementation){n(l,u.sibling),(u=i(u,c.children||[])).return=l,l=u;break e}n(l,u);break}t(l,u),u=u.sibling}(u=nd(c,l.mode,p)).return=l,l=u}return a(l);case Ye:return s(l,u,(g=c._init)(c._payload),p)}if(wt(c))return function(i,a,s,l){for(var u=null,c=null,p=a,m=a=0,g=null;null!==p&&m<s.length;m++){p.index>m?(g=p,p=null):g=p.sibling;var v=f(i,p,s[m],l);if(null===v){null===p&&(p=g);break}e&&p&&null===v.alternate&&t(i,p),a=o(v,a,m),null===c?u=v:c.sibling=v,c=v,p=g}if(m===s.length)return n(i,p),Ea&&ya(i,m),u;if(null===p){for(;m<s.length;m++)null!==(p=d(i,s[m],l))&&(a=o(p,a,m),null===c?u=p:c.sibling=p,c=p);return Ea&&ya(i,m),u}for(p=r(i,p);m<s.length;m++)null!==(g=h(p,i,m,s[m],l))&&(e&&null!==g.alternate&&p.delete(null===g.key?m:g.key),a=o(g,a,m),null===c?u=g:c.sibling=g,c=g);return e&&p.forEach(function(e){return t(i,e)}),Ea&&ya(i,m),u}(l,u,c,p);if(et(c))return function(i,a,s,l){var u=et(s);if("function"!=typeof u)throw Error(Ee(150));if(null==(s=u.call(s)))throw Error(Ee(151));for(var c=u=null,p=a,m=a=0,g=null,v=s.next();null!==p&&!v.done;m++,v=s.next()){p.index>m?(g=p,p=null):g=p.sibling;var y=f(i,p,v.value,l);if(null===y){null===p&&(p=g);break}e&&p&&null===y.alternate&&t(i,p),a=o(y,a,m),null===c?u=y:c.sibling=y,c=y,p=g}if(v.done)return n(i,p),Ea&&ya(i,m),u;if(null===p){for(;!v.done;m++,v=s.next())null!==(v=d(i,v.value,l))&&(a=o(v,a,m),null===c?u=v:c.sibling=v,c=v);return Ea&&ya(i,m),u}for(p=r(i,p);!v.done;m++,v=s.next())null!==(v=h(p,i,m,v.value,l))&&(e&&null!==v.alternate&&p.delete(null===v.key?m:v.key),a=o(v,a,m),null===c?u=v:c.sibling=v,c=v);return e&&p.forEach(function(e){return t(i,e)}),Ea&&ya(i,m),u}(l,u,c,p);Ma(l,c)}return"string"==typeof c&&""!==c||"number"==typeof c?(c=""+c,null!==u&&6===u.tag?(n(l,u.sibling),(u=i(u,c)).return=l,l=u):(n(l,u),(u=td(c,l.mode,p)).return=l,l=u),a(l)):n(l,u)}}var Fa=za(!0),Ba=za(!1),Va=Ho(null),$a=null,Ha=null,Wa=null;function qa(){Wa=Ha=$a=null}function Ka(e){var t=Va.current;Wo(Va),e._currentValue=t}function Ga(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 Ja(e,t){$a=e,Wa=Ha=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Ml=!0),e.firstContext=null)}function Qa(e){var t=e._currentValue;if(Wa!==e)if(e={context:e,memoizedValue:t,next:null},null===Ha){if(null===$a)throw Error(Ee(308));Ha=e,$a.dependencies={lanes:0,firstContext:e}}else Ha=Ha.next=e;return t}var Ya=null;function Xa(e){null===Ya?Ya=[e]:Ya.push(e)}function Za(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Xa(t)):(n.next=i.next,i.next=n),t.interleaved=n,es(e,r)}function es(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var ts=!1;function ns(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function rs(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function is(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function os(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&qu){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,es(e,n)}return null===(i=r.interleaved)?(t.next=t,Xa(r)):(t.next=i.next,i.next=t),r.interleaved=t,es(e,n)}function as(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Un(e,n)}}function ss(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={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,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,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ls(e,t,n,r){var i=e.updateQueue;ts=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,u=l.next;l.next=null,null===a?o=u:a.next=u,a=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,c=u=l=null,s=o;;){var f=s.lane,h=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(f=t,h=n,m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(h,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=m.payload)?p.call(h,d,f):p))break e;d=nt({},d,f);break e;case 2:ts=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=h,l=d):c=c.next=h,a|=f;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(f=s).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===c&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);ec|=a,e.lanes=a,e.memoizedState=d}}function us(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(Ee(191,i));i.call(r)}}}var cs={},ds=Ho(cs),fs=Ho(cs),hs=Ho(cs);function ps(e){if(e===cs)throw Error(Ee(174));return e}function ms(e,t){switch(qo(hs,t),qo(fs,e),qo(ds,cs),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Nt(null,"");break;default:t=Nt(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Wo(ds),qo(ds,t)}function gs(){Wo(ds),Wo(fs),Wo(hs)}function vs(e){ps(hs.current);var t=ps(ds.current),n=Nt(t,e.type);t!==n&&(qo(fs,e),qo(ds,n))}function ys(e){fs.current===e&&(Wo(ds),Wo(fs))}var bs=Ho(0);function ws(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var xs=[];function ks(){for(var e=0;e<xs.length;e++)xs[e]._workInProgressVersionPrimary=null;xs.length=0}var Ss=ze.ReactCurrentDispatcher,Es=ze.ReactCurrentBatchConfig,_s=0,Cs=null,Ns=null,Is=null,Ts=!1,Ps=!1,Rs=0,Os=0;function As(){throw Error(Ee(321))}function Ls(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ci(e[n],t[n]))return!1;return!0}function js(e,t,n,r,i,o){if(_s=o,Cs=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ss.current=null===e||null===e.memoizedState?yl:bl,e=n(r,i),Ps){o=0;do{if(Ps=!1,Rs=0,25<=o)throw Error(Ee(301));o+=1,Is=Ns=null,t.updateQueue=null,Ss.current=wl,e=n(r,i)}while(Ps)}if(Ss.current=vl,t=null!==Ns&&null!==Ns.next,_s=0,Is=Ns=Cs=null,Ts=!1,t)throw Error(Ee(300));return e}function Ds(){var e=0!==Rs;return Rs=0,e}function Ms(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Is?Cs.memoizedState=Is=e:Is=Is.next=e,Is}function Us(){if(null===Ns){var e=Cs.alternate;e=null!==e?e.memoizedState:null}else e=Ns.next;var t=null===Is?Cs.memoizedState:Is.next;if(null!==t)Is=t,Ns=e;else{if(null===e)throw Error(Ee(310));e={memoizedState:(Ns=e).memoizedState,baseState:Ns.baseState,baseQueue:Ns.baseQueue,queue:Ns.queue,next:null},null===Is?Cs.memoizedState=Is=e:Is=Is.next=e}return Is}function zs(e,t){return"function"==typeof t?t(e):t}function Fs(e){var t=Us(),n=t.queue;if(null===n)throw Error(Ee(311));n.lastRenderedReducer=e;var r=Ns,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var s=a=null,l=null,u=o;do{var c=u.lane;if((_s&c)===c)null!==l&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===l?(s=l=d,a=r):l=l.next=d,Cs.lanes|=c,ec|=c}u=u.next}while(null!==u&&u!==o);null===l?a=r:l.next=s,Ci(r,t.memoizedState)||(Ml=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,Cs.lanes|=o,ec|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Bs(e){var t=Us(),n=t.queue;if(null===n)throw Error(Ee(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);Ci(o,t.memoizedState)||(Ml=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Vs(){}function $s(e,t){var n=Cs,r=Us(),i=t(),o=!Ci(r.memoizedState,i);if(o&&(r.memoizedState=i,Ml=!0),r=r.queue,tl(qs.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==Is&&1&Is.memoizedState.tag){if(n.flags|=2048,Qs(9,Ws.bind(null,n,r,i,t),void 0,null),null===Ku)throw Error(Ee(349));30&_s||Hs(n,t,i)}return i}function Hs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Cs.updateQueue)?(t={lastEffect:null,stores:null},Cs.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ws(e,t,n,r){t.value=n,t.getSnapshot=r,Ks(t)&&Gs(e)}function qs(e,t,n){return n(function(){Ks(t)&&Gs(e)})}function Ks(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ci(e,n)}catch(r){return!0}}function Gs(e){var t=es(e,1);null!==t&&wc(t,e,1,-1)}function Js(e){var t=Ms();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zs,lastRenderedState:e},t.queue=e,e=e.dispatch=hl.bind(null,Cs,e),[t.memoizedState,e]}function Qs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Cs.updateQueue)?(t={lastEffect:null,stores:null},Cs.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ys(){return Us().memoizedState}function Xs(e,t,n,r){var i=Ms();Cs.flags|=e,i.memoizedState=Qs(1|t,n,void 0,void 0===r?null:r)}function Zs(e,t,n,r){var i=Us();r=void 0===r?null:r;var o=void 0;if(null!==Ns){var a=Ns.memoizedState;if(o=a.destroy,null!==r&&Ls(r,a.deps))return void(i.memoizedState=Qs(t,n,o,r))}Cs.flags|=e,i.memoizedState=Qs(1|t,n,o,r)}function el(e,t){return Xs(8390656,8,e,t)}function tl(e,t){return Zs(2048,8,e,t)}function nl(e,t){return Zs(4,2,e,t)}function rl(e,t){return Zs(4,4,e,t)}function il(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ol(e,t,n){return n=null!=n?n.concat([e]):null,Zs(4,4,il.bind(null,t,e),n)}function al(){}function sl(e,t){var n=Us();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ls(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ll(e,t){var n=Us();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ls(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ul(e,t,n){return 21&_s?(Ci(n,t)||(n=jn(),Cs.lanes|=n,ec|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ml=!0),e.memoizedState=n)}function cl(e,t){var n=zn;zn=0!==n&&4>n?n:4,e(!0);var r=Es.transition;Es.transition={};try{e(!1),t()}finally{zn=n,Es.transition=r}}function dl(){return Us().memoizedState}function fl(e,t,n){var r=bc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},pl(e))ml(t,n);else if(null!==(n=Za(e,t,n,r))){wc(n,e,r,yc()),gl(n,t,r)}}function hl(e,t,n){var r=bc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(pl(e))ml(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,Ci(s,a)){var l=t.interleaved;return null===l?(i.next=i,Xa(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(u){}null!==(n=Za(e,t,i,r))&&(wc(n,e,r,i=yc()),gl(n,t,r))}}function pl(e){var t=e.alternate;return e===Cs||null!==t&&t===Cs}function ml(e,t){Ps=Ts=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gl(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Un(e,n)}}var vl={readContext:Qa,useCallback:As,useContext:As,useEffect:As,useImperativeHandle:As,useInsertionEffect:As,useLayoutEffect:As,useMemo:As,useReducer:As,useRef:As,useState:As,useDebugValue:As,useDeferredValue:As,useTransition:As,useMutableSource:As,useSyncExternalStore:As,useId:As,unstable_isNewReconciler:!1},yl={readContext:Qa,useCallback:function(e,t){return Ms().memoizedState=[e,void 0===t?null:t],e},useContext:Qa,useEffect:el,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Xs(4194308,4,il.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Xs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xs(4,2,e,t)},useMemo:function(e,t){var n=Ms();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ms();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=fl.bind(null,Cs,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ms().memoizedState=e},useState:Js,useDebugValue:al,useDeferredValue:function(e){return Ms().memoizedState=e},useTransition:function(){var e=Js(!1),t=e[0];return e=cl.bind(null,e[1]),Ms().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Cs,i=Ms();if(Ea){if(void 0===n)throw Error(Ee(407));n=n()}else{if(n=t(),null===Ku)throw Error(Ee(349));30&_s||Hs(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,el(qs.bind(null,r,o,e),[e]),r.flags|=2048,Qs(9,Ws.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ms(),t=Ku.identifierPrefix;if(Ea){var n=va;t=":"+t+"R"+(n=(ga&~(1<<32-Cn(ga)-1)).toString(32)+n),0<(n=Rs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Os++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},bl={readContext:Qa,useCallback:sl,useContext:Qa,useEffect:tl,useImperativeHandle:ol,useInsertionEffect:nl,useLayoutEffect:rl,useMemo:ll,useReducer:Fs,useRef:Ys,useState:function(){return Fs(zs)},useDebugValue:al,useDeferredValue:function(e){return ul(Us(),Ns.memoizedState,e)},useTransition:function(){return[Fs(zs)[0],Us().memoizedState]},useMutableSource:Vs,useSyncExternalStore:$s,useId:dl,unstable_isNewReconciler:!1},wl={readContext:Qa,useCallback:sl,useContext:Qa,useEffect:tl,useImperativeHandle:ol,useInsertionEffect:nl,useLayoutEffect:rl,useMemo:ll,useReducer:Bs,useRef:Ys,useState:function(){return Bs(zs)},useDebugValue:al,useDeferredValue:function(e){var t=Us();return null===Ns?t.memoizedState=e:ul(t,Ns.memoizedState,e)},useTransition:function(){return[Bs(zs)[0],Us().memoizedState]},useMutableSource:Vs,useSyncExternalStore:$s,useId:dl,unstable_isNewReconciler:!1};function xl(e,t){if(e&&e.defaultProps){for(var n in t=nt({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function kl(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:nt({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Sl={isMounted:function(e){return!!(e=e._reactInternals)&&ln(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=yc(),i=bc(e),o=is(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=os(e,o,i))&&(wc(t,e,i,r),as(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=yc(),i=bc(e),o=is(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=os(e,o,i))&&(wc(t,e,i,r),as(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yc(),r=bc(e),i=is(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=os(e,i,r))&&(wc(t,e,r,n),as(t,e,r))}};function El(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!Ni(n,r)||!Ni(i,o))}function _l(e,t,n){var r=!1,i=Ko,o=t.contextType;return"object"==typeof o&&null!==o?o=Qa(o):(i=Xo(t)?Qo:Go.current,o=(r=null!=(r=t.contextTypes))?Yo(e,i):Ko),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Sl,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Cl(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&&Sl.enqueueReplaceState(t,t.state,null)}function Nl(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},ns(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Qa(o):(o=Xo(t)?Qo:Go.current,i.context=Yo(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(kl(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Sl.enqueueReplaceState(i,i.state,null),ls(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Il(e,t){try{var n="",r=t;do{n+=at(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i,digest:null}}function Tl(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}var Pl="function"==typeof WeakMap?WeakMap:Map;function Rl(e,t,n){(n=is(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){lc||(lc=!0,uc=r)},n}function Ol(e,t,n){(n=is(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===cc?cc=new Set([this]):cc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function Al(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Pl;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)||(i.add(n),e=$c.bind(null,e,t,n),t.then(e,e))}function Ll(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function jl(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=is(-1,1)).tag=2,os(n,t,1))),n.lanes|=1),e)}var Dl=ze.ReactCurrentOwner,Ml=!1;function Ul(e,t,n,r){t.child=null===e?Ba(t,null,n,r):Fa(t,e.child,n,r)}function zl(e,t,n,r,i){n=n.render;var o=t.ref;return Ja(t,i),r=js(e,t,n,r,o,i),n=Ds(),null===e||Ml?(Ea&&n&&wa(t),t.flags|=1,Ul(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,lu(e,t,i))}function Fl(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Qc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Xc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Bl(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:Ni)(a,r)&&e.ref===t.ref)return lu(e,t,i)}return t.flags|=1,(e=Yc(o,r)).ref=t.ref,e.return=t,t.child=e}function Bl(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(Ni(o,r)&&e.ref===t.ref){if(Ml=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,lu(e,t,i);131072&e.flags&&(Ml=!0)}}return Hl(e,t,n,r,i)}function Vl(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,qo(Yu,Qu),Qu|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,qo(Yu,Qu),Qu|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},qo(Yu,Qu),Qu|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,qo(Yu,Qu),Qu|=r;return Ul(e,t,i,n),t.child}function $l(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Hl(e,t,n,r,i){var o=Xo(n)?Qo:Go.current;return o=Yo(t,o),Ja(t,i),n=js(e,t,n,r,o,i),r=Ds(),null===e||Ml?(Ea&&r&&wa(t),t.flags|=1,Ul(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,lu(e,t,i))}function Wl(e,t,n,r,i){if(Xo(n)){var o=!0;na(t)}else o=!1;if(Ja(t,i),null===t.stateNode)su(e,t),_l(t,n,r),Nl(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"==typeof u&&null!==u?u=Qa(u):u=Yo(t,u=Xo(n)?Qo:Go.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==u)&&Cl(t,a,r,u),ts=!1;var f=t.memoizedState;a.state=f,ls(t,r,a,i),l=t.memoizedState,s!==r||f!==l||Jo.current||ts?("function"==typeof c&&(kl(t,n,c,r),l=t.memoizedState),(s=ts||El(t,n,s,r,f,l,u))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,rs(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:xl(t.type,s),a.props=u,d=t.pendingProps,f=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=Qa(l):l=Yo(t,l=Xo(n)?Qo:Go.current);var h=n.getDerivedStateFromProps;(c="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&Cl(t,a,r,l),ts=!1,f=t.memoizedState,a.state=f,ls(t,r,a,i);var p=t.memoizedState;s!==d||f!==p||Jo.current||ts?("function"==typeof h&&(kl(t,n,h,r),p=t.memoizedState),(u=ts||El(t,n,u,r,f,p,l)||!1)?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=u):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ql(e,t,n,r,o,i)}function ql(e,t,n,r,i,o){$l(e,t);var a=!!(128&t.flags);if(!r&&!a)return i&&ra(t,n,!1),lu(e,t,o);r=t.stateNode,Dl.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Fa(t,e.child,null,o),t.child=Fa(t,null,s,o)):Ul(e,t,s,o),t.memoizedState=r.state,i&&ra(t,n,!0),t.child}function Kl(e){var t=e.stateNode;t.pendingContext?ea(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ea(0,t.context,!1),ms(e,t.containerInfo)}function Gl(e,t,n,r,i){return Aa(),La(i),t.flags|=256,Ul(e,t,n,r),t.child}var Jl,Ql,Yl,Xl,Zl={dehydrated:null,treeContext:null,retryLane:0};function eu(e){return{baseLanes:e,cachePool:null,transitions:null}}function tu(e,t,n){var r,i=t.pendingProps,o=bs.current,a=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&o)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),qo(bs,1&o),null===e)return Ta(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=i.children,e=i.fallback,a?(i=t.mode,a=t.child,s={mode:"hidden",children:s},1&i||null===a?a=ed(s,i,0,null):(a.childLanes=0,a.pendingProps=s),e=Zc(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=eu(n),t.memoizedState=Zl,e):nu(t,s));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,a){if(n)return 256&t.flags?(t.flags&=-257,ru(e,t,a,r=Tl(Error(Ee(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=ed({mode:"visible",children:r.children},i,0,null),(o=Zc(o,i,a,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,1&t.mode&&Fa(t,e.child,null,a),t.child.memoizedState=eu(a),t.memoizedState=Zl,o);if(!(1&t.mode))return ru(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,ru(e,t,a,r=Tl(o=Error(Ee(419)),r,void 0))}if(s=0!==(a&e.childLanes),Ml||s){if(null!==(r=Ku)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|a))?0:i)&&i!==o.retryLane&&(o.retryLane=i,es(e,i),wc(r,e,i,-1))}return Ac(),ru(e,t,a,r=Tl(Error(Ee(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Wc.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Sa=To(i.nextSibling),ka=t,Ea=!0,_a=null,null!==e&&(ha[pa++]=ga,ha[pa++]=va,ha[pa++]=ma,ga=e.id,va=e.overflow,ma=t),t=nu(t,r.children),t.flags|=4096,t)}(e,t,s,i,r,o,n);if(a){a=i.fallback,s=t.mode,r=(o=e.child).sibling;var l={mode:"hidden",children:i.children};return 1&s||t.child===o?(i=Yc(o,l)).subtreeFlags=14680064&o.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null),null!==r?a=Yc(r,a):(a=Zc(a,s,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,s=null===(s=e.child.memoizedState)?eu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=Zl,i}return e=(a=e.child).sibling,i=Yc(a,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function nu(e,t){return(t=ed({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function ru(e,t,n,r){return null!==r&&La(r),Fa(t,e.child,null,n),(e=nu(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function iu(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ga(e.return,t,n)}function ou(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function au(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ul(e,t,r.children,n),2&(r=bs.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&iu(e,n,t);else if(19===e.tag)iu(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(qo(bs,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ws(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ou(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ws(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ou(t,!0,n,null,o);break;case"together":ou(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function su(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function lu(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),ec|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(Ee(153));if(null!==t.child){for(n=Yc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Yc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function uu(e,t){if(!Ea)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 cu(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|=14680064&i.subtreeFlags,r|=14680064&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 du(e,t,n){var r=t.pendingProps;switch(xa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return cu(t),null;case 1:case 17:return Xo(t.type)&&Zo(),cu(t),null;case 3:return r=t.stateNode,gs(),Wo(Jo),Wo(Go),ks(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Ra(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==_a&&(Ec(_a),_a=null))),Ql(e,t),cu(t),null;case 5:ys(t);var i=ps(hs.current);if(n=t.type,null!==e&&null!=t.stateNode)Yl(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(Ee(166));return cu(t),null}if(e=ps(ds.current),Ra(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Oo]=t,r[Ao]=o,e=!!(1&t.mode),n){case"dialog":io("cancel",r),io("close",r);break;case"iframe":case"object":case"embed":io("load",r);break;case"video":case"audio":for(i=0;i<eo.length;i++)io(eo[i],r);break;case"source":io("error",r);break;case"img":case"image":case"link":io("error",r),io("load",r);break;case"details":io("toggle",r);break;case"input":mt(r,o),io("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},io("invalid",r);break;case"textarea":St(r,o),io("invalid",r)}for(var a in Mt(n,o),i=null,o)if(o.hasOwnProperty(a)){var s=o[a];"children"===a?"string"==typeof s?r.textContent!==s&&(!0!==o.suppressHydrationWarning&&yo(r.textContent,s,e),i=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==o.suppressHydrationWarning&&yo(r.textContent,s,e),i=["children",""+s]):Ce.hasOwnProperty(a)&&null!=s&&"onScroll"===a&&io("scroll",r)}switch(n){case"input":dt(r),yt(r,o,!0);break;case"textarea":dt(r),_t(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=bo)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{a=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=Ct(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=a.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),"select"===n&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Oo]=t,e[Ao]=r,Jl(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ut(n,r),n){case"dialog":io("cancel",e),io("close",e),i=r;break;case"iframe":case"object":case"embed":io("load",e),i=r;break;case"video":case"audio":for(i=0;i<eo.length;i++)io(eo[i],e);i=r;break;case"source":io("error",e),i=r;break;case"img":case"image":case"link":io("error",e),io("load",e),i=r;break;case"details":io("toggle",e),i=r;break;case"input":mt(e,r),i=pt(e,r),io("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=nt({},r,{value:void 0}),io("invalid",e);break;case"textarea":St(e,r),i=kt(e,r),io("invalid",e)}for(o in Mt(n,i),s=i)if(s.hasOwnProperty(o)){var l=s[o];"style"===o?jt(e,l):"dangerouslySetInnerHTML"===o?null!=(l=l?l.__html:void 0)&&Pt(e,l):"children"===o?"string"==typeof l?("textarea"!==n||""!==l)&&Rt(e,l):"number"==typeof l&&Rt(e,""+l):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(Ce.hasOwnProperty(o)?null!=l&&"onScroll"===o&&io("scroll",e):null!=l&&Ue(e,o,l,a))}switch(n){case"input":dt(e),yt(e,r,!1);break;case"textarea":dt(e),_t(e);break;case"option":null!=r.value&&e.setAttribute("value",""+ut(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?xt(e,!!r.multiple,o,!1):null!=r.defaultValue&&xt(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=bo)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return cu(t),null;case 6:if(e&&null!=t.stateNode)Xl(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(Ee(166));if(n=ps(hs.current),ps(ds.current),Ra(t)){if(r=t.stateNode,n=t.memoizedProps,r[Oo]=t,(o=r.nodeValue!==n)&&null!==(e=ka))switch(e.tag){case 3:yo(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&yo(r.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Oo]=t,t.stateNode=r}return cu(t),null;case 13:if(Wo(bs),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(Ea&&null!==Sa&&1&t.mode&&!(128&t.flags))Oa(),Aa(),t.flags|=98560,o=!1;else if(o=Ra(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(Ee(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(Ee(317));o[Oo]=t}else Aa(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;cu(t),o=!1}else null!==_a&&(Ec(_a),_a=null),o=!0;if(!o)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&bs.current?0===Xu&&(Xu=3):Ac())),null!==t.updateQueue&&(t.flags|=4),cu(t),null);case 4:return gs(),Ql(e,t),null===e&&so(t.stateNode.containerInfo),cu(t),null;case 10:return Ka(t.type._context),cu(t),null;case 19:if(Wo(bs),null===(o=t.memoizedState))return cu(t),null;if(r=!!(128&t.flags),null===(a=o.rendering))if(r)uu(o,!1);else{if(0!==Xu||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=ws(e))){for(t.flags|=128,uu(o,!1),null!==(r=a.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(a=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return qo(bs,1&bs.current|2),t.child}e=e.sibling}null!==o.tail&&vn()>ac&&(t.flags|=128,r=!0,uu(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ws(a))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),uu(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate&&!Ea)return cu(t),null}else 2*vn()-o.renderingStartTime>ac&&1073741824!==n&&(t.flags|=128,r=!0,uu(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=o.last)?n.sibling=a:t.child=a,o.last=a)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=vn(),t.sibling=null,n=bs.current,qo(bs,r?1&n|2:1&n),t):(cu(t),null);case 22:case 23:return Tc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Qu)&&(cu(t),6&t.subtreeFlags&&(t.flags|=8192)):cu(t),null;case 24:case 25:return null}throw Error(Ee(156,t.tag))}function fu(e,t){switch(xa(t),t.tag){case 1:return Xo(t.type)&&Zo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return gs(),Wo(Jo),Wo(Go),ks(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return ys(t),null;case 13:if(Wo(bs),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(Ee(340));Aa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Wo(bs),null;case 4:return gs(),null;case 10:return Ka(t.type._context),null;case 22:case 23:return Tc(),null;default:return null}}Jl=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ql=function(){},Yl=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ps(ds.current);var o,a=null;switch(n){case"input":i=pt(e,i),r=pt(e,r),a=[];break;case"select":i=nt({},i,{value:void 0}),r=nt({},r,{value:void 0}),a=[];break;case"textarea":i=kt(e,i),r=kt(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=bo)}for(u in Mt(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var s=i[u];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(Ce.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var l=r[u];if(s=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(null!=l||null!=s))if("style"===u)if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(a||(a=[]),a.push(u,n)),n=l;else"dangerouslySetInnerHTML"===u?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(u,l)):"children"===u?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(u,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(Ce.hasOwnProperty(u)?(null!=l&&"onScroll"===u&&io("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},Xl=function(e,t,n,r){n!==r&&(t.flags|=4)};var hu=!1,pu=!1,mu="function"==typeof WeakSet?WeakSet:Set,gu=null;function vu(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){Vc(e,t,r)}else n.current=null}function yu(e,t,n){try{n()}catch(r){Vc(e,t,r)}}var bu=!1;function wu(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&yu(t,n,o)}i=i.next}while(i!==r)}}function xu(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ku(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function Su(e){var t=e.alternate;null!==t&&(e.alternate=null,Su(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[Oo],delete t[Ao],delete t[jo],delete t[Do],delete t[Mo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Eu(e){return 5===e.tag||3===e.tag||4===e.tag}function _u(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Eu(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(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 Cu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=bo));else if(4!==r&&null!==(e=e.child))for(Cu(e,t,n),e=e.sibling;null!==e;)Cu(e,t,n),e=e.sibling}function Nu(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&&null!==(e=e.child))for(Nu(e,t,n),e=e.sibling;null!==e;)Nu(e,t,n),e=e.sibling}var Iu=null,Tu=!1;function Pu(e,t,n){for(n=n.child;null!==n;)Ru(e,t,n),n=n.sibling}function Ru(e,t,n){if(_n&&"function"==typeof _n.onCommitFiberUnmount)try{_n.onCommitFiberUnmount(En,n)}catch(s){}switch(n.tag){case 5:pu||vu(n,t);case 6:var r=Iu,i=Tu;Iu=null,Pu(e,t,n),Tu=i,null!==(Iu=r)&&(Tu?(e=Iu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):Iu.removeChild(n.stateNode));break;case 18:null!==Iu&&(Tu?(e=Iu,n=n.stateNode,8===e.nodeType?Io(e.parentNode,n):1===e.nodeType&&Io(e,n),lr(e)):Io(Iu,n.stateNode));break;case 4:r=Iu,i=Tu,Iu=n.stateNode.containerInfo,Tu=!0,Pu(e,t,n),Iu=r,Tu=i;break;case 0:case 11:case 14:case 15:if(!pu&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(2&o||4&o)&&yu(n,t,a),i=i.next}while(i!==r)}Pu(e,t,n);break;case 1:if(!pu&&(vu(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Vc(n,t,s)}Pu(e,t,n);break;case 21:Pu(e,t,n);break;case 22:1&n.mode?(pu=(r=pu)||null!==n.memoizedState,Pu(e,t,n),pu=r):Pu(e,t,n);break;default:Pu(e,t,n)}}function Ou(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new mu),t.forEach(function(t){var r=qc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Au(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;null!==s;){switch(s.tag){case 5:Iu=s.stateNode,Tu=!1;break e;case 3:case 4:Iu=s.stateNode.containerInfo,Tu=!0;break e}s=s.return}if(null===Iu)throw Error(Ee(160));Ru(o,a,i),Iu=null,Tu=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(u){Vc(i,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)Lu(t,e),t=t.sibling}function Lu(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Au(t,e),ju(e),4&r){try{wu(3,e,e.return),xu(3,e)}catch(m){Vc(e,e.return,m)}try{wu(5,e,e.return)}catch(m){Vc(e,e.return,m)}}break;case 1:Au(t,e),ju(e),512&r&&null!==n&&vu(n,n.return);break;case 5:if(Au(t,e),ju(e),512&r&&null!==n&&vu(n,n.return),32&e.flags){var i=e.stateNode;try{Rt(i,"")}catch(m){Vc(e,e.return,m)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,a=null!==n?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===o.type&&null!=o.name&>(i,o),Ut(s,a);var u=Ut(s,o);for(a=0;a<l.length;a+=2){var c=l[a],d=l[a+1];"style"===c?jt(i,d):"dangerouslySetInnerHTML"===c?Pt(i,d):"children"===c?Rt(i,d):Ue(i,c,d,u)}switch(s){case"input":vt(i,o);break;case"textarea":Et(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;null!=h?xt(i,!!o.multiple,h,!1):f!==!!o.multiple&&(null!=o.defaultValue?xt(i,!!o.multiple,o.defaultValue,!0):xt(i,!!o.multiple,o.multiple?[]:"",!1))}i[Ao]=o}catch(m){Vc(e,e.return,m)}}break;case 6:if(Au(t,e),ju(e),4&r){if(null===e.stateNode)throw Error(Ee(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(m){Vc(e,e.return,m)}}break;case 3:if(Au(t,e),ju(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{lr(t.containerInfo)}catch(m){Vc(e,e.return,m)}break;case 4:default:Au(t,e),ju(e);break;case 13:Au(t,e),ju(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(oc=vn())),4&r&&Ou(e);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&e.mode?(pu=(u=pu)||c,Au(t,e),pu=u):Au(t,e),ju(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!c&&1&e.mode)for(gu=e,c=e.child;null!==c;){for(d=gu=c;null!==gu;){switch(h=(f=gu).child,f.tag){case 0:case 11:case 14:case 15:wu(4,f,f.return);break;case 1:vu(f,f.return);var p=f.stateNode;if("function"==typeof p.componentWillUnmount){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(m){Vc(r,n,m)}}break;case 5:vu(f,f.return);break;case 22:if(null!==f.memoizedState){zu(d);continue}}null!==h?(h.return=f,gu=h):zu(d)}c=c.sibling}e:for(c=null,d=e;;){if(5===d.tag){if(null===c){c=d;try{i=d.stateNode,u?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(s=d.stateNode,a=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=Lt("display",a))}catch(m){Vc(e,e.return,m)}}}else if(6===d.tag){if(null===c)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){Vc(e,e.return,m)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Au(t,e),ju(e),4&r&&Ou(e);case 21:}}function ju(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(Eu(n)){var r=n;break e}n=n.return}throw Error(Ee(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(Rt(i,""),r.flags&=-33),Nu(e,_u(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;Cu(e,_u(e),o);break;default:throw Error(Ee(161))}}catch(a){Vc(e,e.return,a)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Du(e,t,n){gu=e,Mu(e)}function Mu(e,t,n){for(var r=!!(1&e.mode);null!==gu;){var i=gu,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||hu;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||pu;s=hu;var u=pu;if(hu=a,(pu=l)&&!u)for(gu=i;null!==gu;)l=(a=gu).child,22===a.tag&&null!==a.memoizedState?Fu(i):null!==l?(l.return=a,gu=l):Fu(i);for(;null!==o;)gu=o,Mu(o),o=o.sibling;gu=i,hu=s,pu=u}Uu(e)}else 8772&i.subtreeFlags&&null!==o?(o.return=i,gu=o):Uu(e)}}function Uu(e){for(;null!==gu;){var t=gu;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:pu||xu(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!pu)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:xl(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&us(t,o,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}us(t,a,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&lr(d)}}}break;default:throw Error(Ee(163))}pu||512&t.flags&&ku(t)}catch(f){Vc(t,t.return,f)}}if(t===e){gu=null;break}if(null!==(n=t.sibling)){n.return=t.return,gu=n;break}gu=t.return}}function zu(e){for(;null!==gu;){var t=gu;if(t===e){gu=null;break}var n=t.sibling;if(null!==n){n.return=t.return,gu=n;break}gu=t.return}}function Fu(e){for(;null!==gu;){var t=gu;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{xu(4,t)}catch(l){Vc(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(l){Vc(t,i,l)}}var o=t.return;try{ku(t)}catch(l){Vc(t,o,l)}break;case 5:var a=t.return;try{ku(t)}catch(l){Vc(t,a,l)}}}catch(l){Vc(t,t.return,l)}if(t===e){gu=null;break}var s=t.sibling;if(null!==s){s.return=t.return,gu=s;break}gu=t.return}}var Bu,Vu=Math.ceil,$u=ze.ReactCurrentDispatcher,Hu=ze.ReactCurrentOwner,Wu=ze.ReactCurrentBatchConfig,qu=0,Ku=null,Gu=null,Ju=0,Qu=0,Yu=Ho(0),Xu=0,Zu=null,ec=0,tc=0,nc=0,rc=null,ic=null,oc=0,ac=1/0,sc=null,lc=!1,uc=null,cc=null,dc=!1,fc=null,hc=0,pc=0,mc=null,gc=-1,vc=0;function yc(){return 6&qu?vn():-1!==gc?gc:gc=vn()}function bc(e){return 1&e.mode?2&qu&&0!==Ju?Ju&-Ju:null!==ja.transition?(0===vc&&(vc=jn()),vc):0!==(e=zn)?e:e=void 0===(e=window.event)?16:gr(e.type):1}function wc(e,t,n,r){if(50<pc)throw pc=0,mc=null,Error(Ee(185));Mn(e,n,r),2&qu&&e===Ku||(e===Ku&&(!(2&qu)&&(tc|=n),4===Xu&&_c(e,Ju)),xc(e,r),1===n&&0===qu&&!(1&t.mode)&&(ac=vn()+500,oa&&la()))}function xc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-Cn(o),s=1<<a,l=i[a];-1===l?0!==(s&n)&&0===(s&r)||(i[a]=An(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=On(e,e===Ku?Ju:0);if(0===r)null!==n&&pn(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&pn(n),1===t)0===e.tag?function(e){oa=!0,sa(e)}(Cc.bind(null,e)):sa(Cc.bind(null,e)),Co(function(){!(6&qu)&&la()}),n=null;else{switch(Fn(r)){case 1:n=bn;break;case 4:n=wn;break;case 16:default:n=xn;break;case 536870912:n=Sn}n=Kc(n,kc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function kc(e,t){if(gc=-1,vc=0,6&qu)throw Error(Ee(327));var n=e.callbackNode;if(Fc()&&e.callbackNode!==n)return null;var r=On(e,e===Ku?Ju:0);if(0===r)return null;if(30&r||0!==(r&e.expiredLanes)||t)t=Lc(e,r);else{t=r;var i=qu;qu|=2;var o=Oc();for(Ku===e&&Ju===t||(sc=null,ac=vn()+500,Pc(e,t));;)try{Dc();break}catch(s){Rc(e,s)}qa(),$u.current=o,qu=i,null!==Gu?t=0:(Ku=null,Ju=0,t=Xu)}if(0!==t){if(2===t&&(0!==(i=Ln(e))&&(r=i,t=Sc(e,i))),1===t)throw n=Zu,Pc(e,0),_c(e,r),xc(e,vn()),n;if(6===t)_c(e,r);else{if(i=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Ci(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}(i)||(t=Lc(e,r),2===t&&(o=Ln(e),0!==o&&(r=o,t=Sc(e,o))),1!==t)))throw n=Zu,Pc(e,0),_c(e,r),xc(e,vn()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Ee(345));case 2:case 5:zc(e,ic,sc);break;case 3:if(_c(e,r),(130023424&r)===r&&10<(t=oc+500-vn())){if(0!==On(e,0))break;if(((i=e.suspendedLanes)&r)!==r){yc(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=So(zc.bind(null,e,ic,sc),t);break}zc(e,ic,sc);break;case 4:if(_c(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-Cn(r);o=1<<a,(a=t[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=vn()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Vu(r/1960))-r)){e.timeoutHandle=So(zc.bind(null,e,ic,sc),r);break}zc(e,ic,sc);break;default:throw Error(Ee(329))}}}return xc(e,vn()),e.callbackNode===n?kc.bind(null,e):null}function Sc(e,t){var n=rc;return e.current.memoizedState.isDehydrated&&(Pc(e,t).flags|=256),2!==(e=Lc(e,t))&&(t=ic,ic=n,null!==t&&Ec(t)),e}function Ec(e){null===ic?ic=e:ic.push.apply(ic,e)}function _c(e,t){for(t&=~nc,t&=~tc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Cn(t),r=1<<n;e[n]=-1,t&=~r}}function Cc(e){if(6&qu)throw Error(Ee(327));Fc();var t=On(e,0);if(!(1&t))return xc(e,vn()),null;var n=Lc(e,t);if(0!==e.tag&&2===n){var r=Ln(e);0!==r&&(t=r,n=Sc(e,r))}if(1===n)throw n=Zu,Pc(e,0),_c(e,t),xc(e,vn()),n;if(6===n)throw Error(Ee(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,zc(e,ic,sc),xc(e,vn()),null}function Nc(e,t){var n=qu;qu|=1;try{return e(t)}finally{0===(qu=n)&&(ac=vn()+500,oa&&la())}}function Ic(e){null!==fc&&0===fc.tag&&!(6&qu)&&Fc();var t=qu;qu|=1;var n=Wu.transition,r=zn;try{if(Wu.transition=null,zn=1,e)return e()}finally{zn=r,Wu.transition=n,!(6&(qu=t))&&la()}}function Tc(){Qu=Yu.current,Wo(Yu)}function Pc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Eo(n)),null!==Gu)for(n=Gu.return;null!==n;){var r=n;switch(xa(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Zo();break;case 3:gs(),Wo(Jo),Wo(Go),ks();break;case 5:ys(r);break;case 4:gs();break;case 13:case 19:Wo(bs);break;case 10:Ka(r.type._context);break;case 22:case 23:Tc()}n=n.return}if(Ku=e,Gu=e=Yc(e.current,null),Ju=Qu=t,Xu=0,Zu=null,nc=tc=ec=0,ic=rc=null,null!==Ya){for(t=0;t<Ya.length;t++)if(null!==(r=(n=Ya[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Ya=null}return e}function Rc(e,t){for(;;){var n=Gu;try{if(qa(),Ss.current=vl,Ts){for(var r=Cs.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}Ts=!1}if(_s=0,Is=Ns=Cs=null,Ps=!1,Rs=0,Hu.current=null,null===n||null===n.return){Xu=1,Zu=t,Gu=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Ju,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var u=l,c=s,d=c.tag;if(!(1&c.mode||0!==d&&11!==d&&15!==d)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Ll(a);if(null!==h){h.flags&=-257,jl(h,a,s,0,t),1&h.mode&&Al(o,u,t),l=u;var p=(t=h).updateQueue;if(null===p){var m=new Set;m.add(l),t.updateQueue=m}else p.add(l);break e}if(!(1&t)){Al(o,u,t),Ac();break e}l=Error(Ee(426))}else if(Ea&&1&s.mode){var g=Ll(a);if(null!==g){!(65536&g.flags)&&(g.flags|=256),jl(g,a,s,0,t),La(Il(l,s));break e}}o=l=Il(l,s),4!==Xu&&(Xu=2),null===rc?rc=[o]:rc.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,ss(o,Rl(0,l,t));break e;case 1:s=l;var v=o.type,y=o.stateNode;if(!(128&o.flags||"function"!=typeof v.getDerivedStateFromError&&(null===y||"function"!=typeof y.componentDidCatch||null!==cc&&cc.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t,ss(o,Ol(o,s,t));break e}}o=o.return}while(null!==o)}Uc(n)}catch(b){t=b,Gu===n&&null!==n&&(Gu=n=n.return);continue}break}}function Oc(){var e=$u.current;return $u.current=vl,null===e?vl:e}function Ac(){0!==Xu&&3!==Xu&&2!==Xu||(Xu=4),null===Ku||!(268435455&ec)&&!(268435455&tc)||_c(Ku,Ju)}function Lc(e,t){var n=qu;qu|=2;var r=Oc();for(Ku===e&&Ju===t||(sc=null,Pc(e,t));;)try{jc();break}catch(i){Rc(e,i)}if(qa(),qu=n,$u.current=r,null!==Gu)throw Error(Ee(261));return Ku=null,Ju=0,Xu}function jc(){for(;null!==Gu;)Mc(Gu)}function Dc(){for(;null!==Gu&&!mn();)Mc(Gu)}function Mc(e){var t=Bu(e.alternate,e,Qu);e.memoizedProps=e.pendingProps,null===t?Uc(e):Gu=t,Hu.current=null}function Uc(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=fu(n,t)))return n.flags&=32767,void(Gu=n);if(null===e)return Xu=6,void(Gu=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=du(n,t,Qu)))return void(Gu=n);if(null!==(t=t.sibling))return void(Gu=t);Gu=t=e}while(null!==t);0===Xu&&(Xu=5)}function zc(e,t,n){var r=zn,i=Wu.transition;try{Wu.transition=null,zn=1,function(e,t,n,r){do{Fc()}while(null!==fc);if(6&qu)throw Error(Ee(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Ee(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Cn(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,o),e===Ku&&(Gu=Ku=null,Ju=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||dc||(dc=!0,Kc(xn,function(){return Fc(),null})),o=!!(15990&n.flags),!!(15990&n.subtreeFlags)||o){o=Wu.transition,Wu.transition=null;var a=zn;zn=1;var s=qu;qu|=4,Hu.current=null,function(e,t){if(wo=cr,Oi(e=Ri())){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(w){n=null;break e}var a=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||0!==i&&3!==d.nodeType||(s=a+i),d!==o||0!==r&&3!==d.nodeType||(l=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(h=d.firstChild);)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(s=a),f===o&&++c===r&&(l=a),null!==(h=d.nextSibling))break;f=(d=f).parentNode}d=h}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(xo={focusedElem:e,selectionRange:n},cr=!1,gu=t;null!==gu;)if(e=(t=gu).child,1028&t.subtreeFlags&&null!==e)e.return=t,gu=e;else for(;null!==gu;){t=gu;try{var p=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==p){var m=p.memoizedProps,g=p.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:xl(t.type,m),g);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(Ee(163))}}catch(w){Vc(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,gu=e;break}gu=t.return}p=bu,bu=!1}(e,n),Lu(n,e),Ai(xo),cr=!!wo,xo=wo=null,e.current=n,Du(n),gn(),qu=s,zn=a,Wu.transition=o}else e.current=n;if(dc&&(dc=!1,fc=e,hc=i),o=e.pendingLanes,0===o&&(cc=null),function(e){if(_n&&"function"==typeof _n.onCommitFiberRoot)try{_n.onCommitFiberRoot(En,e,void 0,!(128&~e.current.flags))}catch(t){}}(n.stateNode),xc(e,vn()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(lc)throw lc=!1,e=uc,uc=null,e;!!(1&hc)&&0!==e.tag&&Fc(),o=e.pendingLanes,1&o?e===mc?pc++:(pc=0,mc=e):pc=0,la()}(e,t,n,r)}finally{Wu.transition=i,zn=r}return null}function Fc(){if(null!==fc){var e=Fn(hc),t=Wu.transition,n=zn;try{if(Wu.transition=null,zn=16>e?16:e,null===fc)var r=!1;else{if(e=fc,fc=null,hc=0,6&qu)throw Error(Ee(331));var i=qu;for(qu|=4,gu=e.current;null!==gu;){var o=gu,a=o.child;if(16&gu.flags){var s=o.deletions;if(null!==s){for(var l=0;l<s.length;l++){var u=s[l];for(gu=u;null!==gu;){var c=gu;switch(c.tag){case 0:case 11:case 15:wu(8,c,o)}var d=c.child;if(null!==d)d.return=c,gu=d;else for(;null!==gu;){var f=(c=gu).sibling,h=c.return;if(Su(c),c===u){gu=null;break}if(null!==f){f.return=h,gu=f;break}gu=h}}}var p=o.alternate;if(null!==p){var m=p.child;if(null!==m){p.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}gu=o}}if(2064&o.subtreeFlags&&null!==a)a.return=o,gu=a;else e:for(;null!==gu;){if(2048&(o=gu).flags)switch(o.tag){case 0:case 11:case 15:wu(9,o,o.return)}var v=o.sibling;if(null!==v){v.return=o.return,gu=v;break e}gu=o.return}}var y=e.current;for(gu=y;null!==gu;){var b=(a=gu).child;if(2064&a.subtreeFlags&&null!==b)b.return=a,gu=b;else e:for(a=y;null!==gu;){if(2048&(s=gu).flags)try{switch(s.tag){case 0:case 11:case 15:xu(9,s)}}catch(x){Vc(s,s.return,x)}if(s===a){gu=null;break e}var w=s.sibling;if(null!==w){w.return=s.return,gu=w;break e}gu=s.return}}if(qu=i,la(),_n&&"function"==typeof _n.onPostCommitFiberRoot)try{_n.onPostCommitFiberRoot(En,e)}catch(x){}r=!0}return r}finally{zn=n,Wu.transition=t}}return!1}function Bc(e,t,n){e=os(e,t=Rl(0,t=Il(n,t),1),1),t=yc(),null!==e&&(Mn(e,1,t),xc(e,t))}function Vc(e,t,n){if(3===e.tag)Bc(e,e,n);else for(;null!==t;){if(3===t.tag){Bc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===cc||!cc.has(r))){t=os(t,e=Ol(t,e=Il(n,e),1),1),e=yc(),null!==t&&(Mn(t,1,e),xc(t,e));break}}t=t.return}}function $c(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=yc(),e.pingedLanes|=e.suspendedLanes&n,Ku===e&&(Ju&n)===n&&(4===Xu||3===Xu&&(130023424&Ju)===Ju&&500>vn()-oc?Pc(e,0):nc|=n),xc(e,t)}function Hc(e,t){0===t&&(1&e.mode?(t=Pn,!(130023424&(Pn<<=1))&&(Pn=4194304)):t=1);var n=yc();null!==(e=es(e,t))&&(Mn(e,t,n),xc(e,n))}function Wc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Hc(e,n)}function qc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ee(314))}null!==r&&r.delete(t),Hc(e,n)}function Kc(e,t){return hn(e,t)}function Gc(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.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 Jc(e,t,n,r){return new Gc(e,t,n,r)}function Qc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Yc(e,t){var n=e.alternate;return null===n?((n=Jc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&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}function Xc(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)Qc(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case Ve:return Zc(n.children,i,o,t);case $e:a=8,i|=8;break;case He:return(e=Jc(12,n,t,2|i)).elementType=He,e.lanes=o,e;case Ge:return(e=Jc(13,n,t,i)).elementType=Ge,e.lanes=o,e;case Je:return(e=Jc(19,n,t,i)).elementType=Je,e.lanes=o,e;case Xe:return ed(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case We:a=10;break e;case qe:a=9;break e;case Ke:a=11;break e;case Qe:a=14;break e;case Ye:a=16,r=null;break e}throw Error(Ee(130,null==e?e:typeof e,""))}return(t=Jc(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Zc(e,t,n,r){return(e=Jc(7,e,r,t)).lanes=n,e}function ed(e,t,n,r){return(e=Jc(22,e,r,t)).elementType=Xe,e.lanes=n,e.stateNode={isHidden:!1},e}function td(e,t,n){return(e=Jc(6,e,null,t)).lanes=n,e}function nd(e,t,n){return(t=Jc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function rd(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Dn(0),this.expirationTimes=Dn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dn(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function id(e,t,n,r,i,o,a,s,l){return e=new rd(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Jc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ns(o),e}function od(e){if(!e)return Ko;e:{if(ln(e=e._reactInternals)!==e||1!==e.tag)throw Error(Ee(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Xo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(Ee(171))}if(1===e.tag){var n=e.type;if(Xo(n))return ta(e,n,t)}return t}function ad(e,t,n,r,i,o,a,s,l){return(e=id(n,r,!0,e,0,o,0,s,l)).context=od(null),n=e.current,(o=is(r=yc(),i=bc(n))).callback=null!=t?t:null,os(n,o,i),e.current.lanes=i,Mn(e,i,r),xc(e,r),e}function sd(e,t,n,r){var i=t.current,o=yc(),a=bc(i);return n=od(n),null===t.context?t.context=n:t.pendingContext=n,(t=is(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=os(i,t,a))&&(wc(e,i,a,o),as(e,i,a)),a}function ld(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function ud(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function cd(e,t){ud(e,t),(e=e.alternate)&&ud(e,t)}Bu=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Jo.current)Ml=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return Ml=!1,function(e,t,n){switch(t.tag){case 3:Kl(t),Aa();break;case 5:vs(t);break;case 1:Xo(t.type)&&na(t);break;case 4:ms(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;qo(Va,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(qo(bs,1&bs.current),t.flags|=128,null):0!==(n&t.child.childLanes)?tu(e,t,n):(qo(bs,1&bs.current),null!==(e=lu(e,t,n))?e.sibling:null);qo(bs,1&bs.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return au(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),qo(bs,bs.current),r)break;return null;case 22:case 23:return t.lanes=0,Vl(e,t,n)}return lu(e,t,n)}(e,t,n);Ml=!!(131072&e.flags)}else Ml=!1,Ea&&1048576&t.flags&&ba(t,fa,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;su(e,t),e=t.pendingProps;var i=Yo(t,Go.current);Ja(t,n),i=js(null,t,r,e,i,n);var o=Ds();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Xo(r)?(o=!0,na(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,ns(t),i.updater=Sl,t.stateNode=i,i._reactInternals=t,Nl(t,r,e,n),t=ql(null,t,r,!0,o,n)):(t.tag=0,Ea&&o&&wa(t),Ul(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(su(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Qc(e)?1:0;if(null!=e){if((e=e.$$typeof)===Ke)return 11;if(e===Qe)return 14}return 2}(r),e=xl(r,e),i){case 0:t=Hl(null,t,r,e,n);break e;case 1:t=Wl(null,t,r,e,n);break e;case 11:t=zl(null,t,r,e,n);break e;case 14:t=Fl(null,t,r,xl(r.type,e),n);break e}throw Error(Ee(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Hl(e,t,r,i=t.elementType===r?i:xl(r,i),n);case 1:return r=t.type,i=t.pendingProps,Wl(e,t,r,i=t.elementType===r?i:xl(r,i),n);case 3:e:{if(Kl(t),null===e)throw Error(Ee(387));r=t.pendingProps,i=(o=t.memoizedState).element,rs(e,t),ls(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Gl(e,t,r,n,i=Il(Error(Ee(423)),t));break e}if(r!==i){t=Gl(e,t,r,n,i=Il(Error(Ee(424)),t));break e}for(Sa=To(t.stateNode.containerInfo.firstChild),ka=t,Ea=!0,_a=null,n=Ba(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Aa(),r===i){t=lu(e,t,n);break e}Ul(e,t,r,n)}t=t.child}return t;case 5:return vs(t),null===e&&Ta(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,ko(r,i)?a=null:null!==o&&ko(r,o)&&(t.flags|=32),$l(e,t),Ul(e,t,a,n),t.child;case 6:return null===e&&Ta(t),null;case 13:return tu(e,t,n);case 4:return ms(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Fa(t,null,r,n):Ul(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,zl(e,t,r,i=t.elementType===r?i:xl(r,i),n);case 7:return Ul(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ul(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,qo(Va,r._currentValue),r._currentValue=a,null!==o)if(Ci(o.value,a)){if(o.children===i.children&&!Jo.current){t=lu(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var s=o.dependencies;if(null!==s){a=o.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===o.tag){(l=is(-1,n&-n)).tag=2;var u=o.updateQueue;if(null!==u){var c=(u=u.shared).pending;null===c?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),Ga(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===o.tag)a=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error(Ee(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),Ga(a,n,t),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===t){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}Ul(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ja(t,n),r=r(i=Qa(i)),t.flags|=1,Ul(e,t,r,n),t.child;case 14:return i=xl(r=t.type,t.pendingProps),Fl(e,t,r,i=xl(r.type,i),n);case 15:return Bl(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:xl(r,i),su(e,t),t.tag=1,Xo(r)?(e=!0,na(t)):e=!1,Ja(t,n),_l(t,r,i),Nl(t,r,i,n),ql(null,t,r,!0,e,n);case 19:return au(e,t,n);case 22:return Vl(e,t,n)}throw Error(Ee(156,t.tag))};var dd="function"==typeof reportError?reportError:function(e){};function fd(e){this._internalRoot=e}function hd(e){this._internalRoot=e}function pd(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function md(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function gd(){}function vd(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=ld(a);s.call(e)}}sd(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=ld(a);o.call(e)}}var a=ad(t,r,e,0,null,!1,0,"",gd);return e._reactRootContainer=a,e[Lo]=a.current,so(8===e.nodeType?e.parentNode:e),Ic(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=ld(l);s.call(e)}}var l=id(e,0,!1,null,0,!1,0,"",gd);return e._reactRootContainer=l,e[Lo]=l.current,so(8===e.nodeType?e.parentNode:e),Ic(function(){sd(t,l,n,r)}),l}(n,t,e,i,r);return ld(a)}hd.prototype.render=fd.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(Ee(409));sd(e,t,null,null)},hd.prototype.unmount=fd.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;Ic(function(){sd(null,e,null,null)}),t[Lo]=null}},hd.prototype.unstable_scheduleHydration=function(e){if(e){var t=Hn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Zn.length&&0!==t&&t<Zn[n].priority;n++);Zn.splice(n,0,e),0===n&&rr(e)}},Bn=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Rn(t.pendingLanes);0!==n&&(Un(t,1|n),xc(t,vn()),!(6&qu)&&(ac=vn()+500,la()))}break;case 13:Ic(function(){var t=es(e,1);if(null!==t){var n=yc();wc(t,e,1,n)}}),cd(e,1)}},Vn=function(e){if(13===e.tag){var t=es(e,134217728);if(null!==t)wc(t,e,134217728,yc());cd(e,134217728)}},$n=function(e){if(13===e.tag){var t=bc(e),n=es(e,t);if(null!==n)wc(n,e,t,yc());cd(e,t)}},Hn=function(){return zn},Wn=function(e,t){var n=zn;try{return zn=e,t()}finally{zn=n}},Bt=function(e,t,n){switch(t){case"input":if(vt(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Bo(r);if(!i)throw Error(Ee(90));ft(r),vt(r,i)}}}break;case"textarea":Et(e,n);break;case"select":null!=(t=n.value)&&xt(e,!!n.multiple,t,!1)}},Kt=Nc,Gt=Ic;var yd={usingClientEntryPoint:!1,Events:[zo,Fo,Bo,Wt,qt,Nc]},bd={findFiberByHostInstance:Uo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},wd={bundleType:bd.bundleType,version:bd.version,rendererPackageName:bd.rendererPackageName,rendererConfig:bd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ze.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=dn(e))?null:e.stateNode},findFiberByHostInstance:bd.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var xd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xd.isDisabled&&xd.supportsFiber)try{En=xd.inject(wd),_n=xd}catch(Tt){}}ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yd,ye.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!pd(t))throw Error(Ee(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Be,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},ye.createRoot=function(e,t){if(!pd(e))throw Error(Ee(299));var n=!1,r="",i=dd;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=id(e,1,!1,null,0,n,0,r,i),e[Lo]=t.current,so(8===e.nodeType?e.parentNode:e),new fd(t)},ye.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(Ee(188));throw e=Object.keys(e).join(","),Error(Ee(268,e))}return e=null===(e=dn(t))?null:e.stateNode},ye.flushSync=function(e){return Ic(e)},ye.hydrate=function(e,t,n){if(!md(t))throw Error(Ee(200));return vd(null,e,t,!0,n)},ye.hydrateRoot=function(e,t,n){if(!pd(e))throw Error(Ee(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",a=dd;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=ad(t,null,e,1,null!=n?n:null,i,0,o,a),e[Lo]=t.current,so(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new hd(t)},ye.render=function(e,t,n){if(!md(t))throw Error(Ee(200));return vd(null,e,t,!1,n)},ye.unmountComponentAtNode=function(e){if(!md(e))throw Error(Ee(40));return!!e._reactRootContainer&&(Ic(function(){vd(null,null,e,!1,function(){e._reactRootContainer=null,e[Lo]=null})}),!0)},ye.unstable_batchedUpdates=Nc,ye.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!md(n))throw Error(Ee(200));if(null==e||void 0===e._reactInternals)throw Error(Ee(38));return vd(e,t,n,!1,r)},ye.version="18.3.1-next-f1338f8080-20240426",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){}}(),ve.exports=ye;var kd=ve.exports;ge.createRoot=kd.createRoot,ge.hydrateRoot=kd.hydrateRoot;const Sd={},Ed=function(e,t,n){if(!t||0===t.length)return e();const r=document.getElementsByTagName("link");return Promise.all(t.map(e=>{if((e=function(e){return"/"+e}(e))in Sd)return;Sd[e]=!0;const t=e.endsWith(".css"),i=t?'[rel="stylesheet"]':"";if(!!n)for(let n=r.length-1;n>=0;n--){const i=r[n];if(i.href===e&&(!t||"stylesheet"===i.rel))return}else if(document.querySelector(`link[href="${e}"]${i}`))return;const o=document.createElement("link");return o.rel=t?"stylesheet":"modulepreload",t||(o.as="script",o.crossOrigin=""),o.href=e,document.head.appendChild(o),t?new Promise((t,n)=>{o.addEventListener("load",t),o.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${e}`)))}):void 0})).then(()=>e()).catch(e=>{const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e})};
|
|
/**
|
|
* @remix-run/router v1.23.0
|
|
*
|
|
* Copyright (c) Remix Software Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE.md file in the root directory of this source tree.
|
|
*
|
|
* @license MIT
|
|
*/
|
|
function _d(){return _d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_d.apply(this,arguments)}var Cd,Nd;(Nd=Cd||(Cd={})).Pop="POP",Nd.Push="PUSH",Nd.Replace="REPLACE";const Id="popstate";function Td(e){return void 0===e&&(e={}),function(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=Cd.Pop,l=null,u=c();null==u&&(u=0,a.replaceState(_d({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function d(){s=Cd.Pop;let e=c(),t=null==e?null:e-u;u=e,l&&l({action:s,location:m.location,delta:t})}function f(e,t){s=Cd.Push;let r=Ad(m.location,e,t);n&&n(r,e),u=c()+1;let d=Od(r,u),f=m.createHref(r);try{a.pushState(d,"",f)}catch(h){if(h instanceof DOMException&&"DataCloneError"===h.name)throw h;i.location.assign(f)}o&&l&&l({action:s,location:m.location,delta:1})}function h(e,t){s=Cd.Replace;let r=Ad(m.location,e,t);n&&n(r,e),u=c();let i=Od(r,u),d=m.createHref(r);a.replaceState(i,"",d),o&&l&&l({action:s,location:m.location,delta:0})}function p(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof e?e:Ld(e);return n=n.replace(/ $/,"%20"),Pd(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}let m={get action(){return s},get location(){return e(i,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Id,d),l=e,()=>{i.removeEventListener(Id,d),l=null}},createHref:e=>t(i,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:h,go:e=>a.go(e)};return m}(function(e,t){let{pathname:n,search:r,hash:i}=e.location;return Ad("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:Ld(t)},null,e)}function Pd(e,t){if(!1===e||null==e)throw new Error(t)}function Rd(e,t){if(!e)try{throw new Error(t)}catch(n){}}function Od(e,t){return{usr:e.state,key:e.key,idx:t}}function Ad(e,t,n,r){return void 0===n&&(n=null),_d({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?jd(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function Ld(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function jd(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var Dd,Md;function Ud(e,t,n){return void 0===n&&(n="/"),function(e,t,n,r){let i="string"==typeof t?jd(t):t,o=Xd(i.pathname||"/",n);if(null==o)return null;let a=zd(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(a);let s=null;for(let l=0;null==s&&l<a.length;++l){let e=Yd(o);s=Jd(a[l],e,r)}return s}(e,t,n,!1)}function zd(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let i=(e,i,o)=>{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(Pd(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let s=nf([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(Pd(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),zd(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:Gd(s,e.index),routesMeta:l})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of Fd(e.path))i(e,t,r);else i(e,t)}),t}function Fd(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let a=Fd(r.join("/")),s=[];return s.push(...a.map(e=>""===e?o:[o,e].join("/"))),i&&s.push(...a),s.map(t=>e.startsWith("/")&&""===t?"/":t)}(Md=Dd||(Dd={})).data="data",Md.deferred="deferred",Md.redirect="redirect",Md.error="error";const Bd=/^:[\w-]+$/,Vd=3,$d=2,Hd=1,Wd=10,qd=-2,Kd=e=>"*"===e;function Gd(e,t){let n=e.split("/"),r=n.length;return n.some(Kd)&&(r+=qd),t&&(r+=$d),n.filter(e=>!Kd(e)).reduce((e,t)=>e+(Bd.test(t)?Vd:""===t?Hd:Wd),r)}function Jd(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,u="/"===o?t:t.slice(o.length)||"/",c=Qd({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},u),d=e.route;if(!c&&l&&n&&!r[r.length-1].route.index&&(c=Qd({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(i,c.params),a.push({params:i,pathname:nf([o,c.pathname]),pathnameBase:rf(nf([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=nf([o,c.pathnameBase]))}return a}function Qd(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);Rd("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=s[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:a,pattern:e}}function Yd(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return Rd(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function Xd(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Zd(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function ef(e,t){let n=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function tf(e,t,n,r){let i;void 0===r&&(r=!1),"string"==typeof e?i=jd(e):(i=_d({},e),Pd(!i.pathname||!i.pathname.includes("?"),Zd("?","pathname","search",i)),Pd(!i.pathname||!i.pathname.includes("#"),Zd("#","pathname","hash",i)),Pd(!i.search||!i.search.includes("#"),Zd("#","search","hash",i)));let o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(null==s)o=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"==typeof e?jd(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:of(r),hash:af(i)}}(i,o),u=s&&"/"!==s&&s.endsWith("/"),c=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}const nf=e=>e.join("/").replace(/\/\/+/g,"/"),rf=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),of=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",af=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";const sf=["post","put","patch","delete"];new Set(sf);const lf=["get",...sf];
|
|
/**
|
|
* React Router v6.30.1
|
|
*
|
|
* Copyright (c) Remix Software Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE.md file in the root directory of this source tree.
|
|
*
|
|
* @license MIT
|
|
*/
|
|
function uf(){return uf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uf.apply(this,arguments)}new Set(lf);const cf=oe.createContext(null),df=oe.createContext(null),ff=oe.createContext(null),hf=oe.createContext(null),pf=oe.createContext({outlet:null,matches:[],isDataRoute:!1}),mf=oe.createContext(null);function gf(){return null!=oe.useContext(hf)}function vf(){return gf()||Pd(!1),oe.useContext(hf).location}function yf(e){oe.useContext(ff).static||oe.useLayoutEffect(e)}function bf(){let{isDataRoute:e}=oe.useContext(pf);return e?function(){let{router:e}=function(){let e=oe.useContext(cf);return e||Pd(!1),e}(_f.UseNavigateStable),t=Nf(Cf.UseNavigateStable),n=oe.useRef(!1);return yf(()=>{n.current=!0}),oe.useCallback(function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,uf({fromRouteId:t},i)))},[e,t])}():function(){gf()||Pd(!1);let e=oe.useContext(cf),{basename:t,future:n,navigator:r}=oe.useContext(ff),{matches:i}=oe.useContext(pf),{pathname:o}=vf(),a=JSON.stringify(ef(i,n.v7_relativeSplatPath)),s=oe.useRef(!1);return yf(()=>{s.current=!0}),oe.useCallback(function(n,i){if(void 0===i&&(i={}),!s.current)return;if("number"==typeof n)return void r.go(n);let l=tf(n,JSON.parse(a),o,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:nf([t,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)},[t,r,a,o,e])}()}function wf(e,t){return function(e,t,n,r){gf()||Pd(!1);let{navigator:i}=oe.useContext(ff),{matches:o}=oe.useContext(pf),a=o[o.length-1],s=a?a.params:{};!a||a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let u,c=vf();if(t){var d;let e="string"==typeof t?jd(t):t;"/"===l||(null==(d=e.pathname)?void 0:d.startsWith(l))||Pd(!1),u=e}else u=c;let f=u.pathname||"/",h=f;if("/"!==l){let e=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let p=Ud(e,{pathname:h}),m=function(e,t,n,r){var i;void 0===t&&(t=[]);void 0===n&&(n=null);void 0===r&&(r=null);if(null==e){var o;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(o=r)&&o.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let a=e,s=null==(i=n)?void 0:i.errors;if(null!=s){let e=a.findIndex(e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id]));e>=0||Pd(!1),a=a.slice(0,Math.min(a.length,e+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<a.length;c++){let e=a[c];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(u=c),e.route.id){let{loaderData:t,errors:r}=n,i=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||i){l=!0,a=u>=0?a.slice(0,u+1):[a[0]];break}}}return a.reduceRight((e,r,i)=>{let o,c=!1,d=null,f=null;var h;n&&(o=s&&r.route.id?s[r.route.id]:void 0,d=r.route.errorElement||kf,l&&(u<0&&0===i?(h="route-fallback",!1||If[h]||(If[h]=!0),c=!0,f=null):u===i&&(c=!0,f=r.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,i+1)),m=()=>{let t;return t=o?d:c?f:r.route.Component?oe.createElement(r.route.Component,null):r.route.element?r.route.element:e,oe.createElement(Ef,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===i)?oe.createElement(Sf,{location:n.location,revalidation:n.revalidation,component:d,error:o,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:nf([l,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:nf([l,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),o,n,r);if(t&&m)return oe.createElement(hf.Provider,{value:{location:uf({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Cd.Pop}},m);return m}(e,t)}function xf(){let e=function(){var e;let t=oe.useContext(mf),n=function(){let e=oe.useContext(df);return e||Pd(!1),e}(Cf.UseRouteError),r=Nf(Cf.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return oe.createElement(oe.Fragment,null,oe.createElement("h2",null,"Unexpected Application Error!"),oe.createElement("h3",{style:{fontStyle:"italic"}},t),n?oe.createElement("pre",{style:r},n):null,null)}const kf=oe.createElement(xf,null);class Sf extends oe.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){}render(){return void 0!==this.state.error?oe.createElement(pf.Provider,{value:this.props.routeContext},oe.createElement(mf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ef(e){let{routeContext:t,match:n,children:r}=e,i=oe.useContext(cf);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),oe.createElement(pf.Provider,{value:t},r)}var _f=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(_f||{}),Cf=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Cf||{});function Nf(e){let t=function(){let e=oe.useContext(pf);return e||Pd(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||Pd(!1),n.route.id}const If={};function Tf(e){let{to:t,replace:n,state:r,relative:i}=e;gf()||Pd(!1);let{future:o,static:a}=oe.useContext(ff),{matches:s}=oe.useContext(pf),{pathname:l}=vf(),u=bf(),c=tf(t,ef(s,o.v7_relativeSplatPath),l,"path"===i),d=JSON.stringify(c);return oe.useEffect(()=>u(JSON.parse(d),{replace:n,state:r,relative:i}),[u,d,i,n,r]),null}function Pf(e){Pd(!1)}function Rf(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Cd.Pop,navigator:o,static:a=!1,future:s}=e;gf()&&Pd(!1);let l=t.replace(/^\/*/,"/"),u=oe.useMemo(()=>({basename:l,navigator:o,static:a,future:uf({v7_relativeSplatPath:!1},s)}),[l,s,o,a]);"string"==typeof r&&(r=jd(r));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:p="default"}=r,m=oe.useMemo(()=>{let e=Xd(c,l);return null==e?null:{location:{pathname:e,search:d,hash:f,state:h,key:p},navigationType:i}},[l,c,d,f,h,p,i]);return null==m?null:oe.createElement(ff.Provider,{value:u},oe.createElement(hf.Provider,{children:n,value:m}))}function Of(e){let{children:t,location:n}=e;return wf(Af(t),n)}function Af(e,t){void 0===t&&(t=[]);let n=[];return oe.Children.forEach(e,(e,r)=>{if(!oe.isValidElement(e))return;let i=[...t,r];if(e.type===oe.Fragment)return void n.push.apply(n,Af(e.props.children,i));e.type!==Pf&&Pd(!1),e.props.index&&e.props.children&&Pd(!1);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,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,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=Af(e.props.children,i)),n.push(o)}),n}
|
|
/**
|
|
* React Router DOM v6.30.1
|
|
*
|
|
* Copyright (c) Remix Software Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE.md file in the root directory of this source tree.
|
|
*
|
|
* @license MIT
|
|
*/new Promise(()=>{});try{window.__reactRouterVersion="6"}catch(qx){}const Lf=se.startTransition;function jf(e){let{basename:t,children:n,future:r,window:i}=e,o=oe.useRef();null==o.current&&(o.current=Td({window:i,v5Compat:!0}));let a=o.current,[s,l]=oe.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},c=oe.useCallback(e=>{u&&Lf?Lf(()=>l(e)):l(e)},[l,u]);return oe.useLayoutEffect(()=>a.listen(c),[a,c]),oe.useEffect(()=>{return null==(e=r)||e.v7_startTransition,void 0===(null==e?void 0:e.v7_relativeSplatPath)&&(!t||t.v7_relativeSplatPath),void(t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation));var e,t},[r]),oe.createElement(Rf,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}var Df,Mf,Uf,zf;(Mf=Df||(Df={})).UseScrollRestoration="useScrollRestoration",Mf.UseSubmit="useSubmit",Mf.UseSubmitFetcher="useSubmitFetcher",Mf.UseFetcher="useFetcher",Mf.useViewTransitionState="useViewTransitionState",(zf=Uf||(Uf={})).UseFetcher="useFetcher",zf.UseFetchers="useFetchers",zf.UseScrollRestoration="useScrollRestoration";const Ff=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},Bf={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,u=t>>2,c=(3&t)<<4|a>>4;let d=(15&a)<<2|l>>6,f=63&l;s||(f=64,o||(d=64)),r.push(n[u],n[c],n[d],n[f])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(Ff(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 a=i<e.length?n[e.charAt(i)]:64;++i;const s=i<e.length?n[e.charAt(i)]:64;if(++i,null==t||null==o||null==a||null==s)throw new Vf;const l=t<<2|o>>4;if(r.push(l),64!==a){const e=o<<4&240|a>>2;if(r.push(e),64!==s){const e=a<<6&192|s;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)}}};
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class Vf extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const $f=function(e){return function(e){const t=Ff(e);return Bf.encodeByteArray(t,!0)}(e).replace(/\./g,"")},Hf=function(e){try{return Bf.decodeString(e,!0)}catch(qx){}return null};
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
const Wf=()=>
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,qf=()=>{try{return Wf()||(()=>{if("undefined"==typeof process||void 0===process.env)return;const e={}.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(qx){return}const t=e&&Hf(e[1]);return t&&JSON.parse(t)})()}catch(qx){return}},Kf=()=>{var e;return null==(e=qf())?void 0:e.config},Gf=e=>{var t;return null==(t=qf())?void 0:t[`_${e}`]};
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
class Jf{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))}}}
|
|
/**
|
|
* @license
|
|
* Copyright 2025 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function Qf(e){try{return(e.startsWith("http://")||e.startsWith("https://")?new URL(e).hostname:e).endsWith(".cloudworkstations.dev")}catch(qx){return!1}}const Yf={};let Xf=!1;function Zf(e,t){if("undefined"==typeof window||"undefined"==typeof document||!Qf(window.location.host)||Yf[e]===t||Yf[e]||Xf)return;function n(e){return`__firebase__banner__${e}`}Yf[e]=t;const r="__firebase__banner",i=function(){const e={prod:[],emulator:[]};for(const t of Object.keys(Yf))Yf[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=" ×",e.onclick=()=>{Xf=!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"),u=n("preprendIcon"),c=document.getElementById(u)||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"}(c,u),t.append(c,a,l,n),document.body.appendChild(t)}i?(a.innerText="Preview backend disconnected.",c.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>'):(c.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 12.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()}
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function eh(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}class th extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,th.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,nh.prototype.create)}}class nh{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],o=i?function(e,t){return e.replace(rh,(e,n)=>{const r=t[n];return null!=r?String(r):`<${n}?>`})}(i,n):"Error",a=`${this.serviceName}: ${o} (${r}).`;return new th(r,a,n)}}const rh=/\{\$([^}]+)}/g;function ih(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(oh(n)&&oh(o)){if(!ih(n,o))return!1}else if(n!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function oh(e){return null!==e&&"object"==typeof e}
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function ah(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function sh(e){const t={};return e.replace(/^\?/,"").split("&").forEach(e=>{if(e){const[n,r]=e.split("=");t[decodeURIComponent(n)]=decodeURIComponent(r)}}),t}function lh(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}class uh{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=ch),void 0===r.error&&(r.error=ch),void 0===r.complete&&(r.complete=ch);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(qx){}}),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(qx){"undefined"!=typeof console&&console.error}})}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 ch(){}
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function dh(e){return e&&e._delegate?e._delegate:e}class fh{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}}
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/const hh="[DEFAULT]";
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class ph{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 Jf;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(qx){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!=(t=null==e?void 0:e.optional)&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(qx){if(r)return null;throw qx}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/(e))try{this.getOrInitializeService({instanceIdentifier:hh})}catch(qx){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(qx){}}}}clearInstance(e=hh){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}delete(){return m(this,null,function*(){const e=Array.from(this.instances.values());yield 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(e=hh){return this.instances.has(e)}getOptions(e=hh){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[i,o]of this.instancesDeferred.entries()){n===this.normalizeInstanceIdentifier(i)&&o.resolve(r)}return r}onInit(e,t){var n;const r=this.normalizeInstanceIdentifier(t),i=null!=(n=this.onInitCallbacks.get(r))?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 r of n)try{r(e,t)}catch(qx){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(r=e,r===hh?void 0:r),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch(qx){}var r;return n||null}normalizeInstanceIdentifier(e=hh){return this.component?this.component.multipleInstances?e:hh:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class mh{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new ph(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/var gh,vh;(vh=gh||(gh={}))[vh.DEBUG=0]="DEBUG",vh[vh.VERBOSE=1]="VERBOSE",vh[vh.INFO=2]="INFO",vh[vh.WARN=3]="WARN",vh[vh.ERROR=4]="ERROR",vh[vh.SILENT=5]="SILENT";const yh={debug:gh.DEBUG,verbose:gh.VERBOSE,info:gh.INFO,warn:gh.WARN,error:gh.ERROR,silent:gh.SILENT},bh=gh.INFO,wh={[gh.DEBUG]:"log",[gh.VERBOSE]:"log",[gh.INFO]:"info",[gh.WARN]:"warn",[gh.ERROR]:"error"},xh=(e,t,...n)=>{if(t<e.logLevel)return;(new Date).toISOString();if(!wh[t])throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class kh{constructor(e){this.name=e,this._logLevel=bh,this._logHandler=xh,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in gh))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?yh[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(...e){this._userLogHandler&&this._userLogHandler(this,gh.DEBUG,...e),this._logHandler(this,gh.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,gh.VERBOSE,...e),this._logHandler(this,gh.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,gh.INFO,...e),this._logHandler(this,gh.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,gh.WARN,...e),this._logHandler(this,gh.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,gh.ERROR,...e),this._logHandler(this,gh.ERROR,...e)}}let Sh,Eh;const _h=new WeakMap,Ch=new WeakMap,Nh=new WeakMap,Ih=new WeakMap,Th=new WeakMap;let Ph={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return Ch.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Nh.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Ah(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Rh(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(Eh||(Eh=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(Lh(this),t),Ah(_h.get(this))}:function(...t){return Ah(e.apply(Lh(this),t))}:function(t,...n){const r=e.call(Lh(this),t,...n);return Nh.set(r,t.sort?t.sort():[t]),Ah(r)}}function Oh(e){return"function"==typeof e?Rh(e):(e instanceof IDBTransaction&&function(e){if(Ch.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)});Ch.set(e,t)}(e),t=e,(Sh||(Sh=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(e=>t instanceof e)?new Proxy(e,Ph):e);var t}function Ah(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(Ah(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",o)});return t.then(t=>{t instanceof IDBCursor&&_h.set(t,e)}).catch(()=>{}),Th.set(t,e),t}(e);if(Ih.has(e))return Ih.get(e);const t=Oh(e);return t!==e&&(Ih.set(e,t),Th.set(t,e)),t}const Lh=e=>Th.get(e);const jh=["get","getKey","getAll","getAllKeys","count"],Dh=["put","add","delete","clear"],Mh=new Map;function Uh(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Mh.get(t))return Mh.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Dh.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!jh.includes(n))return;const o=function(e,...t){return m(this,null,function*(){const o=this.transaction(e,i?"readwrite":"readonly");let a=o.store;return r&&(a=a.index(t.shift())),(yield Promise.all([a[n](...t),i&&o.done]))[0]})};return Mh.set(t,o),o}Ph=(e=>d(c({},e),{get:(t,n,r)=>Uh(t,n)||e.get(t,n,r),has:(t,n)=>!!Uh(t,n)||e.has(t,n)}))(Ph);
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
class zh{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.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null}).filter(e=>e).join(" ")}}const Fh="@firebase/app",Bh="0.14.1",Vh=new kh("@firebase/app"),$h="@firebase/app-compat",Hh="@firebase/analytics-compat",Wh="@firebase/analytics",qh="@firebase/app-check-compat",Kh="@firebase/app-check",Gh="@firebase/auth",Jh="@firebase/auth-compat",Qh="@firebase/database",Yh="@firebase/data-connect",Xh="@firebase/database-compat",Zh="@firebase/functions",ep="@firebase/functions-compat",tp="@firebase/installations",np="@firebase/installations-compat",rp="@firebase/messaging",ip="@firebase/messaging-compat",op="@firebase/performance",ap="@firebase/performance-compat",sp="@firebase/remote-config",lp="@firebase/remote-config-compat",up="@firebase/storage",cp="@firebase/storage-compat",dp="@firebase/firestore",fp="@firebase/ai",hp="@firebase/firestore-compat",pp="firebase",mp="[DEFAULT]",gp={[Fh]:"fire-core",[$h]:"fire-core-compat",[Wh]:"fire-analytics",[Hh]:"fire-analytics-compat",[Kh]:"fire-app-check",[qh]:"fire-app-check-compat",[Gh]:"fire-auth",[Jh]:"fire-auth-compat",[Qh]:"fire-rtdb",[Yh]:"fire-data-connect",[Xh]:"fire-rtdb-compat",[Zh]:"fire-fn",[ep]:"fire-fn-compat",[tp]:"fire-iid",[np]:"fire-iid-compat",[rp]:"fire-fcm",[ip]:"fire-fcm-compat",[op]:"fire-perf",[ap]:"fire-perf-compat",[sp]:"fire-rc",[lp]:"fire-rc-compat",[up]:"fire-gcs",[cp]:"fire-gcs-compat",[dp]:"fire-fst",[hp]:"fire-fst-compat",[fp]:"fire-vertex","fire-js":"fire-js",[pp]:"fire-js-all"},vp=new Map,yp=new Map,bp=new Map;function wp(e,t){try{e.container.addComponent(t)}catch(qx){Vh.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,qx)}}function xp(e){const t=e.name;if(bp.has(t))return Vh.debug(`There were multiple attempts to register component ${t}.`),!1;bp.set(t,e);for(const n of vp.values())wp(n,e);for(const n of yp.values())wp(n,e);return!0}function kp(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function Sp(e){return null!=e&&void 0!==e.settings}
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/const Ep=new nh("app","Firebase",{"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.","invalid-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."});
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
class _p{constructor(e,t,n){this._isDeleted=!1,this._options=c({},e),this._config=c({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new fh("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 Ep.create("app-deleted",{appName:this._name})}}
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/const Cp="12.1.0";function Np(e,t={}){let n=e;if("object"!=typeof t){t={name:t}}const r=c({name:mp,automaticDataCollectionEnabled:!0},t),i=r.name;if("string"!=typeof i||!i)throw Ep.create("bad-app-name",{appName:String(i)});if(n||(n=Kf()),!n)throw Ep.create("no-options");const o=vp.get(i);if(o){if(ih(n,o.options)&&ih(r,o.config))return o;throw Ep.create("duplicate-app",{appName:i})}const a=new mh(i);for(const l of bp.values())a.addComponent(l);const s=new _p(n,r,a);return vp.set(i,s),s}function Ip(e,t,n){var r;let i=null!=(r=gp[e])?r:e;n&&(i+=`-${n}`);const o=i.match(/\s|\//),a=t.match(/\s|\//);if(o||a){const e=[`Unable to register library "${i}" with version "${t}":`];return o&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),o&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void Vh.warn(e.join(" "))}xp(new fh(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/const Tp="firebase-heartbeat-store";let Pp=null;function Rp(){return Pp||(Pp=function(e,t,{blocked:n,upgrade:r,blocking:i,terminated:o}={}){const a=indexedDB.open(e,t),s=Ah(a);return r&&a.addEventListener("upgradeneeded",e=>{r(Ah(a.result),e.oldVersion,e.newVersion,Ah(a.transaction),e)}),n&&a.addEventListener("blocked",e=>n(e.oldVersion,e.newVersion,e)),s.then(e=>{o&&e.addEventListener("close",()=>o()),i&&e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),s}("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(Tp)}catch(qx){}}}).catch(e=>{throw Ep.create("idb-open",{originalErrorMessage:e.message})})),Pp}function Op(e,t){return m(this,null,function*(){try{const n=(yield Rp()).transaction(Tp,"readwrite"),r=n.objectStore(Tp);yield r.put(t,Ap(e)),yield n.done}catch(qx){if(qx instanceof th)Vh.warn(qx.message);else{const t=Ep.create("idb-set",{originalErrorMessage:null==qx?void 0:qx.message});Vh.warn(t.message)}}})}function Ap(e){return`${e.name}!${e.options.appId}`}
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class Lp{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new Dp(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}triggerHeartbeat(){return m(this,null,function*(){var e,t;try{const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=jp();if(null==(null==(e=this._heartbeatsCache)?void 0:e.heartbeats)&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,null==(null==(t=this._heartbeatsCache)?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}
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(e,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(qx){Vh.warn(qx)}})}getHeartbeatsHeader(){return m(this,null,function*(){var e;try{if(null===this._heartbeatsCache&&(yield this._heartbeatsCachePromise),null==(null==(e=this._heartbeatsCache)?void 0:e.heartbeats)||0===this._heartbeatsCache.heartbeats.length)return"";const t=jp(),{heartbeatsToSend:n,unsentEntries:r}=function(e,t=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),Mp(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),Mp(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),i=$f(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(qx){return Vh.warn(qx),""}})}}function jp(){return(new Date).toISOString().substring(0,10)}class Dp{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return m(this,null,function*(){return!!function(){try{return"object"==typeof indexedDB}catch(qx){return!1}}()&&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.message)||"")}}catch(n){t(n)}}).then(()=>!0).catch(()=>!1)})}read(){return m(this,null,function*(){if(yield this._canUseIndexedDBPromise){const e=yield function(e){return m(this,null,function*(){try{const t=(yield Rp()).transaction(Tp),n=yield t.objectStore(Tp).get(Ap(e));return yield t.done,n}catch(qx){if(qx instanceof th)Vh.warn(qx.message);else{const t=Ep.create("idb-get",{originalErrorMessage:null==qx?void 0:qx.message});Vh.warn(t.message)}}})}(this.app);return(null==e?void 0:e.heartbeats)?e:{heartbeats:[]}}return{heartbeats:[]}})}overwrite(e){return m(this,null,function*(){var t;if(yield this._canUseIndexedDBPromise){const n=yield this.read();return Op(this.app,{lastSentHeartbeatDate:null!=(t=e.lastSentHeartbeatDate)?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}})}add(e){return m(this,null,function*(){var t;if(yield this._canUseIndexedDBPromise){const n=yield this.read();return Op(this.app,{lastSentHeartbeatDate:null!=(t=e.lastSentHeartbeatDate)?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}})}}function Mp(e){return $f(JSON.stringify({version:2,heartbeats:e})).length}var Up;function zp(){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."}}Up="",xp(new fh("platform-logger",e=>new zh(e),"PRIVATE")),xp(new fh("heartbeat",e=>new Lp(e),"PRIVATE")),Ip(Fh,Bh,Up),Ip(Fh,Bh,"esm2020"),Ip("fire-js","");const Fp=zp,Bp=new nh("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."}),Vp=new kh("@firebase/auth");function $p(e,...t){Vp.logLevel<=gh.ERROR&&Vp.error(`Auth (${Cp}): ${e}`,...t)}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function Hp(e,...t){throw Gp(e,...t)}function Wp(e,...t){return Gp(e,...t)}function qp(e,t,n){const r=d(c({},Fp()),{[t]:n});return new nh("auth","Firebase",r).create(t,{appName:e.name})}function Kp(e){return qp(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Gp(e,...t){if("string"!=typeof e){const n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return Bp.create(e,...t)}function Jp(e,t,...n){if(!e)throw Gp(t,...n)}function Qp(e){const t="INTERNAL ASSERTION FAILED: "+e;throw $p(t),new Error(t)}function Yp(e,t){e||Qp(t)}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function Xp(){var e;return"undefined"!=typeof self&&(null==(e=self.location)?void 0:e.href)||""}function Zp(){var e;return"undefined"!=typeof self&&(null==(e=self.location)?void 0:e.protocol)||null}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function em(){return"undefined"==typeof navigator||!navigator||!("onLine"in navigator)||"boolean"!=typeof navigator.onLine||"http:"!==Zp()&&"https:"!==Zp()&&!function(){const e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}()&&!("connection"in navigator)||navigator.onLine}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
class tm{constructor(e,t){this.shortDelay=e,this.longDelay=t,Yp(t>e,"Short delay should be less than long delay!"),this.isMobile="undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(eh())||"object"==typeof navigator&&"ReactNative"===navigator.product}get(){return em()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function nm(e,t){Yp(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class rm{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 Qp("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 Qp("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 Qp("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/const im={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-recaptcha-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"},om=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],am=new tm(3e4,6e4);
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function sm(e,t){return e.tenantId&&!t.tenantId?d(c({},t),{tenantId:e.tenantId}):t}function lm(e,t,n,r){return m(this,arguments,function*(e,t,n,r,i={}){return um(e,i,()=>m(this,null,function*(){let i={},o={};r&&("GET"===t?o=r:i={body:JSON.stringify(r)});const a=ah(c({key:e.config.apiKey},o)).slice(1),s=yield e._getAdditionalHeaders();s["Content-Type"]="application/json",e.languageCode&&(s["X-Firebase-Locale"]=e.languageCode);const l=c({method:t,headers:s},i);return"undefined"!=typeof navigator&&"Cloudflare-Workers"===navigator.userAgent||(l.referrerPolicy="no-referrer"),e.emulatorConfig&&Qf(e.emulatorConfig.host)&&(l.credentials="include"),rm.fetch()(yield dm(e,e.config.apiHost,n,a),l)}))})}function um(e,t,n){return m(this,null,function*(){e._canInitEmulator=!1;const r=c(c({},im),t);try{const t=new hm(e),i=yield Promise.race([n(),t.promise]);t.clearNetworkTimeout();const o=yield i.json();if("needConfirmation"in o)throw pm(e,"account-exists-with-different-credential",o);if(i.ok&&!("errorMessage"in o))return o;{const t=i.ok?o.errorMessage:o.error.message,[n,a]=t.split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===n)throw pm(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===n)throw pm(e,"email-already-in-use",o);if("USER_DISABLED"===n)throw pm(e,"user-disabled",o);const s=r[n]||n.toLowerCase().replace(/[_\s]+/g,"-");if(a)throw qp(e,s,a);Hp(e,s)}}catch(qx){if(qx instanceof th)throw qx;Hp(e,"network-request-failed",{message:String(qx)})}})}function cm(e,t,n,r){return m(this,arguments,function*(e,t,n,r,i={}){const o=yield lm(e,t,n,r,i);return"mfaPendingCredential"in o&&Hp(e,"multi-factor-auth-required",{_serverResponse:o}),o})}function dm(e,t,n,r){return m(this,null,function*(){const i=`${t}${n}?${r}`,o=e,a=o.config.emulator?nm(e.config,i):`${e.config.apiScheme}://${i}`;if(om.includes(n)&&(yield o._persistenceManagerAvailable,"COOKIE"===o._getPersistenceType())){return o._getPersistence()._getFinalTarget(a).toString()}return a})}function fm(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class hm{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(Wp(this.auth,"network-request-failed")),am.get())})}}function pm(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const i=Wp(e,t,r);return i.customData._tokenResponse=n,i}function mm(e){return void 0!==e&&void 0!==e.enterprise}class gm{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 fm(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")}}function vm(e,t){return m(this,null,function*(){return lm(e,"POST","/v1/accounts:lookup",t)})}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function ym(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(qx){}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function bm(e,t=!1){return dh(e).getIdToken(t)}function wm(e){return 1e3*Number(e)}function xm(e){const[t,n,r]=e.split(".");if(void 0===t||void 0===n||void 0===r)return $p("JWT malformed, contained fewer than 3 sections"),null;try{const e=Hf(n);return e?JSON.parse(e):($p("Failed to decode base64 JWT payload"),null)}catch(qx){return $p("Caught error parsing JWT payload as JSON",null==qx?void 0:qx.toString()),null}}function km(e){const t=xm(e);return Jp(t,"internal-error"),Jp(void 0!==t.exp,"internal-error"),Jp(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function Sm(e,t,n=!1){return m(this,null,function*(){if(n)return t;try{return yield t}catch(qx){throw qx instanceof th&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/(qx)&&e.auth.currentUser===e&&(yield e.auth.signOut()),qx}})}class Em{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)?t:0)-Date.now()-3e5;return Math.max(0,e)}}schedule(e=!1){if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout(()=>m(this,null,function*(){yield this.iteration()}),t)}iteration(){return m(this,null,function*(){try{yield this.user.getIdToken(!0)}catch(qx){return void("auth/network-request-failed"===(null==qx?void 0:qx.code)&&this.schedule(!0))}this.schedule()})}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class _m{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=ym(this.lastLoginAt),this.creationTime=ym(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function Cm(e){return m(this,null,function*(){var t;const n=e.auth,r=yield e.getIdToken(),i=yield Sm(e,vm(n,{idToken:r}));Jp(null==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.length)?Nm(o.providerUserInfo):[],s=(l=e.providerData,u=a,[...l.filter(e=>!u.some(t=>t.providerId===e.providerId)),...u]);var l,u;const c=e.isAnonymous,d=!(e.email&&o.passwordHash||(null==s?void 0:s.length)),f=!!c&&d,h={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 _m(o.createdAt,o.lastLoginAt),isAnonymous:f};Object.assign(e,h)})}function Nm(e){return e.map(e=>{var t=e,{providerId:n}=t,r=f(t,["providerId"]);return{providerId:n,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}})}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
class Im{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){Jp(e.idToken,"internal-error"),Jp(void 0!==e.idToken,"internal-error"),Jp(void 0!==e.refreshToken,"internal-error");const t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):km(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}updateFromIdToken(e){Jp(0!==e.length,"internal-error");const t=km(e);this.updateTokensAndExpiration(e,null,t)}getToken(e,t=!1){return m(this,null,function*(){return t||!this.accessToken||this.isExpired?(Jp(this.refreshToken,e,"user-token-expired"),this.refreshToken?(yield this.refresh(e,this.refreshToken),this.accessToken):null):this.accessToken})}clearRefreshToken(){this.refreshToken=null}refresh(e,t){return m(this,null,function*(){const{accessToken:n,refreshToken:r,expiresIn:i}=yield function(e,t){return m(this,null,function*(){const n=yield um(e,{},()=>m(this,null,function*(){const n=ah({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:i}=e.config,o=yield dm(e,r,"/v1/token",`key=${i}`),a=yield e._getAdditionalHeaders();a["Content-Type"]="application/x-www-form-urlencoded";const s={method:"POST",headers:a,body:n};return e.emulatorConfig&&Qf(e.emulatorConfig.host)&&(s.credentials="include"),rm.fetch()(o,s)}));return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}})}(e,t);this.updateTokensAndExpiration(n,r,Number(i))})}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){const{refreshToken:n,accessToken:r,expirationTime:i}=t,o=new Im;return n&&(Jp("string"==typeof n,"internal-error",{appName:e}),o.refreshToken=n),r&&(Jp("string"==typeof r,"internal-error",{appName:e}),o.accessToken=r),i&&(Jp("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 Im,this.toJSON())}_performRefresh(){return Qp("not implemented")}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function Tm(e,t){Jp("string"==typeof e||void 0===e,"internal-error",{appName:t})}class Pm{constructor(e){var t=e,{uid:n,auth:r,stsTokenManager:i}=t,o=f(t,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new Em(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=n,this.auth=r,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new _m(o.createdAt||void 0,o.lastLoginAt||void 0)}getIdToken(e){return m(this,null,function*(){const t=yield Sm(this,this.stsTokenManager.getToken(this.auth,e));return Jp(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,yield this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t})}getIdTokenResult(e){return function(e,t=!1){return m(this,null,function*(){const n=dh(e),r=yield n.getIdToken(t),i=xm(r);Jp(i&&i.exp&&i.auth_time&&i.iat,n.auth,"internal-error");const o="object"==typeof i.firebase?i.firebase:void 0,a=null==o?void 0:o.sign_in_provider;return{claims:i,token:r,authTime:ym(wm(i.auth_time)),issuedAtTime:ym(wm(i.iat)),expirationTime:ym(wm(i.exp)),signInProvider:a||null,signInSecondFactor:(null==o?void 0:o.sign_in_second_factor)||null}})}(this,e)}reload(){return function(e){return m(this,null,function*(){const t=dh(e);yield Cm(t),yield t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)})}(this)}_assign(e){this!==e&&(Jp(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,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=>c({},e)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){const t=new Pm(d(c({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){Jp(!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()}_updateTokensIfNecessary(e,t=!1){return m(this,null,function*(){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&(yield Cm(this)),yield this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)})}delete(){return m(this,null,function*(){if(Sp(this.auth.app))return Promise.reject(Kp(this.auth));const e=yield this.getIdToken();return yield Sm(this,
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
function(e,t){return m(this,null,function*(){return lm(e,"POST","/v1/accounts:delete",t)})}(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()})}toJSON(){return d(c({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=>c({},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,u;const d=null!=(n=t.displayName)?n:void 0,f=null!=(r=t.email)?r:void 0,h=null!=(i=t.phoneNumber)?i:void 0,p=null!=(o=t.photoURL)?o:void 0,m=null!=(a=t.tenantId)?a:void 0,g=null!=(s=t._redirectEventId)?s:void 0,v=null!=(l=t.createdAt)?l:void 0,y=null!=(u=t.lastLoginAt)?u:void 0,{uid:b,emailVerified:w,isAnonymous:x,providerData:k,stsTokenManager:S}=t;Jp(b&&S,e,"internal-error");const E=Im.fromJSON(this.name,S);Jp("string"==typeof b,e,"internal-error"),Tm(d,e.name),Tm(f,e.name),Jp("boolean"==typeof w,e,"internal-error"),Jp("boolean"==typeof x,e,"internal-error"),Tm(h,e.name),Tm(p,e.name),Tm(m,e.name),Tm(g,e.name),Tm(v,e.name),Tm(y,e.name);const _=new Pm({uid:b,auth:e,email:f,emailVerified:w,displayName:d,isAnonymous:x,photoURL:p,phoneNumber:h,tenantId:m,stsTokenManager:E,createdAt:v,lastLoginAt:y});return k&&Array.isArray(k)&&(_.providerData=k.map(e=>c({},e))),g&&(_._redirectEventId=g),_}static _fromIdTokenResponse(e,t,n=!1){return m(this,null,function*(){const r=new Im;r.updateFromServerResponse(t);const i=new Pm({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return yield Cm(i),i})}static _fromGetAccountInfoResponse(e,t,n){return m(this,null,function*(){const r=t.users[0];Jp(void 0!==r.localId,"internal-error");const i=void 0!==r.providerUserInfo?Nm(r.providerUserInfo):[],o=!(r.email&&r.passwordHash||(null==i?void 0:i.length)),a=new Im;a.updateFromIdToken(n);const s=new Pm({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 _m(r.createdAt,r.lastLoginAt),isAnonymous:!(r.email&&r.passwordHash||(null==i?void 0:i.length))};return Object.assign(s,l),s})}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/const Rm=new Map;function Om(e){Yp(e instanceof Function,"Expected a class definition");let t=Rm.get(e);return t?(Yp(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,Rm.set(e,t),t)}
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class Am{constructor(){this.type="NONE",this.storage={}}_isAvailable(){return m(this,null,function*(){return!0})}_set(e,t){return m(this,null,function*(){this.storage[e]=t})}_get(e){return m(this,null,function*(){const t=this.storage[e];return void 0===t?null:t})}_remove(e){return m(this,null,function*(){delete this.storage[e]})}_addListener(e,t){}_removeListener(e,t){}}Am.type="NONE";const Lm=Am;
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function jm(e,t,n){return`firebase:${e}:${t}:${n}`}class Dm{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const{config:r,name:i}=this.auth;this.fullUserKey=jm(this.userKey,r.apiKey,i),this.fullPersistenceKey=jm("persistence",r.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}getCurrentUser(){return m(this,null,function*(){const e=yield this.persistence._get(this.fullUserKey);if(!e)return null;if("string"==typeof e){const t=yield vm(this.auth,{idToken:e}).catch(()=>{});return t?Pm._fromGetAccountInfoResponse(this.auth,t,e):null}return Pm._fromJSON(this.auth,e)})}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}setPersistence(e){return m(this,null,function*(){if(this.persistence===e)return;const t=yield this.getCurrentUser();return yield this.removeCurrentUser(),this.persistence=e,t?this.setCurrentUser(t):void 0})}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static create(e,t,n="authUser"){return m(this,null,function*(){if(!t.length)return new Dm(Om(Lm),e,n);const r=(yield Promise.all(t.map(e=>m(this,null,function*(){if(yield e._isAvailable())return e})))).filter(e=>e);let i=r[0]||Om(Lm);const o=jm(n,e.config.apiKey,e.name);let a=null;for(const n of t)try{const t=yield n._get(o);if(t){let r;if("string"==typeof t){const n=yield vm(e,{idToken:t}).catch(()=>{});if(!n)break;r=yield Pm._fromGetAccountInfoResponse(e,n,t)}else r=Pm._fromJSON(e,t);n!==i&&(a=r),i=n;break}}catch(qx){}const s=r.filter(e=>e._shouldAllowMigration);return i._shouldAllowMigration&&s.length?(i=s[0],a&&(yield i._set(o,a.toJSON())),yield Promise.all(t.map(e=>m(this,null,function*(){if(e!==i)try{yield e._remove(o)}catch(qx){}}))),new Dm(i,e,n)):new Dm(i,e,n)})}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function Mm(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Bm(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Um(t))return"Firefox";if(t.includes("silk/"))return"Silk";if($m(t))return"Blackberry";if(Hm(t))return"Webos";if(zm(t))return"Safari";if((t.includes("chrome/")||Fm(t))&&!t.includes("edge/"))return"Chrome";if(Vm(t))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=e.match(t);if(2===(null==n?void 0:n.length))return n[1]}return"Other"}function Um(e=eh()){return/firefox\//i.test(e)}function zm(e=eh()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function Fm(e=eh()){return/crios\//i.test(e)}function Bm(e=eh()){return/iemobile/i.test(e)}function Vm(e=eh()){return/android/i.test(e)}function $m(e=eh()){return/blackberry/i.test(e)}function Hm(e=eh()){return/webos/i.test(e)}function Wm(e=eh()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function qm(){return function(){const e=eh();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}()&&10===document.documentMode}function Km(e=eh()){return Wm(e)||Vm(e)||Hm(e)||$m(e)||/windows phone/i.test(e)||Bm(e)}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function Gm(e,t=[]){let n;switch(e){case"Browser":n=Mm(eh());break;case"Worker":n=`${Mm(eh())}-${e}`;break;default:n=e}const r=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${Cp}/${r}`}
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class Jm{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const n=t=>new Promise((n,r)=>{try{n(e(t))}catch(qx){r(qx)}});n.onAbort=t,this.queue.push(n);const r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}runMiddleware(e){return m(this,null,function*(){if(this.auth.currentUser===e)return;const t=[];try{for(const n of this.queue)yield n(e),n.onAbort&&t.push(n.onAbort)}catch(qx){t.reverse();for(const r of t)try{r()}catch(n){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==qx?void 0:qx.message})}})}}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class Qm{constructor(e){var t,n,r,i;const o=e.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=null!=(t=o.minPasswordLength)?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.join(""))?r:"",this.forceUpgradeOnSignin=null!=(i=e.forceUpgradeOnSignin)&&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&&(s.isValid=null==(t=s.meetsMinPasswordLength)||t),s.isValid&&(s.isValid=null==(n=s.meetsMaxPasswordLength)||n),s.isValid&&(s.isValid=null==(r=s.containsLowercaseLetter)||r),s.isValid&&(s.isValid=null==(i=s.containsUppercaseLetter)||i),s.isValid&&(s.isValid=null==(o=s.containsNumericCharacter)||o),s.isValid&&(s.isValid=null==(a=s.containsNonAlphanumericCharacter)||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))}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class Ym{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 Zm(this),this.idTokenSubscription=new Zm(this),this.beforeStateQueue=new Jm(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=Bp,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=Om(t)),this._initializationPromise=this.queue(()=>m(this,null,function*(){var n,r,i;if(!this._deleted&&(this.persistenceManager=yield Dm.create(this,e),null==(n=this._resolvePersistenceManagerAvailable)||n.call(this),!this._deleted)){if(null==(r=this._popupRedirectResolver)?void 0:r._shouldInitProactively)try{yield this._popupRedirectResolver._initialize(this)}catch(qx){}yield this.initializeCurrentUser(t),this.lastNotifiedUid=(null==(i=this.currentUser)?void 0:i.uid)||null,this._deleted||(this._isInitialized=!0)}})),this._initializationPromise}_onStorageEvent(){return m(this,null,function*(){if(this._deleted)return;const e=yield this.assertedPersistence.getCurrentUser();return this.currentUser||e?this.currentUser&&e&&this.currentUser.uid===e.uid?(this._currentUser._assign(e),void(yield this.currentUser.getIdToken())):void(yield this._updateCurrentUser(e,!0)):void 0})}initializeCurrentUserFromIdToken(e){return m(this,null,function*(){try{const t=yield vm(this,{idToken:e}),n=yield Pm._fromGetAccountInfoResponse(this,t,e);yield this.directlySetCurrentUser(n)}catch(t){yield this.directlySetCurrentUser(null)}})}initializeCurrentUser(e){return m(this,null,function*(){var t;if(Sp(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=yield this.assertedPersistence.getCurrentUser();let r=n,i=!1;if(e&&this.config.authDomain){yield this.getOrInitRedirectPersistenceManager();const n=null==(t=this.redirectUser)?void 0:t._redirectEventId,o=null==r?void 0:r._redirectEventId,a=yield this.tryRedirectSignIn(e);n&&n!==o||!(null==a?void 0:a.user)||(r=a.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(i)try{yield this.beforeStateQueue.runMiddleware(r)}catch(qx){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(qx))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return Jp(this._popupRedirectResolver,this,"argument-error"),yield this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)})}tryRedirectSignIn(e){return m(this,null,function*(){let t=null;try{t=yield this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(qx){yield this._setRedirectUser(null)}return t})}reloadAndSetCurrentUserOrClear(e){return m(this,null,function*(){try{yield Cm(e)}catch(qx){if("auth/network-request-failed"!==(null==qx?void 0:qx.code))return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)})}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}()}_delete(){return m(this,null,function*(){this._deleted=!0})}updateCurrentUser(e){return m(this,null,function*(){if(Sp(this.app))return Promise.reject(Kp(this));const t=e?dh(e):null;return t&&Jp(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))})}_updateCurrentUser(e,t=!1){return m(this,null,function*(){if(!this._deleted)return e&&Jp(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||(yield this.beforeStateQueue.runMiddleware(e)),this.queue(()=>m(this,null,function*(){yield this.directlySetCurrentUser(e),this.notifyAuthListeners()}))})}signOut(){return m(this,null,function*(){return Sp(this.app)?Promise.reject(Kp(this)):(yield this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&(yield this._setRedirectUser(null)),this._updateCurrentUser(null,!0))})}setPersistence(e){return Sp(this.app)?Promise.reject(Kp(this)):this.queue(()=>m(this,null,function*(){yield this.assertedPersistence.setPersistence(Om(e))}))}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}validatePassword(e){return m(this,null,function*(){this._getPasswordPolicyInternal()||(yield 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]}_updatePasswordPolicy(){return m(this,null,function*(){const e=yield function(e){return m(this,arguments,function*(e,t={}){return lm(e,"GET","/v2/passwordPolicy",sm(e,t))})}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/(this),t=new Qm(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 nh("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)}})}revokeAccessToken(e){return m(this,null,function*(){if(this.currentUser){const t=yield this.currentUser.getIdToken(),n={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:e,idToken:t};null!=this.tenantId&&(n.tenantId=this.tenantId),yield function(e,t){return m(this,null,function*(){return lm(e,"POST","/v2/accounts:revokeToken",sm(e,t))})}(this,n)}})}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null==(e=this._currentUser)?void 0:e.toJSON()}}_setRedirectUser(e,t){return m(this,null,function*(){const n=yield this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)})}getOrInitRedirectPersistenceManager(e){return m(this,null,function*(){if(!this.redirectPersistenceManager){const t=e&&Om(e)||this._popupRedirectResolver;Jp(t,this,"argument-error"),this.redirectPersistenceManager=yield Dm.create(this,[Om(t._redirectPersistence)],"redirectUser"),this.redirectUser=yield this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager})}_redirectUserForId(e){return m(this,null,function*(){var t,n;return this._isInitialized&&(yield this.queue(()=>m(this,null,function*(){}))),(null==(t=this._currentUser)?void 0:t._redirectEventId)===e?this._currentUser:(null==(n=this.redirectUser)?void 0:n._redirectEventId)===e?this.redirectUser:null})}_persistUserIfCurrent(e){return m(this,null,function*(){if(e===this.currentUser)return this.queue(()=>m(this,null,function*(){return this.directlySetCurrentUser(e)}))})}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const n=null!=(t=null==(e=this.currentUser)?void 0:e.uid)?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(Jp(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()}}}directlySetCurrentUser(e){return m(this,null,function*(){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?yield this.assertedPersistence.setCurrentUser(e):yield this.assertedPersistence.removeCurrentUser()})}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return Jp(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){e&&!this.frameworks.includes(e)&&(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=Gm(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}_getAdditionalHeaders(){return m(this,null,function*(){var e;const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const n=yield null==(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))?void 0:e.getHeartbeatsHeader();n&&(t["X-Firebase-Client"]=n);const r=yield this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t})}_getAppCheckToken(){return m(this,null,function*(){var e;if(Sp(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const t=yield null==(e=this.appCheckServiceProvider.getImmediate({optional:!0}))?void 0:e.getToken();return(null==t?void 0:t.error)&&function(e,...t){Vp.logLevel<=gh.WARN&&Vp.warn(`Auth (${Cp}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token})}}function Xm(e){return dh(e)}class Zm{constructor(e){this.auth=e,this.observer=null,this.addObserver=function(e,t){const n=new uh(e,t);return n.subscribe.bind(n)}(e=>this.observer=e)}get next(){return Jp(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/let eg={loadJS(){return m(this,null,function*(){throw new Error("Unable to load external scripts")})},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function tg(e){return eg.loadJS(e)}class ng{constructor(){this.enterprise=new rg}ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}class rg{ready(e){e()}execute(e,t){return Promise.resolve("token")}render(e,t){return""}}const ig="NO_RECAPTCHA";class og{constructor(e){this.type="recaptcha-enterprise",this.auth=Xm(e)}verify(e="verify",t=!1){return m(this,null,function*(){function n(e){return m(this,null,function*(){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((t,n)=>m(this,null,function*(){(function(e,t){return m(this,null,function*(){return lm(e,"GET","/v2/recaptchaConfig",sm(e,t))})})(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(r=>{if(void 0!==r.recaptchaKey){const n=new gm(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)})}))})}function r(t,n,r){const i=window.grecaptcha;mm(i)?i.enterprise.ready(()=>{i.enterprise.execute(t,{action:e}).then(e=>{n(e)}).catch(()=>{n(ig)})}):r(Error("No reCAPTCHA enterprise script loaded."))}if(this.auth.settings.appVerificationDisabledForTesting){return(new ng).execute("siteKey",{action:"verify"})}return new Promise((e,i)=>{n(this.auth).then(n=>{if(!t&&mm(window.grecaptcha))r(n,e,i);else{if("undefined"==typeof window)return void i(new Error("RecaptchaVerifier is only supported in browser"));let t=eg.recaptchaEnterpriseScript;0!==t.length&&(t+=n),tg(t).then(()=>{r(n,e,i)}).catch(e=>{i(e)})}}).catch(e=>{i(e)})})})}}function ag(e,t,n,r=!1,i=!1){return m(this,null,function*(){const o=new og(e);let a;if(i)a=ig;else try{a=yield o.verify(n)}catch(l){a=yield o.verify(n,!0)}const s=c({},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})}function sg(e,t,n,r,i){return m(this,null,function*(){var o,a;if("EMAIL_PASSWORD_PROVIDER"===i){if(null==(o=e._getRecaptchaConfig())?void 0:o.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const i=yield ag(e,t,n,"getOobCode"===n);return r(e,i)}return r(e,t).catch(i=>m(this,null,function*(){if("auth/missing-recaptcha-token"===i.code){const i=yield ag(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.isProviderEnabled("PHONE_PROVIDER")){const i=yield ag(e,t,n);return r(e,i).catch(i=>m(this,null,function*(){var o;if("AUDIT"===(null==(o=e._getRecaptchaConfig())?void 0:o.getProviderEnforcementState("PHONE_PROVIDER"))&&("auth/missing-recaptcha-token"===i.code||"auth/invalid-app-credential"===i.code)){const i=yield ag(e,t,n,!1,!0);return r(e,i)}return Promise.reject(i)}))}{const i=yield ag(e,t,n,!1,!0);return r(e,i)}}return Promise.reject(i+" provider is not supported.")})}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function lg(e,t,n){const r=Xm(e);Jp(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const i=!!(null==n?void 0:n.disableWarnings),o=ug(t),{host:a,port:s}=function(e){const t=ug(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){const e=i[1];return{host:e,port:cg(r.substr(e.length+1))}}{const[e,t]=r.split(":");return{host:e,port:cg(t)}}}(t),l=null===s?"":`:${s}`,u={url:`${o}//${a}${l}/`},c=Object.freeze({host:a,port:s,protocol:o.replace(":",""),options:Object.freeze({disableWarnings:i})});if(!r._canInitEmulator)return Jp(r.config.emulator&&r.emulatorConfig,r,"emulator-config-failed"),void Jp(ih(u,r.config.emulator)&&ih(c,r.emulatorConfig),r,"emulator-config-failed");r.config.emulator=u,r.emulatorConfig=c,r.settings.appVerificationDisabledForTesting=!0,Qf(a)?(!function(e){m(this,null,function*(){return(yield fetch(e,{credentials:"include"})).ok})}(`${o}//${a}${l}`),Zf("Auth",!0)):i||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&&console.info;"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/()}function ug(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function cg(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}class dg{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return Qp("not implemented")}_getIdTokenResponse(e){return Qp("not implemented")}_linkToIdToken(e,t){return Qp("not implemented")}_getReauthenticationResolver(e){return Qp("not implemented")}}function fg(e,t){return m(this,null,function*(){return lm(e,"POST","/v1/accounts:signUp",t)})}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function hg(e,t){return m(this,null,function*(){return cm(e,"POST","/v1/accounts:signInWithPassword",sm(e,t))})}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
class pg extends dg{constructor(e,t,n,r=null){super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new pg(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new pg(e,t,"emailLink",n)}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.email)&&(null==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}_getIdTokenResponse(e){return m(this,null,function*(){switch(this.signInMethod){case"password":const t={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return sg(e,t,"signInWithPassword",hg,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return function(e,t){return m(this,null,function*(){return cm(e,"POST","/v1/accounts:signInWithEmailLink",sm(e,t))})}(e,{email:this._email,oobCode:this._password});default:Hp(e,"internal-error")}})}_linkToIdToken(e,t){return m(this,null,function*(){switch(this.signInMethod){case"password":const n={idToken:t,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return sg(e,n,"signUpPassword",fg,"EMAIL_PASSWORD_PROVIDER");case"emailLink":return function(e,t){return m(this,null,function*(){return cm(e,"POST","/v1/accounts:signInWithEmailLink",sm(e,t))})}(e,{idToken:t,email:this._email,oobCode:this._password});default:Hp(e,"internal-error")}})}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function mg(e,t){return m(this,null,function*(){return cm(e,"POST","/v1/accounts:signInWithIdp",sm(e,t))})}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class gg extends dg{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new gg(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):Hp("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const t="string"==typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,i=f(t,["providerId","signInMethod"]);if(!n||!r)return null;const o=new gg(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 mg(e,this.buildRequest())}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,mg(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,mg(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=ah(t)}return e}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class vg{constructor(e){var t,n,r,i,o,a;const s=sh(lh(e)),l=null!=(t=s.apiKey)?t:null,u=null!=(n=s.oobCode)?n:null,c=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=s.mode)?r:null);Jp(l&&u&&c,"argument-error"),this.apiKey=l,this.operation=c,this.code=u,this.continueUrl=null!=(i=s.continueUrl)?i:null,this.languageCode=null!=(o=s.lang)?o:null,this.tenantId=null!=(a=s.tenantId)?a:null}static parseLink(e){const t=function(e){const t=sh(lh(e)).link,n=t?sh(lh(t)).deep_link_id:null,r=sh(lh(e)).deep_link_id;return(r?sh(lh(r)).link:null)||r||n||t||e}(e);try{return new vg(t)}catch(qx){return null}}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class yg{constructor(){this.providerId=yg.PROVIDER_ID}static credential(e,t){return pg._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){const n=vg.parseLink(t);return Jp(n,"argument-error"),pg._fromEmailAndCode(e,n.code,n.tenantId)}}yg.PROVIDER_ID="password",yg.EMAIL_PASSWORD_SIGN_IN_METHOD="password",yg.EMAIL_LINK_SIGN_IN_METHOD="emailLink";
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
class bg{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}}
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class wg extends bg{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class xg extends wg{constructor(){super("facebook.com")}static credential(e){return gg._fromParams({providerId:xg.PROVIDER_ID,signInMethod:xg.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return xg.credentialFromTaggedObject(e)}static credentialFromError(e){return xg.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return xg.credential(e.oauthAccessToken)}catch(qx){return null}}}xg.FACEBOOK_SIGN_IN_METHOD="facebook.com",xg.PROVIDER_ID="facebook.com";
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
class kg extends wg{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return gg._fromParams({providerId:kg.PROVIDER_ID,signInMethod:kg.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return kg.credentialFromTaggedObject(e)}static credentialFromError(e){return kg.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return kg.credential(t,n)}catch(qx){return null}}}kg.GOOGLE_SIGN_IN_METHOD="google.com",kg.PROVIDER_ID="google.com";
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
class Sg extends wg{constructor(){super("github.com")}static credential(e){return gg._fromParams({providerId:Sg.PROVIDER_ID,signInMethod:Sg.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Sg.credentialFromTaggedObject(e)}static credentialFromError(e){return Sg.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e))return null;if(!e.oauthAccessToken)return null;try{return Sg.credential(e.oauthAccessToken)}catch(qx){return null}}}Sg.GITHUB_SIGN_IN_METHOD="github.com",Sg.PROVIDER_ID="github.com";
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
class Eg extends wg{constructor(){super("twitter.com")}static credential(e,t){return gg._fromParams({providerId:Eg.PROVIDER_ID,signInMethod:Eg.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return Eg.credentialFromTaggedObject(e)}static credentialFromError(e){return Eg.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return Eg.credential(t,n)}catch(qx){return null}}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
function _g(e,t){return m(this,null,function*(){return cm(e,"POST","/v1/accounts:signUp",sm(e,t))})}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/Eg.TWITTER_SIGN_IN_METHOD="twitter.com",Eg.PROVIDER_ID="twitter.com";class Cg{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static _fromIdTokenResponse(e,t,n,r=!1){return m(this,null,function*(){const i=yield Pm._fromIdTokenResponse(e,n,r),o=Ng(n);return new Cg({user:i,providerId:o,_tokenResponse:n,operationType:t})})}static _forOperation(e,t,n){return m(this,null,function*(){yield e._updateTokensIfNecessary(n,!0);const r=Ng(n);return new Cg({user:e,providerId:r,_tokenResponse:n,operationType:t})})}}function Ng(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class Ig extends th{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,Ig.prototype),this.customData={appName:e.name,tenantId:null!=(i=e.tenantId)?i:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,r){return new Ig(e,t,n,r)}}function Tg(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(n=>{if("auth/multi-factor-auth-required"===n.code)throw Ig._fromErrorAndOperation(e,n,t,r);throw n})}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
function Pg(e,t,n=!1){return m(this,null,function*(){if(Sp(e.app))return Promise.reject(Kp(e));const r="signIn",i=yield Tg(e,r,t),o=yield Cg._fromIdTokenResponse(e,r,i);return n||(yield e._updateCurrentUser(o.user)),o})}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
function Rg(e){return m(this,null,function*(){const t=Xm(e);t._getPasswordPolicyInternal()&&(yield t._updatePasswordPolicy())})}function Og(e,t,n){return Sp(e.app)?Promise.reject(Kp(e)):function(e,t){return m(this,null,function*(){return Pg(Xm(e),t)})}(dh(e),yg.credential(t,n)).catch(t=>m(this,null,function*(){throw"auth/password-does-not-meet-requirements"===t.code&&Rg(e),t}))}function Ag(e){return dh(e).signOut()}const Lg="__sak";
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class jg{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(Lg,"1"),this.storage.removeItem(Lg),Promise.resolve(!0)):Promise.resolve(!1)}catch(qx){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()}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class Dg extends jg{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Km(),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,t=!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);qm()&&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())}_set(e,t){return m(this,null,function*(){yield p(Dg.prototype,this,"_set").call(this,e,t),this.localCache[e]=JSON.stringify(t)})}_get(e){return m(this,null,function*(){const t=yield p(Dg.prototype,this,"_get").call(this,e);return this.localCache[e]=JSON.stringify(t),t})}_remove(e){return m(this,null,function*(){yield p(Dg.prototype,this,"_remove").call(this,e),delete this.localCache[e]})}}Dg.type="LOCAL";const Mg=Dg;
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class Ug extends jg{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}Ug.type="SESSION";const zg=Ug;
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
class Fg{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 Fg(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}handleEvent(e){return m(this,null,function*(){const t=e,{eventId:n,eventType:r,data:i}=t.data,o=this.handlersMap[r];if(!(null==o?void 0:o.size))return;t.ports[0].postMessage({status:"ack",eventId:n,eventType:r});const a=Array.from(o).map(e=>m(this,null,function*(){return e(t.origin,i)})),s=yield function(e){return Promise.all(e.map(e=>m(this,null,function*(){try{return{fulfilled:!0,value:yield e}}catch(t){return{fulfilled:!1,reason:t}}})))}(a);t.ports[0].postMessage({status:"done",eventId:n,eventType:r,response:s})})}_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)}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
function Bg(e="",t=10){let n="";for(let r=0;r<t;r++)n+=Math.floor(10*Math.random());return e+n}
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/Fg.receivers=[];class Vg{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)}_send(e,t,n=50){return m(this,null,function*(){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=Bg("",20);r.port1.start();const u=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(u),i=setTimeout(()=>{s(new Error("timeout"))},3e3);break;case"done":clearTimeout(i),a(t.data.response);break;default:clearTimeout(u),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)})})}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/function $g(){return window}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
function Hg(){return void 0!==$g().WorkerGlobalScope&&"function"==typeof $g().importScripts}
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
const Wg="firebaseLocalStorageDb",qg="firebaseLocalStorage",Kg="fbase_key";class Gg{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 Jg(e,t){return e.transaction([qg],t?"readwrite":"readonly").objectStore(qg)}function Qg(){const e=indexedDB.open(Wg,1);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const t=e.result;try{t.createObjectStore(qg,{keyPath:Kg})}catch(qx){n(qx)}}),e.addEventListener("success",()=>m(this,null,function*(){const n=e.result;n.objectStoreNames.contains(qg)?t(n):(n.close(),yield function(){const e=indexedDB.deleteDatabase(Wg);return new Gg(e).toPromise()}(),t(yield Qg()))}))})}function Yg(e,t,n){return m(this,null,function*(){const r=Jg(e,!0).put({[Kg]:t,value:n});return new Gg(r).toPromise()})}function Xg(e,t){const n=Jg(e,!0).delete(t);return new Gg(n).toPromise()}class Zg{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(()=>{},()=>{})}_openDb(){return m(this,null,function*(){return this.db||(this.db=yield Qg()),this.db})}_withRetries(e){return m(this,null,function*(){let t=0;for(;;)try{const t=yield this._openDb();return yield e(t)}catch(qx){if(t++>3)throw qx;this.db&&(this.db.close(),this.db=void 0)}})}initializeServiceWorkerMessaging(){return m(this,null,function*(){return Hg()?this.initializeReceiver():this.initializeSender()})}initializeReceiver(){return m(this,null,function*(){this.receiver=Fg._getInstance(Hg()?self:null),this.receiver._subscribe("keyChanged",(e,t)=>m(this,null,function*(){return{keyProcessed:(yield this._poll()).includes(t.key)}})),this.receiver._subscribe("ping",(e,t)=>m(this,null,function*(){return["keyChanged"]}))})}initializeSender(){return m(this,null,function*(){var e,t;if(this.activeServiceWorker=yield function(){return m(this,null,function*(){if(!(null==navigator?void 0:navigator.serviceWorker))return null;try{return(yield navigator.serviceWorker.ready).active}catch(qx){return null}})}(),!this.activeServiceWorker)return;this.sender=new Vg(this.activeServiceWorker);const n=yield this.sender._send("ping",{},800);n&&(null==(e=n[0])?void 0:e.fulfilled)&&(null==(t=n[0])?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)})}notifyServiceWorker(e){return m(this,null,function*(){var t;if(this.sender&&this.activeServiceWorker&&((null==(t=null==navigator?void 0:navigator.serviceWorker)?void 0:t.controller)||null)===this.activeServiceWorker)try{yield this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(qx){}})}_isAvailable(){return m(this,null,function*(){try{if(!indexedDB)return!1;const e=yield Qg();return yield Yg(e,Lg,"1"),yield Xg(e,Lg),!0}catch(qx){}return!1})}_withPendingWrite(e){return m(this,null,function*(){this.pendingWrites++;try{yield e()}finally{this.pendingWrites--}})}_set(e,t){return m(this,null,function*(){return this._withPendingWrite(()=>m(this,null,function*(){return yield this._withRetries(n=>Yg(n,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)}))})}_get(e){return m(this,null,function*(){const t=yield this._withRetries(t=>function(e,t){return m(this,null,function*(){const n=Jg(e,!1).get(t),r=yield new Gg(n).toPromise();return void 0===r?null:r.value})}(t,e));return this.localCache[e]=t,t})}_remove(e){return m(this,null,function*(){return this._withPendingWrite(()=>m(this,null,function*(){return yield this._withRetries(t=>Xg(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)}))})}_poll(){return m(this,null,function*(){const e=yield this._withRetries(e=>{const t=Jg(e,!1).getAll();return new Gg(t).toPromise()});if(!e)return[];if(0!==this.pendingWrites)return[];const t=[],n=new Set;if(0!==e.length)for(const{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(const r of Object.keys(this.localCache))this.localCache[r]&&!n.has(r)&&(this.notifyListeners(r,null),t.push(r));return t})}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const r of Array.from(n))r(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>m(this,null,function*(){return 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()}}Zg.type="LOCAL";const ev=Zg;new tm(3e4,6e4);
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
class tv extends dg{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return mg(e,this._buildIdpRequest())}_linkToIdToken(e,t){return mg(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return mg(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 nv(e){return Pg(e.auth,new tv(e),e.bypassAuthState)}function rv(e){const{auth:t,user:n}=e;return Jp(n,t,"internal-error"),
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
function(e,t,n=!1){return m(this,null,function*(){const{auth:r}=e;if(Sp(r.app))return Promise.reject(Kp(r));const i="reauthenticate";try{const o=yield Sm(e,Tg(r,i,t,e),n);Jp(o.idToken,r,"internal-error");const a=xm(o.idToken);Jp(a,r,"internal-error");const{sub:s}=a;return Jp(e.uid===s,r,"user-mismatch"),Cg._forOperation(e,i,o)}catch(qx){throw"auth/user-not-found"===(null==qx?void 0:qx.code)&&Hp(r,"user-mismatch"),qx}})}(n,new tv(e),e.bypassAuthState)}function iv(e){return m(this,null,function*(){const{auth:t,user:n}=e;return Jp(n,t,"internal-error"),function(e,t,n=!1){return m(this,null,function*(){const r=yield Sm(e,t._linkToIdToken(e.auth,yield e.getIdToken()),n);return Cg._forOperation(e,"link",r)})}(n,new tv(e),e.bypassAuthState)})}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class ov{constructor(e,t,n,r,i=!1){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((e,t)=>m(this,null,function*(){this.pendingPromise={resolve:e,reject:t};try{this.eventManager=yield this.resolver._initialize(this.auth),yield this.onExecution(),this.eventManager.registerConsumer(this)}catch(qx){this.reject(qx)}}))}onAuthEvent(e){return m(this,null,function*(){const{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:o,type:a}=e;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(yield this.getIdpTask(a)(s))}catch(qx){this.reject(qx)}})}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return nv;case"linkViaPopup":case"linkViaRedirect":return iv;case"reauthViaPopup":case"reauthViaRedirect":return rv;default:Hp(this.auth,"internal-error")}}resolve(e){Yp(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Yp(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()}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/const av=new tm(2e3,1e4);class sv extends ov{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,sv.currentPopupAction&&sv.currentPopupAction.cancel(),sv.currentPopupAction=this}executeNotNull(){return m(this,null,function*(){const e=yield this.execute();return Jp(e,this.auth,"internal-error"),e})}onExecution(){return m(this,null,function*(){Yp(1===this.filter.length,"Popup operations only handle one event");const e=Bg();this.authWindow=yield 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(Wp(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()})}get eventId(){var e;return(null==(e=this.authWindow)?void 0:e.associatedEvent)||null}cancel(){this.reject(Wp(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,sv.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,n;(null==(n=null==(t=this.authWindow)?void 0:t.window)?void 0:n.closed)?this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(Wp(this.auth,"popup-closed-by-user"))},8e3):this.pollId=window.setTimeout(e,av.get())};e()}}sv.currentPopupAction=null;
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
const lv="pendingRedirect",uv=new Map;class cv extends ov{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}execute(){return m(this,null,function*(){let e=uv.get(this.auth._key());if(!e){try{const t=(yield function(e,t){return m(this,null,function*(){const n=function(e){return jm(lv,e.config.apiKey,e.name)}(t),r=function(e){return Om(e._redirectPersistence)}(e);if(!(yield r._isAvailable()))return!1;const i="true"===(yield r._get(n));return yield r._remove(n),i})}(this.resolver,this.auth))?yield p(cv.prototype,this,"execute").call(this):null;e=()=>Promise.resolve(t)}catch(qx){e=()=>Promise.reject(qx)}uv.set(this.auth._key(),e)}return this.bypassAuthState||uv.set(this.auth._key(),()=>Promise.resolve(null)),e()})}onAuthEvent(e){return m(this,null,function*(){if("signInViaRedirect"===e.type)return p(cv.prototype,this,"onAuthEvent").call(this,e);if("unknown"!==e.type){if(e.eventId){const t=yield this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,p(cv.prototype,this,"onAuthEvent").call(this,e);this.resolve(null)}}else this.resolve(null)})}onExecution(){return m(this,null,function*(){})}cleanUp(){}}function dv(e,t){uv.set(e._key(),t)}function fv(e,t,n=!1){return m(this,null,function*(){if(Sp(e.app))return Promise.reject(Kp(e));const r=Xm(e),i=
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
function(e,t){return t?Om(t):(Jp(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}(r,t),o=new cv(r,i,n),a=yield o.execute();return a&&!n&&(delete a.user._redirectEventId,yield r._persistUserIfCurrent(a.user),yield r._setRedirectUser(null,t)),a})}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/class hv{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 mv(e);default:return!1}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!mv(e)){const r=(null==(n=e.error.code)?void 0:n.split("auth/")[1])||"internal-error";t.onError(Wp(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(pv(e))}saveEventToCache(e){this.cachedEventUids.add(pv(e)),this.lastProcessedEventTime=Date.now()}}function pv(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function mv({type:e,error:t}){return"unknown"===e&&"auth/no-auth-event"===(null==t?void 0:t.code)}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
const gv=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,vv=/^https?/;function yv(e){return m(this,null,function*(){if(e.config.emulator)return;const{authorizedDomains:t}=yield function(e){return m(this,arguments,function*(e,t={}){return lm(e,"GET","/v1/projects",t)})}(e);for(const e of t)try{if(bv(e))return}catch(qx){}Hp(e,"unauthorized-domain")})}function bv(e){const t=Xp(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const i=new URL(e);return""===i.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&i.hostname===r}if(!vv.test(n))return!1;if(gv.test(e))return r===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/const wv=new tm(3e4,6e4);function xv(){const e=$g().___jsl;if(null==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 kv(e){return new Promise((t,n)=>{var r,i,o;function a(){xv(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{xv(),n(Wp(e,"network-request-failed"))},timeout:wv.get()})}if(null==(i=null==(r=$g().gapi)?void 0:r.iframes)?void 0:i.Iframe)t(gapi.iframes.getContext());else{if(!(null==(o=$g().gapi)?void 0:o.load)){const t=`__${"iframefcb"}${Math.floor(1e6*Math.random())}`;return $g()[t]=()=>{gapi.load?a():n(Wp(e,"network-request-failed"))},tg(`${eg.gapiScript}?onload=${t}`).catch(e=>n(e))}a()}}).catch(e=>{throw Sv=null,e})}let Sv=null;
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
const Ev=new tm(5e3,15e3),_v={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},Cv=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function Nv(e){const t=e.config;Jp(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?nm(t,"emulator/auth/iframe"):`https://${e.config.authDomain}/__/auth/iframe`,r={apiKey:t.apiKey,appName:e.name,v:Cp},i=Cv.get(e.config.apiHost);i&&(r.eid=i);const o=e._getFrameworks();return o.length&&(r.fw=o.join(",")),`${n}?${ah(r).slice(1)}`}function Iv(e){return m(this,null,function*(){const t=yield function(e){return Sv=Sv||kv(e),Sv}(e),n=$g().gapi;return Jp(n,e,"internal-error"),t.open({where:document.body,url:Nv(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:_v,dontclear:!0},t=>new Promise((n,r)=>m(this,null,function*(){yield t.restyle({setHideOnLeave:!1});const i=Wp(e,"network-request-failed"),o=$g().setTimeout(()=>{r(i)},Ev.get());function a(){$g().clearTimeout(o),n(t)}t.ping(a).then(a,()=>{r(i)})})))})}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/const Tv={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class Pv{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(qx){}}}function Rv(e,t,n,r=500,i=600){const o=Math.max((window.screen.availHeight-i)/2,0).toString(),a=Math.max((window.screen.availWidth-r)/2,0).toString();let s="";const l=d(c({},Tv),{width:r.toString(),height:i.toString(),top:o,left:a}),u=eh().toLowerCase();n&&(s=Fm(u)?"_blank":n),Um(u)&&(t=t||"http://localhost",l.scrollbars="yes");const f=Object.entries(l).reduce((e,[t,n])=>`${e}${t}=${n},`,"");if(function(e=eh()){var t;return Wm(e)&&!!(null==(t=window.navigator)?void 0:t.standalone)}(u)&&"_self"!==s)return function(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/(t||"",s),new Pv(null);const h=window.open(t||"",s,f);Jp(h,e,"popup-blocked");try{h.focus()}catch(qx){}return new Pv(h)}const Ov="__/auth/handler",Av="emulator/auth/handler",Lv=encodeURIComponent("fac");function jv(e,t,n,r,i,o){return m(this,null,function*(){Jp(e.config.authDomain,e,"auth-domain-config-required"),Jp(e.config.apiKey,e,"invalid-api-key");const a={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:Cp,eventId:i};if(t instanceof bg){t.setDefaultLanguage(e.languageCode),a.providerId=t.providerId||"",function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(t.getCustomParameters())||(a.customParameters=JSON.stringify(t.getCustomParameters()));for(const[e,t]of Object.entries(o||{}))a[e]=t}if(t instanceof wg){const e=t.getScopes().filter(e=>""!==e);e.length>0&&(a.scopes=e.join(","))}e.tenantId&&(a.tid=e.tenantId);const s=a;for(const e of Object.keys(s))void 0===s[e]&&delete s[e];const l=yield e._getAppCheckToken(),u=l?`#${Lv}=${encodeURIComponent(l)}`:"";return`${function({config:e}){if(!e.emulator)return`https://${e.authDomain}/${Ov}`;return nm(e,Av)}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/(e)}?${ah(s).slice(1)}${u}`})}const Dv="webStorageSupport";const Mv=class{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=zg,this._completeRedirectFn=fv,this._overrideRedirectResult=dv}_openPopup(e,t,n,r){return m(this,null,function*(){var i;Yp(null==(i=this.eventManagers[e._key()])?void 0:i.manager,"_initialize() not called before _openPopup()");const o=yield jv(e,t,n,Xp(),r);return Rv(e,o,Bg())})}_openRedirect(e,t,n,r){return m(this,null,function*(){yield this._originValidation(e);return function(e){$g().location.href=e}(yield jv(e,t,n,Xp(),r)),new Promise(()=>{})})}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:e,promise:n}=this.eventManagers[t];return e?Promise.resolve(e):(Yp(n,"If manager is not set, promise should be"),n)}const n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch(()=>{delete this.eventManagers[t]}),n}initAndGetManager(e){return m(this,null,function*(){const t=yield Iv(e),n=new hv(e);return t.register("authEvent",t=>{Jp(null==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(Dv,{type:Dv},n=>{var r;const i=null==(r=null==n?void 0:n[0])?void 0:r[Dv];void 0!==i&&t(!!i),Hp(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=yv(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return Km()||zm()||Wm()}};var Uv="@firebase/auth",zv="1.11.0";
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
class Fv{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null==(e=this.auth.currentUser)?void 0:e.uid)||null}getToken(e){return m(this,null,function*(){if(this.assertAuthConfigured(),yield this.auth._initializationPromise,!this.auth.currentUser)return null;return{accessToken:yield 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.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(){Jp(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
const Bv=Gf("authIdTokenMaxAge")||300;let Vv=null;var $v;function Hv(e,t){return function(){return e.apply(t,arguments)}}eg={loadJS:e=>new Promise((t,n)=>{const r=document.createElement("script");var i,o;r.setAttribute("src",e),r.onload=t,r.onerror=e=>{const t=Wp("internal-error");t.customData=e,n(t)},r.type="text/javascript",r.charset="UTF-8",(null!=(o=null==(i=document.getElementsByTagName("head"))?void 0:i[0])?o: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="},$v="Browser",xp(new fh("auth",(e,{options:t})=>{const n=e.getProvider("app").getImmediate(),r=e.getProvider("heartbeat"),i=e.getProvider("app-check-internal"),{apiKey:o,authDomain:a}=n.options;Jp(o&&!o.includes(":"),"invalid-api-key",{appName:n.name});const s={apiKey:o,authDomain:a,clientPlatform:$v,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Gm($v)},l=new Ym(n,r,i,s);return function(e,t){const n=(null==t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(Om);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(l,t),l},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{e.getProvider("auth-internal").initialize()})),xp(new fh("auth-internal",e=>{const t=Xm(e.getProvider("auth").getImmediate());return new Fv(t)},"PRIVATE").setInstantiationMode("EXPLICIT")),Ip(Uv,zv,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}}($v)),Ip(Uv,zv,"esm2020");const{toString:Wv}=Object.prototype,{getPrototypeOf:qv}=Object,{iterator:Kv,toStringTag:Gv}=Symbol,Jv=(Qv=Object.create(null),e=>{const t=Wv.call(e);return Qv[t]||(Qv[t]=t.slice(8,-1).toLowerCase())});var Qv;const Yv=e=>(e=e.toLowerCase(),t=>Jv(t)===e),Xv=e=>t=>typeof t===e,{isArray:Zv}=Array,ey=Xv("undefined");function ty(e){return null!==e&&!ey(e)&&null!==e.constructor&&!ey(e.constructor)&&iy(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ny=Yv("ArrayBuffer");const ry=Xv("string"),iy=Xv("function"),oy=Xv("number"),ay=e=>null!==e&&"object"==typeof e,sy=e=>{if("object"!==Jv(e))return!1;const t=qv(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Gv in e||Kv in e)},ly=Yv("Date"),uy=Yv("File"),cy=Yv("Blob"),dy=Yv("FileList"),fy=Yv("URLSearchParams"),[hy,py,my,gy]=["ReadableStream","Request","Response","Headers"].map(Yv);function vy(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),Zv(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(ty(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function yy(e,t){if(ty(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,i=n.length;for(;i-- >0;)if(r=n[i],t===r.toLowerCase())return r;return null}const by="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,wy=e=>!ey(e)&&e!==by;const xy=(ky="undefined"!=typeof Uint8Array&&qv(Uint8Array),e=>ky&&e instanceof ky);var ky;const Sy=Yv("HTMLFormElement"),Ey=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),_y=Yv("RegExp"),Cy=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};vy(n,(n,i)=>{let o;!1!==(o=t(n,i,e))&&(r[i]=o||n)}),Object.defineProperties(e,r)};const Ny=Yv("AsyncFunction"),Iy=(Ty="function"==typeof setImmediate,Py=iy(by.postMessage),Ty?setImmediate:Py?(Ry=`axios@${Math.random()}`,Oy=[],by.addEventListener("message",({source:e,data:t})=>{e===by&&t===Ry&&Oy.length&&Oy.shift()()},!1),e=>{Oy.push(e),by.postMessage(Ry,"*")}):e=>setTimeout(e));var Ty,Py,Ry,Oy;const Ay="undefined"!=typeof queueMicrotask?queueMicrotask.bind(by):"undefined"!=typeof process&&process.nextTick||Iy,Ly={isArray:Zv,isArrayBuffer:ny,isBuffer:ty,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||iy(e.append)&&("formdata"===(t=Jv(e))||"object"===t&&iy(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ny(e.buffer),t},isString:ry,isNumber:oy,isBoolean:e=>!0===e||!1===e,isObject:ay,isPlainObject:sy,isEmptyObject:e=>{if(!ay(e)||ty(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(qx){return!1}},isReadableStream:hy,isRequest:py,isResponse:my,isHeaders:gy,isUndefined:ey,isDate:ly,isFile:uy,isBlob:cy,isRegExp:_y,isFunction:iy,isStream:e=>ay(e)&&iy(e.pipe),isURLSearchParams:fy,isTypedArray:xy,isFileList:dy,forEach:vy,merge:function e(){const{caseless:t}=wy(this)&&this||{},n={},r=(r,i)=>{const o=t&&yy(n,i)||i;sy(n[o])&&sy(r)?n[o]=e(n[o],r):sy(r)?n[o]=e({},r):Zv(r)?n[o]=r.slice():n[o]=r};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&vy(arguments[i],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(vy(t,(t,r)=>{n&&iy(t)?e[r]=Hv(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&qv(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Jv,kindOfTest:Yv,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Zv(e))return e;let t=e.length;if(!oy(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Kv]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Sy,hasOwnProperty:Ey,hasOwnProp:Ey,reduceDescriptors:Cy,freezeMethods:e=>{Cy(e,(t,n)=>{if(iy(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];iy(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Zv(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:yy,global:by,isContextDefined:wy,isSpecCompliantForm:function(e){return!!(e&&iy(e.append)&&"FormData"===e[Gv]&&e[Kv])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(ay(e)){if(t.indexOf(e)>=0)return;if(ty(e))return e;if(!("toJSON"in e)){t[r]=e;const i=Zv(e)?[]:{};return vy(e,(e,t)=>{const o=n(e,r+1);!ey(o)&&(i[t]=o)}),t[r]=void 0,i}}return e};return n(e,0)},isAsyncFn:Ny,isThenable:e=>e&&(ay(e)||iy(e))&&iy(e.then)&&iy(e.catch),setImmediate:Iy,asap:Ay,isIterable:e=>null!=e&&iy(e[Kv])};function jy(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}Ly.inherits(jy,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ly.toJSONObject(this.config),code:this.code,status:this.status}}});const Dy=jy.prototype,My={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{My[e]={value:e}}),Object.defineProperties(jy,My),Object.defineProperty(Dy,"isAxiosError",{value:!0}),jy.from=(e,t,n,r,i,o)=>{const a=Object.create(Dy);return Ly.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),jy.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};function Uy(e){return Ly.isPlainObject(e)||Ly.isArray(e)}function zy(e){return Ly.endsWith(e,"[]")?e.slice(0,-2):e}function Fy(e,t,n){return e?e.concat(t).map(function(e,t){return e=zy(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const By=Ly.toFlatObject(Ly,{},null,function(e){return/^is[A-Z]/.test(e)});function Vy(e,t,n){if(!Ly.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Ly.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Ly.isUndefined(t[e])})).metaTokens,i=n.visitor||u,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Ly.isSpecCompliantForm(t);if(!Ly.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Ly.isDate(e))return e.toISOString();if(Ly.isBoolean(e))return e.toString();if(!s&&Ly.isBlob(e))throw new jy("Blob is not supported. Use a Buffer instead.");return Ly.isArrayBuffer(e)||Ly.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,i){let s=e;if(e&&!i&&"object"==typeof e)if(Ly.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Ly.isArray(e)&&function(e){return Ly.isArray(e)&&!e.some(Uy)}(e)||(Ly.isFileList(e)||Ly.endsWith(n,"[]"))&&(s=Ly.toArray(e)))return n=zy(n),s.forEach(function(e,r){!Ly.isUndefined(e)&&null!==e&&t.append(!0===a?Fy([n],r,o):null===a?n:n+"[]",l(e))}),!1;return!!Uy(e)||(t.append(Fy(i,n,o),l(e)),!1)}const c=[],d=Object.assign(By,{defaultVisitor:u,convertValue:l,isVisitable:Uy});if(!Ly.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Ly.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),Ly.forEach(n,function(n,o){!0===(!(Ly.isUndefined(n)||null===n)&&i.call(t,n,Ly.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])}),c.pop()}}(e),t}function $y(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Hy(e,t){this._pairs=[],e&&Vy(e,this,t)}const Wy=Hy.prototype;function qy(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ky(e,t,n){if(!t)return e;const r=n&&n.encode||qy;Ly.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(o=i?i(t,n):Ly.isURLSearchParams(t)?t.toString():new Hy(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}Wy.append=function(e,t){this._pairs.push([e,t])},Wy.toString=function(e){const t=e?function(t){return e.call(this,t,$y)}:$y;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const Gy=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ly.forEach(this.handlers,function(t){null!==t&&e(t)})}},Jy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qy={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Hy,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Yy="undefined"!=typeof window&&"undefined"!=typeof document,Xy="object"==typeof navigator&&navigator||void 0,Zy=Yy&&(!Xy||["ReactNative","NativeScript","NS"].indexOf(Xy.product)<0),eb="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,tb=Yy&&window.location.href||"http://localhost",nb=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Yy,hasStandardBrowserEnv:Zy,hasStandardBrowserWebWorkerEnv:eb,navigator:Xy,origin:tb},Symbol.toStringTag,{value:"Module"})),rb=c(c({},nb),Qy);function ib(e){function t(e,n,r,i){let o=e[i++];if("__proto__"===o)return!0;const a=Number.isFinite(+o),s=i>=e.length;if(o=!o&&Ly.isArray(r)?r.length:o,s)return Ly.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a;r[o]&&Ly.isObject(r[o])||(r[o]=[]);return t(e,n,r[o],i)&&Ly.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}(r[o])),!a}if(Ly.isFormData(e)&&Ly.isFunction(e.entries)){const n={};return Ly.forEachEntry(e,(e,r)=>{t(function(e){return Ly.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const ob={transitional:Jy,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=Ly.isObject(e);i&&Ly.isHTMLForm(e)&&(e=new FormData(e));if(Ly.isFormData(e))return r?JSON.stringify(ib(e)):e;if(Ly.isArrayBuffer(e)||Ly.isBuffer(e)||Ly.isStream(e)||Ly.isFile(e)||Ly.isBlob(e)||Ly.isReadableStream(e))return e;if(Ly.isArrayBufferView(e))return e.buffer;if(Ly.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Vy(e,new rb.classes.URLSearchParams,c({visitor:function(e,t,n,r){return rb.isNode&&Ly.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=Ly.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Vy(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),function(e,t,n){if(Ly.isString(e))try{return(t||JSON.parse)(e),Ly.trim(e)}catch(qx){if("SyntaxError"!==qx.name)throw qx}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ob.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Ly.isResponse(e)||Ly.isReadableStream(e))return e;if(e&&Ly.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(qx){if(n){if("SyntaxError"===qx.name)throw jy.from(qx,jy.ERR_BAD_RESPONSE,this,null,this.response);throw qx}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rb.classes.FormData,Blob:rb.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ly.forEach(["delete","get","head","post","put","patch"],e=>{ob.headers[e]={}});const ab=ob,sb=Ly.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),lb=Symbol("internals");function ub(e){return e&&String(e).trim().toLowerCase()}function cb(e){return!1===e||null==e?e:Ly.isArray(e)?e.map(cb):String(e)}function db(e,t,n,r,i){return Ly.isFunction(r)?r.call(this,t,n):(i&&(t=n),Ly.isString(t)?Ly.isString(r)?-1!==t.indexOf(r):Ly.isRegExp(r)?r.test(t):void 0:void 0)}class fb{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=ub(t);if(!i)throw new Error("header name must be a non-empty string");const o=Ly.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=cb(e))}const o=(e,t)=>Ly.forEach(e,(e,n)=>i(e,n,t));if(Ly.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(Ly.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach(function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&sb[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(Ly.isObject(e)&&Ly.isIterable(e)){let n,r,i={};for(const t of e){if(!Ly.isArray(t))throw TypeError("Object iterator must return a key-value pair");i[r=t[0]]=(n=i[r])?Ly.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(i,t)}else null!=e&&i(t,e,n);return this}get(e,t){if(e=ub(e)){const n=Ly.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Ly.isFunction(t))return t.call(this,e,n);if(Ly.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ub(e)){const n=Ly.findKey(this,e);return!(!n||void 0===this[n]||t&&!db(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=ub(e)){const i=Ly.findKey(n,e);!i||t&&!db(0,n[i],i,t)||(delete n[i],r=!0)}}return Ly.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!db(0,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return Ly.forEach(this,(r,i)=>{const o=Ly.findKey(n,i);if(o)return t[o]=cb(r),void delete t[i];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(i):String(i).trim();a!==i&&delete t[i],t[a]=cb(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ly.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Ly.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[lb]=this[lb]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ub(e);t[r]||(!function(e,t){const n=Ly.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}(n,e),t[r]=!0)}return Ly.isArray(e)?e.forEach(r):r(e),this}}fb.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ly.reduceDescriptors(fb.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Ly.freezeMethods(fb);const hb=fb;function pb(e,t){const n=this||ab,r=t||n,i=hb.from(r.headers);let o=r.data;return Ly.forEach(e,function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function mb(e){return!(!e||!e.__CANCEL__)}function gb(e,t,n){jy.call(this,null==e?"canceled":e,jy.ERR_CANCELED,t,n),this.name="CanceledError"}function vb(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new jy("Request failed with status code "+n.status,[jy.ERR_BAD_REQUEST,jy.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Ly.inherits(gb,jy,{__CANCEL__:!0});const yb=(e,t,n=3)=>{let r=0;const i=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=r[a];i||(i=l),n[o]=s,r[o]=l;let c=a,d=0;for(;c!==o;)d+=n[c++],c%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),l-i<t)return;const f=u&&l-u;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,i=0,o=1e3/t;const a=(t,o=Date.now())=>{i=o,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-i;s>=o?a(e,t):(n=e,r||(r=setTimeout(()=>{r=null,a(n)},o-s)))},()=>n&&a(n)]}(n=>{const o=n.loaded,a=n.lengthComputable?n.total:void 0,s=o-r,l=i(s);r=o;e({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&o<=a?(a-o)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})},n)},bb=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},wb=e=>(...t)=>Ly.asap(()=>e(...t)),xb=rb.hasStandardBrowserEnv?(kb=new URL(rb.origin),Sb=rb.navigator&&/(msie|trident)/i.test(rb.navigator.userAgent),e=>(e=new URL(e,rb.origin),kb.protocol===e.protocol&&kb.host===e.host&&(Sb||kb.port===e.port))):()=>!0;var kb,Sb;const Eb=rb.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];Ly.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Ly.isString(r)&&a.push("path="+r),Ly.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function _b(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Cb=e=>e instanceof hb?c({},e):e;function Nb(e,t){t=t||{};const n={};function r(e,t,n,r){return Ly.isPlainObject(e)&&Ly.isPlainObject(t)?Ly.merge.call({caseless:r},e,t):Ly.isPlainObject(t)?Ly.merge({},t):Ly.isArray(t)?t.slice():t}function i(e,t,n,i){return Ly.isUndefined(t)?Ly.isUndefined(e)?void 0:r(void 0,e,0,i):r(e,t,0,i)}function o(e,t){if(!Ly.isUndefined(t))return r(void 0,t)}function a(e,t){return Ly.isUndefined(t)?Ly.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>i(Cb(e),Cb(t),0,!0)};return Ly.forEach(Object.keys(c(c({},e),t)),function(r){const o=l[r]||i,a=o(e[r],t[r],r);Ly.isUndefined(a)&&o!==s||(n[r]=a)}),n}const Ib=e=>{const t=Nb({},e);let n,{data:r,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=hb.from(s),t.url=Ky(_b(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),Ly.isFormData(r))if(rb.hasStandardBrowserEnv||rb.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map(e=>e.trim()).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(rb.hasStandardBrowserEnv&&(i&&Ly.isFunction(i)&&(i=i(t)),i||!1!==i&&xb(t.url))){const e=o&&a&&Eb.read(a);e&&s.set(o,e)}return t},Tb="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Ib(e);let i=r.data;const o=hb.from(r.headers).normalize();let a,s,l,u,c,{responseType:d,onUploadProgress:f,onDownloadProgress:h}=r;function p(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=hb.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());vb(function(e){t(e),p()},function(e){n(e),p()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new jy("Request aborted",jy.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new jy("Network Error",jy.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const i=r.transitional||Jy;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new jy(t,i.clarifyTimeoutError?jy.ETIMEDOUT:jy.ECONNABORTED,e,m)),m=null},void 0===i&&o.setContentType(null),"setRequestHeader"in m&&Ly.forEach(o.toJSON(),function(e,t){m.setRequestHeader(t,e)}),Ly.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),h&&([l,c]=yb(h,!0),m.addEventListener("progress",l)),f&&m.upload&&([s,u]=yb(f),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new gb(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);v&&-1===rb.protocols.indexOf(v)?n(new jy("Unsupported protocol "+v+":",jy.ERR_BAD_REQUEST,e)):m.send(i||null)})},Pb=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const i=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof jy?t:new gb(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,i(new jy(`timeout ${t} of ms exceeded`,jy.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));const{signal:s}=r;return s.unsubscribe=()=>Ly.asap(a),s}},Rb=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},Ob=function(e,t){return v(this,null,function*(){try{for(var n,r,i,o=((e,t,n)=>(t=e[l("asyncIterator")])?t.call(e):(e=e[l("iterator")](),t={},(n=(n,r)=>(r=e[n])&&(t[n]=t=>new Promise((n,i,o)=>(t=r.call(e,t),o=t.done,Promise.resolve(t.value).then(e=>n({value:e,done:o}),i)))))("next"),n("return"),t))(Ab(e));n=!(r=yield new g(o.next())).done;n=!1){const e=r.value;yield*y(Rb(e,t))}}catch(r){i=[r]}finally{try{n&&(r=o.return)&&(yield new g(r.call(o)))}finally{if(i)throw i[0]}}})},Ab=function(e){return v(this,null,function*(){if(e[Symbol.asyncIterator])return void(yield*y(e));const t=e.getReader();try{for(;;){const{done:e,value:n}=yield new g(t.read());if(e)break;yield n}}finally{yield new g(t.cancel())}})},Lb=(e,t,n,r)=>{const i=Ob(e,t);let o,a=0,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({pull(e){return m(this,null,function*(){try{const{done:t,value:r}=yield i.next();if(t)return s(),void e.close();let o=r.byteLength;if(n){let e=a+=o;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw s(t),t}})},cancel:e=>(s(e),i.return())},{highWaterMark:2})},jb="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Db=jb&&"function"==typeof ReadableStream,Mb=jb&&("function"==typeof TextEncoder?(Ub=new TextEncoder,e=>Ub.encode(e)):e=>m(void 0,null,function*(){return new Uint8Array(yield new Response(e).arrayBuffer())}));var Ub;const zb=(e,...t)=>{try{return!!e(...t)}catch(qx){return!1}},Fb=Db&&zb(()=>{let e=!1;const t=new Request(rb.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Bb=Db&&zb(()=>Ly.isReadableStream(new Response("").body)),Vb={stream:Bb&&(e=>e.body)};var $b;jb&&($b=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Vb[e]&&(Vb[e]=Ly.isFunction($b[e])?t=>t[e]():(t,n)=>{throw new jy(`Response type '${e}' is not supported`,jy.ERR_NOT_SUPPORT,n)})}));const Hb=(e,t)=>m(void 0,null,function*(){const n=Ly.toFiniteNumber(e.getContentLength());return null==n?(e=>m(void 0,null,function*(){if(null==e)return 0;if(Ly.isBlob(e))return e.size;if(Ly.isSpecCompliantForm(e)){const t=new Request(rb.origin,{method:"POST",body:e});return(yield t.arrayBuffer()).byteLength}return Ly.isArrayBufferView(e)||Ly.isArrayBuffer(e)?e.byteLength:(Ly.isURLSearchParams(e)&&(e+=""),Ly.isString(e)?(yield Mb(e)).byteLength:void 0)}))(t):n}),Wb={http:null,xhr:Tb,fetch:jb&&(e=>m(void 0,null,function*(){let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:u,headers:f,withCredentials:h="same-origin",fetchOptions:p}=Ib(e);u=u?(u+"").toLowerCase():"text";let m,g=Pb([i,o&&o.toAbortSignal()],a);const v=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let y;try{if(l&&Fb&&"get"!==n&&"head"!==n&&0!==(y=yield Hb(f,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Ly.isFormData(r)&&(e=n.headers.get("content-type"))&&f.setContentType(e),n.body){const[e,t]=bb(y,yb(wb(l)));r=Lb(n.body,65536,e,t)}}Ly.isString(h)||(h=h?"include":"omit");const i="credentials"in Request.prototype;m=new Request(t,d(c({},p),{signal:g,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:i?h:void 0}));let o=yield fetch(m,p);const a=Bb&&("stream"===u||"response"===u);if(Bb&&(s||a&&v)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=o[t]});const t=Ly.toFiniteNumber(o.headers.get("content-length")),[n,r]=s&&bb(t,yb(wb(s),!0))||[];o=new Response(Lb(o.body,65536,n,()=>{r&&r(),v&&v()}),e)}u=u||"text";let b=yield Vb[Ly.findKey(Vb,u)||"text"](o,e);return!a&&v&&v(),yield new Promise((t,n)=>{vb(t,n,{data:b,headers:hb.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:m})})}catch(b){if(v&&v(),b&&"TypeError"===b.name&&/Load failed|fetch/i.test(b.message))throw Object.assign(new jy("Network Error",jy.ERR_NETWORK,e,m),{cause:b.cause||b});throw jy.from(b,b&&b.code,e,m)}}))};Ly.forEach(Wb,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(qx){}Object.defineProperty(e,"adapterName",{value:t})}});const qb=e=>`- ${e}`,Kb=e=>Ly.isFunction(e)||null===e||!1===e,Gb=e=>{e=Ly.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o<t;o++){let t;if(n=e[o],r=n,!Kb(n)&&(r=Wb[(t=String(n)).toLowerCase()],void 0===r))throw new jy(`Unknown adapter '${t}'`);if(r)break;i[t||"#"+o]=r}if(!r){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new jy("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(qb).join("\n"):" "+qb(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Jb(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gb(null,e)}function Qb(e){Jb(e),e.headers=hb.from(e.headers),e.data=pb.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Gb(e.adapter||ab.adapter)(e).then(function(t){return Jb(e),t.data=pb.call(e,e.transformResponse,t),t.headers=hb.from(t.headers),t},function(t){return mb(t)||(Jb(e),t&&t.response&&(t.response.data=pb.call(e,e.transformResponse,t.response),t.response.headers=hb.from(t.response.headers))),Promise.reject(t)})}const Yb="1.11.0",Xb={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Xb[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Zb={};Xb.transitional=function(e,t,n){return(r,i,o)=>{if(!1===e)throw new jy(function(e,t){return"[Axios v"+Yb+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}(i," has been removed"+(t?" in "+t:"")),jy.ERR_DEPRECATED);return t&&!Zb[i]&&(Zb[i]=!0),!e||e(r,i,o)}},Xb.spelling=function(e){return(e,t)=>!0};const ew={assertOptions:function(e,t,n){if("object"!=typeof e)throw new jy("options must be an object",jy.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const t=e[o],n=void 0===t||a(t,o,e);if(!0!==n)throw new jy("option "+o+" must be "+n,jy.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new jy("Unknown option "+o,jy.ERR_BAD_OPTION)}},validators:Xb},tw=ew.validators;class nw{constructor(e){this.defaults=e||{},this.interceptors={request:new Gy,response:new Gy}}request(e,t){return m(this,null,function*(){try{return yield this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(qx){}}throw n}})}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Nb(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;void 0!==n&&ew.assertOptions(n,{silentJSONParsing:tw.transitional(tw.boolean),forcedJSONParsing:tw.transitional(tw.boolean),clarifyTimeoutError:tw.transitional(tw.boolean)},!1),null!=r&&(Ly.isFunction(r)?t.paramsSerializer={serialize:r}:ew.assertOptions(r,{encode:tw.function,serialize:tw.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ew.assertOptions(t,{baseUrl:tw.spelling("baseURL"),withXsrfToken:tw.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&Ly.merge(i.common,i[t.method]);i&&Ly.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]}),t.headers=hb.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const l=[];let u;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let c,d=0;if(!s){const e=[Qb.bind(this),void 0];for(e.unshift(...a),e.push(...l),c=e.length,u=Promise.resolve(t);d<c;)u=u.then(e[d++],e[d++]);return u}c=a.length;let f=t;for(d=0;d<c;){const e=a[d++],t=a[d++];try{f=e(f)}catch(h){t.call(this,h);break}}try{u=Qb.call(this,f)}catch(h){return Promise.reject(h)}for(d=0,c=l.length;d<c;)u=u.then(l[d++],l[d++]);return u}getUri(e){return Ky(_b((e=Nb(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Ly.forEach(["delete","get","head","options"],function(e){nw.prototype[e]=function(t,n){return this.request(Nb(n||{},{method:e,url:t,data:(n||{}).data}))}}),Ly.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,i){return this.request(Nb(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}nw.prototype[e]=t(),nw.prototype[e+"Form"]=t(!0)});const rw=nw;class iw{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new gb(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new iw(function(t){e=t}),cancel:e}}}const ow=iw;const aw={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(aw).forEach(([e,t])=>{aw[t]=e});const sw=aw;const lw=function e(t){const n=new rw(t),r=Hv(rw.prototype.request,n);return Ly.extend(r,rw.prototype,n,{allOwnKeys:!0}),Ly.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Nb(t,n))},r}(ab);lw.Axios=rw,lw.CanceledError=gb,lw.CancelToken=ow,lw.isCancel=mb,lw.VERSION=Yb,lw.toFormData=Vy,lw.AxiosError=jy,lw.Cancel=lw.CanceledError,lw.all=function(e){return Promise.all(e)},lw.spread=function(e){return function(t){return e.apply(null,t)}},lw.isAxiosError=function(e){return Ly.isObject(e)&&!0===e.isAxiosError},lw.mergeConfig=Nb,lw.AxiosHeaders=hb,lw.formToJSON=e=>ib(Ly.isHTMLForm(e)?new FormData(e):e),lw.getAdapter=Gb,lw.HttpStatusCode=sw,lw.default=lw;const uw=lw;
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
Ip("firebase","12.1.0","app");const cw=function(e=function(e=mp){const t=vp.get(e);if(!t&&e===mp&&Kf())return Np();if(!t)throw Ep.create("no-app",{appName:e});return t}()){const t=kp(e,"auth");if(t.isInitialized())return t.getImmediate();const n=function(e,t){const n=kp(e,"auth");if(n.isInitialized()){const e=n.getImmediate();if(ih(n.getOptions(),null!=t?t:{}))return e;Hp(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:Mv,persistence:[ev,Mg,zg]}),r=Gf("authTokenSyncURL");if(r&&"boolean"==typeof isSecureContext&&isSecureContext){const e=new URL(r,location.origin);if(location.origin===e.origin){const t=(i=e.toString(),e=>m(void 0,null,function*(){const t=e&&(yield e.getIdTokenResult()),n=t&&((new Date).getTime()-Date.parse(t.issuedAtTime))/1e3;if(n&&n>Bv)return;const r=null==t?void 0:t.token;Vv!==r&&(Vv=r,yield fetch(i,{method:r?"POST":"DELETE",headers:r?{Authorization:`Bearer ${r}`}:{}}))}));!function(e,t,n){dh(e).beforeAuthStateChanged(t,n)}(n,t,()=>t(n.currentUser)),function(e,t,n,r){dh(e).onIdTokenChanged(t,n,r)}(n,e=>t(e))}}var i;const o=(a="auth",null==(l=null==(s=qf())?void 0:s.emulatorHosts)?void 0:l[a]);var a,s,l;return o&&lg(n,`http://${o}`),n}(Np({apiKey:"AIzaSyBNf58cnNMbXb6VE3sVEJYJT5CGNQr0Kmg",authDomain:"cim-summarizer-testing.firebaseapp.com",projectId:"cim-summarizer-testing",storageBucket:"cim-summarizer-testing.appspot.com",messagingSenderId:"123456789",appId:"1:123456789:web:abcdef123456"}));const dw=new class{constructor(){var e,t,n;h(this,"currentUser",null),h(this,"authStateListeners",[]),h(this,"tokenRefreshInterval",null),h(this,"isRefreshing",!1),h(this,"tokenPromise",null),e=e=>{this.currentUser=e,this.updateAxiosHeaders(e),this.authStateListeners.forEach(t=>t(e)),this.tokenRefreshInterval&&clearInterval(this.tokenRefreshInterval),e&&(this.tokenRefreshInterval=setInterval(()=>m(this,null,function*(){if(this.currentUser&&!this.isRefreshing)try{this.isRefreshing=!0,yield this.updateAxiosHeaders(this.currentUser)}catch(t){}finally{this.isRefreshing=!1}}),27e5))},dh(cw).onAuthStateChanged(e,t,n)}updateAxiosHeaders(e){return m(this,null,function*(){if(e)try{const t=yield bm(e,!0);uw.defaults.headers.common.Authorization=`Bearer ${t}`}catch(t){delete uw.defaults.headers.common.Authorization,yield Ag(cw)}else delete uw.defaults.headers.common.Authorization})}onAuthStateChanged(e){return this.authStateListeners.push(e),()=>{this.authStateListeners=this.authStateListeners.filter(t=>t!==e)}}login(e){return m(this,null,function*(){try{const t=(yield Og(cw,e.email,e.password)).user,n=yield bm(t);return{user:{id:t.uid,email:t.email,name:t.displayName||t.email.split("@")[0]},token:n,refreshToken:t.refreshToken,expiresIn:3600}}catch(t){throw new Error(t.message||"Login failed")}})}register(e){return m(this,null,function*(){try{const t=(yield function(e,t,n){return m(this,null,function*(){if(Sp(e.app))return Promise.reject(Kp(e));const r=Xm(e),i=sg(r,{returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",_g,"EMAIL_PASSWORD_PROVIDER"),o=yield i.catch(t=>{throw"auth/password-does-not-meet-requirements"===t.code&&Rg(e),t}),a=yield Cg._fromIdTokenResponse(r,"signIn",o);return yield r._updateCurrentUser(a.user),a})}(cw,e.email,e.password)).user,n=yield bm(t);return{user:{id:t.uid,email:t.email,name:e.name||t.email.split("@")[0]},token:n,refreshToken:t.refreshToken,expiresIn:3600}}catch(t){throw new Error(t.message||"Registration failed")}})}logout(){return m(this,null,function*(){try{this.tokenRefreshInterval&&(clearInterval(this.tokenRefreshInterval),this.tokenRefreshInterval=null),yield Ag(cw)}catch(e){throw new Error("Logout failed")}})}validateToken(){return m(this,null,function*(){if(!this.currentUser)return null;try{return{id:this.currentUser.uid,email:this.currentUser.email,name:this.currentUser.displayName||this.currentUser.email.split("@")[0]}}catch(e){return null}})}getCurrentUser(){return this.currentUser?{id:this.currentUser.uid,email:this.currentUser.email,name:this.currentUser.displayName||this.currentUser.email.split("@")[0]}:null}getToken(){return m(this,null,function*(){if(!this.currentUser)return null;if(this.tokenPromise)return this.tokenPromise;try{this.isRefreshing=!0,this.tokenPromise=bm(this.currentUser,!0);return yield this.tokenPromise}catch(e){return null}finally{this.isRefreshing=!1,this.tokenPromise=null}})}ensureValidToken(){return m(this,null,function*(){const e=yield this.getToken();if(!e)throw new Error("Authentication required. Please log in to continue.");return e})}isAuthenticated(){return!!this.currentUser}destroy(){this.tokenRefreshInterval&&clearInterval(this.tokenRefreshInterval)}},fw=oe.createContext(void 0),hw=({children:e})=>{const[t,n]=oe.useState(null),[r,i]=oe.useState(null),[o,a]=oe.useState(!0),[s,l]=oe.useState(null),[u,c]=oe.useState(!1);oe.useEffect(()=>{a(!0);const e=dw.onAuthStateChanged(e=>m(void 0,null,function*(){try{if(e){const e=dw.getCurrentUser(),t=yield dw.getToken();n(e),i(t)}else n(null),i(null)}catch(t){l("Authentication error occurred"),n(null),i(null)}finally{a(!1),c(!0)}}));return()=>e()},[]);const d={user:t,token:r,login:e=>m(void 0,null,function*(){a(!0),l(null);try{const t=yield dw.login(e);n(t.user),i(t.token)}catch(t){const e=t instanceof Error?t.message:"Login failed";throw l(e),t}finally{a(!1)}}),register:e=>m(void 0,null,function*(){a(!0),l(null);try{const t=yield dw.register(e);n(t.user),i(t.token)}catch(t){const e=t instanceof Error?t.message:"Registration failed";throw l(e),t}finally{a(!1)}}),logout:()=>m(void 0,null,function*(){a(!0),l(null);try{yield dw.logout()}catch(e){}finally{n(null),i(null),a(!1)}}),isLoading:o,error:s,isInitialized:u};return me.jsx(fw.Provider,{value:d,children:e})},pw=()=>{const e=oe.useContext(fw);if(void 0===e)throw new Error("useAuth must be used within an AuthProvider");return e};function mw(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=mw(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const gw=(e,t)=>{var n;if(0===e.length)return t.classGroupId;const r=e[0],i=t.nextPart.get(r),o=i?gw(e.slice(1),i):void 0;if(o)return o;if(0===t.validators.length)return;const a=e.join("-");return null==(n=t.validators.find(({validator:e})=>e(a)))?void 0:n.classGroupId},vw=/^\[(.+)\]$/,yw=e=>{if(vw.test(e)){const t=vw.exec(e)[1],n=null==t?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},bw=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Sw(Object.entries(e.classGroups),n).forEach(([e,n])=>{ww(n,r,e,t)}),r},ww=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:xw(t,e)).classGroupId=n)}if("function"==typeof e)return kw(e)?void ww(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(([e,i])=>{ww(i,xw(t,e),n,r)})})},xw=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},kw=e=>e.isThemeGetter,Sw=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,Ew=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(i(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},_w=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,i=t[0],o=t.length,a=e=>{const n=[];let a,s=0,l=0;for(let d=0;d<e.length;d++){let u=e[d];if(0===s){if(u===i&&(r||e.slice(d,d+o)===t)){n.push(e.slice(l,d)),l=d+o;continue}if("/"===u){a=d;continue}}"["===u?s++:"]"===u&&s--}const u=0===n.length?e:e.substring(l),c=u.startsWith("!");return{modifiers:n,hasImportantModifier:c,baseClassName:c?u.substring(1):u,maybePostfixModifierPosition:a&&a>l?a-l:void 0}};return n?e=>n({className:e,parseClassName:a}):a},Cw=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},Nw=e=>c({cache:Ew(e.cacheSize),parseClassName:_w(e)},(e=>{const t=bw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),gw(n,t)||yw(e)},getConflictingClassGroupIds:(e,t)=>{const i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}})(e)),Iw=/\s+/;function Tw(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Pw(e))&&(r&&(r+=" "),r+=t);return r}const Pw=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Pw(e[r]))&&(n&&(n+=" "),n+=t);return n};function Rw(e,...t){let n,r,i,o=function(s){const l=t.reduce((e,t)=>t(e),e());return n=Nw(l),r=n.cache.get,i=n.cache.set,o=a,a(s)};function a(e){const t=r(e);if(t)return t;const o=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(Iw);let s="";for(let l=a.length-1;l>=0;l-=1){const e=a[l],{modifiers:t,hasImportantModifier:u,baseClassName:c,maybePostfixModifierPosition:d}=n(e);let f=Boolean(d),h=r(f?c.substring(0,d):c);if(!h){if(!f){s=e+(s.length>0?" "+s:s);continue}if(h=r(c),!h){s=e+(s.length>0?" "+s:s);continue}f=!1}const p=Cw(t).join(":"),m=u?p+"!":p,g=m+h;if(o.includes(g))continue;o.push(g);const v=i(h,f);for(let n=0;n<v.length;++n){const e=v[n];o.push(m+e)}s=e+(s.length>0?" "+s:s)}return s})(e,n);return i(e,o),o}return function(){return o(Tw.apply(null,arguments))}}const Ow=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},Aw=/^\[(?:([a-z-]+):)?(.+)\]$/i,Lw=/^\d+\/\d+$/,jw=new Set(["px","full","screen"]),Dw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mw=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Uw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,zw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Bw=e=>$w(e)||jw.has(e)||Lw.test(e),Vw=e=>nx(e,"length",rx),$w=e=>Boolean(e)&&!Number.isNaN(Number(e)),Hw=e=>nx(e,"number",$w),Ww=e=>Boolean(e)&&Number.isInteger(Number(e)),qw=e=>e.endsWith("%")&&$w(e.slice(0,-1)),Kw=e=>Aw.test(e),Gw=e=>Dw.test(e),Jw=new Set(["length","size","percentage"]),Qw=e=>nx(e,Jw,ix),Yw=e=>nx(e,"position",ix),Xw=new Set(["image","url"]),Zw=e=>nx(e,Xw,ax),ex=e=>nx(e,"",ox),tx=()=>!0,nx=(e,t,n)=>{const r=Aw.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},rx=e=>Mw.test(e)&&!Uw.test(e),ix=()=>!1,ox=e=>zw.test(e),ax=e=>Fw.test(e),sx=Rw(()=>{const e=Ow("colors"),t=Ow("spacing"),n=Ow("blur"),r=Ow("brightness"),i=Ow("borderColor"),o=Ow("borderRadius"),a=Ow("borderSpacing"),s=Ow("borderWidth"),l=Ow("contrast"),u=Ow("grayscale"),c=Ow("hueRotate"),d=Ow("invert"),f=Ow("gap"),h=Ow("gradientColorStops"),p=Ow("gradientColorStopPositions"),m=Ow("inset"),g=Ow("margin"),v=Ow("opacity"),y=Ow("padding"),b=Ow("saturate"),w=Ow("scale"),x=Ow("sepia"),k=Ow("skew"),S=Ow("space"),E=Ow("translate"),_=()=>["auto",Kw,t],C=()=>[Kw,t],N=()=>["",Bw,Vw],I=()=>["auto",$w,Kw],T=()=>["","0",Kw],P=()=>[$w,Kw];return{cacheSize:500,separator:":",theme:{colors:[tx],spacing:[Bw,Vw],blur:["none","",Gw,Kw],brightness:P(),borderColor:[e],borderRadius:["none","","full",Gw,Kw],borderSpacing:C(),borderWidth:N(),contrast:P(),grayscale:T(),hueRotate:P(),invert:T(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[qw,Vw],inset:_(),margin:_(),opacity:P(),padding:C(),saturate:P(),scale:P(),sepia:T(),skew:P(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",Kw]}],container:["container"],columns:[{columns:[Gw]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Kw]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ww,Kw]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Kw]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",Ww,Kw]}],"grid-cols":[{"grid-cols":[tx]}],"col-start-end":[{col:["auto",{span:["full",Ww,Kw]},Kw]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[tx]}],"row-start-end":[{row:["auto",{span:[Ww,Kw]},Kw]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Kw]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Kw]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Kw,t]}],"min-w":[{"min-w":[Kw,t,"min","max","fit"]}],"max-w":[{"max-w":[Kw,t,"none","full","min","max","fit","prose",{screen:[Gw]},Gw]}],h:[{h:[Kw,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Kw,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Kw,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Kw,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Gw,Vw]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hw]}],"font-family":[{font:[tx]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Kw]}],"line-clamp":[{"line-clamp":["none",$w,Hw]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Bw,Kw]}],"list-image":[{"list-image":["none",Kw]}],"list-style-type":[{list:["none","disc","decimal",Kw]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Bw,Vw]}],"underline-offset":[{"underline-offset":["auto",Bw,Kw]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Kw]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Kw]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Yw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Qw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Zw]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Bw,Kw]}],"outline-w":[{outline:[Bw,Vw]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:N()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Bw,Vw]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Gw,ex]}],"shadow-color":[{shadow:[tx]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Gw,Kw]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Kw]}],duration:[{duration:P()}],ease:[{ease:["linear","in","out","in-out",Kw]}],delay:[{delay:P()}],animate:[{animate:["none","spin","ping","pulse","bounce",Kw]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[Ww,Kw]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Kw]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Kw]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Kw]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Bw,Vw,Hw]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function lx(...e){return sx(function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=mw(e))&&(r&&(r+=" "),r+=t);return r}(e))}
|
|
/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/var ux={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"};
|
|
/**
|
|
* @license lucide-react v0.294.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const cx=(e,t)=>{const n=oe.forwardRef((n,r)=>{var i,o=n,{color:a="currentColor",size:s=24,strokeWidth:l=2,absoluteStrokeWidth:u,className:h="",children:p}=o,m=f(o,["color","size","strokeWidth","absoluteStrokeWidth","className","children"]);return oe.createElement("svg",c(d(c({ref:r},ux),{width:s,height:s,stroke:a,strokeWidth:u?24*Number(l)/Number(s):l,className:["lucide",`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim()}`,h].join(" ")}),m),[...t.map(([e,t])=>oe.createElement(e,t)),...Array.isArray(p)?p:[p]])});return n.displayName=`${e}`,n},dx=cx("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]),fx=cx("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),hx=cx("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]),px=cx("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),mx=cx("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]),gx=cx("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]),vx=cx("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]),yx=cx("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),bx=cx("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),wx=cx("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),xx=cx("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]),kx=cx("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),Sx=({onSuccess:e})=>{const{login:t,register:n,isLoading:r,error:i}=pw(),[o,a]=oe.useState({email:"",password:""}),[s,l]=oe.useState({}),[u,f]=oe.useState(!1),[h,p]=oe.useState(!1),g=e=>{const{name:t,value:n}=e.target;a(e=>d(c({},e),{[t]:n})),s[t]&&l(e=>d(c({},e),{[t]:void 0}))};return me.jsx("div",{className:"w-full max-w-md mx-auto",children:me.jsxs("div",{className:"bg-white shadow-soft rounded-lg border border-gray-100 p-8",children:[me.jsxs("div",{className:"text-center mb-8",children:[me.jsx("h1",{className:"text-2xl font-bold text-primary-800",children:"Sign In"}),me.jsx("p",{className:"text-gray-600 mt-2",children:"Access your CIM Document Processor"})]}),me.jsxs("form",{onSubmit:r=>m(void 0,null,function*(){r.preventDefault(),l({});const i=((e,t)=>{const n={},r=(e=>e?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?null:"Please enter a valid email address":"Email is required")(e);r&&(n.email=r);const i=(e=>e?e.length<6?"Password must be at least 6 characters long":null:"Password is required")(t);return i&&(n.password=i),{errors:n,isValid:0===Object.keys(n).length}})(o.email,o.password);if(i.isValid)try{h?yield n(o):yield t(o),null==e||e()}catch(a){}else l(i.errors)}),className:"space-y-6",children:[me.jsxs("div",{children:[me.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2",children:"Email Address"}),me.jsx("input",{id:"email",name:"email",type:"email",autoComplete:"email",required:!0,value:o.email,onChange:g,className:lx("w-full px-3 py-2 border rounded-md shadow-soft placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-colors duration-200",s.email?"border-error-300":"border-gray-300"),placeholder:"Enter your email",disabled:r}),s.email&&me.jsx("p",{className:"mt-1 text-sm text-error-600",children:s.email})]}),me.jsxs("div",{children:[me.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-2",children:"Password"}),me.jsxs("div",{className:"relative",children:[me.jsx("input",{id:"password",name:"password",type:u?"text":"password",autoComplete:"current-password",required:!0,value:o.password,onChange:g,className:lx("w-full px-3 py-2 pr-10 border rounded-md shadow-soft placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-colors duration-200",s.password?"border-error-300":"border-gray-300"),placeholder:"Enter your password",disabled:r}),me.jsx("button",{type:"button",className:"absolute inset-y-0 right-0 pr-3 flex items-center",onClick:()=>f(!u),disabled:r,children:u?me.jsx(hx,{className:"h-4 w-4 text-gray-400"}):me.jsx(px,{className:"h-4 w-4 text-gray-400"})})]}),s.password&&me.jsx("p",{className:"mt-1 text-sm text-error-600",children:s.password})]}),i&&me.jsx("div",{className:"bg-error-50 border border-error-200 rounded-md p-3",children:me.jsx("p",{className:"text-sm text-error-600",children:i})}),me.jsx("button",{type:"submit",disabled:r,className:lx("w-full flex justify-center items-center py-2 px-4 border border-transparent rounded-md shadow-soft text-sm font-medium text-white transition-colors duration-200","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500",r?"bg-gray-400 cursor-not-allowed":"bg-primary-600 hover:bg-primary-700"),children:r?me.jsxs(me.Fragment,{children:[me.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"}),h?"Creating Account...":"Signing in..."]}):me.jsxs(me.Fragment,{children:[me.jsx(vx,{className:"h-4 w-4 mr-2"}),h?"Create Account":"Sign In"]})}),me.jsx("div",{className:"text-center mt-4",children:me.jsx("button",{type:"button",onClick:()=>p(!h),className:"text-sm text-primary-600 hover:text-primary-500 focus:outline-none focus:underline",children:h?"Already have an account? Sign in":"Don't have an account? Create one"})})]})]})})},Ex=({children:e,requiredRole:t,fallbackPath:n="/login"})=>{const{user:r,isLoading:i,isInitialized:o}=pw(),a=vf();return i||!o?me.jsx("div",{className:"min-h-screen flex items-center justify-center",children:me.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}):r?t&&r.role!==t?me.jsx(Tf,{to:"/unauthorized",replace:!0}):me.jsx(me.Fragment,{children:e}):me.jsx(Tf,{to:n,state:{from:a},replace:!0})},_x=({className:e,showConfirmation:t=!0,variant:n="button"})=>{const{logout:r,isLoading:i}=pw(),[o,a]=oe.useState(!1),s=()=>m(void 0,null,function*(){if(!t||o)try{yield r(),a(!1)}catch(e){}else a(!0)}),l=()=>{a(!1)};if(o)return me.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:me.jsxs("div",{className:"bg-white shadow-soft rounded-lg border border-gray-100 p-6 max-w-sm mx-4",children:[me.jsx("h3",{className:"text-lg font-medium text-primary-800 mb-4",children:"Confirm Logout"}),me.jsx("p",{className:"text-gray-600 mb-6",children:"Are you sure you want to sign out?"}),me.jsxs("div",{className:"flex space-x-3",children:[me.jsx("button",{onClick:s,disabled:i,className:"flex-1 bg-error-600 text-white py-2 px-4 rounded-md hover:bg-error-700 focus:outline-none focus:ring-2 focus:ring-error-500 disabled:opacity-50 transition-colors duration-200",children:i?"Signing out...":"Sign Out"}),me.jsx("button",{onClick:l,disabled:i,className:"flex-1 bg-gray-200 text-gray-800 py-2 px-4 rounded-md hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 transition-colors duration-200",children:"Cancel"})]})]})});const u="button"===n?"inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-error-600 hover:bg-error-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-error-500 disabled:opacity-50 transition-colors duration-200":"inline-flex items-center text-sm text-gray-700 hover:text-error-600 focus:outline-none focus:underline transition-colors duration-200";return me.jsxs("button",{onClick:s,disabled:i,className:lx(u,e),children:[me.jsx(yx,{className:"h-4 w-4 mr-2"}),i?"Signing out...":"Sign Out"]})},Cx={apiBaseUrl:"https://api-76ut2tki7q-uc.a.run.app",appName:"CIM Document Processor (Testing)",maxFileSize:parseInt("104857600"),allowedFileTypes:"application/pdf".split(","),adminEmails:"jpressnell@bluepointcapital.com".split(",").filter(Boolean),firebase:{apiKey:"AIzaSyBNf58cnNMbXb6VE3sVEJYJT5CGNQr0Kmg",authDomain:"cim-summarizer-testing.firebaseapp.com",projectId:"cim-summarizer-testing",storageBucket:"cim-summarizer-testing.appspot.com",messagingSenderId:"123456789",appId:"1:123456789:web:abcdef123456"}},Nx=["VITE_API_BASE_URL"];for(const Kx of Nx);const Ix=Cx.apiBaseUrl,Tx=uw.create({baseURL:Ix,timeout:3e5});Tx.interceptors.request.use(e=>m(void 0,null,function*(){try{const t=yield dw.ensureValidToken();e.headers.Authorization=`Bearer ${t}`}catch(t){}return e})),Tx.interceptors.response.use(e=>e,e=>m(void 0,null,function*(){var t;const n=e.config;if(401===(null==(t=e.response)?void 0:t.status)&&!n._retry){n._retry=!0;try{const e=yield dw.ensureValidToken();if(e)return n.headers.Authorization=`Bearer ${e}`,Tx(n)}catch(r){}dw.logout(),window.location.href="/login"}return Promise.reject(e)}));class Px{static isGCSError(e){var t;return e&&"object"==typeof e&&"type"in e&&(null==(t=e.type)?void 0:t.startsWith("gcs_"))}static createGCSError(e,t){const n=(null==e?void 0:e.message)||(null==e?void 0:e.toString())||"Unknown GCS error";let r="gcs_network_error",i=!0;return n.includes("permission")||n.includes("access denied")?(r="gcs_permission_error",i=!1):n.includes("quota")||n.includes("storage quota")?(r="gcs_quota_error",i=!1):n.includes("upload")||n.includes("write")?(r="gcs_upload_error",i=!0):(n.includes("download")||n.includes("read"))&&(r="gcs_download_error",i=!0),{type:r,message:`${t} failed: ${n}`,details:e,retryable:i}}static getErrorMessage(e){switch(e.type){case"gcs_permission_error":return"Access denied. Please check your permissions and try again.";case"gcs_quota_error":return"Storage quota exceeded. Please contact support.";case"gcs_upload_error":return"Upload failed. Please check your connection and try again.";case"gcs_download_error":return"Download failed. Please try again later.";case"gcs_network_error":return"Network error. Please check your connection and try again.";default:return e.message}}}const Rx=new class{uploadDocument(e,t,n){return m(this,null,function*(){var r,i,o,a,s,l,u,d,f;try{yield dw.ensureValidToken();null==t||t(5);const r=yield Tx.post("/documents/upload-url",{fileName:e.name,fileSize:e.size,contentType:e.type},{signal:n}),{documentId:i,uploadUrl:o}=r.data;let a,s;null==t||t(10),yield this.uploadToFirebaseStorage(e,o,t,n),null==t||t(95);for(let e=1;e<=3;e++)try{a=yield Tx.post(`/documents/${i}/confirm-upload`,{},{signal:n,timeout:6e4});break}catch(h){if(s=h,e<3){const t=1e3*Math.pow(2,e);yield new Promise(e=>setTimeout(e,t))}}if(!a)throw s||new Error("Confirm-upload failed after 3 attempts");return null==t||t(100),c({id:i},a.data.document)}catch(h){if(h instanceof Error){if("AbortError"===h.name)throw new Error("Upload was cancelled.");if("ECONNABORTED"===h.code||(null==(r=h.message)?void 0:r.includes("timeout")))throw new Error("Request timed out. Please check your connection and try again.");if("ERR_NETWORK"===h.code||(null==(i=h.message)?void 0:i.includes("Network Error")))throw new Error("Network error. Please check your connection and try again.")}if(h&&"object"==typeof h&&"response"in h){const e=h;if(401===(null==(o=e.response)?void 0:o.status))throw new Error("Authentication required. Please log in again.");if(400===(null==(a=e.response)?void 0:a.status))throw new Error((null==(l=null==(s=e.response)?void 0:s.data)?void 0:l.error)||"Invalid request");if((null==(u=e.response)?void 0:u.status)>=500)throw new Error("Server error. Please try again later.");throw new Error((null==(f=null==(d=e.response)?void 0:d.data)?void 0:f.error)||e.message||"Upload failed")}throw new Error(h instanceof Error?h.message:"Upload failed")}})}uploadToFirebaseStorage(e,t,n,r){return m(this,null,function*(){return new Promise((i,o)=>{const a=new XMLHttpRequest;a.upload.addEventListener("progress",e=>{if(e.lengthComputable&&n){const t=Math.round(e.loaded/e.total*80)+10;n(t)}}),a.addEventListener("load",()=>{a.status>=200&&a.status<300?i():o(new Error(`Firebase Storage upload failed: ${a.status} ${a.statusText}`))}),a.addEventListener("error",()=>{o(new Error("Firebase Storage upload failed: Network error"))}),r&&r.addEventListener("abort",()=>{a.abort(),o(new Error("Upload was cancelled"))}),a.open("PUT",t),a.setRequestHeader("Content-Type",e.type),a.send(e)})})}getDocuments(){return m(this,null,function*(){return(yield Tx.get("/documents")).data})}getDocument(e){return m(this,null,function*(){return(yield Tx.get(`/documents/${e}`)).data})}getDocumentStatus(e){return m(this,null,function*(){return(yield Tx.get(`/documents/${e}/progress`)).data})}downloadDocument(e){return m(this,null,function*(){var t,n,r,i;try{return(yield Tx.get(`/documents/${e}/download`,{responseType:"blob"})).data}catch(o){if("storage_error"===(null==(n=null==(t=null==o?void 0:o.response)?void 0:t.data)?void 0:n.type)||(null==(r=null==o?void 0:o.message)?void 0:r.includes("GCS"))||(null==(i=null==o?void 0:o.message)?void 0:i.includes("storage.googleapis.com")))throw Px.createGCSError(o,"download");throw o}})}deleteDocument(e){return m(this,null,function*(){yield Tx.delete(`/documents/${e}`)})}retryProcessing(e){return m(this,null,function*(){return(yield Tx.post(`/documents/${e}/retry`)).data})}saveCIMReview(e,t){return m(this,null,function*(){yield Tx.post(`/documents/${e}/review`,t)})}getCIMReview(e){return m(this,null,function*(){return(yield Tx.get(`/documents/${e}/review`)).data})}exportCIMReview(e){return m(this,null,function*(){return(yield Tx.get(`/documents/${e}/export`,{responseType:"blob"})).data})}exportCSV(e){return m(this,null,function*(){var t,n,r,i;try{return(yield Tx.get(`/documents/${e}/export-csv`,{responseType:"blob"})).data}catch(o){if("storage_error"===(null==(n=null==(t=null==o?void 0:o.response)?void 0:t.data)?void 0:n.type)||(null==(r=null==o?void 0:o.message)?void 0:r.includes("GCS"))||(null==(i=null==o?void 0:o.message)?void 0:i.includes("storage.googleapis.com")))throw Px.createGCSError(o,"csv_export");throw o}})}getDocumentAnalytics(e){return m(this,null,function*(){return(yield Tx.get(`/documents/${e}/analytics`)).data})}getAnalytics(e=30){return m(this,null,function*(){return(yield Tx.get("/documents/analytics",{params:{days:e}})).data})}getProcessingStats(){return m(this,null,function*(){return(yield Tx.get("/documents/processing-stats")).data})}getAgenticRAGSessions(e){return m(this,null,function*(){return(yield Tx.get(`/documents/${e}/agentic-rag-sessions`)).data})}getAgenticRAGSessionDetails(e){return m(this,null,function*(){return(yield Tx.get(`/documents/agentic-rag-sessions/${e}`)).data})}getAgenticRAGHealth(){return m(this,null,function*(){return(yield Tx.get("/health/agentic-rag")).data})}getAgenticRAGMetrics(){return m(this,null,function*(){return(yield Tx.get("/health/agentic-rag/metrics")).data})}searchDocuments(e){return m(this,null,function*(){return(yield Tx.get("/documents/search",{params:{q:e}})).data})}getQueueStatus(){return m(this,null,function*(){return(yield Tx.get("/documents/queue/status")).data})}subscribeToUpdates(e,t){const n=setInterval(()=>m(this,null,function*(){try{const n=yield this.getDocumentStatus(e);t({documentId:e,progress:n.progress,status:n.status,message:n.message})}catch(n){}}),2e3);return()=>clearInterval(n)}validateFile(e){return e.size>52428800?{isValid:!1,error:"File size exceeds 50MB limit"}:["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(e.type)?{isValid:!0}:{isValid:!1,error:"File type not supported. Please upload PDF, DOC, or DOCX files."}}getDownloadUrl(e,t){return(null==t?void 0:t.gcs_url)&&"gcs"===t.storage_type?t.gcs_url:`${Ix}/documents/${e}/download`}shareDocument(e,t){return m(this,null,function*(){var n,r;try{const n=yield Tx.post(`/documents/${e}/share`,{sharedWithUserId:t});if(!n.data.success)throw new Error(n.data.error||"Failed to share document")}catch(i){throw new Error((null==(r=null==(n=i.response)?void 0:n.data)?void 0:r.error)||i.message||"Failed to share document")}})}getDocumentShares(e){return m(this,null,function*(){var t,n;try{return(yield Tx.get(`/documents/${e}/shares`)).data.shares||[]}catch(r){throw new Error((null==(n=null==(t=r.response)?void 0:t.data)?void 0:n.error)||r.message||"Failed to get document shares")}})}revokeDocumentShare(e,t){return m(this,null,function*(){var n,r;try{const n=yield Tx.delete(`/documents/${e}/share`,{data:{sharedWithUserId:t}});if(!n.data.success)throw new Error(n.data.error||"Failed to revoke access")}catch(i){throw new Error((null==(r=null==(n=i.response)?void 0:n.data)?void 0:r.error)||i.message||"Failed to revoke access")}})}isGCSDocument(e){return"gcs"===e.storage_type||!!e.gcs_path||!!e.gcs_url}getGCSFileInfo(e){return{gcsPath:e.gcs_path,gcsUrl:e.gcs_url,storageType:e.storage_type||"unknown"}}formatFileSize(e){if(0===e)return"0 Bytes";const t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(2))+" "+["Bytes","KB","MB","GB"][t]}formatDate(e){return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}},Ox=Cx.apiBaseUrl,Ax=uw.create({baseURL:Ox,timeout:3e5});Ax.interceptors.request.use(e=>m(void 0,null,function*(){const t=yield dw.getToken();return t&&(e.headers.Authorization=`Bearer ${t}`),e}));const Lx=new class{isAdmin(e){return!!e&&Cx.adminEmails.includes(e)}getUsers(){return m(this,null,function*(){return(yield Ax.get("/admin/users")).data.users})}getUserActivity(){return m(this,null,function*(){return(yield Ax.get("/admin/user-activity")).data.activity})}getSystemMetrics(){return m(this,null,function*(){return(yield Ax.get("/admin/system-metrics")).data.metrics})}getEnhancedAnalytics(e=30){return m(this,null,function*(){const t=(yield Ax.get(`/admin/enhanced-analytics?days=${e}`)).data,{correlationId:n}=t;return f(t,["correlationId"])})}getWeeklySummary(){return m(this,null,function*(){return(yield Ax.get("/admin/weekly-summary")).data})}sendWeeklySummaryEmail(e){return m(this,null,function*(){const t=e?{recipientEmail:e}:{};yield Ax.post("/admin/send-weekly-summary",t)})}getScheduledJobs(){return m(this,null,function*(){return(yield Ax.get("/admin/scheduled-jobs")).data.jobs})}triggerJob(e){return m(this,null,function*(){yield Ax.post(`/admin/trigger-job/${e}`)})}};class jx extends oe.Component{constructor(e){super(e),h(this,"handleRetry",()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})}),h(this,"handleReportError",()=>{const{error:e,errorInfo:t}=this.state;if(e&&t){const n={message:e.message,stack:e.stack,componentStack:t.componentStack,timestamp:(new Date).toISOString(),userAgent:navigator.userAgent,url:window.location.href,version:{}.npm_package_version||"unknown"};fetch("/api/errors/report",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).catch(console.error),alert("Error report sent successfully. Thank you for helping us improve!")}}),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.setState({error:e,errorInfo:t}),this.props.onError&&this.props.onError(e,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:me.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center px-4",children:me.jsxs("div",{className:"max-w-md w-full bg-white rounded-lg shadow-lg p-6",children:[me.jsx("div",{className:"flex items-center justify-center w-12 h-12 mx-auto bg-red-100 rounded-full",children:me.jsx("svg",{className:"w-6 h-6 text-red-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:me.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})})}),me.jsxs("div",{className:"mt-4 text-center",children:[me.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Something went wrong"}),me.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"We're sorry, but something unexpected happened. Please try refreshing the page or contact support if the problem persists."}),!1,me.jsxs("div",{className:"mt-6 flex flex-col sm:flex-row gap-3 justify-center",children:[me.jsxs("button",{onClick:this.handleRetry,className:"inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:[me.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:me.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Try Again"]}),me.jsxs("button",{onClick:()=>window.location.reload(),className:"inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:[me.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:me.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.207A1 1 0 013 6.5V4z"})}),"Refresh Page"]}),me.jsxs("button",{onClick:this.handleReportError,className:"inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:[me.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:me.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Report Error"]})]})]})]})}):this.props.children}}const Dx=({isVisible:e,onClose:t})=>{const{user:n,token:r}=pw(),[i,o]=oe.useState([]),[a,s]=oe.useState(!1),l=e=>{o(t=>[...t,`${(new Date).toLocaleTimeString()}: ${e}`])},u=()=>{o([])};return e?me.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:me.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full mx-4 max-h-[90vh] flex flex-col",children:[me.jsxs("div",{className:"flex items-center justify-between p-6 border-b",children:[me.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Authentication Debug Panel"}),me.jsx("button",{onClick:t,className:"text-gray-400 hover:text-gray-600",children:me.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:me.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),me.jsxs("div",{className:"p-6 flex-1 overflow-hidden",children:[me.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[me.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[me.jsx("h3",{className:"font-medium text-gray-900 mb-3",children:"Current Authentication State"}),me.jsxs("div",{className:"space-y-2 text-sm",children:[me.jsxs("div",{children:[me.jsx("span",{className:"font-medium",children:"User:"})," ",n?n.email:"Not authenticated"]}),me.jsxs("div",{children:[me.jsx("span",{className:"font-medium",children:"Token:"})," ",r?`${r.substring(0,20)}...`:"No token"]}),me.jsxs("div",{children:[me.jsx("span",{className:"font-medium",children:"Token Length:"})," ",(null==r?void 0:r.length)||0]}),me.jsxs("div",{children:[me.jsx("span",{className:"font-medium",children:"User ID:"})," ",(null==n?void 0:n.id)||"N/A"]})]})]}),me.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[me.jsx("h3",{className:"font-medium text-gray-900 mb-3",children:"Debug Actions"}),me.jsxs("div",{className:"space-y-3",children:[me.jsx("button",{onClick:()=>m(void 0,null,function*(){s(!0),u();const e=console.log,t=console.warn,n=console.error,r=[];console.log=(...t)=>{r.push(t.join(" ")),e(...t)},console.warn=(...e)=>{r.push(`WARN: ${e.join(" ")}`),t(...e)},console.error=(...e)=>{r.push(`ERROR: ${e.join(" ")}`),n(...e)};try{l("Starting authentication debug..."),yield m(void 0,null,function*(){try{if(dw.isAuthenticated()){dw.getCurrentUser();const t=yield dw.getToken();if(t){const n=t.split(".");if(3===n.length)try{JSON.parse(atob(n[0]));const e=JSON.parse(atob(n[1]));Math.floor(Date.now()/1e3),e.exp&&e.exp,e.exp&&e.exp}catch(e){}}}}catch(e){}}),l("Auth debug completed"),yield m(void 0,null,function*(){try{const e=yield dw.ensureValidToken(),t=yield fetch("https://api-76ut2tki7q-uc.a.run.app/documents",{headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"}});t.ok?yield t.json():yield t.text()}catch(e){}}),l("API test completed"),yield m(void 0,null,function*(){try{const e=yield dw.ensureValidToken(),t=yield fetch("https://api-76ut2tki7q-uc.a.run.app/documents/upload-url",{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:JSON.stringify({fileName:"test.pdf",fileSize:1024,contentType:"application/pdf"})});t.ok?yield t.json():yield t.text()}catch(e){}}),l("Upload auth validation completed"),r.forEach(e=>{(e.includes("🔍")||e.includes("🧪")||e.includes("📤")||e.includes("🔐")||e.includes("❌")||e.includes("✅"))&&l(e)})}catch(i){l(`Debug error: ${i}`)}finally{console.log=e,console.warn=t,console.error=n,s(!1)}}),disabled:a,className:"w-full bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:a?"Running Debug...":"Run Full Auth Debug"}),me.jsx("button",{onClick:u,className:"w-full bg-gray-600 text-white py-2 px-4 rounded-md hover:bg-gray-700",children:"Clear Results"})]})]})]}),me.jsxs("div",{className:"mt-6",children:[me.jsx("h3",{className:"font-medium text-gray-900 mb-3",children:"Debug Results"}),me.jsx("div",{className:"bg-gray-900 text-green-400 rounded-lg p-4 h-64 overflow-y-auto font-mono text-sm",children:0===i.length?me.jsx("div",{className:"text-gray-500",children:'No debug results yet. Click "Run Full Auth Debug" to start.'}):i.map((e,t)=>me.jsx("div",{className:"mb-1",children:e},t))})]})]}),me.jsx("div",{className:"p-6 border-t bg-gray-50",children:me.jsxs("div",{className:"text-sm text-gray-600",children:[me.jsx("p",{className:"mb-2",children:me.jsx("strong",{children:"How to use this debug panel:"})}),me.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[me.jsx("li",{children:'Click "Run Full Auth Debug" to test your authentication status'}),me.jsx("li",{children:"Check the results to see if your token is valid and not expired"}),me.jsx("li",{children:"If you see 401 errors, try logging out and back in"}),me.jsx("li",{children:"Make sure you're logged in before attempting uploads"})]})]})})]})}):null},Mx=oe.lazy(()=>Ed(()=>import("./DocumentUpload-22ee24e0.js"),["assets/DocumentUpload-22ee24e0.js","assets/check-circle-937a9172.js","assets/x-d6da8175.js"])),Ux=oe.lazy(()=>Ed(()=>import("./DocumentList-9e71c857.js"),["assets/DocumentList-9e71c857.js","assets/download-aacd5336.js","assets/clock-9f043116.js","assets/check-circle-937a9172.js"])),zx=oe.lazy(()=>Ed(()=>import("./DocumentViewer-fda68f30.js"),["assets/DocumentViewer-fda68f30.js","assets/download-aacd5336.js","assets/x-d6da8175.js","assets/check-circle-937a9172.js","assets/alert-triangle-326a303a.js","assets/clock-9f043116.js"])),Fx=oe.lazy(()=>Ed(()=>import("./Analytics-bd92d0ea.js"),[])),Bx=oe.lazy(()=>Ed(()=>import("./UploadMonitoringDashboard-90d06ab8.js"),["assets/UploadMonitoringDashboard-90d06ab8.js","assets/check-circle-937a9172.js","assets/clock-9f043116.js","assets/alert-triangle-326a303a.js"])),Vx=()=>{var e,t,n,r,i,o,a,s,l,u,f,h,p,g,v,y,b,w,x,k,S,E,_,C,N,I,T,P,R,O,A,L,j,D,M,U,z,F,B,V,$,H,W,q,K,G,J,Q,Y,X,Z;const{user:ee,token:te}=pw(),[ne,re]=oe.useState([]),[ie,se]=oe.useState(!1),[le,ue]=oe.useState(null),[ce,de]=oe.useState(""),[fe,he]=oe.useState("overview"),[pe,ge]=oe.useState(!1),ve=Lx.isAdmin(null==ee?void 0:ee.email),ye=e=>{switch(e){case"uploaded":return"uploaded";case"extracting_text":case"processing_llm":case"generating_pdf":return"processing";case"completed":return"completed";case"failed":return"error";default:return"pending"}},be=oe.useCallback(()=>m(void 0,null,function*(){try{if(se(!0),!te)return;const e=yield fetch("https://api-76ut2tki7q-uc.a.run.app/documents",{headers:{Authorization:`Bearer ${te}`,"Content-Type":"application/json"}});if(e.ok){const t=yield e.json(),n=t.documents||t;if(Array.isArray(n)){const e=n.map(e=>{let t=e.name||e.originalName||"Unknown";return e.analysis_data&&e.analysis_data.dealOverview&&e.analysis_data.dealOverview.targetCompanyName&&(t=e.analysis_data.dealOverview.targetCompanyName),{id:e.id,name:t,originalName:e.originalName||e.name||"Unknown",status:ye(e.status),uploadedAt:e.uploadedAt,processedAt:e.processedAt,uploadedBy:(null==ee?void 0:ee.name)||(null==ee?void 0:ee.email)||"Unknown",fileSize:parseInt(e.fileSize)||0,summary:e.summary,error:e.error,analysisData:e.analysis_data}});re(e)}}else{yield e.text()}}catch(e){}finally{se(!1)}}),[null==ee?void 0:ee.name,null==ee?void 0:ee.email,te]),we=oe.useCallback(e=>m(void 0,null,function*(){if(!e||"undefined"===e||"null"===e)return!1;try{if(!te)return!1;const t=yield fetch(`https://api-76ut2tki7q-uc.a.run.app/documents/${e}/progress`,{headers:{Authorization:`Bearer ${te}`,"Content-Type":"application/json"}});if(t.ok){const n=yield t.json();if(n.success){const t=n.data;if(re(n=>n.map(n=>{if(n.id===e){let e=n.status;return"processing"===t.status?e="processing":"completed"===t.status?e="completed":"error"===t.status&&(e="error"),d(c({},n),{status:e,progress:t.progress||0,message:t.message||n.message})}return n})),"completed"===t.status||"error"===t.status)return be(),!1}}}catch(t){}return!0}),[te]);oe.useEffect(()=>{const e=ne.filter(e=>("processing"===e.status||"uploaded"===e.status||"extracting_text"===e.status)&&e.id);if(0===e.length)return;const t=[];return e.forEach(e=>{if(!e.id)return;const n=setInterval(()=>m(void 0,null,function*(){(yield we(e.id))||clearInterval(n)}),3e3);t.push(n)}),()=>{t.forEach(e=>clearInterval(e))}},[ne,we]),ae.useEffect(()=>{be();const e=setInterval(()=>{be()},3e4);return()=>clearInterval(e)},[be]);const xe=e=>{ue(e)},ke=e=>m(void 0,null,function*(){try{const t=yield Rx.downloadDocument(e),n=window.URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=`document-${e}.pdf`,document.body.appendChild(r),r.click(),window.URL.revokeObjectURL(n),document.body.removeChild(r)}catch(t){if(Px.isGCSError(t)){const e=t;alert(`Download failed: ${Px.getErrorMessage(e)}`)}else alert("Failed to download document. Please try again.")}}),Se=e=>m(void 0,null,function*(){if(window.confirm("Are you sure you want to delete this document? This action cannot be undone."))try{yield Rx.deleteDocument(e),re(t=>t.filter(t=>t.id!==e)),alert("Document deleted successfully")}catch(t){alert("Failed to delete document. Please try again.")}}),Ee=e=>{},_e=()=>{ue(null)},Ce=ne.filter(e=>{var t,n;return((null==(t=e.name)?void 0:t.toLowerCase())||"").includes(ce.toLowerCase())||((null==(n=e.originalName)?void 0:n.toLowerCase())||"").includes(ce.toLowerCase())}),Ne={totalDocuments:ne.length,completedDocuments:ne.filter(e=>"completed"===e.status).length,processingDocuments:ne.filter(e=>"processing"===e.status).length,errorDocuments:ne.filter(e=>"error"===e.status).length};if(le){const c=ne.find(e=>e.id===le);if(!c)return me.jsx("div",{className:"p-4 text-red-600",children:"Document not found"});if(!c||!c.id)throw new Error("Invalid document data: missing document or document ID");const d=c.analysisData;c.status;const m=d?{companyName:(null==(e=null==d?void 0:d.dealOverview)?void 0:e.targetCompanyName)||"Not specified",industry:(null==(t=null==d?void 0:d.dealOverview)?void 0:t.industrySector)||"Not specified",revenue:(null==(i=null==(r=null==(n=null==d?void 0:d.financialSummary)?void 0:n.financials)?void 0:r.ltm)?void 0:i.revenue)||"N/A",ebitda:(null==(s=null==(a=null==(o=null==d?void 0:d.financialSummary)?void 0:o.financials)?void 0:a.ltm)?void 0:s.ebitda)||"N/A",employees:(null==(l=null==d?void 0:d.dealOverview)?void 0:l.employeeCount)||"Not specified",founded:"Not specified",location:(null==(u=null==d?void 0:d.dealOverview)?void 0:u.geography)||"Not specified",summary:(null==(f=null==d?void 0:d.preliminaryInvestmentThesis)?void 0:f.keyAttractions)||"No summary available",keyMetrics:{"Transaction Type":(null==(h=null==d?void 0:d.dealOverview)?void 0:h.transactionType)||"Not specified","Deal Source":(null==(p=null==d?void 0:d.dealOverview)?void 0:p.dealSource)||"Not specified"},financials:{revenue:[(null==(y=null==(v=null==(g=null==d?void 0:d.financialSummary)?void 0:g.financials)?void 0:v.fy3)?void 0:y.revenue)||"N/A",(null==(x=null==(w=null==(b=null==d?void 0:d.financialSummary)?void 0:b.financials)?void 0:w.fy2)?void 0:x.revenue)||"N/A",(null==(E=null==(S=null==(k=null==d?void 0:d.financialSummary)?void 0:k.financials)?void 0:S.fy1)?void 0:E.revenue)||"N/A",(null==(N=null==(C=null==(_=null==d?void 0:d.financialSummary)?void 0:_.financials)?void 0:C.ltm)?void 0:N.revenue)||"N/A"],ebitda:[(null==(P=null==(T=null==(I=null==d?void 0:d.financialSummary)?void 0:I.financials)?void 0:T.fy3)?void 0:P.ebitda)||"N/A",(null==(A=null==(O=null==(R=null==d?void 0:d.financialSummary)?void 0:R.financials)?void 0:O.fy2)?void 0:A.ebitda)||"N/A",(null==(D=null==(j=null==(L=null==d?void 0:d.financialSummary)?void 0:L.financials)?void 0:j.fy1)?void 0:D.ebitda)||"N/A",(null==(z=null==(U=null==(M=null==d?void 0:d.financialSummary)?void 0:M.financials)?void 0:U.ltm)?void 0:z.ebitda)||"N/A"],margins:[(null==(V=null==(B=null==(F=null==d?void 0:d.financialSummary)?void 0:F.financials)?void 0:B.fy3)?void 0:V.ebitdaMargin)||"N/A",(null==(W=null==(H=null==($=null==d?void 0:d.financialSummary)?void 0:$.financials)?void 0:H.fy2)?void 0:W.ebitdaMargin)||"N/A",(null==(G=null==(K=null==(q=null==d?void 0:d.financialSummary)?void 0:q.financials)?void 0:K.fy1)?void 0:G.ebitdaMargin)||"N/A",(null==(Y=null==(Q=null==(J=null==d?void 0:d.financialSummary)?void 0:J.financials)?void 0:Q.ltm)?void 0:Y.ebitdaMargin)||"N/A"]},risks:[(null==(X=null==d?void 0:d.preliminaryInvestmentThesis)?void 0:X.potentialRisks)||"Not specified"],opportunities:[(null==(Z=null==d?void 0:d.preliminaryInvestmentThesis)?void 0:Z.valueCreationLevers)||"Not specified"]}:void 0;try{return me.jsx(jx,{fallback:me.jsxs("div",{className:"p-8 bg-red-50 border border-red-200 rounded",children:[me.jsx("h2",{className:"text-xl font-bold text-red-800 mb-4",children:"Error Loading Document Viewer"}),me.jsx("p",{className:"text-red-600 mb-4",children:"There was an error loading the document viewer."}),me.jsx("button",{onClick:_e,className:"px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 mt-4",children:"Back to Documents"})]}),onError:(e,t)=>{},children:me.jsx(zx,{documentId:c.id,documentName:c.name,extractedData:m,cimReviewData:d,onBack:_e,onDownload:()=>ke(c.id)})})}catch(Ie){return me.jsxs("div",{className:"p-8 bg-red-50 border border-red-200 rounded",children:[me.jsx("h2",{className:"text-xl font-bold text-red-800 mb-4",children:"Critical Error"}),me.jsxs("p",{className:"text-red-600 mb-4",children:["Failed to render document viewer: ",Ie instanceof Error?Ie.message:"Unknown error"]}),me.jsx("button",{onClick:_e,className:"px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700",children:"Back to Documents"})]})}}return me.jsxs("div",{className:"min-h-screen bg-gray-50",children:[me.jsx("nav",{className:"bg-primary-600 shadow-soft border-b border-primary-700",children:me.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:me.jsxs("div",{className:"flex justify-between h-16",children:[me.jsxs("div",{className:"flex items-center space-x-4",children:[me.jsx("img",{src:"/assets/bluepoint-logo-e4483eca.png",alt:"Bluepoint Capital Partners",className:"h-10 w-auto"}),me.jsxs("div",{className:"flex flex-col",children:[me.jsx("h1",{className:"text-xl font-semibold text-white",children:"Blue Point Capital Partners"}),me.jsx("p",{className:"text-sm text-primary-200",children:"CIM Document Processor"})]})]}),me.jsxs("div",{className:"flex items-center space-x-4",children:[me.jsxs("span",{className:"text-sm text-white",children:["Welcome, ",(null==ee?void 0:ee.name)||(null==ee?void 0:ee.email)]}),me.jsx("button",{onClick:()=>ge(!0),className:"bg-yellow-500 hover:bg-yellow-600 text-white px-3 py-1 rounded-md text-sm",title:"Debug Authentication Issues",children:"🔧 Debug Auth"}),me.jsx(_x,{variant:"button",className:"bg-error-500 hover:bg-error-600 text-white"})]})]})})}),me.jsxs("div",{className:"max-w-7xl mx-auto py-6 sm:px-6 lg:px-8",children:[me.jsx("div",{className:"bg-white shadow-soft border-b border-gray-200 mb-6",children:me.jsx("div",{className:"px-4 sm:px-6 lg:px-8",children:me.jsxs("nav",{className:"-mb-px flex space-x-8",children:[me.jsxs("button",{onClick:()=>he("overview"),className:lx("flex items-center py-4 px-1 border-b-2 font-medium text-sm transition-colors duration-200","overview"===fe?"border-primary-600 text-primary-700":"border-transparent text-gray-500 hover:text-primary-600 hover:border-primary-300"),children:[me.jsx(gx,{className:"h-4 w-4 mr-2"}),"Overview"]}),me.jsxs("button",{onClick:()=>he("documents"),className:lx("flex items-center py-4 px-1 border-b-2 font-medium text-sm transition-colors duration-200","documents"===fe?"border-primary-600 text-primary-700":"border-transparent text-gray-500 hover:text-primary-600 hover:border-primary-300"),children:[me.jsx(mx,{className:"h-4 w-4 mr-2"}),"Documents"]}),me.jsxs("button",{onClick:()=>he("upload"),className:lx("flex items-center py-4 px-1 border-b-2 font-medium text-sm transition-colors duration-200","upload"===fe?"border-primary-600 text-primary-700":"border-transparent text-gray-500 hover:text-primary-600 hover:border-primary-300"),children:[me.jsx(kx,{className:"h-4 w-4 mr-2"}),"Upload"]}),ve&&me.jsxs(me.Fragment,{children:[me.jsxs("button",{onClick:()=>he("analytics"),className:lx("flex items-center py-4 px-1 border-b-2 font-medium text-sm transition-colors duration-200","analytics"===fe?"border-primary-600 text-primary-700":"border-transparent text-gray-500 hover:text-primary-600 hover:border-primary-300"),children:[me.jsx(xx,{className:"h-4 w-4 mr-2"}),"Analytics"]}),me.jsxs("button",{onClick:()=>he("monitoring"),className:lx("flex items-center py-4 px-1 border-b-2 font-medium text-sm transition-colors duration-200","monitoring"===fe?"border-primary-600 text-primary-700":"border-transparent text-gray-500 hover:text-primary-600 hover:border-primary-300"),children:[me.jsx(dx,{className:"h-4 w-4 mr-2"}),"Monitoring"]})]})]})})}),me.jsxs("div",{className:"px-4 sm:px-0",children:["overview"===fe&&me.jsxs("div",{className:"space-y-6",children:[me.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[me.jsx("div",{className:"bg-white overflow-hidden shadow-soft rounded-lg border border-gray-100",children:me.jsx("div",{className:"p-5",children:me.jsxs("div",{className:"flex items-center",children:[me.jsx("div",{className:"flex-shrink-0",children:me.jsx(mx,{className:"h-6 w-6 text-primary-500"})}),me.jsx("div",{className:"ml-5 w-0 flex-1",children:me.jsxs("dl",{children:[me.jsx("dt",{className:"text-sm font-medium text-gray-600 truncate",children:"Total Documents"}),me.jsx("dd",{className:"text-lg font-semibold text-primary-800",children:Ne.totalDocuments})]})})]})})}),me.jsx("div",{className:"bg-white overflow-hidden shadow-soft rounded-lg border border-gray-100",children:me.jsx("div",{className:"p-5",children:me.jsxs("div",{className:"flex items-center",children:[me.jsx("div",{className:"flex-shrink-0",children:me.jsx(fx,{className:"h-6 w-6 text-success-500"})}),me.jsx("div",{className:"ml-5 w-0 flex-1",children:me.jsxs("dl",{children:[me.jsx("dt",{className:"text-sm font-medium text-gray-600 truncate",children:"Completed"}),me.jsx("dd",{className:"text-lg font-semibold text-primary-800",children:Ne.completedDocuments})]})})]})})}),me.jsx("div",{className:"bg-white overflow-hidden shadow-soft rounded-lg border border-gray-100",children:me.jsx("div",{className:"p-5",children:me.jsxs("div",{className:"flex items-center",children:[me.jsx("div",{className:"flex-shrink-0",children:me.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-accent-500"})}),me.jsx("div",{className:"ml-5 w-0 flex-1",children:me.jsxs("dl",{children:[me.jsx("dt",{className:"text-sm font-medium text-gray-600 truncate",children:"Processing"}),me.jsx("dd",{className:"text-lg font-semibold text-primary-800",children:Ne.processingDocuments})]})})]})})}),me.jsx("div",{className:"bg-white overflow-hidden shadow-soft rounded-lg border border-gray-100",children:me.jsx("div",{className:"p-5",children:me.jsxs("div",{className:"flex items-center",children:[me.jsx("div",{className:"flex-shrink-0",children:me.jsx("div",{className:"h-6 w-6 text-error-500",children:"⚠️"})}),me.jsx("div",{className:"ml-5 w-0 flex-1",children:me.jsxs("dl",{children:[me.jsx("dt",{className:"text-sm font-medium text-gray-600 truncate",children:"Errors"}),me.jsx("dd",{className:"text-lg font-semibold text-primary-800",children:Ne.errorDocuments})]})})]})})})]}),me.jsx("div",{className:"bg-white shadow-soft rounded-lg border border-gray-100",children:me.jsxs("div",{className:"px-4 py-5 sm:p-6",children:[me.jsx("h3",{className:"text-lg leading-6 font-medium text-primary-800 mb-4",children:"Recent Documents"}),me.jsx(Ux,{documents:ne.slice(0,3),onViewDocument:xe,onDownloadDocument:ke,onDeleteDocument:Se,onRetryProcessing:Ee,onRefresh:be})]})})]}),"documents"===fe&&me.jsxs("div",{className:"space-y-6",children:[me.jsx("div",{className:"bg-white shadow-soft rounded-lg border border-gray-100 p-6",children:me.jsxs("div",{className:"flex items-center justify-between",children:[me.jsxs("div",{className:"flex-1 max-w-lg",children:[me.jsx("label",{htmlFor:"search",className:"sr-only",children:"Search documents"}),me.jsxs("div",{className:"relative",children:[me.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:me.jsx(wx,{className:"h-5 w-5 text-gray-400"})}),me.jsx("input",{id:"search",name:"search",className:"block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-primary-500 focus:border-primary-500 sm:text-sm transition-colors duration-200",placeholder:"Search documents...",type:"search",value:ce,onChange:e=>de(e.target.value)})]})]}),me.jsxs("div",{className:"flex space-x-3",children:[me.jsxs("button",{onClick:be,disabled:ie,className:"inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md shadow-soft text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 disabled:opacity-50 transition-colors duration-200",children:[me.jsx("div",{className:"h-4 w-4 mr-2 "+(ie?"animate-spin":""),children:"🔄"}),"Refresh"]}),me.jsxs("button",{onClick:()=>he("upload"),className:"inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-soft text-white bg-accent-500 hover:bg-accent-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-accent-500 transition-colors duration-200",children:[me.jsx(bx,{className:"h-4 w-4 mr-2"}),"Upload New"]})]})]})}),ie?me.jsxs("div",{className:"text-center py-12",children:[me.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-accent-500 mx-auto mb-4"}),me.jsx("p",{className:"text-gray-600",children:"Loading documents..."})]}):me.jsx(Ux,{documents:Ce,onViewDocument:xe,onDownloadDocument:ke,onDeleteDocument:Se,onRetryProcessing:Ee,onRefresh:be})]}),"upload"===fe&&me.jsxs("div",{className:"bg-white shadow-soft rounded-lg border border-gray-100 p-6",children:[me.jsx("h3",{className:"text-lg leading-6 font-medium text-primary-800 mb-6",children:"Upload CIM Documents"}),me.jsx(oe.Suspense,{fallback:me.jsx("div",{className:"flex items-center justify-center p-8",children:me.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}),children:me.jsx(Mx,{onUploadComplete:e=>{const t={id:e,status:"processing",name:"Processing...",originalName:"Processing...",uploadedAt:(new Date).toISOString(),fileSize:0,user_id:(null==ee?void 0:ee.id)||"",created_at:(new Date).toISOString(),updated_at:(new Date).toISOString()};re(e=>[...e,t])},onUploadError:e=>{}})})]}),"analytics"===fe&&ve&&me.jsx(oe.Suspense,{fallback:me.jsx("div",{className:"flex items-center justify-center p-8",children:me.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}),children:me.jsx(Fx,{})}),"monitoring"===fe&&ve&&me.jsx(oe.Suspense,{fallback:me.jsx("div",{className:"flex items-center justify-center p-8",children:me.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}),children:me.jsx(Bx,{})}),"analytics"===fe&&!ve&&me.jsx("div",{className:"bg-white shadow-soft rounded-lg border border-gray-100 p-6",children:me.jsxs("div",{className:"text-center",children:[me.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Access Denied"}),me.jsx("p",{className:"text-gray-600",children:"You don't have permission to view analytics."})]})}),"monitoring"===fe&&!ve&&me.jsx("div",{className:"bg-white shadow-soft rounded-lg border border-gray-100 p-6",children:me.jsxs("div",{className:"text-center",children:[me.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Access Denied"}),me.jsx("p",{className:"text-gray-600",children:"You don't have permission to view monitoring."})]})})]})]}),me.jsx(Dx,{isVisible:pe,onClose:()=>ge(!1)})]})},$x=()=>{const{user:e}=pw();return e?me.jsx(Tf,{to:"/dashboard",replace:!0}):me.jsxs("div",{className:"min-h-screen bg-gray-50 flex flex-col justify-center py-12 sm:px-6 lg:px-8",children:[me.jsx("div",{className:"sm:mx-auto sm:w-full sm:max-w-md",children:me.jsx("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900",children:"CIM Document Processor"})}),me.jsx("div",{className:"mt-8 sm:mx-auto sm:w-full sm:max-w-md",children:me.jsx(Sx,{})})]})},Hx=()=>me.jsx("div",{className:"min-h-screen bg-gray-50 flex flex-col justify-center py-12 sm:px-6 lg:px-8",children:me.jsx("div",{className:"sm:mx-auto sm:w-full sm:max-w-md",children:me.jsx("div",{className:"bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10",children:me.jsxs("div",{className:"text-center",children:[me.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Access Denied"}),me.jsx("p",{className:"text-gray-600 mb-6",children:"You don't have permission to access this resource."}),me.jsx(_x,{})]})})})}),Wx=()=>me.jsx(jx,{children:me.jsx(hw,{children:me.jsx(jf,{children:me.jsxs(Of,{children:[me.jsx(Pf,{path:"/login",element:me.jsx($x,{})}),me.jsx(Pf,{path:"/unauthorized",element:me.jsx(Hx,{})}),me.jsx(Pf,{path:"/dashboard",element:me.jsx(Ex,{children:me.jsx(Vx,{})})}),me.jsx(Pf,{path:"/",element:me.jsx(Tf,{to:"/dashboard",replace:!0})})]})})})});ge.createRoot(document.getElementById("root")).render(me.jsx(ae.StrictMode,{children:me.jsx(Wx,{})}));export{dx as A,fx as B,px as E,mx as F,Px as G,_x as L,ae as R,xx as T,kx as U,lx as a,Lx as b,cx as c,Rx as d,Tx as e,w as g,me as j,oe as r,pw as u};
|